function SelectPriceCrit(){
// This function will fire when the status dropdown changes

removeAllOptions(document.searchbar.PriceCrit);
addOption(document.searchbar.PriceCrit, "price", "");
addOption(document.searchbar.PriceCrit, "              ", "");

if(document.searchbar.status.value == 'student'){
addOption(document.searchbar.PriceCrit,"£35-£40pw", "35-40");
addOption(document.searchbar.PriceCrit,"£40-£45pw", "40-45");
addOption(document.searchbar.PriceCrit,"£45-£50pw", "45-50");
addOption(document.searchbar.PriceCrit,"£50-£55pw", "50-55");
addOption(document.searchbar.PriceCrit,"£55pw +", "55");
}
if(document.searchbar.status.value == 'professional'){
addOption(document.searchbar.PriceCrit,"£200-£250pcm", "200-250");
addOption(document.searchbar.PriceCrit,"£250-£350pcm", "250-350");
addOption(document.searchbar.PriceCrit,"£350-£450pcm", "350-450");
addOption(document.searchbar.PriceCrit,"£450-£550pcm", "450-550");
addOption(document.searchbar.PriceCrit,"£550-£650pcm", "550-650");
addOption(document.searchbar.PriceCrit,"£650pcm +", "650");
}
if(document.searchbar.status.value == ''){
addOption(document.searchbar.PriceCrit,"Select status", "");
}
}

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

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

	selectbox.options.add(optn);
}