
	function updateSelect(el,val,arrayname,child){
		
		if(child){
			var childselectObj = child;
			
			if (childselectObj != null && childselectObj.options != null)
    	{
        childselectObj.options[childselectObj.options.length] = 
            new Option('Please select a sub category', 0, false, false);
    	}
    	child.length=1;
		}
		var selectObj = el;
		var temp_array = eval(arrayname + val);
		for(j=0;j<temp_array.length;j++){
			if (selectObj != null && selectObj.options != null)
    	{
        selectObj.options[j] = 
            new Option(temp_array[j][0], temp_array[j][1], false, false);
    	}
		}
		
		if( temp_array.length < selectObj.options.length){
			el.length = temp_array.length;
		}
		
	}
	
