<!--

/*
	This JavaScript document contains JS function for The Mind Project's website.
*/

/*
	Pops up a window of specified height and width containing the 
	target_path.  Window has not toolbar, menu options, scrollbars,
	etc.
*/
function javaPopUp( target_page, wWidth, hHeight )
{
	options = "toolbar=no, menubar=no, status=no, resizable=yes, scrollbars=no, width=" + wWidth + ", height=" + hHeight;
	
	window.open( target_page, "", options );
}


/*
	Pops up a window of specified height and width containing the 
	target_path.  Window has not toolbar, menu options, scrollbars, 
	etc., and is not resizable.
*/
function javaPopUpLocked( target_page, wWidth, hHeight )
{
	options = "toolbar=no, menubar=no, status=no, resizable=no, scrollbars=no, width=" + wWidth + ", height=" + hHeight;
	
	window.open( target_page, "", options );
}


function killEnterKey()
{
	var nav = window.Event ? true : false;
	if (nav) 
	{
		window.captureEvents(Event.KEYDOWN);
		window.onkeydown = NetscapeEventHandler_KeyDown;
	} else 
	{
		document.onkeydown = MicrosoftEventHandler_KeyDown;
	}
}

function NetscapeEventHandler_KeyDown(e) 
{
	if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') 
		return false; 
	return true;
}

function MicrosoftEventHandler_KeyDown() 
{
	if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
		return false;
	return true;
}

//-->