
// Begin: Function for masthead //

function modelesswin(url,mwidth,mheight){
	if (document.all&&window.print) //if ie5
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05
		eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+(mwidth)+'px;dialogHeight:'+(mheight+80)+'px;status:no;scroll:no;")')
	else 
    //resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05
		eval('window.open(url,"","width='+(mwidth+50)+'px,height='+(mheight+80)+'px,resizable=1,scrollbars=0")')
}
	
function win2col(url2col){
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05 
	window.open(url2col,'BP','width=433,height=500,status=no,resizable=1,top=110,left=200,toolbar=no,menubar=no,scrollbars=yes')
}

function win3col(url3col){
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05
	window.open(url3col,'Bp_com','width=627, height=500,resizable=1,top=110,left=200,toolbar=0,titlebar=0,menubar=0,scrollbars=yes')
}

if (navigator.platform.indexOf("MacPPC")!=-1)
{
	
	document.write('<link rel="stylesheet" type="text/css" href="english/css/modules/pageNav_Mac.css" />');
	document.write('<link rel="stylesheet" type="text/css" href="english/css/text/en/text_Mac.css" />');
	document.write('<link rel="stylesheet" type="text/css" href="english/modules/cda/css/relatedLinks_Mac.css" />');
	
}


// ****************MASTHEAD JAVASCRIPT*********************//

/*** global vars to keep track of menu state ***/
var menuOpen = false; //name of menu open
var overNav = false; //is the user over the nav?
var timeElapsed = 0; // var to keep track of time elapsed
var timerLength = 2000;	// length of timer


/*** turn off previous open menu ***/
function turnOffPrev()
{
	overNav = true;
	if(menuOpen)
	{
		//buttonclick(menuOpen,'close',globalBtn);
		showSub(menuOpen,false)
	}
}

/*** start the counter ***/
function startNavTimer()
{
	// comment...
	overNav = false;
	setTimeout('count()',100)

}

/*** set var so counter stops ***/
function stopNavTimer()
{
	overNav = true;
}

/*** count function - counts up to timerLength ***/
function count()
{
	timeElapsed += 100;
	// is the user still over the nav? If not, stop counting:
	if(!overNav)
	{
		if(timeElapsed < timerLength)
		{
			// call again:
			setTimeout('count()',100);
		}
		else
		{
			// got to the end, so stop counter and turn off the menu
			//reset timer:
			timeElapsed = 0;
			turnOffPrev();

		}
	}
	else
	{
		// stop counting, and reset counter:
		timeElapsed = 0;
	}
}

/*** show sub menu ***/
function showSub(el,status)
{
	linkObj = document.getElementById(el);
	list = el+"Sub";
	listObj = document.getElementById(list);
	if(status)
	{
		linkObj.className = "button1";
		listObj.style.display = "block";
		listObj.style.visibility = "visible";
		menuOpen = el;
	}
	else
	{
		linkObj.className = "button";
		listObj.style.display = "none";
		menuOpen = false;
	}
}