/* #################
##### SCRIPTS ######
################# */

/* ###### TRANSICIÓ DE COLOR ###### */

	color=1;
	function transicio_color2() {
		document.getElementById("transicio").style.color="rgb(" + color + "," + color + "," + color + ")";
		color+=2;
		if (color<233) setTimeout('transicio_color()', 10);
	}
	color1=255;
	color2=255;
	color=255;
    repeticio=0;
	function transicio_color() {
		document.getElementById("transicio").style.color="rgb(" + color + "," + color + "," + color + ")";
		color-=2;
		if (color>160) setTimeout('transicio_color()', 15);
        else if (repeticio<4) {
            repeticio++;
            color=255;
            transicio_color();
        }
	}

/* ###### STATUS-BAR ANIMAT ###### */

	var text = ':. Paranoika LAN Party .:'
	var velocitat = 50
	var x = 0
	function status_bar() {
		var a = text.substring(0,x)
		var b = text.substring(x,x+1).toUpperCase()
		var c = text.substring(x+1,text.length)
		window.status = a + b + c
		if (x == text.length) {
			x = 0
		} else {
			x++
		}
		setTimeout('status_bar()',velocitat)
	}
	status_bar();
	
/* ###### TITOL ENCRIPTAT ###### */

	if (document.all||document.getElementById) {
		var thetitle=document.title;
		document.title='';
	}
	var data="0123456789";
	var done=1;
	function statusIn(text) {
		decrypt(text,2,1); // Canviar el 2 o el 1
	}
	function statusOut() {
		self.status='';
		done=1;
	}
	function decrypt(text, max, delay) {
		if (done) {
			done = 0;
			decrypt_helper(text, max, delay,  0, max);
		}	
	}
	function decrypt_helper (text, runs_left, delay, charvar, max) {
		if (!done) {
			runs_left = runs_left - 1;
			var status = text.substring(0,charvar);
			for (var current_char = charvar; current_char < text.length; current_char++) {
				status += data.charAt(Math.round(Math.random()*data.length));
			}
			document.title = status;
			var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"
			var new_char = charvar + 1;
			var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"
			if (runs_left > 0) {
				setTimeout(rerun, delay);
			} else {
				if (charvar < text.length) {
					setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
				} else {
					done = 1;
				}
			}
		}
	}

//si es un IE 4+ o NS 6+
	if (document.all||document.getElementById) statusIn(thetitle)

/* ###### DESHABILITA EL BOTO UN COP ENVIAT ###### */

	function submitonce(theform) {
		if (document.all||document.getElementById) {
			for (i=0;i<theform.length;i++) {
				var tempobj=theform.elements[i]
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
				tempobj.disabled=true
			}
		}
	}
	
/* ###### FUNCIONS COMPLETES A SCRIPTS_IE.JS ###### */
	function GuanyaFocus(e) { };
	function MouseSobre(e) { };
	function MouseFora(e) { };
	function BotoMouseSobre(e) { };
	function BotoMouseFora(e) { };
