addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r='readyState',c='onreadystatechange',x=function(){n=1;clearInterval(t);while(i=e.shift())i();if(s)s[c]=''};return function(f){if(n)return f();if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false); if(/WebKit/i.test(navigator.userAgent))t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10);o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();function JSONscriptRequest(fullUrl){this.fullUrl=fullUrl;this.noCacheIE='&noCacheIE='+(new Date()).getTime();this.headLoc=document.getElementsByTagName("head").item(0);this.scriptId='JscriptId'+JSONscriptRequest.scriptCounter++;};JSONscriptRequest.scriptCounter=1;JSONscriptRequest.prototype.buildScriptTag=function(){this.scriptObj=document.createElement("script");this.scriptObj.setAttribute("type","text/javascript");this.scriptObj.setAttribute("charset","utf-8");this.scriptObj.setAttribute("src",this.fullUrl+this.noCacheIE);this.scriptObj.setAttribute("id",this.scriptId);};JSONscriptRequest.prototype.removeScriptTag=function(){this.headLoc.removeChild(this.scriptObj);};JSONscriptRequest.prototype.addScriptTag=function(){this.headLoc.appendChild(this.scriptObj);};var bObj;var inteTimer;var isdogetStrId=true;var stagid;var getarridnum;var getStartid;var shineStrArrlen;var keystra;var shinestra;var shinestraNo;var feistr="@$$@";var endlinelength;var thisstrlength;var dstrlength;var iou;var reurl;var getServTime;var letshineIDArr=new Array();var firstupdt=true;var shinerate=260;var getrdm=1500;var stimer=null;var haveNewTag=false;var blt;var toclr;var tobgclr;var tmpcolor;var ipo=0;var firstT=true;var git=null;var pgit=null;var sid=null;function $1(objString){return document.getElementById(objString);};function initData(){firstupdt=true;isdogetStrId=true;getarridnum=0;getStartid=0;shinestra="";shinestraNo=0;shineStrArrlen=shiStrArr.length;feistr="@$$@";endlinelength=1000;thisstrlength=0;dstrlength=0;iou=0;stagid=-1;getServTime="0";};function doScrFun(reqUrl){bObj=new JSONscriptRequest(reqUrl);bObj.buildScriptTag();bObj.addScriptTag();};function GRupdatedtags(jsonData){var getvj=jsonData;var consuc=getvj.success;if(consuc==true){haveNewTag=false;getServTime=getvj.rtime;letshineIDArr=new Array();for(var i=0;i<=getvj.total-1;i++){letshineIDArr[i]=getvj.updates[i].tagr;};haveNewTag=true;if(firstT){doShineFov();};firstT=false;};bObj.removeScriptTag();};function Gtd(jsonData){var getvj=jsonData;var giop="";var hvvj = 0;for(var i=0;i<=getvj.total-1;i++){shiIDArr[parseInt(getvj.result[i].tno)]=getvj.result[i].tid;giop=$1("taly_"+getvj.result[i].tno);if(getvj.result[i].tid!="-1"){giop.id="jax_"+getvj.result[i].tid;hvvj++;}else{iou--;}};bObj.removeScriptTag();if(hvvj!=0){for(var sio=0;sioendlinelength){if(dstrlength==0){continue;}else{iou--;dstrlength=shinestra.length;break;}}else if(dstrlength+thisstrlength==endlinelength){shinestraNo+=(iou-1);shinestraNo+=feistr;shinestra+=keystra;shinestra+=feistr;break;}else{shinestraNo+=(iou-1);shinestraNo+=feistr;shinestra+=keystra;shinestra+=feistr;dstrlength=shinestra.length;};if(iou>=shineStrArrlen){break;}};reurl='http://www.tagally.com/main/Gtd?callback=Gtd&n='+encodeURI(shinestraNo)+'&t='+encodeURI(shinestra);doScrFun(reurl);getStartid=iou;if(iou>=shineStrArrlen){break;}else{setTimeout(getStrId,1000);}}};function sendupdate(){if(typeof(shiStrArr)=="undefined"){return;};if(shiStrArr.length==0){return;};if(isdogetStrId){initData();getStrId();}else{if(firstupdt){sendshineupdate();firstupdt=false;};inteTimer=setInterval(sendshineupdate,300000);}};addDOMLoadEvent(sendupdate);function doShineFov(){if(haveNewTag){git=Math.round((Math.random())*(parseInt(letshineIDArr.length-1)));if(pgit!=null){if(git==pgit){git=Math.round((Math.random())*(parseInt(letshineIDArr.length-1)));}};pgit=git;sid=$1("jax_"+letshineIDArr[git]);if(sid==null){return;};ipo=0;blt=sid;justShine();}else{setTimeout(doShineFov,getrdm);}};function justShine(){if(ipo==0){toclr=blt.style.color;tobgclr=blt.style.backgroundColor;};if(ipo==7){clearTimeout(stimer);stimer=null;setTimeout(doShineFov,getrdm);return;};if(ipo/2==0){tmpcolor=toclr;toclr=tobgclr;tobgclr=tmpcolor;}else{tmpcolor=tobgclr;tobgclr=toclr;toclr=tmpcolor;};ipo++;blt.style.color=tobgclr;blt.style.backgroundColor=toclr;stimer=setTimeout('justShine()',shinerate);};function init(){tset_len=testArr.length-1;blt=document.getElementById(testArr[tset_len_a]);};var dropmenuobj;var tlastobj=null;var theselObj=null;var delayhidemu;var delayGetAjax;function dropmenu(evt){var e=window.event?window.event:evt;theselObj=e.target||e.srcElement;if(tlastobj){if(tlastobj==theselObj){if(dropmenuobj.style.visibility=="visible"){clearhidemenu();return;}else{tlastobj=theselObj;}}else{tlastobj.style.textDecoration='none';tlastobj=theselObj;}}else{tlastobj=theselObj;};tlastobj.style.textDecoration='underline';var lstv=$1("lastarts");if(lstv==null)return;var hmtv=$1("thehotmore");if(hmtv==null)return;var hmtvloading=$1("liDv");if(document.all){hmtv.innerText="";lstv.innerText="";}else{hmtv.textContent="";lstv.textContent="";};hmtvloading.style.display="block";clearhidemenu();cleargetAjaxUp();delaygetAjaxUp();dropmenuobj=document.getElementById("dropmenu");tgnobj=document.getElementById("tNY6IO");tgimobj=document.getElementById("tNYIMU");var toit="";if(document.all){toit=theselObj.innerText;tgnobj.innerText=toit;}else{toit=theselObj.textContent;tgnobj.textContent=toit;};var trueHf=tgimobj.href.substring(0,tgimobj.href.indexOf("tags=")+5);tgimobj.href=trueHf+encodeURI(toit); var intY=0;var intX=0;if(!document.all){intX=e.pageX;intY=e.pageY;}else{intX=document.body.scrollLeft+e.clientX;if(document.documentElement.scrollTop){intY=e.clientY+document.documentElement.scrollTop;}else{intY=e.clientY+document.body.scrollTop;}};dropmenuobj.style.left=(intX-8)+"px";dropmenuobj.style.top=intY+"px"; dropmenuobj.style.visibility="visible";};function gethotandlast(jsonData){var lstv=$1("lastarts");var hmtv=$1("thehotmore");var hmtvloading=$1("liDv");var getvj=jsonData;if(getvj==null||getvj.thelast[0]==null){hmtvloading.style.display="none";hmtv.innerHTML="No related content found.
If you are administrator, you may export your posts to share, please refer to help file.";return;};if(document.all){lstv.innerText=getvj.thelast[0].thetitle;}else{lstv.textContent=getvj.thelast[0].thetitle;};lstv.href=getvj.thelast[0].theurl;var concatString,pp1,pp2;pp1="");hmtv.innerHTML=concatString;hmtvloading.style.display="none";bObj.removeScriptTag();};function getAjaxUp(){if(theselObj.id.substring(0,3)!="jax"){($1("liDv")).style.display="none";($1("thehotmore")).innerHTML="No related content.
If you are administrator, you may export your posts to share, please refer to help file.";return;};var sendId=theselObj.id.substring(4,theselObj.id.length);var req="http://www.tagally.com/main/GRHotandLastForTag/"+sendId+"?callback=gethotandlast";bObj=new JSONscriptRequest(req);bObj.buildScriptTag();bObj.addScriptTag();};function delaygetAjaxUp(){delayGetAjax=setTimeout("getAjaxUp()",800);};function cleargetAjaxUp(){if(delayGetAjax){clearTimeout(delayGetAjax);}};function hidemenu(){dropmenuobj.style.visibility="hidden";tlastobj.style.textDecoration='none';cleargetAjaxUp();};function delayhidemenu(){delayhidemu=setTimeout("hidemenu()",500);};function clearhidemenu(){if(delayhidemu){clearTimeout(delayhidemu);}}