// -------------------------------------------------------------
// File         : js.js
// Author       : (C) Lo-PERSS, Matteo Bianchi
// Date         : June 29, 2001
// -------------------------------------------------------------





var isNav, isIE;

if (parseInt(navigator.appVersion)>=4) {
        if (navigator.appName == "Netscape") {
                isNav = true;
        }
        else {
                isIE = true;
        }
}

function noAction() {

}

function menuOn() {
        if (isIE) {
                window.event.srcElement.className="menuon"
        }
}

function menuOff() {
        if (isIE) {
                window.event.srcElement.className="menuoff"
        }
}

function langOn() {
        if (isIE) {
                window.event.srcElement.className="langon"
        }
}

function langOff() {
        if (isIE) {
                window.event.srcElement.className="langoff"
        }
}

function hptxtOver() {
        if (isIE) {
                window.event.srcElement.className="bodyhptxt"
        }
}

function hptxtOut() {
        if (isIE) {
                window.event.srcElement.className="a"
        }
}


function shinystat(){
    if(window.event.shiftKey){
        window.open("http://www.shinystat.it/cgi-bin/shinystatv.cgi?USER=PLRTBellinzona")
    }
}





 var imgZoom = new Array();
 imgNumber = 3;
 index = 0;

 for(i=0; i < imgNumber ; i++)
 {
         imgZoom[i] = new Image();
 }

 imgZoom[0].src = "../../../../images/pic_offices_world.gif";
 imgZoom[1].src = "../../../../images/pic_offices_europe.gif";
 imgZoom[2].src = "../../../../images/pic_offices_CH_Locarno.gif";


function zoomIn()
{
  if(index < imgNumber-1)
  {
    index = (index + 1);
    document.images['map'].src = imgZoom[index].src;
  }
  else
  {
    // nothing
        //alert("max zoom: " + index);
  }
  //return true;
} //end zoomIn()

function zoomOut()
{
  if(index > 0)
  {
    index = (index - 1);
    document.images['map'].src = imgZoom[index].src;
  }
  else
  {
    // nothing
  }
  //return true;
} // end zoomOut()


function changeImage(imgName,imgSRC)
{
  document.images[imgName].src = imgSRC.src;
  return true;
}