var im=(function(){function j(G){var K="",I=document.getElementById("smimad").src;if(I.indexOf("?")>-1){var F=I.substr(I.indexOf("?")).toLowerCase();var H=F.split("&");for(var E=0;E<H.length;E++){if(H[E].indexOf(G.toLowerCase()+"=")>-1){var J=H[E].split("=");K=J[1];break}}}return unescape(K)}function x(E){return E.replace(/(^\s+|\s+$)/g,"")}var d=x("http://"+j("sk")),A=j("novideo"),f=j("muted")||0,h=j("flip")||1,b=j("taskbar")||1,m=j("UHNSMTY")||undefined,g=(j("AFNO")+((typeof m!=="undefined")?"&UHNSMTY="+m:""))||undefined,c=(b==1)?30:0,t=1,n,s,a=(navigator.userAgent.indexOf("MSIE 6")!=-1&&typeof document.documentElement!="undefined"&&typeof document.documentElement.clientHeight!="undefined"),D=(navigator.userAgent.indexOf("MSIE")!=-1&&document.compatMode=="BackCompat"),w=((window.location.href.indexOf("#")>13)?escape(window.location.href.substring(0,window.location.href.indexOf("#"))):escape(window.location.href));if(d.indexOf("xhamstercams")!=-1){t=2}function e(G,F){for(var E in F){if(F.hasOwnProperty(E)){G.style[E]=F[E]
}}}function y(G,F){for(var E in F){if(F.hasOwnProperty(E)){G.setAttribute(E,F[E])}}}function u(G,F,E){if(G.attachEvent){G["e"+F+E]=E;G[F+E]=function(){G["e"+F+E](window.event)};G.attachEvent("on"+F,G[F+E])}else{G.addEventListener(F,E,false)}}function p(J,I,E,G){var F=document.createElement("div");F.setAttribute("id",J);e(F,I);if(E===true){var H=document.createElement("iframe");y(H,G);F.appendChild(H)}document.body.appendChild(F)}function B(){if(parseInt(o.style.bottom,10)>=c){clearInterval(o.timer);o.style.bottom=c+"px";delete (o)}else{o.style.bottom=(parseInt(o.style.bottom,10)+5)+"px"}return}function z(F){var I=F+"=",E=document.cookie.split(";");for(var G=0;G<E.length;G++){var H=E[G];while(H.charAt(0)==" "){H=H.substring(1,H.length)}if(H.indexOf(I)===0){return H.substring(I.length,H.length)}}return null}function r(H,F){var E="";if(F){var I="ifrm";var G=new Date();G.setTime(G.getTime()+(F*60*60*1000));var E="; expires="+G.toGMTString()}document.cookie=H+"="+I+E+"; path=/"}function q(E){if(E===false){r("smad",24);
if(navigator.userAgent.indexOf("MSIE")!=-1){if(document.getElementById("chatWindow")){document.getElementById("chatWindow").style.display="none";document.body.removeChild(document.getElementById("chatWindow"))}if(document.getElementById("chatDisconnect")){document.getElementById("chatDisconnect").style.display="none";document.body.removeChild(document.getElementById("chatDisconnect"))}if(document.getElementById("closeChatArea")){document.getElementById("closeChatArea").style.display="none";document.body.removeChild(document.getElementById("closeChatArea"))}}else{if(document.getElementById("chatWindow")){document.body.removeChild(document.getElementById("chatWindow"))}if(document.getElementById("chatDisconnect")){document.body.removeChild(document.getElementById("chatDisconnect"))}if(document.getElementById("closeChatArea")){document.body.removeChild(document.getElementById("closeChatArea"))}}}else{r("smad2",24);if(navigator.userAgent.indexOf("MSIE")!=-1){if(document.getElementById("chatWindow")){document.getElementById("chatWindow").style.display="none";
document.body.removeChild(document.getElementById("chatWindow"))}if(document.getElementById("chatDisconnect")){document.getElementById("chatDisconnect").style.display="none";document.body.removeChild(document.getElementById("chatDisconnect"))}if(document.getElementById("closeChatArea")){document.getElementById("closeChatArea").style.display="none";document.body.removeChild(document.getElementById("closeChatArea"))}if(document.getElementById("taskbar")){document.getElementById("taskbar").style.display="none";document.body.removeChild(document.getElementById("taskbar"))}if(document.getElementById("closeArea")){document.getElementById("closeArea").style.display="none";document.body.removeChild(document.getElementById("closeArea"))}}else{if(document.getElementById("chatWindow")){document.body.removeChild(document.getElementById("chatWindow"))}if(document.getElementById("chatDisconnect")){document.body.removeChild(document.getElementById("chatDisconnect"))}if(document.getElementById("closeChatArea")){document.body.removeChild(document.getElementById("closeChatArea"))
}if(document.getElementById("taskbar")){document.body.removeChild(document.getElementById("taskbar"))}if(document.getElementById("closeArea")){document.body.removeChild(document.getElementById("closeArea"))}}}}function l(){if(window.location.hash.indexOf("#smimadcls")!=-1){if(window.location.hash.indexOf("#smimadcls2")!=-1){q(true);if(n){clearInterval(n)}}else{if(window.location.hash.indexOf("#smimadcls")!=-1){q(false)}}window.location.hash=""}return false}function k(){if(a&&!D){if(document.getElementById("taskbar")){document.getElementById("taskbar").style.top=document.documentElement.clientHeight+document.documentElement.scrollTop-document.getElementById("taskbar").offsetHeight}if(document.getElementById("chatWindow")){document.getElementById("chatWindow").style.top=document.documentElement.clientHeight+document.documentElement.scrollTop-document.getElementById("chatWindow").offsetHeight-c}}else{if(D){if(document.getElementById("taskbar")){document.getElementById("taskbar").style.top=document.body.clientHeight+document.body.scrollTop-document.getElementById("taskbar").offsetHeight
}if(document.getElementById("chatWindow")){document.getElementById("chatWindow").style.top=document.body.clientHeight+document.body.scrollTop-document.getElementById("chatWindow").offsetHeight-c}}}}if(z("smad2")==null&&Math.floor(Math.random()*t)==0){if(b==1){p("taskbar",{display:"block",width:"100%",height:"30px",margin:"0px",zIndex:99998,position:((a||D)?"absolute":"fixed"),bottom:"0px",left:"0px"},true,{id:"tbFrame",name:"tbFrame",src:d+"/exports/taskbar/?src="+w+((typeof g!="undefined")?"&AFNO="+g:""),width:"100%",height:"30px",scrolling:"no",frameBorder:"no",allowTransparency:true,marginHeight:0,marginWidth:0})}n=setInterval(l,1000);if(a||D){s=setInterval(k,33)}if(z("smad")==null){var i=(A==="1")?"/exports/taskbar/?novideo=1":"/exports/golive/iframe/?close=1&enter=0&hd=1&logo=0&flip="+h+"&volume=50&muted="+f+"&t=bio&src="+w;if(typeof g!="undefined"){i+="&AFNO="+g}p("chatWindow",{overflow:"hidden",display:"block",background:"none",width:"315px",height:"300px",margin:"0px",zIndex:99996,position:((a||D)?"absolute":"fixed"),bottom:((a||D)?((b)?"30px":"0px"):"-315px"),right:((a||D)?"0px":"-4px")},true,{id:"cwFrame",name:"cwFrame",src:d+i,width:315,height:300,scrolling:"no",frameBorder:"no",allowTransparency:true,marginHeight:0,marginWidth:0});
if(!(a||D)){p("closeChatArea",{display:"block",width:"30px",height:"25px",margin:"0px",zIndex:99999,position:"fixed",bottom:"300px",right:"0",cursor:"pointer"});var v=document.createElement("a");v.setAttribute("id","closeChatPopup");e(v,{display:"block",width:"25px",height:"25px",lineHeight:"25px",margin:"0px",textIndent:"-9999px"});v.setAttribute("onclick","im.closePopup(false)");v.href="javascript:im.closePopup(false);";v.innerHTML="link";document.getElementById("closeChatArea").appendChild(v)}var o=document.getElementById("chatWindow");if(typeof o!="undefined"&&!(a||D)){o.timer=setInterval(B,33)}}if(b==1){p("closeArea",{display:"block",width:"20px",height:"30px",margin:"0px",zIndex:99999,position:"fixed",bottom:"0px",right:"0px",cursor:"pointer"});var C=document.createElement("a");C.setAttribute("id","closePopup");e(C,{display:"block",background:"url(http://cdn.nsimg.net/2.0/shared/images/200911b/spacer.gif)",width:"20px",height:"30px",lineHeight:"30px",margin:"0px",textIndent:"-9999px",zIndex:99999,position:"fixed",bottom:"0px",right:"0px",cursor:"pointer"});
C.setAttribute("onclick","im.closePopup()");C.href="javascript:im.closePopup();";C.innerHTML="link";document.getElementById("closeArea").appendChild(C)}return{closePopup:q}}})();
