var jw_slideSpeed = 60; var jw_timer = 10;var slideID = 8;function findto(){	var to_url =location.href;	if (to_url == "http://www.sportcentral.org.uk")	{		//do nothing	}	else   	{		urlmatch = new Array("football","cricket","rugby","golf","disability","athletics","gymnastics","swimming"); 		var i = 0;		var found = "no";		var myString = new String(to_url);		do		{			var rExp = new RegExp (urlmatch[i],"g","i");			var toresult= myString.search(rExp); //check for match in URL			if (toresult > -1)			{			found="yes";			to_url= urlmatch[i];			slideID = i;			}			i++;		}while(i<8 && found=="no");			}}//preload images. run on body loadfunction startup(){init();}//initialise the slides on startupfunction init(){ // hide loading layer // show moo layer	findto();	preloadImages(); 	var stretchers = document.getElementsByClassName('stretcher');	var toggles = document.getElementsByClassName('display');	var myAccordion = new fx.Accordion( toggles, stretchers, {opacity: true, wait:false, height: 133, width: true, duration: 400, transition: fx.sineInOut});	//hash functions	var found = false;	toggles.each(function(h3, i){var div = Element.find(h3, 'nextSibling');			if (window.location.href.indexOf(h3.title) > 0 ) {				//this never gets run ??!!				myAccordion.showThisHideOpen(div);				found = true;			}		});			document.getElementById('content_mooslide').style.overflow = "visible";			document.getElementById('content_mooslide').style.visibility = "visible"				document.getElementById('content_mooslide').style.height = "auto"		if (!found) {myAccordion.showThisHideOpen(stretchers[slideID])}; // CHANGE SLIDEID TO CHANGE THE SLIDE SHOWN ON STARTUP	myAccordion= new fx.Accordion(null,null,null);}function preloadImages(){	if (document.images) 	{				urlmatch = new Array("football","cricket","rugby","golf","disability","athletics","gymnastics","swimming"); 		switch (slideID)		{			case 0: Image1= new Image(); Image1.src = "images/ExFootball.jpg"; break;			case 1: Image1= new Image(); Image1.src = "images/ExCricket.jpg"; break;			case 2: Image1= new Image(); Image1.src = "images/ExRugby.jpg"; break;			case 3: Image1= new Image(); Image1.src = "images/ExGolf.jpg"; break;			case 4: Image1= new Image(); Image1.src = "images/ExDisability.jpg"; break;			case 5: Image1= new Image(); Image1.src = "images/ExAthletics.jpg"; break;			case 6: Image1= new Image(); Image1.src = "images/ExGymnastics.jpg"; break;			case 7: Image1= new Image(); Image1.src = "images/ExSwimming.jpg"; break;			case 8: Image1= new Image(); Image1.src = "images/ExSwimming.jpg"; break;		}	}}var ie=document.all?1:0var ns6=document.getElementById&&!document.all?1:0// changes mouseover images on slidesfunction moveover(menu){	if (menu== "athletics")	{	document.getElementById('imgathletics').src="images/athleticsOV.png";	if(ie){document.getElementById('imgathletics').style.cursor="hand";}	}	else if (menu== "cricket")	{	document.getElementById('imgcricket').src="images/cricketOV.png";	if(ie){document.getElementById('imgcricket').style.cursor="hand";}	}	else if (menu== "rugby")	{	document.getElementById('imgrugby').src="images/rugbyOV.png";	if(ie){document.getElementById('imgrugby').style.cursor="hand";}	}	else if (menu== "golf")	{	document.getElementById('imggolf').src="images/golfOV.png";	if(ie){document.getElementById('imggolf').style.cursor="hand";}	}	else if (menu== "disability")	{	document.getElementById('imgdisability').src="images/disabilityOV.png";	if(ie){document.getElementById('imgdisability').style.cursor="hand";}	}	else if (menu== "football")	{	document.getElementById('imgfootball').src="images/footballOV.png";	if(ie){document.getElementById('imgfootball').style.cursor="hand";}	}	else if (menu== "gymnastics")	{	document.getElementById('imggymnastics').src="images/gymnasticsOV.png";	if(ie){document.getElementById('imgdisability').style.cursor="hand";}	}	else if (menu== "swim")	{	document.getElementById('imgswim').src="images/swimOV.png";	if(ie){document.getElementById('imgswim').style.cursor="hand";}	}}// Changesmouseover images on slidesfunction moveback(menu){	if (menu== "athletics")	{	document.getElementById('imgathletics').src="images/athletics.png";	if(ie){document.getElementById('imgathletics').style.cursor="hand";}	}	else if (menu== "cricket")	{	document.getElementById('imgcricket').src="images/cricket.png";	if(ie){document.getElementById('imgcricket').style.cursor="hand";}	}	else if (menu== "rugby")	{	document.getElementById('imgrugby').src="images/rugby.png";	if(ie){document.getElementById('imgrugby').style.cursor="hand";}	}	else if (menu== "golf")	{	document.getElementById('imggolf').src="images/golf.png";	if(ie){document.getElementById('imggolf').style.cursor="hand";}	}	else if (menu== "disability")	{	document.getElementById('imgdisability').src="images/disability.png";	if(ie){document.getElementById('imgdisability').style.cursor="hand";}	}	else if (menu== "football")	{	document.getElementById('imgfootball').src="images/football.png";	if(ie){document.getElementById('imgfootball').style.cursor="hand";}	}	else if (menu== "gymnastics")	{	document.getElementById('imggymnastics').src="images/gymnastics.png";	if(ie){document.getElementById('imgdisability').style.cursor="hand";}	}	else if (menu== "swim")	{	document.getElementById('imgswim').src="images/swim.png";	if(ie){document.getElementById('imgswim').style.cursor="hand";}	}}
