function popW(url,w,h){ if(w=='max'){w = screen.availWidth-20} if(h=='max'){h = screen.availHeight-50} var inicio = url.lastIndexOf("/")+1; var longitud = url.indexOf(".")-inicio; var myName = url.substr(inicio,longitud); var myWindow = window.open(url,myName,"width="+w+",height="+h+",status=1,scrollbars=1,resizable=1"); myWindow.focus(); } function checkIndex(page){ var pagina = ""; pagina = location.pathname; if(!top.iframew){ top.location.href="http://www.residenciacristina.com/"+page+"?p="+pagina; } } function detectEnter(e,cual){ var keynum; var keychar; var numcheck; if(window.event){ //IE keynum = e.keyCode }else if(e.which){ // Netscape/Firefox/Opera keynum = e.which } if(keynum==13){ //pasamos al siguiente campo switch (cual.name){ case "nombre": document.getElementById("email").focus(); break; case "email": document.getElementById("telefono").focus(); break; case "telefono": document.getElementById("comentario").focus(); break; default: return true; } return false; } }