jQuery.debug = function(message) {
    if(window.console) {
        alert(message);
    } else {
        alert(message);
    }
};









function check() {

   if (document.prenotazione.nome.value.length==0) {
        alert( "Il campo Nome é obbligatorio.") ;
        document.prenotazione.nome.focus();
        return;      
   }

   if (document.prenotazione.telefono.value.length==0) {
        alert( "Il campo Telefono é obbligatorio.") ;
        document.prenotazione.telefono.focus();
        return;      
   }
   if (document.prenotazione.from.value.length==0) {
        alert( "Il campo E-mail é obbligatorio.") ;
        document.prenotazione.email.focus();
        return;      
   }
   if (document.prenotazione.privacy.checked==false) {
        alert( "Per la richiesta info o prenotazione é necessario autorizzare il trattamento dei dati.") ;
        document.prenotazione.privacy.focus();
        return;      
   }


   document.prenotazione.submit();
}



function appari_testi(){

new Effect.Opacity('testo_descrizione', { delay:1,from: 0, to: 1 , duration: 1.0}); return false;

}



function cambia(dove){

var elem = document.getElementById(dove);
elem.src="/images/foglia.png"


}
function riporta(dove){

var elem = document.getElementById(dove);
elem.src="/images/vuoto.png"


}


function cambia_foto(dove,cosa){
		
		
		var elem = document.getElementById(dove);
		
		if(dove=="prima_foto"){
		elem.style.backgroundImage="url(/images/fotodb/normal/"+cosa+")"
		}else{
		elem.style.backgroundImage="url(/mages/fotodb/big/"+cosa+")"
		}
		
		elem.style.backgroundRepeat="no-repeat"
		
		elem.style.backgroundPosition="center";
		elem.style.backgroundColor="#b1b1b1";
		
		
}

function sfondo_evidenziato(come,nome){

var elem = document.getElementById(nome);

if(come==true){
//elem.style.backgroundColor="#8d8d8d";
elem.style.backgroundColor="#dedede";
}else{
elem.style.backgroundColor="#ffffff";

}



}



function sfondo_alpha(come,nome){

var elem = document.getElementById(nome);

if(come==true){
if (navigator.appName == "Netscape"){
elem.style.opacity= 0.6;
}else{

elem.style.filter="alpha (opacity=60)";
}

}else{
if (navigator.appName == "Netscape"){
elem.style.opacity= 1;
}else{
elem.style.filter="alpha (opacity=100)";
}


}



}

 
 function musica( ) 
{
name="musica"
path="/gestione"
value="si";
 expires="";
secure=""
domain="";
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}





function creamusica(){

		name="musica"
path="/gestione"
value="si";
 expires="";
secure=""
domain="";
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

top.musica.location.href="http://www.bellostare.it/musica.htm"


}






 
 
 
 
function musicaNo(){
 
parent.musica.location.href="http://www.bellostare.it/musica_no.htm"
 
Set_Cookie("musica","no","","/gestione","","")
//document.cookie = "musica=no"
 

}

