
strUrl = "http://www.parkheath.com/"

	function resetsearchform(){
	document.property_search_form.Property_Type[0].selected = true
	
	document.property_search_form.Price_Range_From[0].selected = true
	document.property_search_form.Price_Range_To[0].selected = true
	document.property_search_form.Beds[0].selected = true
	document.property_search_form.Location[0].selected = true
	document.getElementById("price_range").innerHTML =buyorlet[0];
	}
	
	
	function MM_preloadImages() { //v3.0
  	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}


    function createMarker(point, address) {
        // Create a lettered icon for this point using our icon class    	
		var myIcon = new GIcon(G_DEFAULT_ICON);
		myIcon.image=strUrl+"/images/map-icon-large-house.png";
		myIcon.iconSize = new GSize(34, 36)
		myIcon.shadow= strUrl+"/images/map-icon-shadow.png";
		myIcon.shadowSize = new GSize(37, 62)
		myIcon.iconAnchor = new GPoint(0, 36)
		  
		markerOptions = { icon:myIcon };
		var marker = new GMarker(point, markerOptions);

		GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(address);
		});
		return marker;
	}



	 function loadmap() {
	 change('map_table','rel');
	 
	 //document.getElementById('map_canvas').innerHTML = 'loading';

	 
	 	if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map_canvas"));
			map.setCenter(new GLatLng(0,0),0);
			
			map.addControl(new GMapTypeControl());
			map.addControl(new GSmallMapControl());

	
			var bounds = new GLatLngBounds();
			for(i = 0; i < lat.length; i++){
				var point = new GLatLng(lat[i], lon[i])	
				createMarker(point)
				map.addOverlay(createMarker(point, address[i]));	
				bounds.extend(point);
				}
			map.setZoom(map.getBoundsZoomLevel(bounds));
			map.setCenter(bounds.getCenter());
			}
    	}

	

	
	function parkheathoffice(address){
	var map = null;
   	 var geocoder = null;
	 
	 	if (GBrowserIsCompatible()){

        
		geocoder = new GClientGeocoder();
			if (geocoder){
				geocoder.getLatLng(address,
				function(point){
							if (point){
								
								map = new GMap2(document.getElementById("map"));
								
								map.addControl(new GMapTypeControl());
								map.addControl(new GSmallMapControl());
			
								var center = new GLatLng(point);
								map.setCenter(point, 15);
								var myIcon = new GIcon(G_DEFAULT_ICON);
								myIcon.image=strUrl+"/images/map-icon.png";
								myIcon.iconSize = new GSize(37, 62)
								myIcon.shadow= strUrl+"/images/map-icon-shadow.png";
								myIcon.shadowSize = new GSize(37, 62)
								myIcon.iconAnchor = new GPoint(0, 62)
								var markerOptions = { icon:myIcon};
								var marker = new GMarker(point, markerOptions);
								map.addOverlay(marker);
								
								//m = "click to visit us on google maps"
								
								//GEvent.addListener(marker, "mouseover", function(){
								//marker.openInfoWindowHtml(m);
								//});
								
								//clicking the marker do something
								//GEvent.addListener(marker, "click", function(){
								//MM_goToURL('parent','http://maps.google.co.uk');return document.MM_returnValue
								//marker.openInfoWindowHtml(m);
							//	});
								
								
								
								}
								});
			}
		}
    }
	
	function check_streetView(lat,lon){
		if (GBrowserIsCompatible()){
			var streetDiv = document.getElementById('street_view');
			var svClient = new GStreetviewClient();
			var center = new GLatLng(lat,lon);		
			svClient.getNearestPanoramaLatLng(center,function(latLong){
			if(latLong!=null)
			{
				if(streetDiv!=null)
				{
					streetDiv.style.visibility='visible';
					streetDiv.style.height='auto';
				}
			}
			else
			{
				if(streetDiv!=null)
				{
					streetDiv.innerHTML="<!-- -->";
					streetDiv.style.height='0px';
				}
			}
			});
		}
	}

	function prop_results_detail(lat,lon,streetView){
	var map = null;
   	 var geocoder = null;
	 
	 	if (GBrowserIsCompatible()){	
			map = new GMap2(document.getElementById("prop_mainimage")); 
			map.addControl(new GMapTypeControl());
			map.addControl(new GSmallMapControl());
			var center = new GLatLng(lat,lon);
			map.setCenter(center, 15);	
			var myIcon = new GIcon(G_DEFAULT_ICON);
			myIcon.image=strUrl+"/images/map-icon-large-house.png";
			myIcon.iconSize = new GSize(34, 36)
			myIcon.shadow= strUrl+"/images/map-icon-shadow.png";
			myIcon.shadowSize = new GSize(37, 62)
			myIcon.iconAnchor = new GPoint(0, 36)
			var markerOptions = { icon:myIcon};
			var marker = new GMarker(center, markerOptions);
			map.addOverlay(marker);	
			
			var pano_div = document.getElementById("pano")
			if (streetView=='1')
			{
				var actl = new GLatLng(jlat,jlon);
				pano_div.style.visibility='visible';
				pano_div.style.height='200px';
				var myPano = new GStreetviewPanorama(pano_div);
        			GEvent.addListener(myPano, "error", handleNoFlash);
				svOverlay = new GStreetviewOverlay();
        			map.addOverlay(svOverlay);
				myPano.setLocationAndPOV(actl);
				GEvent.addListener(map,"click", function(overlay,latlng){
				 myPano.setLocationAndPOV(latlng);});
			}
			else
			{
				pano_div.style.visibility='hidden';
				pano_div.style.height='0px';
			}

		}
    }

    function handleNoFlash(errorCode) {
      if (errorCode == FLASH_UNAVAILABLE) {
        alert("Error: Flash doesn't appear to be supported by your browser");
        return;
      }
    }  

    function LoadBigImage(thisImage, hspace, vspace)
    {
    document.getElementById("prop_mainimage").innerHTML = '<img src ="'+thisImage +'" hspace="'+hspace +'" vspace="'+vspace +'"  border="0">';
	
	}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function TheValuationsFormCheck() 
{

if (document.form.email.value=="")if( document.form.TelephoneDay.value=="")if( document.form.Surname.value=="")if( document.form.Address1.value=="")
{
alert("name, email, telephone and address are required");
document.form.Surname.focus();return false
}

if (document.form.email.value=="")if( document.form.TelephoneDay.value=="")if( document.form.Surname.value=="")
{
alert("name, email and telephone are required");
document.form.email.focus();return false
}

if (document.form.email.value=="")if( document.form.TelephoneDay.value=="")if( document.form.Address1.value=="")
{
alert("email, telephone and address are required");
document.form.email.focus();return false
}

if( document.form.TelephoneDay.value=="")if( document.form.Surname.value=="")if( document.form.Address1.value=="")
{
alert("name, telephone and address are required");
document.form.Surname.focus();return false
}

if (document.form.email.value=="")if( document.form.Surname.value=="")if( document.form.Address1.value=="")
{
alert("name, email and address are required");
document.form.Surname.focus();return false
}

if (document.form.Address1.value=="")if( document.form.TelephoneDay.value=="")
{
alert("telephone and address are required");
document.form.TelephoneDay.focus();return false
}

if (document.form.Address1.value=="")if( document.form.Surname.value=="")
{
alert("name and address are required");
document.form.Surname.focus();return false
}

if (document.form.Address1.value=="")if( document.form.email.value=="")
{
alert("email and address are required");
document.form.email.focus();return false
}

if (document.form.email.value=="")if( document.form.TelephoneDay.value=="")
{
alert("email and telephone are required");
document.form.email.focus();return false
}

if( document.form.TelephoneDay.value=="")if( document.form.Surname.value=="")
{
alert("name and telephone are required");
document.form.Surname.focus();return false
}

if (document.form.email.value=="")if( document.form.Surname.value=="")
{
alert("name and email are required");
document.form.Surname.focus();return false
}

if (document.form.email.value=="") 
{
alert("email is required");
document.form.email.focus();return false
}
if (document.form.TelephoneDay.value=="") 
{
alert("telephone is required");
document.form.TelephoneDay.focus();return false
}

if (document.form.Surname.value=="") 
{
alert("name is required");
document.form.Surname.focus();return false
}

if (document.form.Address1.value=="") 
{
alert("address is required");
document.form.Address1.focus();return false
}

if (document.form.email.value!="") 
{if (document.form.email.value.indexOf("@")==-1 || document.form.email.value.indexOf(".")==-1 || document.form.email.value.indexOf(" ")!=-1 || document.form.email.value.length<6) 
{alert("Sorry, your email address is not valid.");
document.form.email.focus();return false}}

}



