function cargarProdunidAtrib(){
	var params = 'codpu='+document.getElementById('codpu').value;
	ajaxUpdater('producto_procesos.php?k=pu12','div_pu11',params,'post','1');
	ajaxUpdater('producto_procesos.php?k=pu10','div_pu10',params,'post','0');
	return false;
}
function cargarProdAtrib(){
	aAtrib = document.getElementById('aAtrib').value.split(",");
	var paramAtrib = '';
	for(i=0; i <aAtrib.length; i++) { 
		paramAtrib = paramAtrib + '&pua' + aAtrib[i] + '=' + document.getElementById('pua'+aAtrib[i]).value;
	}
	var params = 'codpu='+document.getElementById('codpu').value + paramAtrib;
	//alert(params);
	ajaxUpdater('producto_procesos.php?k=pu11','div_pu11',params,'post','1');
	//ajaxUpdater('producto_procesos.php?k=pu11&'+params,'divpu','','get');
	return false;
}
function cargarProdConfig(){
	aCat = document.getElementById('aCatProdId').value.split(",");
	var paramProd = '';
	for(i=0; i < aCat.length; i++) { 
		paramProd = paramProd + '&' + aCat[i] + '=' + document.getElementById(aCat[i]).value;
	}
	var params = 'codprod='+document.getElementById('IDprod').value + paramProd;
	ajaxUpdater('producto_procesos.php?k=pu13','div_pu11',params,'post','1');
	ajaxUpdater('producto_procesos.php?k=pu14','div_pu14',params,'post','0');
	ajaxUpdater('producto_procesos.php?k=pu15','div_pu15',params,'post','0');
	return false;
}

function cargarProdCatalog(){
	var params = 'codcat='+document.getElementById('catID').value + '&' + 'codmarca='+document.getElementById('marcaID').value + '&' + 'codview='+document.getElementById('cmbViewID').value + '&' + 'codord='+document.getElementById('cmbOrdID').value;
	ajaxUpdater('catalogo_procesos.php?k=buscar','div_cat',params,'post','1');
	return false;
}

function cargarPrefCatalog(){
	var params = 'codcat='+document.getElementById('catID').value + '&' + 'codmarca='+document.getElementById('marcaID').value + '&' + 'codview='+document.getElementById('cmbViewID').value + '&' + 'codord='+document.getElementById('cmbOrdID').value + '&' + 'codtampag='+document.getElementById('tampagID').value + '&' + 'codestilo='+document.getElementById('estiloID').value;
	ajaxUpdater('catalogo_procesos.php?k=pref','div_cat',params,'post','1');
	return false;
}
function loadPagProd(pag){
	var params = 'pg='+pag + '&' + 'avarbusq='+document.getElementById('aVarBusq').value;
	ajaxUpdater('catalogo_procesos.php?k=pgcat','div_cat',params,'post','1');
	return false;
}
function enviar_recomend(form){
	if (document.getElementById('txt_rn').value == "" || document.getElementById('txt_rn').value == "Su nombre") { alert("Falta ingresar su nombre"); document.getElementById('txt_rn').focus(); return (false); }
	if (document.getElementById('txt_rna').value == "" || document.getElementById('txt_rna').value == "Nombre de amigo") { alert("Falta ingresar nombre de su amigo"); document.getElementById('txt_rna').focus(); return (false); }
	if (document.getElementById('txt_rea').value == "") { alert("Falta ingresar E-mail"); document.getElementById('txt_rea').focus(); return (false); }
	if (document.getElementById('txt_rea').value.length!=0)
	if (document.getElementById('txt_rea').value.indexOf('@', 0) == -1 || document.getElementById('txt_rea').value.indexOf('.', 0) == -1){ 
		alert("Dirección de correo no válido"); 
		document.getElementById('txt_rea').focus(); 
		return (false); 
	}
	var params = 'codprod='+document.getElementById('rprodid').value + '&' + 'nombre='+document.getElementById('txt_rn').value + '&' + 'amigo='+document.getElementById('txt_rna').value + '&' + 'email='+document.getElementById('txt_rea').value;
	ajaxUpdater('producto_procesos.php?k=recom','div_recom',params,'post','1');
	return false;
}
function loadImgProd(img) {
	var params = 'imgfile='+img;
	ajaxUpdater('producto_procesos.php?k=pimg','div_img',params,'post','1');
	return false;
}