// function Alternar(Seccion) // function abreventana(winurl,winName,width,height) // function val_Form_Export() //function val_Form_producto(elform) // function verif_mail_masivo() // function ajaxUpdater(id,url) // function pontodos() pone todos los mercados en el form_export // function ponSect0() pone los sectores en el form_export // function ponSect1() pone los subsectores en el form_export // function ponSect2() pone los subsubsectores en el form_export // function borra(tipo,varNom,record) //function val_form_demandas(this) //function val_form_ofertas(this) // function val_Form_login(this) //function agregar() para anadir a favoritos ////////////////////////////////////////////////////////////////////////////////////////// function Alternar(Seccion){ if (Seccion.style.display=="none"){Seccion.style.display=""} else{Seccion.style.display="none"} } function abreventana(winurl,winName,width,height) { //v3.1 var window_top = (screen.height-height)/2; var window_left = (screen.width-width)/2; newWindow=window.open(''+ winurl + '',''+ winName + '','width=' + width + ',height=' + height + ',top=' + window_top + ',left=' + window_left + ',scrollbars=1,resizable=1'); newWindow.focus(); } function borra(tipo,varNom,record){ if(confirm('Va a borrar un registro, está de acuerdo?')){ document.location='?ac='+tipo+'&'+varNom+'='+record+'&modo=del'; }; } //nombreCont,apeCont,emailCont,idCargo,pass,nombre,calle,numPortal,pais,Ciudad,provincia,cpzip,iCode,aCode,telf,fax,idSector,idMerc function val_Form_Export(elform){ if (!(elform.nacion[0].checked || elform.nacion[1].checked || elform.nacion[2].checked || elform.nacion[3].checked)) { alert ( "Por favor, rellene si es importador o emportador.\n All fields marked with * are required, choose if you are a buyer or a supplier."); //elform.nacion[0].focus(); return false; } if (!elform.nombreCont.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n Please, fill in all the fields marked with *." ); elform.nombreCont.focus(); return false; } if (!elform.apeCont.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.apeCont.focus(); return false; } if (elform.idCargo.value==0) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.idCargo.focus(); return false; } if (!elform.emailCont.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.emailCont.focus(); return false; } if (!elform.pass.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.pass.focus(); return false; } if (!elform.pass2.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.pass2.focus(); return false; } if (!(elform.pass.value==elform.pass2.value)) { alert ( "Las contraseñas no coinciden, por favor, escríbalas de nuevo.\Password fields don't match, please, fill in again." ); elform.pass.value=""; elform.pass2.value=""; elform.pass.focus(); return false; } if (!elform.nombre.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.nombre.focus(); return false; } if (!elform.articuloi.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.articuloi.focus(); return false; } if (!elform.pais.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.pais.focus(); return false; } if (!elform.tipoActividad.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.tipoActividad.focus(); return false; } if (!elform.MasInfoO.checked && !elform.MasInfoP.checked && !elform.MasInfoB.checked && !elform.MasInfoE.checked) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.MasInfoO.focus(); return false; } //alert ( "elsector vale " +); if(!elform.elsector.value){ if (!elform.sector0.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in." ); elform.sector0.focus(); return false; }else{ if (!elform.sector1.value) { alert ( "Por favor, rellene todos los campos marcados con asterisco.\n All fields marked with * are required, please, fill in."); elform.sector1.focus(); return false; }else{ if (!document.getElementById('idSector')) { document.getElementById('idSector')=elform.sector1.value; //alert ( "ponemos el sector1 como idSector, que es "+elform.sector1.value); } } } }else{ elform.idSector.value=elform.elsector.value; } } function val_Form_login(elform){ if (!elform.exporter.value) { alert ( "Por favor, rellene todos los campos.\n Please, fill in all fields." ); elform.exporter.focus(); return false; } if (!elform.pazz.value) { alert ( "Por favor, rellene todos los campos.\n Please, fill in all fields." ); elform.pazz.focus(); return false; } } function val_Form_news(elform){ if (form_news.test.value) { alert ( "El formulario no se tendrá en cuenta." ); return false; } if (!form_news.lanews.value) { alert ( "Por favor, indique su direccion de correo.\n Please, write in your email." ); form_news.lanews.focus(); return false; } } //articulo,descripcion,foto,masinfo,certificaciones,modelo,keyword,Fecpublicacion,FecCaduca,moneda,pedidoMinimo,MadeIn,EstimadoEntrega,Packaging,id,PrecioDesde,idSector function val_Form_producto(elform){ if (!elform.articulo.value) { alert ("Escriba el nombre del articulo, por favor."); elform.articulo.focus(); return false; } if (isNaN(elform.PrecioDesde.value)) { alert ("El precio del artículo debe ser numérico."); elform.PrecioDesde.focus(); return false; } if (isNaN(elform.diaCad.value)) { alert ("El día de caducidad debe ser numérico."); elform.diaCad.focus(); return false; } if (isNaN(elform.annoCad.value)) { alert ("El año de caducidad debe ser numérico."); elform.annoCad.focus(); return false; } //if (elform.sectorR.value==0 || !elform.sectorR.value){ // if (!elform.sector0.value) { // alert ( "Elija un sector asociado al producto, por favor."); //elform.sector0.focus(); // return false; // }else{ //if (!elform.sector1.value) { // alert ( "Elija un sector asociado al producto, por favor."); //elform.sector1.focus(); // return false; // }else{ //if (!document.getElementById('idSector')) { //document.getElementById('idSector')=elform.sector1.value; //alert ( "ponemos el sector1 como idSector"); // } //} // } //} } function val_form_demandas(elform){ if (!elform.titulo.value && !elform.tituloi.value) { alert ("El nombre del artículo es necesario en al menos uno de los dos idiomas."); elform.titulo.focus(); return false; } } function val_form_ofertas(elform){ if (!elform.titulo.value && !elform.tituloi.value) { alert ("El nombre del artículo es necesario en al menos uno de los dos idiomas."); elform.titulo.focus(); return false; } } function verif_mail_masivo(elform){ alert ( "Si tu categoria lo permite, envias un mail." ); } function ajaxUpdater(id,url){ new Ajax.Updater(id,url,{asynchronous:true}); } function jsConfirm(lapregunta,lapagina) { if (confirm(lapregunta)) { document.location=lapagina; } } function pontodos(){ var i = 1; var lis='' do { if(document.getElementById('mercado'+i).checked){ lis=lis+document.getElementById('mercado'+i).value+','; } i+=1; } while(i<10); return lis; } function ponSect0(){ var i = 0; var lis='' do { if(document.getElementById('sector0').options[i].selected){ lis=lis+document.getElementById('sector0').options[i].value+','; } i+=1; } while(i=4)) { var url="http://www.spain-exporters.es/"; var titulo="Spain-Exporters.es"; window.external.AddFavorite(url,titulo); } else { if(navigator.appName == "Netscape") alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); } }