var navNome = navigator.appName;
var navVers = parseInt(navigator.appVersion);
var NS4 = (navNome == "Netscape" && navVers >= 4);
var MO4 = (navNome == "Mozilla Firefox" && navVers >= 3);
var MO3 = (navNome == "Mozilla Firefox" && navVers < 3);
var IE4 = (navNome == "Microsoft Internet Explorer" && navVers >= 6);
var NS3 = (navNome == "Netscape" && navVers < 4);
var IE3 = (navNome == "Microsoft Internet Explorer" && navVers < 6);
var OUN = (navNome != "Netscape" && navNome !=  "Microsoft Internet Explorer" && navNome !=  "Mozilla Firefox");

function confirmaDel(url) {
   if (confirm('Confirma exclusão?')) {
      document.location.href=url;
   }
}

function popup(arq, jan, largura, altura, topo, margem, posicao, rolagem)     
{ 
    if ( NS3 || IE4 || NS4 || OUN || MO4 || MO3)
    {
         if (posicao == 'centro')
         {
              altTela = screen.availHeight; largTela = screen.availWidth;
              topo = Math.ceil(altTela/2) - Math.ceil(altura/2); 
              margem = Math.ceil(largTela/2) - Math.ceil(largura/2);
         }
         janelaMSG = window.open(arq,jan, 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=' + rolagem + ',width=' + largura + ',height=' + altura + ',top=' + topo + ',left=' + margem + ',copyhistory=no'); 
    }       
} 

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Mozilla Firefox")&&(parseInt(appVersion)==3)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function confirmaDel(url) {
   if (confirm('Confirma exclusão?')) {
      document.location.href=url;
   }
}

