<!--
var modernBrowser = (document.all && (navigator.userAgent.indexOf("Opera")==-1)) ? 1 : 0;
var hideDelay = 200; //ms
var shiftX = 1;
var shiftY = 5;
var currentMenu='';

var theMenu = new Array(
	new menuItem("WhatYouCanDo", "WhatYouCanDo", "whatToDo.htm",  new Array(
		new menuItem("whatToDo", "What to Do if You're Assaulted", "whatToDo.htm", new Array()),
		new menuItem("protectingYourself", "Protecting Yourself", "protectingYourself.htm", new Array()),
		new menuItem("helpFriend", "How to Help a Friend", "helpFriend.htm", new Array()),
		new menuItem("getInvolved", "Get Involved", "getInvolved.htm", new Array())
	)),
	new menuItem("DidYouKnow", "DidYouKnow", "whatIsSexualAssault.htm",  new Array(
		new menuItem("whatIsSexualAssault", "What Is Sexual Assault", "whatIsSexualAssault.htm", new Array()),
		new menuItem("faq", "Frequently Asked Questions", "faq.htm", new Array()),
		new menuItem("askUs", "Ask Us", "askUs.htm", new Array())
	)),
		new menuItem("ForGuys", "ForGuys", "guysQA.htm",  new Array(
		new menuItem("guysQA", "Q & A", "guysQA.htm", new Array()),
		new menuItem("resourcesForGuys", "Resources for Guys", "resourcesForGuys.htm", new Array()),
		new menuItem("getInvolved", "Get Involved", "getInvolved.htm", new Array()),
		new menuItem("pollGuys", "Take Our Poll", "Poll/indexGuys.php", new Array())
	)),
		new menuItem("NewsEvents", "NewsEvents", "topicOfTheMonth.htm",  new Array(
		new menuItem("topicOfTheMonth", "Topic of the Month", "topicOfTheMonth.htm", new Array()),
		new menuItem("calendar", "Calendar", "calendar.htm", new Array()),
		new menuItem("inTheNews", "In the News", "inTheNews.htm", new Array()),
		new menuItem("getInvolved", "Get Involved", "getInvolved.htm", new Array()),
		new menuItem("pollNews", "Take Our Poll", "Poll/indexNews.php", new Array())	
	)),
		new menuItem("EnEspanol", "EnEspanol", "queEsElAcosoSexual.htm",  new Array(
		new menuItem("queEsElAcosoSexual", "Que es el acoso sexual", "queEsElAcosoSexual.htm", new Array()),
		new menuItem("alludarUnaAmigo", "Ayudar a una amiga(o)", "alludarUnaAmigo.htm", new Array()),
		new menuItem("drogasAsaltoSexual", "Drogas y asalto sexual", "drogasAsaltoSexual.htm", new Array())	
	))	
);


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}



function mouseDownHandler(e) {
	if(e.target=='' && currentMenu!='')	{
		unfocusSubmenu(currentMenu);
	}
	return e;
}

function menuItem(name, title, href, submenu) {
	this.name = name;
	this.title = title;
	this.href = href;
	this.lock = false;
	this.itemFocused = false;
	this.submenuFocused = false;
	this.submenu = submenu;
	return this;
}



var theRoot = new menuItem("Root", "Home Page", "index.htm", theMenu);

function loadLayers(root){
	loadLayer(root);
	for (var i=0; i<root.submenu.length; i++) loadLayers(root.submenu[i]);
}

function getItem(menu, name) {
	for (var i=0; i<menu.length; i++) {
		if (menu[i].name != name) {
			var res = getItem(menu[i].submenu, name);
			if (res != null) return res;
		} else return menu[i];
	}
	return null;
}

function item(name) {
	return getItem(theMenu, name);
}

function getParent(item, name) {
	for (var i=0; i<item.submenu.length; i++) {
		if (item.submenu[i].name != name) {
			var res = getParent(item.submenu[i], name);
			if (res != null) return res;
		} else return item;
	}
	return null;
}

function parentOf(name) {
	return getParent(theRoot, name)
}

function focusSubmenu(name) {
	currentMenu = name;
	item(name).submenuFocused = true;
}

function unfocusSubmenu(name) {
	item(name).submenuFocused = false;
	setTimeout("closeAllSubmenus(\'" + name + "\')", hideDelay);
}

