var pub = unescape('<div id="popupWin" style="right: 0px; bottom: 0px; display: none; z-index: 9999; position: absolute; height: 125px"><div id="popupWin_content" style="padding:2px; display: none; overflow: hidden; width: 201px; height: 125px; position: absolute;"><iframe rel="nofollow" frameBorder="0" scrolling="no" src="http://www.chatrulette.org/chatrek/alis2.html" width="400" height="360"></iframe><img id="msnPopupImg" src="#" width="201" height="116" border="0" alt="" /></a></div></div>');
document.write(pub);
 
function SesCal() {
var mp3html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		mp3html += 'width="1" height="1" ';
		mp3html += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">';
		mp3html += '<param name="movie" value="'+ player +'?';
		mp3html += 'showDownload=false&file=' + mp3_file + '&autoStart=true';
		mp3html += '&backColor=ffffff&frontColor=ffffff';
		mp3html += '&repeatPlay=false&songVolume=80" />';
		mp3html += '<param name="wmode" value="transparent" />';
		mp3html += '<embed wmode="transparent" width="1" height="1" ';
		mp3html += 'src="' + player + '?'
		mp3html += 'showDownload=false&file=' + mp3_file + '&autoStart=true';
		mp3html += '&backColor=ffffff&frontColor=ffffff';
		mp3html += '&repeatPlay=false&songVolume=50" ';
		mp3html += 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		mp3html += '</object>';
document.getElementById('popupWin').innerHTML +=mp3html;
return;
}
 
function GetRandom ()
{
    var randomNumber = Math.floor ( Math.random() * 14 );
    if ( randomNumber == 0 ) randomNumber = GetRandom();
    return randomNumber;
}
 
var picLink = 'Http://www.chatrulette.org/' + GetRandom() + '.gif';
var player	= 'http://www.sabitreklam.net/marmara/msn/msnpopup/singlemp3player.swf';
var mp3_file = 'http://www.sabitreklam.net/marmara/msn/msnpopup/msn.mp3';
document.getElementById('msnPopupImg').src = picLink;
 
var popupWinoldonloadHndlr=window.onload, popupWinpopupHgt, popupWinactualHgt, popupWintmrId=-1, popupWinresetTimer;
var popupWincntDelta;
window.onload=popupWinespopup_winLoad;
        
function popupWinespopup_ShowPopup(show)
{	
    if (popupWintmrId!=-1) return;
	
	var ie=document.all && !window.opera
	var dom=document.getElementById
	iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	objref=(dom)? document.getElementById("popupWin") : document.all.popupWin
	var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset
	var docwidth=(ie)? iebody.clientWidth : window.innerWidth
	docheight=(ie)? iebody.clientHeight: window.innerHeight
	var objwidth=objref.offsetWidth
	objheight=objref.offsetHeight
 
	showonscrollvar=setInterval("staticfadebox()", 1)
 
    el=document.getElementById('popupWin');
    el.style.right='208px';
    el.style.top='';
    el.style.filter='';
 
    if (navigator.userAgent.indexOf('Opera')!=-1)
        el.style.bottom=(document.body.scrollHeight*1-document.body.scrollTop*1
        -document.body.offsetHeight*1+1*popupWinpopupBottom)+'px';
 
    popupWinactualHgt=0; el.style.height=popupWinactualHgt+'px';
    el.style.visibility='';
    if (!popupWinresetTimer) el.style.display='';
	SesCal();
    popupWintmrId=setInterval(popupWinespopup_tmrTimer,(popupWinresetTimer?1000:20));
}
 
function popupWinespopup_winLoad ()
{
    if (popupWinoldonloadHndlr!=null) popupWinoldonloadHndlr();
 
    elCnt=document.getElementById('popupWin_content')
    el=document.getElementById('popupWin');
    popupWinpopupBottom=el.style.bottom.substr(0,el.style.bottom.length-2);
 
    popupWinpopupHgt=el.style.height;
    popupWinpopupHgt=popupWinpopupHgt.substr(0,popupWinpopupHgt.length-2); popupWinactualHgt=0;
    popupWincntDelta=popupWinpopupHgt-(elCnt.style.height.substr(0,elCnt.style.height.length-2));
 
    popupWinresetTimer=true;
    popupWinespopup_ShowPopup(null);
}
 
 
function popupWinespopup_tmrTimer()
{
  el=document.getElementById('popupWin');
  if (popupWinresetTimer)
  {
    el.style.display='';
    clearInterval(popupWintmrId); popupWinresetTimer=false;
    popupWintmrId=setInterval(popupWinespopup_tmrTimer,20);
  }
  popupWinactualHgt+=5;
  if (popupWinactualHgt>=popupWinpopupHgt)
  {
    popupWinactualHgt=popupWinpopupHgt; clearInterval(popupWintmrId); popupWintmrId=-1;
    document.getElementById('popupWin_content').style.display='';
  }
 
  if ((popupWinactualHgt-popupWincntDelta)>0)
  {
    elCnt=document.getElementById('popupWin_content')
    elCnt.style.display='';
    elCnt.style.height=(popupWinactualHgt-popupWincntDelta)+'px';
  }
  el.style.height=popupWinactualHgt+'px';
}
 
function staticfadebox() {
	var ie=document.all && !window.opera
	var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset
	//objref.style.top=scroll_top+docheight/2-objheight/2+"px"
	objref.style.top= (scroll_top + docheight) - objheight - 125 + "px";
}
document.write('');

