function onbodyload() {
	document.getElementById('explanation').innerHTML = "<b>Don't panic!</b> This website hasn't actually been blocked &mdash; at least not yet. Thanks to a new law called the Digital Economy Act, it could really be blocked very soon."
	
	var twitter = 'http://twitter.com/home?status=' + urlencode("The #deact strikes again - another site blocked! " + window.location + " #foti #ukelection");
	document.getElementById('twitter').setAttribute('href', twitter);
	document.getElementById('facebook').setAttribute('href', 'http://www.facebook.com/sharer.php?u=' + window.location);
}


function moreinfo() {
	var info = document.getElementById('info');
	if(info.style.display == 'block') info.style.display = 'none';
	else info.style.display = 'block';
}

function blockanother() {
	var site = prompt('Please enter the website you want block. It will open in a new window.', 'www.google.com');
	if(site != null) {
		slash = site.indexOf('/');
		if(slash < 0) {
			domain = site;
			uri = '';
		} else {
			domain = site.substr(0, slash);
			uri = site.substr(slash);
		}
		if(domain.substr(0,7) != 'http://' && domain.substr(0,8) != 'https://') domain = 'http://' + domain;
		window.open(domain + '.futureoftheinternet.co.uk/' + uri);
	}
}

function urlencode(str) {
	return escape(str).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40');
}

/* Yarr!! */

