function select_price_type()
{

	if(document.getElementById('search_term').value==' ')
		{
		removeAllOptions(document.getElementById('price_term'));
		addOption(document.getElementById('price_term'),'', 'Select Term First');
		}
		
	if(document.getElementById('search_term').value=='1')
		{
		document.getElementById('price_term').name='Monthly_Rent-min';
		removeAllOptions(document.getElementById('price_term'));
		addOption(document.getElementById('price_term'),'', 'From');
		addOption(document.getElementById('price_term'),'500', '$500');
		addOption(document.getElementById('price_term'),'1000', '$1000');
		addOption(document.getElementById('price_term'),'1500', '$1500');
		addOption(document.getElementById('price_term'),'2000', '$2000');
		addOption(document.getElementById('price_term'),'2500', '$2500');
		addOption(document.getElementById('price_term'),'3000', '$3000');
		addOption(document.getElementById('price_term'),'3500', '$3500');
		addOption(document.getElementById('price_term'),'4000', '$4000');
		document.getElementById('price_term_2').name='Monthly_Rent-max';
		removeAllOptions(document.getElementById('price_term_2'));
		addOption(document.getElementById('price_term_2'),'', 'To');
		addOption(document.getElementById('price_term_2'),'500', '$500');
		addOption(document.getElementById('price_term_2'),'1000', '$1000');
		addOption(document.getElementById('price_term_2'),'1500', '$1500');
		addOption(document.getElementById('price_term_2'),'2000', '$2000');
		addOption(document.getElementById('price_term_2'),'2500', '$2500');
		addOption(document.getElementById('price_term_2'),'3000', '$3000');
		addOption(document.getElementById('price_term_2'),'3500', '$3500');
		addOption(document.getElementById('price_term_2'),'4000', '$4000');
		
		}
	if(document.getElementById('search_term').value=='6')
		{
		document.getElementById('price_term').name='Rent_Weekly-min';
		removeAllOptions(document.getElementById('price_term'));
		addOption(document.getElementById('price_term'),'', 'From');
		addOption(document.getElementById('price_term'),'500', '$500');
		addOption(document.getElementById('price_term'),'1000', '$1000');
		addOption(document.getElementById('price_term'),'1500', '$1500');
		addOption(document.getElementById('price_term'),'2000', '$2000');
		addOption(document.getElementById('price_term'),'2500', '$2500');
		addOption(document.getElementById('price_term'),'3000', '$3000');
		addOption(document.getElementById('price_term'),'3500', '$3500');
		addOption(document.getElementById('price_term'),'4000', '$4000');
		document.getElementById('price_term_2').name='Monthly_Rent-max';
		removeAllOptions(document.getElementById('price_term_2'));
		addOption(document.getElementById('price_term_2'),'', 'To');
		addOption(document.getElementById('price_term_2'),'500', '$500');
		addOption(document.getElementById('price_term_2'),'1000', '$1000');
		addOption(document.getElementById('price_term_2'),'1500', '$1500');
		addOption(document.getElementById('price_term_2'),'2000', '$2000');
		addOption(document.getElementById('price_term_2'),'2500', '$2500');
		addOption(document.getElementById('price_term_2'),'3000', '$3000');
		addOption(document.getElementById('price_term_2'),'3500', '$3500');
		addOption(document.getElementById('price_term_2'),'4000', '$4000');
		
		}
	if(document.getElementById('search_term').value=='7')
		{
		document.getElementById('price_term').name='Rent_Weekly-min';
		removeAllOptions(document.getElementById('price_term'));
		addOption(document.getElementById('price_term'),'', 'From');
		addOption(document.getElementById('price_term'),'500', '$500');
		addOption(document.getElementById('price_term'),'1000', '$1000');
		addOption(document.getElementById('price_term'),'1500', '$1500');
		addOption(document.getElementById('price_term'),'2000', '$2000');
		addOption(document.getElementById('price_term'),'2500', '$2500');
		addOption(document.getElementById('price_term'),'3000', '$3000');
		addOption(document.getElementById('price_term'),'3500', '$3500');
		addOption(document.getElementById('price_term'),'4000', '$4000');
		document.getElementById('price_term_2').name='Monthly_Rent-max';
		removeAllOptions(document.getElementById('price_term_2'));
		addOption(document.getElementById('price_term_2'),'', 'To');
		addOption(document.getElementById('price_term_2'),'500', '$500');
		addOption(document.getElementById('price_term_2'),'1000', '$1000');
		addOption(document.getElementById('price_term_2'),'1500', '$1500');
		addOption(document.getElementById('price_term_2'),'2000', '$2000');
		addOption(document.getElementById('price_term_2'),'2500', '$2500');
		addOption(document.getElementById('price_term_2'),'3000', '$3000');
		addOption(document.getElementById('price_term_2'),'3500', '$3500');
		addOption(document.getElementById('price_term_2'),'4000', '$4000');
		}
}
		







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;
		  
		  
		  
		  try {  
		    selectbox.options.add(optn);
                  } 
		  
		  
				  
		  catch(e) {
		    selectbox.options.add(optn,selectbox.options.length);
                  }
		}
		