function switch_tabs(unactive_tabs,active_tab,unactive_content,active_content)
{jQuery(unactive_tabs).removeClass("active");jQuery(active_tab).addClass("active");jQuery(active_tab).parent().removeClass();jQuery(active_tab).parent().addClass(active_tab.replace('#',''));jQuery(unactive_content).hide();jQuery(active_content).show();}
function openWindow(theURL,winName,features){window.open(theURL,winName,features);}
var notext=new Array();function doclear(f){if(notext[f.id]!=true){f.value='';notext[f.id]=true;}}
function MT_emailPage()
{var mailit="mailto:?subject=Visit this page on tottenhamhotspur.com";mailit+="&body=%0D%0A%0D%0AHi, below is a link to a page on tottenhamhotspur.com that I thought you might be interested in%0D%0A%0D%0A";mailit+="To view the page, visit: "+document.location.href;document.location.href=mailit;return false;}
function linkEmail(linkID){if($(linkID)){$(linkID).onclick=MT_emailPage;}
return false;}
function loadTopLinks()
{if(typeof mapkey!='undefined')
{for(var i=0;i<mapkey.length;i++)
{var keywords=mapkey[i].keywords.split(", ");var toplink;var k;var re=/(^\w)/;var uckeyword;for(var j=0;j<keywords.length;j++)
{k=j+1;toplink=document.getElementById("top_"+k);if(toplink){url="http://uk.search.yahoo.com/yhs/search?fr=yhs-tottenham-hotspots&partnerid=yhs-tottenham-hotspots&lyt=st&p="+keywords[j];toplink.href=url;uckeyword=keywords[j].substr(0,1).toUpperCase()+keywords[j].substr(1,keywords[j].length-1);toplink.innerHTML=uckeyword;}else{return;}}}}}
function DcsInit(){/*this.dcsid="dcsm1991x00000wgunemm34ht_7i2o";*/this.dcsid="styles_js";/*this.domain="statse.webtrendslive.com";*/this.domain="www.saa.co.uk";this.enabled=true;this.exre=(function(){if(window.RegExp){return(new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"));}
else{return("");}})();this.fpc="WT_FPC";this.fpcdom="";this.i18n=false;this.images=[];this.index=0;this.qp=[];this.re=(function(){if(window.RegExp){return(this.i18n?{"%25":/\%/g}:{"%09":/\t/g,"%20":/ /g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/g,"%7F":/\x7F/g,"%A0":/\xA0/g});}
else{return("");}})();this.timezone=0;this.trackevents=true;var t=this;(function(){if(t.enabled&&(document.cookie.indexOf(t.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){document.write("<scr"+"ipt type='text/javascript' src='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+t.domain+"/"+t.dcsid+"/wtid.js"+"'><\/scr"+"ipt>");}})();}
var DCS={};var WT={};var DCSext={};var dcsInit=new DcsInit();function readCookie(name)
{var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++)
{var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function switchLoginAreaDisplay(){}
function shopSwitchLoginAreaDisplay(){}
function checkCartStatus(){if(document.getElementById){if(readCookie('spurs_logged_in')){if($('#spurs_name')){$('#spurs_name').html(unescape(readCookie('spurs_name')));}}
var cartprice="";if(readCookie('spurs_cart_total')!=null){cartprice=unescape(readCookie('spurs_cart_total'));}else{cartprice='0.00';}
if($('#spurs_cart_total')){$('#spurs_cart_total').html(cartprice);}}}
function logout(){if(readCookie('spurs_logged_in')){document.cookie='spurs_logged_in=logout;expires=Thu, 01-Jan-70 00:00:01 GMT path=/';window.location.reload(true);}}
function loadXML(xmlFile,handleResponse){$.ajax({type:"GET",url:xmlFile,dataType:"xml",success:handleResponse});}
function getRoot(RO){returnVal=RO.responseXML.childNodes[0];return returnVal;}
function getText(xmlNode){var returnVal=xmlNode.text;if(!returnVal){returnVal=xmlNode.textContent}
return returnVal;}
function loadAds()
{try
{$.get('/overture.php',{},displaySponsoredLinks);}catch(e){new Ajax.Request('/overture.php',{onSuccess:displaySponsoredLinks});}}
function loadAdsHome()
{try
{$.get('/overture.php',{home:1},displaySponsoredLinks);}catch(e){}}
function displaySponsoredLinks(data){var output="";td_width="33%";try
{if($(data).find('Listing').length==4)
{td_width="25%";}
output="<tr>";$(data).find('Listing').each(function(){output+="<td width=\""+td_width+"%\">\r\n"
output+="<a href=\""+$(this).find('ClickUrl').text()+"\" class=\"body_0_9 body_mid_blue\" target=\"blank\">"
output+="<strong>"+$(this).attr('title')+"</strong></a><br /><br />\r\n"
output+="<a href=\""+$(this).find('ClickUrl').text()+"\" target=\"blank\" class=\"body_0_9 body_grey\">"
output+=$(this).attr('description')+"</a><br /><br />\r\n";output+="<strong><a href=\""+$(this).find('ClickUrl').text()+"\" class=\"body_0_9 body_mid_blue\" target=\"blank\">"
output+=$(this).attr('siteHost')+"</a></strong>\r\n</td>"})
output+="</tr>";$('#sponsored_links table tr:eq(1)').remove();$('#sponsored_links table').append(output);}
catch(e){var response=data.responseXML.documentElement;var listing=response.getElementsByTagName('Listing');if(listing.length==4)
{td_width="25%";}
var tr=document.getElementById('sponsored_links').getElementsByTagName('tr');for(var i=0;i<listing.length;i++)
{var td=(i==0)?tr[1].cells[0]:tr[1].insertCell(i);var clickurl=response.getElementsByTagName('ClickUrl')[i].firstChild.nodeValue;output="<a href=\""+clickurl+"\" class=\"body_0_9 body_mid_blue\" target=\"blank\">"
output+="<strong>"+listing[i].getAttribute("title")+"</strong></a><br /><br />\r\n"
output+="<a href=\""+clickurl+"\" target=\"blaClickUrlnk\" class=\"body_0_9 body_grey\">"
output+=listing[i].getAttribute("description")+"</a><br /><br />\r\n"
output+="<strong><a href=\""+clickurl+"\" class=\"body_0_9 body_mid_blue\" target=\"blank\">"
output+=listing[i].getAttribute("siteHost")+"</a></strong>\r\n"
td.innerHTML=output;}}}
function Request(arg){var obj=this;obj.strUri="";var requestHandler=null;var strSendMethod="GET";var objVariables={};var async=true;var user="";var password="";var requestObj;if(window.XMLHttpRequest){requestObj=new XMLHttpRequest();}
if(!window.XMLHttpRequest){requestObj=new ActiveXObject("Microsoft.XMLHTTP");}
obj.setSendMethod=function(strMeth){strMeth=strMeth.toUpperCase();if(strMeth==="GET"||strMeth==="POST"){strSendMethod=strMeth;return true;}
raiseWarning("No invalid Send method passed");return false;};obj.setUri=function(uri){if(uri!==""){obj.strUri=uri;return true;}
raiseWarning("No uri passed");return false;};obj.setMethod=function(strMeth){if(strMeth!==""){objVariables.method=strMeth;return true;}
raiseWarning("No method passed");return false;};obj.setVariable=function(theVar,theValue){if(theVar!==""){objVariables[theVar]=escape(theValue);return true;}
raiseWarning("No variable name passed");return false;};obj.setErrorHandler=function(theHander){if(typeof(theHandler)==='function'){errorHandler=theHandler;return true;}else{raiseWarning("Error handler is not a function");return false;}};obj.setAuthentication=function(theUser,thePass){if(user!==""){user=theUser;password=thePass;return true;}else{raiseWarning("No username passed");return false;}};obj.send=function(uri,handler){obj.strUri=uri;if(typeof(handler)!=='function'){raiseError("Handler is not a function");return false;}
var finalUri=getUri();var headers=getHeaders();try{requestObj.onreadystatechange=processReqChange;}catch(e){alert(e.message);raiseError("Unable to create XMLHttpRequest object");return;}
obj.requestHandler=handler;requestObj.open(strSendMethod,finalUri,async,user,password);requestObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');requestObj.send(headers);return true;};function processReqChange(){if(requestObj.readyState===4){if(requestObj.status===200){obj.requestHandler(requestObj);requestObj=null;return requestObj;}else{requestObj=null;raiseError("There was a problem retrieving the XML data:\n"+requestObj.statusText);return false;}}}
function buildVariableString(){var tempArr=[];for(theVar in objVariables){tempArr[tempArr.length]=theVar+"="+objVariables[theVar];}
return tempArr.join("&");}
function getUri(){var strVariableString=buildVariableString();if(strSendMethod==="GET"&&strVariableString!==""){return obj.strUri+"?"+strVariableString;}else{return obj.strUri;}}
function getHeaders(){if(strSendMethod==="GET"){return null;}else{return buildVariableString();}}
function raiseError(strError){if(typeof(errorHandler)!=='function'){alert(strError);}else{errorHandler(strError);}}
function raiseWarning(strWarning){if(typeof(errorHandler)!=='function'){alert(strWarning);}else{errorHandler(strError);}}}
jQuery(document).ready(function(){jQuery('.registration_form p input:not(:image, :submit), .registration_form p a.information, .registration_form p select, .registration_form p textarea').focus(function(){jQuery(this).parents('p:last').addClass('highlight_row');});jQuery('.registration_form p input:not(:image, :submit), .registration_form p a.information, .registration_form p select, .registration_form p textarea').blur(function(){jQuery(this).parents('p:last').removeClass('highlight_row');});});jQuery(document).ready(function(){if(jQuery('#junior_fans_form').length==0){return;}
jQuery('#junior_fans_more a').click(addNewJuniorFansRow);});function addNewJuniorFansRow()
{var current_size=jQuery('#junior_fans_friends p').length;var new_row=jQuery('#junior_fans_friends p:last').clone(true);new_row.children('label').each(function(index){jQuery(this).attr('for',jQuery(this).attr('for').replace(/_(\d*)$/,'_'+current_size));});new_row.children('input').each(function(index){jQuery(this).attr('id',jQuery(this).attr('id').replace(/_(\d*)$/,'_'+current_size));jQuery(this).attr('name',jQuery(this).attr('name').replace(/\[(\d*)\]$/,'['+current_size+']'));jQuery(this).attr('value','');jQuery(this).removeClass('input_error');});new_row.appendTo('#junior_fans_friends');return false;}