function TheValuationsFormCheck2() 
{

if (document.form2.email.value=="")if( document.form2.TelephoneDay.value=="")if( document.form2.Surname.value=="")if( document.form2.Address1.value=="")
{
alert("name, email, telephone and address are required");
document.form2.Surname.focus();return false
}

if (document.form2.email.value=="")if( document.form2.TelephoneDay.value=="")if( document.form2.Surname.value=="")
{
alert("name, email and telephone are required");
document.form2.email.focus();return false
}

if (document.form2.email.value=="")if( document.form2.TelephoneDay.value=="")if( document.form2.Address1.value=="")
{
alert("email, telephone and address are required");
document.form2.email.focus();return false
}

if( document.form2.TelephoneDay.value=="")if( document.form2.Surname.value=="")if( document.form2.Address1.value=="")
{
alert("name, telephone and address are required");
document.form2.Surname.focus();return false
}

if (document.form2.email.value=="")if( document.form2.Surname.value=="")if( document.form2.Address1.value=="")
{
alert("name, email and address are required");
document.form2.Surname.focus();return false
}

if (document.form2.Address1.value=="")if( document.form2.TelephoneDay.value=="")
{
alert("telephone and address are required");
document.form2.TelephoneDay.focus();return false
}

if (document.form2.Address1.value=="")if( document.form2.Surname.value=="")
{
alert("name and address are required");
document.form2.Surname.focus();return false
}

if (document.form2.Address1.value=="")if( document.form2.email.value=="")
{
alert("email and address are required");
document.form2.email.focus();return false
}

if (document.form2.email.value=="")if( document.form2.TelephoneDay.value=="")
{
alert("email and telephone are required");
document.form2.email.focus();return false
}

if( document.form2.TelephoneDay.value=="")if( document.form2.Surname.value=="")
{
alert("name and telephone are required");
document.form2.Surname.focus();return false
}

if (document.form2.email.value=="")if( document.form2.Surname.value=="")
{
alert("name and email are required");
document.form2.Surname.focus();return false
}

if (document.form2.email.value=="") 
{
alert("email is required");
document.form2.email.focus();return false
}
if (document.form2.TelephoneDay.value=="") 
{
alert("telephone is required");
document.form2.TelephoneDay.focus();return false
}

if (document.form2.Surname.value=="") 
{
alert("name is required");
document.form2.Surname.focus();return false
}

if (document.form2.Address1.value=="") 
{
alert("address is required");
document.form2.Address1.focus();return false
}

if (document.form2.email.value!="") 
{if (document.form2.email.value.indexOf("@")==-1 || document.form2.email.value.indexOf(".")==-1 || document.form2.email.value.indexOf(" ")!=-1 || document.form2.email.value.length<6) 
{alert("Sorry, your email address is not valid.");
document.form2.email.focus();return false}}

}

