if((typeof Prototype=='undefined')||(typeof Element=='undefined')||(typeof Element.Methods=='undefined'))
	throw("pngHack requires the Prototype JS framework >= 1.6.0.3");
Element.addMethods({pngHack:function(el){var el=$(el);
		var ie7plus=(Prototype.Browser.IE&&parseFloat(navigator.appVersion.split(';')[1].strip().split(' ')[1])>=7)?true:false;
    	if(!Prototype.Browser.IE||ie7plus)return el;var gif="images/s.gif";
    	if((el.match('img'))&&(el.src.include("png"))){var alphaImgSrc=el.src;var sizingMethod="scale";el.src=gif;
    	}else if(el.getStyle("backgroundImage").include("png")){
      		var bgc=el.getStyle("backgroundColor")||"",alphaImgSrc=el.getStyle("backgroundImage").gsub(/url\(|\)|'|"/,"");
      		var sizingMethod="crop";el.setStyle({background:[bgc,"url(", gif, ") no-repeat"].join("")});
    	}else{return el;}
    el.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='#{al}',sizingMethod='#{sz}')".interpolate({al: alphaImgSrc,sz:sizingMethod});return el;}});
PDFHyperLink=Class.create({initialize:function(){this.pdfLink=$("pdf_link");this.pdfUrl=this.pdfLink.readAttribute("href");this.handler=this.hyperHandler.bindAsEventListener(this);this.pdfLink.observe("click",this.handler);},hyperHandler:function(e){e.stop();window.open(this.pdfUrl);}});
WelcomeSurprise=Class.create({initialize:function(){this.imgDiv=$("hwb_image_div");this.span=$("hwb");this.imgDiv.setStyle({opacity:0.0,visibility:"visible"});new PeriodicalExecuter(function(){new Effect.Pulsate(this.span);}.bind(this),4);with(this.span){observe("mouseover",this.hh.bindAsEventListener(this,true));observe("mouseout",this.hh.bindAsEventListener(this,false));}},hh:function(){if(arguments[1])new Effect.Opacity(this.imgDiv,{duration:1.0,from:0.0,to:1.0});else new Effect.Opacity(this.imgDiv,{duration:1.0,from:1.0,to:0.0});}});
InquireButtonsFx=Class.create({initialize:function(){new PeriodicalExecuter(function(){new Effect.Pulsate($("inq1"));
	new Effect.Pulsate($("inq2"));new Effect.Pulsate($("inq3"));},7);}});
TextColorFx=Class.create({initialize:function(div,clr1,clr2,clr3,clr4,duration,delay){this.textDiv=$(div);this.color1=clr1;this.color2=clr2;this.color3=clr3;this.color4=clr4;this.originalColor=this.textDiv.getStyle("color");this.duration=duration;this.delay=delay;this.toClr1();},toClr1:function(){new Effect.Morph(this.textDiv,{style:"color:"+this.color1,delay:this.delay,duration:this.duration,afterFinish:this.toClr2.bind(this)});},toClr2:function(){new Effect.Morph(this.textDiv,{style:"color:"+this.color2,duration:this.duration,afterFinish:this.toClr3.bind(this)});},toClr3:function(){new Effect.Morph(this.textDiv,{style:"color:"+this.color3,duration:this.duration,afterFinish:this.toClr4.bind(this)});},toClr4:function(){new Effect.Morph(this.textDiv,{style:"color:"+this.color4,duration:this.duration,afterFinish:this.toOrigin.bind(this)});},toOrigin:function(){new Effect.Morph(this.textDiv,{style:"color:"+this.originalColor.toString(),duration:this.duration,afterFinish:this.toClr1.bind(this)});}});
var debug=false;
SlideShowImage=Class.create({
	initialize:function(image,alt){
		this.image=new Element("img",{src:image,"height":"300","width":"400"}).setStyle({position:"absolute",left:"0px",top:"0px",margin:"0px"});
		this.image.writeAttribute({"alt":alt});this.image.writeAttribute({title:alt});this.image.hide();this.isCreatedFlag=false;},
	getImage:function(){return this.image;},notifyCreated:function(){this.isCreatedFlag=true;},
	isCreated:function(){return this.isCreatedFlag;}
});
SlideShowEngine=Class.create({
	initialize:function(options){this.options={duration:1,delay:3.0,random:false,slideshow:true,controls:false};
		Object.extend(this.options,options||{});this.photosDir="http://www.rentals-of-cannes.com/images/listing_photos/";
		this.prevHoverHandler=this.onPrevHover.bind(this);this.prevOutHandler=this.onPrevOut.bind(this);
		this.prevClickHandler=this.moveToPrevious.bind(this);this.nextHoverHandler=this.onNextHover.bind(this);
		this.nextOutHandler=this.onNextOut.bind(this);this.nextClickHandler=this.moveToNext.bind(this);
		this.keyboardHandler=this.keyboardAction.bindAsEventListener(this);this.autoClickHandler=this.autoClick.bind(this);
		this.autoHoverHandler=this.autoHover.bind(this);this.autoOutHandler=this.autoOut.bind(this);
		this.running=false;this.imageArray=new Array();this.imageElementsArray=new Array();this.onTransition=false;},
	initSlideShow:function(prevDiv,nextDiv,infoDiv,imageDiv,autoBtn){			// When DOM is fully loaded...
		this.prevDiv=$(prevDiv);this.nextDiv=$(nextDiv);this.infoDiv=$(infoDiv);
		this.imageDiv=$(imageDiv);this.autoBtn=$(autoBtn);this.startObservers();
		this.buildImageElements();if(this.options.slideshow)this.startSlideshow();
		this.autoBtn.update("").setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"80px 0px"}).writeAttribute("title","Set Manual Mode");},
	buildImageElements:function(){var iel,alt,str="";
		for(var i=0,n=this.numberOfImages;i<n;++i){								// Optimized loop ;o)
			alt=this.id+" - "+this.title+" (image "+(i+1)+")";iel=new SlideShowImage(this.photosDir+this.imageArray[i],alt);
			this.imageElementsArray.push(iel);this.imageDiv.insert(iel.getImage());}
		this.imageDiv.insert(this.imageElementsArray[0].getImage().show());this.infoDiv.update("Image 1 of "+this.numberOfImages);},
	fillImageArray:function(){							// Virtual => PHP provides arguments on window creation...
		this.imageArray=arguments;this.numberOfImages=this.imageArray.length;this.cur=0;this.end=this.numberOfImages-1;},
	getIdAndTitle:function(){this.id=arguments[0];this.title=arguments[1];},
	keyboardAction:function(event){
		if(this.options.slideshow==false&&this.onTransition==false){
        	var keycode=event.keyCode,key=String.fromCharCode(keycode).toLowerCase();
			if((key=='p')||(keycode==37))this.moveToPrevious();else if((key=='n')||(keycode==39))this.moveToNext();}},
	startSlideshow:function(){
		if(!this.running){
			this.executer=new PeriodicalExecuter(function(){this.updateSlide(this.cur+1);}.bind(this),this.options.delay);
			this.running=true;}},
	stopSlideshow:function(){if(this.executer){this.executer.stop();this.running=false;}},
	moveToPrevious:function(){
		if(this.options.slideshow==false&&this.onTransition==false){this.stopSlideshow();this.updateSlide(this.cur-1);}},
	moveToNext:function(){
		if(this.options.slideshow==false&&this.onTransition==false){this.stopSlideshow();this.updateSlide(this.cur+1);}},
	updateSlide:function(next){
		if(next>this.end)next=0;else if(next==-1)next=this.end;this.fadeInOut(next,this.cur);	
		this.infoDiv.update("Image "+(next+1)+" of "+this.numberOfImages);},
 	fadeInOut:function(n,c){	
		new Effect.Parallel([new Effect.Fade(this.imageElementsArray[c].getImage(),{sync:true}),
		new Effect.Appear(this.imageElementsArray[n].getImage(),{sync:true})],
			{duration:this.options.duration,beforeStart:this.startTransition.bind(this),afterFinish:this.endTransition.bind(this)});
		this.cur=n;},
	startTransition:function(){this.onTransition=true;
		if(debug&&/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&typeof(console)=="object"){
			console.log("this.onTransition = "+this.onTransition);}},
	endTransition:function(){this.onTransition=false;
		if(debug)if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&typeof(console)=="object")
			console.log("this.onTransition = "+this.onTransition);},
	startObservers:function(){
		this.nextDiv.observe("click",this.nextClickHandler);this.nextDiv.observe("mouseover",this.nextHoverHandler);
		this.nextDiv.observe("mouseout",this.nextOutHandler);this.prevDiv.observe("click",this.prevClickHandler);
		this.prevDiv.observe("mouseover",this.prevHoverHandler);this.prevDiv.observe("mouseout",this.prevOutHandler);
		this.autoBtn.observe("click",this.autoClickHandler);document.observe("keydown",this.keyboardHandler); 
		this.autoBtn.observe("mouseover",this.autoHoverHandler);this.autoBtn.observe("mouseout",this.autoOutHandler);},
	onNextHover:function(){this.nextDiv.setStyle({background:"url(/images/ss_next_arrow.png) left bottom"});},
	onNextOut:function(){this.nextDiv.setStyle({background:"url(/images/ss_next_arrow.png) left top"});},
	onPrevHover:function(){this.prevDiv.setStyle({background:"url(/images/ss_prev_arrow.png) left bottom"});},
	onPrevOut:function(){this.prevDiv.setStyle({background:"url(/images/ss_prev_arrow.png) left top"});},
	autoClick:function(){
		if(this.options.slideshow){this.options.slideshow=false;this.stopSlideshow();
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"-40px 0px"});
			this.autoBtn.writeAttribute("title","Set Auto Mode");
		}else{this.options.slideshow=true;this.autoInit=true;this.startSlideshow();
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"top right"});
			this.autoBtn.writeAttribute("title","Set Manual Mode");}},
	autoHover:function(){
		if(this.options.slideshow==true)
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"top right"});
		else if(this.options.slideshow==false) 
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"-40px 0px"});},
	autoOut:function(){
		if(this.options.slideshow==true)
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"80px 0px"});
		else if(this.options.slideshow==false)
			this.autoBtn.setStyle({backgroundImage:"url(/images/ss_play_pause.png)",backgroundPosition:"top left"});}
});
/*Genuine Map System for Rentals of Cannes Properties*/
MapSystem=Class.create({initialize:function(){this.map;
		this.propertyMarker;this.palaisMarker;this.beachMarker;this.beach2Marker;this.shoppingMarker;
		this.originalZoomFactor;this.id;this.title;this.latitude;this.longitude;
		this.containerDiv;this.infoDiv;this.propertyHtml;this.showFlag=true;this.infoFlag=false;
		this.createMapDivs();this.createButtons();this.setHandlers();this.setObservers();},
	createMapDivs:function(){
		this.mapDiv=new Element("div").setStyle({position:"absolute",left:"0px",top:"0px",width:"758px",height:"258px"});
		this.buttonDiv=new Element("div").setStyle({position:"absolute",left:"0px",bottom:"0px",width:"758px",height:"40px",color:"#024",fontSize:"10px",backgroundImage:"url(/images/gmap_console_bkg.png)",backgroundRepeat:"repeat-x",borderTop:"1px solid #024"});
		this.keybdDiv=new Element("div").setStyle({position:"absolute",left:"5px",top:"1px",width:"420px",height:"12px",fontSize:"8px",textAlign:"center",color:"#525252",lineHeight:"8px"});
		var spanStart="<span style='color:#0000FF;font-weight:bold;font-size:11px;'>";
		var spanStart2="<span style='color:#0000FF;font-weight:bold;font-size:12px;'>",spanEnd="</span>";
		var keyboardString="Keyboard enabled: "+spanStart+"u"+spanEnd+" move UP,&nbsp;&nbsp;";
		keyboardString+=spanStart+"d"+spanEnd+" move DOWN,&nbsp;&nbsp;&nbsp;";
		keyboardString+=spanStart+"l"+spanEnd+" move LEFT,&nbsp;&nbsp;&nbsp;";
		keyboardString+=spanStart+"r"+spanEnd+" move RIGHT,&nbsp;&nbsp;&nbsp;";
		keyboardString+=spanStart2+"+"+spanEnd+" zoom IN,&nbsp;&nbsp;&nbsp;";
		keyboardString+=spanStart2+"&minus;"+spanEnd+" zoom OUT";
		this.keybdDiv.update(keyboardString);this.buttonDiv.insert(this.keybdDiv);},
	showInfoDiv:function(html){
		this.infoDiv=new Element("div").setStyle({position:"absolute",left:"10px",top:"10px",width:"auto",height:"auto",padding:"4px",backgroundImage:"url(/images/gmap_info_div_bkg.png)",backgroundRepeat:"repeat-x",border:"1px solid #024",padding:"2px",textAlign:"center"});
		this.infoDiv.update(html);this.mapDiv.insert(this.infoDiv);this.infoFlag=true;},
	removeInfoDiv:function(){this.infoDiv.remove();this.infoFlag=false;},
	createButtons:function(){
		this.palaisButton=new Element("div").setStyle({position:"absolute",left:"5px",top:"13px",width:"80px",height:"22px",lineHeight:"10px",border:"1px solid #C0C0C0",textAlign:"center",cursor:"pointer"});
		this.palaisButton.update("Palais des<br />Festivals");
		this.buttonDiv.insert(this.palaisButton);
		this.beachButton=new Element("div").setStyle({position:"absolute",left:"90px",top:"13px",width:"80px",height:"22px",lineHeight:"10px",border:"1px solid #C0C0C0",textAlign:"center",cursor:"pointer"});
		this.beachButton.update("Beaches<br />La Croisette");
		this.buttonDiv.insert(this.beachButton);
		this.beach2Button=new Element("div").setStyle({position:"absolute",left:"175px",top:"13px",width:"80px",height:"22px",lineHeight:"10px",border:"1px solid #C0C0C0",textAlign:"center",cursor:"pointer"});
		this.beach2Button.update("Beaches<br />Plages du Midi");
		this.buttonDiv.insert(this.beach2Button);
		this.shoppingButton=new Element("div").setStyle({position:"absolute",left:"260px",top:"13px",width:"80px",height:"22px",lineHeight:"10px",border:"1px solid #C0C0C0",textAlign:"center",cursor:"pointer"});
		this.shoppingButton.update("Shopping<br />Area");
		this.buttonDiv.insert(this.shoppingButton);
		this.rentalButton=new Element("div").setStyle({position:"absolute",left:"345px",top:"13px",width:"80px",height:"22px",lineHeight:"10px",border:"1px solid #C0C0C0",textAlign:"center",cursor:"pointer"});
		this.rentalButton.update("The<br />Property");
		this.buttonDiv.insert(this.rentalButton);
		this.zoominButton=new Element("div").setStyle({position:"absolute",right:"5px",top:"5px",width:"13px",height:"13px",border:"1px solid #CCC",textAlign:"center",fontSize:"14px",lineHeight:"13px",cursor:"pointer"});
		this.zoominButton.update("+");
		this.buttonDiv.insert(this.zoominButton);
		this.zoomoutButton=new Element("div").setStyle({position:"absolute",right:"5px",bottom:"3px",width:"13px",height:"13px",border:"1px solid #CCC",textAlign:"center",fontSize:"14px",lineHeight:"13px",cursor:"pointer"});
		this.zoomoutButton.update("-");this.buttonDiv.insert(this.zoomoutButton);},
	setHandlers:function(){
		this.propertyMarkerHoverHandler=this.propertyMarkerHover.bind(this);this.propertyMarkerOutHandler=this.propertyMarkerOut.bind(this);
		this.palaisMarkerHoverHandler=this.palaisMarkerHover.bind(this);this.palaisMarkerOutHandler=this.palaisMarkerOut.bind(this);
		this.beachMarkerHoverHandler=this.beachMarkerHover.bind(this);this.beachMarkerOutHandler=this.beachMarkerOut.bind(this);
		this.beach2MarkerHoverHandler=this.beach2MarkerHover.bind(this);this.beach2MarkerOutHandler=this.beach2MarkerOut.bind(this);
		this.shoppingMarkerHoverHandler=this.shoppingMarkerHover.bind(this);this.shoppingMarkerOutHandler=this.shoppingMarkerOut.bind(this);
		this.buttonClickHandler=this.buttonClick.bindAsEventListener(this);this.buttonHoverHandler=this.buttonHover.bindAsEventListener(this);this.buttonOutHandler=this.buttonOut.bindAsEventListener(this);
		this.keyboardHandler=this.keyboardAction.bindAsEventListener(this);},
	setObservers:function(){
		this.palaisButton.observe("click",this.buttonClickHandler);this.palaisButton.observe("mouseover",this.buttonHoverHandler);this.palaisButton.observe("mouseout",this.buttonOutHandler);
		this.beachButton.observe("click",this.buttonClickHandler);this.beachButton.observe("mouseover",this.buttonHoverHandler);this.beachButton.observe("mouseout",this.buttonOutHandler);
		this.beach2Button.observe("click",this.buttonClickHandler);this.beach2Button.observe("mouseover",this.buttonHoverHandler);this.beach2Button.observe("mouseout",this.buttonOutHandler);
		this.shoppingButton.observe("click",this.buttonClickHandler);this.shoppingButton.observe("mouseover",this.buttonHoverHandler);this.shoppingButton.observe("mouseout",this.buttonOutHandler);
		this.rentalButton.observe("click",this.buttonClickHandler);this.rentalButton.observe("mouseover",this.buttonHoverHandler);this.rentalButton.observe("mouseout",this.buttonOutHandler);
		this.zoominButton.observe("click",this.buttonClickHandler);this.zoominButton.observe("mouseover",this.buttonHoverHandler);this.zoominButton.observe("mouseout",this.buttonOutHandler);
		this.zoomoutButton.observe("click",this.buttonClickHandler);this.zoomoutButton.observe("mouseover",this.buttonHoverHandler);this.zoomoutButton.observe("mouseout",this.buttonOutHandler);},
	buttonClick:function(e){
		switch(Event.element(e)){
			case this.palaisButton:
				var icon=new GIcon();icon.iconSize=new GSize(40,22);icon.image="/images/gmaps_icon_palais.png";icon.iconAnchor=new GPoint(20,22);
				var lat=43.550180,lon=7.019040;this.palaisMarker=new GMarker(new GLatLng(lat,lon),icon);
				GEvent.addListener(this.palaisMarker,"mouseover",this.palaisMarkerHoverHandler);
				GEvent.addListener(this.palaisMarker,"mouseout",this.palaisMarkerOutHandler);
				this.map.addOverlay(this.palaisMarker);this.map.setCenter(new GLatLng(lat,lon),(this.originalZoomFactor-2));break;
			case this.beachButton:
				var icon=new GIcon();icon.iconSize=new GSize(32,38);icon.image="/images/gmaps_icon_beach.png";icon.iconAnchor=new GPoint(16,38);
				var lat=43.548500,lon=7.027000;this.beachMarker=new GMarker(new GLatLng(lat,lon),icon);
				GEvent.addListener(this.beachMarker,"mouseover",this.beachMarkerHoverHandler);
				GEvent.addListener(this.beachMarker,"mouseout",this.beachMarkerOutHandler);
				this.map.addOverlay(this.beachMarker);this.map.setCenter(new GLatLng(lat,lon),(this.originalZoomFactor-2));break;
			case this.beach2Button:
				var icon=new GIcon();icon.iconSize=new GSize(32,38);icon.image="/images/gmaps_icon_beach.png";icon.iconAnchor=new GPoint(16,38);
				var lat=43.548000,lon=7.005000;this.beach2Marker=new GMarker(new GLatLng(lat,lon),icon);
				GEvent.addListener(this.beach2Marker,"mouseover",this.beach2MarkerHoverHandler);
				GEvent.addListener(this.beach2Marker,"mouseout",this.beach2MarkerOutHandler);
				this.map.addOverlay(this.beach2Marker);this.map.setCenter(new GLatLng(lat,lon),(this.originalZoomFactor-2));break;
			case this.shoppingButton:
				var icon=new GIcon();icon.iconSize=new GSize(32,40);icon.image="/images/gmaps_icon_shopping.png";icon.iconAnchor=new GPoint(16,40);
				var lat=43.552500,lon=7.021000;this.shoppingMarker=new GMarker(new GLatLng(lat,lon),icon);
				GEvent.addListener(this.shoppingMarker,"mouseover",this.shoppingMarkerHoverHandler);
				GEvent.addListener(this.shoppingMarker,"mouseout",this.shoppingMarkerOutHandler);
				this.map.addOverlay(this.shoppingMarker);this.map.setCenter(new GLatLng(lat,lon),(this.originalZoomFactor-2));break;
			case this.rentalButton:this.map.setCenter(new GLatLng(this.latitude,this.longitude),(this.originalZoomFactor-2));break;
			case this.zoominButton:var zf=this.map.getZoom();this.map.setZoom(zf+1);break
			case this.zoomoutButton:var zf=this.map.getZoom();this.map.setZoom(zf-1);break
		}},
	buttonHover:function(e){Event.element(e).setStyle({color:"#069",fontWeight:"bold",backgroundColor:"#FFFFFF"});},
	buttonOut:function(e){Event.element(e).setStyle({color:"#024",fontWeight:"normal",backgroundColor:""});},
	palaisMarkerHover:function(){
		this.showInfoDiv("<span style=\"color:#036;font-size:14px;font-weight:bold;\">Convention Center<br />\"Palais des Festivals\"</span>");},
	palaisMarkerOut:function(){if(this.infoFlag)this.removeInfoDiv();},
	beachMarkerHover:function(){
		this.showInfoDiv("<span style=\"color:#036;font-size:14px;font-weight:bold;\">Beaches<br />\"La Croisette\"</span>");},
	beachMarkerOut:function(){if(this.infoFlag)this.removeInfoDiv();},
	beach2MarkerHover:function(){
		this.showInfoDiv("<span style=\"color:#036;font-size:14px;font-weight:bold;\">Beaches<br />\"Plages du Midi\"</span>");},
	beach2MarkerOut:function(){if(this.infoFlag)this.removeInfoDiv();},
	shoppingMarkerHover:function(){
		this.showInfoDiv("<span style=\"color:#036;font-size:14px;font-weight:bold;\">Shopping Area<br />\"rue d'Antibes\"</span>");},
	shoppingMarkerOut:function(){if(this.infoFlag)this.removeInfoDiv();},
	setContainerDiv:function(container){if(this.latitude!=""&&this.longitude!=""){
		this.containerDiv=$(container);this.gmapButton;this.containerDiv.insert(this.mapDiv);this.containerDiv.insert(this.buttonDiv);this.showMap();}},
	getLocalParams:function(id,title,latitude,longitude){
		this.id=id;this.title=title;this.latitude=latitude;this.longitude=longitude;
		this.propertyHtml="<span style=\"color:#036;font-size:14px;font-weight:bold;\">#"+this.id+"<br/>\""+this.title+"\"</span>";},
	initializeMap:function(){
		if(GBrowserIsCompatible()){
			this.map=new GMap2(this.mapDiv);this.map.setCenter(new GLatLng(this.latitude,this.longitude),16,G_NORMAL_MAP);
			var icon=new GIcon();icon.iconSize=new GSize(40,40);icon.image="/images/gmap_here_icon.png";
			icon.iconAnchor=new GPoint(20,40);this.propertyMarker=new GMarker(new GLatLng(this.latitude,this.longitude),icon);
			GEvent.addListener(this.propertyMarker,"mouseover",this.propertyMarkerHoverHandler);
			GEvent.addListener(this.propertyMarker,"mouseout",this.propertyMarkerOutHandler);
			this.map.addOverlay(this.propertyMarker);this.originalZoomFactor=this.map.getZoom();
		}},
	propertyMarkerHover:function(){this.showInfoDiv(this.propertyHtml);},
	propertyMarkerOut:function(){if(this.infoFlag)this.removeInfoDiv();},
	showMap:function(){this.initializeMap();this.buttonDiv.setStyle({zIndex:2});document.observe("keydown",this.keyboardHandler);},
	keyboardAction:function(ev){
        var keycode=ev.keyCode,key=String.fromCharCode(keycode).toLowerCase(),zf=this.map.getZoom();
		if((key=='+')||(keycode==107))this.map.setZoom(zf+1);else if((key=='-')||(keycode==109))this.map.setZoom(zf-1);				
		else if((key=='u')||(keycode==85))this.map.panDirection(0,+1);else if((key=='d')||(keycode==68))this.map.panDirection(0,-1) 			
		else if((key=='l')||(keycode==76))this.map.panDirection(+1,0);else if((key=='r')||(keycode==82))this.map.panDirection(-1,0)}
});
var ms=new MapSystem(),sse=new SlideShowEngine();
VillaPopupSubMenu=Class.create({
	initialize:function(){this.tc=0;this.vb=$("villa_hlink");this.vp=$("villa_popup");this.vpLinks=$$("a.vp_links");
		for(var i=0,l=this.vpLinks.length;i<l;++i){this.vpLinks[i].observe("click",this.hvp.bind(this));}
		this.vb.observe("mouseover",this.ch.bind(this,true));this.vb.observe("mouseout",this.ch.bind(this,false));
		this.vp.observe("mouseover",this.ch.bind(this,true));this.vp.observe("mouseout",this.ch.bind(this,false));},
	ch:function(s){if(s){
			this.vp.setStyle({display:"block",visibility:"visible",zIndex:7777});if(this.tc>0)window.clearTimeout(this.tc);
		}else this.tc=this.hvp.bind(this).delay(0.7);},
	hvp:function(){this.vp.setStyle({display:"none",visibility:"hidden",zIndex:0});}
});
Event.observe(document,"dom:loaded",function(){									 	
	sse.initSlideShow("prev_btn","next_btn","image_info","main_img_div","auto_btn");
	var gmd=document.getElementById("gmap_div");if(gmd)ms.setContainerDiv("gmap_div");
	new TextColorFx(document.getElementsByTagName("H2")[0],"#00F","#069","#060","#024",4,4);
	new WelcomeSurprise();
	new PDFHyperLink();
	new InquireButtonsFx();
	new VillaPopupSubMenu();
});
