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

function removaAll(){
	var selectbox = document.getElementById('subtype');
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		selectbox.remove(i);
	}
}
var resdentail = new Array("Apartment","Plot","Bunglow","Duplex");
var commercial = new Array("Land Apartment","Showroom","Hotel","Warehouse/ Godown","Office","Complex");

function addResidentailOption_list(){
	removaAll();
	addOption(document.getElementById('subtype'),'Any', 'Any');
	for (var i=0; i < resdentail.length;++i){
			addOption(document.getElementById('subtype'),resdentail[i], resdentail[i]);
	}
}

function addCommercialOption_list(){
	removaAll();
	addOption(document.getElementById('subtype'),'Any', 'Any');
	for (var i=0; i <commercial.length;++i){
			addOption(document.getElementById('subtype'),commercial[i], commercial[i]);
	}
}

function addAllOption_list(){
	removaAll();
	addOption(document.getElementById('subtype'),'Any', 'Any');
	for (var i=0; i < resdentail.length;++i){
		addOption(document.getElementById('subtype'),resdentail[i], resdentail[i]);
	}
	for (var i=0; i <commercial.length;++i){
		addOption(document.getElementById('subtype'),commercial[i], commercial[i]);
	}
}


