// ***********************************************************************************
// scripts written by dr theo (dr.theo@freeler.nl) and marc boncz (boncz@terra.com.br)
// ***********************************************************************************

// scripts used in all pages on the site
document.onmousedown = checkClick;
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN)
}
checkEmbedding();

// ***********************************************************************************
// functions used in all pages of the site
// ***********************************************************************************
function checkClick(ev) {
	if (navigator.appName == "Netscape") {
		if (ev.which != 1) {
			alert("Copyright: Citroën CX Club Nederland.");
			return false;
		}
	} else {
		if (event.button != 1) {
			alert("Copyright: Citroën CX Club Nederland.");
			return false;
		}
	}
}

function checkEmbedding() {
	passpage = document.URL; 
	if (top.location == self.location) {
		top.location.href="../index.php?OpenPage="+passpage;
	}
}

function popUp(URL,winWidth,winHeight,winX,winY) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=" + winWidth + ", height=" + winHeight +", left=" + winX +", top= " + winY + "');");
}

function popUpBig(URL,winWidth,winHeight,winX,winY) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=" + winWidth + ", height=" + winHeight +", left=" + winX +", top= " + winY + "');");
}

