function disableCtrlN()
{
	var pressedKey = event.keyCode;
	if ( (78 == pressedKey) && (event.ctrlKey) ) 
	{
		if(window.document.title.indexOf("Secure") == -1)
		{
			openNewWindow();
		}
		return false;
	}
}

// Traps the F11 keypress to disable IE full screen mode.
function disableF11()
{
	if (122 == event.keyCode)
	{
		event.keyCode = 0;
		return false;
	}
}

var parentWin = null;

function GetParent()
{
	var counter = 0;
	
	if (parentWin == null || parentWin.Main_Body == null)
	{
		parentWin = window;
		while (parentWin.parent != null)
		{
		if (parentWin.Main_Body != null || counter > 10)
		break;                  
		counter = counter + 1;
		parentWin = parentWin.parent;
		}
	}
	return parentWin;
}

function trapF5()
{
	if (116 == event.keyCode)
	{
		event.keyCode = 0;
		var doc = GetParent();

		if (doc.Main_Body != null)
		{
			doc.Main_Body.location.reload(true);
		}
		return false;
	}     
}

function openNewWindow()
{
	var popUpContent = "Menu.aspx"
	if (typeof(window[ 'LoginDomain' ]) != "undefined") 
	{
		popUpContent = LoginDomain + popUpContent;
	}
	
	var winName = "new_window";
	var currentDate = new Date()
	winName += currentDate.getHours();
	winName += currentDate.getMinutes();
	winName += currentDate.getSeconds();
	winName += currentDate.getMilliseconds();
	
	var properties = "status=no,toolbar=no,location=no,menubar=no,width=650,height=500,resizable=yes"
	window.open(popUpContent,winName,properties);
}

document.attachEvent("onkeydown", disableCtrlN);	
document.attachEvent("onkeydown", disableF11);
document.attachEvent("onkeydown", trapF5);