// TRAVA MENU
function travaMenu() { return false };
document.oncontextmenu=travaMenu;

// abre janela maximizada
function abreM(url,janela,scroll){
W = eval(screen.width)-10;
H = eval(screen.height)-54;
    window.open(url,janela,"toolbar=no,location=yes,directories=no,status=no,menubar=yes,scrollbars="+scroll+",resizable=no,copyhistory=no,width="+W+",height="+H+",top=0,left=0");
}

window.name = "new"
b_versao = parseInt(navigator.appVersion);
var win = null;

function janelastatus(mypage,myname,w,h,scroll)
{
if (b_versao >= 4)
        {
        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        }
else
        {
        LeftPosition = 100
        TopPosition = 100
        }
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=1,resizable=0,status=0'
win = window.open(mypage,myname,settings)
win.focus()
}

function janela(mypage,myname,w,h,scroll)
{
if (b_versao >= 4)
        {
        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        }
else
        {
        LeftPosition = 100
TopPosition = 100
        }
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=1,resizable=0,status=1'
win = window.open(mypage,myname,settings)
win.focus()
}

// Janela Normal com scrollbar 
function tempo (width, height, myname, url)
{
  var left, top;

  if (screen.width < width)
    left = 0;
  else
    left = (screen.width  - width) / 2;

  if (screen.height < height)
    top = 0;
  else
    top = (screen.height - height) / 4;

  if ( navigator.appName == "Netscape" )
  {  var w = window.open (url, myname, "height="+height+",width="+width+
    ",screenX=" + left + ",screenY=" + top + ",scrollbars=no,status=no,toolbar=0,menubar=no,location=0,directories=0,resizable=no");}
  else
  {  var w = window.open (url, myname, "height="+height+",width="+width+
    ",left=" + left + ",top=" + top + ",scrollbars=no,status=no,toolbar=0,menubar=no,location=0,directories=0,resizable=no");}

  if (w)
   w.focus ();

}



