startList = function() { 
var nodes = document.getElementById("nav").getElementsByTagName("LI"); 
for (var i=0; i<nodes.length; i++) { 
nodes[i].onmouseover = function() { 
this.className += " over"; 
} 
nodes[i].onmouseout = function() { 
this.className = this.className.replace(new RegExp(" over\\b"), ""); 
} 
} 
} 
if (window.attachEvent) window.attachEvent("onload", startList);

function wind(Url, width, heigth){
wid=window.open(Url,"wind","width="+width+",height="+heigth+",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=yes,toolbar=no");
wid.focus();
}

function printit(){ 
window.print(); 
} 

function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+60;
  stringa="width="+largh+",height="+altez;
  finestra=window.open('',"finestra",stringa);  
  finestra.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>Просмотр фото</title><style>body{background : #E2D3B7;}.button {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.75em; color: #ECE9BC; border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: #5f3401;  font-weight : bold; cursor:hand;}</style></head><body><center><img src="+img+" border=1><br><br><input type=\"submit\" onclick=\"javascript:window.close()\" value=\"Закрыть\" class=\"button\"><br></center><br><br></body></html>");
  finestra.document.images[0].src=img;
  finestra.focus();
}







