function ajaxConnect( strURL, method, formID ) {
	if ( method == undefined ) {
		method = "get";
	}
	var xmlHttpReq = false;
	if ( window.XMLHttpRequest ) {
		xmlHttpReq = new XMLHttpRequest();
	} else if ( window.ActiveXObject ) {
		xmlHttpReq = new ActiveXObject( "Microsoft.XMLHTTP" );
	} else {
		alert( "Il browser in uso non supporta la tecnologia Ajax" );
	}
	if ( method.toLowerCase() == "get" && formID != undefined ) {
	    strURL += ( ( strURL.indexOf( "?" ) == - 1 ) ? "?" : "&" ) + getquerystring( formID );
	}
	xmlHttpReq.open( method, strURL );
	xmlHttpReq.setRequestHeader( "Content-Type", "application/x-www-form-urlEncoded" );
	if ( formID != undefined && method.toLowerCase() == "post" ) {
	    xmlHttpReq.send( getquerystring( formID ) ); 
	} else {
	    xmlHttpReq.send( null ); 
	}
	xmlHttpReq.onreadystatechange = function() {
		if ( xmlHttpReq.readyState == 4 ) {
			eval( xmlHttpReq.responseText );
		}
	};
}
function tempoReale() {
	ajaxConnect( "/ajax/tempo-reale.php" );
}
function mostraRisultatiClassifica( accendi, spegni ) {
	document.getElementById( accendi ).style.display = "block";
	document.getElementById( spegni ).style.display = "none";
}
function dettaglioBanner( identificatore ) {
	var dettaglioBanner = window.open( "/dettaglio-banner.php?identificatore=" + identificatore, "dettaglioBanner", "width=420,height=360,scrollbars=1,screenX=100,screenY=100,top=100,left=100" );
	dettaglioBanner.focus();
}
function edizione( value ) {
	if ( value != 0 ) {
		window.open( "http://" + value + ".carnico.it" );
	}
}
function chiudiBanner() {
	document.getElementById( "banner" ).style.display = "none";
}
function bannerOrizzontali( nomeUnivocoSpazioPubblicitario, identificatoreSquadra ) {
	ajaxConnect( "/ajax/banner-orizzontali.php?nomeUnivocoSpazioPubblicitario=" + nomeUnivocoSpazioPubblicitario + "&identificatoreSquadra=" + identificatoreSquadra );
}
