// JavaScript Document
function aprifinestra(pagina,altezza,larghezza) {
	window.open(pagina,null,'height='+altezza+',width='+larghezza);	
}
function divshow(div){
	if( document.getElementById(div).style.display == 'none'){
		document.getElementById(div).style.display = 'block';
	} else {
		document.getElementById(div).style.display = 'none';	
	}
	return;
}
function showdiv(div){
	return divshow(div);	
}

function nascondidiv(div) { 
		document.getElementById(div).style.display = 'none';	
}

function msgandgo(msg,goto){
	if(confirm(msg)) { window.location=goto; }
}

var myRequest = null;
var scrivineldiv = null;


function CreateXmlHttpReq(handler) {
	  var xmlhttp = null;
	  try {
		xmlhttp = new XMLHttpRequest();
	  } catch(e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	  }
	  xmlhttp.onreadystatechange = handler;
	  return xmlhttp;
}

function h_resp_noloader() {
    if (myRequest.readyState == 4 && myRequest.status == 200) {
        e = eval("document.getElementById('"+scrivineldiv+"');");
        e.innerHTML = myRequest.responseText;
    }
	scirvineldiv = null;
}

function ajaxgo(div_response,action){
	scrivineldiv = div_response;
	myRequest = CreateXmlHttpReq(h_resp_noloader);
	myRequest.open("GET",action);
    myRequest.send(null);	
}