/* CSS hack for IE */
document.write('<!--[if IE]>\
                <style type="text/css">\
                #menu_items div, #menu_items a {height:23px;}\
                li li a {\
                        display: block;\
                        font-weight: normal;\
                        font-family: Verdana;\
                        font-size: 10px;\
                        color: #ffffff;\
                        padding: 3px 3px 3px 8px;\
                        background: url(img/btn_sub_bg_blue.gif) repeat;\
                }\
                ul#nav li li {\
                        margin-top:-2px;\
                }\
                </style>\
                <![endif]-->\
                <div id="hidepage" style="position: absolute; z-index: 999; left:0px; top:0px; background: #253E6C url(img/loading_animation.gif) center center no-repeat; height: 100%; width: 100%; display:block; text-align: center; visibility: visible;"></div>');

/* Menu drawing function */
startList = function() {
	document.getElementById('menuPlaceholder').innerHTML=' \
		<a id="top_banner" href="index.html"><img src="img/top_banner.jpg" width="796" height="99" border="0" /></a>\
		<div id="counter_cntnr"><div id="counter"></div></div>\
		<div id="quicklinks_menu">\
			<div id="menu_items">\
			  <div>Quick Links: </div>\
			  <a href="tickets.html">Tickets</a>\
			  <a href="schools.asp">Schools</a>\
			  <a href="fans.html#ti">Travel Info</a>\
			  <a href="fans.html#enews">E-Newsletter</a>\
			</div>\
		</div>\
		\
		<ul id="nav">\
			<li>\
				<div class="mainOption"><a href="about.html"><img id="about" src="img/btn_about_nor.gif" border="0" id="img1"></a></div>\
				<ul>\
					<li><a href="about.html#ib">2010 International Bowl</a></li>\
					<li><a href="about.html#ibt">2010 Teams</a></li>\
					<li><a href="about.html#qf">Quick Facts</a></li>\
					<li><a href="about.html#rc">Rogers Centre</a></li>\
					<li><a href="about.html#vo">Volunteers</a></li>\
					<li><a href="about.html#cu">Contact Us</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="tickets.html"><img id="tickets" src="img/btn_tickets_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="tickets.html#1">Ticket Information</a></li>\
					<li><a href="tickets.html#2">Seating Chart</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="fans.html"><img id="fans" src="img/btn_fans_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="fans.html#mac">MAC Information</a></li>\
					<li><a href="fans.html#bige">Big East Information</a></li>\
					<li><a href="fans.html#show">All-Star Showcase</a></li>\
					<li><a href="fans.html#be">Bowl Events</a></li>\
					<li><a href="fans.html#dp">Directions &amp; Parking</a></li>\
					<li><a href="fans.html#ti">Travel Information</a></li>\
					<li><a href="fans.html#ibh">International Bowl Hotels</a></li>\
					<li><a href="fans.html#ofg">Facebook Group &amp; Twitter</a></li>\
					<li><a href="fans.html#enews">E-Newsletter</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="media.html"><img id="media" src="img/btn_media_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="media.html#pr">Press Releases / News</a></li>\
					<!--<li><a href="media.html#li">Listen to Interviews</a></li>-->\
					<li><a href="media.html#cr">Credential Requests</a></li>\
					<li><a href="media.html#pc">Policies and Contacts</a></li>\
					<li><a href="media.html#sa">Schedule and Accommodation</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="community.html"><img id="community" src="img/btn_community_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="community.html#at">About Toronto</a></li>\
					<li><a href="community.html#ta">Tourist Activities</a></li>\
					<li><a href="community.html#bg">Bowl Games</a></li>\
					<li><a href="community.html#obj">Objectives</a></li>\
					<li><a href="community.html#ei">Economic Impact</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="history.html"><img id="history" src="img/btn_history_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="history.html#2009">The 2009 International Bowl</a></li>\
					<li><a href="history.html#2008">The 2008 International Bowl</a></li>\
					<li><a href="history.html#2007">The 2007 International Bowl</a></li>\
					<li><a href="history.html#bemac">Big East and MAC Alumni</a></li>\
					<li><a href="history.html#ibr">International Bowl Records</a></li>\
				</ul>\
			</li>\
			<li>\
				<div><a href="sponsors.html"><img id="sponsors" src="img/btn_sponsors_nor.gif" border="0"></a></div>\
				<ul>\
					<li><a href="sponsors.html#1">Sponsorship Information</a></li>\
					<li><a href="sponsors.html#2">Current Sponsors</a></li>\
					<li><a href="sponsors.html#3">Opportunities</a></li>\
				</ul>\
			</li>\
			<li>\
				<div></a><a href="contact.html"><img id="contact" src="img/btn_contact_nor.gif" border="0" onLoad="PageInit();"></a></div>\
			</li>\
		</ul>';

	var curPage=window.location.href.split('/')[window.location.href.split('/').length-1].split('.')[0];

	if (document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
						  node.nodeChild=new Object;
						  for (j=0; j<node.childNodes.length;j++)
									 for (k=0; k<node.childNodes[j].childNodes.length;k++)
												for (l=0; l<node.childNodes[j].childNodes[k].childNodes.length;l++)
													  if (node.childNodes[j].childNodes[k].childNodes[l].src)
													  {
														  node.nodeChild[0]=j;
														  node.nodeChild[1]=k;
														  node.nodeChild[2]=l;
														  if (node.childNodes[j].childNodes[k].childNodes[l].id==curPage) node.childNodes[j].childNodes[k].childNodes[l].src='img/btn_'+node.childNodes[j].childNodes[k].childNodes[l].id+'_cur.gif';
													  }
						  node.onmouseover=function() {
									 if (document.all) this.className+=" over";
									 var menuEl=this.childNodes[this.nodeChild[0]].childNodes[this.nodeChild[1]].childNodes[this.nodeChild[2]];
									 menuEl.src='img/btn_'+menuEl.id+'_cur.gif';
									 }
						  node.onmouseout=function() {
									 if (document.all) this.className=this.className.replace(" over", "");
									 var menuEl=this.childNodes[this.nodeChild[0]].childNodes[this.nodeChild[1]].childNodes[this.nodeChild[2]];
									 if (menuEl.id!=curPage) menuEl.src='img/btn_'+menuEl.id+'_nor.gif';
									 }
				}
		}
	}
	
	// Do not show counter in off-season
	///document.getElementById("counter_cntnr").style["display"] = "none";
	
	if (curPage == "" || curPage == "index") {
		// Insert counter into top banner
		var flashvars = {};
		var params = {wmode:"transparent"};
		var attributes = {};
		swfobject.embedSWF("countdown.swf", "counter", "796", "99", "8.0.0","", flashvars, params, attributes);
	} else {
		document.getElementById("counter_cntnr").style["display"] = "none";
	}
}

/* Let's execute above function after loading the page */
window.onload=startList;

function openTarget (form, features, windowName) {
	if (!windowName) {
		windowName = 'formTarget' + (new Date().getTime());
		form.target = windowName;
		open ('', windowName, features);
	}
}

function emailcheck(cur) {
	var string1=cur.strEmail.value
	if (string1.indexOf("@")==-1) {
		alert("Please input a valid email address!");
		return false;
	} else {
		return true;
	}
}

function PageInit() {
	document.getElementById("hidepage").style["visibility"]="hidden";
}

function statechange() {
	if (document.readyState == "interactive" || document.readyState == "complete")
	PageInit();
}

function onPageShow() {
	PageInit();
}