<!--

  // © 2007 Bitpalast GmbH. Alle Rechte vorbehalten.

	var cnt = 1;

	function topWindow(mypage, myname, w, h, scroll) {
		var winl = 0; /*(screen.width - w) / 2; */
		var wint = 0; /*(screen.height - h) / 2;*/
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no';
		win = window.open(mypage, myname, winprops);
		if (parseInt(navigator.appVersion) >= 4) { 
			win.window.focus(); 
		}
	}

	function DetectImageSize(picName,picTitle) {
		picURL=picName.src;
		newWindow=window.open(picURL,'newWin','toolbar=no,width='+picName.width+',height='+picName.height);
		newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>');
		newWindow.resizeBy(picName.width-newWindow.document.body.clientWidth,picName.height-newWindow.document.body.clientHeight);
		newWindow.focus();
	} 

	function changeImages() {
		if (document.images ) {
			for (var i=0; i<changeImages.arguments.length; i+=2) {
				document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			}
		}
	}

	var cnt = 0;

	function printpage() {
		printlocation="http://www.bestpollensa.com/phprint.php?page="+window.location;
		window.open(printlocation,'','width=750,height=440,toolbar=1,menubar=1,scrollbars=1,status=0,resizable=0');
	}

	function bedroomselect() {
		window.document.searchform.lfield7_max.value='';
		if (window.document.searchform.bedrooms.options[window.document.searchform.bedrooms.selectedIndex].value==0) {
			window.document.searchform.lfield7_min.value='';
		} else {
			if (window.document.searchform.bedrooms.options[window.document.searchform.bedrooms.selectedIndex].value==1) {
				window.document.searchform.lfield7_min.value=1;
				window.document.searchform.lfield7_max.value=2;
			} else {
				if (window.document.searchform.bedrooms.options[window.document.searchform.bedrooms.selectedIndex].value==2) {
					window.document.searchform.lfield7_min.value=2;
					window.document.searchform.lfield7_max.value=4;
				} else {
					window.document.searchform.lfield7_min.value=5;
				}	
			}
		}
	}

	function priceselect() {
		window.document.searchform.lfield30_max.value='';
		if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==0) {
			window.document.searchform.lfield30_min.value='';
		} else {
			if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==1) {
				window.document.searchform.lfield30_min.value=0;
				window.document.searchform.lfield30_max.value=999;
			} else {
				if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==2) {
					window.document.searchform.lfield30_min.value=1000;
					window.document.searchform.lfield30_max.value=1499;
				} else {
					if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==3) {
						window.document.searchform.lfield30_min.value=1500;
						window.document.searchform.lfield30_max.value=1999;
					} else {
						if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==4) {
							window.document.searchform.lfield30_min.value=2000;
							window.document.searchform.lfield30_max.value=2499;
						} else {
							if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==5) {
								window.document.searchform.lfield30_min.value=2500;
								window.document.searchform.lfield30_max.value=2999;
							} else {
								if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==6) {
									window.document.searchform.lfield30_min.value=3000;
									window.document.searchform.lfield30_max.value=3499;
								} else {
									if (window.document.searchform.price.options[window.document.searchform.price.selectedIndex].value==7) {
										window.document.searchform.lfield30_min.value=3500;
										window.document.searchform.lfield30_max.value=3999;
									} else {
										window.document.searchform.lfield30_min.value=4000;
									}
								}
							}
						}
					}
				}
			}
		}
	}

  function invaliddeparturedate(documentform) {
	var arrivaldate=(documentform.arrival.value.substr(6,4)*365)+(documentform.arrival.value.substr(0,2)*12)+(documentform.arrival.value.substr(3,2));
	var departuredate=(documentform.departure.value.substr(6,4)*365)+(documentform.departure.value.substr(0,2)*12)+(documentform.departure.value.substr(3,2));
	return(departuredate<=arrivaldate);
  }

  function booking_validator_1(documentform) {
	if (documentform.arrival.value=='') {
		alert('Please select the arrival date.\nClick on "pick date" next to the input box.');
		return (false);
	} else if (documentform.departure.value=='') {
		alert('Please select a departure date.\nClick on "pick date" next to the input box.');
		return (false);
	} else if (invaliddeparturedate(documentform)) {
		alert('The departure date must be later than the arrivate date.\nPlease correct your selection.');
		return (false);
	} else {
		return (true);
	}
  }

//-->
