var win=null;

function NewWindow(mypage,myname,w,h,scroll,pos)
		  {
			if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
			if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
			else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
				settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=yes,resizable=no';
			
				win=window.open(mypage,myname,settings);
		  }


function chkContact()
	{
      		if(document.contact.nom.value == "") 
       		 {
			alert("Please provide us your name...");
			document.contact.nom.focus();
			return (false);
       		 }

		if(document.contact.objet.value == "") 
		 {
			alert("Please provide us the reason of the contact...");
			document.contact.objet.focus();
			return (false);
		 }

		if(document.contact.tel.value == "") 
		 {
			alert("Please provide us your telephone number...");
			document.contact.tel.focus();
			return (false);
		 }

		if(document.contact.email.value == "" || document.contact.email.value.indexOf('@', 0) == -1 || document.contact.email.value.indexOf('.', 0) == -1) 
		 {
			alert("Please make sure you have entered a valid email address using the following format username@domaine.com ...");
			document.contact.email.focus();
			return (false);
       		 }

		if(document.contact.message.value == "") 
		 {
			alert("Please have a message written before submitting the form...");
			document.contact.message.focus();
			return (false);
       		 }
     	 }

function JumpTo()
	 {
      		location=document.quickNav.countries.options[document.quickNav.countries.selectedIndex].value	
	 }

function chkReservation()
	{
      		if(document.reservation.fNom.value == "") 
       		 {
			alert("Please make sure you provide us your first name...");
			document.reservation.fNom.focus();
			return (false);
       		 }

		if(document.reservation.lNom.value == "") 
       		 {
			alert("Please make sure you provide us your last name...");
			document.reservation.lNom.focus();
			return (false);
       		 }

		if(document.reservation.phone.value == "") 
		 {
			alert("Please make sure you provide us your telephone number...");
			document.reservation.phone.focus();
			return (false);
		 }
		
		if(document.contact.email.value == "" || document.contact.email.value.indexOf('@', 0) == -1 || document.contact.email.value.indexOf('.', 0) == -1) 
		 {
			alert("Please make sure you have entered a valid email address using the following format username@domaine.com ...");
			document.contact.email.focus();
			return (false);
       		 }

		if(document.reservation.cabin.selectedIndex==0) 
       		 {
			alert("Please make sure you chose a preferred cabin for the flight...");
			document.reservation.cabin.focus();
			return (false);
       		 }

		if(document.reservation.from.value == "") 
		 {
			alert("Please make sure that there is a departure city or country name...");
			document.reservation.from.focus();
			return (false);
		 }

		if(document.reservation.to.value == "") 
		 {
			alert("Please make sure that there is an arrival city or country name...");
			document.reservation.to.focus();
			return (false);
		 }	

		if(document.reservation.departing.value == "") 
		 {
			alert("Please make sure that there is a departing date...");
			document.reservation.to.focus();
			return (false);
		 }	
     	 }