//
// Description:	User interface disabling javascript module
// File:		uiDisable.js
// Author:		Guy Fernando (Copyright Informatix Ltd)
// Date:		29/10/2011
//

// disable right mouse click

var message="";

function clickIE()
{
	if (isMinIE4)
	{
		(message);
		return false;
	}
}

function clickNS(e)
{
	if (isMinNS4 || isMinNS6)
	{
		if (e.which == 2 || e.which == 3)
		{
			(message);
			return false;
		}
	}
}

if (isMinNS4) 
{
//	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS;
}
else
{
	document.onmouseup = clickNS;
	document.oncontextmenu = clickIE;
}

document.oncontextmenu = new Function("return false")

// always display pages within the mainframe
if (window.self == window.top)
{
	// a requested page is being displayed outside the frameset
	
	// retrieve the filename of the original page requested
	var url = window.top.location.pathname;
	var filename = url.substring(url.lastIndexOf('/')+1);
	
	// display frameset but with original page filename in querystring.
	window.top.location.href = "./index.html?page=" + filename;
}
else if (window.self == top.frames['topframe'])
{
	// this page is the topfr\ame
	// set mainframe page to the original page
	var filename = getQuerystring('page', "lotto.htm");
	if (filename != "")
		top.frames["mainframe"].location.href = filename;
}
else if (window.self == top.frames['mainframe'])
{
	// this page is the mainframe
}


