<!--
	function f_check_mail(p_email) {
	   email = new String(p_email);
	   if (email.length==0) {return false;}
	   posAt=email.indexOf("@");
	   if (posAt<=0) {return false;}
	   indirizzo=new String(email.substring(0,posAt));
	   dominio=new String(email.substring(posAt+1,99));
	   if (dominio.indexOf("@")!=-1) {return false;}
	   posPt=dominio.indexOf(".");
	   if (posPt<=0) {return false;}
	   rdom=new String(dominio.substring(posPt+1,99));
	   if (rdom.length<2) {return false;}
	   return true;
	}
	
function postRequest(url, myQueryString, p_destinationId, p_method) {
	
	  if (p_method==null) { p_method='POST'; }
	  f_wait_msg('<b>Attendere...</b>');
	  
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
      http_request = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // IE
      http_request = new ActiveXObject("Microsoft.XMLHTTP");
    }
    http_request.onreadystatechange = function() { 
 	    if (http_request.readyState == 2) {
 	      
 	    } else if (http_request.readyState == 4) {
 	    	f_rm_wait_msg();
        if (http_request.status == 200) {
          placeContents(p_destinationId, http_request.responseText);
        } else {
          alert('Problemi di connessione al server. Riprova tra qualche istante.');
        }
      }
    };
    http_request.open(p_method, url, true);
    if (p_method=='POST') {
      http_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    }
//    alert(myQueryString);
    http_request.send(myQueryString);

}


function placeContents(p_destinationId, p_response) {
  document.getElementById(p_destinationId).innerHTML = p_response;
}

function f_wait_msg(p_msg) {
  document.getElementById('http_status').innerHTML = p_msg;
  document.getElementById('http_status').style.display = "block";
}

function f_rm_wait_msg() {
  document.getElementById('http_status').style.display = "none";
}
// -->