function StartsWith(s, start)
{
	if (s.length < start.length)
		return false;
	return s.substring(0, start.length) == start;
}

function TopCheck()
{
	var page = top.location.href.toLowerCase();
	if (
		!StartsWith(page, "http://homoinfo.nl") &&
		!StartsWith(page, "http://www.homoinfo.nl") &&
		!StartsWith(page, "http://localhost:") &&
		!StartsWith(page, "http://localhost/")
	)
	{
		page = top.location.href.toLowerCase();
		i = page.indexOf("/nl/");
		if (i < 0)
			page = "";
		else
			page = "?page=" + page.substring(i+4);
		top.location.href="http://www.homoinfo.nl/" + page;
	}
}

TopCheck();