function Validar(form1)
{

if ((document.form1.talla.value == "") || (document.form1.talla.value== null))
{

  var aguja='/en/';
  var cadena= window.location.href; //si la url tiene /en/ esta en la parte inglesa, else en frances
  if (cadena.match(aguja))
    {
	alert("Please, select size"); 
    return false;
	}
   else	 
    {
	alert("Por favor selecciona una talla"); 
return false;
	}

document.form1.talla.focus();
document.form1.talla.select();
return false;
}
else
   document.form1.submit();return true;
}


var nav4 = window.Event ? true : false;
function acceptNum(evt)
{
// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57
var key = nav4 ? evt.which : evt.keyCode;
return (key <= 13 || (key >= 48 && key <= 57));
}


//Analoga a la anterior: solo deja meter numeros pero si mete otra cosa abre una capa de advertencia
/*
function acceptNumCapa(evt, sId)
{
	
var key = nav4 ? evt.which : evt.keyCode;

	if (key <= 13 || (key >= 48 && key <= 57) || key==46)  //admito el punto
			return true; 
	else 
	 {
	 document.getElementById(sId).style.visibility='visible';
	 return false;
	 }

}
*/
function acceptNumCapa(e, sId)
{
var tecla;
tecla = (document.all) ? e.keyCode : e.which;
if(tecla == 8) //admite la tecla retroceso
{return true;}

var patron;
//patron = /[abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUV WXYZ0123456789]/
patron = /\d/; //solo acepta numeros

var te;
te = String.fromCharCode(tecla); //valor ASCII de la tecla pulsada 
  if (patron.test(te)) return true ;
  else 
    {
	document.getElementById(sId).style.visibility='visible';
	 return false;
	 }
}



