var SgAvailWidth=screen.availWidth;var SgAvailHeight=screen.availHeight-24;var SgUpWin;var refreshRate=60;var element=document;var SgDOM;function SgBrowserobj(){this.ver=navigator.appVersion.toLowerCase();this.agent=navigator.userAgent.toLowerCase();this.name=navigator.appName.toLowerCase();this.byid=document.getElementById?true:false;this.opera=(this.agent.indexOf("opera")>-1)?true:false;this.ie=(this.name=='microsoft internet explorer'&&!this.opera)?true:false;this.ie4=(this.ie&&(this.ver.indexOf("msie 4")>-1||this.agent.indexOf("msie 4")>-1))?true:false;this.ns=(this.name=='netscape'&&!this.opera)?true:false;this.ns4=(this.ns&&document.layers)?true:false;this.mac=(this.agent.indexOf("mac")>-1)?true:false;this.windows=(this.agent.indexOf("windows")>-1)?true:false;this.v4orMore=parseInt(this.ver)>=4;return this;}
if(!SgDOM){SgDOM=new SgBrowserobj();}
function doNavigation(url){document.location.href=url;}
function settingsNavigate(theFolder,pageNum){if(theFolder!==""){document.location.href="../../"+theFolder+"/pages/"+pageNum+".html";}}
function SgOpenArgs(url,name,w_width,w_height,args){openWindow(url,name,w_width,w_height,args);}
function openWindow(url,name,w_width,w_height,args,placeWindow){name=name;args=args;if(args!==''){args=args+',';}
if(!SgUpWin||SgUpWin.closed){center_of_screen_X=Math.floor(SgAvailWidth/2)-Math.floor(w_width/2);center_of_screen_Y=Math.floor(SgAvailHeight/2)-Math.floor(w_height/2);placeWindow=(SgDOM.opera)?"":",left="+center_of_screen_X+",top="+center_of_screen_Y;}
SgUpWin=window.open(url,name,args+'width='+w_width+',height='+w_height+placeWindow);if(SgUpWin){SgUpWin.focus();}else{alert("Fönstret som skulle öppnas blockerades! Ändra inställningar för svt.se i din popup-blockerare.");}}
function formNavigate(theForm){var pageNum=theForm.elements['pageinput'].value;if(isNaN(pageNum)||(pageNum<100||pageNum>999)){alert("Felaktigt sidnummer");return false;}else{document.location.href=pageNum+".html";return false;}}
function setFocus(aForm,aField){var theForm=getObject(aForm);if(theForm!==null){theForm[aField].focus();theForm[aField].select();}}
function getObject(theObj){if(document.getElementById){return document.getElementById(theObj);}else if(document.all){return document.all[theObj];}}
function doSomething(theObj){theObj.style.filter="none";}
function noEffect(theObj){theObj.style.opacity=1;theObj.style.filter="none";}
function effect(theObj){theObj.style.opacity=0.8;theObj.style.filter="alpha(opacity=80)";}
function setRefresh(){setTimeout("document.location.href=document.location.href;",refreshRate*1000);}
function sitestat(ns_l){ns_l+='&amp;ns__t='+(new Date()).getTime();ns_pixelUrl=ns_l;
ns_0=document.referrer;
ns_0=(ns_0.lastIndexOf('/')==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf('/'),0):ns_0;
if(ns_0.length>0)ns_l+='&amp;ns_referrer='+escape(ns_0);
if(document.images){ns_1=new Image();ns_1.src=ns_l;} else
document.write('<img src="'+ns_l+'" width="1" height="1" alt="">');}

