/*
date :   28.11.01 
author:  danny.callaghan@freeserve.com
file:    create.js
owner:   trev@nufc-london.com

This script writes out the header (the London Mags banner, Trev's email address, and the date), and the footer (the 'last updated' information, and the copyright info), and the nav bar on the left hand side.

shouldn't need to edit anything below here
*/


if(document.layers){

window.location.href = 'http://www.webstandards.org/upgrade/'
}

		var now = new Date();
		if (now.getYear() < 100)
			myYear = "20"+now.getYear();
		else if (now.getYear() >= 100 && now.getYear() < 2000)
			myYear = now.getYear() + 1900;
		else
			myYear = now.getYear();
		var dateName = new Array("00.","01.","02.","03.","04.","05.","06.","07.","08.","09.","10.","11.","12.","13.","14.","15.","16.","17.","18.","19.","20.","21.","22.","23.","24.","25.","26.","27.","28.","29.","30.","31.");
        var monthName = new Array("01.", "02.", "03.", "04.", "05.", "06.", "07.", "08.", "09.", "10.", "11.", "12.")
		var TodayIs =  dateName[now.getDate()] + monthName[now.getMonth()] + theYear;

function getLongDateString(){	
	monthNames = new Array("01.", "02.", "03.", "04.", "05.", "06.", "07.", "08.", "09.", "10.", "11.", "12.");
dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	dayOfWeek = this.getDay();
	day = dayNames[dayOfWeek];
	dateOfMonth = this.getDate();
monthNo = this.getMonth();
	month = monthNames[monthNo];
year = this.getYear();
	if (year < 2000)
year = year + 1900;
dateStr = dateOfMonth+"."+month+theYear;
	return dateStr;
}
Date.prototype.getLongDateString=getLongDateString;

function DocDate(){
	DateTimeStr = document.lastModified;
	secOffset = Date.parse(DateTimeStr);
	if (secOffset == 0 || secOffset == null)
			 dateStr = "Unknown";
	else{
		aDate = new Date();
		aDate.setTime(secOffset);
		datestr = aDate.getLongDateString();
	}
	return dateStr;
}

function writeHeaderandNav(){
document.write('<center>');
document.write('<div align="center" style="position: relative; top: 0px; left: 0px; width:642px;">');
document.write('<div id="banner" style="position: absolute; top: 0px; left: 0px; width:642px; border: 1px solid #333333"><img src="/nufc-london/images/banner.jpg" width="640" height="110" border="0" alt=""></div>');
document.write('<div id="banner" style="position: absolute; top: 112px; left: 0px;">');
document.write('<table border="0" cellpadding="0" cellspacing="0"><tr>');
document.write('<td valign="top" style="width:642px" colspan="3"><img src="/nufc-london/images/t.gif" width="1" height="5" border="0" alt=""></td>');
document.write('</tr><tr>');
document.write('<td style="background-color:#999999; border: 1px solid #333333; width:642px; height:20px" colspan="3" align="left"><img src="/nufc-london/images/t.gif" width="5" height="1" border="0" alt=""><span class="date">contact: </span><a href="mailto:'+trevsEmailAddress+'" class="contact">'+trevsEmail+'</a><img src="/nufc-london/images/t.gif" width="'+spacer+'" height="1" border="0" alt=""><span class="date">'+TodayIs+'</span><img src="/nufc-london/images/t.gif" width="5" height="1" border="0" alt=""></td>');
document.write('</tr><tr>');
document.write('<td valign="top" style="width:642px" colspan="3"><img src="/nufc-london/images/t.gif" width="1" height="5" border="0" alt=""></td>');
document.write('</tr>');
document.write('<tr><td valign="top" style="background-color:#999999; border: 1px solid #333333; width:160px; height:400px" align="center"><img src="/nufc-london/images/t.gif" width="150" height="7" border="0" alt=""><br>');
document.write('<div style="position:relative; left:0px; top:0px; background-color:#cccccc; width:140px; border: 1px solid #333333;" class="navtext">'+firstHeading+'</div>');
for (i = 0; i < setOne.length; i ++){
document.write('<a href="'+setOne[i].url+'" class="nav">'+setOne[i].title+'</a><br>');
}
document.write('<br><div style="position:relative; left:0px; top:0px; background-color:#cccccc; width:140px; border: 1px solid #333333;" class="navtext">'+secondHeading+'</div>');
for (x = 0; x < setTwo.length; x ++){
document.write('<a href="'+setTwo[x].url+'" class="nav">'+setTwo[x].title+'</a><br>');
}
document.write('<br><div style="position:relative; left:0px; top:0px; background-color:#cccccc; width:140px; border: 1px solid #333333;" class="navtext">'+thirdHeading+'</div>');
for (y = 0; y < setThree.length; y ++){
document.write('<a href="'+setThree[y].url+'" target="_blank" class="nav">'+setThree[y].title+'</a><br>');
}
document.write('<br></td><td valign="top"><img src="/nufc-london/images/t.gif" width="5" height="1" border="0" alt=""></td>');
document.write('<td valign="top" style="background-color:#cccccc; border: 1px solid #333333; width:475px; height:400px" class="text"><br>');
}

