//modificada por Rolando Avalos Avalos para Zews S.A

// NOTE: Backspace = 8 / Enter = 13 / '0' = 48 | '9' = 57 / 46='.' / 44=',' / 45='-' / 32=''
var nav4 = window.Event ? true : false;  

function NumTelef(evt){ 
    var key = nav4 ? evt.which : evt.keyCode;
    //alert(key);
	return (key <= 13 || (key >= 48 && key <= 57)||key==45);
	
}
function SoloNum(evt){ 
    var key = nav4 ? evt.which : evt.keyCode;
    return (key <= 13 || (key >= 48 && key <= 57));
}

	
/********************************************************************************************/
/** quita los blancos al inicio */
function quitaBlancos(Input){	
  while(''+Input.value.charAt(0)==' ')
  {Input.value=Input.value.substring(1,Input.value.length);}
}

function limpia_campo(Input){Input.value="";}

//Esta es para limpiar los campos de cuando se envía el mensaje
function limpiar()
{
 document.form1.coment.value = document.form1.mensaje.value;
 //document.form1.nom.value = document.form1.nombre.value;
 document.form1.mensaje.focus();
 document.form1.mensaje.value="";
}

//este es para que le boton cambie la leyenda
/*var x=0; pos=0;
var l=tl[0].length;

function typebutt() 
{        
 document.form1.saludo.value=tl[x].substring(0,pos)+"";
 if(pos++==l)
 {
   pos=0;
   setTimeout("typebutt()",2000);
   x++;
   if(x==max)
     x=0;
     l=tl[x].length;
      } else
   setTimeout("typebutt()",50);
}
function smutEngine()
{
	smut="#@&*%!#@&*%!#@&*%!";
	cmp="sex 88 stereo playo picha sexo enciende laqueteenciende 88stereos hit fuck damn porno cum cunt prick pecker ass puta asshole pedophile man-boy man/boy dong twat ";
	txt=document.form1.nombre.value;
	txt1=document.form1.mensaje.value;
	tstx="";
	for (var i=0;i<23;i++)
	{
		pos=cmp.indexOf(" ");
		wrd=cmp.substring(0,pos);
		wrdl=wrd.length
		cmp=cmp.substring(pos+1,cmp.length);
		while(txt1.indexOf(wrd)>-1){//este es para el campo de mensaje
			pos=txt1.indexOf(wrd);
			txt1=txt1.substring(0,pos)+smut.substring(0,wrdl)+txt1.substring((pos+wrdl),txt1.length);}
		while(txt.indexOf(wrd)>-1){//este es para el nombre
			pos=txt.indexOf(wrd);
			txt=txt.substring(0,pos)+smut.substring(0,wrdl)+txt.substring((pos+wrdl),txt.length);
		}
	}
	document.form1.nombre.value=txt;
	document.form1.mensaje.value=txt1;
}*/
/********************************************************************************************/
function externalLinks()
{if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++)
	{var anchor = anchors[i];
	   if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")anchor.target = "_blank";}
}
/********************************************************************************************/
function addLoadEvent(func)
{	var oldonload = window.onload;
	if (typeof window.onload != 'function')window.onload = func;
	else{window.onload = function(){if (oldonload)oldonload();func();}}
}

addLoadEvent(function(){externalLinks();/*typebutt();*/});


