

//START Search by change Dropdown 
function searchByChanged(){
	var homeVar = new homeClass;
	var searchByVar = document.getElementById('searchBy').value;
	if(searchByVar != 'All'){
		if(searchByVar == 'Genres'){
			var catResult = homeVar.getAllGenres()
		}else{
			if(searchByVar == 'Instruments'){
				var catResult = homeVar.getAllInstruments()
			}else{
				var catResult = homeVar.getAllCategories()
			}
		}
		document.getElementById("category").disabled=''
		document.getElementById("category").options.length =1;
		for(i=0;i<catResult.DATA.length;i++){
			 var option = new Option();
			 option.value = catResult.DATA[i][0]
			 option.text = catResult.DATA[i][1]
			 document.getElementById("category").options[i]=option
			 if(i==0){
			 	document.getElementById("category").options[i].selected="1"
			 }
		}
	}else{
		document.getElementById("category").options.length =0;
		document.getElementById("category").disabled='disabled'	
	}
}
//END Search by change Dropdown 









