function dwINI (capa,cargador) { /* INICIALIZAMOS CAPA A ACTUALIZAR > No existe parámetro o es vacío o no existe la capa igualamos a contenedora, en caso contrario igualamos a capa) */ div=(capa==undefined || capa=='' || document.getElementById(capa)==null)? 'contenedora':capa; /* CREAMOS OBJETO AJAX > Si no se ha pasado por parámetro capa cargador, no existe la capa, creamos sin capa, en caso contrario creamos con capa cargador. */ if (cargador==undefined || cargador=='' || document.getElementById(cargador)==null) dwAJAX=new isiAJAX(); else dwAJAX=new isiAJAX(null,cargador); } function ajaxRecuperaRecibo(ajax) {$(div).innerHTML = ajax.responseText;} function ajaxRecuperaError(ajax) {alert('Se ha producido un Error.\nCodigo error: ' + ajax.status + '\nTexto error: ' + ajax.statusText);} function ajaxRecuperar(ID) { dwAJAX.Request({ url: 'ajax.producto.php', method: 'GET', param: 'id='+ID+'&form=DW', onError: ajaxRecuperaError, onOK: ajaxRecuperaRecibo }); } function ajaxOlvido() { dwAJAX.Request({ url: 'ajax.olvido.php', method: 'POST', param: 'email='+$('email').value+'&form=DW', onError: ajaxRecuperaError, onOK: ajaxOlvidoOK }); } function ajaxOlvidoOK(ajax) { $(div).innerHTML = ajax.responseText; dwFOCUS('email'); } function dwFOCUS2(elemento) { var objeto=eval(document.getElementById(elemento)); if (objeto!=null && objeto!=undefined) objeto.select(); } function dwFOCUS(elemento,accion) { var objeto=eval(document.getElementById(elemento)); var realizar=(accion!=null && accion!=undefined)? accion:0; if (objeto!=null && objeto!=undefined) { switch(accion) { case 0: objeto.focus(); break; default: objeto.select(); } } } function foco(elemento) { var objeto = eval(document.getElementById(elemento)); objeto.select(); }