function Sell(id_new, id_categ, entidad, id_tipo) {
	if (window.confirm("Sell: " + entidad + "?") == true) {
		location = "new_adminsell.asp?c=" + id_categ + "&i=" + id_new + "&t=" + id_tipo;
	}
}

function SellAll(valor, cual) {
	var a = document.all.item(cual);
	if (a!=null) {
	    if (a.length!=null) {
	        for (i=0; i<a.length; i++) {
	            a(i).checked = valor;
	        }
	    } else 
	        a.checked = valor;
	}
}
function Copy(id_new, id_categ, categoria, id_tipo, tipo) {
	location = "new_adminedit.asp?c=" + id_categ + "&cc=" + id_new + "&t=" + id_tipo + "&cs=" + categoria + "&ts=" + tipo;
}

function Edit(id_new, id_categ, categoria, id_tipo, tipo) {
	location = "new_adminedit.asp?c=" + id_categ + "&i=" + id_new + "&t=" + id_tipo + "&cs=" + categoria + "&ts=" + tipo;
}

function Find() {
	location = "new_admin.asp?c=" + document.myform.cmbCateg.value;
}

function Up(id_new, id_categ, id_tipo) {
	location = "new_adminmove.asp?c=" + id_categ + "&a=up&i=" + id_new + "&t=" + id_tipo;
}

function Down(id_new, id_categ, id_tipo) {
	location = "new_adminmove.asp?c=" + id_categ + "&a=down&i=" + id_new + "&t=" + id_tipo;
}

function mOvr(src) {
    if (!src.contains(event.fromElement)) { src.style.cursor = 'hand'; }
}

function mOut(src) {
	if (!src.contains(event.toElement)) { src.style.cursor = 'default'; }
}

function Buscar(cual, id_categ) {
	var res;

	res = "";
	var a = document.all.item(cual);
	if (a!=null) {
	    if (a.length!=null) {
	        for (j=0; j<a.length; j++) {
	            if (a(j).checked == true) { 
					if (res != "") { res += ", "; }
					res += a(j).value; 
				}
	        }
	    } else 
	        if (a.checked == true) { res = a.value; }
	} 

	location = "new_adminsellall.asp?c=" + id_categ + "&r=" + res;
}

function EditMore(cual, id_categ, id_tipo) {
	var res;

	res = "";
	var a = document.all.item(cual);
	if (a!=null) {
	    if (a.length!=null) {
	        for (j=0; j<a.length; j++) {
	            if (a(j).checked == true) { 
					if (res != "") { res += ","; }
					res += a(j).value; 
				}
	        }
	    } else 
			{
	        	if (a.checked == true) { res = a.value; }
			}
	} 
	location = "new_admineditall.asp?c=" + id_tipo + "&r=" + res + "&cat=" + id_categ;
}


function EditAll(valor, cual) {
	var a = document.all.item(cual);
	if (a!=null) {
	    if (a.length!=null) {
	        for (i=0; i<a.length; i++) {
	            a(i).checked = valor;
	        }
	    } else 
	        a.checked = valor;
	}
}

