if ((navigator.appVersion.indexOf('Mac')!= -1)){ // Mac adjust
	document.write('<link href="mac.css" rel="stylesheet" type="text/css">');
}

function changeImages() {

     if (document.images && (preloadFlag == true)) {

          for (var i=0; i<changeImages.arguments.length; i+=2) {

               document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
          }
     }
}

function newImage(ovrSrc) {

     if (document.images) {
          img = new Image();
          img.src = ovrSrc;
          return img;
     }
}

var preloadFlag = false;

function preloadImages() {

     if (document.images) {
		home_o = "images/home_o.gif";
										
		preloadFlag = true;
	}
}

var newWindow = null;

function closeWin() {
	if (newWindow != null) {
		if(!newWindow.closed)
			newWindow.close();
	}
}

function newWin(url, type, strWidth, strHeight) {
	
	closeWin();
	
	if (type == "fullScreen") {
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "menu") tools = "resizable=yes,toolbar=no,location=no,menubar=yes,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=0,top=0";
	if (type == "console") tools = "resizable=no,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;


function printArticle() {
	if (window.print) {
		setTimeout('window.print();',200);
	}
	else if (agt.indexOf("mac") != -1) {
		alert("Press 'Cmd+p' on your keyboard to print article.");
	}
	else {
		alert("Press 'Ctrl+p' on your keyboard to print article.")
	}
}

var timerID = null;
var timerOn = false;
var timecount = 1000;
var check = false;

var isDHTML = 0;
var isLayers = 0;//N4x
var isAll = 0;//IE4+
var isID = 0;//N6+,IE5+

if (document.getElementById){isID = 1; isDHTML = 1;}
else{
	if (document.all){isAll = 1; isDHTML = 1;}
	else{
		browserVersion = parseInt(navigator.appVersion);
		if((navigator.appName.indexOf('Netscape')!= -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
	}
}

function findDOM(objectID, withStyle){	// if accessing object's styles
	
	if (withStyle == 1){		
						if (isID){return(document.getElementById(objectID).style);
						}	
						else{
							if (isAll){return(document.all[objectID].style);}
							else{
								if (isLayers){return(document.layers[objectID]);}
							};
						}
	}

	else{		// if accessing object's other properties
			if (isID){return(document.getElementById(objectID));}
			else{
					if(isAll){return(document.all[objectID]);}
					else{
						if(isLayers){return(document.layers[objectID]);}
					};
			}
	}
}
	

function linkShow(objectID) {
		domStyle = findDOM(objectID,1);
		domStyle.visibility = "visible";
}	
	
function linkHide(objectID) {
		domStyle = findDOM(objectID,1);
		domStyle.visibility = "hidden";
}	

function hideAll() {
		linkHide('subnav_bios');
		linkHide('subnav_perform');
}	

function startTime() {
      
	   if (timerOn == false) {
              timerID=setTimeout( "hideAll()" , timecount);
              timerOn = true;
       }
}

function stopTime() {
       
	   if (timerOn) {
  	       
		    clearTimeout(timerID);
              timerID = null;
              timerOn = false;
	   }
}