<!-- 

//var y = 2003;
var y = 2010;
var fco_data_2 = new Date();
var fco_data_1 = new Date(y, 0, 1);

var diesAny = ( (Math.floor(y/4) == (y/4)) && ((Math.floor(y/100) != (y/100)) || (Math.floor(y/400) == (y/400))) )?366:365;

var fco_valor = 16735.00*1000000;

var fco_interval;
var fco_running;

//increment per milisegon
var fco_rate = fco_valor/(diesAny*24*60*60*1000);

function fco_iniciar_comptador(i) {
	 if (document.getElementById) {
	 	fco_refrescar_comptador();
		fco_interval = setInterval('fco_refrescar_comptador()', i);
		fco_running = true;
	 }
}

function fco_aturar_comptador() {
	if (fco_running) {
    	clearInterval(fco_interval);
	}
   fco_running = false;
}


function fco_refrescar_comptador() {
	var ara = new Date();
	var acumulatAny = (ara - fco_data_1)*fco_rate;
	var acumulatAra = (ara - fco_data_2)*fco_rate;
	document.getElementById("fco_comptador").innerHTML = fco_dona_format(acumulatAny);
	if (document.getElementById("fco_comptador2")) {
		document.getElementById("fco_comptador2").innerHTML = fco_dona_format(acumulatAra);
	}
	if (document.getElementById("fco_rellotge")) {
		var temps = new Date(ara - fco_data_2);
		var hora = temps.getHours()-1;
		if (hora<10) hora = '0'+hora;
		var minuts = temps.getMinutes();
		if (minuts<10) minuts = '0'+minuts;
		var segons = temps.getSeconds();
		if (segons<10) segons = '0'+segons;
		document.getElementById("fco_rellotge").innerHTML = hora+':'+minuts+':'+segons;
	}
}


function fco_dona_format (n) {
  return fco_format_milers(Math.floor(n-0) + '') + fco_format_decimals(n - 0) + ' &euro;';
}

function fco_format_milers(number) {
    if (number.length <= 3)
        return (number == '' ? '0' : number);
    else {
        var mod = number.length%3;
        var output = (mod == 0 ? '' : (number.substring(0,mod)));
        for (i=0 ; i < Math.floor(number.length/3) ; i++) {
            if ((mod ==0) && (i ==0))
                output+= number.substring(mod+3*i,mod+3*i+3);
            else
                output+= '.' + number.substring(mod+3*i,mod+3*i+3);
        }
        return (output);
    }
}

function fco_format_decimals(amount) {
    amount = Math.round( ( (amount) - Math.floor(amount) ) *100);
    if (amount>99) amount=99;
	return (amount < 10 ? ',0' + amount : ',' + amount);
}

// -->