function doGoogle()
{
	//alert("Attenzione. \nIl motore di ricerca di Google sta indicizzando i contenuti del nuovo sito www.anqui.it \nLa ricerca all'interno del sito sara' disponibile tra qualche giorno.");
	
	if (document.getElementById("q").value=="")
		alert("Attenzione, per condurre una ricerca all'interno del sito anqui.it e' necessario scrivere la parola cercata dentro il campo di ricerca.");
	else	
		document.getElementById("form_google").submit();
	
}
function doAreaRis()
{
	document.getElementById("form_arearis").submit();
}
function googleClick(theInput)
{
	theInput.style.backgroundImage='none';
	theInput.value="";
}
function googleBlur(theInput)
{
	if (theInput.value=="")
		theInput.style.backgroundImage='url(src/skins/default/images/logo_google.jpg)';
}
function doSubmit(psFormName)
{
	if (validaIscrizione())
		document.getElementById(psFormName).submit();
}
function svuotaForm(psFormName)
{
	document.getElementById(psFormName).reset();
}
function validaIscrizione()
{
	vbOk = true;
	vaCampi = new Array();
	vaDesc = new Array();
	vaCampi[0]="nome";
	vaDesc[0]="Nome e Cognome";
	vaCampi[1]="associazione";
	vaDesc[1]="Associazione Quadri";
	
	for (i=0;i< vaCampi.length;i++)
	{
		if (vbOk && (!document.getElementById(vaCampi[i]) || (document.getElementById(vaCampi[i]).value=="")))
		{
			alert("Il campo '"+vaDesc[i]+"' e' obbligatorio e deve essere compilato.");
			vbOk = false;
		}
	}
	
	return vbOk;
}
function openPopConv()
{
	vsFeatures = "width=550,height=400,status=0,toolbar=0,resizable=0,scrollbars=1";
	window.open("src/html/convenzioni/convenzioni.html","convenzioni",vsFeatures);
}

function layoutCalc()
{
	voLeft = document.getElementById('leftcol');
	voRight = document.getElementById('rightcol');
	if (voLeft && voRight)
	{
		var rightHeight = ((voRight.offsetHeight));
		var leftHeight = ((voLeft.offsetHeight));
		
		if (rightHeight<leftHeight-5)
			divHeight = leftHeight+15;
		else
			divHeight = rightHeight+50;	
		
		voWrap = document.getElementById('mainwrap');
		voFooter = document.getElementById('footer');
		
		if (voWrap && voFooter)
		{	
			voWrap.style.height = divHeight + 'px';
			voFooter.style.visibility = "visible";
		}	
	}	
}

function riempiCerca(theInput)
{
	theInput.value = "Cerca";
}
