// JavaScript Document
function Abrir(destino,alto,ancho,ventana) 
{
	var jumpToHere;
	var winOptions;
	var popUpWindow; 
	
	jumpToHere = destino
	winOptions = "top=100, left=100, width=" + ancho + ", height=" + alto;
 	popUpWindow = document.open(jumpToHere, ventana, winOptions);
 }

function mostrar(Id,familia){
	nextUrl = "productos.php?f=" + familia + "&Id=" + Id;
	window.top.location.href = nextUrl;
//	alert(nextUrl);
}

function saltar(valor){
   if (valor.selectedIndex != 0)
   {
    window.location = valor.value;
   }
}

function eliminar(n,nexturl) {
	doyou = confirm("¿está seguro?");
	
	if (doyou == true){
		window.top.location.href = nexturl;
	}else{
		alert('Operación cancelada');
	}
}
function isEmail(who) {
	var email=/^[A-Za-z0-9][\w-.]+[A-Za-z0-9]@[A-Za-z0-9]([\w-.]+[A-Za-z0-9]\.)+([A-Za-z]){2,4}$/i;
	return(email.test(who));
}

function atajo(nexturl) {
	if (nexturl != "") {
		window.top.location.href = nexturl;
	}
}


function tamano(){
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth; myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;
	}
	return (myWidth);
}