function boxOn(id){
document.getElementById(id).style.backgroundColor = "#000000"
document.getElementById(id).style.color = "#ffffff"
}
function boxOff(id){
document.getElementById(id).style.backgroundColor = "#ffffff"
document.getElementById(id).style.color = "#000000"
}

function premiershipNav(team){

document.write('<table border="0" cellpadding="0" cellspacing="1" align="center"><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'arsenalBox\')" onMouseOut="boxOff(\'arsenalBox\');"><a href="/nufc-london/premiership0102/afc.html" class="thirdboxLink"><div id="arsenalBox" class="thirdnavbox">Arsenal</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'villaBox\')" onMouseOut="boxOff(\'villaBox\')"><a href="/nufc-london/premiership0102/avfc.html"  class="thirdboxLink"><div id="villaBox" class="thirdnavbox">Villa</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'blackburnBox\')" onMouseOut="boxOff(\'blackburnBox\')"><a href="/nufc-london/premiership0102/brfc.html" class="thirdboxLink"><div id="blackburnBox" class="thirdnavbox">Blackburn</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'boltonBox\')" onMouseOut="boxOff(\'boltonBox\')"><a href="/nufc-london/premiership0102/bwfc.html"  class="thirdboxLink"><div id="boltonBox" class="thirdnavbox">Bolton</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'charltonBox\')" onMouseOut="boxOff(\'charltonBox\')"><a href="/nufc-london/premiership0102/cafc.html" class="thirdboxLink"><div id="charltonBox" class="thirdnavbox">Charlton</div></a></td>');
document.write('</tr><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'chelseaBox\')" onMouseOut="boxOff(\'chelseaBox\')"><a href="/nufc-london/premiership0102/cfc.html" class="thirdboxLink"><div id="chelseaBox" class="thirdnavbox">Chelsea</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'derbyBox\')" onMouseOut="boxOff(\'derbyBox\')"><a href="/nufc-london/premiership0102/dcfc.html"  class="thirdboxLink"><div id="derbyBox" class="thirdnavbox">Derby</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'evertonBox\')" onMouseOut="boxOff(\'evertonBox\')"><a href="/nufc-london/premiership0102/efc.html" class="thirdboxLink"><div id="evertonBox" class="thirdnavbox">Everton</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'fulhamBox\')" onMouseOut="boxOff(\'fulhamBox\')"><a href="/nufc-london/premiership0102/ffc.html"  class="thirdboxLink"><div id="fulhamBox" class="thirdnavbox">Fulham</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'ipswichBox\')" onMouseOut="boxOff(\'ipswichBox\')"><a href="/nufc-london/premiership0102/itfc.html" class="thirdboxLink"><div id="ipswichBox" class="thirdnavbox">Ipswich</div></a></td>');
document.write('</tr><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'leedsBox\')" onMouseOut="boxOff(\'leedsBox\')"><a href="/nufc-london/premiership0102/lufc.html"  class="thirdboxLink"><div id="leedsBox" class="thirdnavbox">Leeds</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'leicesterBox\')" onMouseOut="boxOff(\'leicesterBox\')"><a href="/nufc-london/premiership0102/lcfc.html" class="thirdboxLink"><div id="leicesterBox" class="thirdnavbox">Leicester</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'liverpoolBox\')" onMouseOut="boxOff(\'liverpoolBox\')"><a href="/nufc-london/premiership0102/lfc.html" class="thirdboxLink"><div id="liverpoolBox" class="thirdnavbox">Liverpool</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'manuBox\')" onMouseOut="boxOff(\'manuBox\')"><a href="/nufc-london/premiership0102/mufc.html"  class="thirdboxLink"><div id="manuBox" class="thirdnavbox">Man U</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'boroBox\')" onMouseOut="boxOff(\'boroBox\')"><a href="/nufc-london/premiership0102/mfc.html"  class="thirdboxLink"><div class="thirdnavbox" id="boroBox">\'Boro</div></a></td>');
document.write('</tr><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'nufcBox\')" onMouseOut="boxOff(\'nufcBox\');"><a href="/nufc-london/premiership0102/index.html"  class="thirdboxLink"><div id="nufcBox" class="thirdnavbox">NUFC</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'southamptonBox\')" onMouseOut="boxOff(\'southamptonBox\')"><a href="/nufc-london/premiership0102/sfc.html" class="thirdboxLink"><div id="southamptonBox" class="thirdnavbox">Southampton</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'mackemsBox\')" onMouseOut="boxOff(\'mackemsBox\')"><a href="/nufc-london/premiership0102/safc.html" class="thirdboxLink"><div id="mackemsBox" class="thirdnavbox">Mackems</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'spursBox\')" onMouseOut="boxOff(\'spursBox\')"><a href="/nufc-london/premiership0102/thfc.html"  class="thirdboxLink"><div id="spursBox" class="thirdnavbox">Spurs</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'westhamBox\')" onMouseOut="boxOff(\'westhamBox\')"><a href="/nufc-london/premiership0102/whufc.html"><div id="westhamBox" class="thirdnavbox">West Ham</div></a></td>');
document.write('</tr></table>');

boxOn(team+'Box')
}

