var ajax = new sack();
function putCat(sel){	
	var fam= sel.options[sel.selectedIndex].value;
	var catSel= document.getElementById('select_categoria');
	catSel.options.length=0;
	if ( fam > 0 ){		
		ajax.requestFile='http://'+window.location.host+'/getCat.php?cod='+fam;
		ajax.onCompletion= generateCat;		
		ajax.runAJAX();			
	}
}
function generateCat(){
	var obj = document.getElementById('select_categoria');		
	eval(ajax.response);	
}
function familyCat(sel, familia){
	var cat=sel.options[sel.selectedIndex].value;
	window.location="familia.php?f=" + familia + "&c=" + cat;
}

function jblCat(sel){
	var cat=sel.options[sel.selectedIndex].value;
	window.location="jbl.php?c=" + cat;
}

