	
	function showWeather() {
		window.open('weather.php', '', 'resizable,scrollbars,width=300,height=200')
	}
	
	function showMap() {
	    pathName = new String(window.location.pathname);
		if (pathName.indexOf("/property/") == -1) 
  		  window.open('map-of-hermanus.php', '', 'resizable,scrollbars,width=800,height=800');
		else  
		  window.open('../map-of-hermanus.php', '', 'resizable,scrollbars,width=800,height=800');
	}
	
	function showDirections() {
		window.open('map.html', '', 'resizable,scrollbars,width=780,height=550');					
	}
	
	function maintainArea(formAction, areaId) {
		window.open('area-mtn.php?doform='+formAction+'&id='+areaId, '', 'resizable,scrollbars,width=500,height=200');
	}
	
	function maintainPropertyType(formAction, propertyTypeId) {
		window.open('property-type-mtn.php?doform='+formAction+'&id='+propertyTypeId, '', 'resizable,scrollbars,width=500,height=200');
	}

	
	function maintainProperty(formAction, propertyId) {
		window.open('property-mtn.php?doform='+formAction+'&id='+propertyId, '', 'resizable,scrollbars,width=600,height=600');
	}
	
	  function refreshParent(parentPage) {
		if (!window.opener.closed) 
		{
			if (window.opener.name != "Header") {
				window.opener.location.href=parentPage;
				window.opener.focus();
			}	
	    }
	}	

	function showProperty(propertyId) {
	    pathName = new String(window.location.pathname);
		if (pathName.indexOf("/property/") == -1) 
		  window.open('property/property-'+propertyId+'.php', '', 'resizable=no,scrollbars,width=750,height=700');
		else
		  window.open('property-'+propertyId+'.php', '', 'resizable=no,scrollbars,width=750,height=700');
	}
	
	function testProperty(propertyId) {
		window.open('../property/property-'+propertyId+'.php', '', 'resizable=no,scrollbars,width=750,height=700');
	}		
	
	function logOut()
	{
		window.parent.location.href="logout.php";
	}
