// JavaScript Document
function geosearch()
   {
   document.Form1.xstyle.value = "4";
   }

function nongeosearch()
   {
   document.Form1.xstyle.value = "1";
   }
   
function showAs(){
		if(document.Form1.xstyle.value == 4){
			document.getElementById('list').innerHTML = '<iframe id="I1" name="I1" src="inc_map.php" height="600" width="715" frameborder="0" scrolling="no" allowtransparency="true"><div align="center">Your browser does not support inline frames or is currently configured not to display inline frames. </div> </iframe>';
  			document.Form1.action = "http://www2.housescape.org.uk/cgi-bin/search.pl?lia1|lia2&style=1,imagesize=120&1";
   			document.Form1.target = 'I1';
		}else{
			document.Form1.action = "";
			document.Form1.target = "";
		}
	
}


function onChange(obj) {
	if(obj == null){
		return false;
	}else{
		var Current = obj.sales_rental.selectedIndex;
		var n = 1;
		obj.price_low.options.length = 0;
		obj.price_high.options.length = 0;
		if (obj.sales_rental.value == "S"){
			setsel(obj,"Not specified","","0");
			setsel(obj,"£80,000","80000",n);n=n+1;
			setsel(obj,"£90,000","90000",n);n=n+1;
			setsel(obj,"£100,000","100000",n);n=n+1;
			setsel(obj,"£125,000","125000",n);n=n+1;
			setsel(obj,"£150,000","150000",n);n=n+1;
			setsel(obj,"£175,000","175000",n);n=n+1;
			setsel(obj,"£200,000","200000",n);n=n+1;
			setsel(obj,"£300,000","300000",n);n=n+1;
			setsel(obj,"£400,000","400000",n);n=n+1;
			setsel(obj,"£500,000","500000",n);n=n+1;
			setsel(obj,"£600,000","600000",n);n=n+1;
			setsel(obj,"£700,000","700000",n);n=n+1;
			setsel(obj,"£800,000","800000",n);n=n+1;
			setsel(obj,"£900,000","900000",n);n=n+1;
		}else{
			setsel(obj,"Not specified","","0");
			setsel(obj,"£500 PCM","500",n);n=n+1;
			setsel(obj,"£600 PCM","600",n);n=n+1;
			setsel(obj,"£700 PCM","700",n);n=n+1;
			setsel(obj,"£800 PCM","800",n);n=n+1;
			setsel(obj,"£900 PCM","900",n);n=n+1;
			setsel(obj,"£1,000 PCM","1000",n);n=n+1;
			setsel(obj,"£1,500 PCM","1500",n);n=n+1;
			setsel(obj,"£2,000 PCM","2000",n);n=n+1;
			setsel(obj,"£2,500 PCM","2500",n);n=n+1;
		}    
	}
}

function setsel(obj,val1,val2,n)
   {
   obj.price_low.options[n] = new Option(val1,val2);
   obj.price_high.options[n] = new Option(val1,val2);
   }

function toggleSub(submenu) {
    if (document.getElementById(submenu).style.display == 'none') {
        document.getElementById(submenu).style.display = 'block'
    } else {
        document.getElementById(submenu).style.display = 'none'
    }
}

function resizeIframe(iframeID, pageID, padding) { 
	if(self==parent) return false; /* Checks that page is in iframe. */ 
	else if(document.getElementById&&document.all) /* Sniffs for IE5+.*/ 
	
	var FramePageHeight = document.getElementById(pageID).scrollHeight + padding; /* framePage */
	var FramePageWidth = document.getElementById(pageID).scrollWidth;
	
	parent.document.getElementById(iframeID).style.height=FramePageHeight;
	parent.document.getElementById(iframeID).style.width=FramePageWidth; 
	/* "iframeID" is the ID of the inline frame in the parent page. */ 
}

