function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
function hoverWidgetItem(x) {
	var vCN = x.className;
	if (vCN == "navItemSelected"){
		return;
	}
	x.className="navitem_over";
}

function WidgetItem(x) {
	var vCN = x.className;
	if (vCN == "navitem_over"){
		x.className="navitem";
	}
}

function GblMenuHover(x)
{
	//*x = anchor object*/
	var sClassName = x.id;
	var sClassNameRoot = sClassName.slice(5);
	var vImgID = "img_" + sClassNameRoot;
	var oImg = document.getElementById(vImgID);
	var vImgSrc = oImg.src;
	var IsRedBox;
	IsRedBox = vImgSrc.indexOf("icon_redbox.gif");
	//alert(IsRedBox);
	if (0 <= IsRedBox){
		return;
	}
	oImg.src = "images/icon_redbox.gif";
	x.stylebackgroundColor = "#2da6c6";
}
function GblMenuS(x)
{
	var sClassName = x.id;
	var sClassNameRoot = sClassName.slice(5);
	var vImgID = "img_" + sClassNameRoot;
	var oImg = document.getElementById(vImgID);
	var vImgSrc;
	vImgSrc = oImg.src;
	var IsSelected;
	IsSelected = x.className.indexOf("glbl menuselected");
	if (0 <= IsSelected){ //skip mouseout if item is "selected"
		return;
	}
	oImg.src = "images/icon_white.gif";
	x.style.backgroundColor = "none";
}	

function FlyOut(x)
{
	//*x = div of NavWidget object that has flyout */
	var sID = x.id;
	var sIDRoot = sID.slice(8);
	var vFlyoutID = sID + "_0";
	var oFlyout = document.getElementById(vFlyoutID);
	oFlyout.style.display = "block";
}
function FlyOutOff(x)
{
	var sID = x.id;
	var sIDRoot = sID.slice(8);
	var vFlyoutID = sID + "_0";
	var oFlyout = document.getElementById(vFlyoutID);
	oFlyout.style.display = "none";
}
function OpenNewWindow(URL,Target)
{
	window.open(URL,Target);
	return false;
}
function OpenTestDir()
{// Used to be--> http://205.158.190.166/etd/client/?clientid=PA9983
	window.open('http://etd.paml.com/etd/client/index.php?clientid=PA9983','TestDir');
	return false;
}
function OpenABN()
{
	window.open('http://arrowhead01.paml.com:4200/req.aspx','ABNRequest');
	return false;
}

function OpenLabResults()
{
	window.open('https://copia.mdlus.com/','LabResults');
	return false;
}

function externalLinks() 
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
	if(anchors[i].href.match('/etd/'))
		{anchors[i].target = "_blank";}
	}
}

