
var emailPat=new RegExp(/^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$/);var urlPat=new RegExp(/^((http(s?))\:\/\/)?([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,6}(\:[0-9]+)?(\/\S*)?$/);var datePat=new RegExp(/^(?=\d)^(?:(?!(?:10\D(?:0?[5-9]|1[0-4])\D(?:1582))|(?:0?9\D(?:0?[3-9]|1[0-3])\D(?:1752)))((?:0?[13578]|1[02])|(?:0?[469]|11)(?!\/31)(?!-31)(?!\.31)|(?:0?2(?=.?(?:(?:29.(?!000[04]|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00))(?:(?:(?:\d\d)(?:[02468][048]|[13579][26])(?!\x20BC))|(?:00(?:42|3[0369]|2[147]|1[258]|09)\x20BC))))))|(?:0?2(?=.(?:(?:\d\D)|(?:[01]\d)|(?:2[0-8])))))([-.\/])(0?[1-9]|[12]\d|3[01])\2(?!0000)((?=(?:00(?:4[0-5]|[0-3]?\d)\x20BC)|(?:\d{4}(?!\x20BC)))\d{4}(?:\x20BC)?)(?:$|(?=\x20\d)\x20))?((?:(?:0?[1-9]|1[012])(?::[0-5]\d){0,2}(?:\x20[aApP][mM]))|(?:[01]\d|2[0-3])(?::[0-5]\d){1,2})?$/);var detect=navigator.userAgent.toLowerCase();var ECHO_DEBUG=true;var moment=new Date();var moment1=new Date(moment.getUTCFullYear()+1,moment.getUTCMonth(),moment.getUTCDate());var moment0=new Date(moment.getUTCFullYear()-1,moment.getUTCMonth(),moment.getUTCDate());var sceneForDeletion=0;var previewedScene=0;var ECHO_DEBUG=true;var contentHolder,contentHeight,contentWidth;document.domain=vokiDomain;var topWin=top;var arrayNavImgs=["my_voki","voki_apps","voki_blog","account_info","partners"];var arrayProtectedPages=['account_info','mywebsite','to_me','to_others','about_me'];function debug(str,level){if(location.host.indexOf('dev')<0){return true;}
if(!window.__firebug__){return false;}
switch(level){case 2:console.error(str);break;case 1:console.warn(str);break;default:console.debug(str);}}
function hideProc(){topWin.$('TACoverlay').hide();topWin.$('Processing').hide();}
function showDimensions(){var selected=document.formEmbedOptions.size.selectedIndex;if(document.formEmbedOptions.size.options[selected].value.indexOf("custom")!=-1){$("widthHeight").style.display="block";}else{$("widthHeight").style.display="none";if(document.formEmbedOptions.size.options[selected].value.indexOf("300")!=-1){document.formEmbedOptions.customWidth.value=300;document.formEmbedOptions.customHeight.value=400;}else{document.formEmbedOptions.customWidth.value=200;document.formEmbedOptions.customHeight.value=267;}}}
function debugNoFB(str){var dbem=$('debugDiv');if(!dbem){dbem=document.createElement('DIV');dbem.style.display="block";dbem.id="debugDiv";dbem.style.zIndex="2147483647";dbem.style.position="absolute";dbem.style.background="#FFFFFF";dbem.style.color="#000000";dbem.style.width="100%";dbem.style.left="0";dbem.style.overflow="auto";dbem.style.bottom="0";dbem.style.height="200px";document.body.appendChild(dbem);}
dbem.innerHTML+=str+'<br>';}
function grabQueryValue(qName){var q=location.search;if(q.indexOf(qName+'=')==-1)
return false;q=q.substring(q.indexOf(qName)+(qName.length+1));q=q.split('&')[0];return q;}
function spaceTrim(text){while(text.charAt(0)==" "){text=text.substring(1);}
while(text.charAt(text.length-1)==" "){text=text.substring(0,text.length-1);}
return text;}
function truncate(text,chars){if(text.length<=chars){return text;}else{var newText=text.substring(0,chars);var breakSpot=/[ \.\?\!\;\,\:]/;if(newText.match(breakSpot)==null){document.write(newText+="&#0133;");}
while(newText.charAt(newText.length-1).match(breakSpot)==null){newText=newText.substring(0,newText.length-1);}
while(newText.charAt(newText.length-1).match(breakSpot)!=null){newText=newText.substring(0,newText.length-1);}
return newText+="&#0133;";}}
function validateEmail(email)
{var addressPattern=/^(.+)@(.+)\.(.+)$/;if(addressPattern.test(email))
return true;else
return false;}
function VHSS_DoFSCommand(){}
function updateViewOption(newTarget)
{if(document.getElementById('divMyVokis_viewoptions'))
{var optionLinks=document.getElementsByTagName('a');for(a=0;a<optionLinks.length;a++)
{optionLinks[a].className='';}}
newTarget.className='viewOptions_selected';newTarget.blur();}
function populateSelect(source,sTarget)
{var t=document.getElementById(sTarget);for(j=0;j<document.setAccountInfo.elements.length;j++){var elem=document.setAccountInfo.elements[j];if(elem.type=="hidden"&&elem.name==source){var theValue=elem.value;break;}}
for(p=0;p<t.options.length;p++){if(t.options[p].value==theValue){t.selectedIndex=p;return;}}}
function howLongAgo(dateStr,level){if(!level)
level=2;var dateArray=dateStr.split(' ');var dayArr=dateArray[0].split('-');var year=parseInt(dayArr[0]);var month=parseInt(dayArr[1].replace('0',''))-1;var day=parseInt(dayArr[2]);var hourArr=dateArray[1].split(':');var hour=parseInt(hourArr[0]);var minute=parseInt(hourArr[1]);var sec=parseInt(hourArr[2]);var created=new Date(year,month,day,hour,minute,sec);var rightNow=new Date();var dateDiff=new Date(parseInt(rightNow.getTime())-parseInt(created.getTime()));var years=dateDiff.getYear();var months=dateDiff.getMonth();var days=dateDiff.getDate();var hours=dateDiff.getHours();var mins=dateDiff.getMinutes();var ret='';var curLvl=0;var years=0;if(years=1){ret=years+' Year ';curLvl++;}
if(years>1){ret=years+' Year(s) ';curLvl++;}
if(curLvl==level){return ret;}
if(months==1){ret+=months+' Month ';curLvl++;}
if(months>1){ret+=months+' Months ';curLvl++;}
if(curLvl==level){return ret;}
if(days==1){ret+=days+' Day ';curLvl++;}
if(days>1){ret+=days+' Days ';curLvl++;}
if(curLvl==level){return ret;}
if(hours==1){ret+=hours+' Hour ';curLvl++;}
if(hours>1){ret+=hours+' Hours ';curLvl++;}
if(curLvl==level){return ret;}
if(mins==1){ret+=mins+' Min ';}
if(mins>1){ret+=mins+' Mins ';}
return ret;}
function getPageSize(parent){parent=parent||document.body;var windowWidth,windowHeight;var pageHeight,pageWidth;if(parent!=document.body){windowWidth=parent.getWidth();windowHeight=parent.getHeight();pageWidth=parent.scrollWidth;pageHeight=parent.scrollHeight;}else{var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}}
return{pageWidth:pageWidth,pageHeight:pageHeight,windowWidth:windowWidth,windowHeight:windowHeight};};if(!topWin){alert("topWin is not set.  You must set in order to use this liberay");}
var modalSizes=$H({regWindow:{width:400,height:370},tagWindow:{width:350,height:360},blocked:{width:400,height:200},loginWin:{width:350,height:130},thanksWin:{width:400,height:110},embedCode:{width:370,height:330},regThank:{width:425,height:120},createVoki:{width:400,height:260},publish:{width:375,height:260},sceneSet:{width:375,height:200},editorWin:{width:570,height:436},changePass:{width:300,height:200},forgotPass:{width:400,height:250},STAF:{width:350,height:425},partTNC:{width:500,height:360},partThanks:{width:500,height:260},TACWindow:{width:375,height:360}});function getContentProperties(){if($('tblFrame'))
contentHolder=$('tblFrame');else
contentHolder=document.body;contentHeight=contentHolder.offsetHeight;contentWidth=contentHolder.offsetWidth;}
function detectTopScroll(){var scroll_Y;if(document.documentElement){scroll_Y=document.documentElement.scrollTop+document.body.scrollTop;}
if(window.scrollY){scroll_Y=window.scrollY;}
return scroll_Y;}
function openModalIframe(frameSrc,modalWidth,modalHeight,modalTitle){var modalWin=topWin.Windows.getWindow('modal_window');if(modalWin){resizeModal(modalWidth,modalHeight,modalTitle);modalWin.setURL(frameSrc);modalWin.setTitle(modalTitle);return;}
var win=new Window('modal_window',{className:"modalVoki",url:frameSrc,width:modalWidth,height:modalHeight,zIndex:1000,opacity:100,title:modalTitle,recenterAuto:true,destroyOnClose:true,resizable:false,maximizable:false,minimizable:false});win.showCenter();win.setDestroyOnClose();win.show(true);$('modal_window_content').allowTransparency=false;}
function openScrollerIframe(frameSrc,modalWidth,modalHeight,closeCB){if(topWin.Windows.getWindow('vk_scroller')){topWin.Windows.getWindow('vk_scroller').setURL(frameSrc);resizeModal(modalWidth,modalHeight);return;}
pageSize=getPageSize();left=Math.floor((pageSize.windowWidth-modalWidth)/2);var scroll=new Window('vk_scroller',{className:"scroll",url:frameSrc,width:modalWidth,height:modalHeight,zIndex:1000,opacity:100,bottom:10,left:left,title:'My Voki Characters',recenterAuto:false,destroyOnClose:true,resizable:true,maximizable:false,minimizable:false});if(closeCB){scroll.setCloseCallback(closeCB);}
scroll.setDestroyOnClose();scroll.show(true);}
function resizeScroller(modalWidth,modalHeight,modalTitle){scrollWin=topWin.Windows.getWindow('vk_scroller');if(!scrollWin){return false;}
scrollWin.setSize(modalWidth,modalHeight);if(modalTitle){scrollWin.setTitle(modalTitle);}}
function resizeModal(modalWidth,modalHeight,modalTitle){modalWin=topWin.Windows.getWindow('modal_window');if(!modalWin){return false;}
modalWin.setSize(modalWidth,modalHeight);modalWin.showCenter();if(modalTitle){modalWin.setTitle(modalTitle);}}
function getModalDem(){modalWin=topWin.Windows.getWindow('modal_window');if(!modalWin){return false;}
return modalWin.getSize();}
function openModalContent(content,modalWidth,modalHeight,modalTitle){modalWin=topWin.Windows.getWindow('modal_window');if(modalWin){topWin.Windows.closeAll();}
var win=new Window('modal_window',{className:"modalVoki",width:modalWidth,height:modalHeight,zIndex:1000,opacity:100,title:modalTitle,recenterAuto:true,destroyOnClose:true,resizable:false,maximizable:false,minimizable:false});win.getContent().innerHTML=content;win.getContent().align='center';win.showCenter();win.setDestroyOnClose();win.show(true);}
function closeModal(){if(topWin.Windows.getWindow('modal_window')||topWin.Windows.getWindow('vk_scroller'))
topWin.Windows.closeAll();}
(function(){document.observe("dom:loaded",function(){debug('DOM Loaded: base_login');var err=grabQueryValue('err');if(err!=false){displayErr(unescape(err));}
if(!checkLogin()){for(n=0;n<arrayProtectedPages.length;n++){if(location.pathname.indexOf(arrayProtectedPages[n])!=-1){topWin.location.href='login_force.php?destination='+escape(location.pathname);}}}})})();function checkLogin(){var cookie=readCookie('vdata'+vokiEnv);if(!cookie){return false;}
var accChip=parseInt(readChip(cookie,'acc'));if(isNaN(accChip)){return false;}
var envChk=readChip(cookie,'env');envChk=envChk.toString();if(envChk!=vokiEnv){return false;}
return true;}
function logoutUser(){location=dynamicDomain+'login_status.php?logout=1';return true;}
function submitLoginForm(){dest=grabQueryValue('destination');if(dest.toString()=='false')
dest='mywebsite.php';var display=grabQueryValue('useLong');display=parseInt(display);email=$('email').value;pass=$('password').value;remember=$('rememberMe').value;err=$('loginError');errorStr='';formOk=true;if(!emailPat.test(email)){errorStr="You did not enter a valid email address.\n";formOk=false;}else if(pass==""){errorStr="You did not enter your password.\n";formOk=false;}
if(!formOk){if(err){displayErr(errorStr);}else{topWin.openLogin(dest,errorStr);}
return false;}
var url='login_action.php';debug(url);var pars='?email='+escape(email)+'&password='+escape(pass)+'&rememberMe='+escape(remember);pars+='&rand='+Math.floor(Math.random()*1000000000);new Ajax.Request(url,{parameters:pars,asynchronous:true,onSuccess:processLoginResponse,onFailure:processLoginFail,onCreate:function(){$('Processing').show();debug('processing PROCESSING!!');}});return false;}
function displayErr(msg){$('Processing').hide();$('loginDiv').hide();$('loginError').show();$('errMsg').innerHTML=unescape(msg);}
function hideErr(){$('loginError').hide();$('loginDiv').style.display='block';$('errMsg').innerHTML='';}
function processLoginResponse(aResp){debug('processLoginResponse');dest=grabQueryValue('destination');if(dest.toString()=='false')
dest='mywebsite.php';response=aResp.responseText.split("||");code=parseInt(response[0]);action=response[1];var errMsg='';var resOk=true;if(isNaN(code)){errorStr='We Apologize, But there was an internal Error. Please Try again later.';resOk=false;}else{switch(code){case 7:errorStr='Please check your login information and try again.';resOk=false;break;case 6:top.openModalIframe(action,350,400);return false;break;case 5:topWin.resetPass(response[2],response[1],dest);return false;break;case 4:errorStr=response[1];resOk=false;break;case 0:if(top.location.pathname=='/vokiCommentEditor.php'){top.location.reload();}else{top.location=cachedDomain+dest;}
return false;break;default:errorStr='We Apologize, But there was an internal Error. Please Try again later.';resOk=false;}}
if(!resOk){if(err){displayErr(errorStr);}else{$('Processing').hide();topWin.openLogin(dest,errorStr);}
return false;}}
function processLoginFail(aResp){debug('processLoginFail');$('Processing').hide();displayErr('We Apologize, But there was an internal Error. Please Try again later.');}
function accessMyVoki(url){if(readChip(readCookie('vdata'+vokiEnv),'acc'))
location.href=url;else
Login(url);}
function checkResetForm(){uPswd=$("new_password");uPswdConfirm=$("new_password");if($("old_password")){uOldPass=$("old_password");}
formOk=true;if(uPswd.value.length<6){errorStr="Your New password must be at least 6 characters.<br />";formOk=false;}else{if(uPswdConfirm.value!=uPswd.value){errorStr="Your New passwords did not match.<br />";formOk=false;}}
if(!formOk){$('loginError').innerHTML=errorStr;$('loginError').style.display='block';return false;}
return true;}
function previewMyVoki(checksum,sceneID,sceneName,tblItem,editable){if(checksum==null||sceneID==null)
{if(sceneID='dummy')
{top.document.getElementById('pMyVoki_preview').innerHTML='<img src="/images/preview_empty.gif">';top.document.getElementById('spanMyVoki_name').innerHTML="<i>No Voki Created</i>";}
else
{top.document.getElementById('pMyVoki_preview').innerHTML='<img src="/images/preview_empty.gif">';top.document.getElementById('spanMyVoki_name').innerHTML="<i>No Voki Created</i>";}
top.document.getElementById('previewVokiFullName').value='';if(top.document.getElementById('btnRename'))top.document.getElementById('btnRename').style.display="none";top.document.getElementById('tblEmbedOptions').style.display="none";top.document.getElementById('previewVokiID').value='';top.document.getElementById('previewTblItem').value='';return;}
var embedWidth=200;var embedHeight=267;if(tblItem=="sentMessage"||top.location.href.indexOf('browse')!=-1||top.location.pathname=="/")
{embedWidth=300;embedHeight=400;}
var isTransparent=1;if(checkIt('mac')&&checkIt('firefox')){isTransparent=0;}
document.getElementById('pMyVoki_preview').innerHTML=AC_Voki_Embed(embedWidth,embedHeight,checksum,sceneID,isTransparent,'FFFFFF',1);if(document.getElementById('spanMyVoki_name'))document.getElementById('spanMyVoki_name').innerHTML=sceneName.truncate(20,'&#133;');if(document.getElementById('previewVokiFullName'))document.getElementById('previewVokiFullName').value=sceneName;if(document.getElementById('btnRename'))document.getElementById('btnRename').style.display="inline";if(document.getElementById('tblEmbedOptions'))document.getElementById('tblEmbedOptions').style.display="block";if(document.getElementById('previewVokiID'))document.getElementById('previewVokiID').value=sceneID;if(document.getElementById('previewVokiChecksum'))document.getElementById('previewVokiChecksum').value=checksum;if(document.getElementById('previewTblItem'))document.getElementById('previewTblItem').value=tblItem;previewedScene=parseInt(sceneID);if(top.document.getElementById('btnRename'))renameCancel();if(top.document.getElementById('ediBtn')&&top.document.getElementById('btnRename')&&top.document.getElementById('SceneSettings')){if(editable==0){top.document.getElementById('ediBtn').disabled=true;top.document.getElementById('btnRename').style.display='none';top.document.getElementById('SceneSettings').style.display='none';}else{top.document.getElementById('ediBtn').disabled=false;top.document.getElementById('btnRename').style.display='inline';top.document.getElementById('SceneSettings').style.display="block";}}}
function linkVokiModal(accountID,sceneID){var width=300;var height=300;sceneID=document.getElementById('previewVokiID').value;if(top.location.href.indexOf('browse')!=-1||top.location.pathname=="/"){width=400;height=420;}
top.openModalIframe('linkVoki.php?sceneID='+sceneID,width,height);}
function enableEditComments(numComments){if(!document.getElementById('btnEditComments'))return false;var b=document.getElementById('btnEditComments');if(numComments==0)
{b.disabled=true;b.className="btn_100 disabled";}
else
{b.disabled=false;b.className="btn_100";}}
function populateMsgDetails(msgDetails){if(msgDetails!=null)
{if($('previewSenderEmail'))$('previewSenderEmail').value=msgDetails.split('||')[0];if($('tdVokiText')){var msgText=msgDetails.split('||')[1];var breaksArray=['\r\n','\n','\r'];for(i=0;i<breaksArray.length;i++){msgText=msgText.gsub(breaksArray[i],'<br>');}
$('tdVokiText').innerHTML=msgText;}}}
function updateEmbedOptions(){var f=document.forms['formEmbedOptions'];if(f.embedIn.options[f.embedIn.selectedIndex].text.toLowerCase()=="myspace")
document.getElementById('btnEmbedOptions_Publish').style.display="none";else
document.getElementById('btnEmbedOptions_Publish').style.display="none";}
function getEmbedCode(method){var f=document.forms['formEmbedOptions'];var playWhen;if(f.embedIn.selectedIndex==0)
{alert("Please select a Publish Destination.")
f.embedIn.focus();return;}
var theWidth=f.customWidth;var theHeight=f.customHeight;if(f.size.options[f.size.selectedIndex].value.indexOf("custom")!=-1){if(theWidth.value==""){alert("Enter a Custom Height and Width");return;}else if(theWidth.value<10||theWidth.value>1000||theHeight.value<10||theHeight.value>1000){alert("Width and Height must be between 10 and 1000.");return;}}
var parameters="?sceneId="+f.previewVokiID.value+"&embedIn="+f.embedIn.options[f.embedIn.selectedIndex].value+"&size="+f.size.options[f.size.selectedIndex].value+"&customWidth="+f.customWidth.value+"&customHeight="+f.customHeight.value;if(method=='publish')
openPublish(parameters);else
openGetCode(parameters);}
function playVoki(audio){var v=document.VoKi;v.vokiStop();v.vokiSayAudio(audio);}
function renamePrompt(){dispName=document.getElementById('previewVokiFullName').value.unescapeHTML();document.getElementById('newSceneName').value=dispName;document.getElementById('divMyVoki_name').style.display="none";document.getElementById('divMyVoki_rename').style.display="block";}
function renameSubmit(){var newName=spaceTrim(document.getElementById('newSceneName').value);var sceneID=document.getElementById('previewVokiID').value;if(newName=="")
{top.Dialog.alert("Names cannot be blank or composed only of spaces.",{windowParameters:{width:325,height:100,className:"dialog"},okLabel:"OK",ok:function(win){return true}});document.getElementById('newSceneName').value=document.getElementById('spanMyVoki_name').innerHTML;return;}
else{var url='renameScene.php';var pars='sceneID='+sceneID+'&sceneName='+escape(newName);var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseRenameMessages});}}
function parseRenameMessages(oReq){response=oReq.responseText.split("||");if(response[0]==1){newDispName=truncate(response[1],20);document.getElementById('spanMyVoki_name').innerHTML=response[1].truncate(20,'&#133;');document.formEmbedOptions.previewVokiFullName.value=response[1];document.getElementById('divMyVoki_rename').style.display="none";document.getElementById('divMyVoki_name').style.display="block";window.frameMyVokis_content.document.getElementById('name_'+document.getElementById('previewVokiID').value).innerHTML=response[1].truncate(15,'&#133;');window.frameMyVokis_content.document.getElementById('fullName_'+document.getElementById('previewVokiID').value).innerHTML=response[1];}}
function renameCancel(){document.getElementById('divMyVoki_rename').style.display="none";document.getElementById('divMyVoki_name').style.display="block";}
function vokiEditorCancel(){if($('modal_window')){topWin.closeModal();}else{if($('create_page_div')){topWin.location=cachedDomain;}else{topWin.location.reload();}}}
function uncacheVoki(vokiID){var uncacheValues=readCookie('uncached');if(uncacheValues){var uncacheArray=uncacheValues.split("||");for(n=0;n<uncacheArray.length;n++){if(uncacheArray[n]==vokiID)return;}
uncacheArray[uncacheArray.length]=vokiID;setCookie('uncached',uncacheArray.join('||'),null,null,'voki.com');}else{setCookie('uncached',vokiID,null,null,'voki.com');}}
function checkUncachedVoki(vokiID){if(readCookie('uncached')){var uncacheArray=readCookie('uncached').split("||");for(n=0;n<uncacheArray.length;n++){if(uncacheArray[n]==vokiID)return true;}}
return false;}
function vokiEditorSaveDone(vokiID,gMode,action,chsm,sceneName,accountId){gMode=parseInt(gMode);if(!checkLogin())
setCookie('unregisteredCreation',vokiID,null,null,cookieDomain);if(gMode==3||gMode==4)uncacheVoki(vokiID);switch(gMode){case 1:if(action=='save')
window.setTimeout('Login()',500);if(action=='send')
window.setTimeout('Login()',500);return true;break;case 2:if(window.opener.location.href.indexOf('voki')!=-1){var newWin=window.open('','editorComment','');newWin.close();}else{window.location.href=cachedDomain;window.opener.focus();}
return true;break;case 4:window.setTimeout('topWin.SendToFriend('+vokiID+')',500);return true;break;default:}
if(location.pathname=="/"&&gMode==3){location.href='/mywebsite.php';return true;}
if(window.frameMyVokis_content){var w=window.frameMyVokis_content;w.location.href=w.location.protocol+"//"+w.location.hostname+w.location.pathname+("?updatedVoki="+vokiID)+("#voki_"+vokiID);}
if(window.frameMyVokis_aboutContent){window.frameMyVokis_aboutContent.location.reload();}
if(top.document.getElementById('previewVokiID')&&top.document.getElementById('previewVokiID').value==vokiID){previewMyVoki(topWin.$('previewVokiChecksum').value,topWin.$('previewVokiID').value,topWin.$('previewVokiFullName').value,topWin.$('previewTblItem').value);}
if($('create_page_div')){createGblChsm=chsm;createGblSID=vokiID;createGblAID=accountId;$('vokiID').value=createGblSID;if(!checkLogin()&&!readCookie('vokiBlockedReg')&&!readCookie('vokiNoThanks')){loginTag();}else{thankSave();}
window.setTimeout('showCreateOptions('+vokiID+',"'+createGblChsm+'")',500);return true;}
window.setTimeout('topWin.closeModal()',500);}
function saveVokiScene(sceneID){var save_status=1;var url='saveScene.php';var pars='sceneID='+sceneID+'&status='+save_status;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseSaveMessages});}
function saveVokiScene_M(sceneID,same){var save_status=1;var url='saveScene.php';var pars='sceneID='+sceneID+'&status='+save_status+'&same='+same;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseSaveMessages});}
function processSavedScene(sceneID){if(window.frameMyVokis_content&&window.frameMyVokis_content.document.getElementById('save_'+sceneID)){var a=window.frameMyVokis_content.document.getElementById('save_'+sceneID);a.onclick="";a.setAttribute('href','#');a.style.cursor='default';a.getElementsByTagName('img')[0].src="images/buttons/myvoki_icon_save_disabled.gif";a.blur();}}
function parseSaveMessages(oReq){response=oReq.responseText.split("||");if(response[0]==1){processSavedScene(response[1]);}}
function confirmDeleteVoki(vokiID,deleteID,vokiName){topWin.Dialog.confirm("Are you sure you want to delete <b>"+vokiName+"</b>?",{windowParameters:{width:300,height:100,className:"dialog"},okLabel:"Delete",cancelLabel:"Cancel",cancel:function(win){return false},ok:function(win){deleteVoki(vokiID,deleteID);return true}});}
function confirmDeleteVoki_A(vokiID,deleteID,vokiName){topWin.Dialog.confirm("Are you sure you want to delete <b>"+vokiName+"</b>?",{windowParameters:{width:300,height:100,className:"dialog"},okLabel:"Delete",cancelLabel:"Cancel",cancel:function(win){return false},ok:function(win){deleteVoki_A(vokiID,deleteID);return true}});}
function confirmDeleteVoki_iframe(vokiID,deleteID,vokiName){topWin.Dialog.confirm("Are you sure you want to delete <b>"+vokiName+"</b>?",{windowParameters:{width:300,height:100,className:"dialog"},okLabel:"Delete",cancelLabel:"Cancel",cancel:function(win){return false},ok:function(win){deleteVoki_iframe(vokiID,deleteID);return true}});}
function deleteVoki(vokiID,deleteID){topWin.sceneForDeletion=parseInt(deleteID);var url='deleteScene.php';var pars='deleteID='+deleteID+'&vokiID='+vokiID;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseDeleteMessages});}
function deleteVoki_A(vokiID,deleteID){topWin.sceneForDeletion=parseInt(deleteID);var url='deleteAboutScene.php';var pars='deleteID='+deleteID+'&vokiID='+vokiID;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseDeleteMessages});}
function deleteVoki_iframe(vokiID,deleteID){topWin.sceneForDeletion=parseInt(deleteID);var url=topWin.dynamicDomain+'deleteScene.php';var pars='deleteID='+deleteID+'&vokiID='+vokiID;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseDeleteMessages});}
function confirmDeleteVoki_M(vokiID,deleteID,vokiName,same){topWin.Dialog.confirm("Are you sure you want to delete <b>"+vokiName+"</b>?",{windowParameters:{width:300,height:100,className:"dialog"},okLabel:"Delete",cancelLabel:"Cancel",cancel:function(win){return false},ok:function(win){deleteVoki_M(vokiID,deleteID,same);return true}});}
function deleteVoki_M(vokiID,deleteID,same){topWin.sceneForDeletion=parseInt(deleteID);var url='deleteScene.php';var pars='deleteID='+deleteID+'&vokiID='+vokiID+'&same='+same;var ajaxRequest=new Ajax.Request(url,{parameters:pars,asynchronous:true,onComplete:parseDeleteMessages});}
function parseDeleteMessages(req){response=req.responseText.split(",");if(response[0]==1)
{if(window.frameMyVokis_aboutContent)
{window.frameMyVokis_aboutContent.location.reload();return;}
if($(response[1]))
$(response[1]).style.display='none';else if(window.frameMyVokis_content.$(response[1]))
window.frameMyVokis_content.$(response[1]).style.display='none';if(top.sceneForDeletion==top.previewedScene)
previewMyVoki(null,null);}}
function editVokiScene(sceneId,playerAccId,target,mode,editorAccId,useAs){if(!target){target="modal";}
if(useAs==undefined||useAs){useAs=1;}else{useAs=0;}
if(mode==undefined)
mode=1;if(editorAccId==undefined)
editorAccId=defaultVokiAccId;setTimeout("editVokiSceneDo("+sceneId+",'"+playerAccId+"','"+target+"',"+mode+","+editorAccId+","+useAs+")",500);return false;}
function editVokiSceneDo(sceneId,playerAccId,target,mode,editorAccId,useAs){partnerId=readCookie('pId');if(partnerId==undefined||partnerId==0)
partnerId=defaultVokiPartnerId;tmpEditorAccId=readChip(readCookie('vdata'+vokiEnv),'acc');loggedIn=false;if(!isNaN(parseInt(tmpEditorAccId)))editorAccId=tmpEditorAccId;if(editorAccId==defaultVokiAccId){loggedIn=false;}else{loggedIn=true;if(mode==1)mode=3;}
EditorMode=mode;PartnerID=partnerId;AccountId=editorAccId;PlayerAccId=playerAccId;PlayerSceneId=sceneId;if(mode==2){var tmp=document.location.href.split("?");var obj=new Object();obj.commentSceneId=0;SceneId=sceneId;if(tmp.length>=2){var url=tmp[1].split('&');for(var i=0;i<url.length;i++){var param=url[i].split('=');if(param[0]=='sc')obj.commentSceneId=param[1];}
if(obj.commentSceneId>0){SceneId=obj.commentSceneId;}}}else if((mode==5||mode==3)&&useAs==0){SceneId=sceneId;}else{SceneId=0;}
curSesId=readChip(readCookie('vdata'+vokiEnv),'sid');if(curSesId)ExtraQueryStr+='&PHPSESSID='+curSesId;if(loggedIn)ExtraQueryStr+='&loggedIn=1';if(target=="modal")params['wmode']=null;FlashToDisplay=createFlashObj('edit');ExtraQueryStr='';var editorName='';switch(mode){case 3:if(useAs)
editorName='Create a Voki';else
editorName='Edit Your Voki';break;case 4:modalWin=topWin.Windows.getWindow('modal_window');editorName=modalWin.getTitle();break;case 2:editorName='Use a voki to comment';break;}
if(target=="modal"){openModalContent(FlashToDisplay,modalSizes.get('editorWin').width,modalSizes.get('editorWin').height,editorName);}else{if($(target))
$(target).innerHTML=FlashToDisplay;if($("tip")&&$("bushContainer")){showTip();}}}
function setSessionCookie(sesVal,cookieName){if(cookieName==undefined)
cookieName='vdata'+vokiEnv;curSesId=readChip(readCookie(cookieName),'sid');if(!curSesId||curSesId==''){curCookieValue=readCookie(cookieName);sesVal=(curCookieValue?curCookieValue+'|':'')+'js=1|sid='+sesVal;setCookie(cookieName,sesVal,null,null,cookieDomain);}}
function getSessionCookie(cookieName){if(cookieName==undefined)
cookieName='PHPSESSID';var cookieValue=readCookie(cookieName);if(!cookieValue){return'';}else{return cookieValue;}}
function showWizard(target,gMode)
{if(gMode==undefined)
gMode=1;EditorMode=gMode;loggedIn=false;tmpEditorAccId=readChip(readCookie('vdata'+vokiEnv),'acc');if(isNaN(parseInt(tmpEditorAccId))||tmpEditorAccId==defaultVokiAccId){loggedIn=false;}else{loggedIn=true;}
if(loggedIn)ExtraQueryStr+='&loggedIn=1';if(target=="modal")params['wmode']=null;FlashToDisplay=createFlashObj('wiz');ExtraQueryStr='';if($(target))
$(target).innerHTML=FlashToDisplay;else
openModalContent('<span id="vokiEditorBlock">'+FlashToDisplay+'</span>',570,450);}
function readCookie(cookieName){if(document.cookie){var whichChip=new RegExp("\\b"+cookieName+"=","i");var index=document.cookie.search(whichChip);if(index!=-1){cookieStart=index+cookieName.length+1;cookieStop=document.cookie.indexOf(";",index);if(cookieStop==-1){cookieStop=document.cookie.length}
return document.cookie.substring(cookieStart,cookieStop)}
else return false;}
return false;}
function readChip(cookieValue,chipName){if(!cookieValue)return false;cookieValue=unescape(cookieValue);var chips=cookieValue.split("|");for(c=0;c<chips.length;c++){if(chips[c].indexOf(chipName)==0){var chipValue=chips[c].substring(chipName.length+1);return chipValue;}}
return false;}
function setCookie(name,value,expires,path,domain,secure)
{document.cookie=name+"="+value+
((expires)?";expires="+expires.toUTCString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
function deleteCookie(name,path,domain){if(readCookie(name)){document.cookie=name+'='+
((path)?';path='+path:'')+
((domain)?';domain='+domain:'')+';expires=Thu, 01-Jan-1970 00:00:01 GMT';}}
function clickButton(buttonID,action,code,target){setCookie('vokiButtonClicked',buttonID,'','/','voki.com');if(action=='link'){if(target){window.open(code,target);}else{window.location=code;}}else{eval(code);}}
function changePass(){if(!checkLogin())
return false;var email=readChip(readCookie('vdata'+vokiEnv),'em');topWin.openModalIframe(cachedDomain+'changePass.php',340,250,'Change Your Password');}
function Register(){if(readCookie('vokiBlockedReg')){topWin.openBlocked();}else{topWin.openModalIframe(topWin.cachedDomain+'modal_register.php',topWin.modalSizes.get('regWindow').width,topWin.modalSizes.get('regWindow').height,'Register to Voki Now');}}
function openPartReg(){topWin.openModalIframe(topWin.cachedDomain+'modal_register.php',topWin.modalSizes.get('partReg').width,topWin.modalSizes.get('partReg').height,'Become A Voki Partner');}
function loginTag(){if(readCookie("vokiNoThanks")){thankSave();}else{topWin.openModalIframe(topWin.cachedDomain+'modal_login_tag.php',topWin.modalSizes.get('tagWindow').width,topWin.modalSizes.get('tagWindow').height,'You just Created a Voki Character!');}}
function openLogin(dest,err){if(!err)
err='';if(!dest)
dest='mywebsite.php';topWin.openModalIframe('login.php?destination='+escape(dest)+'&err='+escape(err),topWin.modalSizes.get('loginWin').width,topWin.modalSizes.get('loginWin').height,'Please Login to access your account');}
function thankSave(oTitle){if(!oTitle)
oTitle='Thank you for creating your Voki Scene';topWin.openModalIframe(topWin.cachedDomain+'modal_saveVoki.php',topWin.modalSizes.get('thanksWin').width,topWin.modalSizes.get('thanksWin').height,oTitle);}
function forgotPass(){topWin.openModalIframe(topWin.cachedDomain+'modal_lost_password.php',topWin.modalSizes.get('forgotPass').width,topWin.modalSizes.get('forgotPass').height);}
function resetPass(email,tmpP,dest){topWin.openModalIframe(topWin.cachedDomain+'resetpassform.php?email='+email+'&tmpP='+tmpP+'&dest='+dest,topWin.modalSizes.get('changePass').width,topWin.modalSizes.get('changePass').height,'Reset Your Password');}
function openModalVoki(accountID,sceneID){var width=300;var height=300;if(topWin.location.href.indexOf('browse')!=-1||topWin.location.pathname=="/"){width=400;height=420;}
topWin.openModalIframe(topWin.cachedDomain+'modal_vokiPlayer.php?accountID='+accountID+"&sceneID="+sceneID,width,height);}
function viewComments(vokiID,vokiName){topWin.openModalIframe(topWin.dynamicDomain+'getComments.php?vokiID='+vokiID+'&vokiName='+vokiName,500,400);}
function createVoki(gMode,extra){if(!extra)
extra='';topWin.openModalIframe(topWin.cachedDomain+'createScene.php?gMode='+gMode+extra,topWin.modalSizes.get('createVoki').width,topWin.modalSizes.get('createVoki').height,'You have selected to create a new Voki');}
function openGetCode(parameters){topWin.openModalIframe(topWin.dynamicDomain+"modal_getCode.php"+parameters,topWin.modalSizes.get('embedCode').width,topWin.modalSizes.get('embedCode').height,'Embed this Voki on your webpage');}
function openPublish(parameters){topWin.openModalIframe(topWin.dynamicDomain+"publish.php"+parameters,topWin.modalSizes.get('publish').width,topWin.modalSizes.get('publish').height,'Publish this Voki directly to your site');}
function openBlocked(){topWin.openModalIframe(topWin.cachedDomain+'blocked.php',topWin.modalSizes.get('blocked').width,topWin.modalSizes.get('blocked').height,'&nbsp;');}
function openSceneSettings(sceneId){openModalIframe(topWin.cachedDomain+'modal_settings_options.php?sceneID='+sceneId,topWin.modalSizes.get('sceneSet').width,topWin.modalSizes.get('sceneSet').height,'Scene Settings');}
function Login(url){if(!url){url=grabQueryValue('destination');if(url.toString()=='false')
url='mywebsite.php';}
openModalIframe('login.php?destination='+escape(url),topWin.modalSizes.get('loginWin').width,topWin.modalSizes.get('loginWin').height,'Please login to access your account');}
function closeNoThanks(){setCookie(topWin.cachedDomain+"vokiNoThanks",true,"","/",cookieDomain,"");if(readCookie('unregisteredCreation')){thankSave();}}
function partnerTNC(){debug('partnerTNC');topWin.openModalIframe(topWin.cachedDomain+'modal_partnerTNC.php',topWin.modalSizes.get('partTNC').width,topWin.modalSizes.get('partTNC').height,'<div class="comNPub">For <strong>Communities</strong> and <strong>Publishers</strong> Only</div>Please Agree to the Partner Terms and Conditions');}
function partThank(){debug('partThank');topWin.openModalIframe(topWin.cachedDomain+'modal_partnerThank.php',topWin.modalSizes.get('partThanks').width,topWin.modalSizes.get('partThanks').height,'<div class="comNPub">For <strong>Communities</strong> and <strong>Publishers</strong> Only</div>Thank you for signing up as a Voki Partner');modalWin=topWin.Windows.getWindow('modal_window');modalWin.setCloseCallback(function(){topWin.location=topWin.cachedDomain});}
function vokiReply(email){debug('vokiReply');createVoki(4,'&email='+email);setCookie('reply',email);topWin.Windows.getWindow('modal_window').setTitle('Reply to your friend');}
function vokiForward(vokiID){debug('vokiForward');SendToFriend(vokiID);topWin.Windows.getWindow('modal_window').setTitle('Foward Your Voki');}
function newMessage(){createVoki(4);topWin.Windows.getWindow('modal_window').setTitle('New Voki Message');}
function SendToFriend(vokiID){debug('STAF Scene: '+vokiID);openModalIframe(topWin.cachedDomain+'sendToFriend.php?sceneID='+vokiID,topWin.modalSizes.get('STAF').width,topWin.modalSizes.get('STAF').height,'Send To A Friend');}
function sendVokiToPhone(accId,scId,chsm,pid){sendToMobileComment=window.open("http://"+VHOST_HTTP_SERVER+"/vhss_editors/sendVokiToPhone.php?acc="+accId+'&sc='+scId+'&chsm='+chsm+'&pid='+pid,"sendToMobileComment","width=730,height=625,toolbar=no,resizable=yes,scrollbars=yes");sendToMobileComment.focus();}
var detect=navigator.userAgent.toLowerCase();function checkIt(str){var place=detect.indexOf(str)+1;return place;}
function isFlash(element){if(element.classid){if(element.classid.toLowerCase()=="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"){return true;}}
if(element.type){if(element.type.toLowerCase()=="application/x-shockwave-flash"){return true;}}
return false;}
function hideFlash(){var objects=document.getElementsByTagName("object");for(i=0;i<objects.length;i++){if(isFlash(objects[i])){objects[i].style.visibility="hidden";}}
var embeds=document.getElementsByTagName("embed");for(i=0;i<embeds.length;i++){if(isFlash(embeds[i])){embeds[i].style.visibility="hidden";}}}
function showFlash(){var objects=document.getElementsByTagName("object");for(i=0;i<objects.length;i++){if(isFlash(objects[i])){objects[i].style.visibility="visible";}}
var embeds=document.getElementsByTagName("embed");for(i=0;i<embeds.length;i++){if(isFlash(embeds[i])){embeds[i].style.visibility="visible";}}
top.Windows.getWindow('modal_window').hide();}
function displayFlash(params){var FlashDisplay='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+
(params['codebase']?' codebase="'+params['codebase']+'"':'')+
(params['width']?' width="'+params['width']+'"':'')+
(params['height']?' height="'+params['height']+'"':'')+
(params['id']?' id="'+params['id']+'"':'')+'>';FlashDisplay+='<param name="movie" value="'+params['swf']+'">';if(params['FlashVars'])FlashDisplay+='<param name="FlashVars" value="'+params['FlashVars']+'">';if(params['allowScriptAccess'])FlashDisplay+='<param name="allowScriptAccess" value="'+params['allowScriptAccess']+'">';if(params['base'])FlashDisplay+='<param name="base" value="'+params['base']+'">';if(params['scale'])FlashDisplay+='<param name="scale" value="'+params['scale']+'">';if(params['bgcolor'])FlashDisplay+='<param name="bgcolor" value="'+params['bgcolor']+'">';if(params['quality'])FlashDisplay+='<param name="quality" value="'+params['quality']+'">';if(params['wmode'])FlashDisplay+='<param name="wmode" value="'+params['wmode']+'">';if(params['align'])FlashDisplay+='<param name="align" value="'+params['align']+'">';if(params['salign'])FlashDisplay+='<param name="salign" value="'+params['salign']+'">';FlashDisplay+='<param name="rand" value="'+Math.floor(Math.random()*1000000000)+'">';FlashDisplay+='<embed src="'+params['swf']+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swliveconnect="true"'+
(params['allowScriptAccess']?' allowScriptAccess="'+params['allowScriptAccess']+'"':'')+
(params['bgcolor']?' bgcolor="'+params['bgcolor']+'"':'')+
(params['width']?' width="'+params['width']+'"':'')+
(params['height']?' height="'+params['height']+'"':'')+
(params['id']?' name="'+params['id']+'"':'')+
(params['base']?' base="'+params['base']+'"':'')+
(params['scale']?' scale="'+params['scale']+'"':'')+
(params['FlashVars']?' FlashVars="'+params['FlashVars']+'"':'')+
(params['wmode']?' wmode="'+params['wmode']+'"':'')+
(params['quality']?' quality="'+params['quality']+'"':'')+
(params['align']?' align="'+params['align']+'"':'')+
(params['salign']?' salign="'+params['salign']+'"':'')+'rand='+Math.floor(Math.random()*1000000000)+'>';FlashDisplay+='</object>';document.write(FlashDisplay);}
var loginStatus='false';var buttonClicked='';var referrerPartner='';var referrerCampaign='';function getTrackingVars(){var vdata=readCookie('vdata'+vokiEnv);var account=readChip(vdata,'acc');if(account)loginStatus='true';var btnCookie=readCookie('vokiButtonClicked');if(btnCookie){buttonClicked=btnCookie;deleteCookie('vokiButtonClicked','/','voki.com');}
var trackingCookie=readCookie('omniture');if(trackingCookie){referrerPartner=readChip('omniture','referrer_partner');referrerCampaign=readChip('omniture','referrer_campaign');}}
var s_account="oddcastvoki";var s=s_gi(s_account);s.charSet="UTF-8";s.currencyCode="USD"
s.trackDownloadLinks=true;s.trackExternalLinks=true;s.trackInlineStats=true;s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls";s.linkInternalFilters="javascript:,.";s.linkLeaveQueryString=false;s.linkTrackVars="None";s.linkTrackEvents="None";s.dc=112;var s_objectID;function s_c2fe(f){var x='',s=0,e,a,b,c;while(1){e=f.indexOf('"',s);b=f.indexOf('\\',s);c=f.indexOf("\n",s);if(e<0||(b>=0&&b<e))e=b;if(e<0||(c>=0&&c<e))e=c;if(e>=0){x+=(e>s?f.substring(s,e):'')+(e==c?'\\n':'\\'+f.substring(e,e+1));s=e+1}else return x
+f.substring(s)}return f}function s_c2fa(f){var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')
a+='","';else if(("\n\r\t ").indexOf(c)<0)a+=c;s++}return a?'"'+a+'"':a}function s_c2f(cc){cc=''+cc;var fc='var f=new Function(',s=cc.indexOf(';',cc.indexOf('{')),e=cc.lastIndexOf('}'),o,a,d,q,c,f,h,x
fc+=s_c2fa(cc)+',"var s=new Object;';c=cc.substring(s+1,e);s=c.indexOf('function');while(s>=0){d=1;q='';x=0;f=c.substring(s);a=s_c2fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){if(h==q&&!x)q='';if(h=='\\')x=x?0:1;else x=0}else{if(h=='"'||h=="'")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)
+'new Function('+(a?a+',':'')+'"'+s_c2fe(c.substring(o+1,e))+'")'
+c.substring(e+1);s=c.indexOf('function')}fc+=s_c2fe(c)+';return s");'
eval(fc);return f}function s_gi(un,pg,ss){var c="function s_c(un,pg,s"
+"s){var s=this;s.wd=window;if(!s.wd.s_c_in){s.wd.s_c_il=new Array;s."
+"wd.s_c_in=0;}s._il=s.wd.s_c_il;s._in=s.wd.s_c_in;s._il[s._in]=s;s.w"
+"d.s_c_in++;s.m=function(m){return (''+m).indexOf('{')<0};s.fl=funct"
+"ion(x,l){return x?(''+x).substring(0,l):x};s.co=function(o){if(!o)r"
+"eturn o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.i"
+"ndexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for"
+"(var p=0;p<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1"
+"))<0)return 0;return 1};s.rep=function(x,o,n){var i=x.indexOf(o);wh"
+"ile(x&&i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.index"
+"Of(o,i+n.length)}return x};s.ape=function(x){var s=this,h='01234567"
+"89ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x='"
+"'+x;if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.subs"
+"tring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h"
+".substring(n%16,n%16+1)+e;n=parseInt(n/16);l++}y+='%u'+e}else if(c="
+"='+')y+='%2B';else y+=escape(c)}x=y}else{x=x?s.rep(escape(''+x),'+'"
+",'%2B'):x;if(x&&c&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i"
+"=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substri"
+"ng(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substri"
+"ng(i);i=x.indexOf('%',i)}}}}return x};s.epa=function(x){var s=this;"
+"return x?unescape(s.rep(''+x,'+',' ')):x};s.pt=function(x,d,f,a){va"
+"r s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.s"
+"ubstring(0,y);r=s.m(f)?s[f](t,a):f(t,a);if(r)return r;z+=y+d.length"
+";t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=funct"
+"ion(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);if(t.subst"
+"ring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=functi"
+"on(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')"
+"+t;return 0};s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf"
+"',f);return s.fsg};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s."
+"num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.locat"
+"ion.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeri"
+"ods;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');"
+"if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s"
+".pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function"
+"(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'="
+"'),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length"
+",e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var"
+" s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCa"
+"se():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60"
+");if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'"
+"){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSI"
+"ON'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');ret"
+"urn s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+"
+"e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<"
+"l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new"
+" Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f"
+"}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){va"
+"r s=this,r;if(s.apv>=5&&(!s.isopera||s.apv>=7))eval('try{r=s.m(f)?s"
+"[f](a):f(a)}catch(e){r=s.m(t)?s[t](e):t(e)}');else{if(s.ismac&&s.u."
+"indexOf('MSIE 4')>=0)r=s.m(b)?s[b](a):b(a);else{s.eh(s.wd,'onerror'"
+",0,o);r=s.m(f)?s[f](a):f(a);s.eh(s.wd,'onerror',1)}}return r};s.gtf"
+"set=function(e){var s=this;return s.tfs};s.gtfsoe=new Function('e',"
+"'var s=s_c_il['+s._in+'];s.eh(window,\"onerror\",1);s.etfs=1;var c="
+"s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a)"
+"{return window};s.gtfsf=function(w){var s=this,p=w.parent,l=w.locat"
+"ion;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;r"
+"eturn s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if("
+"!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s."
+"gtfsoe,'gtfsfb')}return s.tfs};s.mr=function(sess,q,ta){var s=this,"
+"dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,ns=s.visitorN"
+"amespace,unc=s.rep(s.fun,'_','-'),imn='s_i_'+s.fun,im,b,e,rs='http'"
+"+(s.ssl?'s':'')+'://'+(t1?(s.ssl&&t2?t2:t1):((ns?ns:(s.ssl?'102':un"
+"c))+'.'+(s.dc?s.dc:112)+'.2o7.net'))+'/b/ss/'+s.un+'/1/H.10-pdv-2/'"
+"+sess+'?[AQB]&ndh=1'+(q?q:'')+(s.q?s.q:'')+'&[AQE]';if(s.isie&&!s.i"
+"smac){if(s.apv>5.5)rs=s.fl(rs,4095);else rs=s.fl(rs,2047)}if(s.d.im"
+"ages&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){im=s"
+".wd[imn];if(!im)im=s.wd[imn]=new Image;im.src=rs;if(rs.indexOf('&pe"
+"=')>=0&&(!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.name)))"
+"{b=e=new Date;while(e.getTime()-b.getTime()<500)e=new Date}return '"
+"'}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt="
+"\"\">'};s.gg=function(v){var s=this;return s.wd['s_'+v]};s.glf=func"
+"tion(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s"
+".gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',',"
+"'glf',0)};s.gv=function(v){var s=this;return s['vpm_'+v]?s['vpv_'+v"
+"]:(s[v]?s[v]:'')};s.havf=function(t,a){var s=this,b=t.substring(0,4"
+"),x=t.substring(4),n=parseInt(x),k='g_'+t,m='vpm_'+t,q=t,v=s.linkTr"
+"ackVars,e=s.linkTrackEvents;s[k]=s.gv(t);if(s.lnk||s.eo){v=v?v+','+"
+"s.vl_l:'';if(v&&!s.pt(v,',','isf',t))s[k]='';if(t=='events'&&e)s[k]"
+"=s.fs(s[k],e)}s[m]=0;if(t=='visitorID')q='vid';else if(t=='pageURL'"
+"){q='g';s[k]=s.fl(s[k],255)}else if(t=='referrer'){q='r';s[k]=s.fl("
+"s[k],255)}else if(t=='vmk')q='vmt';else if(t=='charSet'){q='ce';if("
+"s[k]&&s[k].toUpperCase()=='AUTO')s[k]='ISO8859-1';else if(s[k]&&s.e"
+"m==2)s[k]='UTF-8'}else if(t=='visitorNamespace')q='ns';else if(t=='"
+"cookieDomainPeriods')q='cdp';else if(t=='cookieLifetime')q='cl';els"
+"e if(t=='variableProvider')q='vvp';else if(t=='currencyCode')q='cc'"
+";else if(t=='channel')q='ch';else if(t=='transactionID')q='xact';el"
+"se if(t=='campaign')q='v0';else if(s.num(x)){if(b=='prop')q='c'+n;e"
+"lse if(b=='eVar')q='v'+n;else if(b=='hier'){q='h'+n;s[k]=s.fl(s[k],"
+"255)}}if(s[k]&&t!='linkName'&&t!='linkType')s.qav+='&'+q+'='+s.ape("
+"s[k]);return ''};s.hav=function(){var s=this;s.qav='';s.pt(s.vl_t,'"
+",','havf',0);return s.qav};s.lnf=function(t,h){t=t?t.toLowerCase():"
+"'';h=h?h.toLowerCase():'';var te=t.indexOf('=');if(t&&te>0&&h.index"
+"Of(t.substring(te+1))>=0)return t.substring(0,te);return ''};s.ln=f"
+"unction(h){var s=this,n=s.linkNames;if(n)return s.pt(n,',','lnf',h)"
+";return ''};s.ltdf=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLow"
+"erCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&"
+"&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.lte"
+"f=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&"
+"&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft"
+"=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkIntern"
+"alFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(s"
+".trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.tr"
+"ackExternalLinks&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif"
+"||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function("
+"'e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(th"
+"is);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Fun"
+"ction('e','var s=s_c_il['+s._in+'],f;if(s.d&&s.d.all&&s.d.all.cppXY"
+"ctnr)return;s.eo=e.srcElement?e.srcElement:e.target;eval(\"try{if(s"
+".eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catc"
+"h(f){}\");s.eo=0');s.ot=function(o){var a=o.type,b=o.tagName;return"
+" (a&&a.toUpperCase?a:b&&b.toUpperCase?b:o.href?'A':'').toUpperCase("
+")};s.oid=function(o){var s=this,t=s.ot(o),p=o.protocol,c=o.onclick,"
+"n='',x=0;if(!o.s_oid){if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.to"
+"LowerCase().indexOf('javascript')<0))n=o.href;else if(c){n=s.rep(s."
+"rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x="
+"2}else if(o.value&&(t=='INPUT'||t=='SUBMIT')){n=o.value;x=3}else if"
+"(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}re"
+"turn o.s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>"
+"=0?','+t.substring(0,e)+',':'';return u&&u.indexOf(','+un+',')>=0?s"
+".epa(t.substring(e+1)):''};s.rq=function(un){var s=this,c=un.indexO"
+"f(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);retu"
+"rn s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf("
+"'='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.su"
+"bstring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this"
+";s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r"
+"(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&',"
+"'sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)s.sqq[s.squ[x]]"
+"+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&s.sqq[x]&&(x==q||"
+"c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};"
+"s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,"
+"\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++"
+"){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";if((oc.indexOf(\""
+"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh"
+"(o,\"onclick\",0,s.lc);}return r');s.wds=function(){var s=this;if(s"
+".apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b."
+"attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.a"
+"ddEventListener('click',s.bc,false);else s.eh(s.wd,'onload',0,s.wdl"
+")}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamp"
+"lingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.ge"
+"tYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c"
+"_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=fun"
+"ction(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=func"
+"tion(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t."
+"substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return "
+"n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection"
+",l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un.toLowerCas"
+"e();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l="
+"l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un"
+"=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=fun"
+"ction(un){var s=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+"
+"',').indexOf(un)<0)s.oun+=','+un;s.uns()};s.t=function(){var s=this"
+",trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*1"
+"0000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/108000"
+"00)%10+sed,yr=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y"
+"r<1900?yr+1900:yr)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.get"
+"Seconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tfs=s.gtfs(),t"
+"a='',q='',qs='';s.gl(s.vl_g);s.uns();if(!s.q){var tl=tfs.location,a"
+",o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',"
+"0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j=\"1.1"
+"\";if(j.match){j=\"1.2\";if(tm.setUTCDate){j=\"1.3\";if(s.isie&&s.i"
+"smac&&s.apv>=5)j=\"1.4\";if(pn.toPrecision){j=\"1.5\";a=new Array;i"
+"f(a.forEach){j=\"1.6\";i=0;o=new Object;eval(\"try{i=new Iterator(o"
+")}catch(e){}\");if(i&&i.next)j=\"1.7\"}}}}}if(s.apv>=4)x=screen.wid"
+"th+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaE"
+"nabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidt"
+"h;bh=s.wd.innerHeight;}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>="
+"4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw="
+"s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight"
+";if(!s.ismac&&s.b){eval(\"try{s.b.addBehavior('#default#homePage');"
+"hp=s.b.isHomePage(tl)?'Y':'N'}catch(e){}\");eval(\"try{s.b.addBehav"
+"ior('#default#clientCaps');ct=s.b.connectionType}catch(e){}\")}}}el"
+"se r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,"
+"100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.q=(x?'&s='+s.ape(x):'')+(c"
+"?'&c='+s.ape(c):'')+(j?'&j='+j:'')+(v?'&v='+v:'')+(k?'&k='+k:'')+(b"
+"w?'&bw='+bw:'')+(bh?'&bh='+bh:'')+(ct?'&ct='+s.ape(ct):'')+(hp?'&hp"
+"='+hp:'')+(p?'&p='+s.ape(p):'')}if(s.usePlugins)s.doPlugins(s);var "
+"l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l;i"
+"f(!s.referrer)s.referrer=r;if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if"
+"(!o)return '';var p=s.gv('pageName'),w=1,t=s.ot(o),n=s.oid(o),x=o.s"
+"_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parent"
+"Element?o.parentElement:o.parentNode;if(!o)return '';t=s.ot(o);n=s."
+"oid(o);x=o.s_oidt}oc=o.onclick?''+o.onclick:'';if((oc.indexOf(\"s_g"
+"s(\")>=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)return"
+" ''}ta=n?o.target:1;h=o.href?o.href:'';i=h.indexOf('?');h=s.linkLea"
+"veQueryString||i<0?h:h.substring(0,i);l=s.linkName?s.linkName:s.ln("
+"h);t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&"
+"pe=lnk_'+(t=='d'||t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?"
+"'&pev2='+s.ape(l):'');else trk=0;if(s.trackInlineStats){if(!p){p=s."
+"gv('pageURL');w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n="
+"s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+("
+"w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot="
+"'+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';if(s.p_r)s.p_r()"
+";var code='';if(trk&&s.vs(sed))code=s.mr(sess,(vt?'&t='+s.ape(vt):'"
+"')+s.hav()+q+(qs?qs:s.rq(s.un)),ta);s.sq(trk?'':qs);s.lnk=s.eo=s.li"
+"nkName=s.linkType=s.wd.s_objectID=s.ppu='';if(s.pg)s.wd.s_lnk=s.wd."
+"s_eo=s.wd.s_linkName=s.wd.s_linkType='';return code};s.tl=function("
+"o,t,n){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t()};s."
+"ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d="
+"document;s.b=s.d.body;s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.ind"
+"exOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexO"
+"f('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)"
+"apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn"
+"=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>"
+"=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv"
+"=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else "
+"if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=par"
+"seFloat(v);s.em=0;if(String.fromCharCode){i=escape(String.fromCharC"
+"ode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}s.sa"
+"(un);s.vl_l='visitorID,vmk,ppu,charSet,visitorNamespace,cookieDomai"
+"nPeriods,cookieLifetime,pageName,pageURL,referrer,currencyCode,purc"
+"haseID';s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,tr"
+"ansactionID,campaign,state,zip,events,products,linkName,linkType';f"
+"or(var n=1;n<51;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n;s.vl_g=s."
+"vl_t+',trackDownloadLinks,trackExternalLinks,trackInlineStats,linkL"
+"eaveQueryString,linkDownloadFileTypes,linkExternalFilters,linkInter"
+"nalFilters,linkNames';s.pg=pg;s.gl(s.vl_g);if(!ss)s.wds()}",l=window.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(l)for(i=0;i<l.length;i++){s=l[i];if(s.oun==un)return s;else if(s.fs(s.oun,un)){s.sa(un);return s}}if(e>0){a=parseInt(i=v.substring(e+5));if(a>3)a=parseFloat(i)}
else if(m>0)a=parseFloat(u.substring(m+10));else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf('Opera')<0){eval(c);return new
s_c(un,pg,ss)}else s=s_c2f(c);return s(un,pg,ss)}function s_co(o){var s=s_gi("^",1,1);return s.co(o)}function s_gs(un){var s=s_gi(un,1,1);return s.t()}function s_dc(un){var s=s_gi(un,1);return s.t()}