
function go(page,name)
{
	OpenWindow = this.open(page, name, "toolbar=no,location=no,directories=no,top=10,left=10,status=no,scrollbars=1,resizable=yes,copyhistory=no,width=850,height=600");
}

function PollWindow(lang, postID, vote)
{
	window.open('/ratemypost.php?a=' + postID + '&language=' + lang + '&value=' + vote, '', 'height=100,width=200,left=200,top=200');
}

function MailMeWindow(id)
{
	window.open('/mailme.php?object_instance_id='+id, '', 'height=350,width=400,left=100,top=100');
}

function MailMe(id)
{
	window.open('/mailme.html?id='+id, '', 'height=500,width=400,left=100,top=100');
}

function RateMyBlog(id, rate)
{
	if (rate) {
		window.open('/ratemyblog.html?id='+id+'&rate='+rate, '', 'height=250,width=250,left=200,top=200');
	} else {
		window.open('/ratemyblog.html?id='+id, '', 'height=250,width=250,left=200,top=200');
	}
}

function RateMyPost(id, rate)
{
	window.open('/ratemypost.html?id='+id+'&rate='+rate, '', 'height=150,width=200,left=200,top=200');
}

function MPParsley(msg)
{
	alert('MPP: ' + msg);
}

dc_ord=Math.random()*10000000000000000;
adid='';



function createCookie(name,value,hours)
{
	if(hours){
		var date=new Date();
		date.setTime(date.getTime()+(hours*60*60*1000));
		var expires="; expires="+date.toGMTString();
	} else var expires="";
	document.cookie=name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ=name+"=";
	var ca=document.cookie.split(';');
	for(var i=0;i<ca.length;i++) {
		var c=ca[i];
		while(c.charAt(0)==' ') c=c.substring(1,c.length);
		if(c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function adultWarning(lang)
{
	var hostinf=window.location.host.split('.');
	var alerted18=readCookie('a18'+hostinf[0]);
	if(alerted18) alerted18=1;
	else {
		var msg18 = "";
		if (lang=='N') {
			msg18  = "[NIET GESCHIKT VOOR MINDERJARIGEN]\n\n";
			msg18 += "Door op de knop \"OK\" te klikken bevestig je:\n\n";
			msg18 += " - Dat je ouder bent dan 18 jaar.\n";
			msg18 += " - Dat je op de hoogte werd gebracht van het mogelijk pornografische karakter van de blog die je bezoekt.\n";
			msg18 += " - Dat je zelf verantwoordelijk bent voor je bezoek aan deze blog.\n\n";
			msg18 += "Door op de knop \"OK\" te klikken wordt een cookie geïnstalleerd op je computer. Zo zal de disclaimer gedurende een periode van 24 uur niet meer verschijnen op die blog.";
		} else {
			msg18 += "[STRICTEMENT INTERDIT AUX MINEURS]\n\n";
			msg18 += "En validant le bouton \"OK\" vous certifiez:\n\n";
			msg18 += " - Avoir plus de 18 ans.\n";
			msg18 += " - Etre averti de l'éventuel caractère pornographique du blog auquel vous accédez.\n";
			msg18 += " - Prendre l'entière responsabilité de la consultation de ce même blog.\n\n";
			msg18 += "Vous acceptez par ailleurs qu'un cookie soit installé sur votre machine. Par ce fait, le disclaimer n'apparaîtra plus sur ce blog durant une période de 24 heures.";
		}
		msg18 += "\n__________\n";
		msg18 += "\n[MINORS NOT ALLOWED]\n\n";
		msg18 += "By clicking \"OK\" you confirm that:\n\n";
		msg18 += " - You are of legal age (+18).\n";
		msg18 += " - You have been informed of the possible pornographic content of the blog you visit.\n";
		msg18 += " - You are responsible for visiting this blog.\n\n";
		msg18 += "When you click \"OK\", a cookie will be installed on your computer. By means of this cookie, the disclaimer will not appear on that blog for a period of 24 hours.";
		var conf18 = confirm(msg18);
		if(conf18) createCookie('a18'+hostinf[0],1,24);
		else document.location.href='http://blogs.skynet.be';
	}
}

function moderateBlog(lang)
{
	if (lang != 'nl') lang = 'fr';
	var blog_url	= window.location.host.split(".");
	var search_url	= 'http://www.skynet.be/index.html?or=contact_feedback&l1=about&l2=contact&l3=eptica&a=form&new_lang=' + lang + '&blog_URL=http://' + blog_url[0] + '.skynetblogs.be';
	window.open(search_url);
	return false;
}

function skySearch()
{
	var search_string = document.getElementById('typ123').value;
	if (document.getElementById('blo123').checked) {
		search_string += ' site:skynetblogs.be';
	} else if (document.getElementById('blg123').checked) {
		search_string += ' site:' + window.location.host;
	}
	document.getElementById('key123').value = search_string;
}

function renderCaptcha()
{
	var url = '/captcha.html?date=' + (new Date()).getTime();
	var pars = (new Date()).getTime();

	var myAjax = new Ajax.Updater(
		'captcha',
		url,
		{
			method: 'get',
			parameters: pars
		});
}
