		function validEmail(email) {
			invalidChars = " /:,;"
	
			if (email == "") {
				return false
			}
			for (i=0; i<invalidChars.length; i++) {
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar,0) > -1) {
					return false
				}
			}
			atPos = email.indexOf("@",1)
			if (atPos == -1) {
				return false
			}
			if (email.indexOf("@",atPos+1) > -1) {
				return false
			}
			periodPos = email.indexOf(".",atPos)
			if (periodPos == -1) {
				return false
			}
			if (periodPos+3 > email.length)	{
				return false
			}
			return true
		}

		function submitIt(carForm) {
			if (!validEmail(carForm.email.value)) {
				alert("L'e-mail est incorrect, veuillez le saisir à nouveau")
				carForm.email.focus()
				carForm.email.select()
				return false
			}
			
			return true
		}
		
function MM_openBrWindow(theURL,winName,features) { //v2.0
  	window.open(theURL,winName,features);
	}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function LTrim(str){
	for (var i=0; str.charAt(i)==" "; i++);
    	return str.substring(i,str.length);
}

function RTrim(str){
	for (var i=str.length-1; str.charAt(i)==" "; i--);
		return str.substring(0,i+1);
}

function Trim(str){
	return LTrim(RTrim(str));
}

function isValidEmail(str) {
	var filter=/^([\w-]+(?:\.[\w-']+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	return (filter.test(str))
}

function checkForm(formToCheck) {
	email = formToCheck.from.value;
	email = Trim(email);
	
	if( email == "" ) {
		alert("Veuillez indiquer votre adresse e-mail avant de continuer.");
		return false;
	}
	
	if( !isValidEmail(email) ) {
		alert("Nous avons détecté une faute dans votre adresse e-mail.  Veuillez corriger la faute avant de continuer.");
		return false;
	}
	
	return true;
}

/*
http://www.hotel-relaisbosquet.com/main.html English
http://www.hotel-relaisbosquet.com/french/main.html: french
http://www.hotel-relaisbosquet.com/japanese/main.html: Japanese
http://www.hotelparigi-relaisbosquet.com/main.html : Italien
http://www.hotelesparis-relaisbosquet.com/main.html : Espagnol
http://www.hotelparis-relaisbosquet.com/main.html : Allemand
http://www.hoteisparis-relaisbosquet.com/main.html : Bresilien
http://www.paris-hotel-dk.hotel-relaisbosquet.com/main.html : Danois
http://www.paris-hotel-se.hotel-relaisbosquet.com/main.html : Suedois
http://www.paris-hotel-no.hotel-relaisbosquet.com/main.html : norvegien
http://www.paris-hotel-nl.hotel-relaisbosquet.com/main.html : hollandais
*/

function openRelais_uk() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_fr() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hotel-relaisbosquet.com/french/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_jp() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hotel-relaisbosquet.com/japanese/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_it() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hotelparigi-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_es() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hotelesparis-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_de() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hotelparis-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_br() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.hoteisparis-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_dk() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.paris-hotel-dk.hotel-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_sv() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.paris-hotel-se.hotel-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_no() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.paris-hotel-no.hotel-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

function openRelais_nl() {  
 	var w = screen.availWidth - 0 
 	var h = screen.availHeight - 0 
	window.open("http://www.paris-hotel-nl.hotel-relaisbosquet.com/main.html", "wnd","left=0, top=0, width=" + w + ", height=" + h +", resizable=yes, maximize=yes menubar=no, status=no, scrollbars=no, toolbar=no");                                                             
}

































