
// Global Variables
var mySponsors = new Array()
mySponsors[0] = "<td align=center><A HREF=\"http://www.LothianLets.co.uk/default.php?link=BVASponsor\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/sponsors/HousesForLetBC.jpg\" border=0></td>";
mySponsors[1] = "<td align=center><A HREF=\"http://www.PolarisGetAways.com/default.php?link=BVASponsor\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/sponsors/PolarisGetAwaysLakeBC.jpg\" border=0></td>";
//mySponsors[0] = "<td align=center><!--<A HREF=\"Sponsor1.htm\">--><IMG NAME=\"sponsor1\" SRC=\"images/WaverleyGarageBC.gif\" border=0></td>";
//mySponsors[1] = "<td align=center><A HREF=\"http://www.nautica-menswear.co.uk/\" target=\"_blank\"><IMG NAME=\"sponsor2\" SRC=\"images/NauticaBC.gif\" border=0></td>";
//mySponsors[1] = "<td align=center><A HREF=\"http://www.PropertyFindScotland.com/\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/PropertyFindBC.gif\" border=0></td>";
//mySponsors[2] = "<td align=center><A HREF=\"http://www.thebalbairdiehotel.com/\" target=\"_blank\"><IMG NAME=\"sponsor4\" SRC=\"images/BalbardieBC.gif\" border=0></td>";
//mySponsors[3] = "<td align=center><A HREF=\"http://www.scopeclothing.co.uk/index.html\" target=\"_blank\"><IMG NAME=\"sponsor4\" SRC=\"images/ScopeBC.gif\" border=0></td>";
//mySponsors[5] = "<td align=center><A HREF=\"http://www.dunedinbmw.com/\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/DunedinBMWBC.gif\" border=0></td>";
//mySponsors[4] = "<td align=center><A HREF=\"http://www.LothianLets.co.uk/default.php?link=BVASponsor\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/HousesForLetBC.jpg\" border=0></td>";
//mySponsors[6] = "<td align=center><A HREF=\"http://www.freewebs.com/hooligansouldivision/\" target=\"_blank\"><IMG NAME=\"sponsor1\" SRC=\"images/HooliganBC.gif\" border=0></td>";
//mySponsors[5] = "<td align=center><!--<A HREF=\"Sponsor1.htm\">--><IMG NAME=\"sponsor1\" SRC=\"images/StrachanBC.gif\" border=0></td>";
//mySponsors[7] = "<td align=center><A HREF=\"http://www.response-bms.co.uk/\" target=\"_blank\"><IMG NAME=\"sponsor1\" SRC=\"images/ResponseBC.jpg\" border=0></td>";

// Banter Sponsor - not included in random generation
mySponsors[9] = "<td align=center><IMG NAME=\"sponsor1\" SRC=\"images/Brut.jpg\" border=0></td>";

var myBannerSponsors = new Array()
myBannerSponsors[7] = "<td align=center><A HREF=\"http://www.LothianLets.co.uk\" target=\"_blank\"><IMG NAME=\"sponsor3\" SRC=\"images/HousesForLetBanner2.jpg\" border=0></a></td>";



var numberSponsors = 2;

function writeHeader()
{
		strNavHTML="<table border=0 align=center>";
		strNavHTML=strNavHTML+"<tr><!-- Team Header -->";	
		strNavHTML=strNavHTML+"<td><A HREF="+"home.php"+"><IMG NAME="+"header"+" SRC="+"images/HeaderOverall.jpg"+" border=0></td>";
		strNavHTML=strNavHTML+"</tr>";
		strNavHTML=strNavHTML+"</table>";
				
		document.writeln(strNavHTML);
}

function writeHeaderWithSponsor(sponsorNumber)
{			
		strNavHTML="<table border=0 align=center>";
		strNavHTML=strNavHTML+"<tr><!-- Team Header -->";	
				
		strNavHTML = strNavHTML + mySponsors[sponsorNumber];
		strNavHTML=strNavHTML+"<td><A HREF="+"home.php"+"><IMG NAME="+"header"+" SRC="+"images/HeaderOverall.gif"+" border=0></td>";
		strNavHTML = strNavHTML + mySponsors[sponsorNumber];
		
		strNavHTML=strNavHTML+"</tr>";
		strNavHTML=strNavHTML+"</table>";	
	
		document.writeln(strNavHTML);
}

