function Validar(form){
var number=form.txtphonenumber.value;
var primerDigito=number.charAt(0);
if (form.txtphonenumber.value == ""){ alert("Por favor escriba su numero."); form.txtphonenumber.focus(); return; }
if (primerDigito == "9"){ alert("No esta permitido telefonos moviles."); form.txtphonenumber.focus(); return; }
if (form.txtnombre.value == ""){ alert("Por favor escriba su nombre."); form.txtnombre.focus(); return; }
if (form.txtapellido.value == ""){ alert("Por favor escriba su(s) apellido(s)."); form.txtapellido.focus(); return; }
//el formulario se envia si pasa
//alert("Muchas gracias por utilizar CLICK-TO-TALK");
form.submit();
}

function ValidarHorario(form){
if (form.nombre.value == ""){ alert("Por favor escriba su nombre."); form.nombre.focus(); return; }
if (form.telefono.value == ""){ alert("Por favor escriba su numero."); form.telefono.focus(); return; }
if (form.SelectDia.selectedIndex==0){ alert("Por favor elija un el día."); form.SelectDia.focus(); return; }
if (form.SelectHora.selectedIndex==0){ alert("Por favor elija la horá."); form.SelectHora.focus(); return; }
//el formulario se envia si pasa
form.submit();
}

function solonumeros(e){
 var key;
 if(window.event){ // IE 
  key = e.keyCode;
 }else if(e.which){// Netscape/Firefox/Opera
  key = e.which;
 }

if (  key >47 && key < 58 || key==8 || key==37 || key==39 || key==9 ) { return true; }
 return false;
}
/* if (key < 48 || key > 57 ) { return false; }
 return true;
}*/

function ventanaSecundaria (URL){ 
   window.open(URL,"WEBPhone","width=280,height=280,scrollbars=NO,status=yes") 
}

function init() {
	var browser=navigator.appName;
	if (browser == "Microsoft Internet Explorer"){
		 document.getElementById("f").style.marginTop="24px";
		 
	}else{
		 document.getElementById("f").style.marginTop="40px";
		 document.getElementById("f").style.marginRight="8px";
	}
}