function veure(id){
	obj = document.getElementById(id);
	if( obj.className == 'nv' ){ obj.className = 'v'; }else{ obj.className = 'nv'; }
}

function galeria(id,path){
	obj = document.getElementById(id);
	obj.innerHTML = '<img src="'+ path +'" class="imatgeMostra" />';
}

function aleatorio(inferior,superior){ 
	numPosibilidades = superior - inferior ;
    aleat = Math.random() * numPosibilidades ;
	aleat = Math.round(aleat) ;
	return parseInt(inferior) + aleat ;
}

function alternarBanner(){
	// Només executem si banners és diferent a false, el que indica que conté mínim 1 banner
	if (banners!=false){
		ob = document.getElementById('bannerPrincipal');
		for(x=0;x<banners.length;x++){
			if( ob.src.indexOf(banners[x]) > -1){
				if( (x+1) == banners.length ){x=0;}else{x++;}
				ob.src = "img/ban/" + banners[x];
			}
		}
	}
	
}