function change(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}

var buying=new Array()
buying[1]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\'); change(\'buying\',\'rel\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[2]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnav">Buying</a>'

buying[2]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnavon">Buying</a>'

function changebuying(whichcontent){
document.getElementById("buyinglinks").innerHTML =''+whichcontent+'';
}

var selling=new Array()
selling[1]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'rel\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[2]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnav">Selling</a>'

selling[2]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnavon">Selling</a>'

function changeselling(whichcontent){
document.getElementById("sellinglinks").innerHTML =''+whichcontent+'';
}

var renting=new Array()
renting[1]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'rel\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[2]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnav">Tenants</a>'

renting[2]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnavon">Tenants</a>'

function changerenting(whichcontent){
document.getElementById("rentinglinks").innerHTML =''+whichcontent+'';
}

var letting=new Array()
letting[1]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'rel\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[2]); changeotherservices(otherservices[1])" class="mainnav">Landlords</a>'

letting[2]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnavon">Landlords</a>'

function changeletting(whichcontent){
document.getElementById("lettinglinks").innerHTML =''+whichcontent+'';
}

var otherservices=new Array()
otherservices[1]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'rel\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[2])" class="mainnav">Other Services</a>'

otherservices[2]='<a href="#" onClick="change(\'home\',\'mainnav\');change(\'aboutparkheath\',\'mainnav\');change(\'contactus\',\'mainnav\');change(\'buying\',\'absolute\'); change(\'selling\', \'absolute\'); change(\'renting\', \'absolute\'); change(\'letting\', \'absolute\'); change(\'otherservices\', \'absolute\');changebuying(buying[1]); changeselling(selling[1]); changerenting(renting[1]); changeletting(letting[1]); changeotherservices(otherservices[1])" class="mainnavon">Other Services</a>'

