var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=10;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
	function check_form_rates()

				{

				if ((document.form_rates.from_mday.selectedIndex == 0) || (document.form_rates.from_mon.selectedIndex == 0))

					{

					alert('Please specify your check-in date.');

					document.form_rates.from_mday.focus();

					return false;

					}

	var r_name = document.form_rates.r_name.value;

			if ((!r_name) || (r_name.match(/^\\\s+\$/)))

				{

				alert('Please enter your name.');

				document.form_rates.r_name.focus();

				return false;

				}

	var r_address = document.form_rates.r_address.value;

			if ((!r_address) || (r_address.match(/^\\\s+\$/)))

				{

				alert('Please enter your address.');

				document.form_rates.r_address.focus();

				return false;

				}

	var re_email = document.form_rates.re_email.value;

			if ((!re_email) || (re_email.match(/^\\\s+\$/)))

				{

				alert('Please enter a valid email address.');

				document.form_rates.re_email.focus();

				return false;

				}

				}




function check_contact_form()

				{

				if (!document.form_contact.name.value)

					{

					alert('Please enter your Name.');

					document.form_contact.name.focus();

					return false;

					}		

				if (!document.form_contact.phone.value)

					{

					alert('Please enter your telephone Number.');

					document.form_contact.phone.focus();

					return false;

					}

				if (!document.form_contact.email.value)

					{

					alert('Please enter your email.');

					document.form_contact.email.focus();

					return false;

					}

	if (!document.form_contact.message.value)

					{

					alert('Please enter your message.');

					document.form_contact.message.focus();

					return false;

					}

				}
 //<![CDATA[

     function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(54.378454533613,-2.905361807607), 16);

        // Our info window content
        var infoTabs = [
          new GInfoWindowTab("Old Codgers Cottage", "<table border=\"0\" cellspacing=\"3\" cellpadding=\"2\" bgcolor=\"#FFFFFF\" align=\"center\"><tr><td colspan=\"2\"><font id=\"ten\"><b>Old Codgers Cottage</a></b></font></td></tr><td><img src=\"/images/front.jpg\" width=\"80\" height=\"80\" border=\"1\"></td><td><font id=\"ten\">Beech Street<br>Windermere LA23 1ED<br>Tel: 01253 858885</font></td></tr></table>")
        ];

        // Place a marker in the center of the map and open the info window
        // automatically
        var marker = new GMarker(map.getCenter());
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowTabsHtml(infoTabs);
        });
        map.addOverlay(marker);
        marker.openInfoWindowTabsHtml(infoTabs);
      }
    }

    //]]>