

function SetType_cust()
{
removeAllOptions(document.frmcustomerbody.DdnCustType);
removeAllOptions(document.frmcustomerbody.DdnCustStructurePref);


if(document.frmcustomerbody.DdnCustHome_office.value == 'Residential'){
//set Rooms/space for the Title
//document.frmcustomerbody.getElementById("Room_space").innerHTML ="&nbsp;<b> No. of Rooms</b>";
//building Type
addOption(document.frmcustomerbody.DdnCustType,"1", "Any Type");
addOption(document.frmcustomerbody.DdnCustType,"2", "Bunglow");
addOption(document.frmcustomerbody.DdnCustType,"3", "Apartment");
addOption(document.frmcustomerbody.DdnCustType,"4", "Independent Floors");
addOption(document.frmcustomerbody.DdnCustType,"5", "Villas");
addOption(document.frmcustomerbody.DdnCustType,"6", "Farm House");
addOption(document.frmcustomerbody.DdnCustType,"7", "Service Apartment");
addOption(document.frmcustomerbody.DdnCustType,"8", "Guest House");
addOption(document.frmcustomerbody.DdnCustType,"9", "Duplex");
addOption(document.frmcustomerbody.DdnCustType,"10", "Simplex");
addOption(document.frmcustomerbody.DdnCustType,"11", "Other");

//space or number of rooms
addOption(document.frmcustomerbody.DdnCustStructurePref,"1", "Any Structure");
addOption(document.frmcustomerbody.DdnCustStructurePref,"2", "1 Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"15", "1 Bed Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"3", "2 Bed Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"4", "3 Bed Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"5", "4 Bed Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"6", "5 Bed Room Set");
addOption(document.frmcustomerbody.DdnCustStructurePref,"7", "> 5  Bed Room Set");


}
	
if(document.frmcustomerbody.DdnCustHome_office.value == 'Commercial'){

//document.frmcustomerbody.getElementById("Room_space").innerHTML ="&nbsp;<b>Space</b>";
//building type
addOption(document.frmcustomerbody.DdnCustType,"12", "Any Type");
addOption(document.frmcustomerbody.DdnCustType,"13", "Shops");
addOption(document.frmcustomerbody.DdnCustType,"14", "Office");
addOption(document.frmcustomerbody.DdnCustType,"15", "Guest House");
addOption(document.frmcustomerbody.DdnCustType,"16", "Business Center/ Mall");
addOption(document.frmcustomerbody.DdnCustType,"17", "Other");

//space or number of rooms
addOption(document.frmcustomerbody.DdnCustStructurePref,"8", "Any Structure");
addOption(document.frmcustomerbody.DdnCustStructurePref,"10", "100 sqft - 200 sqft");
addOption(document.frmcustomerbody.DdnCustStructurePref,"11", "200sqft - 500sqft");
addOption(document.frmcustomerbody.DdnCustStructurePref,"12", "500sqft - 1000sqft");
addOption(document.frmcustomerbody.DdnCustStructurePref,"13", "1000sqft - 2000sqft");
addOption(document.frmcustomerbody.DdnCustStructurePref,"14", ">2000 sqft");

}
}


////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
