/*****************************************************submenu**************************************************************/
var tm = 250;
var ti = -1;
var t_1 = "<ul><li><a href = '/sas/advising/'><b>Undeclared Advising</b><p></a></li>";
t_1 += "<li><a href = '/sas/crc/'><b>Career Center</b></a><p></li>";
t_1 += "<li><a href = '/sas/eop/'><b>EOP</b></a><p></li>";
t_1 += "<li><a href = '/sas/testing/'><b>Testing Office</b></a></li></ul>";

var t_2 = "<ul><li><a href = '/as/'><b>Associated Students</b></a><p></li>";
t_2 += "<li><a href = '/campuslife/'><b>Center for Student Involvement</b></a><p></li>";
t_2 += "<li><a href = '/union/'><b>Student Union</b></a><p></li>";
t_2 += "<li><a href = '/campusrec/'><b>Campus Recreation</b></a><p></li>";
t_2 += "<li><a href = '/icc/'><b>Center for Gender &amp; Cultures</b></a></li>";

var t_3 = "<ul><li><a href = '/ar/'><b>Office of Admissions</b></a><p></li>";
t_3 += "<li><a href = '/ar/registration/'><b>Records &amp; Registration</b></a><p></li>";
t_3 += "<li><a href = '/ar/prospective/'><b>Student Outreach</b></a><p></li>";
t_3 += "<li><a href = '/scholarship/'><b>Scholarships</b></a></li>";

var t_4 = "<ul><li><a href = '/counselingctr/'><b>Counseling &amp; Psychological Services</b><p></a></li>";
t_4 += "<li><a href = '/saem/adac'><b>Alcohol &amp; Drug Advisory Council</b></a><p></li>";
t_4 += "<li><a href = '/saem/adep'><b>Alcohol &amp; Drug Education Program</b></a><p></li>";
t_4 += "<li><a href = '/org/cs/'><b>Children's School</b></a><p></li>";
t_4 += "<li><a href = '/saem/cwhp'><b>Committee on Wellness &amp; Health Promotion</b></a><p></li>";
t_4 += "<li><a href = '/sas/dss/'><b>Disability Services for Students</b></a><p></li>";
t_4 += "<li><b>Save a Seawolf</b><p></li>";
t_4 += "<li><a href = '/shc/'><b>Student Health Center</b></a><p></li>";


var t_5 = "<ul><li><a href = '/precollege/'><b>Pre-College</b><p></a></li>";
t_5 += "<li><a href = '/lss/'><b>Learning Skills Services (LSS)</b></a><p></li>";
t_5 += "<li><a href = '/sas/tutorial/'><b>Tutorial Center</b></a><p></li>";




//makeMenu();
function getCoord(tt){
	
	var topOffset = document.getElementById(tt).offsetTop + document.getElementById("toppart").offsetTop + (document.getElementById("toppart").offsetHeight - 60); 
	return "top:" + topOffset + "px;";
}
function makeMenu(){
	var tbl = "";
	var text = "";
	var j = 0;
	while (eval("typeof(t_"+ ++j +")!=\"undefined\""))
	{
		eval("text = t_"+ j);
		coord = getCoord( "tt_" + j);
		//alert(coord);
		tbl += "<table style = 'visibility:hidden;position:absolute;" + coord + "' id = 'tm_"+ j + "'><tr><td id = 'dropmenu' onmouseover = 'clearTimeout(ti)' onmouseout=\"ti=setTimeout('clearMenu()', tm)\"> " + text + " </td></tr></table>";
	}

	if(tbl) 
		document.write(tbl);
}

function clearMenu(){
	
	var li = "";
	var j = 0;
	while (eval("typeof(t_"+ ++j +")!=\"undefined\""))
	{	
		li = "tm_"+ j;
		document.getElementById(li).style.visibility="hidden";
	}
}

function showMenu(inTm){
	clearTimeout(ti);
	clearMenu();
	
	var LeftPos = document.getElementById("maintable").offsetLeft + document.getElementById("content").offsetLeft;
	
	document.getElementById(inTm).style.left = LeftPos + "px";
	document.getElementById(inTm).style.visibility="visible";
}


