//-----------------------------------------------------------------------
function send(contenitore,nomeform,url)
	{
	var params = Form.serialize($(nomeform));
//	alert(params);
	new Ajax.Updater(contenitore, url, {method:'POST', asynchronous:true, parameters:params, evalScripts:true});
	document.getElementById(contenitore).innerHTML='<b><font color=A4B8DD size=4>...loading...</font></b>';
	}
//-----------------------------------------------------------------------
function req(contenitore,params,url)
	{
	document.getElementById(contenitore).innerHTML='<b><font color=A4B8DD size=4>...loading...</font></b>';
//	alert(params);
	new Ajax.Updater(contenitore, url, {method:'POST', asynchronous:true, parameters:params, evalScripts:true});
	}
//-----------------------------------------------------------------------
function simple_req(contenitore,url)
	{
	cont=document.getElementById(contenitore);
	cont.innerHTML='<b><font color=A4B8DD size=4>...loading...</font></b>';
	new Ajax.Request(url, 
		{
		method:'POST', 
		evalScripts:true,
		onSuccess: function(){alert("OK");cont.innerHTML='';},
	    onFailure: function(){ alert("SI E' VERIFICATO UN ERRORE DI CONNESSIONE");cont.innerHTML='';}
		}
		);
	}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function pop_dim(dir,larghezza,altezza,nomefinestra){
if(nomefinestra=='')
nomefinestra='popx'
var str_dim='';
str_dim+='titlebar=no,toolbar=no,location=no,alwaysRaised=yes,z-lock=no,resizable=yes,status=no,menubar=no,scrollbars=no,top=150,left=150,';
str_dim+='width='+larghezza+',height='+altezza;
//alert(''+dir+' '+"pop4 "+str_dim);
window.open(''+dir+'',''+nomefinestra+'',str_dim);
}



//-----------------------------------------------------------
function ShowAndHide(id1,id2)
	{
	if(document.getElementById)
		{
		el1=document.getElementById(id1);
		el2=document.getElementById(id2);
		if(el1.style.display=="none")
			{
			el1.style.display="block";
			el2.style.display="none";
			}
		else
			{
			el1.style.display="none";
			el2.style.display="block";
			}
		} 
	} 
//-------------------------------------------------------------

var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

function nascondi(cosa) {
if (ie4) {document.all[cosa].style.visibility = "hidden";}
if (ns4) {document.layers[cosa].visibility = "hide";}
if (ns6) {document.getElementById([cosa]).style.display = "none";}
}
function mostra(cosa) {
if (ie4) {document.all[cosa].style.visibility = "visible";}
if (ns4) {document.layers[cosa].visibility = "show";}
if (ns6) {document.getElementById([cosa]).style.display = "block";}
}

//--------------------------------------------------------------------
//--------------------------------------------------------------------
//--------------------------------------------------------------------
