function aleatorioEntero(a,b){numPosibilidades=b-a;aleat=Math.random()*numPosibilidades;aleat=Math.round(aleat);return parseInt(a)+aleat}function aleatorio(a,b){numPosibilidades=b-a;aleat=Math.random()*numPosibilidades;return parseInt(a)+aleat}var running=false;var actual=0;var total=3;function rotar(){var a=0;if(running==true){for(a=0;a<total;a++){document.getElementById("IMGMueble"+a).style.visibility="hidden"}document.getElementById("IMGMueble"+actual).style.visibility="visible";if(actual==(total-1)){actual=0}else{actual=actual+1}setTimeout("rotar()",5000)}}function $class(d){var c,e=new Array();var b=document.getElementsByTagName("*");var f=0;for(c=0;c<b.length;c++){var a=b.item(c).className.split(" ");for(j=0;j<a.length;j++){if(a[j]==d){f=1}}if(f==1){e.push(b.item(c));f=0}}return e}function fotogaleryON(){var a;var y;var M=0;function J(U){if(M!=0){clearTimeout(M)}a=new Date();y=U;h()}function h(){fecha2=new Date();oldValue=parseFloat(document.getElementById("Atras").style.opacity.replace(",","."));var U=fecha2.getTime()-a.getTime();if(U>=1000){q(y);M=0}else{if(y==0){var V;V=1-U/1000;if(V<=0){M=0;q(0)}else{if(V<oldValue){q(V)}M=setTimeout(function(){h()},10)}}else{if(y==1){var V;V=U/1000;if(V>=1){M=0;q(1)}else{if(V>oldValue){q(V)}M=setTimeout(function(){h()},10)}}}}}function q(U){document.getElementById("Zoom").style.opacity=U;document.getElementById("Siguiente").style.opacity=U;document.getElementById("Atras").style.opacity=U;document.getElementById("Zoom").style.filter="alpha(opacity="+(U*100)+")";document.getElementById("Siguiente").style.filter="alpha(opacity="+(U*100)+")";document.getElementById("Atras").style.filter="alpha(opacity="+(U*100)+")"}var O;var B=0;var g=0;var x=0;var H=1;var k=0;function Q(V){document.getElementById(L).getElementsByTagName("a")[f].className="";f=parseInt(V);document.getElementById(L).getElementsByTagName("a")[f].className=" current";var Z;var Y;var U=$class(s);Y=U[f].href;var X;var W=$class("Grupo");X=W[f].getElementsByTagName("img")[0];X.src=Y;var aa=/theSprite/;if(aa.test(X.className)){X.className="imGaleria"}if(f==0){Z=A-1}else{Z=f-1}Y=U[Z].href;document.getElementById("ImgAtras").src="/img/Musan-Cargando.gif";document.getElementById("ImgAtras").src=Y;if(f==A-1){Z=0}else{Z=f+1}Y=U[Z].href;document.getElementById("ImgSiguiente").src="/img/Musan-Cargando.gif";document.getElementById("ImgSiguiente").src=Y;b(V)}function b(U){if(x!=0){clearTimeout(x)}O=new Date();if(H==1){B=g}else{B=k}g=U;if(B!=g){m()}}function m(){m_fecha2=new Date();m_res=m_fecha2.getTime()-O.getTime();if(m_res>=1000){p.style.left="-"+g+"00%";k=g;H=1}else{calculo=(m_res*100)/1000;calculo2=(g-B);calculo3=(B*-100)-(calculo*calculo2);k=calculo3/-100;H=0;p.style.left=calculo3+"%";x=setTimeout(function(){m()},10)}}if($check_dom(document.getElementById("FotoGaleria"))){var z=document.getElementById("FotoGaleria");var N;N=document.createElement("div");N.innerHTML="<div id='Atras' class='Actions'><img id='ImgAtras' width='100%' height='100%'  alt='Imagen anterior' src='/img/Musan-Cargando.gif'/><br/>Anterior</div>";z.appendChild(N);N=document.createElement("div");N.innerHTML="<div id='Zoom' class='Actions'><img id='ImgZoom' width='100%' height='100%'  alt='Ampliar imagen' src='/img/zoom.gif'/><br/>Zoom</div>";z.appendChild(N);N=document.createElement("div");N.innerHTML="<div id='Siguiente' class='Actions'><img id='ImgSiguiente' width='100%' height='100%'  alt='Imagen siguiente' src='/img/Musan-Cargando.gif'/><br/>Siguiente</div>";z.appendChild(N);N=document.createElement("div");N.innerHTML="<div id='ZoomDIV'><div id='ZoomDIVclosing'><img id='ZoomDIVclosingIMG' width='100%'  alt='Cerrar ampliación' src='/img/cerrar.gif'/></div><div id='ZoomDIVtitle'>Fotogalería de imagenes ampliada</div><div id='ZoomDIVcontent'><center><div id='ZoomDIVGalery'></div></center></div></div>";document.getElementById("Contenedor").appendChild(N);var v=$class("theSprite");for(i=0;i<v.length;i++){var G=v[i].className.split("@");if(G.length==4){var t=(-G[1]+1)*100;v[i].style.left=t+"%";t=(-G[2]+1)*100;v[i].style.top=t+"%"}}var L=z.id+"Lista";var P;P=z.getElementsByTagName("li");var F=$class("skip").length+3;var A=z.getElementsByTagName("img").length-F;var p=document.getElementById("theScroll");var l=z.style.width.replace("em","");var d=(l)*(A+1);document.getElementById("theScroll").style.width=d+"em";var s="Mediana";var E="";var R=0;var u=0;var n=0;var T=0;for(i=0;i<P.length;i++){if(P[i].className=="Titulo"){if(R==0){E+="<div>"+P[i].id+"</div><div><ul id='#st"+(u)+"'>";R=1;u++;T=n;n=0}else{E+="</ul></div><div>"+P[i].id+"</div><div><ul id='#st"+(u)+"'>";R=1;u++;T+=n;n=0}}else{if(R==0){E+="<div><ul id='#st"+(u)+"'>";R=1;u++;T+=n;n=0}n++;E+="<li><a title='"+P[i].getElementsByTagName("img")[0].alt+"' href='#' id='"+(n+T-1)+"'>"+(n)+"</a></li>"}}if(R==1){E+="</ul></div>"}document.getElementById(L).innerHTML=E;function D(){Q(this.id)}var f=0;var K=document.getElementById(L).getElementsByTagName("a");for(i=0;i<K.length;i++){K.item(i).onclick=D}var r=0;function w(){if(r==0){J(1);r=1}}function C(){if(r==1){J(0);r=0}}var s="Mediana";var S="/img/Musan-Cargando.gif";function c(){s="Mediana";document.getElementById("Contenido").appendChild(document.getElementById("FotoGaleria"));document.getElementById("FotoGaleria").className="";document.getElementById("ZoomDIV").style.visibility="hidden"}function e(){s="Grande";document.getElementById("ZoomDIVGalery").appendChild(document.getElementById("FotoGaleria"));document.getElementById("FotoGaleria").className="Zoomed";document.getElementById("ZoomDIV").style.visibility="visible";Q(f)}function I(){if(f==0){Q(A-1)}else{Q(f-1)}}function o(){if(f==A-1){Q(0)}else{Q(f+1)}}C();Q(0);document.getElementById("FotoGaleria").onmouseover=w;document.getElementById("FotoGaleria").onmouseout=C;document.getElementById("ZoomDIVclosingIMG").onclick=c;document.getElementById("Zoom").onclick=e;document.getElementById("Atras").onclick=I;document.getElementById("Siguiente").onclick=o}}function resize(){if(running==false){running=true;fotogaleryON();window.onresize=resize;rotar()}var e=840;var b=640;var a;var d;var c;var f;if(this.document.body){d=(document.documentElement.clientWidth);a=(document.documentElement.clientHeight);c=d/e;f=a/b}else{d=(window.innerWidth);a=(window.innerHeight);c=d/e;f=a/b}if(isNaN(c)==0&isNaN(f)==0){if(c<=f){cuenta=d/e*b;document.getElementById("Contenedor").style.left="0px";document.getElementById("Contenedor").style.top=((a-cuenta)/2)+"px";window.document.body.style.fontSize=(c*100)+"%"}else{cuenta=a*e/b;document.getElementById("Contenedor").style.left=((d-cuenta)/2)+"px";document.getElementById("Contenedor").style.top="0px";window.document.body.style.fontSize=(f*100)+"%"}}if(82>(f*100)){window.document.body.style.fontSize="100%";document.getElementById("Contenedor").style.left="0px";document.getElementById("Contenedor").style.top="0px";document.getElementById("Contenedor").style.width="840";document.getElementById("Contenedor").style.height="640"}document.getElementById("Contenedor").style.visibility="visible";window.document.body.style.backgroundImage="none"}window.onload=resize;var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-11554363-1"]);_gaq.push["_setDomainName","www.e-musan.com"];_gaq.push(["_trackPageview"]);(function(){var b=document.createElement("script");b.type="text/javascript";b.async=true;b.src="/js/ga.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a)})();function showfoot(){if(self.screen){width=screen.width;height=screen.height}else{if(self.java){var b=java.awt.Toolkit.getDefaultToolkit();var c=b.getScreenSize();width=c.width;height=c.height}else{width=height="?"}}document.write("Resolución: "+width+" x "+height);var a=$class("Redes");for(i=0;i<a.length;i++){var d=a[i].className.split("@");if(d.length==4){a[i].style.top=d[1]+"%";a[i].style.left=d[2]+"%"}}}function $check_dom(a){if(a!=null){if(a.nodeType&&a.nodeType==1){return true}else{return false}}};