function changeotherservices(whichcontent){
document.getElementById("otherserviceslinks").innerHTML =''+whichcontent+'';
}


<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
if (document.areaguides.jumpMenu.value=='../Templates/0') {}

else
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
 if (restore) selObj.selectedIndex=0;
}
//-->


function validate(TheseFields) {var e = form.elements, m = '';

//regular for field required
if(!e['Name'].value) {m += '- Name is required.\n';
change(""+['Name']+"", "formfielderror");}

if(!e['Telephone'].value) {m += '- Telephone is required.\n';
change(""+['Telephone']+"", "formfielderror");}

// Email validation
if(!/.+@[^.]+(\.[^.]+)+/.test(e['SpamEmail'].value)) {m += '- E-mail requires a valid e-mail address.\n';
change(""+['SpamEmail']+"", "formfielderror");}

//validation for password + confirm password match
if(!e['RegisterPassWord'].value) {m += '- Password is required.\n';
change(""+['RegisterPassWord']+"", "formfielderror");}
if(e['RegisterPassWord'].value != e['ConfirmPassword'].value) {m += '- Your passwords do not match.\n';
change(""+['RegisterPassWord']+"", "formfielderror");change(""+['ConfirmPassword']+"", "formfielderror");}

// write out the errors
if(m) {
alert('The following error(s) occurred:\n\n' + m);
return false;
}
return true;
}

function validateNameEmailTelephone(TheseFields) {var e = form.elements, m = '';

//regular for field required
if(!e['Name'].value) {m += '- Name is required.\n';
change(""+['Name']+"", "formfielderror");}

if(!e['Telephone'].value) {m += '- Telephone is required.\n';
change(""+['Telephone']+"", "formfielderror");}

// Email validation
if(!/.+@[^.]+(\.[^.]+)+/.test(e['SpamEmail'].value)) {m += '- E-mail requires a valid e-mail address.\n';
change(""+['SpamEmail']+"", "formfielderror");}


// write out the errors
if(m) {
alert('The following error(s) occurred:\n\n' + m);
return false;
}
return true;
}











function parkheath(){
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 

}








