

//-----------------------------------------------------------------------------
function cam(x)
		{
			
		
		if(x !=""){
		eval("document.forms[0]." + x + ".focus()");
		 
		  }
	    }		
	   	
	   	
	   	
function regresarpedido(){
	
  	  document.location.href="buzon09.aspx"
  	 
	
}   	
	   	
	   	
	   	
	   	
	   	
	   	
function controlOut(x){
		
		 
	  if(x==1){
	 
	   document.forms[0].submit();
  	  }
  	  
  	  if(x==2){
  	  document.location.href="buzon09.aspx"
  	  }
  	  if(x==3){
  	  document.location.href="ErrorGrabacionBuzon2.htm"
  	  }
  	  if(x==4){
  	  document.location.href="ErrorGrabacionBuzon1.htm"
  	  }
  	  if(x==666){
	 	  document.location.href="bloqueo2.htm";
  	  }
	
	}   
	   	
	 
	
function validarEmail(valor) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
 
return (true)
} else {
 
return (false);
}
}


	
	
	
	
	
	
	
	
	
	  
	  function validaTelefono(telefono){
	  
	  var RegExPatternX = new RegExp("[0123456789 -+]");
	  
	  
	      if(telefono != ""){ 

              if (telefono.match(RegExPatternX)) { 
                  return true;
               } 
              else
               {
              return false;
               } 


          }


   
}




function lTrim(sStr){
while (sStr.charAt(0) == " ") 
 sStr = sStr.substr(1, sStr.length - 1);
 return sStr;
 }

function rTrim(sStr){
 while (sStr.charAt(sStr.length - 1) == " ") 
 sStr = sStr.substr(0, sStr.length - 1);
 return sStr;
 }

 function allTrim(sStr){
   return rTrim(lTrim(sStr));
  }
//-----------------------------------------------------------------------------