function cerca_form_ricerca() {
	cerca_pubblicazioni_management();
}
function getRadioValue(radioObj) {
	if(!radioObj)
	{
 		return "";
 	}
 	var radioLength = radioObj.length;
 	if(radioLength == undefined)
 	{	
 		if(radioObj.checked)
 		{
 			return radioObj.value;
 		}
 		else
 		{
 			return "";
 		}
 	}
 	for(var i = 0; i < radioLength; i++) {
 		if(radioObj[i].checked) {
 			return radioObj[i].value;
 		}
 	}
 	return "";
}
function cerca_pubblicazioni_management(cont) {
	strURL = 'pubblicazioni.php?cerca=1';
	if(cont && cont >0)
		strURL = strURL + '&cont=' + cont;
	var xmlHttpReq = false;
	var self = this;
	// Xhr per Mozilla/Safari/Ie7
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// per tutte le altre versioni di IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	self.xmlHttpReq.open('POST', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			updatepage_risultati(self.xmlHttpReq.responseText);
		}
		else {
			//updatepage("");
		}
	}
	self.xmlHttpReq.send(getquerystring_formazione());
}
function updatepage_risultati(str){
	document.getElementById("risultati").innerHTML = str;
}
function getquerystring_formazione(carica_tmp) {
// 	var form     = document.forms['form1'];
	qstr='';
	if(document.getElementById("mese"))
	{
		var mese = document.getElementById("mese").value;
		qstr = qstr + '&mese=' + mese;
	}
	if(document.getElementById("anno"))
	{
		var anno = document.getElementById("anno").value;
		qstr = qstr + '&anno=' + anno;
	}
	if(document.getElementById("testata"))
	{
		var testata = document.getElementById("testata").value;
		qstr = qstr + '&testata=' + testata;
	}
	if(document.getElementById("chiave"))
	{
		var chiave = document.getElementById("chiave").value;
		qstr = qstr + '&chiave=' + chiave;
	}
	return qstr;
}