﻿// função bloqueio botão direito do mouse
function desabilitaMenu(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}

function desabilitaBotaoDireito(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}

if ( window.Event )
document.captureEvents(Event.MOUSEUP);
if ( document.layers )
document.captureEvents(Event.MOUSEDOWN);

document.oncontextmenu = desabilitaMenu;
document.onmousedown = desabilitaBotaoDireito;
document.onmouseup = desabilitaBotaoDireito; 


function AbreJanela(arquivo, tamx, tamy)
{
window.open(arquivo,"","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,top='+top+', left='+left+',width=" + tamx + ",height=" + tamy);
  var left = 0;
  var top = 0;
}

function abrir(URL) {

  var width = 600;
  var height = 550;

  var left = 0;
  var top = 0;

  window.open(URL,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, menubar=no');

}

