// JavaScript Document
var Timer;
var Pas = 8;
function moveLayer(Sens,contenu,support) {
	Objet=document.getElementById(contenu);
    if(parseInt(Objet.style.top) + (Pas*Sens)>0)  {
		clearTimeout(Timer);
	}
	else if(parseInt(Objet.style.top) + (Pas*Sens)<-(Objet.offsetHeight-document.getElementById(support).offsetHeight)) {
		clearTimeout(Timer);
	}
    else {
        Objet.style.top = (parseInt(Objet.style.top) + (Pas*Sens)) + "px";
	}
	Timer = setTimeout("moveLayer(" + Sens + ",'" + contenu + "','" + support + "');", 30);
}

function change_cat (variable,var2) {
	  var countryObj = document.getElementById('clas_id');
			for (var i=0; i < countryObj.length; i++){
				countryObj.options[i] = null;
			}
		var str = "";
		switch(variable) {
		  case '1':
						countryObj.options[0] = new Option('All classes', '0');
						countryObj.options[1] = new Option('5 * Deluxe Hotels', '1');      
      if (var2 == 1) {
						  countryObj.options[1].selected = 'selected';
						}
						countryObj.options[2] = new Option('5 * Hotels', '2');
      if (var2 == 2) {
						  countryObj.options[2].selected = 'selected';
						}						
						countryObj.options[3] = new Option('4 * Hotels', '3');
      if (var2 == 3) {
						  countryObj.options[3].selected = 'selected';
						}												
						countryObj.options[4] = new Option('3 * Hotels', '4');
      if (var2 == 4) {
						  countryObj.options[4].selected = 'selected';
						}	
								countryObj.options[5] = new Option('Club Hotels', '5');
      if (var2 == 5) {
						  countryObj.options[5].selected = 'selected';
						}
				  break;
		  case '2':
						countryObj.options[0] = new Option('All classes', '0');
						countryObj.options[1] = new Option('luxe', '7');
	      if (var2 == 7) {
						  countryObj.options[1].selected = 'selected';
						}											
						countryObj.options[2] = new Option('charme', '8');
      if (var2 == 8) {
						  countryObj.options[2].selected = 'selected';
						}												
						countryObj.options[3] = new Option('confort', '9');
      if (var2 == 9) {
						  countryObj.options[3].selected = 'selected';
						}												
				  break;
		  case '3':
						countryObj.options[0] = new Option('All classes', '0');
						countryObj.options[1] = new Option('Palmeraie', '7');
	      if (var2 == 7) {
						  countryObj.options[1].selected = 'selected';
						}											
						countryObj.options[2] = new Option('luxe', '8');
      if (var2 == 8) {
						  countryObj.options[2].selected = 'selected';
						}												
		  case '4':
						countryObj.options[0] = new Option('All classes', '0');
						countryObj.options[1] = new Option('Palmeraie', '7');
	      if (var2 == 7) {
						  countryObj.options[1].selected = 'selected';
						}											
						countryObj.options[2] = new Option('centre ville', '8');
      if (var2 == 8) {
						  countryObj.options[2].selected = 'selected';
						}												
				  break;
						default:
  						countryObj.options[0] = new Option('All classes', '0');
								break;
		}
}	
function change_image(url) {
  document.getElementById("big_img").src=url;
}

function affich(str) 
{
	 window.clearTimeout(actif1);
	 window.clearTimeout(actif2);
  document.getElementById('img_grande').src = "http://www.best-marrakech.com/images/grandes/"+str;
}
function affichAjax(str) 
{
	 window.clearTimeout(actif1);
	 window.clearTimeout(actif2);
  document.getElementById('img_grande').innerHTML  = "<img src='http://www.sejour-marrakech.net/morocco/images/grandes/"+str+"' alt=''/>";
}


function verification(){
 	if (document.getElementById("email").value.indexOf("@") == '-1' || document.getElementById("email").value.indexOf(".") == '-1' || document.getElementById("email").value == '' ||  document.getElementById("tel").value == '' ||  document.getElementById("name").value == '' || document.getElementById("fin").value == '' ) {
	   alert ("Veuillez renseigner les champs obligatoires !");
   	return false;
	 }
	 return true;
}

function verificationRest(){
	if (document.getElementById("email").value.indexOf("@") == '-1' || document.getElementById("email").value.indexOf(".") == '-1' || document.getElementById("email").value == '' ||  document.getElementById("tel").value == '' ||  document.getElementById("name").value == ''  ) 
	{
	alert ("Veuillez renseigner les champs obligatoires !");
	return false;
	}
	return true;
}

function verificationcontact(){
 	if (document.getElementById("email").value.indexOf("@") == '-1' || document.getElementById("email").value.indexOf(".") == '-1' || document.getElementById("email").value == '' ||  document.getElementById("tel").value == '' ||  document.getElementById("name").value == '' || document.getElementById("demande").value == '' ) {
	   alert ("Veuillez renseigner les champs obligatoires !");
   	return false;
	 }
	 return true;
}

<!--DEBUT DU SCRIPT-->

/*
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
function VerifForm(formulaire)
	{
	adresse = formulaire.email.value;
	var place = adresse.indexOf("@",1);
	var point = adresse.indexOf(".",place+1);
	if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		formulaire.submit();
		return(true);
		}
	else
		{
		alert('Veuillez renseigner les champs obligatoires !!');
		return(false);
		}
	}

<!-- FIN DU SCRIPT-->