function en_menu_select (pItem, pState) {
  if (pState) {
     document.getElementById(pItem).className = 'selected';
  } else {
     document.getElementById(pItem).className = 'not-selected';
  }
  return false;
}

function en_menu_click (pItem, pType) {
  var mItem
  switch (pType) {
         case "A":
           mItem = "default.asp?content=article&articoli_id="+pItem;
           document.location = mItem;
           break;
         case "_blank":
           mItem = pItem;
           window.open(mItem);
           break;
         default:
           mItem = pItem;
           document.location = mItem;
  }
  return false;
}

function enChangePhoto (pURL) {
  document.getElementById("loadPhoto").innerText="Loading photo...";
  document.getElementById("foto").src = "public/photos/"+pURL;
  //while not(document.getElementById("foto").complete) {
  //}
  document.getElementById("loadPhoto").innerText="";
}

function enToggle (pField) {
  mToggle = document.getElementById(pField+"_toggle");
  mField  = document.getElementById(pField);
  mStyle  = mField.style.display;
  if (mStyle == "none") {
     mSymbol = "comprimi";
     mStyle  = "inline";
  } else {
     mSymbol = "espandi";
     mStyle  = "none";
  }
  mToggle.innerText    = mSymbol;
  mField.style.display = mStyle;
}

function enZoom (pItem) {
  //mURL    = pItem.src;
  mURL    = pItem;
  //window.open("zoom.asp?file="+mURL, "_blank", "toolbar=false");
  window.open("zoom.asp?file="+mURL, "_blank");
}
