function BeginLayer(z,left,top)
{
if (document.layers){document.writeln('<layer z-index='+z+' left='+left+' top='+top+'>');}
else {document.writeln('<DIV style="position: absolute; z-index='+z+'; left: '+left+'px; top: '+top+'px;">');}
}

function EndLayer()
{
if (document.layers){document.writeln('</layer>');} else {document.writeln('</DIV>');}
}

function GetwinH()
{
winH = (document.layers)? window.innerHeight : document.body.offsetHeight;
return winH;
}

function GetwinW()
{
winW = (document.layers)? window.innerWidth-16 : document.body.offsetWidth-20;
return winW;
}

function CorrectHeight(SpaceHeight)
{
//MaxHeight=GetwinH();
//Delta=80;
//if (H1<MaxHeight)
//  {
//SpaceHeight=MaxHeight-H1-Delta;
//alert(SpaceHeight);
document.writeln('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="100%" bgcolor="#FFFFFF"><TR>');
document.writeln('<TD WIDTH=10><IMG SRC="img/spacer.gif" width="10" height="'+SpaceHeight+'"></TD>');	
document.writeln('</TR></TABLE>');
//  }
}

function Openw1(name,x,y){
y=y+20;
pid = 'win' + Math.round((Math.random() * (10000000)));
window.open('/file/photo.php?f='+name, pid,'scrollBars=no,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width='+x+', height='+y+', top=10,left=10');
}

