//Popup window for flash, avi files
function modelesswin(url,mwidth,mheight){
	if (document.all&&window.print) //if ie5
		eval('window.showModelessDialog(url,"","help:0;resizable:0;dialogWidth:'+(mwidth)+'px;dialogHeight:'+(mheight+80)+'px;status:no;scroll:no;")')
	else 
		eval('window.open(url,"","width='+(mwidth+50)+'px,height='+(mheight+80)+'px,resizable=0,scrollbars=0")')
}
//Popup window for 2 column layout
function win2col(url2col){
	window.open(url2col,'BP','width=433,height=500,status=no,resizable=no,top=110,left=200,toolbar=no,menubar=no,scrollbars=yes')
}
//Popup window for 3 column layout
function win3col(url3col){
	window.open(url3col,'BP_com','width=627, height=500,resizable=0,top=110,left=200,toolbar=0,titlebar=0,menubar=0,scrollbars=yes')
}
// Browser sniffer
// get platform and browser versions
var platform = navigator.platform.substr(0,3);
var browserName = navigator.appName;
var browserVer;

//for IE 5, the first number in "navigator.appVersion" is 4.0, so need to parse the string further 
if (navigator.appVersion.indexOf('MSIE 5') != -1) {
    browserVer=5;
}

else {
    browserVer = parseInt(navigator.appVersion);
}

// Platform is Macintosh
if (platform=="Mac") {
    document.write('<link rel="stylesheet" type="text/css" href="css/mac.css" />');
}


// Begin: Function for masthead //
var BVersion
BVersion=navigator.appVersion
if (BVersion.indexOf("MSIE 5.0")!=-1)
{

document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G1_masthead_IE5.css" />');
document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G7_HomeCountryDropdown180IE5.css" />');
}

else if (BVersion.indexOf("MSIE 5.5")!=-1)
{
document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G1_masthead_IE5.css" />');
document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G7_HomeCountryDropdown180IE5.css" />');
}

else if (navigator.platform.indexOf("MacPPC")!=-1)
{
	document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G1_masthead_Mac.css" />');
}

else {
document.write('<link rel="stylesheet" type="text/css" href="css/modules/M_G1_masthead.css" />');
}
// End: Function for masthead //

// Begin: Function for Left Nav expand - collapse //
var prev_n=0;
function toggleMenu(n) {
	if (n != prev_n) {
	for (i=1; i<=3; i++){
		eval('document.getElementById("childContainer'+i+'").style.display = "none"');
	}
		eval('document.getElementById("childContainer'+n+'").style.display = "block"');
		prev_n=n;
	  }
}
// End: Function for Left Nav expand - collapse //

document.write('<LINK REL="ICON"  HREF="burt_favicon.ico" type="image/x-icon"/>');
document.write('<LINK REL="SHORTCUT ICON"  HREF="burt_favicon.ico" type="image/x-icon"/>');


/* Begin: Added for CR 902*/

 var menuOpenSearch = false;
function turnOffPrevSearch()
{
	overNav = true;
	if(menuOpenSearch)
	{
		//buttonclick(menuOpen,'close',globalBtn);
		showSubSearch(menuOpenSearch,false)
		// Added to fix cls:27483
		hideDropDownSearch(true)
	}
}
function showSubSearch(el,status)
{
 
 linkObj = document.getElementById(el);
 list = el+"Sub";
 listObj = document.getElementById(list);
 listLI=list+"LI";
 listLIObj = document.getElementById(listLI);
 if(status)
 {
  // Added to fix cls:27483
  hideDropDownSearch(false)
  linkObj.className = "buttonHi";
  listObj.style.display = "block";
  listObj.style.visibility = "visible";
  listLIObj.style.visibility = "visible";
  listLIObj.style.display = "block";
  menuOpenSearch = el;
 }
 else
 {
  linkObj.className = "buttonHi";
  listObj.style.display = "none";
   listObj.style.visibility = "hidden";
   listLIObj.style.visibility = "hidden";
   listLIObj.style.display = "none";
 menuOpenSearch = false;
 }
} 



/*** start the counter ***/
function startNavTimerSearch(inputBoxId)
{
	document.getElementById(inputBoxId).focus();
} 

function focusOut(inputBoxId)
{
	document.getElementById(inputBoxId).style.display="none";	
}

function focusOnInputBox(inputBoxId)
{
	document.getElementById(inputBoxId).style.display="block";
}

// Added to fix cls:27483
var mouseStatus=false;
function hideDropDownSearch(mouseStatus)
{
	if(mouseStatus)
	{
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
			var ieversion=new Number(RegExp.$1) 
			if (ieversion<=6 && document.getElementById("stateId")!=null)
				document.getElementById("stateId").style.visibility = "visible";
		}
	}
	else
	{
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
		var ieversion=new Number(RegExp.$1) 
			if (ieversion<=6 && document.getElementById("stateId")!=null)
			document.getElementById("stateId").style.visibility = "hidden"; 
		}
	}
}
/* End: Added for CR 902*/


