<!-- Script Begin
// global variables
var timerID = null;
var timerOn = false;
var timecount = 500;
var what = null;
var newbrowser = true;
var NS4					= 0;	//Netscape4?
var IE4					= 0;	//Internet Explorer 4?
var W3C					= 1;	//W3C compliant browser.  Opera 5+, Netscape 6+, IE5+, Mozilla...
var OP					= 0;	//Opera?
var AOL					= 0;	//AOL browser?
var Netscape				= 0;	//Any version of Netscape?
// More browser sniffing
browserie4	= 0;
browserie5 	= 0;
brwosernn4	= 0;
browsernn6	= 0; 
browserisMac	= 0;


function init() {
	W3C = document.getElementById? true : false;
	NS4 = document.layers? true : false;
	IE4 = document.all? true : false;
	if (navigator.userAgent.indexOf("Mac") != -1){
		browserisMac = 1;
	}
	if (navigator.userAgent.indexOf("Opera") != -1) {
		OP = 1;
	}
        else if(navigator.userAgent.indexOf("AOL") != -1) {
		AOL = 1;
        }
	else {
		browserie4 = (document.all && !document.getElementById);
		browsernn4 = (document.layers);
		browserie5 = (document.all && document.getElementById);
		browsernn6 = (document.addEventListener);
	}
}



function showDiv(layerName) {
	if (W3C) {
		document.getElementById(layerName).style.visibility="visible";
	}
	else if (NS4) {
		document.layers["subMenuBar"].document.layers[layerName].visibility = "show";
	}
	else if (IE4) {
		document.all(layerName).style.visibility="visible";
	}
}

function hideDiv(layerName) {
	if (W3C) {
		document.getElementById(layerName).style.visibility="hidden";
	}
	else if (NS4) {
		document.layers["subMenuBar"].document.layers[layerName].visibility = "hide";
	}
	else if (IE4) {
		document.all(layerName).style.visibility="hidden";
	}
}


function hideAllDivs() {
	hideDiv('subAboutMenu');
	hideDiv('subAboutWhyMenu');
	hideDiv('subAboutDocsMenu');
	hideDiv('subDonateMenu');
	hideDiv('subCountriesMenu');
	hideDiv('subVolunteersMenu');
}

function hideAllSubDivs() {
	hideDiv('subAboutWhyMenu');
	hideDiv('subAboutDocsMenu');
}


function startTime() {
        if (timerOn == false) {
                timerID=setTimeout( "hideAllDivs()" , timecount);
                timerOn = true;	
        }
}


function stopTime() {
        if (timerOn) {
		clearTimeout(timerID);
                timerID = null;
                timerOn = false;	
        }
}

function colorOn(thisItem) {
	if (W3C) {
		document.getElementById(thisItem.id).style.color="rgb(90,170,66)";
	}
	else if (IE4) {
		document.all(thisItem.id).style.color="rgb(90,170,66)";
	}
}

function colorOff(thisItem) {
	if (W3C) {
		document.getElementById(thisItem.id).style.color="black";
	}
	else if (IE4) {
		document.all(thisItem.id).style.color="black";
	}
}

function openMenu(menuName,thisItem) {
	hideAllDivs();
	showDiv(menuName,thisItem);
	colorOn(thisItem);
	stopTime();
}

function openSubMenu(menuName,thisItem) {
	showDiv(menuName,thisItem);
	colorOn(thisItem);
	stopTime();
}

function closeMenu(thisItem) {
	colorOff(thisItem);
	startTime();
}

function menuItemOn(thisItem) {
	stopTime();
	colorOn(thisItem);
}

function menuItemOff(thisItem) {
	colorOff(thisItem);
	startTime();
}

function existDiv(layerName) {
	if (W3C) {
		if (document.getElementById(layerName)) {
			return true;
		}
	}
	else if (NS4) {
		if (document.layers[layerName]) {
			return true;
		}
	}
	else if (IE4) {
		if (document.all(layerName.id)) {
			return true;
		}
	}
	return false;
}

function hideFormSelect() {
	if (browserie5) {
		isActive = true;
		if (existDiv("tshirtselect")) {
			hideDiv("tshirtselect");
		}
	}
}

function showFormSelect() {
	if (browserie5) {
		isActive = false;
		if (existDiv("tshirtselect")) {
			showDiv("tshirtselect");
		}
	}
}
// Script End -->