// JavaScript Document
var XMLHTTP;
function Richiesta(pagina,divid,hitid){

dividd=divid;
hitids=hitid;
//document.getElementById("even").innerHTML="";
document.getElementById(divid).innerHTML = document.getElementById(divid).innerHTML + "Attendere....";
if (pagina.length > 0){
var url =(pagina);
XMLHTTP = RicavaBrowser(CambioStato,hitid);
XMLHTTP.open("GET", url, true);
XMLHTTP.send(null);
}else{
document.getElementById(divid).innerHTML = "";
} 

}
function CambioStato(){
	//alert(XMLHTTP.readyState);
if (XMLHTTP.readyState == 4){
var R = document.getElementById(dividd);
R.innerHTML = ((XMLHTTP.responseText));
}
}

function RicavaBrowser(QualeBrowser){
if (navigator.userAgent.indexOf("MSIE") != (-1)){
var Classe = "Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5") != (-1));{
Classe = "Microsoft.XMLHTTP";
}try{
OggettoXMLHTTP = new ActiveXObject(Classe);
OggettoXMLHTTP.onreadystatechange = QualeBrowser;
return OggettoXMLHTTP;
}
catch(e)
{
alert("Errore nel carimento");
}
}
else if (navigator.userAgent.indexOf("Mozilla") != (-1))
{
OggettoXMLHTTP = new XMLHttpRequest();
OggettoXMLHTTP.onload = QualeBrowser;
OggettoXMLHTTP.onerror = QualeBrowser;
return OggettoXMLHTTP;
}
else
{
alert("Il tuo browser non è supportato!");
}
XMLHTTP.close();
}


function logo(cart,immg) {
document.getElementById("illogo").innerHTML=" ";
document.getElementById("illogo").innerHTML="<img width='150px' height='150px' src=\""+cart+immg+"\">";
}

function film(cart,immg) {
document.video.FileName=cart+immg;
document.video.url=cart+immg;
document.video.src=cart+immg;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function InviaEl() {
	if ((document.forms.formEl.cosa.value).length>0) {

		if(document.getElementById("campo").value=="prd") {
			document.getElementById('formEl').setAttribute("action","elenca_prodotti_eventi.asp");
		}else{
			document.getElementById('formEl').setAttribute("action","elenco.asp");
		}
		return true;
	}else{
		return false;
	}
}

function InviaVel() {
	if ((document.forms.formvel.nome.value).length>0) {
		
		document.forms.formvel.submit();
	}else{
		return false;
	}
}