function canManipulateImages() {
	if (document.images) return true;
	else return false;
}

function loadmainImage(imageURL) {
	if (gImageCapableBrowser) {
		document.mainimage.src = imageURL;
		return false;
	} else return true;
}

gImageCapableBrowser = canManipulateImages();

OptLot=new Array();
OptLot[0]=new Array("Select Preference");
OptLot['For Sale']=new Array("0","50000","100000","150000","200000","250000","300000","350000","400000","450000","500000","600000","750000","1000000","1000000+");
OptLot['For Rent']=new Array("0","150","300","400","500","600","700","800","900","1000","1200","1400","1600","1800","2000","2000+");

function maxpriceList(x) {
	document.forms['search'].maxprice.length=0;
	if(x=="empty") return;
	for(i=0;i<OptLot[x].length;i++) {
		document.forms['search'].maxprice.length++;
		switch(x) {
		case 'For Sale':
			if (i == 0) document.forms['search'].maxprice.options[i].text='No Max';
			else document.forms['search'].maxprice.options[i].text='£'+OptLot[x][i];
		break
		case 'For Rent':
			if (i == 0) document.forms['search'].maxprice.options[i].text='No Max';
			else document.forms['search'].maxprice.options[i].text='£'+OptLot[x][i]+'/month';
		break
		default:
			document.forms['search'].maxprice.options[i].text=OptLot[x][i];
		}
		document.forms['search'].maxprice.options[i].value=OptLot[x][i];
	}
}

function showHideEle() { 
	var elm = document.getElementById('sellingdiv');
	var elm2 =  document.getElementById('valuationdiv');
	if (document.users.selling.checked) {
		elm.style.display = "block";
		elm2.style.display = "block";
	} else {
		elm.style.display = "none";
		elm2.style.display = "none";
	}
}
