// option text
var secondBox = new Array(
          new Array("Any", "£100,000", "£125,000", "£150,000", "£175,000", "£200,000", "£250,000", "£300,000", "£350,000", "£400,000", "£450,000", "£500,000", "£550,000", "£600,000", "£700,000", "£1,000,000"), /* options for second combo when Option 1  selected in the first combo*/
          new Array("Any", "£50 p.c.m.", "£100 p.c.m.", "£150 p.c.m.", "£200 p.c.m.", "£250 p.c.m.", "£300 p.c.m.", "£350 p.c.m.", "£400 p.c.m.", "£450 p.c.m.", "£500 p.c.m.", "£700 p.c.m.", "£900 p.c.m.", "£1,000 p.c.m.", "£2,000 p.c.m.", "£2,500 p.c.m."
) /* options for second combo when Option 2  selected in the first combo*/);
// option values
var secondBox1 = new Array(
          new Array("0","100000", "125000", "150000", "175000", "200,000", "250,000", "300000", "350000", "400000", "450000", "500000", "550000", "600000", "700000", "1000000"), /* options for second combo when Option 1  selected in the first combo*/
          new Array("0", "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "700", "900", "1,000", "2,000", "2,500") /* options for second combo when Option 2  selected in the first combo*/);

// option text
var thirdBox = new Array(
          new Array("£100,000", "£125,000", "£150,000", "£175,000", "£200,000", "£250,000", "£300,000", "£350,000", "£400,000", "£450,000", "£500,000", "£550,000", "£600,000", "£700,000", "£1,000,000", "Any"), /* options for second combo when Option 1  selected in the first combo*/
          new Array("£50 p.c.m.", "£100 p.c.m.", "£150 p.c.m.", "£200 p.c.m.", "£250 p.c.m.", "£300 p.c.m.", "£350 p.c.m.", "£400 p.c.m.", "£450 p.c.m.", "£500 p.c.m.", "£700 p.c.m.", "£900 p.c.m.", "£1,000 p.c.m.", "£2,000 p.c.m.", "£2,500", "Any") /* options for second combo when Option 2  selected in the first combo*/);
// option values
var thirdBox1 = new Array(
          new Array("100000", "125000", "150000", "175000", "200,000", "250,000", "300000", "350000", "400000", "450000", "500000", "550000", "600000", "700000", "1000000", "6000000"), /* options for second combo when Option 1  selected in the first combo*/
          new Array("50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "700", "900", "1,000", "2,000", "2,500", "3,000") /* options for second combo when Option 2  selected in the first combo*/);

function changeForm()
{
     var index = document.myform.category.selectedIndex;
     values = secondBox[index];
	 thevalues = secondBox1[index];
     for (i = 0; i<values.length; i++)
     {
          document.myform.lop[i] = new Option (values[i], thevalues[i]);
     }
	 values2 = thirdBox[index];
	 thevalues2 = thirdBox1[index];
	 
     for (i = 0; i<values2.length; i++)
     {
          document.myform.hip[i] = new Option (values2[i], thevalues2[i]);
     }
	 document.myform.hip.selectedIndex=values2.length-1

	 if (document.myform.category.value=='Buy')
	 {document.myform.dbt.value='1'}
	 if (document.myform.category.value=='Let')
	 {document.myform.dbt.value='2'}
}

function refreshSelects(){
	document.getElementById("category").selectedIndex=1;
	document.getElementById("bed").selectedIndex=0;
	document.getElementById("lop").selectedIndex=0;
	document.getElementById("hip").selectedIndex=15;
	document.myform.dbt.value=2;
}