var Box=new Class({
	initialize:function(b){
		lThis = this;
		this.button = b;
		this.parent = this.button.getParent();
		this.act = '';
		if(this.parent.hasClass('e_activity')){
			this.type = 'activity';
			if(this.button.hasClass('e_more'))this.act = '&description';
			else{
				if(b.get('tag') =='strong'){
					var c = b.getProperty('class');
					c = c.replace(/a_/,'');
					this.act = '&theme='+c
				}
				else {
					this.act = '&choosen'
				}
			}
		}
		else if(this.button.hasClass('desc-ile'))	this.type = 'island';
		else if(this.button.hasClass('e_more'))		this.type = 'description';
		else if(this.button.hasClass('q_preview'))	this.type = 'preview';
		else if(this.button.hasClass('e_record'))	this.type = 'save';
		else if(this.button.hasClass('e_send'))		this.type = 'send';
		else if(this.button.hasClass('e_del'))		this.type = 'delete';
		else if(this.button.hasClass('e_mod'))		this.type = 'modify';
		else if(this.button.hasClass('easyform'))	this.type = 'easyform';
		else if(this.button.hasClass('heiva_prog'))	this.type = 'heiva_prog';
		else if(this.button.hasClass('billabong'))	this.type = 'billabong';
		else if(this.button.hasClass('earlybird2'))	this.type = 'earlybird2';
		else if(this.button.hasClass('salon_mariage'))	this.type = 'salon_mariage';
		else if(this.button.hasClass('heiva_prog2'))	this.type = 'heiva_prog2';
		
		else if(this.button.getProperty('title') == "delete")this.type = 'qdelete';
		else this.type = 'rooms';

		this.create();
		
		$$(this.overlay,this.inClose,this.cancelP,this.promptClose).addEvent('click',lThis.close.bind(lThis));

		this.overlayScroll = this.posOverlay.bind(this);
		this.contentResize = this.posContent.bind(this);
		if(Browser.Engine.version<5&&Browser.Engine.trident){
			$$(this.overlay,this.iframe).setStyle('position','absolute');
			$$(this.overlay,this.iframe).setStyle('top',window.getScrollTop()+'px');
			window.addEvent('scroll',lThis.overlayScroll)
		}else $$(this.overlay,this.iframe).setStyle('position','fixed');

		window.addEvent('resize',lThis.contentResize);

		this.boxFx = new Fx.Tween(this.overlay).start('opacity',0.5);

		this.ajaxBox = new Request.HTML({

			'url':'beta/ajax/'+lThis.type+'.php','method':'get',
			'update':lThis.inContent,
			'onComplete':function(){
				if($chk($('a_cancel')))$('a_cancel').addEvent('click',function(e){e.stop();lThis.close()});
   				lThis.content.setStyle('display','block');
   				lThis.posContent();
   				lThis.loading.setStyle('display','none');

   				if(lThis.type == 'description' || lThis.type  ==  'activity' || lThis.type  ==  'island'){
   					if($chk($('dFrame')))new Carrousel($('dFrame'),$('inFrame'),$$('.d_show'),$$('.sliderIn'));
   					if($chk($('test')))lThis.diapo = new Diaporama($('test'),$$('.d-ico'),{stop:$('stop'),play:$('play')});
   				}
   				if (GBrowserIsCompatible()&&$chk($('latitude'))){
				   	var Lat = $('latitude').getProperty('value');
				   	var Lng = $('longitude').getProperty('value');
				   	var Zoom = 10;
				   	var TextAffiche =  $$('#inOverlay h1')[0].get('html');
					var map = new GMap2(document.getElementById("map"), {mapTypes: [G_SATELLITE_MAP]});
					map.setCenter(new GLatLng(Lat,Lng ),Zoom );
					map.addControl(new GSmallMapControl());
   					map.addControl(new GMapTypeControl());
   					var point = new GLatLng(Lat,Lng);
   					var marker = createMarker(point,TextAffiche);
   					map.addOverlay(marker);
   				}
   				else if(lThis.type == 'preview'&&$chk($('e_send'))){
   					var a = ($chk($('e_ref')))?$('e_ref').get('text'):null;
   					$('e_send').addEvent('click',function(e){
   						e.stop();
   						lThis.type = 'send';
   						lThis.content.destroy();
 						lThis.prompt(a)
 					})
 				}
 				else if(lThis.type == 'activity'||lThis.type == 'preview'||lThis.type == 'save'||lThis.type == 'send'){}
 				else lThis.roomList();
 			}
 		});

		(this.type == 'delete'||this.type == 'save'||this.type == 'send'||this.type == 'qdelete'||this.type == 'modify')?this.prompt(null):this.fillIn()

	},

	create:function(){
		lThis = this;
		this.overlay	 =  new Element('div',{'id':'e_overlay'}).inject($(document.body));
		this.iframe		 =  new IFrame('e_frame').inject(this.overlay,'after');
		this.content	 =  new Element('div',{'id':'inOverlay'}).inject(this.iframe,'after');
		this.inClose	 =  new Element('div',{'id':'close_box','html':close_message}).inject(this.content);
		this.inContent	 =  new Element('div').inject(this.inClose,'after');
		this.loading	 =  new Element('img',{'src':'images/big_loading.gif','alt':'Loading'}).inject(this.content,'after');
		this.callAbs	 =  new Element('div').addClass('e_prompt').inject(this.iframe,'after');
		this.call		 =  new Element('div',{'id':'prompt'}).inject(this.callAbs);
		this.pHead		 =  new Element('div',{'id':'prompt_head','html':'<span>Confirmer Suppression</span>'}).inject(this.call);
		this.promptClose =  new Element('a',{'id':'prompt_close'}).inject(this.pHead,'bottom');
		this.bodyP		 =  new Element('div',{'id':'prompt_body'}).inject(this.call,'bottom');
		this.buttonP	 =  new Element('div',{'id':'prompt_button'}).inject(this.call,'bottom');
		this.confirmP	 =  new Element('a',{'id':'prompt_confirm','href':'#','html':'Confirmer'}).inject(this.buttonP,'bottom');
		this.cancelP	 =  new Element('a',{'id':'prompt_cancel','html':'Annuler'}).inject(this.buttonP,'bottom');

		var a = $(document.body).getSize();
		var b = window.getScrollTop();
		var c = this.position = $chk($('engine'))?
			$('engine').getPosition():
			$chk($('account'))?
				$('account').getPosition():
				$chk($('p_package'))?
					$('p_package').getPosition():
					$chk($('p_preview'))?
					$('p_preview').getPosition():
					$('c_result').getPosition();

		$$(this.overlay,this.iframe)
			.setStyles({
				'height':(a.y+20)+'px',
				'z-index':100,
				'left':'0',
				'top':'0',
				'display':'block',
				'border':0,
				'width':'100%',
				'background-color':'#000000'
			})
			.set('opacity',0.01);

		this.iframe.setStyles({'z-index':99});

		this.content.setStyles({
			'position':'absolute',
			'display':'none',
			'top':(b+50)+'px',
			'z-index':102,
			'width':'669px',
			'padding':'2px',
			'background-color':'#ffffff'
		});

		var d = (this.type == 'delete')?50:-10;

		this.callAbs.setStyles({
			'position':'absolute',
			'display':'none',
			'top':(b+c.y+d)+'px',
			'z-index':102,
			'width':'100%',
			'height':'1px',
			'overflow':'visible',
			'background':'none'
		});

		this.call.setStyles({'margin':'0 auto'});

		this.loading.setStyles({'position':'absolute','top':(b+100)+'px','left':'45%','z-index':101})
	},

	fillIn:function(){
		lThis = this;
		var a = this.parent.get('title');
		var b;

		if(a == null||a == '')b = '';
		else b = '&stay='+a.replace(/room_/,'');

		if(lThis.type == 'preview'){
			var c = lThis.type;
			var d = lThis.button.get('href').split('#');
			d = d[1]
		}
		else{
			var d = this.parent.get('id');
			if(d == null||d == '')d = this.parent.get('dir');
			if(lThis.type == 'activity') var c = 'service';
			else if(lThis.type == 'island') var c =  'island';
			else if(lThis.type == 'rooms'&&this.parent.hasClass('cr_rate')){
				d = lThis.button.get('href').split('#');
				d = d[1];
				c = 'offer='+lThis.button.get('title')+'&room'
			}else c = 'hotel'
		}

		var e = (lThis.type == 'save'||lThis.type == 'send')?'':c+'='+d+b+lThis.act;

		this.ajaxBox.send(e)
	},

	prompt:function(b){
		lThis = this;
		lThis.loading.setStyle('display','none');
		var c = window.getScrollTop()+this.position.y;

		(function(){lThis.callAbs.setStyles({'display':'block','top':c})}).delay(700);

		if(this.type == 'delete'){
			this.overlay.setStyle('background-color','#ffffff');
			var d = lThis.button.get('rel');
			var f = $('room_'+d).getElement('.s_hotel');
			this.bodyP.set('html','<br/>Voulez-vous vraiment supprimez ce s&eacute;jour?<br/><strong>'+f.get('html')+'</strong>');
			this.confirmP.setProperty('href',lThis.button.getProperty('href'))
		}
		else if(this.type == 'modify'){
			this.overlay.setStyle('background-color','#ffffff');
			var d = lThis.button.get('rel');
			this.pHead.set('html','<span>Confirmer modification</span>');
			this.bodyP.set('html','<br/>Ce s&eacute;jour comporte des offres promotionnelles. Elles peuvent &ecirc;tre perdues lors de la modification.<br/>Voulez-vous continuez ?');
			this.confirmP.setProperty('href',lThis.button.getProperty('href'));
		}
		else if(this.type == 'qdelete'){
			this.overlay.setStyle('background-color','#ffffff');
			this.bodyP.set('html','<br/>Voulez-vous vraiment supprimez ce s&eacute;jour?<br/>');
			this.confirmP.setProperty('href',lThis.button.getProperty('href'))
		}
		else{
			this.overlay.tween('background-color','#ffffff');
			var g = '&nbsp;';
			var h = '';
			var i = '';

			if(this.type == 'send'){
				i = '<p class = "s_remind">Reminder: sended quotation will be amended only by our consultants</p>';
				this.callAbs.addClass('e_send')
			}

			var j = lThis.button.get('href');
			j = j.split('#');

			if(j[1]>0&&($chk($('e_ref'))||b!= null)){
				g = '<label for = "update">&nbsp;</label>'+'<input type = "checkbox" id = "update" name = "update" checked = "checked"/> &nbsp; &nbsp; Uncheck to save as';
				h = ($chk($('e_ref')))?$('e_ref').get('text'):b
			}

			var k = lThis.button.get('href').split('#');
			k = k[1];
			var l = $chk($('engine'))?'':'<input type = "hidden" name = "quote" value = "'+k+'"/>';
			this.formP = new Element('form',{
				'id':'formP',
				'name':'formP',
				'action':'beta/ajax/'+this.type+'.php',
				'method':'post',
				'html':'<strong>Customer details</strong>'
					+'<p><label for = "ref">Client reference</label><input type = "text" id = "ref" name = "ref" value = "'
					+h+'"/></p>'+'<p>'+g+'</p>'
					+'<strong>Various</strong>'+'<p><label for = "comment">Comments</label><textarea id = "comment" name = "comment"></textarea></p>'
					+i+l
			}).inject(this.bodyP);

			this.callAbs.addClass('e_save');

			var t = (this.type == 'save')?'Save':'Send';
			this.pHead.set('html','<span>'+t+'</span>');
			this.promptClose.inject(this.pHead,'bottom');
			this.confirmP.set('html',t).addEvent('click',function(e){
				e.stop();
  				lThis.formP.set('send',{
  					'onRequest':function(){
	  					lThis.callAbs.setStyle('display','none');
	  					lThis.loading.setStyle('display','block')
  					},
  					'onComplete':function(a){
  						lThis.close();
						if(!$chk($('e_ref'))) new Element('h2',{'id':'e_ref','html':a}).inject($('engine'),'top');
						else $('e_ref').set('html',a);

						if(j[1] == 0&&$chk($('engine'))&&lThis.type == 'save'){
							$$('.e_send').set('href',j[0]+'#1');
							lThis.button.set('href',j[0]+'#1')
						}else if(lThis.type == 'send'&&$chk($('engine'))){
							lThis.button.set('href',j[0]+'#0');
							$$('.e_record').set('href',j[0]+'#0')
						}
					}
				});

				lThis.formP.send()
			});

			this.formP.addEvent('submit',function(e){
				e.stop();
				lThis.formP.set('send',{
					'onRequest':function(){
						lThis.callAbs.setStyle('display','none');
						lThis.loading.setStyle('display','block')
					},
					'onComplete':function(a){
						lThis.close();

						if(!$chk($('e_ref'))) new Element('h2',{'id':'e_ref','html':a}).inject($('engine'),'top');
						else $('e_ref').set('html',a);

						if(j[1] == 0&&$chk($('engine'))&&lThis.type == 'save'){
							$$('.e_send').set('href',j[0]+'#1');
							lThis.button.set('href',j[0]+'#1')
						}
						else if(lThis.type == 'send'&&$chk($('engine'))){
							lThis.button.set('href',j[0]+'#0');
							$$('.e_record').set('href',j[0]+'#0')
						}
					}
				});
				lThis.formP.send()
			})
		}
	},

	posOverlay:function(){
		this.overlay.setStyle('top',window.getScrollTop()+'px')
	},

	posContent:function(){
		var a = this.content.getSize();
		var b = Math.floor((window.getWidth()-a.x)/2);
		this.content.setStyles({'left':b+'px'});
		this.overlay.setStyle('height',window.getHeight())
	},

	close:function(){
		lThis = this;
		if(Browser.Engine.version<5&&Browser.Engine.trident)window.removeEvent('scroll',lThis.overlayScroll);

		window.removeEvent('resize',lThis.contentResize);
		$$(this.iframe,this.content,this.loading,this.callAbs).destroy();
		this.boxFx.removeEvent('complete');
		this.boxFx.start('opacity',0).addEvent('complete',function(){lThis.overlay.destroy()})
	},

	roomList:function(){
		lThis = this;
		if($('moteurRecherche'))$('moteurRecherche').addEvent('submit',function(a){
			if($('room').get('value') == '-1'||$('room').get('value') == -1){
				a.stop();
 				label = $('room').getPrevious('label');
 				label.setStyles({'color':'#c0000d','background-color':'#ffff00','font-weight':'bold'})
 			}
 		});
		var e = $$('o-hotel');
		w_load = e.getSize();
		var h = $$('#chTrans, #d-hotel p.e_button');
		var f = new Fx.Tween($('b-hotel'),{duration:500});
		var g = $$('a.offre00');
		g.each(function(d){
			d.addEvent('click',function(b){
				b.stop();
 				if($('e-loading')) div.destroy();
 				div = new Element('div');
 				var c = new Request.HTML({
 					method:'get',url:'beta/ajax/offer.php?ref='+d.get('rel'),
 					onRequest:function(){
 						$('b-hotel').set('opacity',0);
   						div.setProperty('id','e-loading')
   							.injectInside($('d-hotel'));

   						var a = lThis.loading.clone();
   						a.setStyles({'display':'block','top':0}).inject(div)
   					},
   					onComplete:function(){
   						div.destroy();
   						if(d.getParent('ul.unoffer'))h.setStyle('display','none');
   						else h.setStyle('display','block');

   						g.each(function(a){a.set('class','inactive')});
   						d.set('class','active');
   						f.start('opacity',0.0,1.0)
   					},
   					update:$('o-hotel')
   				}).send()
   			})
   		})
   	}
});
//	***********************************************
//	*********************************	FIN BOX	***
//	***********************************************
var engine=$chk($('engine'))?
	$('engine'):(
		$chk($('account'))?
			$('account'):(
				$chk($('c_result'))?
					$('c_result'):(
						$chk($('p_package'))?
							$('p_package'):(
								$chk($('c_filter'))?$
									('c_filter'):(
										$chk($('p_preview'))?$('p_preview'):$('e_login')
									)
								)
							)
						)
					);

