															// MENU																											
d=document;
std = (d.getElementById) ? true : false;

glow = atindex() ? "" : "2";

ctxt = usingcgiwrap() ? "http://www.studentorg.vcu.edu/dstht/" : "";
s = usingcgiwrap() ? ctxt + "slice/" : "slice/";

    onindex = new Image(); onindex.src = s + "onindex.gif";
    offindex = new Image(); offindex.src = s + "offindex.gif";
    onindex2 = new Image(); onindex2.src = s + "onindex2.gif";
    offindex2 = new Image(); offindex2.src = s + "offindex2.gif";
    onnatchapter = new Image(); onnatchapter.src = s + "onnatchapter.gif";
    offnatchapter = new Image(); offnatchapter.src = s + "offnatchapter.gif";
    onnatchapter2 = new Image(); onnatchapter2.src = s + "onnatchapter2.gif";
    offnatchapter2 = new Image(); offnatchapter2.src = s + "offnatchapter2.gif";
    onhtchapter = new Image(); onhtchapter.src = s + "onhtchapter.gif";
    offhtchapter = new Image(); offhtchapter.src = s + "offhtchapter.gif";
    oncalendar = new Image(); oncalendar.src = s + "oncalendar.gif";
    offcalendar = new Image(); offcalendar.src = s + "offcalendar.gif";
    
	oncontactus = new Image(); oncontactus.src = s + "oncontactus.gif";
    offcontactus = new Image(); offcontactus.src = s + "offcontactus.gif";
	onnews = new Image(); onnews.src = s + "onnews.gif";
    offnews = new Image(); offnews.src = s + "offnews.gif";
	onlinks = new Image(); onlinks.src = s + "onlinks.gif";
    offlinks = new Image(); offlinks.src = s + "offlinks.gif";
	ongallery = new Image(); ongallery.src = s + "ongallery.gif";
    offgallery = new Image(); offgallery.src = s + "offgallery.gif";
	onguestbook = new Image(); onguestbook.src = s + "onguestbook.gif";
    offguestbook = new Image(); offguestbook.src = s + "offguestbook.gif";


function on(pic)
{
	if ((pic == "natchapter") || (pic == "index"))
	{
		if (d.images){d.images[pic].src = eval("on" + pic + glow + ".src");}
	}	
	else if (d.images){d.images[pic].src = eval("on" + pic + ".src");}
}	
function off(pic)
{
	if ((pic == "natchapter") || (pic == "index"))
	{
		if (d.images){d.images[pic].src = eval("off" + pic + glow + ".src");}
	}	
	else if (d.images){d.images[pic].src = eval("off" + pic + ".src");}
}

function usingcgiwrap()
{
	inside = false;
	loc = window.location.toString();	
	
	ary = loc.split("/");
	afterslash = ary[ary.length-1];
	var forumtester = new RegExp("(guestbook\.html|guestbook.*\.cgi)", "i");
	if (forumtester.test(afterslash)) inside = true;
	
	return inside;
}

function atindex()
{
	homepage = false;
	loc = window.location.toString();	
	
	ary = loc.split("/");
	afterslash = ary[ary.length-1];
	var forumtester = new RegExp("(index\.html)", "i");
	if (forumtester.test(afterslash)) homepage = true;
	
	return homepage;
}

