function isEmail(str) {
		return ((str.indexOf("@") != -1) && (str.indexOf(".") != -1));
	}

function image_amp(image,h,w) {
  w_producto_amp=window.open("include/image_amp.asp?image="+ image +"&h="+ h +"&w="+ w, "ImagenAmpliada",  "width="+w+",height="+h+",status=no,toolbar=no,menubar=no,scrollbars=no,top=0,left=150");
}


function windowOpener(url, windowName, params) {
	window.open (url, windowName, params)
}

function validcant(canti) {

	var cant = parseInt(canti.value);
	var form = canti.form;
	
	if (cant != canti.value) {
	// me pusieron un valor no entero
		alert('Sólo se aceptan números enteros.\nIntente nuevamente.');
		canti.focus();
		return false;
	}

	if (isNaN(canti.value)) {
		alert (canti.value + ' no es un número.\nIntente de nuevo.');
		canti.focus();
		return false;
	}

	if (canti.value < 1 ) {
		alert (canti.value + ' debe ser mayor o igual a 1.\nIntente nuevamente.');
		canti.focus();
		return false;
	}

	return true;
}

function valid_carrito(form) {
	var str=form.cantidad.value
	if (str.length == 0) { return true }
	for (j=0; j<str.length; j++) {
		if ( (str.charAt(j) != "0") && 
			 (str.charAt(j) != "1") && 
			 (str.charAt(j) != "2") &&
			 (str.charAt(j) != "3") &&
			 (str.charAt(j) != "4") &&
			 (str.charAt(j) != "5") &&
			 (str.charAt(j) != "6") &&
			 (str.charAt(j) != "7") &&
			 (str.charAt(j) != "8") &&
			 (str.charAt(j) != "9") ) 
			{
			alert("Por favor, ingrese una cantidad correcta")
			return false;
		}
	}
	return true;
}

function valid_buscar(form) 
{
	if (form.busco.value.length<3) 
	{
		alert("Por favor, ingrese el patrón de búsqueda. (Mínimo 3 letras)");
		return false;
	}
	-->
}
