	function check_pw() {
		if (document.getElementById("clau").value==document.getElementById("clau2").value) {
			return true;
		} else {
			alert("Atenció, la contrasenya que has introduït difereix en els dos valors. Repassa-ho i torna-ho a intentar.");
			return false;
		}
	}

	function pinta_roda(){
		document.getElementById("contingut_temporal").innerHTML="<br><br><center><img src='img/indicator.gif'><br><i>Carregant dades...</i></center>";
		
	}

	function obrir_temporal() {
   		styleObj=document.getElementById("contingut_temporal").style;
		styleObj.display='';
   		styleObj=document.getElementById("contingut_dinamic").style;
		styleObj.display='none';
		timerId = setTimeout("pinta_roda()", 750);
	}

	function tancar_temporal() {
		styleObj=document.getElementById("contingut_temporal").style;
		styleObj.display='none';
		styleObj=document.getElementById("contingut_dinamic").style;
		styleObj.display='';
		clearTimeout(timerId);
	}


	<!-- // 
	
	//check if browser is capable, NS3+, IE4+ 
	
	if (document.images) { 
		//preload images 
		//base image 
		img1N= new Image(360,84); 
		img2N= new Image(360,84); 
		img3N= new Image(360,84); 
		img1N.src= '/img/llegeix.png' ; 
		img2N.src= '/img/llegeix.png' ; 
		img3N.src= '/img/llegeix.png' ; 
	
		//hover or rollover image 
		img1H= new Image(360,84); 
		img2H= new Image(360,84); 
		img3H= new Image(360,84); 
		img1H.src= '/img/llegeix_hover.png' ; 
		img2H.src= '/img/llegeix_hover.png' ; 
		img3H.src= '/img/llegeix_hover.png' ; 
	
		function myOn(myImgName) { 
			//we need to name the image in the BODY 
			//so we can use its name here 
			document[myImgName].src=eval(myImgName+ 'H' ).src; 
		} 
	
		function myOut(myImgName) { 
			document[myImgName].src=eval(myImgName+ 'N' ).src; 
		} 
	
	} //end of if document.images 
	

$(document).ready(function(){
	 $(function() {
	 	    $(window).scroll(function(){
		    		var distanceTop = $('#inicislide').offset().top - $(window).height();
					 
					 		if  ($(window).scrollTop() > distanceTop)
									    $('#slidebox').animate({'right':'10px'},300);
									    		else
													    $('#slidebox').stop(true).animate({'right':'-430px'},100);
													    	    });
														    	 
															 	    $('#slidebox .close').bind('click',function(){
																    		$(this).parent().remove();
																			    });
																			    	});
});


	//-->


