<!--

function apri_finestra(page, name, width, height) { 

   var LeftPosition, TopPosition, settings, nuova_finestra;
      
   LeftPosition=(screen.width)?(screen.width-width)/2:100;
   TopPosition=(screen.height)?(screen.height-height)/2:100;
	  
   //settings='width='+width+',height='+height+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=yes,directories=no,status=yes,menubar=yes,toolbar=yes,resizable=no';
	 settings='width='+width+',height='+height+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
   nuova_finestra = window.open(page,name,settings);
			
   nuova_finestra.focus();
	 
}


function MM_openBrWindow(page, name, width, height) { 

   apri_finestra(page, name, width, height)
	 
}



function target_blank(url) {

   window.open(url)
	 
	 return false;

}



function pop_commento_quotidiano() { 

   nuova_finestra('', 'CommentoQuotidiano', '600', '500');

}



function controlla_campi(modulo) {

   var errore;

   errore = '';
	 
	 if (modulo.cognome.value.length == 0) 
	 {
	    errore = errore + 'Il campo COGNOME non puņ essere vuoto.\n';
	 }	 
	 
	 if (modulo.nome.value.length == 0) 
	 {
	    errore = errore + 'Il campo NOME non puņ essere vuoto.\n';
	 }
	 
	 if (modulo.email.value.length == 0)
	 {
	    errore = errore + 'Il campo EMAIL non puņ essere vuoto.\n'; 
	 }
	 
	 if (errore.length > 0)
	 {
	    alert(errore);
			return false;
	 }
	 else
	 {
	    return true;
	 } 
	    
}



function pop_avvertenze_titolicaldi() {
   
	 apri_finestra('avvertenze_box_mercati.asp','avvertenzeboxmercati','500','160')
	 
}



function popup_gold(tipo) {

   pagina = 'popup_gold.asp?tipo=' + tipo;
	 
	 apri_finestra(pagina, 'PopupGold_' + tipo, '650', '500');

}



function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}




function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

//-->