if($chk(engine)){
	var posE=engine.getCoordinates();
	var loading=new Element('div',{'styles':{'z-index':1,'background-color':'#555555'}}).set('opacity',0.6);
	var iframeL=new IFrame({'styles':{'z-index':0}}).set('opacity',0.1);
	/*$$(loading,iframeL).setStyles({
		'position':'absolute',
		'top':posE.top,
		'left':posE.left,
		'height':posE.height,
		'width':posE.width,
		'display':'none'
	}).inject($(document.body));/**/

	var posG=Math.abs((posE.width-128)/2);

	var paraf=new Element('p',{
		'styles':{
			'padding-top':'128px',
			'text-align':'center',
			'color':'#ffffff',
			'font-weight':'700'
		},
		'html':'<br/><br/>Loading'
	}).inject(loading);

	var gif=new Element('img',{'src':'images/big_loading.gif','alt':'Loading','styles':{'display':'inline','float':'none'}}).inject(paraf,'top');
	if($chk($('e_forgotten'))){
		$('refresh').addEvent('click',function(e){
			e.stop();
  			$('img_captcha').setProperty('src','beta/captcha.php'+"?a="+Math.random(1))
  		});
		paraf.setStyle('padding-top','20px');
		$('e_forgotten').addEvent('click',function(e){
			e.stop();
			var b=new RegExp('^[a-z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$','i');

  			if(!b.test($('log').get('value'))) $('e_mess').set('html','Fill the username field with a correct e-mail and we contact you');
  			else if($('captcha').get('value')=='') $('e_mess').set('html','Fill the code field');
  			else{
  				$('formlogin').set('send',{
  					'url':'beta/ajax/forgotten.php',
  					'method':'get',
  					onRequest:function(){
  						$$(loading,iframeL).setStyle('display','block')
  					},
  					onComplete:function(a){
  						$$(loading,iframeL).setStyle('display','none');
  						$('e_mess').set('html',a)
  					}
  				});

  				$('formlogin').send()
  			}
  		})
  	}

  	if($chk($('room_2'))){
  		var bgdefault=$('e_order').getStyle('background');
		new Sortables($('e_stay'),{
			'clone':true,
			'opacity':0.6,
			'handle':'.s_move',
			onStart:function(){
				$('e_order').setStyle('background',bgdefault)
			},
			onComplete:function(){
				var c='list';
				var d=this.serialize();
				d.each(function(a){
					var b=a.replace(/room_/,'');
					c+='&order[]='+b
				});
				$('e_order')
					.set('href','../beta-search-vacation/?'+c)
					.setStyle('background','url(images/engine/order.gif)top left repeat-x')
			}
		})
	}

	var scrollAct=new Fx.Scroll(window,{duration:'1100'});
	var bot=$('e_form');
	if($chk($('e_island'))) var islandSlide=new Fx.Slide('e_island');
	if($chk($('e_hotel')))var hotelSlide=new Fx.Slide('e_hotel').hide();
	if($chk($('e_stay'))){
		islandSlide.hide();
		var generalSlide=new Fx.Slide('e_general').hide();
		var carSlide=new Fx.Slide('e_car').hide();
		$('info_change').addEvent('click',function(e){
			e.stop();
			islandSlide.hide();
   			hotelSlide.hide();
   			carSlide.hide();
   			generalSlide.slideIn().addEvent('complete',function(){
   				$('e_general').highlight('#EFE02F')
   			}).chain(function(){scrollAct.toElement(bot)})
   		})
   	}

   	$$('.cr_rate a,.e_more,.e_activity a,.heiva_prog,.heiva_prog2,.billabong').each(function(c){
   		c.addEvent('click',function(e){
   			e.stop();
   			var a=c.getParent('td');
   			var b=c.getParent('tr');
   			if(a!=null&&(a.get('class')=='cr_rate'||a.get('class')=='cr_hotel')){
   				$$('#table_comparison tr').removeClass('room_select');
   				b.addClass('room_select')
   			}

   			new Box(c)
   		})
   	});

   	$$('#e_stay .e_select').each(function(c){
   		c.addEvent('click',function(e){
   			e.stop();
   			if($chk($('e_stay'))){
   				islandSlide.hide();
   				hotelSlide.hide();
   				carSlide.hide()
   			}
   			var a=c.getParent();
   			var b=a.get('title');
   			selectStay(b);
   			new Box(c)
   		})
   	});

   	$$('.desc-act,.desc-ile').each(function(more){
   		more.addEvent('click', function(e){
			e.stop();
			new Box(more);
		});
	});
	$$('.e_del').each(function(a){
		a.addEvent('click',function(e){
			e.stop();
			new Box(a)
		})
	});
	$$('#account a[title=delete]').each(function(a){
		a.addEvent('click',function(e){
			e.stop();
  			new Box(a)
  		})
  	});


	var ajaxAct=new Request.HTML({
		'url':'beta/ajax/activity.php',
		'method':'get',
		'update':$('e_hotel'),
		'evalScripts ': false,
		'onRequest':function(){
			posE=engine.getSize();
   			$$(loading,iframeL).setStyles({'display':'block','height':posE.y});
 		},
 		'onComplete':function(reponse){
 			$$(loading,iframeL).setStyle('display','none');
			if($chk($$(".ong")[0])){
				first_class = $$(".ong")[0].getProperty("class").toString().split(" ")[0];
		 		$$("div.diving,div.land,div.romantic,div.spa,div.water").setStyle('display','none');
		 		$$("div."+first_class).setStyle('display','block');

	 			$$("span.water, span.land, span.diving, span.romantic, span.spa").addEvent("click",function(){
					var classAct = this.getProperty("class").toString().split(" ")[0];
	 				$$("div.diving,div.land,div.romantic,div.spa, div.water").setStyle('display','none');
	 				$$("div." + classAct).setStyle('display','block');
	 				hotelSlide.slideIn();
	   			});
	 			$$('#e_hotel .e_more, .a_water, .a_land, .a_diving, .a_romantic, .a_spa').each(function(a){
	 				a.addEvent('click',function(e){
	 					e.stop();
	 					new Box(a)
	 				})
	 			})
			}
 			hotelSlide.slideIn()
	 			.chain( function(){
	 				scrollAct.toElement(bot);
	 				$('e_hotel').highlight('#EFE02F');
	 				if(Browser.Engine.trident)hotelSlide.slideIn()
				});
 		}
 	});
	$$('.b_car').each(function(d){
		d.addEvent('click',function(e){
			e.stop();
			var b=d.getParent();
			var c=b.get('title');
			selectStay(c);
			$$('input[name=stay]').set('value',c.replace(/room_/,''));

  			$$('#car option').each(function(a){
  				if(a.get('value')==d.get('id'))a.selected=true;
  				else a.selected=false
  			});

  			$$('#day_rent option').each(function(a){
  				if(a.get('value')==d.get('title'))a.selected=true;else a.selected=false
  			});

			generalSlide.hide();
			hotelSlide.hide();
			islandSlide.hide();
			carSlide.slideIn()
				.addEvent('complete',function(){$('e_car').highlight('#EFE02F')})
				.chain(function(){scrollAct.toElement(bot)})
		})
	});
	$$('.b_act').each(function(f){
		f.addEvent('click',function(e){
			e.stop();carSlide.hide();var a=f.getParent();var b=a.get('id');var c=a.get('title');
			selectStay(c);var d='&stay='+c.replace(/room_/,'');ajaxAct.send('hotel='+b+d)
		})
	});

	var bottom=window.getHeight();
	$$('.b_room').each(function(c){
		c.addEvent('click',function(e){
			e.stop();var b;if(c.get('tag')=='li'){b=c.getParent('ul');
	  		b=b.get('title')}else b=c.get('title');
	  		selectStay(b);$$('#island option').each(function(a){if(a.get('value')==c.get('rel'))a.selected=true;else a.selected=false});$$('input[name=stay]').set('value',b.replace(/room_/,''));generalSlide.hide();
	  		hotelSlide.slideOut();
	  		carSlide.hide();
	  		islandSlide.slideIn().addEvent('complete',function(){$('e_island').highlight('#EFE02F')}).chain(function(){scrollAct.toElement(bot)})
  		})
	});

	if($chk($('arrival')))$('arrival').addEvent('blur',function(e){
		if($chk($('arrival')))
			$('e_island').fireEvent('submit', e);
	});
	
	if($chk($('cat')))$('cat').addEvent('change', function(e){
		$('e_island').fireEvent('submit', e);
	});
	if($chk($('island')))$('island').addEvent('change', function(e){
		$('e_island').fireEvent('submit', e);
	});
	if($chk($('e_island')))$('e_island').addEvent('submit',function(e){e.stop();

	new Request.HTML({'url':'beta/ajax/hotels.php','update':$('e_hotel'),'onRequest':function(){posE=engine.getSize();$$(loading,iframeL).setStyles({'display':'block','height':posE.y})},onComplete:function(){$$(loading,iframeL).setStyle('display','none');
	hotelSlide.slideIn().addEvent('complete',function(){$('e_hotel').highlight('#EFE02F')}).chain(function(){scrollAct.toElement(bot)});$$('#e_hotel .e_more, #e_hotel .e_select').each(function(a){a.addEvent('click',function(e){e.stop();new Box(a)})})}}).post($('e_island'))});
	$$('.no_car').set('opacity',0.4);honeymoon();$$('.q_preview').each(function(b){b.addEvent('click',function(e){
	e.stop();$$('.p_list, .q_quote').removeClass('p_list_sel');var a=b.getParent('.p_list');if(!$chk(a))a=b.getParent('.q_quote');a.addClass('p_list_sel');new Box(b)})});$$('.e_record, .e_send').each(function(a){a.addEvent('click',function(e){e.stop();new Box(a)})})}heureTahiti();
	if($('jour'))$("jour").innerHTML=nomJour+" "+jour+" "+tabMois[mois];setInterval("heureTahiti()",60000);function selectStay(a){if($chk('e_stay')){var b=$$('#e_stay div, .e_add');b.removeClass('in_use');$(a).addClass('in_use')}}function honeymoon(){$$('input[name=wedding]').each(function(c){
	c.addEvent('click',function(e){var a=$(document.body).getElement('input[name=arrival]').get('value');
	if(!validate_date(a)){date_arrivee=new Date()}else{var b=a.split('/');date_arrivee=new Date(b[2],(b[1]-1),b[0],0,0,0)}date_min=new Date((date_arrivee.getFullYear()-1),date_arrivee.getMonth(),date_arrivee.getDate(),0,0,0);new Calendar(c,{maxDate:date_arrivee,minDate:date_min})})})}
	function validate_date(a){var b=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/;return a.test(b)}
	var heure=dateTahiti.getHours();
	var minute=dateTahiti.getMinutes()-1;
	var seconde=dateTahiti.getSeconds();
	var jour=dateTahiti.getDate();
	var mois=dateTahiti.getMonth();
	var nomJour=tabNomJour[dateTahiti.getDay()-1];
	var annee=dateTahiti.getYear();

	if(annee<999)annee+=1900;

	function heureTahiti(){minute++;if(minute<10)minute="0"+Math.round(minute);else if(minute>59){minute="00";heure++}if(heure<10)heure="0"+Math.round(heure);else if(heure>23)heure="00";if(seconde<10)seconde_affiche='0'+seconde;else seconde_affiche=seconde;point=":";
	heureTexte=heure+point+minute;if($('heure'))$("heure").innerHTML=heureTexte;seconde++}function afficheEtat(a){var b=a.getNext('.s_state');if(p.value=="US"){b.setStyle('display','block')}else{b.setStyle('display','none')}}/**/
	function createMarker(point,text){var marker=new GMarker(point);GEvent.addListener(marker,"click", function(){marker.openInfoWindowHtml(text);});return marker;}
