function NewWindow(mypage,myname,w,h,scroll,pos){
var win=null;
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}

function sac4pgamediv(gheight,gwidth)
{
document.getElementById('adsdiv').style.display = 'none';
var cdiv = document.getElementById('zgamediv');
var gdiv = document.getElementById('gamediv');
cdiv.style.height= gheight +'px';
cdiv.style.width= gwidth + 'px';
 if(gdiv){
 gdiv.style.height= gheight +'px';
 gdiv.style.width= gwidth + 'px';
 }
}


function gWindow(mypage,myname,w,h,scroll,pos){
 document.getElementById('wiinf').innerHTML = ' ';

 var win=null;
 if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()* ((screen.height-h)-75)):100;}
 if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
 else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}

function SmallWindow(wintype,width,height) {
t=screen.height/2-height;
w=screen.width/2-width;
SmallWin=window.open(wintype,"SmallWin","toolbar=no,directories=no,status=no,scrollbars=auto,menubar=no,width="+width+",height="+height+",top="+t+",left="+w+"");
SmallWin.window.focus()
}
function sendmsg(wintype) {
t=screen.height/2-150;
w=screen.width/2-200;
SmallWin=window.open(wintype,"sendmsg","toolbar=no,directories=no,status=no,scrollbars=auto,menubar=no,width=400,height=300,top="+t+",left="+w+"");
SmallWin.window.focus()
}
function log_out(confirmation_message)
{
        var ht = document.getElementsByTagName("html")[0];
        ht.style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
        if (confirm(confirmation_message))
        {
                return true;
        }
        else
        {
                ht.style.filter = "";
                return false;
        }
}

 R_random = new String (Math.random()); R_random = R_random.substring(2,11);
 document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
 document.write ("online.php?n=" + R_random);
 if (document.referrer)
 document.write ("&amp;referer=" + document.referrer);
 document.write ("'><" + "/script>");

