function checkInputIn(which_form, which_input, should_be)
{
var a = eval("document.forms."+which_form+"."+which_input+".value");
if (a == should_be)
	{
	eval("document.forms."+which_form+"."+which_input+".value = '';");
	}
}

function checkInputOut(which_form, which_input, should_be)
{
var a = eval("document.forms."+which_form+"."+which_input+".value");
if (a == "")
	{
	eval("document.forms."+which_form+"."+which_input+".value = '"+should_be+"';");
	}
}


function changeStrap ()
{
var nextStrapNum = currentStrapNum+1;
if (nextStrapNum == 4)
	{
	nextStrapNum = 1;
	}

var currentStrap = "strap"+currentStrapNum;
var nextStrap = "strap"+nextStrapNum;

var currentImg = "strapImg"+currentStrapNum;
var nextImg = "strapImg"+nextStrapNum;

var currentStrapDiv = document.getElementById(currentStrap);
var nextStrapDiv = document.getElementById(nextStrap);

var currentImgDiv = document.getElementById(currentImg);
var nextImgDiv = document.getElementById(nextImg);

currentStrapDiv.style.display = "none";
nextStrapDiv.style.display = "block";

currentImgDiv.src = "/_images/buttons/bt_circle_small.gif";
nextImgDiv.src = "/_images/buttons/bt_circle_large.gif";

currentStrapNum = nextStrapNum;
}


function changeStrapL(which_strap)
{
clearInterval (ChangeStrapIntervalId);

var a = which_strap;

var StrapDiv = "strap"+a;
var ImgDiv = "strapImg"+a;

var StrapDivID = document.getElementById(StrapDiv);
var ImgDivID = document.getElementById(ImgDiv);


var StrapDivIDOne = document.getElementById("strap1");
var StrapDivIDTwo = document.getElementById("strap2");
var StrapDivIDThree = document.getElementById("strap3");

var ImgDivIDOne = document.getElementById("strapImg1");
var ImgDivIDTwo = document.getElementById("strapImg2");
var ImgDivIDThree = document.getElementById("strapImg3");

StrapDivIDOne.style.display = "none";
StrapDivIDTwo.style.display = "none";
StrapDivIDThree.style.display = "none";

ImgDivIDOne.src = "/_images/buttons/bt_circle_small.gif";
ImgDivIDTwo.src = "/_images/buttons/bt_circle_small.gif";
ImgDivIDThree.src = "/_images/buttons/bt_circle_small.gif";

StrapDivID.style.display = "block";
ImgDivID.src = "/_images/buttons/bt_circle_large.gif";
}


function searchSubmit() {
var sale_rent = document.forms.searchForm.sale_rent.options[document.forms.searchForm.sale_rent.selectedIndex].value;
var property_area = document.forms.searchForm.branch.options[document.forms.searchForm.branch.selectedIndex].value;
document.forms.searchForm.action = "/properties-"+sale_rent+"/"+property_area+"-Kent";
document.forms.searchForm.submit();
}


function changePriceBrackets() {
var sale_or_rent = document.forms.searchForm.sale_rent.options[document.forms.searchForm.sale_rent.selectedIndex].value;

var a = document.getElementById("sale_min_price");
var b = document.getElementById("rental_min_price");

var c = document.getElementById("sale_max_price");
var d = document.getElementById("rental_max_price");

if (sale_or_rent == "to-rent")
	{
	document.forms.searchForm.min_value.selectedIndex = 0;
	document.forms.searchForm.max_value.selectedIndex = 0;
	a.className = "search_form_element_hidden";
	b.className = "search_form_element";
	c.className = "search_form_element_hidden";
	d.className = "search_form_element";
	}
else
	{
	document.forms.searchForm.min_value_rental.selectedIndex = 0;
	document.forms.searchForm.max_value_rental.selectedIndex = 0;
	a.className = "search_form_element";
	b.className = "search_form_element_hidden";
	c.className = "search_form_element";
	d.className = "search_form_element_hidden";
	}
}
