/* ------------------------------------------------------------------------
	2ColumnEdit
		
	Developped By: Gabriel Mazzotta -> http://www.gmaz.net
	Version: 1.0
	
	Copyright: Uso de código protegido bajo licencia (c)Gabriel Mazzotta
------------------------------------------------------------------------- */

function filterCatalog() {

    var goCat = $("#TextCategoria option:selected").val();
    var goTip = $("#TextTipo option:selected").val();
    if (goCat == '') {
        $("#TextCategoria").css('background-color', '#ff0000');
    }
    else {
        var destination = "catalogo.htm";
        destination += '?c=' + goCat;
        if (goTip != '') {
            destination += '&t=' + goTip;
        }
        window.location.replace(destination);
    }
}

function loadCategs(categorias, methodName) {
    $("#TextCategoria").html('');
    $(categorias).each(function(intIndex) {
        $("#TextCategoria").append("<option>" + categorias[intIndex].Nombre + "</option>");
    });
}

function loadTipos(tipos, methodName) {
    $("#TextTipo").html('');
    $(tipos).each(function(intIndex) {
        $("#TextTipo").append("<option>" + tipos[intIndex].Nombre + "</option>");
    });
}