<!--
function changeimage(percorso,targetimg) {
	if (document.images){
		document.images[targetimg].src=percorso
	}
}

function TargetBlank() {
  var i = 0;
  var collegamenti = document.links;
  var tot_links = collegamenti.length;
  for (i=0; i<tot_links; i++)
  {
    if (collegamenti[i].className=="blank_banner_box")
    {
	  collegamenti[i].target = "_blank";
	}
  }
}

//////////////////////////// disable right click //////////////////////////////
function clickIE4() {
	if(event.button==2)
		return false;
}

function clickNS4(e){
	if(document.layers||document.getElementById&&!document.all) {
		if(e.which==2||e.which==3)
			return false;
	}
}

function disableRightClick() {
	if(document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById) {
		document.onmousedown=clickIE4;
	}
	document.oncontextmenu=function() {
		return false;
	}
}
///////////////////////////////////////////////////////////////////////////////

function initBookingFormElementsChangeEvent() {
	if($('submit_send'))
		$('submit_send').writeAttribute("disabled",false);
	if($('camera')) {
		$('camera').observe('change',function(event) {
			processBookingOptions();
		});
	}
	if($('availability_verify')) {
		$('availability_verify').observe('click',function() {
			processBookingRequest();
		});
	}
	var bookingForm=$('booking');
	bookingForm.observe('submit',function(event) {
		event.stop();
		var theForm=this;
		var parameters=$('booking').serialize();
		var theRequest = new Ajax.Request('booking_process_reqfields.php', {
			method: 'post',
			parameters: parameters,
			asynchronous: false,
			evalJS: 'force',
			onComplete: function(response) {
				if(response.responseText.substring(0,10)!="mustStop=1")
					theForm.submit();		
			}
		});			
	});
}

function ReqFieldsVerifyComplete(event) {
	alert(mustStopEvent);
	event.stop();
}

function processBookingOptions() {
	var parameters=$('booking').serialize();
	var theRequest = new Ajax.Updater('booking_main','booking_process_options.php', {method: 'post', parameters: parameters, asynchronous: false});
	new Effect.Highlight($('adulti_label'), {startcolor: "#00DD00",endcolor: "#FFFFFF",restorecolor: "#FFFFFF",duration:1});
}

function processBookingRequest() {
	$('booking_process_response').update($F($('booking_process_response_wait_msg')));	
	var counter=0;		 
	new PeriodicalExecuter(function(pe) {						
		counter++;
		var parameters=$('booking').serialize();
		var theRequest = new Ajax.Request('booking_process.php', {method: 'post', parameters: parameters, asynchronous: false, evalJS: 'force'});
		if(counter==1) pe.stop();
	}, 1);
}

Event.observe(window,'load',function() {
	disableRightClick();
	TargetBlank();
	initBookingFormElementsChangeEvent();
});

//-->
