var _shoutApp="";var _shoutAudio=false;var _shoutAudioMute=false;var _shoutAudioStatus="0";var _shoutAudioStop=false;var _shoutColor=1;var _shoutDoc=null;var _shoutFullLoad=0;var _shoutScriptTrick=false;var _shoutHidden=false;var _shoutHTTPPrefix="";var _shoutIdle=0;var _shoutLastPost=null;var _shoutMsgs={};var _shoutRRate=3000;var _shoutRRateMax=10000;var _shoutSettings={};var _shoutScriptID=0;var _shoutScrollDown=true;var _shoutScrollInit=false;var _shoutScrollLast=-1;var _shoutScrollTop=0;var _shoutState=0;var _shoutGetCount=0;var _shoutSession="";if(_shoutFullScreen==undefined){var _shoutFullScreen=false}if(typeof window.onload=="function"){var oldonload=window.onload;window.onload=function(){_shoutFullLoad=1;oldonload()}}else{window.onload=function(){_shoutFullLoad=1}}function _shoutStart(i,e,g,f){if(document.getElementById("shoutScript")!=undefined){_shoutHTTPPrefix=document.getElementById("shoutScript").getAttribute("src").match(/(https?:\/\/[^/]+)/)[1];_shoutScriptTrick=_shoutHTTPPrefix.match(/https?:\/\/([^/]+)/)[1]!=document.domain}_shoutDoc=document.getElementById(i);_shoutSession=f;_shoutHideDefault(_shoutGet("isHidden"));if(document.getElementById("shoutboxMute")!=null&&(g=="1"||g=="2")){var h=document.createElement("embed");h.src=_shoutHTTPPrefix+"/shout/audio.swf?u=20101222";h.quality="high";h.type="application/x-shockwave-flash";h.width=1;h.height=1;h.swLiveConnect=true;h.wmode="transparent";_shoutDoc.parentNode.insertBefore(h,_shoutDoc);_shoutAudio=h;_shoutAudioStatus=g;_shoutAudioDefault(_shoutGet("isMuted"))}_shoutDoc.onscroll=function(b){if(_shoutFullLoad&&_shoutScrollLast!=_shoutDoc.scrollTop&&!_shoutScrollTop&&!_shoutState){var c=(_shoutScrollLast-_shoutDoc.scrollTop)>0;var a=Math.max(0,_shoutDoc.scrollHeight-_shoutDoc.offsetHeight-_shoutDoc.scrollTop);_shoutScrollDown=(!c&&a<50)||_shoutScrollLast==-1;_shoutScrollLast=_shoutDoc.scrollTop}};_shoutLastPost=new Date().getTime();_shoutApp=e;_shoutRRate=_shoutRRateMax;_shoutScrollBottom();var d=_shoutDoc.innerHTML+"ENDOFFILE";_shoutDoc.innerHTML="";if(_shoutScriptTrick){_shoutRefresh()}else{_shoutUpdate(d)}setTimeout("_shoutGetContent()",_shoutRRateMax);window.onresize=function(){_shoutResize()};_shoutResize()}function _shoutResize(){if(_shoutFullScreen==true){var b=_shoutScrollHeight()-_shoutWindowHeight();var a=_shoutDoc.offsetHeight-b-2;_shoutDoc.style.height=Math.max(50,(_shoutDoc.offsetHeight-b-2)).toString()+"px";_shoutDoc.style.width=_shoutWindowWidth().toString()+"px";_shoutScrollBottom()}}function _shoutGetContent(c,d){_shoutGetCount++;if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?file="+_shoutApp+"&get="+_shoutGetCount+"&return="+encodeURIComponent("_shoutContent(xmlHttp.responseText,"+new Date().getTime()+","+c+","+d+");"))}else{_shoutAjax("/shout/shout"+_shoutApp+".html?"+new Date().getTime(),"_shoutContent(xmlHttp.responseText,"+new Date().getTime()+","+c+","+d+");")}}function _shoutContent(h,i,j,g){if(i>=_shoutLastPost&&_shoutState!=1){_shoutUpdate(h,g)}var f=new Date().getTime()-_shoutLastPost;if(f>1000*60*60){if(!_shoutIdle){_shoutDoc.innerHTML+='<br /><div style="background:#FFFFFF;text-align:center"><b><a href="javascript:;" onclick="_shoutRefresh();setTimeout(\'_shoutGetContent()\',_shoutRRateMax);" style="color:#000000">You have been idle for more than 1 hour. Please click here to refresh the chat box.</a></b></div>';_shoutIdle=1;_shoutScrollBottom()}}_shoutRRate+=(Math.ceil((new Date().getTime()-_shoutLastPost)*0.005));_shoutRRate=Math.min(_shoutRRateMax,Math.max(2000,_shoutRRate),_shoutRRate);if(j!==false&&!_shoutIdle){setTimeout("_shoutGetContent()",_shoutRRate)}}function _shoutPost(k,p,l,m,o){var n=document.getElementById(l);var j=document.getElementById(k);o.disabled=true;n.blur();n.disabled=true;j.value=_shoutTrim(j.value);if(j.value==p||j.value==""){alert("Please enter your name.");o.disabled=false;n.disabled=false;j.value="";j.focus();return}n.value=_shoutTrim(n.value);if(m!=""){var i=new RegExp("^"+m,"i");n.value=n.value.replace(i,"")}if(n.value==m||n.value==""){alert("Please enter your message.");o.disabled=false;n.disabled=false;n.value="";n.focus();return}msgVal=n.value;if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=post&session="+_shoutSession+"&name="+encodeURIComponent(j.value)+"&msg="+encodeURIComponent(msgVal)+"&nocache="+new Date().getTime()+"&return="+encodeURIComponent("_shoutPosted(xmlHttp.responseText,'"+o.id+"','"+l+"','"+m+"');"))}else{_shoutAjax("/shout/post.php?session="+_shoutSession+"&name="+encodeURIComponent(j.value)+"&msg="+encodeURIComponent(msgVal)+"&nocache="+new Date().getTime(),"_shoutPosted(xmlHttp.responseText,'"+o.id+"','"+l+"','"+m+"');")}_shoutLastPost=new Date().getTime()}function _shoutPosted(j,h,i,f){var g=document.getElementById(i);g.disabled=false;document.getElementById(h).disabled=false;if(j.match(/^ERROR=/)){j=j.replace(/ERROR=/,"");alert(j);return}g.value="";g.focus();_shoutAudioPlay();_shoutUpdate(j)}function _shoutAudioPlay(){if(!_shoutAudioMute&&_shoutAudioStop&&_shoutAudio!=""&&typeof(_shoutAudio)!="undefined"){_shoutAudio.GotoFrame(3);_shoutAudioStop=false}}function _shoutUpdate(q,s){if(_shoutState==1){return}_shoutState=1;if(!q.match(/ENDOFFILE$/)){return}q=_shoutTrim(q.replace(/ENDOFFILE$/,""));if(_shoutEmpty(_shoutMsgs)){_shoutDoc.innerHTML=""}var g=q.split("/-->");var c="";var p="";var r=0;var o={};var y=0;var d=true;for(var v in g){if(typeof(g[v])!="string"){continue}var b=_shoutTrim(g[v]);var t=b.match(/[0-9]+$/);if(t==null||b==""){continue}var l=_shoutMsgs[t]!=undefined&&_shoutMsgs[t]!="";b=b.replace(/<!--\/SEP[0-9]+/,"");if(r==0){if(l){r=_shoutMsgs[t].match(/shoutBg1/)?1:2}else{r=_shoutColor}_shoutColor=r}if(r==2){b=b.replace(/shoutBg1/g,"shoutBg2")}else{b=b.replace(/shoutBg2/g,"shoutBg1")}var k='<div id="__shout'+t+'">'+b+"</div>";if(l&&_shoutMsgs[t]!=k){document.getElementById("__shout"+t).innerHTML=b}_shoutMsgs[t]=k;r=r==1?2:1;if(!l){if(!y){y=2;if(!d){_shoutAudioPlay()}}c+=k}else{if(y==2){y=1}}p+=k;o[t]=k;d=false}if(!_shoutEmpty(_shoutMsgs)){for(var u in _shoutMsgs){if(_shoutTrim(_shoutMsgs[u])==""){continue}if(o[u]==undefined){_shoutMsgs[u]="";if(document.getElementById("__shout"+u)!=undefined){document.getElementById("__shout"+u).parentNode.removeChild(document.getElementById("__shout"+u))}}}}if(y==1){_shoutDoc.innerHTML="";c=p}var w=document.createElement("div");w.innerHTML=c;var h=w.getElementsByTagName("img");for(var e in h){if(h[e].tagName=="IMG"){h[e].onload=_shoutScroll}}_shoutDoc.appendChild(w);if(_shoutScrollDown){setTimeout("_shoutScroll();_shoutScrollTop = 0;",1)}else{if(s){setTimeout("_shoutDoc.scrollTop = _shoutScrollTop;_shoutScrollTop = 0;",1)}else{_shoutScrollTop=0}}_shoutState=0;_shoutAudioStop=true}function _shoutScroll(){_shoutScrollBottom()}function _shoutScrollBottom(){_shoutDoc.scrollTop=_shoutDoc.scrollHeight;if(_shoutScrollInit==false){if(_shoutFullLoad>0||_shoutDoc.scrollHeight>0){_shoutScrollInit=true}setTimeout("_shoutScrollBottom()",100)}}function _shoutDelete(b){_shoutRefresh(false);if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=delete&session="+_shoutSession+"&id="+b+"&return="+encodeURIComponent("_shoutDeleted(xmlHttp.responseText);"))}else{_shoutAjax("/shout/delete.php?session="+_shoutSession+"&id="+b,"_shoutDeleted(xmlHttp.responseText);")}}function _shoutDeleted(b){if(b.match(/^ERROR=/)){b=b.replace(/ERROR=/,"");alert(b);return}_shoutUpdate(b,true)}function _shoutBan(b){_shoutRefresh(false);if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=delete&session="+_shoutSession+"&id="+b+"&ban=1&return="+encodeURIComponent("_shoutBanned(xmlHttp.responseText);"))}else{_shoutAjax("/shout/delete.php?session="+_shoutSession+"&id="+b+"&ban=1","_shoutBanned(xmlHttp.responseText);")}}function _shoutTempBan(b){_shoutRefresh(false);if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=delete&session="+_shoutSession+"&id="+b+"&tempban=1&return="+encodeURIComponent("_shoutBanned(xmlHttp.responseText);"))}else{_shoutAjax("/shout/delete.php?session="+_shoutSession+"&id="+b+"&tempban=1","_shoutBanned(xmlHttp.responseText);")}}function _shoutBanned(b){if(b.match(/^ERROR=/)){b=b.replace(/ERROR=/,"");alert(b);return}_shoutUpdate(b,true)}function _shoutRefresh(b){_shoutAudioStop=false;_shoutScrollTop=_shoutDoc.scrollTop;_shoutScrollLast=0;_shoutState=2;_shoutIdle=0;_shoutLastPost=new Date().getTime();_shoutMsgs={};_shoutDoc.innerHTML='<div style="padding:4px;text-align:center">REFRESHING...</div>';if(b!==false){_shoutGetContent(false,true)}return false}function _shoutPrefill(b){document.getElementById("shoutboxMsg").value="@"+b+" - ";if(document.getElementById("shoutboxMsg").type=="text"){document.getElementById("shoutboxMsg").focus()}}function _shoutAjax(url,codeSuccess){var xmlHttp;try{xmlHttp=new XMLHttpRequest()}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return false}}}xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){eval(codeSuccess)}};xmlHttp.open("GET",url,true);xmlHttp.send(null)}function _shoutScript(b){var c=document.getElementsByTagName("head")[0]||document.documentElement;var a=document.createElement("script");a.src=b;a.async=true;a.id="_shoutScript"+_shoutScriptID++;a.onload=a.onreadystatechange=function(){a.onload=a.onreadystatechange=null;if(c&&a.parentNode){setTimeout("_shoutScriptRemove('"+a.id+"');",10000)}};c.insertBefore(a,c.firstChild)}function _shoutScriptRemove(c){var b=document.getElementsByTagName("head")[0]||document.documentElement;var a=document.getElementById(c);b.removeChild(a)}function _shoutEmpty(d){for(var c in d){if(d.hasOwnProperty(c)){return false}}return true}function _shoutTrim(b){return b.replace(/^\s+|\s+$/g,"")}function _shoutMute(b){if(!_shoutAudio){return false}document.getElementById("shoutboxMute").style.display="none";document.getElementById("shoutboxUnmute").style.display="";_shoutAudioMute=true;if(b===true){return false}if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=mute&value=1&return="+encodeURIComponent("_shoutVoid();"))}else{_shoutSet("isMuted","1")}return false}function _shoutUnmute(b){if(!_shoutAudio){return false}document.getElementById("shoutboxMute").style.display="";document.getElementById("shoutboxUnmute").style.display="none";_shoutAudioMute=false;if(b===true){return false}if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=mute&value=0&return="+encodeURIComponent("_shoutVoid();"))}else{_shoutSet("isMuted","0")}return false}function _shoutAudioDefault(d,c){if(d=="1"||(d==""&&_shoutAudioStatus=="1")){_shoutMute(c)}else{_shoutUnmute(c)}}function _shoutShow(b){if(document.getElementById("shoutboxContainer")==undefined||document.getElementById("shoutboxHidden")==undefined){return false}document.getElementById("shoutboxContainer").style.display="";document.getElementById("shoutboxHidden").style.display="none";_shoutHidden=false;if(b===true){return false}if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=hide&value=0&return="+encodeURIComponent("_shoutVoid();"))}else{_shoutSet("isHidden","0")}return false}function _shoutHide(b){if(document.getElementById("shoutboxContainer")==undefined||document.getElementById("shoutboxHidden")==undefined){return false}document.getElementById("shoutboxContainer").style.display="none";document.getElementById("shoutboxHidden").style.display="";_shoutHidden=true;if(b===true){return false}if(_shoutScriptTrick){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action=hide&value=1&return="+encodeURIComponent("_shoutVoid();"))}else{_shoutSet("isHidden","1")}return false}function _shoutHideDefault(d,c){if(d=="1"){_shoutHide(c)}else{_shoutShow(c)}}function _shoutVoid(){}function _shoutGet(b){if(_shoutEmpty(_shoutSettings)){if(document.cookie.length<=0){return""}var c=document.cookie.split(";").reverse().join(";");var a="_shout=";var d=c.indexOf(a);if(d<0){return""}d+=a.length;cEnd=c.indexOf(";",d);if(cEnd<0){cEnd=c.length}var c=c.substring(d,cEnd).split("|");for(x in c){if(c[x]==""){continue}var e=c[x].split("_");_shoutSettings[e[0]]=e[1]}}if(_shoutSettings[b]!=undefined){return _shoutSettings[b]}else{return""}}function _shoutSet(b,c){_shoutSettings[b]=c;var d="";for(x in _shoutSettings){d+=x+"_"+_shoutSettings[x]+"|"}var a=new Date(new Date().getTime()+(1000*60*60*24*365)).toGMTString();document.cookie="_shout="+d+";path=/;expires="+a+";domain=."+_shoutHTTPPrefix.replace(/^https?:\/\//,"").replace(/^www\./,"")}function _shoutWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}function _shoutWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0}function _shoutScrollHeight(){return document.body.scrollHeight||document.body.offsetHeight||0}function _shoutPop(b,a,c,f){if(_shoutScriptTrick){surl=b.split("?");if(surl[0].match("info.php$")&&surl[1].match("^emoticons&")){return _shoutPop2(surl[1],a,c,f)}}var e=(screen.width/2)-(a/2);var d=(screen.height/2)-(c/2);window.open(b,f,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+a+",height="+c+",top="+d+",left="+e)}function _shoutPop2(b,a,c,d){_shoutScript(_shoutHTTPPrefix+"/shout/get.php?action="+b+"&return="+encodeURIComponent("_shoutPop3(xmlHttp.responseText,"+a+","+c+",'"+d+"');"))}function _shoutPop3(c,a,b,g){var f=(screen.width/2)-(a/2);var e=(screen.height/2)-(b/2);var d=window.open("",g,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+a+",height="+b+",top="+e+",left="+f);if(d===null){alert("It appears you have a pop-up blocker. Please disable the pop-up blocker or allow our website to it.")}else{d.document.write(c);d.document.close()}};
