function goLink(pagina)
   {
   document.location.href=pagina;
   }

function elimina_camera(i,id)
{

	if (confirm("Sei sicuro di voler eliminare questa riga di camere")) {
		document.form_camere.azione_camere.value="elimina";
		document.form_camere.identif.value=i;
		document.form_camere.idarticolo.value=id;
		document.form_camere.submit();
	}
}

function elimina_cliente(i,id)
{
	if (confirm("Sei sicuro di voler eliminare questa riga di partecipanti?")) {
		document.form_persone.azione_clienti.value="elimina";
		document.form_persone.identif.value=i;
		document.form_persone.idarticolo.value=id;
		document.form_persone.submit();
	}
}


if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('#commissioni {display: none;}\n')
document.write('</style>\n')
}

function check_partenza()
	{
		if (document.form_partenza.partenza.selectedIndex == 0)
			{
				alert("Devi selezionare il punto di partenza");
				return false;
			}
		else document.form_partenza.submit();
		

	}

function check_c_vendita()
	{
		if (document.form_pagamento.Condizioni_di_vendita.checked == true)
			{
				if (confirm("Sei sicuro di voler proseguire con l'ordine?")) {document.form_pagamento.submit()}
				else {return false;}
			}
		else
			{
				alert("E' necessario accettare le condizioni di vendita.");
				return false;
			}
	}

	

function hide_show_commissioni()
	{
		if(document.getElementById)
		{
			var el = document.getElementById("commissioni");
			if(el.style.display != "block")	document.getElementById("commissioni").style.display = "block";
			else document.getElementById("commissioni").style.display = "none";

		}
	}
		
	
	
	
	
	
if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('#tabella_partenze {display: none;}\n')
document.write('</style>\n')
}

function show_hide_tabella_partenze(){
        if(document.getElementById){
		if(document.getElementById("tabella_partenze").style.display != "block"){ 
			document.getElementById("tabella_partenze").style.display = "block"; 
		}else{ 
			document.getElementById("tabella_partenze").style.display = "none";
		}
	}

}

function PopupAssicurazione() {
   var w = 680;
   var h = 400;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open("table_assicurazione.php","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",scrollbars=auto");
 }

