document.write('<div id="test-doctype">1</div>');try{if(typeof(STA_LAYOUT_ROWS)=='undefined'){STA_LAYOUT_ROWS=4;}}catch(kon){STA_LAYOUT_ROWS=4;}try{if(typeof(STA_KILL_FRAMES)=='undefined'){STA_KILL_FRAMES=1;}}catch(kon){STA_KILL_FRAMES=1;}try{if(typeof(STA_BUTTON_WIDTH)=='undefined'){STA_BUTTON_WIDTH=127;}}catch(kon){STA_BUTTON_WIDTH=127;}try{if(typeof(STA_MAX_WAIT)=='undefined'){STA_MAX_WAIT=30;}}catch(kon){STA_MAX_WAIT=30;}try{if(typeof(STA_USER)=='undefined'){STA_USER='socionics.com';}}catch(kon){STA_USER='socionics.com';}var sta_online=(document.location.href.substring(0,7)=='file://')?false:true;var sta_can_proceed=0;var sta_info_text=new Array();var sta_new_ic_n=false;var sta_new_ic_r=false;var sta_SaveOpt=(sta_online)?1:0;var sta_ls_data=unescape(document.location.search.substring(1)).split(':');var sta_op5=/opera 5|opera\/5/i.test(navigator.userAgent);var sta_op6=/opera 6|opera\/6/i.test(navigator.userAgent);var sta_opall=/opera/i.test(navigator.userAgent);var sta_mac_is=(navigator.userAgent.indexOf('Mac')!=-1);var sta_mac_ie51=(!sta_opall&&sta_mac_is&&(/MSIE 5\.1|MSIE 5\.2/i.test(navigator.userAgent)))?true:false;var sta_tchoice='';var sta_dlp=((sta_op5&&document.location.search!='')?(document.location.pathname+'').split(document.location.search)[0]:document.location.pathname);if(sta_ls_data.length!=4){sta_Null_sta();sta_wlh_all(0);}else if(self!=top&&STA_KILL_FRAMES==1){top.location=self.location;}else if((/[0123456]/.test(sta_ls_data[0])&&sta_ls_data[0].length!=1)||(!/[0123456]/.test(sta_ls_data[0])&&sta_ls_data[0].length!=4)){sta_Null_sta();sta_wlh_all(0);}else{if(sta_ls_data[0].length==4){sta_tchoice=sta_ls_data[0];sta_ls_data[0]='3';}if(self!=top){sta_SaveOpt=0;}var sta_is_icode=(sta_ls_data[1]==''&&sta_ls_data[2]=='')?'':sta_ls_data[1]+':'+sta_ls_data[2];var sta_can_proceed=1;var sta_enc_dec=new Array();var sta_data_st='qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM/$.@-_{}!,()';var sta_ds_=sta_data_st.split('');var sta_waste=new Array();var sta_waste_n=':';var sta_waste_r=':';for(sta_st=0;sta_st<sta_data_st.length;sta_st++){sta_enc_dec[sta_ds_[sta_st]]=sta_st;}sta_comment_book=(sta_ls_data[3]!='')?"The snapshot of your selections made on "+sta_ShowDate(sta_ls_data[3])+" has now been loaded.":"The Intercode you have entered has been successfully converted.";var sta_TestMode=sta_ls_data[0]+'';var sta_NormOrRev=(sta_TestMode=='1'||sta_TestMode=='2');sta_dc=document.cookie;var sta_version=1.6;var sta_respond=0;var sta_demo=false;var sta_result='';var sta_but_class=(sta_TestMode=='1')?"sta-button-normal":"sta-button-reversed";var sta_butsel=new Array();var sta_is_written=false;var no_innerHTML=0;try{no_innerHTML=(document.getElementById('test-doctype').innerHTML=="1")?0:1;}catch(ns_maybe){try{test_div=document.createElement('DIV');test_div.id='test-doctype';test_div.innerHTML="1";document.documentElement.appendChild(test_div);no_innerHTML=(document.getElementById('test-doctype').innerHTML=="1")?0:1;}catch(ie_maybe){try{test_div=document.createElement('<div id="test-doctype">1</div>');document.documentElement.appendChild(test_div);no_innerHTML=(document.getElementById('test-doctype').innerHTML=="1")?0:1;}catch(others_maybe){}}}var box_strict=(document.getElementById('test-doctype').offsetWidth==28||sta_op6||sta_op5)?true:false;var sta_bookmark=((document.referrer+'').indexOf('http://'+document.location.hostname)<0);var sta_bookmark_backup=false;var sta_url='http://www.socionics.com/accounts/'+STA_USER+'/sta.cgi?';var sta_Rows=(STA_LAYOUT_ROWS<4||STA_LAYOUT_ROWS>8||STA_LAYOUT_ROWS==7)?4:STA_LAYOUT_ROWS;var sta_but_outterWidth=STA_BUTTON_WIDTH;var sta_but_outterHeight=17;var sta_but_mode=['Guidelines','Normal&nbsp;mode','Reversed&nbsp;mode','Profile','Save','Intercode','Reset'];var sta_but={height:sta_but_outterHeight-((box_strict)?4:0),width:sta_but_outterWidth-((box_strict)?4:0)};var sta_bg={width:sta_Rows*(sta_but_outterWidth+2)+2+2-((box_strict)?2:0)};var sta_restable={width:sta_Rows*(sta_but_outterWidth+2)-32};var sta_info={width:sta_Rows*(sta_but_outterWidth+2)-2-((box_strict)?2+10:0)};var sta_butstate={off:document.location,on:Number(new Date()),onNow:function(){return Number(new Date());}};var sta_button={html:function(b_class,b_id,b_href){return '<a class="'+b_class+'" id="'+b_id+'" style="width:'+sta_but.width+'px; height:'+sta_but.height+'px;" onmouseup="blur();" onmouseleave="blur();" onmouseover="try{sta_Help(this, event, 1);}catch(ts){}" onmouseout="try{sta_Help(this, event, 0);}catch(ts){}" onclick="sta_Flick(this);" href="'+b_href+'">'+b_id+'</a>';}};var sta_copy={showCopy:function(x){y=new Date().getYear();y+=(y<2000)?1900:0;return '&copy; '+((y>x)?x+'-'+y:x)+' Socionics Type Consultants';}};var sta_icf_width=sta_bg.width*0.8;var sta_icb_width=sta_bg.width*0.1;var sta_sorted_about=sta_SortThisArray(sta_adj);var sta_title='Socionics Type Assistant';var sta_st_tm=sta_butstate.on;var sta_ck=sta_Ckie('sta_uid');var sta_src=sta_url+document.location+sta_waste_n+sta_waste_r+sta_ck+sta_version;switch(sta_TestMode){case '0':{sta_info_text[0]=sta_EvalEmAll(sta_comment['guidelines']);sta_title+=' -=Guidelines=-';break;}case '1':{sta_info_text[1]=sta_EvalEmAll(sta_comment['normal']);sta_title+=' -=Normal mode=-';break;}case '2':{sta_info_text[2]=sta_EvalEmAll(sta_comment['reversed']);sta_title+=' -=Reversed mode=-';break;}case '3':{if(sta_is_icode!=''){sta_TO_ID=window.setTimeout('sta_Time_Out()',STA_MAX_WAIT*1000);document.write('<script type="text/javascript" src="'+sta_src+'"></script>\n');}else{sta_respond=1;sta_result='xxxxxxxxxxx3003000000';sta_demo=0;}sta_title+=' -=Profile=-';break;}case '4':{sta_info_text[4]=sta_EvalEmAll(sta_comment['save']);sta_title='STA Snapshot '+sta_ShowDate(sta_ls_data[3])+' ('+sta_TotalSel(sta_ls_data[1])+'-'+sta_TotalSel(sta_ls_data[2])+')';break;}case '5':{sta_info_text[5]=sta_EvalEmAll(sta_comment['intercode']);sta_title+=' -=Intercode=-';break;}case '6':{sta_info_text[6]=sta_EvalEmAll(sta_comment['bookmark']);sta_title+=' -=Bookmark=-';break;}}document.write('<title>'+sta_title+'</title>\n');}function sta_SortThisArray(b){c=new Array();d=0;for(var a in b){c[d]=a;d++;}return c.sort();}function sta_TimeStamp(){now=new Date();yy=now.getYear();mm=now.getMonth()+1;dd=now.getDate();hr=now.getHours();mn=now.getMinutes();sc=now.getSeconds();dd=((dd<=9)?'0':'')+dd;mm=((mm<=9)?'0':'')+mm;yy=(((yy<2000)?1900+yy:yy)+'').substring(2,4);hr=((hr<=9)?'0':'')+hr;mn=((mn<=9)?'0':'')+mn;sc=((sc<=9)?'0':'')+sc;return dd+mm+yy+hr+mn+sc;}function sta_ShowDate(ts){mms=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];dd=ts.substring(0,2);mm=mms[parseInt(ts.substring(2,4),10)-1];yy=ts.substring(4,6);hr=ts.substring(6,8);mn=ts.substring(8,10);return dd+' '+mm+' '+yy+' at '+hr+'.'+mn;}function sta_TotalSel(d){l=sta_Decoder(d)+'';r=0;for(j=0;j<l.length;j++){if(l.charAt(j)=="1"){r++;}}return r;}function sta_DecSt(dc){s1=parseInt(Math.sqrt(dc));s2=Math.pow(s1,2);s3=(dc-s2)/2;return((dc-s2)==0)?sta_ds_[s1]+''+sta_ds_[s3]:(parseInt(s3)==s3)?sta_ds_[s1]+''+sta_ds_[parseInt(s3)]:sta_ds_[parseInt(s3)]+''+sta_ds_[s1];}function sta_Encoder(enc_st){iq=0;dec_st='';dec_st2='';for(b1=0;b1<enc_st.length;b1+=12){bin_dec=0;for(b2=0;b2<enc_st.substring(b1,b1+12).length;b2+=4){bin_dec+=parseInt(enc_st.substring(b1,b1+12).substring(b2,b2+4),2)*((b2==0)?256:(b2==4)?16:1);}dec_st+=sta_DecSt(bin_dec);}for(str_=0;str_<dec_st.length;str_++){if(dec_st.charAt(str_)==sta_ds_[0]){iq++;}else{dec_st2+=(iq==0)?dec_st.charAt(str_):iq+dec_st.charAt(str_);iq=0;}if(str_==dec_st.length-1&&iq!=0){dec_st2+=iq;}}return(dec_st2==40)?'':dec_st2;}function sta_Decoder(par){par=(par=='')?40:par;sbn=['0000','0001','0010','0011','0100','0101','0110','0111','1000','1001','1010','1011','1100','1101','1110','1111'];orb_st='';mid_res=sta_RgE(par);for(mr=0;mr<mid_res.length;mr+=2){st_var1=sta_enc_dec[mid_res.charAt(mr)];st_var2=sta_enc_dec[mid_res.charAt(mr+1)];decim=(st_var2>st_var1)?Math.pow(st_var2,2)+2*st_var1+1:Math.pow(st_var1,2)+2*st_var2;d_bn1=parseInt(decim/256);d_bn2=parseInt((decim-d_bn1*256)/16);d_bn3=(decim-d_bn1*256)-d_bn2*16;orb_st+=sbn[d_bn1]+sbn[d_bn2]+sbn[d_bn3];}return orb_st;}function sta_RgE(d_st){d_st_pos=0;new_d_st='';d_st=d_st+'';for(i=0;i<d_st.length;i++){is_m=d_st.charAt(i).match(/[0-9]/);is_m2=d_st.charAt(i+1).match(/[0-9]/);is_tm=(is_m&&is_m2)?is_m+''+is_m2:(is_m)?is_m:'';if(is_tm!=''){new_d_st+=d_st.substring(d_st_pos,i);for(re=0;re<parseInt(is_tm,10);re++){new_d_st+=sta_ds_[0];}incr=(is_tm.length>1)?2:1;d_st_pos=i+incr;i=i+incr-1;}}new_d_st+=d_st.substring(d_st_pos);return new_d_st;}function sta_EvalEmAll(x){y=x.split('%%');if(y.length>1){for(sta_i=1;sta_i<y.length;sta_i+=2){y[sta_i]=eval(y[sta_i]);}}return y.join('');}function sta_Time_Out(){window.clearTimeout(sta_TO_ID);if(sta_respond!=1&&sta_respond!=2){if(!confirm(sta_EvalEmAll(sta_comment['server_too_long']))){sta_TO_ID=window.setTimeout("sta_Time_Out()",STA_MAX_WAIT*1000);}else{sta_can_proceed=0;sta_ls_data[3]=((sta_SaveOpt==1)?sta_TimeStamp()+'':'');sta_wlh_all((sta_SaveOpt==1)?4:5);}}}function sta_Ckie(sc){sta_referrer=false;eval(sc+'="";');su=".socionics.com";nck='\''+sta_butstate.on+(Math.random()+'').substring(2)+'\'';cks=sta_dc.split(' ');for(c=0;c<cks.length;c++){if(cks[c].indexOf(sc)==0){eval(cks[c]);}if(cks[c].indexOf('sta_waste_n')==0){eval(cks[c]);}if(cks[c].indexOf('sta_waste_r')==0){eval(cks[c]);}if(cks[c].indexOf('sta_referrer')==0){eval(cks[c]);}}sta_bookmark_backup=(!sta_referrer);document.cookie='sta_referrer=false';if(eval(sc)==''){document.cookie=sc+'='+nck+'; expires='+new Date(sta_butstate.on+315360000000).toGMTString()+'; domain='+su+'; path=/';cks2=document.cookie.split(' ');for(c2=0;c2<cks2.length;c2++){if(cks2[c2].indexOf(sc)==0){eval(cks2[c2]);}}}return eval(sc)+':';}function WasteBasket(b_id,slct){sta_st_now=sta_butstate.onNow();sta_waste[b_id]=(slct==1)?Math.round((sta_st_now-sta_st_tm)/1000):0;sta_st_tm=sta_st_now;}function sta_wlh_all(go_m){document.cookie='sta_referrer=true';sta_ls_data[0]=go_m;window.location.href=sta_dlp+'?'+sta_ls_data.join(':');}function sta_Null_sta(){for(sta_lp=0;sta_lp<4;sta_lp++){sta_ls_data[sta_lp]='';}}