function layerAction(act, name,cx,cy) {

	if (modernBrowser) {
		if (!document.all["div" + name]) return;
		parentOf(name).submenuLocked = act;
		if (act) {
			with (document.all["div" + name]) {
				style.posLeft = cx;//-document.body.scrollLeft;
				style.posTop = cy;
				style.visibility = "inherit";
			}
		} else {
			document.all["div" + name].style.visibility = "hidden";
		}
	} else if(document.getElementById) {
		// --------------------------------------------------------
		// for NN6
		// --------------------------------------------------------
		parentOf(name).submenuLocked = act;
		if (act) {
			var divElement = document.getElementById("div" + name);
			divElement.style.left = cx;
			// -----------------------------------------------
			// for NN6 change the top if header height changed
			// -----------------------------------------------
			divElement.style.top = cy;
			divElement.style.visibility = "inherit";
		} else {
			document.getElementById("div" + name).style.visibility = "hidden";
		}	
	}
}

function getAttribs(element){
	var atts, attribs = element.attributes;
	for (a=0; a<attribs.length; a++)
		atts += '\n'+attribs[a].nodeName;
	return (atts)
}


function showSubmenu(name,cx,cy) {
	item(name).itemFocused = true;
	layerAction(1, name,cx,cy);
}

function hideSubmenu(name) {
	item(name).itemFocused = false;
	setTimeout("closeSubmenu(\'" + name + "\')", hideDelay);
}

function closeSubmenu(name,event) {
	if ((!item(name).submenuFocused) 
		&& (!item(name).submenuLocked)
		&& (!item(name).itemFocused)) {
		parentOf(name).submenuLocked = false;
		layerAction(0, name,event);
	}
}

function closeAllSubmenus(name) {
	if (name != "Root") {
		closeSubmenu(name);
		closeAllSubmenus(parentOf(name).name);		
	}	
}

function loadItem(anItem) {
	document.writeln('<tr>');
	document.writeln(	'<td class="selmenu">');
	document.writeln(		'<a href="#" class="selmenu">');
	document.writeln(			'<table width="100%" border=0 cellpadding=0 cellspacing=1>');
	document.writeln(				'<tr>');
	document.writeln(					'<td nowrap onClick="location.href=\'' + anItem.href + '\'" style="cursor : hand;">');
	document.writeln(						'<img src="images/spacer.gif" width="120" height="1" alt="" border="0"><br><a href="' + anItem.href + '"class="white" name="anc' + anItem.name + '">&nbsp;' + anItem.title + '&nbsp;&nbsp;</a><br><img src="images/spacer.gif" width="120" height="1" alt="" border="0"><br>');
	document.writeln(					'</td>');
	document.writeln(				'</tr>');
	document.writeln(			'</table>');
	document.writeln(		'</a>');
	document.writeln(	'</td>');
	document.writeln('</tr>');
}

function loadLayer(root){
	
	document.writeln('');
	if(!document.getElementById) {
		document.writeln('<layer name="lyr' + root.name + '"  visibility="hide" top="0" left="0" onmouseover="focusSubmenu(\'' + root.name + '\')" onmouseout="unfocusSubmenu(\'' + root.name + '\');">');
		document.writeln('<nolayer>');
	}
	
	document.writeln('<div id="div' + root.name + '" style="position:absolute; z-index:5; top:0; left:0; visibility:hidden" onmouseover="focusSubmenu(\'' + root.name + '\')" onmouseout="unfocusSubmenu(\'' + root.name + '\');">');
	if(!document.getElementById) {	
		document.writeln('</nolayer>');
	}

	document.writeln(	'<table border=1 cellpadding=0 cellspacing=0 bordercolor="#666666">');
	document.writeln(		'<tr>');
	document.writeln(			'<td style="filter : shadow(color=#c0c0c0,direction=135)">');
	document.writeln(	'<table border=0 cellpadding=0 cellspacing=0 bgcolor="#222848">');
	document.writeln(		'<tr>');
	document.writeln(			'<td>');
	document.writeln(				'<table border=0 cellpadding=0 cellspacing=1 >');

	for (var i=0; i<root.submenu.length; i++) loadItem(root.submenu[i]);

	document.writeln(				'</table>');
	document.writeln(			'</td>');
	document.writeln(		'</tr>');
	document.writeln(	'</table>');
	document.writeln(			'</td>');
	document.writeln(		'</tr>');
	document.writeln(	'</table>');

	if(!document.getElementById) {
		document.writeln('<nolayer>');
	}
	
	document.writeln('</div>');
	if(!document.getElementById) {
		document.writeln('</nolayer>');
		document.writeln('</layer>');
	}
	document.writeln('');

}

//-->
