$(document).ready(
		function(){

			$('ul#homecalimg').innerfade({
				speed: 'slow',
				timeout: 5000,
				type: 'sequence',
				containerheight: '200px'
			});
});

$(document).ready(
		function(){

			$('ul#homecalimg2').innerfade({
				speed: 'slow',
				timeout: 2000,
				type: 'sequence',
				containerheight: '280px'
			});
});

function ValidateFormR(ID){

	if ((ID.nom.value==null)||(ID.nom.value=="")){
		alert("Veuillez entrer votre nom")
		ID.nom.focus()
		return false
	}
	if ((ID.prenom.value==null)||(ID.prenom.value=="")){
		alert("Veuillez entrer votre prenom")
		ID.prenom.focus()
		return false
	}	
	if ((ID.tel.value==null)||(ID.tel.value=="")){
		alert("Veuillez entrer votre téléphone")
		ID.tel.focus()
		return false
	}
	if ((ID.mail.value==null)||(ID.mail.value=="")){
		alert("Veuillez entrer votre Email")
		ID.mail.focus()
		return false
	}
	if (echeck(ID.mail.value)==false){
		/*ID.mail.value=""*/
		ID.mail.focus()
		return false
	}
	if ((ID.pays.value==null)||(ID.pays.value=="")){
		alert("Veuillez entrer votre pays")
		ID.pays.focus()
		return false
	}	
	if ((ID.du_jj.value==null)||(ID.du_jj.value=="")){
		alert("Veuillez entrer votre jour d'arrivée")
		ID.du_jj.focus()
		return false
	}	
	if ((ID.du_mm.value==null)||(ID.du_mm.value=="")){
		alert("Veuillez entrer votre mois d'arrivée")
		ID.du_jj.focus()
		return false
	}	
	if ((ID.du_aa.value==null)||(ID.du_aa.value=="")){
		alert("Veuillez entrer votre année d'arrivée")
		ID.du_jj.focus()
		return false
	}	
	if ((ID.au_jj.value==null)||(ID.au_jj.value=="")){
		alert("Veuillez entrer votre jour de départ")
		ID.au_jj.focus()
		return false
	}	
	if ((ID.au_mm.value==null)||(ID.au_mm.value=="")){
		alert("Veuillez entrer votre mois de départ")
		ID.au_mm.focus()
		return false
	}	
	if ((ID.au_aa.value==null)||(ID.au_aa.value=="")){
		alert("Veuillez entrer votre année de départ")
		ID.au_aa.focus()
		return false
	}	
	
	return true
 }

function ValidateFormC(ID){

	if ((ID.nom.value==null)||(ID.nom.value=="")){
		alert("Veuillez entrer votre nom")
		ID.nom.focus()
		return false
	}
	if ((ID.prenom.value==null)||(ID.prenom.value=="")){
		alert("Veuillez entrer votre prenom")
		ID.prenom.focus()
		return false
	}	
	if ((ID.tel.value==null)||(ID.tel.value=="")){
		alert("Veuillez entrer votre téléphone")
		ID.tel.focus()
		return false
	}	
	if ((ID.mail.value==null)||(ID.mail.value=="")){
		alert("Veuillez entrer votre Email")
		ID.mail.focus()
		return false
	}
	if (echeck(ID.mail.value)==false){
		/*ID.mail.value=""*/
		ID.mail.focus()
		return false
	}
	if ((ID.objet.value==null)||(ID.objet.value=="")){
		alert("Veuillez entrer votre objet")
		ID.objet.focus()
		return false
	}
	if ((ID.message.value==null)||(ID.message.value=="")){
		alert("Veuillez entrer votre message")
		ID.message.focus()
		return false
	}	
	return true
 }
 
function ValidateFormL(ID){

	if ((ID.appreciation.value==null)||(ID.appreciation.value=="")){
		alert("Veuillez entrer votre appréciation")
		ID.appreciation.focus()
		return false
	}
	return true
 }
 
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("E-mail non valide, veuillez entrer une Email valide")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("E-mail non valide, veuillez entrer une Email valide")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("E-mail non valide, veuillez entrer une Email valide")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("E-mail non valide, veuillez entrer une Email valide")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("E-mail non valide, veuillez entrer une Email valide")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("E-mail non valide, veuillez entrer une Email valide")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("E-mail non valide, veuillez entrer une Email valide")
		    return false
		 }

 		 return true					
}


function langfr(){
    document.location = "http://www.hotel-taroudant-maisondhotes-maroc-hotes.com/"
    top.location="http://www.hotel-taroudant-maisondhotes-maroc-hotes.com/";
   //top.location=self.document.location; 
}
function langen(){
    document.location = "http://translate.google.co.ma/translate?u=http%3A%2F%2Fwww.hotel-taroudant-maisondhotes-maroc-hotes.com%2F&sl=fr&tl=en&hl=&ie=UTF-8"
    top.location="http://translate.google.co.ma/translate?u=http%3A%2F%2Fwww.hotel-taroudant-maisondhotes-maroc-hotes.com%2F&sl=fr&tl=en&hl=&ie=UTF-8";
}
function langes(){
    document.location = "http://translate.google.co.ma/translate?u=http%3A%2F%2Fwww.hotel-taroudant-maisondhotes-maroc-hotes.com%2F&sl=fr&tl=es&hl=&ie=UTF-8"
    top.location="http://translate.google.co.ma/translate?u=http%3A%2F%2Fwww.hotel-taroudant-maisondhotes-maroc-hotes.com%2F&sl=fr&tl=es&hl=&ie=UTF-8";
}