userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
		
function homePagemouseOver(){
	arguments[0].src = arguments[1];
	linkTextBoxOverOut(arguments[2], arguments[3]);
}
function notice(){
	alert("You are about to leave University Suburbarn Helath Center's Website(http://www.university-suburban.com) for a third party Website (" + arguments[0] + "). USHC does not hold any responsibility for content provided by third party sites. etc");
}
/* this function is to display the the link text box */
/* when calling, pass in the position to display the text box and the div id of the text to show */
currentTextRef = "";
function linkTextBoxOverOut(whichPos, whichText){
	ref = document.getElementById('linktextbox');
	textRef = document.getElementById(whichText);
	switch(whichPos){
		case "0" :
			ref.style.top = "106px";
			ref.style.left = "354px";
			ref.style.display = "block";
			textRef.style.display = "block";
			break;
		case "1" :
			ref.style.top = "106px";
			ref.style.left = "518px";
			ref.style.display = "block";
			textRef.style.display = "block";
			break;
		case "2" :
			ref.style.top = "262px";
			ref.style.left = "518px";
			ref.style.display = "block";
			textRef.style.display = "block";
			break;
		default : // to reuse this function on mouseouts pass in any value  4 or above
			textRef.style.display = "none";
			ref.style.display = "none";
			
			break;
	}
	
	
}
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		findADoctor_over = newImage("images/home/findADoctor_over.gif");
		aboutUSHC_over = newImage("images/home/aboutUSHC_over.gif");
		myUSHC_over = newImage("images/home/myUSHC_over.gif");
		insurance_over = newImage("images/home/insurance_over.gif");
		staffOnly_over = newImage("images/home/staffOnly_over.gif");
		education_over = newImage("images/home/education_over.gif");
		guestServices_over = newImage("images/home/guestServices_over.gif");
		newsAndEvents_over = newImage("images/home/newsAndEvents_over.gif");
		testAndProcedures_over = newImage("images/home/testAndProcedures_over.gif");
		preloadFlag = true;
	}
}
function loadGlobal(fFrame)
{
	window.top.frames[1].location.replace(fFrame);
}
function hello(){
	linkArray = "";
	if(arguments[0].nodeName == ("A" || "a")){
		linkArray = "mailto:";
		linkArray = linkArray + arguments[0].firstChild.innerHTML;
		linkArray = linkArray + "@";
		linkArray = linkArray + arguments[0].firstChild.nextSibling.nextSibling.innerHTML;
		arguments[0].href = linkArray;
		//alert(linkArray);
	}

}