function writeHeaderWithBannerSponsor(sponsorNumber)
{			
		strNavHTML="<table border=0 align=center>";
		
		strNavHTML=strNavHTML+"<tr><!-- Team Header -->";	
		strNavHTML=strNavHTML+"<td><A HREF="+"home.php"+"><IMG NAME="+"header"+" SRC="+"images/HeaderOverall.gif"+" border=0></td>";
		strNavHTML=strNavHTML+"</tr>";
		strNavHTML=strNavHTML+"<tr align=center>";
		
		strNavHTML=strNavHTML+"<tr><td align=center class=xl30><font size=3 FACE="+"Arial, Helvetica, Geneva"+">Click Below <font size=6 FACE="+"Arial, Helvetica, Geneva"+">- Match Sponsored By - <font size=3 FACE="+"Arial, Helvetica, Geneva"+">Click Below</td></tr>";
				
		strNavHTML = strNavHTML + myBannerSponsors[sponsorNumber];
		strNavHTML=strNavHTML+"</tr>";
		
		strNavHTML=strNavHTML+"</table>";	
	
		document.writeln(strNavHTML);
}

function writeRandomBannerSponsorLink()
{
	var strRanHTML = "";
	var randomnumber=Math.floor(Math.random()*numberSponsors)
	strRanHTML = strRanHTML + myBannerSponsors[randomnumber];
	document.writeln(strRanHTML);
}


function writeRandomSponsorLink()
{
	var strRanHTML = "";
	var randomnumber=Math.floor(Math.random()*numberSponsors)
	strRanHTML = strRanHTML + mySponsors[randomnumber];
	document.writeln(strRanHTML);
}

function writeKnownBannerSponsorLink(KnownSponsor)
{
	var strRanHTML = "";
	strRanHTML = strRanHTML + myBannerSponsors[KnownSponsor];
	document.writeln(strRanHTML);
}

function writeKnownSponsorLink(KnownSponsor)
{
	var strRanHTML = "";
	strRanHTML = strRanHTML + mySponsors[KnownSponsor];
	document.writeln(strRanHTML);
}

function writeHeaderWithRandomSponsor()
{			
	
		var randomnumber=Math.floor(Math.random()*numberSponsors)
	
		strNavHTML="<table border=0 align=center>";
		strNavHTML=strNavHTML+"<tr><!-- Team Header -->";	
				
		strNavHTML = strNavHTML + mySponsors[randomnumber];
		strNavHTML=strNavHTML+"<td><A HREF="+"home.php"+"><IMG NAME="+"header"+" SRC="+"images/HeaderOverall.gif"+" border=0></td>";
		
		randomnumber=Math.floor(Math.random()*numberSponsors)
		strNavHTML = strNavHTML + mySponsors[randomnumber];
		
		strNavHTML=strNavHTML+"</tr>";
		strNavHTML=strNavHTML+"</table>";	
	
		document.writeln(strNavHTML);
}

function writeSponsorString()
{
	
	//strNavHTML=strNavHTML+"<td><A HREF=\"http://www.nautica-menswear.co.uk/\" target=\"_blank\"><IMG NAME=\"sponsor2\" SRC=\"images/NauticaBC.gif\" border=0></td>";
	
	
	strFooterHTML=strFooterHTML+"<table border=0 align=center>";
	strFooterHTML=strFooterHTML+"	<tr>	";
	strFooterHTML=strFooterHTML+"<td>";
	strFooterHTML=strFooterHTML+"<div align="+"center"+"> <marquee bgcolor="+"#ffffff"+" scrollamount="+"8"+" direction="+"left"+" loop="+"true"+" width=650 height=50> <center> ";
	
	strFooterHTML=strFooterHTML+"</marquee>";
	
	document.writeln(strFooterHTML);
	return strNavHTML;
}

