function showmap(zoom,div){ // if (GBrowserIsCompatible()) { var map = new GMap(document.getElementById(div)); map.centerAndZoom(new GPoint(-0.41243791580200195,39.37717836673783), zoom); } var icon = new GIcon(); icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; icon.iconSize = new GSize(12, 20); icon.shadowSize = new GSize(22, 20); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var point0 = new GPoint(-0.41243791580200195,39.37717836673783) ; var marker0 = new GMarker(point0); map.addOverlay(marker0) GEvent.addListener(marker0, "click", function() { marker0.openInfoWindowHtml("Poligono Industrial San Francisco
Camí de la travesia 38
46469 Beniparrell (Valencia)
Tel. 96 121 18 35 / 96 121 18 95
Fax. 96 120 04 85
europea@europeadecarretillas.com
"); }); // } function masdatos(ide){ window.open('datos.php?m='+ide,'','height=140,width=600,status=1') } function nuevoAjax() { /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por lo que se puede copiar tal como esta aqui */ var xmlhttp=false; try { // Creacion del objeto AJAX para navegadores no IE xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { // Creacion del objeto AJAX para IE xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp=false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } return xmlhttp; } function cargaDatos(idDiv, idInput, tipo, int) { var valorInput=document.getElementById(idInput).value; var divError=document.getElementById("error"); // Elimino todos los espacios en blanco al principio y al final de la cadena // Valido con una expresion regular el contenido de lo que el usuario ingresa var reg=/(^[a-zA-Z0-9._áéíóúñ¡!¿? -]{1,40}$)/; if(!reg.test(valorInput)) { // Si hay error muestro el div que contiene el error divError.innerHTML="El texto ingresado no es válido" divError.style.display="block"; } else { // Si no hay error oculto el div (por si se mostraba) divError.style.display="none"; mostrandoInput=false; document.getElementById(idDiv).innerHTML=valorInput; // Creo objeto AJAX y envio peticion al servidor var ajax=nuevoAjax(); ajax.open("GET", "actualizar.php?dato="+valorInput+"&id="+idInput+"&tipo="+tipo+"&int="+int, true); ajax.send(null); } } var mostrandoInput=false; function creaInput(idDiv, idInput, tipo,int) { /* Funcion encargada de cambiar el texto comun de la fila por un campo input que conserve el valor que tenia ese campo */ /* Solo mostramos el input si ya no esta siendo mostrado y si ademas el div del error no esta en pantalla */ if(!mostrandoInput) { // Obtenemos el div contenedor del futuro input var divContenedor=document.getElementById(idDiv); // Creamos el input divContenedor.innerHTML=""; // Colocamos el cursor en el input creado document.getElementById(idInput).focus(); // Establecemos a true la variable para especificar que hay un input en pantalla y no se debe crear otro hasta que este se oculte mostrandoInput=true; } } function compLogin(){ if(document.form_login.usuario.value.length==0){ alert('Introduce un usuario'); document.form_login.usuario.focus(); return 0; } if(document.form_login.pass.value.length==0){ alert('Introduce un password'); document.form_login.pass.focus(); return 0; } document.form_login.submit(); } function cambiar(ide){ document.form_buscar.m.selectedIndex="0"; var carga=new Array(1,2,3,4); var marca=new Array(1,2,3,4); var entroCarga; var entroMarca; for (x = 0; x <= carga.length; x++) { if(carga[x]==ide){ entroCarga=true; } } for (x = 0; x <=marca.length; x++){ if(marca[x]==ide){ entroMarca=true; } } if(entroMarca){ document.getElementById('marca').style.display='block'; }else{ document.getElementById('m').value=0; document.getElementById('marca').style.display='none'; } if(entroCarga){ document.getElementById('carga').style.display='block'; }else{ document.getElementById('cap').value=0; document.getElementById('carga').style.display='none'; } } function email(theElement) { var s = theElement.value; var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/; if (s.length == 0 ) return true; if (filter.test(s)) return true; else return false; } function checkFormContact(){ if(document.form_contact.empresa.value.length==0){ alert('Introduce una empresa'); document.form_contact.empresa.focus(); return false; } if(document.form_contact.telefono.value.length==0){ alert('Introduzca un telefono'); document.form_contact.telefono.focus(); return false; } if(document.form_contact.email.value.length==0){ alert('Introduzca un correo valido'); document.form_contact.email.focus(); return false; } if(document.form_contact.pcontacto.value.length==0){ alert('Introduzca una persona de contacto'); document.form_contact.pcontacto.focus(); return false; } if(document.form_contact.poblacion.value.length==0){ alert('Introduzaca una población'); document.form_contact.poblacion.focus(); return false; } if(document.form_contact.asunto.value.length==0){ alert('Introduzca un asunto'); document.form_contact.asunto.focus(); return false; } if(document.form_contact.mensaje.value.length==0){ alert('Introduzca un mensaje'); document.form_contact.mensaje.focus(); return false; } document.form_contact.submit(); } function compRegistro(){ if(document.form_reg.empresa.value.length==0){ alert('Introduce una empresa'); document.form_reg.empresa.focus(); return 0; } if(document.form_reg.nombre.value.length==0){ alert('Escriba el nombre de la empresa'); document.form_reg.nombre.focus(); return 0; } if(document.form_reg.telefono.value.length==0){ alert('Introduzca un telefono'); document.form_reg.telefono.focus(); return 0; } if(document.form_reg.apellidos.value.length==0){ alert('Introduzca sus apellidos'); document.form_reg.apellidos.focus(); return 0; } if(document.form_reg.email.value.length==0){ alert('Introduzca un correo valido'); document.form_reg.email.focus(); return 0; } if(document.form_reg.pais.value=="nada"){ alert('Seleccione un país'); document.form_reg.pais.focus(); return 0; } if(document.form_reg.provincia.value=="nada"){ alert('Seleccione una provincia'); document.form_reg.provincia.focus(); return 0; } if(document.form_reg.localidad.value.length==0){ alert('Introduzca una localidad'); document.form_reg.localidad.focus(); return 0; } document.form_reg.submit(); } function destacar(ide,estado){ document.Desta.ideDest.value = ide; document.Desta.Dest.value = estado; document.Desta.submit(); } function activar(ide,estado){ document.Act.idAct.value = ide; document.Act.Estado.value = estado; document.Act.submit(); } function eliminarMaq(ide){ if (confirm("Desea eliminar esta marca?")) { document.formDel.ide.value = ide; document.formDel.submit(); } } function eliminarCli(ide){ if (confirm("Desea eliminar este cliente?")) { document.formDel.ide.value = ide; document.formDel.submit(); } } function eliminar(ide){ if (confirm("Desea eliminar esta maquina?")) { document.formDel.ide.value = ide; document.formDel.submit(); } } function sendAdmin(){ if(document.form_admin.usuario.value.length==0){ alert("Introduzca un usuario") document.form_admin.usuario.focus(); return 0; } if(document.form_admin.passw.value.length==0){ alert("Introduzca un password") document.form_admin.passw.focus() return 0; } // el formulario se envia document.form_admin.submit(); } function chngImg (imgName, ancho, alto) { var linkFotoPpal = document.getElementById('Contenedor'); linkFotoPpal.innerHTML = ''; } function mostraCon(){ window.open('contacto.html','','height=570,width=620,status=1,scrollbars=1') }