
var Sir = {
stations:null,player:null,station:null,count:0,shade:null,link:null,iframe:null,resize:null,
load:setInterval(function(){Sir.count++;if(typeof document.getElementsByTagName!='undefined'&&(document.getElementsByTagName('body')[0]!= null||document.body!=null)){clearInterval(Sir.load);Sir.ready();}if(Sir.count>10){clearInterval(Sir.load);Sir.ready();}},250),
ready:function(){if(window.location.hash.indexOf("#sir/")==0){Sir.play(window.location.hash.replace(/#sir\//,''));}else if(document.getElementById("sir_frame")){Sir.play(document.getElementById("sir_frame").title);}},
close:function(){clearInterval(Sir.resize);Sir.iframe.style.display="none";Sir.shade.style.display="none";Sir.link.style.display="none";Sir.iframe.src="";},
play:function(u){
	Sir.station = Sir.stations[u.split("/")[0]];
	if(!Sir.station){Sir.station=[800,600,"f3f3f3","777777","white"];}
	var d = document;
	if(!Sir.shade){
		Sir.shade=d.createElement("div");
		Sir.shade.style.position="absolute";
		Sir.shade.style.zIndex="900";
		Sir.shade.style.top="0px";
		Sir.shade.style.left="0px";
		Sir.shade.style.cursor="default";
		Sir.shade.style.display="none";
		Sir.shade.style.opacity="0.6";
		Sir.shade.onclick=Sir.close;
		d.body.appendChild(Sir.shade);
	}
	if(!Sir.link){
		Sir.link=d.createElement("div");
		Sir.link.style.display="none";
		Sir.link.style.position="absolute";
		Sir.link.style.textAlign="center";
		Sir.link.style.verticalAlign="middle";
		Sir.link.style.font="20px normal normal arial,sans-serif";
		Sir.link.style.lineHeight="normal";
		Sir.link.style.webkitBorderRadius="7px";
		Sir.link.style.cursor="pointer";
		Sir.link.style.width="30px";
		Sir.link.style.paddingLeft="3px";
		Sir.link.style.height="25px";
		Sir.link.style.zIndex="901";
		Sir.link.onclick=Sir.close;
		Sir.link.appendChild(d.createTextNode("x"));
		d.body.appendChild(Sir.link);
	}
	
	if(!Sir.iframe){
		Sir.iframe=d.createElement("iframe");
		Sir.iframe.style.position="absolute";
		Sir.iframe.style.zIndex="902";
		Sir.iframe.style.webkitBorderRadius="1px";
		Sir.iframe.marginWidth=0;
		Sir.iframe.marginHeight=0;
		Sir.iframe.frameBorder="0";
		Sir.iframe.scrolling="no";
		if(document.getElementById("sir_frame")){
			d.getElementById("sir_frame").appendChild(Sir.iframe);
		}else{
			d.body.appendChild(Sir.iframe);
		}
	}
	
	Sir.link.style.color="#" + Sir.station[2];
	Sir.link.style.background="#" + Sir.station[3];
	Sir.link.style.border="1px solid #" + Sir.station[3];
	Sir.link.style.webkitBoxShadow="0px -0px 50px #" + Sir.station[3];		
	Sir.shade.style.backgroundColor="#"+Sir.station[2];
	Sir.iframe.style.background=Sir.station[4];
	
	
	Sir.iframe.src="http://www.sayitright.tv/"+u;
	Sir.iframe.style.width=Sir.station[0]+"px";
	Sir.iframe.style.height=Sir.station[1]+"px";
			
	Sir.size();

	if(d.getElementById("sir_frame")){
		Sir.iframe.style.display="block";
		Sir.iframe.style.position="static";
		Sir.shade.style.display="none";
		Sir.link.style.display="none";
	}else{
		Sir.iframe.style.webkitBoxShadow="0px -0px 50px #" + Sir.station[3];
		Sir.iframe.style.border="1px solid #" + Sir.station[3];
		Sir.iframe.style.position="absolute";
		Sir.shade.style.display="block";
		Sir.link.style.display="block";
		Sir.iframe.style.display="block";
		Sir.resize=setInterval(function(){Sir.size();},1000);
	}

	return false;
},
size:function(){
	var d = document;
	var w = d.documentElement?Math.max(d.documentElement.scrollWidth,d.documentElement.clientWidth):Math.max(d.body.scrollWidth,d.body.clientWidth);
	var h = d.documentElement?Math.max(d.documentElement.scrollHeight,d.documentElement.clientHeight):Math.max(d.body.scrollHeight,d.body.clientHeight);
	var t = Math.max(10,((window.innerWidth?window.innerHeight:(d.documentElement?d.documentElement.clientHeight:d.body.clientHeight))/2)-(Sir.station[1]/2));
	var l = Math.max(10,((window.innerWidth?window.innerWidth:(d.documentElement?d.documentElement.clientWidth:d.body.clientWidth))/2)-(Sir.station[0]/2));
	Sir.shade.style.width=w+"px";
	Sir.shade.style.height=h+"px";
	Sir.iframe.style.top=t+"px";
	Sir.iframe.style.left=l+"px";
	Sir.link.style.top=t+"px";
	Sir.link.style.left=l+Sir.station[0]-5+"px";
}
};Sir.stations={agNzaXJyDgsSB0FjY291bnQYgQMM:[830,830,"0d2855","ffffff","white"],last:[]};