﻿// JScript File
function mOvr(src,clrOver)
{
    if (!src.contains(event.fromElement))
    {
        src.style.cursor = 'hand';
        src.bgColor = clrOver;
    }
}

function mOvr(src,clrOver, displayCursor) 
{
    if (!src.contains(event.fromElement)) 
    {
        if(displayCursor)
            src.style.cursor = 'hand';
        src.bgColor = clrOver;
    }
}

function mOut(src,clrIn) 
{
    if (!src.contains(event.toElement)) 
    {
        src.style.cursor = 'default';
        src.bgColor = clrIn;
    }
}

function mOut(src,clrIn, displayCursor) 
{
    if (!src.contains(event.toElement)) 
    {
        if(displayCursor)
            src.style.cursor = 'default';
        src.bgColor = clrIn;
    }
}

function mClk(src) 
{
    if(event.srcElement.tagName=='TD')
        src.children.tags('A')[0].click();
}

function OpenWindowScreenCenter(url, height, width, name)
{
	try
	{
		var str="height="+height;//+",innerHeight="+height;
			str+=",width="+width;//+",innerWidth="+width;
		if (window.screen) {
			var ah=screen.availHeight-30;
			var aw=screen.availWidth-10;

			var xc=(aw-width)/2;
			var yc=(ah-height)/2;

			str+=",left="+xc+",screenX="+xc;
			str+=",top="+yc+",screenY="+yc;
		}
		str+=",scrollbars=yes, statusbar=yes";
		str+=",resizable=yes";
		
		flash = window.open(url,name,str);
		flash.focus();
		return flash;
	}
	catch(e)
	{
		alert('Ocorreu um erro de script durante a tentativa do sistema de abrir uma pop-up.');
	}
	
}