// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

	var width,height;
	if (self.innerHeight) // all except Explorer
			{
				width = self.innerWidth;
				height = self.innerHeight;
			}
			else if (document.documentElement && document.documentElement.clientHeight)
				// Explorer 6 Strict Mode
			{
				width = document.documentElement.clientWidth;
				height = document.documentElement.clientHeight;
			}
			else if (document.body) // other Explorers
			{
				width = document.body.clientWidth;
				height = document.body.clientHeight;
	}
	widthQS = (width-760)/2;
	heightQS = (height -440)/2;
	//document.write (widthQS);
	//document.write (heightQS);
	
//-->
//capa mamma pel fons total. Capa web centra la caixa
 document.write ('<style type="text/css">');
  document.write ('#web { position:absolute; left:'+widthQS+'px; top: 8px ;width:750px; height:420; z-index:2;}')
  document.write ('#fonsDret{ position:absolute; left:27px; top:39px; width:'+((width+7)/2)+'px; height:283px; z-index:5; background-color: #C4CA97; layer-background-color: #C4CA97; border: 1px none #000000;overflow:hidden}')
  document.write ('</style>');
 
 function posaelpeu() { 
	var myWidth = 0, myHeight = 0; 
	var width,height;
		if (document.all) { 
		myWidth=document.body.clientWidth; 
		myHeight=document.body.clientHeight } 
		else if (document.getElementById && !document.all) { 
		myWidth=window.innerWidth; 
		myHeight=window.innerHeight } 
					
		widtPeu = (myWidth);
		heightPeu = (myHeight-20);
		var agt=navigator.userAgent.toLowerCase();
		if (agt.indexOf("msie") != -1) {//return 'Internet Explorer';
		document.write ('<style type="text/css">.estilopeu { position:absolute; left:0px;width:'+widtPeu+'px; height:64; z-index:20; background-image:url(imatge/fonsPeu.gif); }</style>');
		} else{
		widthard = (myWidth-30);
		document.write ('<style type="text/css">.estilopeu { position:absolute; left:0px;width:'+widtPeu+'-40px; height:64; z-index:20; background-image:url(imatge/fonsPeu.gif); }</style>');
			}	
		}