function cupNav(){

if(document.all){
document.write('<table border="0" cellpadding="0" cellspacing="1" align="center"><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'firstBox\')" onMouseOut="boxOff(\'firstBox\');"><a href="#first" class="thirdboxLink"><div id="firstBox" class="thirdnavbox">First Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'secondBox\')" onMouseOut="boxOff(\'secondBox\')"><a href="#second"  class="thirdboxLink"><div id="secondBox" class="thirdnavbox">Second Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'thirdBox\')" onMouseOut="boxOff(\'thirdBox\')"><a href="#third" class="thirdboxLink"><div id="thirdBox" class="thirdnavbox">Third Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'fourthBox\')" onMouseOut="boxOff(\'fourthBox\')"><a href="#fourth"  class="thirdboxLink"><div id="fourthBox" class="thirdnavbox">Fourth Round</div></a></td>');
document.write('</tr><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'fifthBox\')" onMouseOut="boxOff(\'fifthBox\')"><a href="#fifth" class="thirdboxLink"><div id="fifthBox" class="thirdnavbox">Fifth Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'quarterBox\')" onMouseOut="boxOff(\'quarterBox\')"><a href="#quarter"  class="thirdboxLink"><div id="quarterBox" class="thirdnavbox">Quarter-Finals</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'semiBox\')" onMouseOut="boxOff(\'semiBox\')"><a href="#semi" class="thirdboxLink"><div id="semiBox" class="thirdnavbox">Semi-Finals</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'finalBox\')" onMouseOut="boxOff(\'finalBox\')"><a href="#final"  class="thirdboxLink"><div id="finalBox" class="thirdnavbox">Final</div></a></td>');
document.write('</tr></table>');
}
}

function wcupNav(){

if(document.all){
document.write('<table border="0" cellpadding="0" cellspacing="1" align="center"><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'firstBox\')" onMouseOut="boxOff(\'firstBox\');"><a href="#first" class="thirdboxLink"><div id="firstBox" class="thirdnavbox">First Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'secondBox\')" onMouseOut="boxOff(\'secondBox\')"><a href="#second"  class="thirdboxLink"><div id="secondBox" class="thirdnavbox">Second Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'thirdBox\')" onMouseOut="boxOff(\'thirdBox\')"><a href="#third" class="thirdboxLink"><div id="thirdBox" class="thirdnavbox">Third Round</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'fourthBox\')" onMouseOut="boxOff(\'fourthBox\')"><a href="#fourth"  class="thirdboxLink"><div id="fourthBox" class="thirdnavbox">Fourth Round</div></a></td>');
document.write('</tr></table>');
document.write('<table border="0" cellpadding="0" cellspacing="1" align="center"><tr>');
document.write('<td width="85" onMouseOver="boxOn(\'quarterBox\')" onMouseOut="boxOff(\'quarterBox\')"><a href="#quarter"  class="thirdboxLink"><div id="quarterBox" class="thirdnavbox">Quarter-Finals</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'semiBox\')" onMouseOut="boxOff(\'semiBox\')"><a href="#semi" class="thirdboxLink"><div id="semiBox" class="thirdnavbox">Semi-Finals</div></a></td>');
document.write('<td width="85" onMouseOver="boxOn(\'finalBox\')" onMouseOut="boxOff(\'finalBox\')"><a href="#final"  class="thirdboxLink"><div id="finalBox" class="thirdnavbox">Final</div></a></td>');
document.write('</tr></table>');
}
}


function writeFooter(){
document.write('<br>');
document.write('</td></tr>');
document.write('<tr><td valign="top" style="width:642px" colspan="3"><img src="/nufc-london/images/t.gif" width="1" height="5" border="0" alt=""></td></tr>');
document.write('<tr><td style="background-color:#999999; border: 1px solid #333333; width:642px; height:20px" colspan="3" align="left"><img src="/nufc-london/images/t.gif" width="15" height="1" border="0" alt=""><span class="date">last updated on '+DocDate()+'</span><img src="/nufc-london/images/t.gif" width="235" height="1" border="0" alt=""><span class="copy">&copy;2001 NUFC Supporters Club - London. All rights reserved.</span></td>');
document.write('</tr><tr>');
document.write('<td valign="top" style="width:642px" colspan="3"><img src="/nufc-london/images/t.gif" width="1" height="5" border="0" alt=""></td>');
document.write('</tr></table>');
document.write('</div></div>');
document.write('</center>');
}

defaultStatus = 'Newcastle United Supporters Club - London'