window.defaultStatus='Societa\' della Salute della Zona Pisana';

// CONTROLLO VERS. BROWSER
var b_xp, b_n6, b_n4;
checkBrowser();
function checkBrowser() {
  if (document.layers){ //Netscape 4.x
	//document.write("<link rel='stylesheet' href='stile_netscape4.css' type='text/css'>");
	b_n4 = true;
	b_xp = false;
	b_n6 = false;
  } else if (document.all){ // Explorer
	//document.write("<link rel='stylesheet' href='stile_explorer.css' type='text/css'>");
	b_n4 = false;
	b_xp = true;
	b_n6 = false;
  } else if (document.getElementById){ //Netscape 6.x
	//document.write("<link rel='stylesheet' href='stile_netscape6.css' type='text/css'>");
	b_n4 = false;
	b_xp = false;
	b_n6 = true;
  }
}

// rileviamo il Sistema Operativo, il Browser e la sua versione
// e settiamo variabili globali che contengano i risultati dello sniffing
  SOWIN = (navigator.userAgent.toLowerCase().indexOf("win") > -1) ? 1 : 0;
  SOMAC = (navigator.userAgent.toLowerCase().indexOf("mac") > -1) ? 1 : 0;
  SOLIN = (navigator.userAgent.toLowerCase().indexOf("linux") > -1) ? 1 : 0;
  SOALT = (!SOWIN && !SOMAC && !SOLIN) ? 1 : 0;

  OP = ((ind1 = navigator.userAgent.indexOf("Opera")) > -1) ? 1 : 0;
  punto = (OP) ? navigator.userAgent.indexOf(".",ind1):0;
  OP5 = (OP && parseInt(navigator.userAgent.substr(punto-1)) == 5) ? 1 : 0;
  OP6 = (OP && parseInt(navigator.userAgent.substr(punto-1)) == 6) ? 1 : 0;

  IE = ((ind2 = navigator.appVersion.indexOf("MSIE")) > -1 && !OP) ? 1 : 0;
  IE4 = (IE && parseInt(navigator.appVersion.substr(ind2+5)) == 4) ? 1 : 0;
  IE5 = (IE && parseInt(navigator.appVersion.substr(ind2+5)) == 5) ? 1 : 0;
  IE6 = (IE && parseInt(navigator.appVersion.substr(ind2+5)) == 6) ? 1 : 0;

  NN = (navigator.appName.indexOf("Netscape")>-1) ? 1 : 0;
  NN4 = (NN && parseInt(navigator.appVersion)==4) ? 1 : 0;
  NN6 = (NN && parseInt(navigator.appVersion)>4) ? 1 : 0;

  OT = (!IE && !NN && !OP) ? 1 : 0;

  var pointer;

  if (IE4 || IE5) {
    pointer = 'hand';
  } else {
    pointer = 'pointer';
  }

function getElemStyle(id) {
  if (IE4 || IE5 || IE6) {
	  return document.all[id].style;
  } else {
	  return document.getElementById(id).style;
  }
}

function getElemClass(id) {
  if (IE4 || IE5 || IE6) {
	  return document.all[id].className;
  } else {
	  return document.getElementById(id).className;
  }
}

function changeElemClass(id,nc) {
  if (IE4 || IE5 || IE6) {
	  return document.all[id].className=nc
  } else {
	  return document.getElementById(id).className=nc;
  }
}

function getElem(id) {
  if (IE4 || IE5 || IE6) {
	  return document.all[id];
  } else {
	  return document.getElementById(id);
  }
}

function cerca(theForm) {
  if(theForm.testo_ricerca.value!='') {
    theForm.submit();
  }
}