function writeLatestNewsBanner()
{
	strFooterHTML="<!-- FOOTER ---------------------->";
	strFooterHTML=strFooterHTML+"<table border=0 align=center>";
	strFooterHTML=strFooterHTML+"	<tr>	";
	strFooterHTML=strFooterHTML+"<td>";
	strFooterHTML=strFooterHTML+"<div align="+"center"+"> <marquee bgcolor="+"#ffffff"+" scrollamount="+"8"+" direction="+"left"+" loop="+"true"+" width=650 height=50> <center> ";
	//strFooterHTML=strFooterHTML+"</a>";
	
	//strFooterHTML=strFooterHTML+"<IMG SRC=\"images/ScrollBarUpdate.gif\" border=0>";		
	//strFooterHTML=strFooterHTML+"<A HREF=\"LatestNewsIndex.htm\"><IMG SRC=\"images/ScrollBar.gif\" border=0></a>";		
	
	//strFooterHTML=strFooterHTML+"<A HREF=\"PromotionRunIn.htm\"><IMG SRC=\"images/ScrollBar4.gif\" border=0></a>";	
	//strFooterHTML=strFooterHTML+"<A HREF=\"FixturesIndex.htm\"><IMG SRC=\"images/ScrollBar3.gif\" border=0></a>";
	
	
	//strFooterHTML=strFooterHTML+"<A HREF=\"LeagueTable.htm\"><IMG SRC=\"images/ScrollBar2.gif\" border=0></a>";
	
	//strFooterHTML=strFooterHTML+"<IMG SRC=\"images/ScrollBar.gif\" border=0>";
	//strFooterHTML=strFooterHTML+"<IMG SRC=\"images/ScrollBar.gif\" border=0>";
		
	//strFooterHTML=strFooterHTML+"<A HREF=\"Squad.htm\"><IMG SRC=\"images/ScrollBar2.gif\" border=0>";
	//strFooterHTML=strFooterHTML+"<A HREF=\"BridgendUtd5-1.htm\"><IMG SRC=\"images/ScrollBar.gif\" border=0></a>";
		
	
	strFooterHTML=strFooterHTML+"</marquee>";
	
	document.writeln(strFooterHTML);
}


function writeUpdateDetails()
{
	
	
	strFooterHTML="<!-- Update Bar ---------------------->"; 
	strFooterHTML=strFooterHTML+"<table border=0 align=center>"; 
	strFooterHTML=strFooterHTML+"	<tr>	"; strFooterHTML=strFooterHTML+"<td>"; 
	strFooterHTML=strFooterHTML+"<div align="+"center"+">  <center> "; strFooterHTML=strFooterHTML+"<font size=2 color=red FACE=\"Arial, Helvetica, Geneva\">Last Updated:"; // PUT THE UPDATES 	IN THE LINE BELOW 
	strFooterHTML=strFooterHTML+"testing 1 2";
	strFooterHTML=strFooterHTML+"<?echo'HOly Moly';?>";
	strFooterHTML=strFooterHTML+"</marquee></td></td></table>";
	
	document.writeln(strFooterHTML);
}

function goBack()
{
var gb = new backlink();
gb.text = "Get Back, Jack";
gb.write();

}

function writeFooter()
{
		strNavHTML="<table border=0 align=center>";
		strNavHTML=strNavHTML+"<tr><!-- Team Header -->";	
		strNavHTML=strNavHTML+"<td align=center><A HREF="+"home.php"+"><IMG NAME="+"header"+" SRC="+"images/BottomNavBar.jpg"+" border=0></td>";
		strNavHTML=strNavHTML+"</tr>";
		strNavHTML=strNavHTML+"</table>";
				
		document.writeln(strNavHTML);
}

function writeLeagueNavBar()
{
	strSquadLeagueBar="<table align=center>";
	strSquadLeagueBar=strSquadLeagueBar+"<tr>";
			strSquadLeagueBar=strSquadLeagueBar+"<td><A HREF=\"LeagueTable.php\"><IMG NAME=\"sponsor3\" SRC=\"images/LeagueTableNav.gif\" border=0></td>";
			strSquadLeagueBar=strSquadLeagueBar+"<td><A HREF=\"LeagueResults.php\"><IMG NAME=\"sponsor3\" SRC=\"images/LeagueResultsNav.gif\" border=0></td>";
			strSquadLeagueBar=strSquadLeagueBar+"<td><A HREF=\"LeagueGrid.php\"><IMG NAME=\"sponsor3\" SRC=\"images/LeagueGrid.gif\" border=0></td>";
			//strSquadLeagueBar=strSquadLeagueBar+"<td><A HREF=\"SquadSuspensions.htm\"><IMG NAME=\"sponsor3\" SRC=\"images/SquadSuspensions.gif\" border=0></td>";
	strSquadLeagueBar=strSquadLeagueBar+"</tr>";
	strSquadLeagueBar=strSquadLeagueBar+"</table>";
	
	document.writeln(strSquadLeagueBar);
}