function writemenu(mrest)
{
subness = "sub";
if (mrest == "index")
{
	subness = "";
}

menustr = "";
menustr += "<div id=holder><div id=menuholder>";

menustr +=
"<table align=center width=750 height=18 border=0 cellpadding=0 cellspacing=0>" +
"<tr>" +
	"<td height=18 width=67><a href=" + ctxt + "index.html onmouseover='on(\"index\");' onmouseout='off(\"index\");'><img name=index src='" + s + "offindex" + glow + ".gif' width=67 height=18 border=0></a></td>" +
	"<td height=18 width=116 bgcolor=000000><img src='" + s + "menurest" + subness + ".jpg' width=116 height=18 border=0></td>" +
	"<td height=18 width=97><a href='http://www.deltasigmatheta.org/' target=newpage onmouseover='on(\"natchapter\"); togglemenu(\"natchapterm\", \"down\", \"navmain\")' onmouseout='off(\"natchapter\"); togglemenu(\"natchapterm\", \"up\", \"navmain\")'><img name=natchapter src='" + s + "offnatchapter" + glow + ".gif' width=97 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=87><a href=" + ctxt + "htchapter.html onmouseover='on(\"htchapter\"); togglemenu(\"htchapterm\", \"down\", \"navmain\")' onmouseout='off(\"htchapter\"); togglemenu(\"htchapterm\", \"up\", \"navmain\")'><img name=htchapter src='" + s + "offhtchapter.gif' width=87 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=57><a href=" + ctxt + "calendar1.html onmouseover='on(\"calendar\")' onmouseout='off(\"calendar\")'><img name=calendar src='" + s + "offcalendar.gif' width=57 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=66><a href=" + ctxt + "contact.html onmouseover='on(\"contactus\");' onmouseout='off(\"contactus\");'><img name=contactus src='" + s + "offcontactus.gif' width=66 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=32><a href=" + ctxt + "news.html onmouseover='on(\"news\")' onmouseout='off(\"news\")'><img name=news src='" + s + "offnews.gif' width=32 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=31><a href=" + ctxt + "links.html onmouseover='on(\"links\")' onmouseout='off(\"links\")'><img name=links src='" + s + "offlinks.gif' width=31 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=81><a href=" + ctxt + "gallery.html onmouseover='on(\"gallery\")' onmouseout='off(\"gallery\")'><img name=gallery src='" + s + "offgallery.gif' width=81 height=18 border=0></a></td>" +
	"<td height=18 width=6><img src='" + s + "slash.gif' width=6 height=18 border=0></td>" +
	"<td height=18 width=74><a href='http://www.studentorg.vcu.edu/cgi-bin/cgiwrap/dstht/guestbook.cgi' onmouseover='on(\"guestbook\")' onmouseout='off(\"guestbook\")'><img name=guestbook src='" + s + "offguestbook.gif' width=74 height=18 border=0></a></td>" +
"</tr>" +
"</table>";

menustr +=
"<div ID=natchapterm class=submenu onmouseover='on(\"natchapter\"); togglemenu(\"natchapterm\", \"down\", \"navsub\")' onmouseout='off(\"natchapter\"); togglemenu(\"natchapterm\", \"up\", \"navsub\")'>" +
"<table class=mitem>";
natchaptermenu =
"<tr><td><a href='http://www.deltasigmatheta.org/inside.php?id=0305AH' target=newpage>National History</a></td></tr>" +
"<tr><td><a href='http://www.deltasigmatheta.org/inside.php?id=0305P' target=newpage>National Programs</a></td></tr>";
menustr += natchaptermenu + "</table></div>";

menustr +=
"<div ID=htchapterm class=submenu onmouseover='on(\"htchapter\"); togglemenu(\"htchapterm\", \"down\", \"navsub\")' onmouseout='off(\"htchapter\"); togglemenu(\"htchapterm\", \"up\", \"navsub\")'>" +
"<table class=mitem>";
htchaptermenu =
"<tr><td><a href=" + ctxt + "htchapter.html>Eta Tau History</a></td></tr>" +
"<tr><td><a href=" + ctxt + "htprograms.html>Eta Tau Programs</a></td></tr>" +
"<tr><td><a href=" + ctxt + "officers.html>Officers</a></td></tr>";
menustr += htchaptermenu + "</table></div>";
htchapterfirst = "";

/*
menustr +=
"<div ID=membershipm class=submenu onmouseover='on(\"membership\"); togglemenu(\"membershipm\", \"down\", \"navsub\")' onmouseout='off(\"membership\"); togglemenu(\"membershipm\", \"up\", \"navsub\")'>" +
"<table class=mitem>";
membershipmenu = 
"<tr><td><a href=" + ctxt + "lineage.html>Eta Tau Lineage</a></td></tr>" +
"<tr><td><a href=" + ctxt + "contact.html>Contact Us</a></td></tr>";
menustr += membershipmenu + "</table></div>";
membershipfirst = "";
*/

menustr += "</div></div>";

d.write(menustr);
}

function writesidenav(mainarea)
{
	if (mainarea != "")
	{
		d.write("<table bgcolor=white align=left width=136 height=100% border=0 cellpadding=0 cellspacing=0>" +
					"<tr><td width=136 height=20 colspan=3></td></tr>" +
					"<tr>" +
						"<td width=5 height=auto></td>" +
						"<td width=125 height=auto>" +
						"<table align=left width=125 height=auto border=0 cellpadding=0 cellspacing=0 class=sidenav>" +
						
						eval(mainarea + "first") +
						eval(mainarea + "menu") +
						
						"</table>" +
						"</td>" +
						"<td width=6 height=auto></td>" +
					"</tr>" +
					"<tr><td width=136 height=100% colspan=3><br></td></tr>" +
					"</table>");
	}
}


function togglemenu(curr, level, context)
{
	menuobj = (std) ? d.getElementById(curr).style : eval("d." + curr);
	var next = (level == "down") ? 18 : -500;
	menuobj.top = (std) ? next + "px" : next;
}

																				// NO CACHING

expiredate = new Date;
expiredate.setMinutes(expiredate.getMinutes() + 5);
hits = parseInt(cookieval("pagehit"));
if ((hits % 2) == 0)
{
        location.reload();
}
hits++;
document.cookie = "pagehit=" + hits + "; expires=" + expiredate.toGMTString();

function cookieval(cname)
{
        thiscookie = document.cookie.split("; ");

        for (i=0; i<thiscookie.length; i++)
        {
                if (cname == thiscookie[i].split("=")[0])
                {
                        return thiscookie[i].split("=")[1];
                }
        }

        return 0;
}

	
																	// SIGNATURE BLOCK
	
function sigblock()
{
	where = window.location.toString().split("/")[window.location.toString().split("/").length - 1];
	d.write(
	"<table align=center width=750 height=40 border=0 cellpadding=0 cellspacing=0>" +
	"<tr><td width=750 height=15 class=sig>VCU is an EEO/AA institution. For special accomodations please contact htevents@yahoo.com" +
	"</td></tr>" +
	"<tr><td width=750 height=15 class=sig><b>Webmaster:</b> Shola Omojokun oooshola@yahoo.com <b>Last modified:</b> " + document.lastModified +
	"</td></tr>" +
	"<tr><td align=center>" +
	"<img style='margin: 10px' src='http://www.vcu.edu/cgi-bin/nph-count?width=6&link=http://www.studentorg.vcu.edu/dstht/" + where + "' width=50 height=10>" +
	"</tr></td>" +
	"</table>");
}

