cosPagina=document.getElementById("cosPaginaCapa");ampladaPagina=document.getElementById("ampladaPaginaCapa");if(document.getElementById("cosPaginaCapa").offsetHeight<screen.height){document.getElementById("cosPaginaCapa").style.height=screen.height+"px";};dadesFinestra={indexAlfa:'foto' , titul:'Els Portas a la seva botiga de Serinyà', amplada:850, desplazarScroll:true, tagObjecteCarregarO_false:'IMG' };function obraFinestra(objecte){tap.style.width="100%";tap.style.height=document.body.offsetHeight+25 + "px";finestra.style.visibility="visible";finestra.style.width=objecte.amplada+"px";finestra.style.top="10px"; ;if (document.all){tap.style.filter='alpha(opacity=0)';}else{tap.style.opacity=0;} ;fade(tap.id,true);var tmp='<strong   style="  color:#000000; margin-left:25px ">'+objecte.titul+'</strong>';tmp+='<input type="button"  value="&#9747;" style="float:right; padding:0px; margin:0px;border:1px solid #AAAAAA;border-radius:5px;-moz-border-radius:5px;cursor:pointer;background-color:#FFFFFF" onclick="tancaFinestra()">';tmp+='<div align="center" style="clear:right; color:#000000; padding:5px; margin-top:5px; padding-bottom:10px"><table border=0 cellspacing=0 cellpadding=0 ><tr><td style="background-color:#FFFFFF;background-image: url(loading.gif);background-position: center center;background-repeat:  no-repeat;border:1px solid #AAAAAA">'+contingutFinestra[objecte.indexAlfa]+'</td></tr></table></div>';tmp+='<div align="center"><input type="button"  value=" tancar " style=" padding:0px;background-color:#FFFFFF;border:1px solid #AAAAAA;border-radius:5px;-moz-border-radius:5px;cursor:pointer " onclick="tancaFinestra()"></div>';finestra.innerHTML=tmp;finestra.style.left=(tap.offsetWidth/2+tap.offsetLeft-finestra.offsetWidth/2)+"px";tap.style.zIndex=9;finestra.style.zIndex=10;if (objecte.desplazarScroll){scrollZero=(document.documentElement.scrollTop==0)?document.body.scrollTop :document.documentElement.scrollTop;finestra.style.top=scrollZero+10+"px";finestra.style.position="absolute";}else{finestra.style.position="fixed";tmp=Math.max(parseInt((document.documentElement.clientHeight-finestra.offsetHeight)/3),0);finestra.style.top=tmp+"px";};if (objecte.tagObjecteCarregarO_false){tmpObjecte=finestra.getElementsByTagName(objecte.tagObjecteCarregarO_false)[0];if (document.all){tmpObjecte.style.filter='alpha(opacity=0)';}else{tmpObjecte.style.opacity=0;};tmpObjecte.id="id"+ new Date().getTime();tmpObjecte.onload=function(){fade(this.id,true)};};fade(logo.id,false);};function tancaFinestra(){retard=fade(tap.id,false);setTimeout('tap.style.width= "0px";tap.style.height="0px";fade(logo.id,true)',retard);finestra.style.visibility="hidden";};function inicialitza(){logo=document.getElementById("suportLogoCapa");setTimeout('logo.style.backgroundImage=""',600);tap=document.createElement("IMG");tap.id="tapId";tap.src="transparent.png";tap.setAttribute("style","position:absolute;width:0px; height:0px;top:0px;left:0px;z-index:100");document.body.appendChild(tap);finestra=document.createElement("div");finestra.setAttribute("style","position:fixed;;background-color:#FFFFFF;visibility:hidden; padding:5px;border:1px none #AAAAAA;border-radius:5px;-moz-border-radius:5px;");cosPagina.parentNode.insertBefore(finestra,cosPagina);;};function fade(objecteId,mostrar){var  valorTimeout = 20;var valorVelocitat = 8;var i=0;if (mostrar){valor = 0;valorFinal=100;}else{valor = 100;valorFinal=0;};while (Math.round(valor)!=valorFinal){i++;valor=valor-(valor-valorFinal)/valorVelocitat;if (document.all){setTimeout ("document.getElementById('"+objecteId+"').style.filter='alpha(opacity="+Math.round(valor)+")'",valorTimeout*i);}else{setTimeout ("document.getElementById('"+objecteId+"').style.opacity="+Math.round(valor)/100,valorTimeout*i);};};return valorTimeout*i ;};window.onload=function(){inicialitza();};contingutFinestra=new Array();contingutFinestra['situacio']='<iframe allowtransparency=true width=450px height=350 frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=situacio/index.htm style=\'border:1px solid #CCCCCC\'></iframe>';contingutFinestra['elTemps']='<iframe allowtransparency=true width=400px height=120 frameborder=0 scrolling=no marginheight=0 marginwidth=0 src="elTemps.htm"></iframe>';contingutFinestra['foto']='<img src="fotos/botiga-gran.jpg" width="800" height="500">';contingutFinestra['targeta']='<img src="fotos/targeta.jpg" width="400" height="210">';

