var index=0
var url1=''

function hideImage() {
if (document.all) {
showLayer.style.visibility='hidden'
}
else {
myBox.visibility='hidden'
}
}

function showImage(url) {
if (document.all) {
if (index==0) {
 showLayer.style.left=(screen.width-400)/2
 showLayer.style.top=0
   index++
}

if (url1!=url) {
showLayer.innerHTML="<table border=1 cellpadding=5 cellspacing=0 bordercolor=#DEEFEF bgcolor=#003399><tr><td align=center><a  href=# onclick='hideImage()'><img src="+url+" border=0 alt='click to close'></a></td></tr><tr><td align=center><a  href=# onclick='hideImage()'><font color=#FFFFFF><B>Закрыть окно</B></font></a></td></tr></table>"
url1=url
}
showLayer.style.visibility='visible'
}

else {
if (index==0) {
   myBox=new Layer(10); myBox.top=0; myBox.left=(screen.width-400)/2;
   index++
}

if(url1!=url) {
myBox.document.write("<table border=1 cellpadding=5 cellspacing=0 bordercolor=#DEEFEF bgcolor=#003399><tr><td align=center><a  href=# onclick='hideImage()'><img src="+url+" border=0 alt='click to close'></a></td></tr><tr><td align=center><a  href=# onclick='hideImage()'><font color=#FFFFFF><B>Close window</B></font></a></td></tr></table>");
myBox.document.close();
url1=url
}
myBox.visibility="show";	// other possible value is "hide" or "visible";
}

}

function showWin(url) {
wi=500
he=400
eval(newWin=window.open(url,'wind','toolbar=no, menubar=yes, scrollbars=yes, resizable, width=' + wi  + ' height=' + he ))
newWin.focus()
}


