/*
     _____________________________________________________
    |                                                     |
    | Code developed by Giulio Gravinese at INetMedia.com |
    |   jules@inetmedia.com - http://www.inetmedia.com    |
    |                                                     |
    |   If you rip my code, please leave the credits in.  |
    |                                                     |
     =====================================================
	 
The main menu buttons are images. I do that so the entire tab invokes the rollever (not just the text).

The rollover looks like the simple kind, but is actually swapping div transparence, NOT image sources!
This had to be done so that the images can have different clickable areas (maps).

When the tab is rolledout, the default submenu is placed back.
When the submenu is out, rolling over re-places that submenu (since rolling off the tab tries to remove it!).
For that reason the link maps are butted right against each other.

When you roll off of the submenu's links, the default submenu is placed back (so if the viewer rolls off, into the page).

*/
	
	
// Check Browser
var isMinNS4 = (document.layers) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isNS6 = (document.getElementById&&!document.all) ? 1 : 0;

// Preload Rollover Images
if (document.images) {  
hom_on = new Image();
hom_on.src = "http://www.winthrop.org/includes/headmedia/hom_on.gif";
abo_on = new Image();
abo_on.src = "http://www.winthrop.org/includes/headmedia/abo_on.gif";
wha_on = new Image();
wha_on.src = "http://www.winthrop.org/includes/headmedia/wha_on.gif";
res_on = new Image();
res_on.src = "http://www.winthrop.org/includes/headmedia/res_on.gif";
dep_on = new Image();
dep_on.src = "http://www.winthrop.org/includes/headmedia/dep_on.gif";
don_on = new Image();
don_on.src = "http://www.winthrop.org/includes/headmedia/don_on.gif";
sea_on = new Image();
sea_on.src = "http://www.winthrop.org/includes/headmedia/sea_on.gif";
edu_on = new Image();
edu_on.src = "http://www.winthrop.org/includes/headmedia/edu_on.gif";

hom_off = new Image();
hom_off.src = "http://www.winthrop.org/includes/headmedia/hom_off.gif";
abo_off = new Image();
abo_off.src = "http://www.winthrop.org/includes/headmedia/abo_off.gif";
wha_off = new Image();
wha_off.src = "http://www.winthrop.org/includes/headmedia/wha_off.gif";
res_off = new Image();
res_off.src = "http://www.winthrop.org/includes/headmedia/res_off.gif";
dep_off = new Image();
dep_off.src = "http://www.winthrop.org/includes/headmedia/dep_off.gif";
don_off = new Image();
don_off.src = "http://www.winthrop.org/includes/headmedia/don_off.gif";
sea_off = new Image();
sea_off.src = "http://www.winthrop.org/includes/headmedia/sea_off.gif";
edu_off = new Image();
edu_off.src = "http://www.winthrop.org/includes/headmedia/edu_off.gif";
}

// Hide All Divs
function hideall(whichnot) {
	if (whichnot != 'hom') { 
		turnOff('hom'); 
	} 
	if (whichnot != 'abo') { 
		turnOff('abo'); 
	} 
	if (whichnot != 'wha') { 
		turnOff('wha'); 
	} 
	if (whichnot != 'res') { 
		turnOff('res'); 
	} 
	if (whichnot != 'dep') { 
		turnOff('dep'); 
	} 
	if (whichnot != 'don') { 
		turnOff('don'); 
	} 
	if (whichnot != 'edu') { 
		turnOff('edu'); 
	}
}

// Turn On Specific Div and Rollover
function turnOn(imageName) {  
	if (document.images) {    
		//alert(imageName);
		document[imageName].src = eval(imageName + "_on.src"); 
	}
	if (isMinIE4) {
		document.all(imageName+'div').style.visibility = 'visible';
	} else if (isNS6) {
		document.getElementById(imageName+'div').style.visibility = 'visible';
	} else if (isMinNS4) {
		document.layers[imageName+'div'].visibility = 'show';
	}
}

// Turn Off Specific Div and Rollover
function turnOff(imageName) { 
	if (document.images) { 
		//alert(imageName);
		document[imageName].src = eval(imageName + "_off.src");
	}
	if (isMinIE4) {
		document.all(imageName+'div').style.visibility = 'hidden';
	} else if (isNS6) {
		document.getElementById(imageName+'div').style.visibility = 'hidden';
	} else if (isMinNS4) {
		document.layers[imageName+'div'].visibility = 'hide';
	}
}

// Href Dummy
function donothing() {
	window.status='';
}