<!-- Hide from old browsers

//Redirect Old browsers
//if (!document.getElementById) { 
//window.location = "upgrade.html"}

// open external links in new window
function externalLinks() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") &&
        anchor.getAttribute("rel") == "external")
      anchor.target = "_blank";
    }
}
window.onload = externalLinks;


/////////////////////
//OPEN CENTERED POPUP
/////////////////////
window.name = 'mainwindow';
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


////////////////
//Popup for Ebomb
////////////////
function formpop() {
formWin = window.open('http://www.cwc.co.nz/foundation/mailbomb_popup.cfm','GHSBomb','width=370,height=300,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
if (formWin && !formWin.closed) formWin.focus();
return true;
}


//used for the regular email
function popupGM() {
  var NewWind = window.open( '','remote', 'width=350,height=400' );
  if (NewWind.opener == null) {
    NewWind.opener = window;
  }
}

//////////////////////////////////
//OPEN IMAGE LINKS IN NEW WINDOW
/////////////////////////////////
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){
  winL=20;
	winT=20;
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez+",left="+winL+",top="+winT;
  finestra=window.open(img,"",stringa);
}
// end hiding -->