var nw2
function openImg(names,diment0,diment1){

w=screen.availWidth;
h=screen.availHeight;
dw=(diment0>w)?w:diment0;
dh=(diment1>h)?h:diment1;
ddw=(diment0>w)?(dw-10):dw;
ddh=(diment1>h)?(dh-60):dh;

dl=(w-dw)/2;
dt=(h-dh)/2;
if(nw2){nw2.close()}
nw2=open("", "nw2", "width="+dw+" height="+dh+" top="+dt+" left="+dl+"")
nw2.document.write('<html><head><title></title></head><body style="margin:0px;overflow:auto;"><div style="width:'+ddw+'px;height:'+ddh+'px;overflow:auto;"><img src="'+names+'"></div></body></html>')
nw2.document.close();
}

var openMovieWindd
function openMovieWind(names,diment0,diment1){
w=(screen.availWidth-diment0)/2;
h=(screen.availHeight-diment1)/2;
if(openMovieWindd){
openMovieWindd.close()
}
openMovieWindd=open("", "openMovieWind", "width="+diment0+" height="+diment1+" top="+h+" left="+w+"")
openMovieWindd.document.write('<html><head><title></title></head><body style="margin:0px;"><object width="'+diment0+'" height="'+diment1+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1"><param name="Filename" value="'+names+'" /><param name="AutoStart" value="True" /><param name="ShowControls" value="true" /><param name="ShowStatusBar" value="False" /><param name="ShowDisplay" value="False" /><param name="AutoRewind" value="True" /><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="'+diment0+'" height="'+diment1+'" src="'+names+'" filename="'+names+'" autostart="True" showcontrols="true" showstatusbar="False" showdisplay="False" autorewind="True"> </embed></object></body></html>')
openMovieWindd.document.close();
}



function opensitemap(x,ma){
if(ma==0){
if(x==16){
location.href="gallery.php?leng="+leng;
}else{
location.href="index.php?Id_pg="+x;
}
}
if(ma==20){
location.href="index.php?Id_pg=20&progAct="+x;
}
}

function goBacki(){
window.history.back();
}
