var zpoblacion var zcp var zprovincia var zpais var ztipocliente var zdiafecha var zmesfecha var zyearfecha var anom; var sesion; var chkey; var chlog; var bck; var idcliente; var idrep; var carrocargado=false; function valorascci() { url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/getanonimo?" url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { anom = e.responseText ; } } , onFailure: function(e) { alert('Error en la lectura de los datos'); } }); return false; } function showcontra(donde,idses,idanon) { $(donde).innerHTML = '
   Cargando...
'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/formcontra?workidioma="+workidioma+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function getcontra(donde,idses,idanon) { m = $('mailcontra').getValue(); if (comprobarMAIL(m)==true) { $('errormail').style.display="none"; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/contra?workidioma="+workidioma+"&idsesion="+sesion+"&idanonimo="+idanon+"&mail="+$('mailcontra').getValue() url=url+"&sid="+Math.random() $(donde).innerHTML = '
   Cargando...
'; new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } else { $('errormail').style.display="block"; } } function formregistro(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/formregistro?workidioma="+workidioma+"&idsesion="+idses+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', onSuccess: function(e) { if (e.responseText != "") { $('submenu').style.display="none";$(donde).innerHTML = e.responseText ;writepoblacion();writecp();writeprovincia();writepais(); writetipocliente();writediafecha();writemesfecha();writeyearfecha();} } }); } function registrarse(donde){ document.location.href='#'; var text=""; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/check?key="+$('key').getValue()+"&keyuser="+$('keyuser').getValue() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { chkey = e.responseText ; } } }); if ($('loginreg') != null){ url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/checklogin?login="+$('loginreg').getValue() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { chlog = e.responseText ; } } }); } if ($('nombre').getValue()==""){ text = "El campo NOMBRE es obligatorio
\n"; } if ($('apellido1').getValue()==""){ text = text+"El campo APELLIDOS es obligatorio
\n"; } if ($('cif').getValue()==""){ text = text+"El campo CIF es obligatorio
\n"; ret=false; } if ($('mobil')!=null){ if ($('mobil').getValue()==""){ text = text+"El campo TELEFONO MÓVIL es obligatorio
\n"; ret=false; } } m = $('email').getValue(); if (comprobarMAIL(m)==false){ text = text+"El MAIL no tiene un formato correcto (formato xxxx@yyy.zzz)
\n"; } if (ztipocliente != null) { if (ztipocliente.getComboText()==""){ text = text+"El Tipo de Cliente es obligatorio
\n"; ret=false; } } if ($('direccion').getValue()==""){ text = text+"No ha introducido la dirección
\n"; ret=false; } if ($('poblacion').getValue()=="") { text = text+"El campo POBLACIÓN es obligatorio
\n"; ret=false; } if ($('cp').getValue()==""){ text = text+"El campo CÓDIGO POSTAL es obligatorio
\n"; ret=false; } if ($('provincia').getValue()==""){ text = text+"El campo PROVINCIA es obligatorio
\n"; ret=false; } if ($('pais').getValue()==""){ text = text+"El campo PAÍS es obligatorio
\n"; ret=false; } if ($('loginreg') != null){ if ($('loginreg').getValue()==""){ text = text+"El campo NOMBRE DE USUARIO es obligatorio
\n"; ret=false; } } if (chlog=="1"){ text = text+"Este nombre de usuario ya figura en nuestra base de datos, si usted se registro en algún otro Salón, acceda con su Nombre de Usuario y Password para obtener la pre-acreditación.
\n"; ret=false; } if ($('passreg') != null){ if ($('passreg').getValue()==""){ text = text+"El campo CONTRASEÑA es obligatorio
\n"; ret=false; } if ($('passreg').getValue()!=$('pass2reg').getValue()){ text = text+"Las contraseñas no coinciden
\n"; ret=false; } } if ($('keyuser').getValue()==""){ text = text+"No ha introducido el código de la imagen.
\n"; ret=false; } if (chkey=="0"){ text = text+"La Clave introducida no es correcta.
\n"; ret=false; } if ($('privacidad').checked == false){ text = text+"Debe aceptar la politica de privacidad para seguir con el registro.
\n"; } if (text!="") { document.location.href='#'; $('errorkey').innerHTML = "Errores Encontrados

"+text; $('errorkey').style.display="block" ; } else { $('errorkey').innerHTML = ""; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/registro?idanonimo="+anom+"&nombre="+$('nombre').getValue() if ($('empresa') != null) { url=url+"&empresa="+$('empresa').getValue()} if ($('apellido1') != null) { url=url+"&apellido1="+$('apellido1').getValue()} if ($('cif') != null) { url=url+"&cif="+$('cif').getValue()} if ($('email') != null) { url=url+"&mail="+$('email').getValue()} if ($('direccion') != null) { url=url+"&direccion="+$('direccion').getValue()} if ($('apellido2') != null) { url=url+"&apellido2="+$('apellido2').getValue()} if ($('poblacion') != null) { url=url+"&poblacion="+$('poblacion').getValue()} if ($('cp') != null) { url=url+"&cp="+$('cp').getValue()} if ($('provincia') != null) { url=url+"&provincia="+$('provincia').getValue()} if ($('pais')!= null) { url=url+"&pais="+$('pais').getValue()} if (ztipocliente != null) { url=url+"&tipocliente="+ztipocliente.getComboText();} if (zdiafecha != null) { url=url+"&dia="+zdiafecha.getComboText();} if (zmesfecha != null) { url=url+"&mes="+zmesfecha.getComboText();} if (zyearfecha != null) { url=url+"&year="+zyearfecha.getComboText();} if ($('telefono') != null) { url=url+"&telefono="+$('telefono').getValue()} if ($('telefono') != null) { url=url+"&telefono="+$('telefono').getValue()} if ($('mobil') != null) { url=url+"&mobil="+$('mobil').getValue()} if ($('fax') != null) { url=url+"&fax="+$('fax').getValue()} if ($('deseo') != null) { url=url+"&ofertas="+$('deseo').checked} if ($('loginreg') != null) { url=url+"&login="+$('loginreg').getValue()} if ($('passreg') != null) { url=url+"&pass="+$('passreg').getValue()} if ($('numregistro') != null) { url=url+"&numregistro="+$('numregistro').getValue()} if ($('web') != null) { url=url+"&web="+$('web').getValue()} if ($('telefonoc') != null) { url=url+"&telefonoc="+$('telefonoc').getValue()} if ($('mailc') != null) { url=url+"&mailc="+$('mailc').getValue()} if ($('nombrer') != null) { url=url+"&nombrer="+$('nombrer').getValue()} if ($('apellido1r') != null) { url=url+"&apellido1r="+$('apellido1r').getValue()} if ($('cargo') != null) { url=url+"&cargo="+$('cargo').getValue()} if ($('telefonor') != null) { url=url+"&telefonor="+$('telefonor').getValue()} if ($('faxr') != null) { url=url+"&faxr="+$('faxr').getValue()} if ($('mailr') != null) { url=url+"&mailr="+$('mailr').getValue()} if ($('observaciones') != null) { url=url+"&observaciones="+$('observaciones').getValue()} if ($('siproshop') != null) { url=url+"&siproshop="+$('siproshop').checked} url=url+"&sid="+Math.random() var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $('OVERADDED').innerHTML = ""+loadialog+url+"" document.getElementById('SHADE').style.display="block"; document.getElementById('ADDED').style.display="block"; document.getElementById('OVERADDED').style.display="block"; new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText ; document.getElementById('SHADE').style.display="none"; document.getElementById('ADDED').style.display="none"; document.getElementById('OVERADDED').style.display="none"; $('login').value=$('loginreg').getValue() ; } } }); } } function recargarCP() { zpoblacion.loadXML ("http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/poblacionesXMLinv?filtro="+zcp.getComboText()); new Ajax.Request("http://www.gabrielistas.org/cgi-bin/vestibule.exe/provinciasXML?filtro="+zcp.getComboText()+'&tipo=1', { method: 'get', onSuccess: function(e) { if (e.responseText != "") { zprovincia.setComboText (e.responseText); } } }); return false; } function recargarpoblaciones() { zpoblacion.loadXML ("http://www.gabrielistas.org/cgi-bin/vestibule.exe/poblacionesXML?filtro=alme"); } function writepoblacion(){ if ( document.getElementById('newpoblacion') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zpoblacion=new dhtmlXCombo("newpoblacion","alfa2",167); zpoblacion.enableFilteringMode(true,"http://www.gabrielistas.org/cgi-bin/vestibule.exe/poblacionesXML",true); } } function writecp(){ if ( document.getElementById('newcp') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zcp=new dhtmlXCombo("newcp","alfa2",167); } } function writetipocliente(){ if ( document.getElementById('tipocliente') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; ztipocliente=new dhtmlXCombo("tipocliente","alfa2",167); ztipocliente.loadXML("http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/tipocliente"); ztipocliente.addOption([['1','Mayorista',''],['2','Minorista',''],['3','Exento','']]); } } function writeprovincia(){ if ( document.getElementById('newprovincia') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zprovincia=new dhtmlXCombo("newprovincia","alfa2",167); } } function writepais(){ if ( document.getElementById('newpais') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zpais=new dhtmlXCombo("newpais","alfa2",167); } } function writediafecha(){ if ( document.getElementById('diafecha') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zdiafecha=new dhtmlXCombo("diafecha","alfa2",62); zdiafecha.addOption([['1','1'],['2','2'],['3','3'],['4','4'],['5','5'],['6','6'],['7','7'],['8','8'],['9','9'],['10','10']]); zdiafecha.addOption([['11','11'],['12','12'],['13','13'],['14','14'],['15','15'],['16','16'],['17','17'],['18','18'],['19','19'],['20','20']]); zdiafecha.addOption([['21','21'],['22','22'],['23','23'],['24','24'],['25','25'],['26','26'],['27','27'],['28','28'],['29','29'],['30','30'],['31','31']]); } } function writemesfecha(){ if ( document.getElementById('mesfecha') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zmesfecha=new dhtmlXCombo("mesfecha","alfa2",62); zmesfecha.loadXML("http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/meses"); } } function writeyearfecha(){ if ( document.getElementById('yearfecha') != null ) { window.dhx_globalImgPath="http://www.gabrielistas.org/imgShop/"; zyearfecha=new dhtmlXCombo("yearfecha","alfa2",62); zyearfecha.loadXML("http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/years"); } } function recargarmenus(){ //recargarmenu('submenu','submenu'); //recargarmenu('menu','menutop'); //recargarmenu('menu','MENU'); } function login(donde) { document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/login?idanonimo="+anom+"&login="+$('login').getValue()+"&pass="+$('pass').getValue() url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; if (e.responseText.indexOf("Contrase")<0) { getsesion(); adddata(); var newid=" "; if ( (newid=="") || (newid=="0") ) { var l = document.location.href; var bc=l; //Primero hemos de quitar el idsesion y el idanonimo de la lista. if (l.indexOf("#") != -1){ var stri= l.substring(0,l.indexOf("#")); l=stri; } if (l.indexOf("&idsesion=") != -1){ var stri= l.substring(0,l.indexOf("&idsesion=")); l=stri; } //Y luego le añadimos el nuevo l=l+"&idsesion="+sesion+"&idanonimo="+anom; $('menuhor').style.display="none"; document.location.href=l; } else { document.location.href="http://www.gabrielistas.org/cgi-bin/vestibule.exe/menu?tipo=2&workidioma="+workidioma+"&pagina=temas&id="+newid+"&idsesion="+sesion+"&idanonimo="+anom; } } } } }); return false; } function login2(donde) { document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/login?idanonimo="+anom+"&login="+$('login2').getValue()+"&pass="+$('pass2').getValue() url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('login').value = $('login2').getValue();$('pass').value = $('pass2').getValue();$(donde).innerHTML = e.responseText ; if (e.responseText.indexOf("password")==-1) {getsesion();} recargarmenus(); } } }); } function getsesion() { document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/getsesion?login="+$('login').getValue()+"&pass="+$('pass').getValue() url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { sesion = e.responseText; } } }); } function getdatosusuario(donde) { document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/getdatosusuario?idsesion="+sesion if ($('login') != null) {url=url+ "&login="+$('login').getValue()+"&pass="+$('pass').getValue()} url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML=e.responseText ; recargarmenus(); adddata(); } } ,onFailure: function(e) { alert(e.responseText); } }); } function logout(donde) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; sesion=""; $(donde).innerHTML ="
Usuario
" $(donde).innerHTML = $(donde).innerHTML + "
Contraseña
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
Si ha olvidado su contraseña, pulse aquí
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
>\" onClick=login('CENTRAL');>
" var l = document.location.href; var bc=l; //Primero hemos de quitar el idsesion y el idanonimo de la lista. if (l.indexOf("#") != -1){ var stri= l.substring(0,l.indexOf("#")); l=stri; } if (l.indexOf("&idsesion=") != -1){ var stri= l.substring(0,l.indexOf("&idsesion=")); l=stri; } //Y luego le añadimos el nuevo l=l+"&idsesion=&idanonimo="+anom; document.location.href=l; } function logoutusuario(donde) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; sesion=""; $(donde).innerHTML ="
Usuario
" $(donde).innerHTML = $(donde).innerHTML + "
Contraseña
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
>\" onClick=login('CENTRAL');>
" $(donde).innerHTML = $(donde).innerHTML + "
Si ha olvidado su contraseña, pulse aquí
" quitardata(); } function logouttotal(donde) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; sesion=""; $(donde).innerHTML ="
Usuario
" $(donde).innerHTML = $(donde).innerHTML + "
Contraseña
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
" $(donde).innerHTML = $(donde).innerHTML + "
Si ha olvidado su contraseña, pulse aquí
" var url="http://www.gabrielistas.org/cgi-bin/usuarios/users.exe/logout?" url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', onSuccess: function(e) { if (e.responseText != "") { $('CENTRAL').innerHTML=e.responseText ; recargarmenus(); } } }); quitardata(); var l = document.location.href; var bc=l; //Primero hemos de quitar el idsesion y el idanonimo de la lista. if (l.indexOf("#") != -1){ var stri= l.substring(0,l.indexOf("#")); l=stri; } if (l.indexOf("&idsesion=") != -1){ var stri= l.substring(0,l.indexOf("&idsesion=")); l=stri; } //Y luego le añadimos el nuevo l=l+"&idsesion=&idanonimo="+anom; document.location.href="http://www.gabrielistas.org/cgi-bin/vestibule.exe/menu?pagina=temas.htm&menuinicial=si"; } function writecalendar() { document.write(getCalendarStyles()); var cfecha = new CalendarPopup("divfecha"); cfecha.setTodayText("Hoy"); cfecha.setWeekStartDay(1); cfecha.setMonthNames("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"); cfecha.setMonthAbbreviations("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"); cfecha.setDayHeaders("D","L","M","M","J","V","S"); } function setproducto(donde,cat,subcat,pagina,idses,idanon){ document.location.href='#'; //var loadialog = "" //loadialog = loadialog + "" //loadialog = loadialog + "" //loadialog = loadialog + "" //$('CENTRAL').innerHTML = "prueba"; var total = document.getElementsByName("sublp_"+donde); cerrartodomenuprincipal(); for (var i = 0; i 0 )) { addcarro(id,idsesion,idanonimo); document.getElementById('SHADE').style.display="block"; document.getElementById('ADDED').style.display="block"; document.getElementById('OVERADDED').style.display="block"; document.location.href='#'; } else { alert('La Cantidad solo puede ser un numero entero mayor de 0/ The Quantity must be an Integer Value and greater than 0'); } return false; } function eliminararticulo(id,idsesion,idanonimo) { document.getElementById('OVERADDED').style.display="block"; document.getElementById('ADDED').style.display="block"; document.getElementById('SHADE').style.display="block"; document.getElementById('OVERADDED').innerHTML="
¿Esta seguro de querer eliminar el articulo del carro?
" document.getElementById('OVERADDED').innerHTML=document.getElementById('OVERADDED').innerHTML+"
Are you sure that you want to delete this article?
" document.getElementById('OVERADDED').innerHTML= document.getElementById('OVERADDED').innerHTML + "
" document.getElementById('OVERADDED').innerHTML= document.getElementById('OVERADDED').innerHTML + "
" document.location.href='#'; return false; } function popprint(idses,idanon,numped,idcliente){ window.open('http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/popprint?idanonimo='+idanon+'&idsesion='+idses+'&numped='+numped+'&idcliente='+idcliente,'','width=650,height=500,scrollbars=yes,resizable=yes') } function comprobarMAIL(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) return false if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) return false if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) return false if (str.indexOf(at,(lat+1))!=-1) return false if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) return false if (str.indexOf(dot,(lat+2))==-1) return false if (str.indexOf(" ")!=-1) return false return true } function adddata() { if (anom!="") { var l; urlbase= "www.gabrielistas.org" for (x=1; x<=document.getElementsByTagName("a").length; x++) { l=document.getElementsByTagName("a")[x-1].href; var bc=l; //Primero hemos de quitar el idsesion y el idanonimo de la lista. if (l.indexOf("&idsesion=") != -1){ var stri= l.substring(0,l.indexOf("&idsesion=")); l=stri; } //Y luego le añadimos el nuevo if ( (l.indexOf("vestibule.")!= -1) || (l.indexOf("VESTIBULE.")!= -1) ){ document.getElementsByTagName("a")[x-1].href = l+"&idsesion="+sesion+"&idanonimo="+anom; } if (bc.indexOf("#") != -1) {document.getElementsByTagName("a")[x-1].href=document.getElementsByTagName("a")[x-1].href+"#"} } } } function quitardata() { var l; urlbase= "www.gabrielistas.org" for (x=1; x<=document.getElementsByTagName("a").length; x++) { l=document.getElementsByTagName("a")[x-1].href; var bc=l; if (l.indexOf("&idsesion=") != -1){ var stri= l.substring(0,l.indexOf("&idsesion=")); l=stri; } if ( (bc.indexOf("&idsesion=") != -1)){document.getElementsByTagName("a")[x-1].href = l+"&idsesion=&idanonimo="+anom; } if (bc.indexOf("#") != -1) {document.getElementsByTagName("a")[x-1].href=document.getElementsByTagName("a")[x-1].href+"#"} } } function showbuscador(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/buscador?idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function finalizar(donde,idses,idanon,numped) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/finalizar?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon+"&numped="+numped url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText ;showcarro(divcarro,sesion,idanon);} } }); } function addcarro(id,tipoc) { if ($('cantidadnormal')!=null){ if ( ($('cantidadnormal').value=="0") || ($('cantidadnormal').value=="") || ($('cantidadnormal').value=="000")){ alert('Ha de indicar una cantidad'); return false; } if (isInteger($('cantidadnormal').value)==false ) { alert('La cantidad ha de ser un número sin decimales'); return false; } } else { if ( ($('cantidad'+id).value=="0") || ($('cantidad'+id).value()=="") || ($('cantidad'+id).value()=="000")){ alert('Ha de indicar una cantidad'); return false; } if (isInteger($('cantidad'+id).value)==false ) { alert('La cantidad ha de ser un número sin decimales'); return false; } } url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/addcarro?"; if ($('codprod'+id)!=null) {url=url+"codprod="+$('codprod'+id).value} else {url=url+"codprod="+$('nart2').innerHTML;} if ($('nombre'+id)!=null) {url=url+"&nombre="+$('nombre'+id).value;} else {url=url+"&nombre="+$('nart').innerHTML;} url=url+"&idsesion="+sesion; url=url+"&idanom="+anom; url=url+"&idcliente="+idcliente url=url+"&idrep="+idrep if ($('pares'+id)!=null) {url=url+"&pares="+$('pares'+id).getValue()} if ($('lote'+id)!=null) {url=url+"&lote="+$('lote'+id).getValue()} else {url=url+"&lote="+$('surtidoselec').getValue()} if ($('surtidoref'+id)!=null) {url=url+"&surtido="+$('surtidoref'+id).getValue()} else {url=url+"&surtido="+$('surtidoselec').getValue()} if ($('cantidadnormal')!=null){url=url+"&cantidad="+$('cantidadnormal').value} else {url=url+"&cantidad="+$('cantidad'+id).value} url=url+"&dto="+$('precio1'+id).value; url=url+"&sid="+Math.random() if ($('cantidadnormal')!=null){var cantidad=parseInt($('cantidadnormal').value)} else {cantidad=parseInt($('cantidad'+id).value)} if (cantidad>$('stock'+id).value) { if (tipoc=="0") { alert('No hay stock suficiente'); return false; } if (tipoc=="1") { alert('Le informamos de que actualmente no hay Stock de Este Articulo'); return false; $('stock'+id).value=parseInt($('stock'+id).value)-parseInt($('cantidad'+id).value) } if (tipoc=="1") { $('stock'+id).value=parseInt($('stock'+id).value)-parseInt($('cantidad'+id).value) } } else { ; $('stock'+id).value=parseInt($('stock'+id).value)-parseInt(cantidad) } new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('OVERADDED').innerHTML = e.responseText; $('SHADE').style.display="block"; $('ADDED').style.display="block"; $('OVERADDED').style.display="block"; $('OVERADDED').style.left=(screen.width-410)/2; setTimeout("esconder();",2000); //var ns = (navigator.appName.indexOf("Netscape") != -1); //var pY = ns ? pageYOffset : document.body.scrollTop; //$('OVERADDED').style.top=pY+100; } } , onFailure: function(e) { if (e.responseText != "") { alert(e.responseText);$('OVERADDED').innerHTML = 'Error en el alta: '+e.responseText; } } }); showcarro(divcarro,'add'); cargarcarrito(); } function borrararticulocarro(id,idses,idanon,idrep,idcliente) { if (confirm("¿Está seguro que quiere borrar este artículo?")) { url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/borrarcarro?idcliente="+idcliente+"&idrep="+idrep+"&id="+id+"&idsesion="+idses+"&idanom="+idanon url=url+"&sid="+Math.random() document.location.href=url; } return false; } var xmlHttp2 var lb var url function enterbuscar(donde,idses,idanon,pagina,qb,e) { if(document.all) tecla=event.keyCode; else { tecla=e.which; } if(tecla==13) { buscar(donde,idses,idanon,pagina,qb); } } function buscar(donde,idses,idanon,pagina,qb) { var concepto; if (qb=="") {concepto=$('que').getValue();} else {concepto=qb;} if (concepto=="\"") {concepto=""; alert('No puede buscar con este concepto');} else if (concepto == "") { alert('Debe introducir un concepto de búsqueda \n You must fill the search concept'); } else { url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/buscararticulos?pagina="+pagina+"&que="+concepto+"&camp="+$('camp').value+"&idcliente="+idcliente+"&idrep="+idrep+"&marca="+$('marca').value+"&idsesion="+sesion+"&idanom="+idanon url=url+"&sid="+Math.random() alert document.location.href=url; } } function showcarro(donde,que) { $(donde).innerHTML = '
   Cargando...
'; url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/carro?idsesion="+sesion+"&idanonimo="+anom+"&idcliente="+idcliente+"&idrep="+idrep url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; if ($('listaoculta').style.display=="block"){ $('mostrarcarro').style.display="none"; $('ocultarcarro').style.display="block"; } } } , onFailure: function(e){ $(donde).innerHTML = e.responseText; } }); } function confirmarpaso1(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/confirmarpaso1?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+anom url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText ;} } }); esconder(); } function confirmarpaso2(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $('OVERADDED').innerHTML = ""+loadialog+"" document.getElementById('SHADE').style.display="block"; document.getElementById('ADDED').style.display="block"; document.getElementById('OVERADDED').style.display="block"; document.location.href='#'; url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/confirmarpaso2?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+anom url=url+"&sid="+Math.random()+"&pago="+$('pago').getValue()+"&comentarios="+$('comentarios').getValue() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText ; document.getElementById('SHADE').style.display="none"; document.getElementById('ADDED').style.display="none"; document.getElementById('OVERADDED').style.display="none"; } } }); } var url function showdestacados(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/destacados?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = $(donde).innerHTML = '
' +e.responseText; igualar();} } }); } function shownovedades(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/novedades?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = $(donde).innerHTML+e.responseText; igualar2();} } }); } function igualar(){ maxh=0; for (x=1; x<=document.getElementsByTagName("div").length; x++) { l = document.getElementsByTagName("div")[x-1].name; if (l == "lproddes") { if (maxh" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/detalleproducto?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon+"&id="+id url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function showlistaproductos(donde,que,cate,subcat,pagina,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/listaproductos?idcliente="+idcliente+"&familia="+que+"&categoria="+cate+"&subcategoria="+subcat+"&pagina="+pagina+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function showmenutienda(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/menutienda?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function showmenutoptienda(donde,idses,idanon) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/menutoptienda?idcliente="+idcliente+"&idsesion="+sesion+"&idanonimo="+idanon url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } }); } function showprint(donde,idses,idanon,numped) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/detalleimpresion?idcliente="+idcliente+"&idanonimo="+idanon+"&numped="+numped url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText ;} else {alert('vacio')} } ,onFailure: function(e) { if (e.responseText != "") { $(donde).innerHTML = url+'
'+e.responseText ;} } }); } function modcarro(donde,idprod,cantidad,idses,idanon) { var perm = 1; if (cantidad == "0") { if ($('nuevacantidad')!= null) { if ($('nuevacantidad').value == "") { perm=0; alert('Debes indicar una cantidad para poder modificarla\nYou must enter a quantity to modify it'); } else { if ( (isInteger($('nuevacantidad').getValue())) && ($('nuevacantidad').getValue() != "") && (parseInt($('nuevacantidad').getValue())>0 ) ){permm=1;} else { perm=0; alert('La Cantidad no puede ser decimal mayor de 0\nThe quantity cannot be a decimal value greater than 0'); } } } } if (perm==1) { var loadialog = "" loadialog = loadialog + "" loadialog = loadialog + "" loadialog = loadialog + "" // $(donde).innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/modcarro?idcliente="+idcliente+"&id="+idprod+"&idsesion="+sesion+"&idanonimo="+idanon if (cantidad != "0") {url=url+"&cantidad="+cantidad+"&sid="+Math.random()} else { if ($('nuevacantidad')!= null) { url=url+"&cantidad="+$('nuevacantidad').value+"&sid="+Math.random() } } $(donde).innerHTML =url; new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { showcarro(divcarro,sesion,idanon); showdetallecarro(donde,sesion,idanon); document.getElementById('SHADE').style.display="none"; document.getElementById('ADDED').style.display="none"; document.getElementById('OVERADDED').style.display="none"; } } }); } } function popmodcarro(donde,idprod,nombre,cantidad,idses,idanon) { document.getElementById('SHADE').style.display="block"; document.getElementById('ADDED').style.display="block"; document.getElementById('OVERADDED').style.display="block"; $('OVERADDED').innerHTML="
Modificar cantidad / Modify Quantity
"; $('OVERADDED').innerHTML=$('OVERADDED').innerHTML+"
"+nombre+"
"; $('OVERADDED').innerHTML=$('OVERADDED').innerHTML+"
Antigua Cantidad: "+cantidad+"
"; $('OVERADDED').innerHTML=$('OVERADDED').innerHTML+"
Nueva Cantidad:
"; $('OVERADDED').innerHTML=$('OVERADDED').innerHTML+"
"; $('OVERADDED').innerHTML=$('OVERADDED').innerHTML+"
"; } function recargarmenu(tipo22,donde){ var Url = location.href; Url = Url.replace(/.*\?(.*?)/,"$1"); Variables = Url.split ("&"); for (i = 0; i " loadialog = loadialog + "" loadialog = loadialog + "" $(donde).innerHTML = "
"+loadialog+"
" var newurl="http://www.gabrielistas.org/cgi-bin/vestibule.exe/recargamenu?idsesion="+sesion+"&idanonimo="+anom+"&tipo="+tipo22+"&grupo="+grupo+"&subgrupo="+subgrupo+"&workidioma="+workidioma; newurl=newurl+"&sid="+Math.random() new Ajax.Request(newurl, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $(donde).innerHTML = e.responseText; } } , onFailure: function(e) { $(donde).innerHTML = e.responseText; } }); } function cargarmes(mes,workidioma) { var loadialog = "" $('calendariomes').innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/cargarmes?fecha="+mes+"&workidioma="+workidioma url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { $('calendariomes').innerHTML = e.responseText; } , onFailure: function(e) { $('calendariomes').innerHTML = e.responseText; } }); return false; } function enviarvoto(id){ var opcion ="" var total = document.getElementsByName("voto_"+id); for (var i = 0; i " loadialog = loadialog + "" loadialog = loadialog + "" $('INTERIOR').innerHTML = "
"+loadialog+"
" url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/votar?id="+id+"&opcion="+opcion+"&idsesion="+sesion+"&idanonimo="+anom; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { $('INTERIOR').innerHTML = e.responseText; } , onFailure: function(e) { $('INTERIOR').innerHTML = e.responseText; } }); return false; } function cargarencuestaret() { var url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/cargarencuesta?sesion="+sesion url=url+"&sid="+Math.random() alert(url); new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('encuesta').innerHTML = e.responseText ; } } , onFailure: function(e) { alert('Error en la lectura de los datos'); } }); return false; } function shownoticias(p,a,grupo,subgrupo) { var loadialog = "cargando..." $('news').innerHTML = "
"+loadialog+"
" var url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/shownoticias?grupo="+grupo+"&subgrupo="+subgrupo+"&pagina="+p+"&year="+a+"&sesion="+sesion url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $('news').innerHTML = e.responseText ; } } , onFailure: function(e) { alert(e.responseText); } }); return false; } function visita(grupo,subgrupo) { var url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/visita?workidioma="+workidioma+"&subgrupo="+subgrupo+"&grupo="+grupo; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { } , onFailure: function(e) { } }); return false; } function buscarnoticias(p,filtro) { url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/buscadornoticias?" if (filtro=='1') { url=url+"&que="+$('buscarque').value; url=url+"&mes="+$('buscarmes').value; url=url+"&year="+$('buscaryear').value; url=url+"&cat="+$('buscarcat').value; } url=url+"&pagina="+p; url=url+"&filtro="+filtro; url=url+"&workidioma="+workidioma+"&idsesion="+sesion+"&idanonimo="+anom; url=url+"&sid="+Math.random(); $('resultadonoticias').innerHTML = '
   Cargando...
'; new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $('resultadonoticias').innerHTML = e.responseText ; } } , onFailure: function(e) { alert(e.responseText); } }); return false; } function detallenoticia(id) { bck=$('resultadonoticias').innerHTML; url="http://www.gabrielistas.org/cgi-bin/vestibule.exe/detallenoticiaajax?" url=url+"&id="+id; url=url+"&workidioma="+workidioma+"&idsesion="+sesion+"&idanonimo="+anom; url=url+"&sid="+Math.random(); $('resultadonoticias').innerHTML = '
   Cargando...
'; new Ajax.Request(url, { method: 'get', asynchronous: true, onSuccess: function(e) { if (e.responseText != "") { $('resultadonoticias').innerHTML = e.responseText ; } } , onFailure: function(e) { alert(e.responseText); } }); return false; } function volveratrasnoticias(){ $('resultadonoticias').innerHTML = bck; } function iniciofeelfour() { url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe.exe/iniciofeelfour?idsesion="+sesion; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { alert('ok'); $('iniciofeel').innerHTML = e.responseText ; $('body').className='Feelfour'; $('menu').style.display="none"; alert('ok'); } } , onFailure: function(e) { } }); return false; } function esperar(txt){ MojoZoom.makeZoomable( document.getElementById("laimagen"), txt, document.getElementById("laimagen_zoom"), 500, 400, false ); } function verimagenpadre(obj,cod){ url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/getimagensrc?idcliente="+idcliente+"&cod="+$('nart2').innerHTML+'&color='+obj.value+'&padre='+$('nart').innerHTML; new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { $('laimagen').src=e.responseText var img2=e.responseText; var aimg= img2.split("productos") img2=aimg[0]+'productos/'+aimg[1]; setTimeout("esperar('"+e.responseText+"');",500); } , onFailure: function(e) { } }); versurtidos($('nart2').innerHTML) } function verpadre(img,nom,marca,cod,idrep,idcliente,camp){ if ((camp=="")||(camp=="undefined")||(camp==null)) { if ($('idcampaign')!=null) {camp=$('idcampaign').value;} else {camp="0";} } if ($('camp')!=null) {camp=$('camp').value;} var colortxt="" var precios=""; url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/coloresarticulo?idcliente="+idcliente+"&idsesion="+sesion+"&camp="+camp+"&id="+cod; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { colortxt=e.responseText } } , onFailure: function(e) { colortxt='ERROR'+url+e.responseText; } }); url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/precioesarticulo?idcliente="+idcliente+"&idsesion="+sesion+"&camp="+camp+"&id="+cod; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { precios=e.responseText; } } , onFailure: function(e) { alert(e.responseText); } }); // $('imagengrande').innerHTML='
'+nom+'
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
'+cod+'
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
Precio:
'+precios+'
'; //$('imagengrande').innerHTML=$('imagengrande').innerHTML+'
PVP: 45 €
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
Color:
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
'+colortxt+'
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
Surtido:
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
37
1
38
2
38
2
38
2
38
2
38
2
38
2
38
2
'; $('imagengrande').innerHTML=$('imagengrande').innerHTML+' '; $('imagengrande').innerHTML=$('imagengrande').innerHTML+'
' $('imagengrande').innerHTML='
'+$('imagengrande').innerHTML+'
'; //$('nombreart').innerHTML=nom; verimagenpadre($('selcolor'),cod); return false; } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function mostrarbotoncomprar(obj){ if (obj.value=="0") {$('comprar').style.visibility="hidden"} else {$('comprar').style.visibility="visible"} } function versurtidos(cod){ var camp=""; if ($('idcampaign')!=null) {camp=$('idcampaign').value;} else {camp="0";} if ($('camp')!=null) {camp=$('camp').value;} var colortxt="" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/getsurtidosnormal?idcliente="+idcliente+"&idsesion="+sesion+"&camp="+camp+"&id="+cod+'&color='+$('selcolor').value; url=url+"&sid="+Math.random() $('comprar').style.visibility="hidden" $('pasocantidad').innerHTML=""; new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('selsurtido').innerHTML=e.responseText $('listasurtidopadre').style.visibility="hidden"; var coors = findPos($('nart')); if ((navigator.appName)=='Netscape') {$('laimagen_zoom').style.left=coors[1]+150;} else { $('laimagen_zoom').offsetLeft=coors[1]+150;} } } , onFailure: function(e) { alert('E: '+e.responseText); } }); } function cambiarsurtidorapido(obj,cod){ var camp=""; if ($('idcampaign')!=null) {camp=$('idcampaign').value;} else {camp="0";} if ($('camp')!=null) {camp=$('camp').value;} if (obj.value!=""){ var colortxt="" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/datossurtidosnormal?idcliente="+idcliente+"&surtido="+obj.value+"&idsesion="+sesion+"&camp="+camp+"&id="+cod+'&color='+$('selcolor').value; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('pasocantidad').innerHTML=e.responseText; $('laimagen_zoom').offsetTop=parseInt($('nart').offsetTop); } } , onFailure: function(e) { alert('E: '+e.responseText); } }); url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/getsurtido?idcliente="+idcliente+"&surtido="+obj.value+"&idsesion="+sesion+"&camp="+camp+"&id="+cod+'&color='+$('selcolor').value; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('comprar').style.visibility="visible"; $('listasurtidopadre').style.visibility="visible"; $('listasurtidopadre').innerHTML=e.responseText; } } , onFailure: function(e) { alert('E: '+e.responseText); } }); } else { $('listasurtidopadre').style.visibility="hidden"; $('pasocantidad').innerHTML=""; } } function iraproducto(img,nom,marca,cod,idrep,idcliente,camp){ document.location.href='http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/listahijos?idcliente="+idcliente+"&imagen='+img+'&nombre='+nom+'&cod='+cod+'&camp='+camp+'&marca='+marca+'&id='+cod+'&idrep='+idrep+'&idcliente='+idcliente+'&idsesion='+sesion+'&idanom='+anom+'&color='+$('selcolor').value+"&vuelta="+cross_scroll.style.left+"&r=a"; } function shopgotomarcas(obj,idrep){ document.location.href="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/listamarcas?checkpedido=1&idsesion="+sesion+"&idanom="+anom+"&idrep="+idrep+"&idcliente="+obj.value; return false; } function writeentrega(direccion,cp,poblacion,provincia,pais){ if (direccion=="") {$('datosentrega').style.display="block"} else {$('datosentrega').style.display="none"} $('direccionen').value=direccion; $('cpen').value=cp; $('poblacionen').value=poblacion; $('provinciaen').value=provincia; $('paisen').value=pais; $('contacto').value= ""; $('mail').value= ""; $('telefono').value= ""; if (direccion!="") { $('direccionen').readOnly = true $('cpen').readOnly = true $('poblacionen').readOnly = true $('provinciaen').readOnly = true $('paisen').readOnly = true $('contacto').readOnly = true $('mail').readOnly = true $('telefono').readOnly = true } else { $('direccionen').readOnly = false $('cpen').readOnly = false $('poblacionen').readOnly = false $('provinciaen').readOnly = false $('paisen').readOnly = false $('contacto').readOnly = false $('mail').readOnly = false $('telefono').readOnly = false } } function validarconf1(){ var obj=document.getElementsByName('direccione'); var ret=false; var txt=""; txt='No has seleccinado una direccion de entrega\n'; for (var i = 0; i '; } , onFailure: function(e) { } }); } function cambiarcolor(obj) { $('selsurtido').innerHTML='cargando..'; var colortxt="" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/getsurtidos?idcliente="+idcliente+"&camp="+$('campaign').value+"&id="+$('codehid').value+"&color="+obj.value; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { $('selsurtido').innerHTML=e.responseText; $('cantidad').style.display="none"; $('addarticulo').style.display="none"; } } , onFailure: function(e) { $('selsurtido').innerHTML=url+e.responseText; } }); } function cambiarsurtido(obj){ //En este caso , hay que recuperar los datos de precios y stock var colortxt="" url="http://www.gabrielistas.org/cgi-bin/v5shop/v5shop.exe/getdatosarticulo?idcliente="+idcliente+"&camp="+$('campaign').value+"&surtido="+obj.value+"&id="+$('codehid').value+"&color="+$('colorselec').value; url=url+"&sid="+Math.random() new Ajax.Request(url, { method: 'get', asynchronous: false, onSuccess: function(e) { if (e.responseText != "") { var res=e.responseText.split('$'); $('precio').innerHTML=res[0]; //Vaciamos combo cantidad var ccc=$('cantidad'); var i = ccc.length; while(i > 0){ ccc.remove(ccc.options[i]) i--; } for (x=0;xnumDias || dia==0){ alert("Fecha introducida errónea"); return false; } return true; } }