marker = {

	colors : ['#ff0000','#ff4808','#ff7c06','#ffc102','#ffee5f','#ebef57','#d8f051','#b7f246','#90f538','#0eff0b'],

	timeout : false,

	url : "",

	mark : 0,

	vote : function (mark) {


		var url = document.location;

		document.location = this.url+mark+'&back='+url;


	},

	move : function (mark) {

		var e;

		if (this.timeout) clearTimeout(this.timeout);

		var id = Math.floor(mark);

		for (var i=1; i<=id; i++) {
			e = document.getElementById('mark'+i);
			e.style.backgroundColor = this.colors[i-1];
			e.style.opacity = 1;
			e.style.filter = 'none';
			e.style.color = 'black';
		}

		for (var i=id+1; i<=10; i++) {
			e = document.getElementById('mark'+i);
			e.style.backgroundColor = '#101010';
			e.style.opacity = 1;
			e.style.filter = 'none';
			e.style.color = '#999999';
		}

		if (mark>id) {
			var opacity = (mark-id);
			if (opacity<0.3) opacity=0.3;
			e = document.getElementById('mark'+(id+1));
			e.style.backgroundColor = this.colors[id];
			e.style.opacity = opacity;
			e.style.filter = "alpha(opacity=" + (opacity*100) + ")";
		}

	},

	start : function () {

		this.move(this.mark);

	},

	timer : function () {

		if (this.timeout) clearTimeout(this.timeout);
		this.timeout = setTimeout( "marker.start()", 200 );
	}

}