var ventana=null;function abrir(a,b){ventana=open(a,"",b)}function expandir(a){nombreDivNodo="capaHijos"+a;a=eval('document.getElementById("'+nombreDivNodo+'")');a.style.display="none"==a.style.display?"block":"none"}var segundos=4,dire="",imagenes=[],iex="Microsoft Internet Explorer"==navigator.appName?!0:!1,fi=iex?"filters.alpha.opacity":"style.MozOpacity",opa=iex?100:1;""!=dire&&"/"!=dire.charAt(dire.length-1)&&(dire+="/");var preImagenes=[];
for(pre=0;pre<imagenes.length;pre++)preImagenes[pre]=new Image,preImagenes[pre].src=dire+imagenes[pre];cont=0;var tiempo,moduloaleatorio;function presImagen(){eval("document.foto"+moduloaleatorio+".src = prueba");subeOpacidad();cont<imagenes.length-1?cont++:cont=0;tiempo=window.setTimeout("bajaOpacidad()",1E3*segundos)}function bajaOpacidad(){eval(opa);0<=opa?(cambia(),opa-=iex?10:0.1,setTimeout("bajaOpacidad()",10)):presImagen()}
function subeOpacidad(){opaci=iex?100:1;opa<=opaci&&(cambia(),opa+=iex?10:0.1,setTimeout("subeOpacidad()",10))}function cambia(){eval("document.foto"+moduloaleatorio+"."+fi+" = opa")}
function inicioOpacity(a){moduloaleatorio=a;var b=0;eval("document.foto"+a+".src");var c=eval("document.foto1"+a+".src"),d=eval("document.foto2"+a+".src"),e=eval("document.foto3"+a+".src"),a=eval("document.foto4"+a+".src"),f=c.substring(c.lastIndexOf("/"),c.Length),g=d.substring(d.lastIndexOf("/"),d.Length),h=e.substring(e.lastIndexOf("/"),e.Length),i=a.substring(a.lastIndexOf("/"),a.Length);"/prueba"!=f&&(imagenes[b]=c,b+=1);"/prueba"!=g&&(imagenes[b]=d,b+=1);"/prueba"!=h&&(imagenes[b]=e,b+=1);"/prueba"!=
i&&(imagenes[b]=a);clearTimeout(tiempo);bajaOpacidad()}var segundos2=4,dire2="",imagenes2=[],iex2="Microsoft Internet Explorer"==navigator.appName?!0:!1,fi2=iex2?"filters.alpha.opacity":"style.MozOpacity",opa2=iex2?100:1;""!=dire2&&"/"!=dire2.charAt(dire2.length-1)&&(dire2+="/");var preImagenes2=[];for(pre2=0;pre2<imagenes2.length;pre2++)preImagenes2[pre2]=new Image,preImagenes2[pre2].src=dire2+imagenes2[pre2];cont2=0;var tiempo2,moduloaleatorio2;
function presImagen2(){eval("document.foto"+moduloaleatorio2+".src = prueba2");subeOpacidad2();cont2<imagenes2.length-1?cont2++:cont2=0;tiempo2=window.setTimeout("bajaOpacidad2()",1E3*segundos2)}function bajaOpacidad2(){eval(opa2);0<=opa2?(cambia2(),opa2-=iex2?10:0.1,setTimeout("bajaOpacidad2()",10)):presImagen2()}function subeOpacidad2(){opaci2=iex2?100:1;opa2<=opaci2&&(cambia2(),opa2+=iex2?10:0.1,setTimeout("subeOpacidad2()",10))}
function cambia2(){eval("document.foto"+moduloaleatorio2+"."+fi2+" = opa2")}
function inicioOpacity2(a){moduloaleatorio2=a;var b=0;eval("document.foto"+a+".src");var c=eval("document.foto1"+a+".src"),d=eval("document.foto2"+a+".src"),e=eval("document.foto3"+a+".src"),a=eval("document.foto4"+a+".src"),f=c.substring(c.lastIndexOf("/"),c.Length),g=d.substring(d.lastIndexOf("/"),d.Length),h=e.substring(e.lastIndexOf("/"),e.Length),i=a.substring(a.lastIndexOf("/"),a.Length);"/prueba"!=f&&(imagenes2[b]=c,b+=1);"/prueba"!=g&&(imagenes2[b]=d,b+=1);"/prueba"!=h&&(imagenes2[b]=e,b+=
1);"/prueba"!=i&&(imagenes2[b]=a);clearTimeout(tiempo2);bajaOpacidad2()}var segundos3=4,dire3="",imagenes3=[],iex3="Microsoft Internet Explorer"==navigator.appName?!0:!1,fi3=iex3?"filters.alpha.opacity":"style.MozOpacity",opa3=iex3?100:1;""!=dire3&&"/"!=dire3.charAt(dire3.length-1)&&(dire3+="/");var preImagenes3=[];for(pre3=0;pre3<imagenes3.length;pre3++)preImagenes3[pre3]=new Image,preImagenes3[pre3].src=dire3+imagenes3[pre3];cont3=0;var tiempo3,moduloaleatorio3;
function presImagen3(){eval("document.foto"+moduloaleatorio3+".src = prueba3");subeOpacidad3();cont3<imagenes3.length-1?cont3++:cont3=0;tiempo3=window.setTimeout("bajaOpacidad3()",1E3*segundos3)}function bajaOpacidad3(){eval(opa3);0<=opa3?(cambia3(),opa3-=iex?10:0.1,setTimeout("bajaOpacidad3()",10)):presImagen3()}function subeOpacidad3(){opaci3=iex3?100:1;opa3<=opaci3&&(cambia3(),opa3+=iex3?10:0.1,setTimeout("subeOpacidad3()",10))}
function cambia3(){eval("document.foto"+moduloaleatorio3+"."+fi3+" = opa3")}
function inicioOpacity3(a){moduloaleatorio3=a;var b=0;eval("document.foto"+a+".src");var c=eval("document.foto1"+a+".src"),d=eval("document.foto2"+a+".src"),e=eval("document.foto3"+a+".src"),a=eval("document.foto4"+a+".src"),f=c.substring(c.lastIndexOf("/"),c.Length),g=d.substring(d.lastIndexOf("/"),d.Length),h=e.substring(e.lastIndexOf("/"),e.Length),i=a.substring(a.lastIndexOf("/"),a.Length);"/prueba"!=f&&(imagenes3[b]=c,b+=1);"/prueba"!=g&&(imagenes3[b]=d,b+=1);"/prueba"!=h&&(imagenes3[b]=e,b+=
1);"/prueba"!=i&&(imagenes3[b]=a);clearTimeout(tiempo3);bajaOpacidad3()}function borrarPrecios(){document.getElementById("ctrlShopPresupuesto_txtCosteTotal").innerText="";document.getElementById("ctrlShopPresupuesto_txtClichesMarcaje").innerText="";document.getElementById("ctrlShopPresupuesto_txtCosteUnitario").innerText=""}function cambiarPF(a){a=document.getElementById(a);a.style.display=""==a.style.display?"none":""}
function cambiaColor(){document.getElementById("Encabezado_hyperMenuMiCesta").style.color="#013E8B"}
function checkNSS(a){a=tratarNIFCIF(a);if(checkCIF(a))return!0;if(10<a.length)return confirm("La longitud de su NIF o CIF son incorrectos, desea continuar?")?!0:!1;if(/^[X]/.test(a)){var b=a.substr(1,8);posicion=b%23;letra="TRWAGMYFPDXBNJZSQVHLCKET".substring(posicion,posicion+1);if(/^[A-Za-z0-9]{9}$/.test(a)){if(b=a.substr(1,7),posicion=b%23,letra="TRWAGMYFPDXBNJZSQVHLCKET".charAt(posicion),a=a.charAt(8),letra!=a)return confirm("El NIE es incorrecto, desea continuar?")?!0:!1}else return confirm("El NIE es incorrecto, desea continuar?")?
!0:!1}else return confirm("El NIF o CIF es incorrecto, desea continuar?")?!0:!1}function tratarNIFCIF(a){a=a.toUpperCase();a=a.replace(" ","");a=a.replace("/","");a=a.replace("-","");return a.replace(".","")}
function checkCIF(a){var b=temp=0,c=[0,2,4,6,8,1,3,5,7,9],a=a.toUpperCase();if(checkNIF(a))return!0;if(/^[A-Za-z0-9]{9}$/.test(a)&&/^[ABCDEFGHKLMNPQS]/.test(a)){for(b=2;6>=b;b+=2)temp+=c[parseInt(a.substr(b-1,1))],temp+=parseInt(a.substr(b,1));temp+=c[parseInt(a.substr(7,1))];temp=10-temp%10;return 10==temp&&("J"==a.charAt(a.length-1)||0==a.charAt(a.length-1))?!0:a.charAt(a.length-1)==temp||a.charAt(a.length-1)==String.fromCharCode(64+temp)?!0:!1}return!1}
function checkNIF(a){return!a?!1:9!=a.length?!1:(letra=a.substr(8,1),letra=letra.toUpperCase(),dni=a.substr(0,8),dni=dni.toUpperCase(),dni=dni.replace("X","0"),dni-=23*parseInt(dni/23),"TRWAGMYFPDXBNJZSQVHLCKE".charAt(dni)!=letra?!1:!0)};
