var ns6=document.getElementById&&!document.all
var ie=document.all

var dayarray=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato")
var montharray=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre")

preload1 = new Image(48,48);
preload1.src = 'images/next5.png';

preload2 = new Image(48,48);
preload2.src = 'images/prev5.png';


function change_page(iNumPage) {
	document.ricerca.num_page.value=iNumPage;
	document.ricerca.submit();
}

function reload_page() {
	document.ricerca.submit();
}


function CheckForm() {	
	if ((document.contatto.Nome.value == "") || (document.contatto.Cognome.value == "") || (document.contatto.Email.value == "")) {		
		if (document.contatto.language.value == "ita") {
		  alert('Impossibile inviare il modulo. Alcuni parametri sono necessari.');
		} else {
		  alert('Sorry, it was impossible to send the module. Some parameters are missing.');
		}
		return false;
	} else {
	  return true;
	}
}

function submit_page() {	
	if ((document.richiesta_immobile.nominativo.value == "") || (document.richiesta_immobile.Email.value == "") || (document.richiesta_immobile.testo_richiesta.value == "")) {		
		if (document.richiesta_immobile.language.value == "ita") {
		  alert('Impossibile inviare il modulo. Alcuni parametri sono necessari.');
		} else {
		  alert('Sorry, it was impossible to send the module. Some parameters are missing.');
		}
		return false;
	} else {
	  return true;
	}
}

function roll_over(oggetto, immagine) {
  oggetto.src = immagine;
}

function OpenDiv (oggetto) {
  var obj = document.getElementById(oggetto);
  if (obj.style.display == 'block') {
    obj.style.display = 'none';
  } else {
    obj.style.display = 'block';
  }
  document.location.href='#'+oggetto;
}