function writeLeagueBottomBar()
{
	strLeagueBottomBar="<table align=center>";
	strLeagueBottomBar=strLeagueBottomBar+"<tr><td>";
	strLeagueBottomBar=strLeagueBottomBar+"<A HREF=\"http://leafa.co.uk/\" target=\"_blank\"><IMG NAME=\"frame\" ALIGN=center SRC=\"images/LothianEdinburghNavBar.jpg\" BORDER=0>";
	strLeagueBottomBar=strLeagueBottomBar+"</td></tr>";
	
	document.writeln(strLeagueBottomBar);
}


function nextPic(arg)
{
	picNumber=arg+1;
	if (arg < 1)
		arg=0
	else
		prevpicNumber=arg-1;
	
	//alert(arg);
	//alert(picNumber);
	//alert(prevpicNumber);
	
	if (arg == 0){
		PictureFrame.src = 'images/HomeTop2.JPG'   
	}
	else if (arg == 1){
		PictureFrame.src = 'images/HomeTop3.JPG'   
	}
	else
		PictureFrame.src = 'images/HomeTop4.JPG'   
	
	
}

function changeImage(arg) 
{
	if (arg == "Fixtures"){
		frame.src = 'images/FixturesFrame.gif'  
	} 
	else if (arg == "LatestNews"){
		frame.src = 'images/LatestNewsFrame.gif'   	
	} 
	else if (arg == "Lotto"){
		frame.src = 'images/LottoFrame.jpg'   
	}
	else if (arg == "Links"){
		frame.src = 'images/LinksClickFrame.gif'   
	}
	else if (arg == "Sponsors"){
		frame.src = 'images/SponsorsFrame.gif'   
	}
	else if (arg == "Facebook"){
		frame.src = 'images/FacebookFrame.jpg'   
	}
	else if (arg == "Results"){
		frame.src = 'images/ResultsFrame.gif'   
	}
	else if (arg == "LeagueTable"){
		frame.src = 'images/LeagueTableFrame.gif'   
	}
	else if (arg == "Squad"){
		frame.src = 'images/SquadFrame.gif'   
	}		
	else if (arg == "CaptainsBlog"){
		frame.src = 'images/CaptainsFrame.jpg'   
	}		
	else if (arg == "Nonsense"){
		frame.src = 'images/NonsenseClickFrame.gif'   
	}		
	else if (arg == "NewsLetter"){
		frame.src = 'images/NewsLetterFrame.jpg'   
	}
	else if (arg == "Guestbook"){
		frame.src = 'images/GuestBookFrame.gif'   
	}
	else{
		frame.src = 'images/FootballFrame.gif'     
	}
}




function changeImageOut(arg) 
{
	var randomnumber=Math.floor(Math.random()*2)
	
	frame.src = 'images/Sponsor'+randomnumber+'BC.gif'     
	//frame.src = 'images/Sponsor1BC.gif'     
}

function NonsenseNav()
{
	strFooterHTML="<!-- FOOTER ---------------------->";
	strFooterHTML=strFooterHTML+"<table align=center><tr><td align=center><A HREF=\"NonsenseHome.htm\"><IMG SRC=\"images/NonsenseIndex.gif\" border=0></a></td></tr></table>";
	document.writeln(strFooterHTML);
}

function getAnotherSeason(seasonwanted) 
{									
		document.seasonform.submit();
}
var makeRound = function(){var els = document.getElementsByTagName('div'); for(var i=0; el=els[i]; i++) if(el.className.indexOf('round')>-1 && el.firstChild && el.firstChild.className!='t') el.innerHTML = '<b class="t"><b class="r"></b></b><div class="c"><b class="br"></b>'+el.innerHTML+'<b class="br"></b></div><b class="b"><b class="r"><!----></b></b>';}
