// menus
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

if ((bName == "Netscape" && bVer >= 3) || (bName == "Microsoft Internet Explorer" && bVer >= 4)) {
	br = "n3"; 
}
else {
	br = "n2";
}

 if (br == "n3") {
		head_get_involved = new Image(); head_get_involved.src = '/images/data/GLSEN_IMG/img/3-1.GIF';
		head_library = new Image(); head_library.src = '/images/data/GLSEN_IMG/img/6-2.GIF';
		head_news = new Image(); head_news.src = '/images/data/GLSEN_IMG/img/9-2.GIF';
		head_donate = new Image(); head_donate.src = '/images/data/GLSEN_IMG/img/12-2.GIF';
		head_about = new Image(); head_about.src = '/images/data/GLSEN_IMG/img/16-2.GIF';
}

function swapImage(imgName, src) {
	if (br == "n3") {
		document[imgName].src = src;
	}
}


function openDialog(email) {
	var div = dialogBoxShowWindow('some_name',100,'',600,1300,'','/cgi-bin/iowa/contactus.html?CONTACT_email=' + email,false);
}




var menuCurrentSection ='';
var menuRevealTimer = null;
var menuHideTimer   = null;
var overMenu = '';
var pendingRevealMenu = '';
var pendingHideMenu = '';

function setSection(menu_id) {
	menuCurrentSection  = menu_id;
	elem = document.getElementById(menu_id);
	elem.className = 'main_nav_over';
}

function revealIt(menu_id) {
	var iframe = document.getElementById(menu_id + '_iframe')
	var menu   = document.getElementById(menu_id);

	menu.style.visibility = "visible";
	overMenu= menu_id;
	pendingRevealMenu = '';
	menuRevealTimer = null;

	//alert('menu w' + menu.offsetWidth + 'x' + menu.offsetHeight);

	if(iframe) {
		iframe.style.width = menu.offsetWidth;
		iframe.style.height = menu.offsetHeight;
	}

	//alert('iframe w' + iframe.offsetWidth + 'x' + iframe.offsetHeight);
}

function hideIt(menu_id) {
	document.getElementById(menu_id).style.visibility = "hidden"; 
	overMenu = '';
	pendingHideMenu = '';
	menuHideTimer   = null;
}

