var izone=1; var datos=""; var enProceso = false; var enProcesoXML=false; var XMLresultado=""; var http = getHTTPObject(); var XMLsyncro=false; var jxdonde=""; var JXTextCargando="Cargando"; var XMLuPagina=""; var XMLuCadena=""; var XMLuJxD=""; var XMLuParametro=""; var aXMLuPagina=""; var aXMLuCadena=""; var aXMLuJxD=""; var aXMLuParametro=""; var RatAltura=25; var toppos=0; var leftpos=0; var inter; var MoviEje=false; var ctrDownX; var ctrDownY; var pagex; function getHTTPObject(){var xmlhttp = null; try{ xmlhttp = new ActiveXObject("MSXML2.XMLHTTP"); }catch (e){try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e) {xmlhttp = null; }}if ((xmlhttp == null) && (typeof XMLHttpRequest != 'undefined')){try{xmlhttp = new XMLHttpRequest(); XMLsyncro=true; }catch (e){xmlhttp = null; }}return xmlhttp; }var enProceso = false; var http = getHTTPObject(); function CargarPagina(pagina,izona){if (!enProceso && http){izone=izona; var url = pagina; http.open("POST", url, true); http.onreadystatechange = handleHttpResponseXML; http.send(null); }}
function xGet(pagina,cadena,jxd,parametro){self.location.href=(pagina+".asp?"+cadena); }function xGet2(pagina,cadena,jxd,parametro){toppos=0; leftpos=0; cadena="ajax=1&"+cadena 
if (XMLuPagina!="") {
}if (pagina=="portada"){PortadaGo(); }RatAltura=25; aXMLuPagina=XMLuPagina; aXMLuCadena=XMLuCadena; aXMLuJxD=XMLuJxD; aXMLuParametro=XMLuParametro; XMLuPagina=pagina; XMLuCadena=cadena; XMLuJxD=jxd; XMLuParametro=parametro; if (!enProcesoXML&& http){jxdonde=jxd; if (parametro==1){
}if (parametro==2){}if (parametro==4){}if (JXTextCargando!=""){Cargar(); }var url = pagina + ".asp"; http.open("POST", url,true); http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=ISO-8859-1'); http.onreadystatechange = handleHttpResponseXML2; enProcesoXML= true; http.send(cadena); }}function handleHttpResponseXML2() {if (http.readyState == 4) {if (http.status == 200) {results =  http.responseText; XMLresultado=results; if (XMLresultado!=""){NoCargar(); Obj(jxdonde).innerHTML=XMLresultado; }enProcesoXML = false; if (typeof callback=="function"){callback(jxdonde); }}if (http.status == 500) {NoCargar(); enProcesoXML=false; }}}var IE = document.all?true:false; function On(c) {if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = ctrRatonRatonXY; Obj("VeCuadro").innerHTML= "<img src=\"" + c + "\" Border=0></left>"; }function ctrRatonRatonXY(e) {if (IE) { ctrRatonX = event.clientX + document.body.scrollLeft; ctrRatonY = event.clientY + document.body.scrollTop;  
}else {ctrRatonX = e.pageX; ctrRatonY = e.pageY; }; if (ctrRatonX < 0) {ctrRatonX = 0}; if (ctrRatonY < 0) {ctrRatonY = 0}; Obj("VeCuadro").style.top = ctrRatonY-100; Obj("VeCuadro").style.left = ctrRatonX-50; Obj("VeCuadro").style.filter="Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=50, FinishX=20%, FinishY=100%)"; Obj("VeCuadro").style.position= 'absolute'; return true }function Off() {Obj("VeCuadro").innerHTML= ""; }function Cargar() {if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = ctrDownDownXY; Obj("Cargar").innerHTML= "<img src=\"reloj.gif\" Border=0>"; }function Obj(name){return   document.getElementById(name);}function ctrDownDownXY(e) {if (IE) { ctrDownX = event.clientX + document.body.scrollLeft; ctrDownY = event.clientY + document.body.scrollTop; pagex= event.clientX; 
}else {ctrDownX = e.pageX; ctrDownY = e.pageY; pagex = e.pageX; }; if (ctrDownX < 0) {ctrDownX = 0}; if (ctrDownY < 0) {ctrDownY = 0}; 
Obj("Cargar").style.top = ctrDownY+RatAltura; Obj("Cargar").style.left = ctrDownX-1; Obj("Cargar").style.position= 'absolute'; return true }function NoCargar() {Obj("Cargar").innerHTML= ""; }function Atras(){if (aXMLuPagina!=""){xGet2(aXMLuPagina,aXMLuCadena,aXMLuJxD,aXMLuParametro); }}
function OverAtras(){if (Obj("btatras").style.visibility== 'visible'){Cargar(); Obj("Cargar").innerHTML=Bocadillo("Regresar a la","Página Anterior"); RatAltura=0; }}function OutAtras(){Obj("Cargar").innerHTML=""; RatAltura=25; }
function CheckPed(f){validarformu = 0; f.nif.style.border="1px solid #89A187"; f.nombre.style.border="1px solid #89A187"; f.direccion.style.border="1px solid #89A187"; f.provincia.style.backgroundColor="#EBE7E3"; f.localidad.style.border="1px solid #89A187"; f.direccion.style.border="1px solid #89A187"; f.codigopostal.style.border="1px solid #89A187"; f.telefono.style.border="1px solid #89A187"; f.mail.style.border="1px solid #89A187"; f.formapago.style.backgroundColor="#EBE7E3"; 
if (f.nif.value==""){f.nif.style.border=" 1px solid red";  validarformu = 1; }if (f.nombre.value==""){f.nombre.style.border=" 1px solid red"; validarformu = 1; }if (f.direccion.value==""){f.direccion.style.border=" 1px solid red";  validarformu = 1; }if (f.provincia.value=="0"){f.provincia.style.backgroundColor="red";  validarformu = 1; }if (f.localidad.value==""){f.localidad.style.border=" 1px solid red";  validarformu = 1; }if (f.direccion.value==""){f.direccion.style.border=" 1px solid red";  validarformu = 1; }if (f.codigopostal.value==""){f.codigopostal.style.border=" 1px solid red";  validarformu = 1; }if (f.telefono.value==""){f.telefono.style.border=" 1px solid red";  validarformu = 1; }if (f.mail.value==""){f.mail.style.border=" 1px solid red";  validarformu = 1; }if (f.formapago.value=="0"){f.formapago.style.backgroundColor="red"; validarformu = 1; }if (validarformu==0){xGet2("formcompra","envio=1&id=" + f.id.value + "&nif=" + f.nif.value + "&nombre=" + escape(f.nombre.value) + "&direccion=" + escape(f.direccion.value) + "&localidad=" + escape(f.localidad.value) + "&direccion=" + escape(f.direccion.value) + "&codigopostal=" + f.codigopostal.value + "&telefono=" + f.telefono.value + "&mail=" + f.mail.value + "&formapago=" + f.formapago.options[f.formapago.selectedIndex].value + "&provincia=" + f.provincia.options[f.provincia.selectedIndex].value,"centro",0); } else{return false; }}function CheckMail(f){validarformu = 0; Obj("nombre").style.border="1px solid #89A187"; Obj("mail").style.border="1px solid #89A187"; Obj("asunto").style.border="1px solid #89A187"; Obj("cuerpo").style.border="1px solid #89A187"; 
if (Obj("nombre").value==""){Obj("nombre").style.border=" 1px solid red"; validarformu = 1; }if (Obj("mail").value==""){Obj("mail").style.border=" 1px solid red"; validarformu = 1; }if (Obj("asunto").value==""){Obj("asunto").style.border=" 1px solid red";  validarformu = 1; }if (Obj("cuerpo").value==""){Obj("cuerpo").style.border=" 1px solid red";  validarformu = 1; }
if (validarformu==0){xGet2("contactar","envio=1&nombre=" + escape(Obj("nombre").value) + "&mail=" + Obj("mail").value + "&asunto=" +  escape(Obj("asunto").value) + "&cuerpo=" + escape(Obj("cuerpo").value) ,"centro",0); } else{return false; }}function Zoom(ima){Compatibilidad("ON"); Obj("xxcuadro").src="fotos/Grandes/" + ima; Obj("xxtable").style.visibility="visible"; if (window.innerHeight && window.scrollMaxY) {xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){   
xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; }var windowWidth, windowHeight; if (self.innerHeight) {windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) {  
windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { 
windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; }if(yScroll < windowHeight){pageHeight = windowHeight; } else { 
pageHeight = yScroll; }if(xScroll < windowWidth){pageWidth = windowWidth; } else {pageWidth = xScroll; }Obj("xx").className="Opa"; Obj("xx").style.height=pageHeight-3+"px"; Obj("xx").style.width =pageWidth-3+"px"; Obj("xx").style.className="Tran"; Obj("xx").style.top="0px"; Obj("xx").style.left="0px"; Obj("xx").style.position="absolute"; Obj("xx").style.zIndex="100"; Obj("xx").style.visibility="visible"; Movi(ima,leftpos,toppos); toppos=Math.floor(pageHeight/2); toppos=toppos-Math.floor((Obj("xxcuadro").height/2)); leftpos=Math.floor(pageWidth/2); leftpos=leftpos-Math.floor((Obj("xxcuadro").width/2)); document.onmousemove = ctrDownDownXY; var porat=0; porat=eval(ctrDownY-450); if (porat<0){porat=0;}Obj("xxtable").style.top=porat+ "px"; Obj("xxtable").style.left=leftpos+"px"; Obj("xxcuadro").style.zIndex="110"; if (IE) {}else{clearInterval(inter); MoviEje=false; }}function Movi(ima,l,t){if (MoviEje==false){inter=setInterval("Zoom('" + ima + "');",10); MoviEje=true; }var TempPos; var TempPos2; TempPos=Math.floor(pageWidth/2); TempPos=TempPos-Math.floor((Obj("xxcuadro").width/2)); TempPos2=Math.floor(pageHeight/2); TempPos2=TempPos2-Math.floor((Obj("xxcuadro").height/2)); if (l==TempPos&&t==TempPos2){clearInterval(inter); MoviEje=false; }}
function ZoomOff(){Compatibilidad("OFF"); clearInterval(inter); MoviEje=false; Obj("xx").style.height="1px"; Obj("xx").style.width ="1px"; Obj("xx").style.top="0px"; Obj("xx").style.left="0px"; Obj("xx").style.visibility="hidden"; Obj("xxcuadro").src="none.gif"; Obj("xxtable").style.top="0px"; Obj("xxtable").style.left="0px"; Obj("xxtable").style.visibility="hidden"; }function Compatibilidad(comstado){if (Obj("familias")){if (comstado=="ON"){Obj("Motivos").style.visibility="hidden"; Obj("familias").style.visibility="hidden"; Obj("Tamanos").style.visibility="hidden"; }else{Obj("Motivos").style.visibility="visible"; Obj("familias").style.visibility="visible"; Obj("Tamanos").style.visibility="visible"; }}}function Obj(ob){return document.getElementById(ob); }