
var newwindow = '';
function openMBWindow(theURL, newWindowProperties) {
 	var defaultProperties =  'scrollbars=yes,width=1024,height=768,menubar=yes,resizable=yes,toolbar=yes,location=yes,status=yes';
	var theWindowProperties = '';
	
	if (newWindowProperties == '') {
		var theWindowProperties = defaultProperties;
	}
	else {
		var theWindowProperties = newWindowProperties;
	}
	
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = theURL;
	}
	else {
		newwindow=window.open(theURL, 'MBWindow', theWindowProperties);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

var activeTab = 'tab1';
function switchTab(id)
{
	if(activeTab != id)
	{
		document.getElementById(activeTab).className='';
		document.getElementById(activeTab + "data").style.visibility='hidden';
		document.getElementById(activeTab + "data").style.display='none';
		activeTab = id;
		document.getElementById(id).className='active';
		document.getElementById(id + "data").style.visibility='visible';
		document.getElementById(id + "data").style.display='block';

	}
}
