function show_mytext(id)
{
UserWin=window.open('showmytext.php?id='+id, ('OpenUserWin'+id), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width=500,height=400');
UserWin.focus();
}
function show_photo(id)
{
UserWin=window.open('photoalbum.php?id='+id, ('OpenUserWin'+id), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width=500,height=400');
UserWin.focus();
}
function show_tovar(id)
{
UserWin=window.open('phototovar.php?id='+id, ('OpenUserWin'+id), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width=500,height=400');
UserWin.focus();
}
function show_img(id,width,height,adm)
{
   var a
   var b
   var url
   vidWindowWidth=width;
   vidWindowHeight=height;
   a=(screen.height-vidWindowHeight)/5;
   b=(screen.width-vidWindowWidth)/2;
   features="top="+a+",left="+b+",width="+vidWindowWidth+",height="+vidWindowHeight+",toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=no";
   url="show.php?id="+id;
   if (adm=='true') url = ""+url;
   window.open(url,'',features,true);
}
function gomess(to)
{
var w=526, h=300;
var left=parseInt((screen.availWidth/2)-(w/2));
var top=parseInt((screen.availHeight/2)-(h/2));
messN=window.open('modules/messages/messages.php?id='+to, ('messWinN'+to), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width='+w+',height='+h+',left='+left+',top='+top);
messN.focus();
}
function histmes(uid)
{
var w=526, h=300;
var left=parseInt((screen.availWidth/2)-(w/2));
var top=parseInt((screen.availHeight/2)-(h/2));
histmesN=window.open('histmes.php?uid='+uid, ('histmesWinN'+uid), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width='+w+',height='+h+',left='+left+',top='+top);
histmesN.focus();
}
function showmes(m)
{
var w=526, h=300;
var left=parseInt((screen.availWidth/2)-(w/2));
var top=parseInt((screen.availHeight/2)-(h/2));
showmesN=window.open('messages.php?id='+m, ('showmesWinN'+m), 'toolbar=0,titlebar=0,location=0,menubar=0,status=0,scrollbars=1,width='+w+',height='+h+',left='+left+',top='+top);
showmesN.focus();
}

d=document;  
g=function(a){return d.getElementById(a);}  
FF=navigator.appName=="Netscape"; /*isGecko*/  
    zMax=1;mouseDown=0;    //установки скрипта  
    var posY,posX;    //переменные скрипта  

d.onmousedown=function(e){  
    if((t=FF?e.target:event.srcElement).className!="head")return;    //отсечка лишнего  
    mouseDown=g('drag1');  
    posY=(FF?e.pageY:event.y+d.body.scrollTop)-parseInt(mouseDown.offsetTop);  
    posX=(FF?e.pageX:event.x+d.body.scrollLeft)-parseInt(mouseDown.offsetLeft);    //начальная точка захвата  
    t.style.zIndex=zMax++;        //подъём слоя над другими  
}  
d.onmousemove=function eMove(e){if(!mouseDown)return;  
    mouseDown.style.top=(FF?e.pageY:event.y+d.body.scrollTop)-posY;  
        mouseDown.style.left=(FF?e.pageX:event.x+d.body.scrollLeft)-posX;  
}  
d.onmouseup=function(e){mouseDown=0; }  
d.ondragstart=d.onselectstart=function(){if(event.srcElement.className=="head")event.returnValue=!1; 

}  

function MyClose() 
{
window.close();
}

