function sansur() {
	this.refreshRate = 10; // in seconds
	this.bodyMarginTop = '45px';
	this.messages = [
		{	date: new Date(2010, 5, 3),
			pre: "",
			post: " days since Google services were blocked in Turkey"
		},
		{	date: new Date(2010, 4, 7),
			pre: "",
			post: " days since Metacafe was banned in Turkey"
		},
		{	date: new Date(2009, 5, 24),
			pre: "",
			post: " days since Google Sites was banned in Turkey"
		},
		{	date: new Date(2008, 4, 5),
			pre: "",
			post: " days since YouTube was banned in Turkey"
		},
		{	date: new Date(2008, 1, 4),
			pre: "",
			post: " days since GeoCities was banned in Turkey"
		},
		{	date: new Date(2007, 10, 23),
			pre: "",
			post: " days since YouPorn was banned in Turkey"
		}
	];

	/*******************************
	 * DO NOT EDIT BELOW THIS LINE *
	 *******************************/

	this.daysSince = function(d) {
		var day = 24*60*60*1000;
		var now = new Date();
		return Math.floor((now - d) / day);
	};

	this.css = function(el,s) {
		for(var i in s)
			el.style[i] = s[i];
		return el;
	};

	this.textFor = function(msg) {
		var text = msg['pre'];
		text += this.daysSince(msg['date']);
		text += msg['post'];

		return text;
	}

	this.i = 0;
	this.e = this.css(document.createElement("div"), {
		backgroundColor: 'rgb(179, 51, 30)',
		borderBottom: '1px solid rgb(110, 23, 9)',
		padding: '7px 0',
		color: 'white',
		textAlign: 'center',
		width: '100%',
		height: '20px',
		fontSize: '16px',
		lineHeight: '20px',
		fontWeight: 'bold',
		fontFamily: 'Arial, sans-serif',
		position: 'absolute',
		top: 0,
		left: 0,
		zIndex: 999999
	});

	document.body.appendChild(this.e);
	document.body.style.marginTop = this.bodyMarginTop;

	this.loop = function() {
		this.e.innerHTML = this.textFor(this.messages[this.i]);
		this.i = (this.i + 1) % this.messages.length;
		setTimeout(this.loop, 1000 * this.refreshRate);
	};

	this.loop();
};

sansur();

