﻿// (c) Copyright 2003, Finsoft Ltd.

if(typeof(HTMLElement)!="undefined"){if(!(HTMLElement.prototype.insertAdjacentElement)){HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case "beforeBegin":this.parentNode.insertBefore(parsedNode,this);break;case "afterBegin":this.insertBefore(parsedNode,this.firstChild);break;case "beforeEnd":this.appendChild(parsedNode);break;case "afterEnd":if(this.nextSibling){this.parentNode.insertBefore(parsedNode,this.nextSibling);}else{this.parentNode.appendChild(parsedNode);}break;}};HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML);};HTMLElement.prototype.insertAdjacentText=function(where,txtStr){var parsedText=document.createTextNode(txtStr);this.insertAdjacentElement(where,parsedText);};}}function AE_AttachEventSetup(oObj){oObj.aeFN=new Array();oObj.attachEvent=AE_AttachEventFn;window.onload=AE_WindowOnload;window.onresize=AE_WindowOnresize;}function AE_AttachEventFn(sEvent,fpNotify){if(this.aeFN[sEvent])this.aeFN[sEvent][this.aeFN[sEvent].length]=fpNotify;else{this.aeFN[sEvent]=new Array();this.aeFN[sEvent][this.aeFN[sEvent].length]=fpNotify;}}function AE_AttachEvent(sEvent,fpNotify){if(!(sEvent=="onload"||sEvent=="onresize"))return;AE_oWindow.attachEvent(sEvent,fpNotify);}function AE_PlayEvent(sEvent){eval("window."+sEvent);if(AE_oWindow.aeFN[sEvent])for(var i=0;i<AE_oWindow.aeFN[sEvent].length;i++)eval(AE_oWindow.aeFN[sEvent][i]+"()");}function AE_WindowOnload(){AE_PlayEvent("onload");}function AE_WindowOnresize(){AE_PlayEvent("onresize");}var AE_oWindow=new Object();AE_AttachEventSetup(AE_oWindow);function BrowserDetectLite(){var ua=navigator.userAgent.toLowerCase();this.isGecko=(ua.indexOf('gecko')!=-1&&ua.indexOf('like')==-1);this.isKHTML=(ua.indexOf('khtml')!=-1);this.isIE=((ua.indexOf('msie')!=-1)&&(ua.indexOf('opera')==-1)&&(ua.indexOf('webtv')==-1));this.isMac=(ua.indexOf('mac')!=-1);}var Browser=new BrowserDetectLite();var FV_sDigits="0123456789";var FV_sBlanks=" \t\n\r";var FV_sDecimalPointDelimiter=".";function FV_IsEmpty(s){return((s==null)||(s.length==0));}function FV_IsBlank(s){var i;var c;if(FV_IsEmpty(s))return true;for(i=0;i<s.length;i++){c=s.charAt(i);if(FV_sBlanks.indexOf(c)==-1)return false;}return true;}function FV_StripCharsNotInBag(s,bag){var i;var c;var returnString="";for(i=0;i<s.length;i++){c=s.charAt(i);if(bag.indexOf(c)!=-1)returnString+=c;}return returnString;}function FV_LTrim(s){var i=0;while((i<s.length)&&(FV_sBlanks.indexOf(s.charAt(i))!=-1))i++;return s.substring(i,s.length);}function FV_RTrim(s){var i=s.length-1;while((i>=0)&&(FV_sBlanks.indexOf(s.charAt(i))!=-1))i--;return s.substring(0,i+1);}function FV_Trim(s){s=FV_LTrim(s);s=FV_RTrim(s);return s;}function FV_IsDigit(c){return((c>="0")&&(c<="9"));}function FV_IsInteger(s){if(FV_IsBlank(s))return false;if((s.charAt(0)=="-")||(s.charAt(0)=="+"))var i=1;else var i=0;var c;for(i;i<s.length;i++){c=s.charAt(i);if(!FV_IsDigit(c))return false;}return true;}function FV_IsIntegerInRange(s,a,b){if(FV_IsBlank(s))return false;if(!FV_IsInteger(s))return false;var num=parseInt(s,10);return((num>=a)&&(num<=b));}function FV_IsFloat(s){var seenDecimalPoint=false;if(FV_IsBlank(s))return false;if(s==FV_sDecimalPointDelimiter)return false;if((s.charAt(0)=="-")||(s.charAt(0)=="+"))var i=1;else var i=0;var c;for(i;i<s.length;i++){c=s.charAt(i);if((c==FV_sDecimalPointDelimiter)&&!seenDecimalPoint)seenDecimalPoint=true;else if(!FV_IsDigit(c))return false;}return seenDecimalPoint;}function FV_IsEmail(strEmail){if(strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)!=-1)return true;else return false;}function FV_GetYear2k(date){var year=date.getYear();if(year<1000)year+=1900;return year;}function FV_IsValidDate(sYear,sMonth,sDay,nJan){if(nJan!=1)nJan=0;var nDec=nJan+11;if(!FV_IsInteger(sYear)||!FV_IsIntegerInRange(sMonth,nJan,nDec)||!FV_IsIntegerInRange(sDay,1,31))return false;var nDay=parseInt(sDay,10);var nMonth=parseInt(sMonth,10)-((nJan==1)?1:0);var nYear=parseInt(sYear,10);var oDate=new Date(nYear,nMonth,nDay);if(nDay==oDate.getDate()&&nMonth==oDate.getMonth()&&nYear==FV_GetYear2k(oDate))return true;return false;}function FV_SetupForm(vForm){if(typeof(vForm)=="string")oForm=document.forms[vForm];else oForm=vForm;if(!oForm)return;if(!oForm.parentNode)return;oForm.onsubmit=function(){return FV_FormVal(this);};oForm.alertuser=false;oForm.submitted=false;var oElems=oForm.elements;var nLen=oElems.length;var sTmp,oTmp,sTmp2;for(var i=0;i<nLen;i++){oTmp=oElems[i];if(typeof(oTmp.name)=="undefined")continue;sTmp2=oTmp.name;sTmp=sTmp2.charAt(0).toLowerCase();if(sTmp!="b"&&sTmp!="s"&&sTmp!="n")continue;switch(oTmp.type){case "text":case "select-one":case "password":case "textarea":oLabels=oTmp.parentNode.getElementsByTagName("label");for(var j=0;j<oLabels.length;j++){if(oLabels[j].className.indexOf("mandat")!=-1&&oLabels[j].htmlFor==sTmp2){oTmp.valme=function(){var oDiv=this.parentNode;if(this.type=="text")this.value=FV_Trim(this.value);bOk=FV_FieldVal(this);if(bOk)oDiv.className=oDiv.className.replace("badinput","");else if(oDiv.className.indexOf("badinput")==-1){oDiv.className+=" badinput";}return bOk;};oTmp.onblur=oTmp.valme;break;}}break;case "checkbox":oLabel=oTmp.parentNode;if(oLabel.className.indexOf("mandat")!=-1){oTmp.valme=function(bShowMes){var oDiv=this.parentNode.parentNode;var bOk=this.checked;if(bOk)oDiv.className=oDiv.className.replace("badinput","");else if(oDiv.className.indexOf("badinput")==-1){oDiv.className+=" badinput";if(this.form.alertuser)FV_FieldVal(this);}return bOk;};oTmp.onblur=oTmp.valme;}break;case "radio":oLabel=oTmp.parentNode;if(oLabel.className.indexOf("mandat")!=-1){oTmp.valme=function(bShowMes){var oDiv=this.parentNode.parentNode;var oRadios=this.form.elements[this.name];var bOk=false;for(var r=0;r<oRadios.length;r++){if(oRadios[r].checked){bOk=true;break;}}if(bOk)oDiv.className=oDiv.className.replace("badinput","");else if(oDiv.className.indexOf("badinput")==-1){oDiv.className+=" badinput";if(this.form.alertuser)FV_FieldVal(this);}return bOk;};oTmp.onblur=oTmp.valme;}break;}}}function FV_ShowMessage(sMes){if(sMes!="")alert(sMes);}function DDB_Form(vF){if(typeof(vF)!="string")return vF;if(document.forms[vF])vF=document.forms[vF];else vF=null;return vF;}function DDB_Elem(vE,oForm){if(typeof(vE)!="string")return vE;if(typeof(oForm)=="string")oForm=DDB_Form(oForm);if(oForm){if(oForm.elements[vE])vE=oForm.elements[vE];else vE=null;}else{vE=null;}return vE;}function DDB_Add(sFormName,sSelectName,sText,sValue){var oForm=DDB_Form(sFormName);var oSelect=DDB_Elem(sSelectName,oForm);var newoption=new Option(sText,sValue,true,true);oSelect.options[oSelect.length]=newoption;}function DDB_RemoveAll(sFormName,sSelectName){var oForm=DDB_Form(sFormName);var oSelect=DDB_Elem(sSelectName,oForm);var i;for(i=0;i<oSelect.length;i++){oSelect.options[i]=null;i--;}}function DDB_Redirect(sFormName,sSelectName){var oForm=DDB_Form(sFormName);var oSelect=DDB_Elem(sSelectName,oForm);var sValue=oSelect.options[oSelect.selectedIndex].value;if(sValue!="")location.href=sValue;}var FIF_Index=0;var FIF_IFrame=new Array();function FIF_Frame(top,left,width,height,src,bIsStealth){if(!document.getElementById&&!document.documentElement&&!document.getElementsByTagName)return null;var sUA=navigator.userAgent.toLowerCase();var bIsGecko=(sUA.indexOf("gecko")!=-1);bIsStealth=(bIsStealth==true);this.nTop=top;this.nLeft=left;this.nWidth=width;this.nHeight=height;this.sSrc=src;this.sID=FIF_Index;this.bIsStealth=bIsStealth;this.oOpener=window;this.URLlimit=1900;this.Load=function(sSrc){sSrc=sSrc||this.sSrc;var dTemp=new Date();var sTmp="";if(sSrc.indexOf("?")!=-1)sTmp+="&";else sTmp+="?";sTmp+="FIFTime="+dTemp.getTime();if(bIsGecko){this.layer.setAttribute("src",sSrc+sTmp,0);}else{if(sSrc.length<this.URLlimit-sTmp.length){if(typeof(location.replace)=="object")document.frames["FIF_frame"+this.sID].location.replace(sSrc+sTmp);else document.frames["FIF_frame"+this.sID].location.href=(sSrc+sTmp);}else{sTmp="";var nUrl=sSrc.indexOf("?");sTmp+='<body onload="document.forms[0].submit();"><form action="'+sSrc.substring(0,nUrl+1)+'FIFTime='+dTemp.getTime()+'" method="post">\n';var aQS=sSrc.substring(nUrl+1).split("&");var aTmp;for(var cnt=0;cnt<aQS.length;cnt++){aTmp=aQS[cnt].split("=");sTmp+='<input type="hidden" name="'+aTmp[0]+'" value="'+unescape(aTmp[1])+'"/>\n';}sTmp+='</form></body>';document.frames["FIF_frame"+this.sID].document.write(sTmp);document.frames["FIF_frame"+this.sID].document.close();}}this.sSrc=sSrc;};if(!bIsStealth){this.bIsShown=true;this.bIsOn=true;}this.Show=function(){xShow(this.layer);this.bIsShown=true;};this.Hide=function(){xHide(this.layer);this.bIsShown=false;};this.On=function(){xOn(this.layer);this.bIsOn=true;};this.Off=function(){xOff(this.layer);this.bIsOn=false;};this.MoveTo=function(nL,nT){if(typeof(nL)!="undefined")this.nLeft=nL;if(typeof(nT)!="undefined")this.nTop=nT;xMoveTo(this.layer,nL,nT);};this.Left=function(nL){if(typeof(nL)!="undefined")this.nLeft=nL;return xLeft(this.layer,nL);};this.Top=function(nT){if(typeof(nT)!="undefined")this.nTop=nT;return xTop(this.layer,nT);};this.ResizeTo=function(nW,nH){if(typeof(nW)!="undefined")this.nWidth=nW;if(typeof(nH)!="undefined")this.nHeight=nH;xResizeTo(this.layer,nW,nH);};this.Width=function(nW){if(typeof(nW)!="undefined")this.nWidth=nW;return xWidth(this.layer,nW);};this.Height=function(nH){if(typeof(nH)!="undefined")this.nHeight=nH;return xHeight(this.layer,nH);};this.PageX=function(){return xPageX(this.layer)};this.PageY=function(){return xPageY(this.layer)};if(src.indexOf("://")!=-1){if(src.indexOf(document.domain)==-1){alert("FloatingIFrame:Sorry,the src you specified is not in this domain. You can't load URLs outside "+document.domain);return;}}if(bIsGecko){if(bIsStealth)var sVis="hidden";else var sVis="visible";tmp=document.createElement("iframe");tmp.setAttribute("name","FIF_frame"+FIF_Index);tmp.setAttribute("id","FIF_frame"+FIF_Index);tmp.setAttribute("height",height);tmp.setAttribute("width",width);tmp.setAttribute("scrolling","yes");tmp.setAttribute("style","position:absolute;visibility:"+sVis+";left:"+left+"px;top:"+top+"px;width:"+width+"px;height:"+height+"px;background-color:#fff;");tmp.setAttribute("src",src);tmp.id="FIF_frame"+FIF_Index;tmp.name="FIF_frame"+FIF_Index;tmp.style.position="absolute";tmp.style.visibility=sVis;tmp.style.left=left+"px";tmp.style.top=top+"px";tmp.style.width=width+"px";tmp.style.height=height+"px";tmp.style.backgroundColor="#fff";tmp.src=src;document.getElementsByTagName("body").item(0).appendChild(tmp);this.layer=document.getElementById("FIF_frame"+FIF_Index);}else{if(bIsStealth)var sVis='visibility:hidden;';else var sVis='';var sTmp='<iframe width="'+width+'" height="'+height+'" scrolling="yes" '+'name="FIF_frame'+FIF_Index+'" '+'id="FIF_frame'+FIF_Index+'" '+'style="position:absolute;'+sVis+'left:'+left+'px;'+'top:'+top+'px;'+'width:'+width+'px;'+'height:'+height+'px;" '+'src="'+src+'">'+'</iframe>\n';document.write(sTmp);document.close();this.layer=(document.all)?document.all["FIF_frame"+FIF_Index]:document.getElementById("FIF_frame"+FIF_Index);}FIF_Index++;FIF_IFrame[this.id]=this;}var SWF_bUseFlash=true;var SWF_IE='<scr'+'ipt language="VBScript"\>\n';SWF_IE+='Function SWF_Check4FlashVerIE(sVer)\n';SWF_IE+='On Error Resume Next \n';SWF_IE+='Dim obFlash,bRet \n';SWF_IE+='bRet=False \n';SWF_IE+=' Set obFlash=CreateObject("ShockwaveFlash.ShockwaveFlash."&Left(sVer,1))\n';SWF_IE+=' If IsObject(obFlash)Then bRet=True \n';SWF_IE+='SWF_Check4FlashVerIE=bRet \n';SWF_IE+='End Function \n';SWF_IE+='</scr'+'ipt\>\n';document.write(SWF_IE);function SWF_Check4FlashVer(sVer){var agent=navigator.userAgent.toLowerCase();if(agent.indexOf("mozilla/3")!=-1&&agent.indexOf("msie")==-1){return false;}if(navigator.plugins!=null&&navigator.plugins.length>0){var flashPlugin=navigator.plugins['Shockwave Flash'];if(typeof(flashPlugin)=='object'){var nTmp=parseFloat(flashPlugin.description.substring(16).replace(/\s+/gi,"").replace(/r/gi,""));sVer=sVer.replace(/,/gi,"");sVer=sVer.charAt(0)+"."+sVer.substring(1);var nVer=parseFloat(sVer);if(nTmp>=nVer)return true;}}else if(agent.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4&&agent.indexOf("win")!=-1&&agent.indexOf("16bit")==-1){return SWF_Check4FlashVerIE(sVer);}else{return false;}return false;}function SWF_GetFlashVer(){var latestFlashVersion=10;var agent=navigator.userAgent.toLowerCase();if(agent.indexOf("mozilla/3")!=-1&&agent.indexOf("msie")==-1){SWF_FlashVer=0;}if(navigator.plugins!=null&&navigator.plugins.length>0){var flashPlugin=navigator.plugins['Shockwave Flash'];if(typeof flashPlugin=='object'){for(var i=latestFlashVersion;i>=3;i--){if(flashPlugin.description.indexOf(i+'.')!=-1){SWF_FlashVer=i;break;}}}}else if(agent.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4&&agent.indexOf("win")!=-1&&agent.indexOf("16bit")==-1){var doc='<scr'+'ipt language="VBScript"\>\n';doc+='On Error Resume Next \n';doc+='Dim obFlash \n';doc+='For i='+latestFlashVersion+' To 3 Step-1 \n';doc+=' Set obFlash=CreateObject("ShockwaveFlash.ShockwaveFlash."&i)\n';doc+=' If IsObject(obFlash)Then \n';doc+=' SWF_FlashVer=i \n';doc+=' Exit For \n';doc+=' End If \n';doc+='Next \n';doc+='</scr'+'ipt\>\n';document.write(doc);}else if(agent.indexOf("webtv/2.5")!=-1)SWF_FlashVer=3;else if(agent.indexOf("webtv")!=-1)SWF_FlashVer=2;else{SWF_FlashVer=-1;}return SWF_FlashVer;}function SWF_WriteFlashContent(sFileName,nWidth,nHeight,sAltExt,sLink,bNoAlt,sProtocol,sSiteAddr,sVer){var sWriteContent="";var sFlashContent="";var sAlternateContent="";if(typeof(sLink)=="undefined")sLink="";if(typeof(bNoAlt)=="undefined")bNoAlt=false;if(typeof(sVer)=="undefined")sVer="6,0,0,0";if(typeof(sProtocol)=="undefined")sProtocol="http://";if(typeof(sSiteAddr)=="undefined"||sSiteAddr==""||sSiteAddr=="/")sSiteAddr=sProtocol+location.host+((location.port=="")?"":":"+location.port)+"/";if(typeof(sAltExt)=="undefined")sAltExt+='.gif" ';if(!SWF_Check4FlashVer(sVer))SWF_bUseFlash=false;if(SWF_bUseFlash){var sFixedFileName=sFileName;if(sFileName.charAt(0)=="/")sFixedFileName=sFileName.substring(1);else{sFixedFileName=location.pathname.substring(1,location.pathname.lastIndexOf("/")+1)+sFileName;}sFlashContent='\n<object ';sFlashContent+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';sFlashContent+=' codebase="'+sProtocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+sVer+'" ';if(typeof(nWidth)!="undefined")sFlashContent+=' width="'+nWidth+'" ';if(typeof(nHeight)!="undefined")sFlashContent+=' height="'+nHeight+'" ';sFlashContent+='>\n';sFlashContent+='<param name="movie" value="'+sFileName+'.swf';if(sLink!="")sFlashContent+='?blink='+escape(sLink);sFlashContent+='"/>\n';sFlashContent+='<param name="quality" value="high"/>\n';sFlashContent+='<param name="menu" value="false"/>\n';sFlashContent+='<param name="wmode" value="transparent"/>\n';sFlashContent+='<!--[if!IE]><-->\n';sFlashContent+='<object type="application/x-shockwave-flash" ';if(typeof(nWidth)!="undefined")sFlashContent+=' width="'+nWidth+'" ';if(typeof(nHeight)!="undefined")sFlashContent+=' height="'+nHeight+'" ';sFlashContent+=' data="'+sSiteAddr+sFixedFileName+'.swf" ';sFlashContent+='>\n';sFlashContent+='<param name="movie" value="'+sFileName+'.swf';if(sLink!="")sFlashContent+='?blink='+escape(sLink);sFlashContent+='"/>\n';sFlashContent+='<param name="quality" value="high"/>\n';sFlashContent+='<param name="menu" value="false"/>\n';sFlashContent+='<param name="wmode" value="transparent"/>\n';sFlashContent+='<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"/>\n';}if(!bNoAlt){if(sLink!=""){sAlternateContent+='<a href="'+sLink+'">';}sAlternateContent+='<img src="'+sFileName+sAltExt+'" ';if(typeof(nWidth)!="undefined")sAlternateContent+=' width="'+nWidth+'" ';if(typeof(nHeight)!="undefined")sAlternateContent+=' height="'+nHeight+'" ';sAlternateContent+=' border="0"/>';if(sLink!="")sAlternateContent+='</a>\n';}if(SWF_bUseFlash){sWriteContent=sFlashContent+sAlternateContent;sWriteContent+='</object>\n';sWriteContent+='<!--><![endif]-->\n';sWriteContent+='</object>\n';}else{sWriteContent=sAlternateContent;}return sWriteContent;}var xOp7=false,xIE=false,xUA=navigator.userAgent.toLowerCase();if(window.opera){xOp7=(xUA.indexOf("opera 7")!=-1||xUA.indexOf("opera/7")!=-1);}else{xIE=(xUA.indexOf("msie")!=-1);}function xOn(e,sV){if(!(e=xGetElementById(e)))return;if(xDef(sV))e.style.display=sV;else e.style.display="block";}function xOff(e){if(!(e=xGetElementById(e)))return;e.style.display="none";}function xIsOn(e){if(!(e=xGetElementById(e)))return;var bRet=true;if(e.style.display==""){bRet=!(xGetAnyCS(e,"display")=="none");}else{bRet=!(e.style.display=="none");}return bRet;}function xShow(e){if(!(e=xGetElementById(e)))return;e.style.visibility="visible";}function xHide(e){if(!(e=xGetElementById(e)))return;e.style.visibility="hidden";}function xIsShown(e){if(!(e=xGetElementById(e)))return;var bRet=true;if(e.style.visibility=="")bRet=!(xGetAnyCS(e,"visibility")=="hidden");else bRet=!(e.style.visibility=="hidden");return bRet;}function xZIndex(e,uZ){if(!(e=xGetElementById(e)))return 0;if(xDef(uZ))e.style.zIndex=uZ;else uZ=e.style.zIndex;return uZ;}function xMoveTo(e,iX,iY){xLeft(e,iX);xTop(e,iY);}function xLeft(e,iX){if(!(e=xGetElementById(e)))return 0;if(xDef(iX))e.style.left=iX+"px";else{if(xDef(e.offsetLeft))iX=e.offsetLeft;else iX=parseInt(e.style.left);if(isNaN(iX))iX=0;}return iX;}function xTop(e,iY){if(!(e=xGetElementById(e)))return 0;if(xDef(iY))e.style.top=iY+"px";else{if(xDef(e.offsetTop))iY=e.offsetTop;else iY=parseInt(e.style.top);if(isNaN(iY))iY=0;}return iY;}function xPageX(e){if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;else break;e=e.offsetParent;}return x;}function xPageY(e){if(!(e=xGetElementById(e)))return 0;var y=0;while(e){if(xDef(e.offsetTop))y+=e.offsetTop;else break;e=e.offsetParent;}return y;}function xStick(e){if(!(e=xGetElementById(e)))return;if(!xDef(e.stick)){e.stick=false;e.stickOldPos=0;e.stickStart=xTop(e);e.stickSub=xPageY(e)-e.stickStart;e.style.position="absolute";}e.stick=(e.stick)?false:true;if(!e.stick){clearTimeout(e.stickTimer);}}function xStickScroll(e){if(!(e=xGetElementById(e)))return;var nPos;if(e.stick){nPos=xScrollTop();if(nPos<e.stickSub+e.stickStart)nPos=e.stickStart;else nPos-=e.stickSub;if(nPos!=e.stickOldPos)xTop(e,nPos);e.stickOldPos=nPos;e.stickTimer=setTimeout("xStickScroll('"+e.id+"')",300);}}function xResizeTo(e,uW,uH){xWidth(e,uW);xHeight(e,uH);}function xWidth(e,uW){if(!e||(uW&&uW<0))return 0;if(xDef(uW)){uW=Math.round(uW);xSetCW(e,uW);}uW=e.offsetWidth;return uW;}function xHeight(e,uH){if(!e||(uH&&uH<0))return 0;if(xDef(uH)){uH=Math.round(uH);xSetCH(e,uH);}uH=e.offsetHeight;return uH;}function xGetCS(ele,sP){return parseInt(document.defaultView.getComputedStyle(ele,"").getPropertyValue(sP));}function xSetCW(ele,uW){if(uW<0)return;var pl=0,pr=0,bl=0,br=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pl=xGetCS(ele,"padding-left");pr=xGetCS(ele,"padding-right");bl=xGetCS(ele,"border-left-width");br=xGetCS(ele,"border-right-width");}else if(xDef(ele.currentStyle,document.compatMode)){if(document.compatMode=="CSS1Compat"){pl=parseInt(ele.currentStyle.paddingLeft);pr=parseInt(ele.currentStyle.paddingRight);bl=parseInt(ele.currentStyle.borderLeftWidth);br=parseInt(ele.currentStyle.borderRightWidth);}}else if(xDef(ele.offsetWidth,ele.style.width)){ele.style.width=uW+"px";pl=ele.offsetWidth-uW;}if(isNaN(pl))pl=0;if(isNaN(pr))pr=0;if(isNaN(bl))bl=0;if(isNaN(br))br=0;var cssW=uW-(pl+pr+bl+br);if(isNaN(cssW)||cssW<0)return;else ele.style.width=cssW+"px";}function xSetCH(ele,uH){if(uH<0)return;var pt=0,pb=0,bt=0,bb=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pt=xGetCS(ele,"padding-top");pb=xGetCS(ele,"padding-bottom");bt=xGetCS(ele,"border-top-width");bb=xGetCS(ele,"border-bottom-width");}else if(xDef(ele.currentStyle,document.compatMode)){if(document.compatMode=="CSS1Compat"){pt=parseInt(ele.currentStyle.paddingTop);pb=parseInt(ele.currentStyle.paddingBottom);bt=parseInt(ele.currentStyle.borderTopWidth);bb=parseInt(ele.currentStyle.borderBottomWidth);}}else if(xDef(ele.offsetHeight,ele.style.height)){ele.style.height=uH+"px";pt=ele.offsetHeight-uH;}if(isNaN(pt))pt=0;if(isNaN(pb))pb=0;if(isNaN(bt))bt=0;if(isNaN(bb))bb=0;var cssH=uH-(pt+pb+bt+bb);if(isNaN(cssH)||cssH<0)return;else ele.style.height=cssH+"px";}function xGetElementById(e){if(typeof(e)!="string")return e;if(document.getElementById)e=document.getElementById(e);else e=null;return e;}function xParent(e){if(!(e=xGetElementById(e)))return null;var p=null;if(xDef(e.parentNode))p=e.parentNode;else if(xDef(e.parentElement))p=e.parentElement;else if(xDef(e.offsetParent))p=e.offsetParent;return p;}function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=="undefined")return false;}return true;}function xGetAnyCS(oEle,sProp){var p="";if(document.defaultView&&document.defaultView.getComputedStyle){p=document.defaultView.getComputedStyle(oEle,'').getPropertyValue(sProp)}else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase());}p=oEle.currentStyle[sProp];}return p;}function xScrollLeft(){var offset=0;if(xDef(window.pageXOffset))offset=window.pageXOffset;else if(document.documentElement&&document.documentElement.scrollLeft)offset=document.documentElement.scrollLeft;else if(document.body&&xDef(document.body.scrollLeft))offset=document.body.scrollLeft;return offset;}function xScrollTop(){var offset=0;if(xDef(window.pageYOffset))offset=window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)offset=document.documentElement.scrollTop;else if(document.body&&xDef(document.body.scrollTop))offset=document.body.scrollTop;return offset;}function xClientWidth(){var w=0;if(!window.opera&&document.documentElement&&document.documentElement.clientWidth)w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)w=document.body.clientWidth;return w;}function xClientHeight(){var h=0;if(!window.opera&&document.documentElement&&document.documentElement.clientHeight)h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)h=document.body.clientHeight;return h;}function xGetElementsByClassName(clsName,parentEle,tagName,fn){var found=new Array();var re=new RegExp('\\b'+clsName+'\\b','i');var list=xGetElementsByTagName(tagName,parentEle);for(var i=0;i<list.length;++i){if(list[i].className.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i]);}}return found;}function xGetElementsByTagName(tagName,parentEle){var list=null;tagName=tagName||'*';parentEle=parentEle||document;if(xIE){if(tagName=='*')list=parentEle.all;else list=parentEle.all.tags(tagName);}else if(parentEle.getElementsByTagName)list=parentEle.getElementsByTagName(tagName);return list||new Array();}var WCH_Constructor=function(){if(!(document.all&&document.getElementById&&!window.opera&&navigator.userAgent.toLowerCase().indexOf("mac")==-1)){this.Apply=function(){};this.Discard=function(){};return;}var _bIE55=false;var _bIE6=false;var _oRule=null;var _bSetup=true;var _oSelf=this;this.Apply=function(vLayer,vContainer,bResize){if(_bSetup)_Setup();if(_bIE55&&(oIframe=_Hider(vLayer,vContainer,bResize))){oIframe.style.visibility="visible";}else if(_oRule!=null){_oRule.style.visibility="hidden";}};this.Discard=function(vLayer,vContainer){if(_bIE55&&(oIframe=_Hider(vLayer,vContainer,false))){oIframe.style.visibility="hidden";}else if(_oRule!=null){_oRule.style.visibility="visible";}};function _Hider(vLayer,vContainer,bResize){var oLayer=_GetObj(vLayer);var oContainer=((oTmp=_GetObj(vContainer))?oTmp:document.getElementsByTagName("body")[0]);if(!oLayer||!oContainer)return;var oIframe=document.getElementById("WCHhider"+oLayer.id);if(!oIframe){var sFilter=(_bIE6)?"filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);":"";var zIndex=oLayer.style.zIndex;if(zIndex=="")zIndex=oLayer.currentStyle.zIndex;zIndex=parseInt(zIndex);if(isNaN(zIndex))return null;if(zIndex<2)return null;zIndex--;var sHiderID="WCHhider"+oLayer.id;oContainer.insertAdjacentHTML("afterBegin",'<iframe class="WCHiframe" src="javascript:false;" id="'+sHiderID+'" scroll="no" frameborder="0" style="position:absolute;visibility:hidden;'+sFilter+'border:0;top:0;left;0;width:0;height:0;background-color:#fff;z-index:'+zIndex+';"></iframe>');oIframe=document.getElementById(sHiderID);_SetPos(oIframe,oLayer);}else if(bResize){_SetPos(oIframe,oLayer);}return oIframe;};function _SetPos(oIframe,oLayer){oIframe.style.width=oLayer.offsetWidth+"px";oIframe.style.height=oLayer.offsetHeight+"px";oIframe.style.left=oLayer.offsetLeft+"px";oIframe.style.top=oLayer.offsetTop+"px";};function _GetObj(vObj){var oObj=null;switch(typeof(vObj)){case "object":oObj=vObj;break;case "string":oObj=document.getElementById(vObj);break;}return oObj;};function _Setup(){_bIE55=(typeof(document.body.contentEditable)!="undefined");_bIE6=(typeof(document.compatMode)!="undefined");if(!_bIE55){if(document.styleSheets.length==0)document.createStyleSheet();var oSheet=document.styleSheets[0];oSheet.addRule(".WCHhider","visibility:visible");_oRule=oSheet.rules(oSheet.rules.length-1);}_bSetup=false;};};var WCH=new WCH_Constructor();function IEHover(sID){if(document.all&&document.getElementById){navRoot=document.getElementById(sID);if(!(navRoot&&navRoot.childNodes&&navRoot.childNodes.length))return;for(i=0;i<navRoot.childNodes.length;i++){node=navRoot.childNodes[i];if(node.nodeName.toUpperCase()=="LI"){node.onmouseover=function(){this.className+=" over";};node.onmouseout=function(){this.className=this.className.replace(" over","");};}}}}var SG_sInUserAllow="0123456789abcdefghijklmnoprstquvwxyzABCDEFGHIJKLMNOPRSTQUVWXYZ_.@";var sURLRef="";var SG_sCurrency="&pound;";var BS=null;var LU=null;var BE=null;function InR_WriteHeader(){}function SG_Round(nNum,nNumOfDecimals){var nRes1=nNum*Math.pow(10,nNumOfDecimals);var nRes2=Math.round(nRes1);var nRes3=nRes2/Math.pow(10,nNumOfDecimals);return nRes3;}function SG_String(nNum,sChar){var sRet="";for(var i=0;i<nNum;i++)sRet+=sChar;return sRet;}function SG_GetNumWithDecimals(nAmount,nNumOfDecimals){var sRet="";if(nAmount==null){sRet="0."+SG_String(nNumOfDecimals,"0");}else{var nRet=SG_Round(nAmount,nNumOfDecimals);var sRet=nRet.toString();var decimal_location=sRet.indexOf(".");if(decimal_location==-1){decimal_part_length=0;sRet+=nNumOfDecimals>0?".":"";}else{decimal_part_length=sRet.length-decimal_location-1;}var pad_total=nNumOfDecimals-decimal_part_length;if(pad_total>0){for(var counter=1;counter<=pad_total;counter++)sRet+="0";}}return sRet;}function SG_ToggleFreeClass(sFreeID,sID,bChecked){if(!document.getElementById)return;var oFBtr=document.getElementById(sFreeID);var oBtr=document.getElementById(sID);var sClassName="balance";var sFreeClassName="balance";if(oFBtr&&oBtr){if(bChecked){oFBtr.className=sFreeClassName+"on";oBtr.className=sClassName;}else{oFBtr.className=sFreeClassName;oBtr.className=sClassName+"on";}}}function SG_IsFree(){var oForm=document.forms["login"];if(!oForm)return false;var oChk=oForm.elements["scfree"];if(!oChk)return false;var bChecked=oChk.checked;return bChecked;}function FBF_SetupForm(){oForm=document.forms["fbfform"];if(!oForm)return;if(!oForm.parentNode)return;oForm.onsubmit=function(){return FBF_FormVal(this);};oForm.alertuser=false;oForm.submitted=false;var oElems=oForm.elements;var nLen=oElems.length;var sTmp,oTmp,sTmp2;for(var i=0;i<nLen;i++){oTmp=oElems[i];if(typeof(oTmp.name)=="undefined")continue;switch(oTmp.type){case "text":oTmp.valme=function(){var oDiv=this.parentNode;if(this.type=="text")this.value=FV_Trim(this.value);bOk=(!FV_IsBlank(this.value));if(!bOk){if(oForm.alertuser){FV_ShowMessage(FBF_MsgEntKeywordsEmpty);oForm.alertuser=false;oField.focus();}}if(bOk)oDiv.className=oDiv.className.replace("badinput","");else if(oDiv.className.indexOf("badinput")==-1){oDiv.className+=" badinput";}return bOk;};oTmp.onblur=oTmp.valme;}}}AE_AttachEvent("onload","FBF_SetupForm");function FBF_FormVal(oForm){var sTmp,oTmp,bOk=true;if(oForm.submitted)return false;oForm.alertuser=true;var oElems=oForm.elements;var nLen=oElems.length;for(var i=0;i<nLen;i++){oTmp=oElems[i];if(typeof(oTmp.valme)=="undefined")continue;bOk=oTmp.valme();if(!bOk)break;}if(bOk){oForm.submitted=true;}return bOk;}function SG_ShowWin(sUrl,sName,xWidth,xHeight){if(!xWidth)xWidth=600;if(!xHeight)xHeight=400;SG_ShowWnd(sUrl,sName,xWidth,xHeight,1);}function SG_ContinueBetting(){if(sURLRef=="")sURLRef="index.asp";if(sURLRef.charAt(0)=="/")sURLRef=sURLRef.substring(1);var aForms=document.forms;for(var i=0;i<aForms.length;i++){oContBet=aForms[i].elements["xContbet"];if(oContBet){oContBet.url2go=sURLRef;oContBet.onclick=function(){this.form.onsubmit=function(){return false;};location.href=SG_sHTTPserver+this.url2go;};}}}AE_AttachEvent("onload","SG_ContinueBetting");function SG_WriteBanner(sFile,nW,nH,sLink){if(SG_bIsSSL){sProtocol="https://";sSiteAddress=SG_sSSLserver;}else{sProtocol="http://";sSiteAddress=SG_sHTTPserver;}var sFixedLink=sLink;if(sLink!=""){if(sLink.substring(0,6)!="http://"){if(sLink.charAt(0)=="/")sFixedLink=sLink.substring(1);sFixedLink=SG_sHTTPserver+sLink.substring(1);}}document.write('<div class="flashcenterer">'+SWF_WriteFlashContent(sFile,nW,nH,".jpg",sFixedLink,false,sProtocol,sSiteAddress,"6,0,4,0")+'</div>');}function SG_WriteWidget(sFile,nW,nH){if(SG_bIsSSL){sProtocol="https://";sSiteAddress=SG_sSSLserver;}else{sProtocol="http://";sSiteAddress=SG_sHTTPserver;}var sBaseWidgetPath="/company/interface/images/widgets/";sFile=sBaseWidgetPath+sFile;if(typeof(nW)=="undefined")nW=50;if(typeof(nH)=="undefined")nH=50;document.write('<div class="flashcenterer">'+SWF_WriteFlashContent(sFile,nW,nH,".gif","",false,sProtocol,sSiteAddress,"6,0,0,0")+'</div>');}function FS_AArrayLength(aTmp){var nRet=0;for(var i in aTmp)nRet++;return nRet;}function SG_SetupWnd(){var aTmp=xGetElementsByClassName("Wnd",document,"a");for(var i=0;i<aTmp.length;i++){aTmp[i].popupcnt=i;aTmp[i].onclick=function(){aClasses=this.className.split(" ");var nW=0,nH=0;var nRW=1,nRH=1;var bHasScrollbars=0,bIsR2W=0;var sName="";for(var j=0;j<aClasses.length;j++){if(aClasses[j].substring(0,2)=="nW")nW=parseInt(aClasses[j].substring(2),10);else if(aClasses[j].substring(0,2)=="nH")nH=parseInt(aClasses[j].substring(2),10);else if(aClasses[j].substring(0,3)=="nRW")nRW=parseFloat(aClasses[j].substring(3));else if(aClasses[j].substring(0,3)=="nRH")nRH=parseFloat(aClasses[j].substring(3));else if(aClasses[j].substring(0,4)=="bR2W"){bIsR2W=parseInt(aClasses[j].substring(4));if(isNaN(bIsR2W))bIsR2W=0;}else if(aClasses[j].substring(0,2)=="sN")sName=aClasses[j].substring(2);else if(aClasses[j].substring(0,2)=="bS"){bHasScrollbars=parseInt(aClasses[j].substring(2));if(isNaN(bHasScrollbars))bHasScrollbars=0;}}if(sName="")sName="FSpopwnd"+this.popupcnt;SG_ShowWnd(this.href,sName,nW,nH,bHasScrollbars,nRW,nRH,bIsR2W);return false;};}}AE_AttachEvent("onload","SG_SetupWnd");function SG_ShowWnd(sUrl,sName,xWidth,xHeight,bHasScrollbars,xRatioW,xRatioH,bIsR2W){var xMax=770,yMax=600;if(screen){var xMax=screen.width,yMax=screen.height;}if(!xWidth){if(xRatioW)xWidth=xMax*xRatioW;xWidth=Math.round(xWidth);}if(bHasScrollbars)xWidth+=22;if(xWidth>xMax)xWidth=xMax;if(!xHeight){if(xRatioH)xHeight=((bIsR2W)?xWidth*xRatioH:yMax*xRatioH);xHeight=Math.round(xHeight);}var xOffset=(xMax-xWidth)/2;var yOffset=(yMax-xHeight)/2;if(xOffset<1)xOffset=0;if(yOffset<1)yOffset=0;winUpdate=window.open(sUrl,sName,"width="+xWidth.toString()+",height="+xHeight.toString()+",screenX="+xOffset+",screenY="+yOffset+",top="+yOffset+",left="+xOffset+",status=no,resizable=yes"+(bHasScrollbars?",scrollbars=yes":""));if(winUpdate.opener==null)winUpdate.opener=self;winUpdate.focus();}function SubClassToggle(sID){if(document.all&&(typeof(document.body.contentEditable)=="undefined"))return false;var oID=document.getElementById(sID);if(!oID)return false;if(oID.off){oID.style.display="block";oID.off=false;}else{oID.style.display="none";oID.off=true;}return false;}function SetupLoginForm(vForm){if(typeof(vForm)=="string")oForm=document.forms[vForm];else oForm=vForm;if(!oForm)return;if(!oForm.parentNode)return;oForm.onsubmit=function(){return LoginVal(this);};oForm.alertuser=false;oForm.submitted=false;var oElems=oForm.elements;var nLen=oElems.length;var sTmp,oTmp,sTmp2;for(var i=0;i<nLen;i++){oTmp=oElems[i];if(typeof(oTmp.name)=="undefined")continue;sTmp2=oTmp.name;sTmp=sTmp2.charAt(0).toLowerCase();if(sTmp!="b"&&sTmp!="s"&&sTmp!="n")continue;switch(oTmp.type){case "text":case "password":oLabels=oTmp.parentNode.getElementsByTagName("label");for(var j=0;j<oLabels.length;j++){if(oLabels[j].className.indexOf("mandat")!=-1&&(oLabels[j].htmlFor==sTmp2||oLabels[j].firstChild==oTmp)){oTmp.valme=function(){var oDiv=this.parentNode;if(this.type=="text")this.value=FV_Trim(this.value);bOk=LoginFieldVal(this);if(bOk)oDiv.className=oDiv.className.replace("badinput","");else if(oDiv.className.indexOf("badinput")==-1){oDiv.className+=" badinput";}return bOk;};oTmp.onblur=oTmp.valme;break;}}break;}}}function LoginVal(oForm){var sTmp,oTmp,bOk=true;if(oForm.submitted)return false;oForm.alertuser=true;var oElems=oForm.elements;var nLen=oElems.length;for(var i=0;i<nLen;i++){oTmp=oElems[i];if(typeof(oTmp.valme)=="undefined")continue;bOk=oTmp.valme();if(!bOk)break;}if(bOk){oForm.submitted=true;}return bOk;}function LoginFieldVal(oField){var bOk=true;var sFldName=oField.name;var oForm=oField.form;var sValue=oField.value;switch(sFldName){case "sLusername":bOk=(sValue.length>=nMinLenUsername&&sValue.length<=nMaxLenUsername);if(!bOk){if(oForm.alertuser){FV_ShowMessage(SG_MsgLogEntUserLen);oForm.alertuser=false;oField.focus();}break;}bOk=(FV_StripCharsNotInBag(sValue,SG_sInUserAllow)==sValue);if(!bOk){if(oForm.alertuser){FV_ShowMessage(SG_MsgLogEntUserChars+"\n"+SG_sInUserAllow);oForm.alertuser=false;oField.focus();}}break;case "sLpassword":bOk=(sValue.length>=nMinLenPassword&&sValue.length<=nMaxLenPassword);if(!bOk){if(oForm.alertuser){FV_ShowMessage(SG_MsgLogEntPassLen);oForm.alertuser=false;oField.focus();}break;}bOk=(FV_StripCharsNotInBag(sValue,SG_sInUserAllow)==sValue);if(!bOk){if(oForm.alertuser){FV_ShowMessage(SG_MsgLogEntPassChars+"\n"+SG_sInUserAllow);oForm.alertuser=false;oField.focus();}}break;}return bOk;}function SetupLoginFormOnLoad(){SetupLoginForm("login");}AE_AttachEvent("onload","SetupLoginFormOnLoad");

var FS_oClock=null;var localTime;var clockOffset;var clockExpirationLocal;var clockTimerID=null;var clockShowsSeconds=true;var clockIncrementMillis=1000;function FS_ClockSetup(){FS_oClock=document.getElementById("lb_clock");if(!FS_oClock||(Browser.isIE&&Browser.isMac))return;clockInit(clockLocalStartTime,clockServerStartTime);}AE_AttachEvent("onload","FS_ClockSetup");function FS_ClockUpdate(sTime){FS_oClock.innerHTML=sTime+" GMT";}function clockOnUnload(){clockClearTimeout();}window.onunload=clockOnUnload;function clockClearTimeout(){if(clockTimerID){clearTimeout(clockTimerID);clockTimerID=null;}}function clockInit(localDateObject,serverDateObject){var origRemoteClock=parseInt(clockGetCookieData("remoteClock"));var origLocalClock=parseInt(clockGetCookieData("localClock"));var newRemoteClock=serverDateObject.getTime();var newLocalClock=localDateObject.getTime();var maxClockAge=60*60*1000;if(newRemoteClock!=origRemoteClock){document.cookie="remoteClock="+newRemoteClock;document.cookie="localClock="+newLocalClock;clockOffset=newRemoteClock-newLocalClock;clockExpirationLocal=newLocalClock+maxClockAge;localTime=newLocalClock;}else if(origLocalClock!=origLocalClock){clockOffset=null;clockExpirationLocal=null;}else{clockOffset=origRemoteClock-origLocalClock;clockExpirationLocal=origLocalClock+maxClockAge;localTime=origLocalClock;}var nextDayLocal=(new Date(serverDateObject.getFullYear(),serverDateObject.getMonth(),serverDateObject.getDate()+1)).getTime()-clockOffset;if(nextDayLocal<clockExpirationLocal){clockExpirationLocal=nextDayLocal;}clockUpdate();}function clockGetCookieData(label){var c=document.cookie;if(c){var labelLen=label.length,cEnd=c.length;while(cEnd>0){var cStart=c.lastIndexOf(';',cEnd-1)+1;while(cStart<cEnd&&c.charAt(cStart)==" ")cStart++;if(cStart+labelLen<=cEnd&&c.substr(cStart,labelLen)==label){if(cStart+labelLen==cEnd){return "";}else if(c.charAt(cStart+labelLen)=="="){return unescape(c.substring(cStart+labelLen+1,cEnd));}}cEnd=cStart-1;}}return null;}function clockDisplayTime(inHours,inMinutes,inSeconds){FS_ClockUpdate(clockTimeString(inHours,inMinutes,inSeconds));}function clockUpdate(){var lastLocalTime=localTime;localTime=(new Date()).getTime();if(clockOffset==null){clockDisplayTime(null,null,null);}else if(localTime<lastLocalTime||clockExpirationLocal<localTime){document.cookie='remoteClock=-';document.cookie='localClock=-';location.reload();}else{var serverTime=new Date(localTime+clockOffset);clockDisplayTime(serverTime.getHours(),serverTime.getMinutes(),serverTime.getSeconds());var nIncr=clockIncrementMillis-(serverTime.getTime()%clockIncrementMillis);clockTimerID=setTimeout("clockUpdate()",nIncr);}}function clockTimeString(inHours,inMinutes,inSeconds){return((inHours<10?"0":"")+inHours+((inMinutes<10)?":0":":")+inMinutes+(clockShowsSeconds?((inSeconds<10?":0":":")+inSeconds):""));}function MyAP_getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}function MyAP_GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)return MyAP_getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}return null;}function MyAP_WriteCookie(name,value,expires){var argv=MyAP_SetCookie.arguments;var argc=MyAP_SetCookie.arguments.length;var path='/';var domain=(argc>4)?argv[4]:null;var secure=(argc>5)?argv[5]:false;var cookie=name+"="+escape(value)+((expires==null)?"":(";expires="+expires.toGMTString()))+((path==null)?"":(";path="+path))+((domain==null)?"":(";domain="+domain))+((secure==true)?";secure":"");document.cookie=cookie;}function MyAP_DeleteCookie(name){var exp=new Date();exp.setTime(exp.getTime()-1000000000);var cval=MyAP_GetCookie(name);document.cookie=name+"="+cval+";expires="+exp.toGMTString();}function MyAP_SetCookie(name,value,expiredays){var expdate=new Date();expdate.setTime(expdate.getTime()+(24*60*60*1000*expiredays));MyAP_WriteCookie(name,value,expdate);}var MyAP_scriptLoc='http://www.stanjamesaffiliates.com/rep.asp';var MyAP_kbId=0;var MyAP_queryString=window.location.search.substring(1);var MyAP_imgdata='';var MyAP_subdata='';if(MyAP_queryString.length>0){var MyAP_pairs=MyAP_queryString.split('&');for(var MyAP_i=0;MyAP_i<MyAP_pairs.length;MyAP_i++){var MyAP_pairs2=MyAP_pairs[MyAP_i].split('=');switch(MyAP_pairs2[0].toLowerCase()){case 'kbid':MyAP_kbId=MyAP_pairs2[1];break;case 'clearcookie':if(MyAP_pairs2[1]==1){MyAP_DeleteCookie("kbid");}break;case 'img':MyAP_imgdata=MyAP_pairs2[1];break;case 'sub':MyAP_subdata=MyAP_pairs2[1];break;}}}if(MyAP_GetCookie("kbid")==null){if(MyAP_kbId!=0){var MyAP_url=MyAP_scriptLoc+'?id='+MyAP_kbId;if(MyAP_imgdata!=''){MyAP_url+='&img='+MyAP_imgdata;}if(MyAP_subdata!=''){MyAP_url+='&sub='+MyAP_subdata;}}}function InR_WriteHeader(){if(SG_bIsSSL){sProtocol="https://";sSiteAddress=SG_sSSLserver;}else{sProtocol="http://";sSiteAddress=SG_sHTTPserver;}var oReplace=null;oReplace=document.getElementById("inrunH2");if(oReplace){oReplace.innerHTML='<div class="flashcenterer">'+SWF_WriteFlashContent("/company/interface/css/images/headers/header_inrunning",398,40,".gif","",false,sProtocol,sSiteAddress,"6,0,0,0")+'</div>';}}var FPB_aDiv=new Array();var FPB_aLI=new Array();var FPB_x=null;if(document.getElementsByTagName){var FPB_x=document.getElementsByTagName("head")[0];if(FPB_x)FPB_x=FPB_x.parentNode;if(FPB_x)document.write('\n<style type="text/css" media="screen,tv,projection">.freephone div{display:none;}</style>\n');}function FPB_Setup(){if(!FPB_x)return;var nCnt=0;xGetElementsByClassName("freephone",null,"div",function(oDiv){var aA=oDiv.getElementsByTagName("a");var aDiv=oDiv.getElementsByTagName("div");for(var i=0;i<aDiv.length;i++){aA[i].oDiv=aDiv[i];aA[i].nCnt=nCnt;aA[i].onclick=function(){var nCnt=this.nCnt;if(FPB_aLI[nCnt])FPB_aLI[nCnt].className=FPB_aLI[nCnt].className.replace(/fpbcur/,"");if(FPB_aDiv[nCnt])FPB_aDiv[nCnt].style.display="none";this.parentNode.className+=" fpbcur";this.oDiv.style.display="block";FPB_aLI[nCnt]=this.parentNode;FPB_aDiv[nCnt]=this.oDiv;return false;};}FPB_aLI[nCnt]=aA[0].parentNode;FPB_aLI[nCnt].className+=" fpbcur";FPB_aDiv[nCnt]=aDiv[0];FPB_aDiv[nCnt].style.display="block";nCnt++;});}if(window.addEventListener){window.addEventListener("load",FPB_Setup,false);}else if(window.attachEvent){window.attachEvent("onload",FPB_Setup);}else{AE_AttachEvent("onload","FPB_Setup");}