																			// MENU																											
d=document;
std = (d.getElementById) ? true : false;
s="slice/";
    indexon = new Image(); indexon.src = s + "indexon.gif";
    indexoff = new Image(); indexoff.src = s + "indexoff.gif";
    eventson = new Image(); eventson.src = s + "eventson.gif";
    eventsoff = new Image(); eventsoff.src = s + "eventsoff.gif";
    contacton = new Image(); contacton.src = s + "contacton.gif";
    contactoff = new Image(); contactoff.src = s + "contactoff.gif";
    constiton = new Image(); constiton.src = s + "constiton.gif";
    constitoff = new Image(); constitoff.src = s + "constitoff.gif";
	membon = new Image(); membon.src = s + "membon.gif";
    memboff = new Image(); memboff.src = s + "memboff.gif";

function on(pic){if (d.images){d.images[pic].src = eval(pic + "on.src");}}	
function off(pic){if (d.images){d.images[pic].src = eval(pic + "off.src");}}

function writemenu(where, afritop, colorstripe)
{
d.write("<div id=holder><div id=menuholder>");
d.write(
"<table align='center' width=750 height=30 border='0' cellpadding='0' cellspacing='0'>" +
"<tr><td height=6 width=750 colspan=7 bgcolor=" + colorstripe + "></td></tr>" +
"<tr><td height=2 width=750 colspan=7 bgcolor=000000></td></tr>" +
"<tr>" +
	"<td height=22 width=60><img src='slice/logo" + where + ".gif' width=60 height=22 border=0></td>" +
	"<td height=22 width=76><a href=index.html onmouseover='on(\"index\")' onmouseout='off(\"index\")'><img name=index src='slice/indexoff.gif' width=76 height=22 border=0></a></td>" +
	"<td height=22 width=80><a href=events1.html onmouseover='on(\"events\"); togglemenu(\"eventsm\", \"down\", \"navmain\")' onmouseout='off(\"events\"); togglemenu(\"eventsm\", \"up\", \"navmain\")'><img name=events src='slice/eventsoff.gif' width=80 height=22 border=0></a></td>" +
	"<td height=22 width=92><a href=contact.html onmouseover='on(\"contact\")' onmouseout='off(\"contact\")'><img name=contact src='slice/contactoff.gif' width=92 height=22 border=0></a></td>" +
	"<td height=22 width=116><a href=const.html onmouseover='on(\"constit\")' onmouseout='off(\"constit\")'><img name=constit src='slice/constitoff.gif' width=116 height=22 border=0></td>" +
	"<td height=22 width=84><a href=members.html onmouseover='on(\"memb\"); togglemenu(\"membersm\", \"down\", \"navmain\")' onmouseout='off(\"memb\"); togglemenu(\"membersm\", \"up\", \"navmain\")'><img name=memb src='slice/memboff.gif' width=84 height=22 border=0></a></td>" +
	"<td height=22 width=242><img src='slice/" + afritop + "' width=242 height=22 border=0></td>" +
"</tr>" +
"</table>");
d.write(
"<div ID=eventsm class=submenu onmouseover='on(\"events\"); togglemenu(\"eventsm\", \"down\", \"navsub\")' onmouseout='off(\"events\"); togglemenu(\"eventsm\", \"up\", \"navsub\")'>" +
"<table class=mitem>" +
"<tr><td><a href=events1.html>Calendar</a></td></tr>" +
"<tr><td><a href=fashion05.html>Fashion Show 2005</a></td></tr>" +
"<tr><td><a href=missasu04.html>Miss ASU 2004</a></td></tr>" +
"</table>" +
"</div>");
d.write(
"<div ID=membersm class=submenu onmouseover='on(\"memb\"); togglemenu(\"membersm\", \"down\", \"navsub\")' onmouseout='off(\"memb\"); togglemenu(\"membersm\", \"up\", \"navsub\")'>" +
"<table class=mitem>" +
"<tr><td><a href=members.html>Membership Card</a></td></tr>" +
"<tr><td><a href=gallery.html>Member Gallery</a></td></tr>" +
"<tr><td><a href=links.html>Links</a></td></tr>" +
"<tr><td><a href=memberlist.html>Member List</a></td></tr>" +
"<tr><td><a href=tshirts.html>ASU T-Shirts</a></td></tr>" +
"</table>" +
"</div>");
d.write("</div></div>");
setTimeout("menuflicker()", 4000); 
}

function togglemenu(curr, level, context)
{
	menuobj = (std) ? d.getElementById(curr).style : eval("d." + curr);
	var next = (level == "down") ? 30 : -500;
	menuobj.top = (std) ? next + "px" : next;
}

function menuflicker()
{
	mnames = new Array("index", "events", "contact", "constit", "memb");
	var r = 0;
	for (r = 0; r < mnames.length; r++)
	{
		setTimeout("on(\"" + mnames[r] + "\")", 100 + r * 100);
		setTimeout("off(\"" + mnames[r] + "\")", 300 + r * 100);
	}
}

																				// 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 bordercolor=ECDEC3 cellpadding=0 cellspacing=0>" +
	"<tr><td width=750 height=15 class=sig>VCU is an EEO/AA institution. For special accomodations please contact vcuasu@yahoo.com" +
	"</td></tr>" +
	"<tr><td width=750 height=15 class=sig><b>Webmaster:</b> Omotayo (Shola) Omojokun vcuasu@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/asuasu/" + where + "' width=50 height=10>" +
	"</tr></td>" +
	"</table>");
}


																	// DETECT FLASH

var flashy = true;

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
	flashy = true;
} else{
	flashy = false;
}

function flashpic(fid, nonflashcode)
{
	if (!flashy)
	{
		document.getElementById(fid).innerHTML = nonflashcode; 
	}
}



																	// FORMS
																	
function clrform(theform, clr)
{
	theform.evdate.value = clr;
	theform.evtitle.value = clr;
	theform.evstart.value = clr;
	theform.evdescrip.value = clr;
	
}
