function maximitzarFinestra()
{
	try{
			window.moveTo(0,0);
			window.resizeTo(screen.availWidth+4,screen.availHeight+4);
	}catch(e){
		//alert('Error en maximitzar');
	}
}



//1.-MÉS QUE REDIMENSIONAR, CENTRA EL "TOT" EN HORITZONTAL I VERICAL
//PERO CONSERVEM EL NOM redimensionarFinestra PER IGUALAR AMB ALTRES WEBS
//2.-A MÉS, SI ESTEM A 800x600, elimina el filet exterior GRIS canviant de CLASS
//la TABLE contenidora de tot

function redimensionarFinestra()
{
	var myWidth = 0, myHeight = 0;
	var alcadaZona1;
	var tam1, tam2;
	var alcadaMarcaAigua;

		
	//Codi extret de la web per calcular amplada i alçada de la zona on es presentaran
	//les dades dins el navegador.
	  if( typeof( window.innerWidth ) == 'number' ) {
		//No Internet Explorer (Non-IE)
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement &&
		  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }

	try
	{

		//PRIMER, MIREM SI ESTEM A 800x600.
		//SI ESTEM A 800X600, CANVIEM LA CLASS DE LA "TableContenidoraDeTot"
		//PERQUE NO TINGUI FILET GRIS ENVOLVENT.
		if ((screen.width<=800)||(screen.height<=600)) {
			document.getElementById('idTableContenidoraDeTot').className=document.getElementById('idTableContenidoraDeTot').className+'SenseFilet';
		}

		//A CONTINUACIÓ, CENTREM EL "TOT" HORITZONTAL I VERICALMENT
		//UTILITZANT ELS MARGES SUPERIOR I INFERIOR DE LA DIV idDivContenidoraDeTot

		var nouMargeSuperior = Math.max(0,(myHeight - document.getElementById("idTableContenidoraDeTot").scrollHeight) / 2);
		var nouMargeEsquerra = Math.max(0,(myWidth - document.getElementById("idTableContenidoraDeTot").scrollWidth) / 2);

		document.getElementById("idDivContenidoraDeTot").style.paddingTop=nouMargeSuperior+'px';

		if( typeof( window.innerWidth ) == 'number' ) {
			//No Internet Explorer (Non-IE), ja que IE ja centra OK amb els CSS, i així no ho fa:
			document.getElementById("idDivContenidoraDeTot").style.paddingLeft=nouMargeEsquerra+'px';
		}
	}
	catch(errorinfo)
	{
		//alert("Error en redimensionar."+errorinfo.message+','+errorinfo.name);
	}
}

function ensenyahoTot(){
	document.getElementById("divHideAll").className='divShowAll';
}



function centrarElementsVersioAccessible(){
  if( typeof( window.innerWidth ) == 'number' ) {
	//No Internet Explorer (Non-IE)
     if (screen.width>800) {
	document.getElementById("tableZonaCmenuN1accesible").className='tableZonaCmenuN1accesible_NOiExplorerA1024';
     }
  }
}


