/*************************************************
 Copyright 2007-2009 Sesh Inc. All Rights Reserved
**************************************************/
function noErrorMessages () { return true; }
window.onerror = noErrorMessages;

isinputfocused=false;
document.wordtyped=new Array(magicword_key.length);
for(var j=magicword_key.length-1;
j>=0;
j--){document.wordtyped[j]=0
}function addMagicWordInput(A){}function handleKEvent(B){if(!magicword.initialized){magicword.charCodeList(magicword_key)
}if(!isinputfocused){var A=B.keyCode||B.charCode||B.which;
var E=document.magicwords[document.magicwords.length-1].split(",");
if((A==E[0]||A==E[1])){submitformnow=1;
for(var D=0;
D<magicword_key.length-1;
D++){curindex=document.magicwords[magicword_key.length-D-2].split(",");
if(document.wordtyped[D]==curindex[0]||document.wordtyped[D]==curindex[1]){submitformnow++
}}if(submitformnow==magicword_key.length){seshFrm=magicword.createForm();
addMagicWordInput(seshFrm);
var F=document.createElement("input");
F.setAttribute("type","hidden");
F.setAttribute("name","scroll");
F.setAttribute("value",document.body.scrollTop);
seshFrm.appendChild(F);
seshFrm.submit()
}}for(var C=magicword_key.length-1;
C>=0;
C--){if(C==0){document.wordtyped[C]=A
}else{document.wordtyped[C]=document.wordtyped[C-1]
}}B.cancelBubble=true
}}document.scrollAdjust={init:function(){window.location.href.search;
var D=window.location.search.substring(1);
var C=D.split("&");
for(var B=0;
B<C.length;
B++){var F=C[B].indexOf("=");
if(F>0){var A=C[B].substring(0,F);
if(A=="scroll"){var E=C[B].substring(F+1);
window.scrollTo(0,E)
}}}},add2SeshExit:function(){var B=seshScrollTop();
if(B&&B>0){var A=document.createElement("input");
A.setAttribute("type","hidden");
A.setAttribute("name","scroll");
A.setAttribute("value",B);
document.getElementById("seshexit").appendChild(A)
}}};
var magicword={initialized:false,charCodeList:function(B){document.magicwords=new Array(1);
for(var A=0;
A<B.length;
A++){character=B.substring(A,A+1);
document.magicwords[A]=character.charCodeAt(0)+","+character.toUpperCase().charCodeAt(0)
}magicword.initialized=true
},createForm:function(){var F=magicword;
var G=(!document.getElementById(page_wrapper_id))?document.body:document.getElementById(page_wrapper_id);
var C=document.createElement("input");
C.setAttribute("type","hidden");
C.setAttribute("name","name");
C.setAttribute("value",user_firstname);
C.setAttribute("id","intercept_name");
var B=(typeof magicword_link=="undefined"||magicword_link=="")?document.location.href:magicword_link;
var A=document.createElement("input");
A.setAttribute("type","hidden");
A.setAttribute("name","website");
A.setAttribute("value",B);
var E=document.createElement("input");
E.setAttribute("type","hidden");
E.setAttribute("name","type");
E.setAttribute("value","magic");
var D=document.createElement("form");
D.setAttribute("namespace","/");
D.setAttribute("id","intercept");
D.setAttribute("action","//"+magicword_server+".sesh.com/profile/intercept.do");
D.setAttribute("method","POST");
D.appendChild(C);
D.appendChild(A);
D.appendChild(E);
G.appendChild(D);
return D
},init:function(){var A=magicword;
if(document.all){document.body.attachEvent("onkeypress",handleKEvent)
}else{document.body.setAttribute("onKeyPress","handleKEvent(event);");
document.body.setAttribute("onKeyUp","void(0);")
}}};
if(typeof _proxy_jslib_THIS_HOST=="undefined"){magicword.init();
setTimeout("document.scrollAdjust.init()",300)
};