// Google Maps API
    //<![CDATA[
	function createMarker(point,html) {
		var marker = new GMarker(point);
		GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(html);
		});
		return marker;
		}

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
		map.setMapType(G_NORMAL_MAP);
        map.setCenter(new GLatLng(39.965017,4.063568), 9);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		
		var point = new GLatLng(39.98738,4.023077);
		var marker = createMarker(point,'Premises in Ferreries')
		map.addOverlay(marker);
		
		var point = new GLatLng(39.969704,4.094435);
		var marker = createMarker(point,'Premises in Mercadal')
		map.addOverlay(marker);
      }
    }
    //]]>
	
// Add bookmark function, credit to the Javascript Source http://javascript.internet.com
function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function validateFriendForm(friendForm){
	
	reEmpty = /^(\s|\S){3,200}$/
	reEmail = /^(\w|\+)+@\w{2,}\.\w{2,}(\.\w{2,})*$/
	reIllegal = /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	
	if (!reEmpty.test(friendForm.yourname.value)){
		alert("Please enter your full name");
		friendForm.yourname.focus();
		return false;
	}
	
	if (!reEmail.test(friendForm.youremail.value)){
		alert("Please check you have entered your correct email address and try again.  E.g. xxx@xxxx.xxx");
		friendForm.youremail.focus();
		return false;
	}
	
	if (reIllegal.test(friendForm.youremail.value)){
		alert("You have entered an invalid character as part of your email.  Please check this and try again.");
		friendForm.youremail.focus();
		return false;
	}

	if (!reEmpty.test(friendForm.friendname.value)){
		alert("Please enter your friend's full name");
		friendForm.friendname.focus();
		return false;
	}
	
	if (!reEmail.test(friendForm.friendemail.value)){
		alert("Please check you have entered your friend's correct email address and try again.  E.g. xxx@xxxx.xxx");
		friendForm.friendemail.focus();
		return false;
	}
	
	if (reIllegal.test(friendForm.friendemail.value)){
		alert("You have entered an invalid character as part of your friend's email.  Please check this and try again.");
		friendForm.friendemail.focus();
		return false;
	}	
}

function validateContactForm(contactForm){
	
	reEmpty = /^(\s|\S){3,200}$/
	reEmail = /^(\w|\+)+@\w{2,}\.\w{2,}(\.\w{2,})*$/
	reIllegal = /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	rePhone = /^\+?(\d|\s){9,18}$/
	
	if (!reEmpty.test(contactForm.name.value)){
		alert("Please enter your full name");
		contactForm.name.focus();
		return false;
	}
	
	if (!reEmail.test(contactForm.email.value)){
		alert("Please check you have entered your correct email address and try again.  E.g. xxx@xxxx.xxx");
		contactForm.email.focus();
		return false;
	}
	
	if (!rePhone.test(contactForm.telephone.value)){
		alert("Please enter your full phone number including area code and country code if not a Spanish number.  E.g. 971 111 111 or +44 7000 111 111");
		contactForm.telephone.focus();
		return false;
	}	
	
	if (reIllegal.test(contactForm.email.value)){
		alert("You have entered an invalid character as part of your email.  Please check this and try again.");
		contactForm.email.focus();
		return false;
	}


}