	var SWFVisor;


	function thisMovie(movieName) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName]
		}
		else {
			return document[movieName]
		}
	}


	function anterior() {
		//thisMovie('customRightClick').frameanterior();
		
		SWFVisor.frameanterior();
		document.getElementById('Contingut').scrollTop=0;
		actualitzarPagina();
	}


	function seguent() {
		//thisMovie('customRightClick').frameseguent();
		
		SWFVisor.frameseguent();
		document.getElementById('Contingut').scrollTop=0;
		actualitzarPagina();
	}

	function carregat(pagines) {
		SWFVisor=document.all?document.getElementById('customRightClickIE'):document.getElementById('customRightClick');
		document.getElementById('SPagines').innerHTML=pagines;
		//alert(document.getElementById('customRightClick'));
		tamanypeli();
		//actualitzarPagina();
	}

	function actualitzarPagina() {
		//document.getElementById('SPagines').innerHTML=document.getElementById('customRightClick').paginaNum()+"/"+document.getElementById('customRightClick').paginesNum();
		
		document.getElementById('SPagines').innerHTML=SWFVisor.paginaNum()+"/"+SWFVisor.paginesNum();
	}




	function tamanypeli() { 
		//document.getElementById('customRightClick').width=document.body.clientWidth;
		//document.getElementById('customRightClick').height=document.body.clientWidth/PeliAmple*PeliAlt;
		
		var CapAmple=317;
		var CapAlt=70;
		
		SWFCap=document.all?document.getElementById('capceleraportaveuIE'):document.getElementById('capceleraportaveu');
		if (SWFCap)
		{
			SWFCap.width=CapAmple;
			SWFCap.height=CapAlt;
			//SWFCap.width=document.getElementById('Contingut').offsetWidth;
			//SWFCap.height=document.getElementById('Contingut').offsetWidth/CapAmple*CapAlt;
		}
		
		
		SWFVisor.width=document.getElementById('Contingut').offsetWidth;
		SWFVisor.height=document.getElementById('Contingut').offsetWidth/PeliAmple*PeliAlt;
	}


	window.onresize=tamanypeli; 


	var PeliAmple=419;
	var PeliAlt=595;
	var NomPeli='prova.swf';
	swfobject.registerObject("capceleraportaveu", "9.0.124.0", "expressInstall.swf");
	swfobject.registerObject("customRightClick", "9.0.124.0", "expressInstall.swf");

