function ChgSubmit(form) { document.getElementById(form).submit(); } function ChgSubmitPedido(form) { var obj = document.getElementById(form); if(Onclick_Valida(obj)) obj.submit(); else return false; } function CompruebaAreaEnvio() { if (document.forms["form2"]["pais"].selectedIndex == 0) { alert("Debe seleccionar primero una area de envío"); document.forms["form2"]["pais"].focus(); } } function CargaCarro(){ if(parent.frames['carro'].document.form2){ // parent.frames['carro'].document.getElementById('TablaFormCarro').style.display = "none" // parent.frames['carro'].document.getElementById('td6').style.display = "none" input = parent.frames['carro'].document.getElementsByTagName("input"); for (var indice = 0; indice < input.length; indice ++) { parent.frames['carro'].document.getElementsByTagName('input')[indice].disabled = true; } btn = parent.frames['carro'].document.getElementsByTagName("button"); for (var indice = 0; indice < btn.length; indice ++) { parent.frames['carro'].document.getElementsByTagName('button')[indice].disabled = true; } clearInterval(TMP_INTERVAL) } } function EnviaformCliente(ObjForm){ var nueva = window.open('','nueva','top=0,left=0,width=500,height=325,scrollbars=no,resizable=no,status=no,menubar=no,location=no'); ObjForm.submit() } function EnviarFormNoCliente(ObjForm){ var NoCliente = window.open('','NoCliente','top=0,left=0,width=500,height=350,scrollbars=no,resizable=no,status=no,menubar=no,location=no'); ObjForm.submit() } function EnviarPass(ObjForm){ var nueva = window.open('/escripts/olvido_pass.php?email2='+ObjForm.email.value,'nueva','top=0,left=0,width=500,height=250,scrollbars=no,resizable=no,status=no,menubar=no,location=no'); } //alert('carro.js dd'); var IE = document.all ? true : false; var NSP = (document.layers) ? true : false function Void_Tip(capa,vis_capa,e){ var Tip = document.getElementById(capa) Tip.style.visibility = vis_capa if(NSP){ Tip.style.top = e.pageY +10 Tip.style.left =e.pageX+15 Tip.style.left = ( ( e.pageX + Tip.offsetWidth ) > window.innerWidth ) ? e.pageX- Tip.offsetWidth -10 : e.pageX +15 }else { Tip.style.top = event.clientY + document.body.scrollTop+10 Tip.style.left = ( ( event.clientX + Tip.offsetWidth ) > document.body.clientWidth ) ? event.clientX - Tip.offsetWidth - 10 : event.clientX +15 } } function AreaEnvio_onchange(Obj){ var PaisEnvio = Obj.value if(parent.document.formu){ var PaisPedido = parent.document.formu.cod_pais.value; if( parent.document.formu.envio.checked == true){ if(parent.MODO_FACTURACION == 'empresa' && PaisEnvio != 'ES_p' ){ window.location = '/carro.php?modo=area&cd='+PaisEnvio+'&iva=exento&dd'; }else{ window.location='/carro.php?modo=area&cd='+PaisEnvio + '&dd'; } }else{ // checked == true if(parent.MODO_FACTURACION == 'empresa' && PaisPedido != 'ES_p'){ window.location = '/carro.php?modo=pedido&cd='+PaisEnvio+'&iva=exento&pedido='+PaisPedido + '&dd'; }else{ window.location = '/carro.php?modo=pedido&cd='+PaisEnvio+'&pedido='+PaisPedido + '&dd'; } } }else{ // parent.document.formu window.location='/carro.php?modo=area&cd='+PaisEnvio + '&dd'; } } function Carro(id){ if(document.getElementById('carro')){ document.getElementById('carro').src = '/carro.php?id='+id+'&modo=compra&dd'; document.getElementById('carro').style.display = 'block'; } else{ parent.document.getElementById('carro').src = '/carro.php?id='+id+'&modo=compra&dd'; parent.document.getElementById('carro').style.display = 'block'; } } function CarroVisible(){ document.getElementById('carro').style.display = 'block'; } function AbrirFrame(){ var url = document.URL; if(url.indexOf("https") > 0) { document.getElementById('carro').style.display = 'block'; return; } if(CONFIRM_DATOS){ document.getElementById('carro').src ='/carro.php?modo=nada&dd'; }else{ document.getElementById('carro').src = '/carro.php?dd'; } document.getElementById('carro').style.display = 'block'; } function CerrarFrame(){ document.getElementById('carro').style.display = 'none'; } function Aumentar(img){ window.open("/aumentar.php?id="+img,'imagne','left=0,top=0,width=50,height=50,status=no,scroll=auto,resizable=yes') } var avisado =false; function ValidaEmail(obj){ var mail = new RegExp("^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$","i"); return true; } function Enviar(){ mail = document.Jccform1.email.value if(mail == '') return false ventana = window.open('/escripts/boletin.php?email='+mail,'ven','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=240') } function valida(obj){ var error=false var tt='' var arq = obj.requiere.value.split(","); for(var i=0;i= maxi && CampoD.name != 'nivel_filtro_cruce'){ CampoD.value = maxi }else{ CampoD.value = parseInt(CampoD.value)+1 } window.location='/carro.php?id='+id+'&id_ficha='+id_ficha+'&modo=cantidad&cantidad='+CampoD.value + '&dd'; } function Void_ActualizarCarro(CampoD,id,id_ficha){ window.location='/carro.php?id='+id+'&id_ficha='+id_ficha+'&modo=cantidad&cantidad='+CampoD.value +'&dd'; } function Bajar(campo,mini,id,id_ficha){ var CampoD = document.getElementById(campo) if(parseInt(CampoD.value) <= mini){ CampoD.value = mini }else{ CampoD.value = parseInt(CampoD.value)-1 } window.location='/carro.php?id='+id+'&id_ficha='+id_ficha+'&modo=cantidad&cantidad='+CampoD.value +'&dd'; } function Jc_over(obj){ if(obj.className=='btn'){obj.className='btnOver'}; } function Jc_out(obj){ if(obj.className=='btnOver'){obj.className='btn'}; } function Jc_click(obj){ if(obj.className !='btnDown'){obj.className='btnDown';} else {obj.className='btn'}; } function Jc_dow(obj){ obj.className='btnDown' } function Jc_up(obj){ if(obj.className =='btnDown'){obj.className='btn';} } function Redim(){ var frame = parent.document.getElementById('carro'); var AltDoc = (NSP) ? pageYOffset + window.innerHeight + 20 : document.body.scrollHeight +20; // var AltDoc = document.body.scrollHeight +20 frame.height = AltDoc } function Void_AbrePop(url){ var name = 'jccpop'; var w = 650; var h = (screen.height-250); var settings ='height='+h+','; settings +='width='+w+','; settings +='top='+0+','; settings +='left='+0+','; settings +='scrollbars=yes,'; settings +='resizable=yes'; win=window.open(url,name,settings); //window.open('pop','top=0,left=0,width=600,height=600,scrollbars=yes,resizable=yes,status=no,menubar=no,location=no'); } var nav4 = window.Event ? true : false; var CantNum = 0; function acceptNum(evt){ return true; } function CuentaCaracteres(Necesario,ObjForm) { if(!avisado && ObjForm.value!='' & ObjForm.value!=0){ CantidadCarcac = ObjForm.value.length; if(CantidadCarcac < Necesario){ alert ("Entrada no correcta, es necesario mínimo: "+Necesario+" carácteres"); ObjForm.style.backgroundColor='red'; ObjForm.focus() }else{ ObjForm.style.backgroundColor='#44ff44'; setTimeout('avisado=false',500); return true; } } }//fin funcion function ReadOnly_distribuidor(){ var Campos = new Array('nombre_fiscal', 'nombrec', 'apellidosc', 'nombre', 'apellidos', 'direccion', 'cp', 'poblacion', 'provincia', 'cod_pais', 'telefono', 'email', 'fax', 'nif', 'ava' ); /* for (i = 0; i < Campos.length; i++){ if(Campos[i] !='cod_pais'){ document.getElementById(Campos[i]).readOnly = "1"; }else{ document.getElementById(Campos[i]).disabled = true } } */ document.getElementById('BontonModeFac').style.display = 'none'; //document.getElementById('contrasenya').style.display = 'none'; } function ReloadPag(){ ///CerrarFrame() //window.location.reload(); // AbrirFrame() } function _valida(formu){ if(valida(formu)) formu.submit(); } document.oncontextmenu = menu function menu(){ //return false } var IMPRESION = false;