/***************************
	(C) 2002 by Charleshan www.Denninger.nl
	http://www.paranoid.demon.nl
	Free for all users, but leave in this header.
		Started:	07-01-2003
		Last change:	09-12-2008
	==========================
	Function:	Show a message when the URL location is not the original one, can be redirected. - v1.4
	Reference:	I don't remember & http://www.the-cool-place.co.uk
	==========================
	v1.0	07-01-2003	Basic function, including index.html.
	v1.1	28-10-2003	Converted to .js and by using a java based menu, there is no need for a index.html!
	v1.2	12-12-2003	Confirmatin box added.
	v1.3	19-04-2005	Converted to string, so we can search it.
		02-09-2005	Always DO SOMETHING if (rex_URL.test(str_Location)), so wait 1 second.
	v1.4	09-12-2008	Only message, no redirection, you choose...
****************************/

function GetMeHomePage() {	//v1.3
	var str_URL,rex_URL,obj_Temp,str_FileName,str_Location;
	str_URL="/www.cafedekeizer.nl/";
	rex_URL=new RegExp(str_URL,"i");	//i (ignore case);	//Create regular expression pattern.
	var str_URL2,rex_URL2;
	str_URL2="/www.cafedekeizer.com/";
	rex_URL2=new RegExp(str_URL2,"i");	//i (ignore case);	//Create regular expression pattern.
	obj_Temp=window.location+"#";
	str_FileName=obj_Temp.substring(obj_Temp.lastIndexOf("/")+1,obj_Temp.indexOf("#",obj_Temp.lastIndexOf("/")+1));
	obj_Temp=window.location;
	str_Location=obj_Temp.toString();
	//alert("Test!\n\t'"+str_Location+"'\nContains:\n\t'"+rex_URL.source+"'\nDeze pagina:\n\t'"+str_FileName+"' = '"+rex_URL.test(str_Location)+"'.");

	//This is the simple version v1:	if (top.frames.length!=0) top.location=self.document.location;
	//This is the simple version v2:	if (top.frames.length!=0) document.location="http:/"+str_URL;
	//Only message, no redirection.
	//if (!rex_URL.test(str_Location))	//-single domain-
	if (!rex_URL.test(str_Location)&&!rex_URL2.test(str_Location))	//-2 domains-
		alert("Deze pagina '"+str_FileName+"' staat NIET op de originele sitelocatie.\nWij kunnen geen garantie geven voor de inhoud!")
	//Message and redirection.
	//if (!rex_URL.test(str_Location)){	//-single domain-
	/*if (!rex_URL.test(str_Location)&&!rex_URL2.test(str_Location)){	//-2 domains-
		if (confirm("Deze pagina '"+str_FileName+"' staat NIET op de originele sitelocatie.\nWij kunnen geen garantie geven voor de inhoud!\n\nWil je nu naar 'http:/"+str_URL+"' gaan?")){
			top.location.href="http:/"+str_URL
		}
	}/*-check-*else{
		alert("Yess!\n\t'"+str_Location+"'\nContains:\n\t'"+rex_URL.source+"'\nDeze pagina:\n\t'"+str_FileName+"'.");
	}*/
	/* 2DO:	Build Redirection frame...
	if(top.location!="http:/"+str_URL) if (confirm("Deze pagina '"+str_FileName+"' maakt deel uit van een frameset, zonder deze set ontbreken de nodige menu's.\n\nWil je nu naar "+str_URL+" gaan?\n(Hierbij wordt ook de huidige pagina naar de homepage gereset!)"))
		top.location.href="http:/"+str_URL+"";
	*/
}

GetMeHomePage();	//This is the command, but you can place this line anywhere else in a document between <script> tags...

/*
function stopErrors()	//Doewie Errors.
	{
		return true;
	}
window.onerror=stopErrors;	//This is the command, but you can place this line anywhere else...

function right(e) {
	//It's Mine!
	if (navigator.appName=='Netscape'&&(e.which==3||e.which==2))
		return false;
	else if (navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)) {
		alert(" Dat mag dus NIET hé\n    It's mine!!!\n       CHD\n\n      ><)));>");
		return false;
	}
	return true;
}
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmouseup=right;
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
*/
