// JavaScript Document
function finestra(pagina,larghezza,altezza) {
	window.open(pagina,null,'height='+altezza+',width='+larghezza+',scrollbars=1');	
}

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 mostradiv(div){
	document.getElementById(div).style.display = 'block';
}
function nascondidiv(div) {
	document.getElementById(div).style.display = 'none';	
}

var myRequest = 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;
}

var scrivineldiv = "";

function h_resp_noloader() {
    if (myRequest.readyState == 4 && myRequest.status == 200) {
        e = eval("document.getElementById('"+scrivineldiv+"');");
        e.innerHTML = myRequest.responseText;
    }
	scirvineldiv = null;
	
}
function callajax(div_response,action){
	scrivineldiv = div_response;
	myRequest = CreateXmlHttpReq(h_resp_noloader);
	myRequest.open("GET",action);
    myRequest.send(null);	
}