// Cojido prestado de www.lukor.com muchas gracias ;)
//=====================================

// Evita frames
/*
if (top.location!= location) { 
top.location.href = document.location.href ; 
} 
*/
//=====================================

// Deshabilita botón derecho ratón
/*
isNN = document.layers ? 1 : 0; 

function noContext(){return false;}

function noClick(e){
    if(isNN){
        if(e.which > 1) {return false;}
    } else { 
        if(event.button > 1){return false;}
    }
}

if(isNN){ 
    document.captureEvents(Event.MOUSEDOWN);
}

document.oncontextmenu = noContext;
document.onmousedown   = noClick;
document.onmouseup     = noClick;
*/
//=====================================


// Deshabilita la selección de texto
/*
function disabletext(e){
return false
}

function reEnable(){
return true
}
*/
//if the browser is IE4+
/*
document.onselectstart=new Function ("return false")
*/
//if the browser is NS6
/*
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}
*/
//=====================================

// JavaScript Document
function precarrega(){
	arImageSrc = new Array (
			"../cat/img/inici1.jpg",
			"../img/IDIOMES.jpg",
			"../img/CAP.jpg",
        	"../cat/img/borros/NOSALTRES.gif",
	        "../cat/img/borros/FAQ.gif",
    	    "../cat/img/borros/FORUM.gif",
    	    "../cat/img/borros/CONTACTE.gif",
    	    "../cat/img/borros/RUTES.gif",
    	    "../cat/img/borros/RESERVES.gif",
			"../cat/img/borros/GALERIA.gif",
			"../cat/img/borros/LINKS.gif",
            "../cat/img/nitid/NOSALTRES.gif",
	        "../cat/img/nitid/FAQ.gif",
    	    "../cat/img/nitid/FORUM.gif",
    	    "../cat/img/nitid/CONTACTE.gif",
    	    "../cat/img/nitid/RUTES.gif",
    	    "../cat/img/nitid/RESERVES.gif",
			"../cat/img/nitid/GALERIA.gif",
			"../cat/img/nitid/LINKS.gif",
			"../cat/img/inici2.jpg",
			"../cat/img/inici3.jpg",
			"../cat/img/inici4.jpg"
            );

    	arImageList = new Array ();

	    for (counter in arImageSrc) {
	        arImageList[counter] = new Image();
        	arImageList[counter].src = arImageSrc[counter];
			
    	}
		//alert("ok");
}
function preprecarrega(){
	arImageSrc = new Array (
			"img/roundDreta.jpg",
			"img/centre.jpg",
			"img/roundEsquerra.jpg"
            );

    	arImageList = new Array ();

	    for (counter in arImageSrc) {
	        arImageList[counter] = new Image();
        	arImageList[counter].src = arImageSrc[counter];
			
    	}
		//alert("ok");
}
//prestat del gmail.com :D
function el(id) {
  if (document.getElementById) {
    return document.getElementById(id);
  } else if (window[id]) {
    return window[id];
  }
  return null;
}
function updateTemps(){
	if (contado!=0) {
		contado--;
		temps.innerHTML = contado;
		setTimeout(updateTemps,750);
	}
	else setTimeout( "window.location.href = http://fotovivaonline.tomatomate.net/cat/index.htm", 100);
}


/*peliculeta */
/*	var feta = false;
	var temps_desplaglament = 6.0;
	function pelicula() {
		if (!feta){
			feta = true;
			timeResize('menu',200,51,temps_desplaglament);
			setTimeout("peliculaChain()",temps_desplaglament*1000);
		}
	}
	var fets = 100;
	function peliculaChain(){
			if (fets<=0){
				var canvi = "http://www.fotovivaonline.com/cat/index.htm";
				window.location.replace( canvi );;
			}
			else {			
				if (document.all) document.all['esquerra'].filters.alpha.opacity=fets;
				if (document.all) document.all['dreta'].filters.alpha.opacity=fets;
				if (document.all) document.all['menu'].filters.alpha.opacity=fets;
				fets-=10;
				setTimeout("peliculaChain()",100);
		}
	}
*/	
/* Imatges Galeria */

function imatge(galeria,foto,comentari)
{
myElement = document.getElementById("imatgeGaleria");
myElement2 = document.getElementById("imatgeComentari");
if(myElement != null)
{
var hilfe = "<img src=\"../img/"+galeria+"/"+foto+".jpg\" />";
myElement.innerHTML=hilfe;
}
if(myElement2 != null)
{
hilfe = comentari;
myElement2.innerHTML=hilfe;
}
}
function largo() {
	
//	alert("La lies");
	setTimeout("largo2();",5000);	
	
}
function largo2() {
	
	alert("La lies2");
	

}

/*	//window.location.href = "http://www.fotovivaonline.com/cat/index.htm";*/