function openPage(URL,w,h) {
leftpos = Math.round((screen.width-w)/2);
toppos = Math.round((screen.height-h)/2);
NewWIn = window.open(URL,'newwin','top='+toppos+',left='+leftpos+',width='+w+',height='+h+',toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no,location=no');
NewWIn.window.focus();
}

function activatetab(tabs_container_id, tabid, tabcontentid) {
	
	tabdivs = document.getElementById(tabs_container_id).getElementsByTagName('div');
	
	for (i=0;i<tabdivs.length;i++)
	{
		//alert(tabdivs[i].className);
		// deactivate all
		tmp = tabdivs[i].className;
		tmp2 = tmp.replace(/ active/," inactive");
		tabdivs[i].className = tmp2;
	}
	
	document.getElementById(tabid).className = 'tab active';
	
	document.getElementById(tabcontentid).className = 'tabcontent active';
	
	
	
}

function showHideDiv(myid) {
	if (document.getElementById(myid).style.display=='none') {
		document.getElementById(myid).style.display='block';
	} else {
		document.getElementById(myid).style.display='block';
	}
}