



<!--Header javascript-->

/* This code is copyright (C) 2001 by
   UW Department of Pathology

   Usage of this code is covered under the 
   legal section of this web site.  Specifically,
   http://www.pathology.washington.edu/legal.html
*/

var current_layer = null;
var timerID = null;

	function mIn (img, doA) {   		
		StopTimeout ();		
		HideMenu();		

		if (img)
		{	   
	   		showLayer(img); 
			if (!document.all)
				runFunction(img, "captureEvents (Event.MOUSEOUT | Event.MOUSEOVER)");

			runFunction (img, "onmouseover=function (e) { StopTimeout(e) }");
			runFunction (img, "onmouseout=function (e) { StartTimeout(e) }");
			
			current_layer = img;
   
		}	
	}
	
	function mOut (img, doA) 
	{
		StartTimeout (null);
   	}

	function HideMenu () 
	{
		if(current_layer != null)
		{
			hideLayer (current_layer);
		}
		timerID = null;
   	}
	
	function StartTimeout (e)
	{	
		// Check to make sure the event was triggered by the actual 
		// layer and not a link contained within the layer.

		if (e != null)		
		{
			if ((e.target).toString().indexOf("Layer") == -1)
				return;
		}

		if (timerID == null)
			timerID = setTimeout ('HideMenu()', 1000);
	}

	function StopTimeout ()
	{
		if (timerID != null)
			clearTimeout (timerID);
		timerID = null;
	}

   	function setup ()
   	{
		layerinit();		// Initialize the layer module

   	}




	function Start ()
	{
		setup();
		setposition();
		if (!document.all)
		    window.captureEvents(Event.RESIZE); 
	
    	window.onresize=setposition; 
	}



	function setposition()
	{

		if (!document.all)		// Netscape browser in use
		{
			if(((window.innerWidth/2) - 15) >= 320)
				{
			document.layers["pathlogo"].left = (window.innerWidth/2 - 15);
			document.layers["pathlogo"].visibility = "visible";
				}
			else
				{
			document.layers["pathlogo"].left = 305;
			document.layers["pathlogo"].visibility = "visible";
				}
		}
		else					// IE browser in user
		{

			if (((document.body.clientWidth /2) - 15) >= 320){
			document.all["pathlogo"].style.pixelLeft = (document.body.clientWidth /2 - 15);
			document.all["pathlogo"].style.visibility = "visible";
				}
			else
			{
			document.all["pathlogo"].style.pixelLeft = 305;
			document.all["pathlogo"].style.visibility = "visible";
					}
	
		}
	}

<!--End header javascript-->

<!--Layers Javascript-->

var layerRef=""; 
var styleSwitch="";

//Checks to varify version of Browser and modifies code via 
//Javascript so that the "layer" function is setup for Netscape
//and IE

function layerinit()
{

	if (navigator.appName == "Netscape"){
       	layerRef="document.layers";
		styleSwitch="";
    }else{
    	layerRef="document.all";
    	styleSwitch=".style";
    }
} 

function showLayer(layerName)
{
 	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}

function hideLayer(layerName)
{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}

function ishidden (layerName)
{
	a = eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility');
	if (a == 'hidden')
		return true;
	return false;
}

function moveLayerTo(layerName,left,top)
{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top='+top);
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left='+left);
} 

function moveLayerToRel(layerName,left,top)
{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top='+layerRef+'["'+layerName+'"]'+styleSwitch+'.top+'+top);
    	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left='+layerRef+'["'+layerName+'"]'+styleSwitch+'.left+'+left);
} 

function changeProp (layerName, property, value)
{
	eval(layerRef+'["'+layerName+'"].'+property+'="'+value+'"');	
}

function runFunction (layerName, functionName)
{
	eval(layerRef+'["'+layerName+'"].'+functionName+';');
}

function readProp (layerName, property)
{
	return eval(layerRef+'["'+layerName+'"].'+property);
}

function readStyle(layerName,property)
{
	return eval(layerRef+'["'+layerName+'"]'+styleSwitch+"."+property);
}



var dateform
speed=1000
len=28
tid = 0;

function dodate()
{
  f.date.value=new Date();
  tid=window.setTimeout("dodate()",speed);
}
 
function start(x) {
  f=x
  tid=window.setTimeout("dodate()",speed);
}
 
function cleartid() {
  window.clearTimeout(tid);
}
 
// for some reason on some pages this crashes netscape
function Clock()
{
document.write('<FORM name=dateform><input name=date size=')
document.write(len)
document.write(' value="Clock: Requires Javascript"></FORM>')
start(document.dateform);
}








//New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here//
//New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here//
//New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here//
//New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here////New Code Down here//

