var g_hipS,g_hipR,g_hipI,g_hipF,g_hipC,g_hipH;function HIPInit(d,a,b,c){g_hipS=a.src;g_hipR=d;g_hipI=a;g_hipF=b;g_hipH=c;g_hipC=0}function HIPSetAudSoln(b){if(b!=""){g_hipF.value=b;g_hipI.src=g_hipR}else{var a=GEId("iHIPHelp");if(a!=null)a.style.display="block"}g_hipF.focus()}function HIPNew(){var b=g_hipI.height,c=g_hipI.width;g_hipF.value="";g_hipI.src=g_hipS+"&c="+g_hipC;g_hipI.height=b;g_hipI.width=c;g_hipC++;g_hipF.focus();var a=GEId("iHIPHelp");if(a!=null)a.style.display="block"}function HIPHelp(a){g_hipI.src=g_hipR;g_hipF.value="";OpenWindow(a,"PPHIPHelp","width=520,height=505,resizable");window.setTimeout("HIPHelpCheck()",1e3)}function HIPHelpCheck(){if((!WinObj||typeof WinObj.closed=="unknown"||WinObj.closed)&&g_hipF.value=="")HIPNew();else window.setTimeout("HIPHelpCheck()",50)}function HIPCopyCookie(){if(g_hipH!=null)g_hipH.value=GetCookieData("HIPChallenge")}var HIP={error:0,left:"200",showLabel:false,done:false,holder:"icdHIP",scriptHolder:"icdScript",count:0,fr:"hard",isAudio:false,cssSet:{cssCdHIPLabel:"csshLabel",cssCdHIPMenu:"csshMenu",cssCdHIPLink:"csshLink",cssCdHIPError:"csshError",cssCdHIPErrorImg:"csshErrorImg",cssCdHIPInput:"csshInput"},getSolution:function(){},getToken:function(){},clientValidation:function(){},setError:function(){},verify:function(){},postLoad:function(){var a=HIP.setError();SetFF("FocusField",a)}};function HIPClientCheck(){HIP.clientValidation();if(HIP.error!=0){var a=HIP.setError(HIP.error);SetFF("FocusField",a);return false}return true}function CollectSolutionAndChallenge(){var b=HIP.getSolution(),a=HIP.getToken(),c=HIP.isAudio?"audio":HIP.fr;return "Fr="+c+",Solution="+b+","+a}function hipverify_cb(a,c,b){var d=HIP.isAudio?"audio":HIP.fr,e=GEId("iHIPInput");e.value="Fr="+d+",Solution="+a+","+c;b.submit()}var g_fAS=false,k_sWLPerfCookieName="wlidperf",latImg=new Image;function SetFocus(d,e){var b=true;try{if(g_bFS==false&&typeof d=="object"){var c=false,f=b;if(e=="")c=b;for(i=0;i<d.length;i++){try{var a=d.elements[i]}catch(g){continue}if(a.name==e)c=b;if(a.type!="hidden"&&a.disabled!=b&&a.style.visibility!="hidden"&&c){a.focus();(a.type=="text"||a.type=="password")&&a.select();break}if(i==d.length-1&&f){i=-1;c=b;f=false}}}}catch(g){}}function IsParent(){if(top!=self)try{top.location.replace(self.location.href)}catch(a){}}function GEId(a){return document.getElementById(a)}function PadPasswd(c,d){if(typeof c.PwdPad=="object"){var b="IfYouAreReadingThisYouHaveTooMuchFreeTime",a=b.length-d;c.PwdPad.value=b.substr(0,a<0?0:a)}}function HDivs(b){for(var a=0;a<b.length;++a){var c=GEId(b[a]);if(c)c.style.display="none"}}function LTrim(a){for(var b=0;b<a.length&&a.charAt(b)<=" ";b++);return a.substring(b,a.length)}function RTrim(b){for(var a=b.length-1;a>=0&&b.charAt(a)<=" ";a--);return b.substring(0,a+1)}function Trim(a){return LTrim(RTrim(a))}function SwErr(c,b,e,d){var a=GEId(c);if(LTrim(a.innerHTML)=="")a.innerHTML=WL_ErrorBody?WL_ErrorBody(d,c):"";a.style.display=a.tagName=="TR"?"":"block";if(e){b.focus();b.select()}return false}function Val(a){if(a.type!="hidden"&&!a.value)return false;else return true}function HideErrorDivs(){var a=["i0518","i0519","i0512","i0527","i0545","i0562","i0517","i0510","i0609","i0610","i0525","i0617","i0563"];HDivs(a)}function OnSigninSubmit(a){var g="undefined",c=true,d="object",f=false;if(g_fAS)return f;if(typeof a!=d)return f;var h=c,e=c,k=c,j=c,l=c;bvH=f;h=Val(a.login);var i=a.login.value;h=ValEM(i);if(typeof a.passwd==d)e=Val(a.passwd);if(!e){if(typeof a.CS==d)e=a.CS.value!="";if(typeof a.FedState==d&&a.FedState.value>=1)e=c}if(typeof a.pin==d)k=Val(a.pin);if(typeof a.OTC==d)l=Val(a.OTC);else if(typeof a.HIPSolution==d){j=Val(a.HIPSolution);bvH=c}if(!h||!e||!k||!j||!l){var b=c;HideErrorDivs();if(!h){b=SwErr("i0519",a.login,b);if(typeof g_bTriedInvalidName!=g)g_bTriedInvalidName=1}if(!k)b=SwErr("i0527",a.pin,b);if(!e)b=SwErr("i0512",a.passwd,b);if(!j)b=SwErr("i0517",a.HIPSolution,b);if(!l)b=SwErr("i0617",a.OTC,b);return f}typeof g_RDScriptDL!=g&&SubmitPending(a);typeof a.passwd==d&&PadPasswd(a,a.passwd.value.length);if(typeof g_DO!=g){var o=i.substr(i.indexOf("@")+1),n=g_DO[o.toLowerCase()];if(n)a.action=n}if(typeof g_QS!=g)if(g_QS){var m="&";if(a.action.indexOf("?")==-1)m="?";if(a.action.indexOf(g_QS)==-1)a.action+=m+g_QS}g_fAS=c;a.login.value=a.login.value.toLowerCase();WriteWLPerfOnSubmit();if(bvH)HIP.verify(hipverify_cb,a);else a.submit();return f}function ValEM(d){var a=Trim(d),c=a.indexOf("@"),b=a.split("@");if(c==-1||a.charAt(0)>"~"||a.indexOf(".",c)==-1||a.indexOf(" ",0)!=-1||b.length>2)return false;else if(b[0].length>0&&b[1].length>0)return true;else return false}function ValPhone(a){var b;if(a=="")return false;for(i=0;i<a.length;i++){b=a.charAt(i);if(isNaN(b))return false}return true}function DoHelp(C,y,v,B,z,x,p){var j="_help",r="netscape",m=",left=",k=",height=",d=-1,e,f,c="toolbar=1,location=1,status=0,menubar=1,resizable=1,top=0,scrollbars=1,width=",i=screen.width,q=screen.height,a=navigator.userAgent.toLowerCase(),t=navigator.appName.toLowerCase(),u=navigator.appVersion,n=a.indexOf("mac")>d,s=a.indexOf("msie")>d&&parseInt(u.substring(0,1))>=4,b=null==p?"":p,o=document.location,h=z==""?"http://"+o.hostname+"/hp.srf?lc="+v+"&vv="+x:z+"?lc="+v+"&vv="+x,l=null!=p,g=false,w=a.indexOf("msn "),A=false;if(w>d){g=a.substring(w+4);g=parseFloat(g.substring(0,g.indexOf(";")));g=g!=NaN&&g>=6}A=a.indexOf("ppc mac os x")>d&&a.indexOf("msn explorer")>d;b+=y==""?"&SEARCHTERM="+escape(C):"&TOPIC="+y;b+="&v2="+escape(o.search)+"&tmt="+escape(window.name);b+="&v4="+escape(B);if(i<=800){b+="&sp=1";e=180}else e=230;if(n&&s)e=224;f=a.indexOf("windows")>0&&a.indexOf("aol")>0?screen.availHeight-window.screenTop-22:screen.availHeight;if(l){e=i>550?550:i;f=q>575?575:q}c+=e;if(l)c+=k+f+m+(i-e)/2+",top="+(q-f)/2;if(g)window.external.showHelpPane("http://"+o.hostname+h+b,e);else if(a.indexOf("webtv")>0||a.indexOf("msn companion")>0||a.indexOf("stb")>0)o=h+b;else if(t.indexOf(r)>d&&u.indexOf("4.")>d){if(!l)if(n)c+=k+(f-38)+m+(i-e-16);else c+=k+(f-30)+m+(i-e-12);h_win=window.open(h+b,j,c)}else if(a.indexOf("opera")>d){if(!l)c+=k+f+m+(i-e-(n?5:0));h_win=window.open(h+b,j,c)}else if(a.indexOf("aol")>d){if(!l)c+=k+(f-115);window.open(h+b,j,c)}else if(s||a.indexOf("netscape6")>d||a.indexOf("firefox")>d){if(!l)c+=k+f+m+(i-e);if(a.indexOf("msie 4")>0)window.open(h+b,j,c);else h_win=window.open(h+b,j,c);if(h_win&&!n&&t.indexOf(r)<0)h_win.opener=self}else window.open(h+b,j)}function GetCookieData(f){var d=f+"=",e=document.cookie.length,a=0;while(a<e){var c=a+d.length;if(document.cookie.substring(a,c)==d){var b=document.cookie.indexOf(";",c);if(b==-1)b=e;return unescape(document.cookie.substring(c,b))}a=document.cookie.indexOf(" ",a)+1;if(a==0)break}}var WinObj;function CloseWindow(){WinObj&&!WinObj.closed&&WinObj.close();return true}function OpenWindow(a,d,c){if(typeof CustomOpenWindow=="function")CustomOpenWindow(a,d,c);else{var b=false;if(!WinObj||WinObj.closed)b=true;else if(a==WinObj.location.href)WinObj.focus();else{CloseWindow();b=true}if(b){WinObj=window.open(a,d,c);if(!WinObj.opener)WinObj.opener=window}}}function GetEl(a){try{return document.getElementsByName(a)[0]}catch(b){}}function IsSafari(){var a=navigator.userAgent.toLowerCase();return -1<a.indexOf("safari")}function WriteCookie(e,d,c,b){var a=GetCookieDomain(b,false);WriteCookieToDomain(e,d,c,a)}function GetCookieDomain(c,d){var a="";if(c&&IsSafari())a+=".";if(d){var b=document.domain.split(".");b.splice(0,Math.max(0,b.length-2));a+=b.join(".")}else a+=document.domain;return a}function WriteCookieToDomain(e,b,c,d){var a=e+"="+b+";domain="+d+";path=/";if(c)a+=";expires=Wed, 30-Dec-2037 16:00:00 GMT";else if(b==" ")a+=";expires=Thu, 30-Oct-1980 16:00:00 GMT";document.cookie=a}function WriteWLPerfOnSubmit(){var a=true;function d(){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var a=c[b];while(a.charAt(0)==" ")a=a.substring(1,a.length);if(a.indexOf(k_sWLPerfCookieName)==0)return a.substring(k_sWLPerfCookieName.length+1,a.length)}return ""}function c(){this.toString=function(){var a=[];for(var b in this)b!="toString"&&a.push(b+"="+this[b],"&");a.length>0&&a.pop();return a.join("")};for(var e=d(),c=e.split("&"),a=0;a<c.length;a++){var b=c[a].split("=");this[b[0]]=b[1]}}var b=new c;b["FR"]="L";b["ST"]=(new Date).getTime();var e=GetCookieDomain(a,a);WriteCookieToDomain(k_sWLPerfCookieName,b.toString(),a,e);return a}function WriteWLPerf(){try{var c=2968,a=new Date-this.dtStart,b="throughput="+Math.round(c/a)+"&latency="+a,d=GetCookieDomain(true,true);WriteCookieToDomain(k_sWLPerfCookieName,b,true,d)}catch(e){}}function DownloadTPImg(){latImg=new Image;latImg.onload=WriteWLPerf;latImg.dtStart=new Date;latImg.src="images/LiveID16nc.gif?"+(new Date).getTime()}var k_sCookieDelim="; ",k_sWLOptCookieName="WLOpt",k_sWLOptCookieDelim="&",k_sWLOpt_NoRememberMe="nrme",k_sWLOpt_SkipUsername="skip",k_sWLOpt_ShowUpgrade="shup",k_sWLOpt_AlwaysSSL="ssl",k_sWLOpt_CredType="credtype",k_sWLOpt_ICRedir="InfoCardRedirUser",k_sWLOpt_OTCRedir="OTCRedir",k_sWLOpt_ACT="act",k_sWLOpt_RDCache="RDCache";function ReadCookie(a){return ExtractToken(document.cookie,a,k_sCookieDelim)}function GetWLLoginOption(c){var b=null,a=ReadCookie(k_sWLOptCookieName);if(null!=a)b=ExtractToken(a,c,k_sWLOptCookieDelim);return b}function SetWLLoginOption(b,c){var a=ReadCookie(k_sWLOptCookieName);if(null==a)a=b+"="+c;else{var d=GetWLLoginOption(b);if(d==c)return;if(null!=d)a=a.replace(b+"="+d,b+"="+c);else a+=k_sWLOptCookieDelim+b+"="+c}WriteCookie(k_sWLOptCookieName,a,true)}function UnsetWLLoginOption(b){var a=ReadCookie(k_sWLOptCookieName);if(null==a)return;var c=GetWLLoginOption(b);if(null==c)return;a=a.replace(k_sWLOptCookieDelim+b+"="+c,"");a=a.replace(b+"="+c+k_sWLOptCookieDelim,"");a=a.replace(b+"="+c,"");if(0==a.length)a=" ";WriteCookie(k_sWLOptCookieName,a," "!=a?true:false)}function ExtractToken(b,c,e,d){var g=null;if(!d)d="=";var a=b.indexOf(c+d);if(0==a)a+=c.length+1;else if(0<a){a=b.indexOf(e+c+d);if(0<a)a+=e.length+c.length+1}if(-1!=a){var f=b.indexOf(e,a);if(-1==f)f=b.length;g=b.substring(a,f)}return g}function AppendQS(a,c){var b="&";if(a.indexOf("?")==-1)b="?";return a+b+c}function RedirectToFedURL(b,d){var c=g_sFedURL;if(b)c=b;var a=document.f1.LoginOptions;if(d||document.f1.remMe&&document.f1.remMe.checked||a.checked==true||a[1]&&a[1].checked||a[0]&&a[0].checked)g_sFedQS=g_sFedQS.replace(/wctx=/i,"wctx=LoginOptions%3D2%26");else g_sFedQS=g_sFedQS.replace(/wctx=/i,"wctx=LoginOptions%3D3%26");document.location=AppendQS(c,g_sFedQS);return false}function AsyncScriptDL(c,b){if(document.createElement&&g_fAsyncDLEnabled&&c&&b)try{if(!GEId(b)){var a=document.createElement("script");a.setAttribute("language","javascript");a.setAttribute("type","text/javascript");a.setAttribute("id",b);a.setAttribute("src",c);document.getElementsByTagName("head")[0].appendChild(a)}}catch(d){}}function SetFF(b,c){var a=GetEl(b);if(a==null||a.value!="")return;a.value=c}function SetF(){g_bFS=true}function SetCursorAfterValue(){event.srcElement.value=event.srcElement.value}function CleanPhoneNum(b){var a=b.value;a=a.replace(/\)/,"");a=a.replace(/\(/,"");a=a.replace(/\ /,"");a=a.replace(/\./,"");a=a.replace(/\-/,"");a=a.replace(/\,/,"");b.value=a}function DoCSH(a){typeof CSH=="function"&&CSH(a)}function OnSubmit(a){DoCSH(a)}function SubmitForm(a){if(g_fAS)return false;OnSubmit(a);g_fAS=true;if(typeof a.HIPSolution=="object"&&Val(a.HIPSolution))HIP.verify(hipverify_cb,a);else a.submit();return false}function DoSubmit(a,b){if(a[b]!="undefined")a[b].value="TRUE";SubmitForm(a)}function OnSubmitEventHandler(a){a["Dirty"].value="TRUE";DoCSH(a)}function OnBackEventHandler(a,b){a.action=b;DoSubmit(a,"Back")}function OnSubmitWithAction(a,b){a.action=b;a.submit();return false}function OpenWindowEx(b,c,a){if(typeof CustomOpenWindow=="function")CustomOpenWindow(b,c,a);else window.open(b,"_blank",a)}function GoA(c){var a=document.location.href,b=a;if(a.indexOf("#")>-1)b=a.substring(0,a.indexOf("#"));document.location.href=b+c}function ClearAllFields(a){var b;for(i=0;i<a.length;i++){b=""+a.elements[i].type;if(b=="text"||b=="password"||b=="textarea")a.elements[i].value="";if(b=="select-one")a.elements[i].selectedIndex=0;if(b=="radio")if(a.elements[i].value=="")a.elements[i].checked=true;else a.elements[i].checked=false;if(b=="checkbox")a.elements[i].checked=false}}function PostRegion(a,b,c){if(a[b]!="undefined")if(a[b].selectedIndex==0){a[c].value="TRUE";SubmitForm(a)}}function DoCookieTest(b,c,a){if(GetCookieData(b)!=c)document.location=a;return}function DrDw(e){var b=e.split("~"),c=b.length;if(b[c-1]=="")c--;var a=0,d="";while(a<c){if(b[a]=="SELECTED"){d=b[a+1];a++}document.write('<option id="'+b[a]+'" value="'+b[a]+'"'+(d==b[a]?" selected":"")+">"+b[a+1]);a=a+2}}function DrDw2(e,d){var b=e.split("~"),c=b.length;if(b[c-1]=="")c--;var a=0;while(a<c){document.write('<option value="'+b[a]+'"'+(d==b[a]?" selected":"")+">"+b[a+1]);a=a+2}}function AHidden(d,b,c){if(document.getElementById){var a=document.createElement("INPUT");if(document.all){a.type="HIDDEN";a.name=b;a.value=c}else if(document.getElementById){a.setAttribute("type","HIDDEN");a.setAttribute("name",b);a.setAttribute("value",c)}d.appendChild(a)}}function GetElCol(a){try{return document.getElementsByName(a)}catch(b){}}var h_win;function EvalPwdStrength(b,a){PadPasswd(b,a.length*2);if(ClientSideStrongPassword(a,gSimilarityMap,gDictionary))DispPwdStrength(3,"css0165");else if(ClientSideMediumPassword(a,gSimilarityMap,gDictionary))DispPwdStrength(2,"css0164");else if(ClientSideWeakPassword(a,gSimilarityMap,gDictionary))DispPwdStrength(1,"css0163");else DispPwdStrength(0,"css0162")}function SetPwdStrengthEx(b,a){EvalPwdStrength(b,a);if(ClientSideStrongPassword(a,gSimilarityMap,gDictionary))document.cookie="pwdstrength=3";else if(ClientSideMediumPassword(a,gSimilarityMap,gDictionary))document.cookie="pwdstrength=2";else if(ClientSideWeakPassword(a,gSimilarityMap,gDictionary))document.cookie="pwdstrength=1";else document.cookie="pwdstrength=0"}function SetPwdStrength(b,a){if(ClientSideStrongPassword(b,gSimilarityMap,gDictionary))a.value=3;else if(ClientSideMediumPassword(b,gSimilarityMap,gDictionary))a.value=2;else if(ClientSideWeakPassword(b,gSimilarityMap,gDictionary))a.value=1;else a.value=0}function XPWCont(){typeof parent.opener.RegistrationFinishedCallback!="undefined"&&parent.opener.RegistrationFinishedCallback();parent.close()}function OnPadSubmit(a){typeof a.CurrPW=="object"&&PadPasswd(a,a.CurrPW.value.length);a.submit();return false}function OnPadSubmitWithAction(a,c){var b=false;typeof a.CurrPW=="object"&&PadPasswd(a,a.CurrPW.value.length);if(typeof a.HIPSolution=="object"&&Val(a.HIPSolution)){a.action=c;HIP.verify(hipverify_cb,a)}else b=OnSubmitWithAction(a,c);return b}function ValHex(a){var c="0123456789ABCDEF",b=a.value;if(!Val(a))return false;for(i=0;i<b.length;i++)if(c.indexOf(b.charAt(i).toUpperCase())==-1)return false;return true}function ShowWDiv(e,f,d,c){var a=GEId(e),b=GEId(f).style;while(a.tagName!="BODY"){d+=a.offsetTop;c+=a.offsetLeft;a=a.offsetParent}b.top=d+"px";b.left=c+"px";b.display="block"}function AUp(b,d,c){if(typeof b=="object"){var a=b.value;if(a.length>0&&a.indexOf(c)==-1)b.value=a+d}}var g_bClearCache=false;function ClearSSLCache(){g_bClearCache=false;try{g_bClearCache=document.execCommand("ClearAuthenticationCache")}catch(a){}}function EndPPCRL(a,b){if(window.external)try{if(a)if(a&-2147483648){window.external.RequestStatus=a;window.external.WebFlowUrl=b;window.external.NotifyIdentityChanged();window.external.ReturnToApp()}else{window.external.RequestStatus=a;window.external.WebFlowUrl=b;window.external.NotifyIdentityChanged(true);window.external.BrowseToAuthUI()}else{window.external.Submit();window.external.BrowseToAuthUI()}}catch(c){}}function WebHancer(b,a,c){if(typeof b.sWH!="undefined"&&a.length!=0)b.sWH.value+="["+a+","+c+"]"}function ParseQS(f){var e=f.substr(f.indexOf("?")+1),d={};if(e)for(var c=e.split("&"),a=0;a<c.length;a++){var b=c[a].split("=");d[b[0]]=b[1]}return d}function GetQSVal(e,d){var a=ParseQS(e),c=null;for(var b in a)if(d==b)c=a[b];return c}function SetFF(b,c){var a=GetEl(b);if(a==null||a.value!="")return;a.value=c}function IsPPCRLEnv(){if(window.external)try{if(window.external.GUID=="bd3c0d89-e162-4de2-a1bf-942b86200f99")return true}catch(a){return false}else return false}var g_d=":";function PushError(a){var b="undefined",c=g_d+s_prop38+g_d,d=g_d+a+g_d;if(!a||typeof s_prop38==b||typeof s_prop48==b||c.indexOf(d)!=-1)return;s_prop38+=s_prop38.length>0?g_d+a:a;s_prop48=s_prop38}function SendReport(){typeof s_account!="undefined"&&s_gs(s_account.toLowerCase())}function ClearError(){var a="undefined";if(typeof s_prop38!=a)s_prop38="";if(typeof s_prop48!=a)s_prop48=""}function AppPN(a){return a&&a.length>0?a+g_d+s_pageName:""}function CheckEnhancedSecOption(){if(1==GetWLLoginOption(k_sWLOpt_AlwaysSSL)&&typeof g_urlLoginSSL!="undefined"&&g_urlLoginSSL!="")document.location=g_urlLoginSSL}function AttachHandlers(){if(srf_RDAJAX&&g_fAsyncDLEnabled)if(typeof g_RDScriptDL=="undefined")AsyncScriptDL(g_urlRDScript,"RDScript");else RDScriptLoaded()}var g_stderrpwd="",g_stderrlogin="",g_stdbtn="",g_sFedURL=""