// JavaScript Document

function toggleSub(submenu) {
    if (document.getElementById(submenu).style.display == 'none') {
        document.getElementById(submenu).style.display = 'block'
    } else {
        document.getElementById(submenu).style.display = 'none'
    }
}

function popImage(img){
  myImage= new Image();
  myImage.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((myImage.width!=0)&&(myImage.height!=0)){
    viewImage(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewImage(img){
  largh=myImage.width+20;
  altez=myImage.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
