//***********************************   determine browster   **************************************************************

var browsername=navigator.appName;
if (browsername.indexOf("Netscape")!=-1) {browsername="NS"}
else {if (browsername.indexOf("Microsoft")!=-1) {browsername="MSIE"}
else {browsername="N/A"}};
if(navigator.userAgent.indexOf("Mac") != -1){
	browsername="Mac"};
//************************************  end browser determination  *********************************************************

//************************************  begin rollover code  ***************************************************************
if (document.images) { //preload rollovers
			//create the image objects - these are the originals; this is to have them available for the onMouseout event
			miProServe = new Image  //mi stands for menu image
			miPhysDirect = new Image
			miHealthInfo = new Image
			miOccuMed = new Image
			miCareer = new Image

			//assign images to the source property of the image objects - this loads the image into the client browser
			miProServe.src = "/images/whitemenu_1_03.jpg"
			miPhysDirect.src = "/images/whitemenu_1_04.jpg"
			miHealthInfo.src = "/images/whitemenu_1_05.jpg"
			miOccuMed.src = "/images/whitemenu_1_06.jpg"
			miCareer.src = "/images/whitemenu_1_07.jpg"
			
			//again, this time for the roll-over image that will appear when the user mouses over the div tag that will hold the effect
			roProServe = new Image  //ro stands for rollover
			roPhysDirect = new Image
			roHealthInfo = new Image
			roOccuMed = new Image
			roCareer = new Image
			
			roProServe.src = "/images/rollovers_03.jpg"
			roPhysDirect.src = "/images/rollovers_04.jpg"
			roHealthInfo.src = "/images/rollovers_05.jpg"
			roOccuMed.src = "/images/rollovers_06.jpg"
			roCareer.src = "/images/rollovers_07.jpg"
		}
		//the chgImg function facilitates the rollover effect for the menu.  The imgField is the NAME in the image tag that will be changed.  The newImg refers to the image object (specified above) that will appear when the onMouseover or onMouseout event occurs.  The onMouseover event will have one of the image objects that starts with 'ro'; the onMouseout event uses an image object starting with 'mi'.  The imgField NAMES all start with 'me' for Menu Element.
		function chgImg(imgField,newImg) {
			if (document.images) { //this function should be cross-platform compatible as it uses the standard Javascript Document Object Model.
				document[imgField].src= eval(newImg + ".src")
			}
		}
//************************************    end rollover code     ************************************************************

//************************************    begin menu code		 ***********************************************************

		stdBrowser = (document.getElementById) ? true : false  //determine whether the client browser understands the getElementById method used by IE5+ and NN6+; if the browser does not, then alternative means will be used below.

		function toggleMenu(currElem,nextPos,disp) {  //the function needs 3 values: currElem = the div tag that holds the popout menu image; nextPos tells the browser how far to bring the div down - in this case 57 pixels seems to work in IE, NN, and Opera; disp changes the div tag's style:display property to either 'inline' when it is mouseovered or 'none' when it should disappear after the onMouseout.
			menuObj = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem)//this line gives the script cross-browser compatibility
			if (toggleMenu.arguments.length == 1) {
				nextPos = (parseInt(menuObj.top) == -5) ? -90 : -5
			}
			if (browsername=="NS")
			{
				nextPos=nextPos+8
			}
			menuObj.top = (stdBrowser) ? nextPos + "px" : nextPos 
			menuObj.display = disp
		}

//************************************    end menu code		 ***********************************************************

//************************************    start page creation code		 ***********************************************************


if (browsername=="NS"){
	w=window.width
	r=((w-700)/2)
	//	alert (w+","+r)
	x=r+166 //position of first menu popout
	y=r+272//position of second menu popout
	z=r+380//position of third menu popout
	w=r+486//position of fourth menu popout
	u=r+594//position of fifth menu popout
	document.write ("<style type=\"text/css\">.menu		{position:absolute; top:-900px;z-index:10;}/*every one of the popout menus uses the menu class;  then, each gets the appropriate ID from below.*/#proserve	{left:"+x+"px;}#physdirect {left:"+y+"px;}#healthinfo	{left:"+z+"px;}#occumed	{left:"+w+"px;}#career		{left:"+u+"px;}img			{text-decoration:none;border-width:0;}div			{z-index:1;}</style>")
	}else{//microsoft IE or opera or whatever else 

	document.write ("<style type=\"text/css\">.menu		{position:absolute; top:-700px;z-index:10;}/*every one of the popout menus uses the menu class;  then, each gets the appropriate ID from below.*/#proserve	{left:283px;}#physdirect {left:388px;}#healthinfo	{left:505px;}#occumed	{left:617px;}#career		{left:720px;}img			{text-decoration:none;border-width:0;}div			{z-index:1;}</style>")	
}
