function popUp(url,nam,w,h,extra){
	str='height='+h+',width='+w+','+extra;
	
	// The popup page has the title tag defined therefor to avoid errors set name to empty
	nam = "";
	
	if(parseInt(navigator.appVersion)>3)
		str+=',left='+(screen.width -w)/2+',top='+parseInt((screen.height -h)/3);
	
	win=window.open(url,nam,str);
}

function openRefs(){
	h=500; 
	w=343;
	url="/pop-ups/references.aspx";
	nam = "References";
	str='height='+h+',width='+w;
	
	if(parseInt(navigator.appVersion)>3)
		str+=',left='+(screen.width -w)/2+',top='+parseInt((screen.height -h)/3)+',scrollbars=1';
	win=window.open(url,nam,str);
}

function openCopyright(){
	h=500; 
	w=343;
	url="/pop-ups/copyright.aspx";
	nam = "Copyright";
	str='height='+h+',width='+w;
	
	if(parseInt(navigator.appVersion)>3)
		str+=',left='+(screen.width -w)/2+',top='+parseInt((screen.height -h)/3)+',scrollbars=1';
	win=window.open(url,nam,str);
}

function setLeftMenuHeight()
{
	var mainHeight = document.getElementById("maincontent").offsetHeight;
	var navHeight = document.getElementById("navbar").offsetHeight;

	if (navHeight < mainHeight)
		document.getElementById("navbar").style.height = mainHeight + 'px';
}

function popUpSections(selectedSection)
{	
	for (i=1;i<=4;i++)
    {
        document.getElementById("section" + i).style.display = 'none';
        document.getElementById("menusection" + i).style.color = '#001965';
        document.getElementById("menusection" + i).style.textDecoration = 'none';
    }

	document.getElementById(selectedSection).style.display = 'block';	
	document.getElementById("menu" + selectedSection).style.color = '#00B7FF';
}

function toggle(toggleElement)
{
	var div1 = document.getElementById(toggleElement);
	if (div1.style.display == 'none') {
		div1.style.display = 'block';
	} else {
		div1.style.display = 'none';
    }
}
