/** XHConn - Simple XMLHTTP Interface - bfults@gmail.com - 2005-04-08        ** ** Code licensed under Creative Commons Attribution-ShareAlike License      ** ** http://creativecommons.org/licenses/by-sa/2.0/                           **/function XHConn(){  var xmlhttp, bComplete = false;  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }  catch (e) { try { xmlhttp = new XMLHttpRequest(); }  catch (e) { xmlhttp = false; }}}  if (!xmlhttp) return null;  this.connect = function(sURL, sMethod, sVars, fnDone)  {    if (!xmlhttp) return false;    bComplete = false;    sMethod = sMethod.toUpperCase();    try {      if (sMethod == "GET")      {        xmlhttp.open(sMethod, sURL+"?"+sVars, true);        sVars = "";      }      else      {        xmlhttp.open(sMethod, sURL, true);        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");        xmlhttp.setRequestHeader("Content-Type",          "application/x-www-form-urlencoded");      }      xmlhttp.onreadystatechange = function(){        if (xmlhttp.readyState == 4 && !bComplete)        {          bComplete = true;          fnDone(xmlhttp);        }};      xmlhttp.send(sVars);    }    catch(z) { return false; }    return true;  };  return this;}function miasel(me,pag,ildiv,cat,valore,opt) {pagina = "incl/" + pag + ".php";stringa =  "fol=" + me + "&";if (cat != "") { stringa += "cat=" + cat + "&";}if (valore != "0") { stringa += "val=" + valore + "&";}if (opt != "0") { stringa += "opt=" + opt;}var myConn = new XHConn();if (!myConn) alert("XMLHTTP not disponibile. Prova un newer/better browser.");var fnWhenDone = function (oXML) { document.getElementById(ildiv).innerHTML = oXML.responseText; };myConn.connect(pagina, "GET", stringa, fnWhenDone);}function ckreggio() {   if (document.srcre.cat.selectedIndex == 0) {   alert("selezionare la categoria");   return false;   } else {   return true;   }}function ckforte() {   if (document.srcforte.cat.selectedIndex == 0) {   alert("selezionare la categoria");   return false;   } else {   return true;   }}function PopupPic(x) { window.open("popup.html?"+x, "immagine", "resizable=0,HEIGHT=10,WIDTH=10,scrollbars=0");}function checkFields() {   missinginfo = "";   if (document.contactForm.nome.value == "") {      missinginfo += "\n     -  Nome";   }   if (document.contactForm.cognome.value == "") {      missinginfo += "\n     -  Cognome";   }   if (document.contactForm.citta.value == "") {            missinginfo += "\n     -  Citta";   }   if (document.contactForm.provincia.value == "") {            missinginfo += "\n     -  Provincia";   }   if (document.contactForm.telefono.value == "") {            missinginfo += "\n     -  Telefono";   }   if ((document.contactForm.email.value == "") || (document.contactForm.email.value.indexOf('@') == -1) || (document.contactForm.email.value.indexOf('.') == -1)) {      missinginfo += "\n     -  E-mail";   }   if(document.contactForm.messaggio.value == "") {      missinginfo += "\n     -  Messaggio";   }   if(!document.contactForm.privacy.checked) {      missinginfo += "\n     -  Normativa sulla privacy";   }   if (missinginfo != "") {      missinginfo ="E' necessario compilare i seguenti campi:\n" + missinginfo + "\n\nGrazie.";      alert(missinginfo);      return false;   }   else return true;}