/*<RMJSDep>Comum</RMJSDep>*/
//Event - Parametro que recebe o parametro Event do Netscape
function GetEventElement(Event)
{
	if (isIE())
		return GetEventObject(Event).srcElement;
	else
		return GetEventObject(Event).target;
}

function GetEventObject(Event)
{
	if (isIE())
		return window.event;
	else
		return Event;
}

//Identifica se o Navegador é Internet Explorer
function isIE()
{
	if (document.all)
		return true;
	else
		return false;
}

//Identifica se o Navegador é Netscape ou Mozilla
function isNS()
{
	if ((navigator != null) &&
		(navigator.userAgent != null) &&
		(navigator.userAgent.toLowerCase().indexOf("gecko") != -1))
		return true;
	else
		return false;
}

function GetEventKeyCode(Event)
{
	Event = GetEventObject(Event);
	if (isIE())
		return Event.keyCode;
	else
		return Event.which;
}

function IEResource(MainPageUrl, PageMsg)
{
	if (isNS())
		BrowserNotSupported(MainPageUrl,PageMsg);
}

function NSResource(MainPageUrl, PageMsg)
{
	if (isIE())
		BrowserNotSupported(MainPageUrl,PageMsg);
}

function BrowserNotSupported(MainPageUrl,PageMsg)
{
	if (document.forms.length>0)
	{
		var form = document.forms[0];
		form.style.display='none';
	}
	
	alert(PageMsg);
	location.href=MainPageUrl;
}
