function EscondeFlash(){
         document.getElementById('banner').style.visibility="hidden";
}
var win=null;
function AmpliarImagem(mypage,myname,w,h,pos,infocus){
       if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
       if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
  else if((pos!='center' && pos!='random') || pos==null){myleft=100;mytop=100}
           settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
    win.focus();}
var win=null;

function Impressao(mypage,myname,w,h,pos,infocus){
       if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
       if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
  else if((pos!='center' && pos!='random') || pos==null){myleft=100;mytop=100}
           settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
    win.focus();}
if (window.Event) 
    document.captureEvents(Event.MOUSEUP); 
function nocontextmenu()  
{
    event.cancelBubble = true
    event.returnValue = false;
                 return false;
}
function hidestatus(){
         window.status=''
return true
}
if (document.layers)
    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
    document.onmouseover=hidestatus
    document.onmouseout=hidestatus

var isNN = (navigator.appName.indexOf("Netscape")!=-1);

function autoTab(input,len, e) {
  var keyCode = (isNN) ? e.which : e.keyCode; 
  var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
  if(input.value.length >= len && !containsElement(filter,keyCode)) {
    input.value = input.value.slice(0, len);
    input.form[(getIndex(input)+1) % input.form.length].focus();
  }

  function containsElement(arr, ele) {
    var found = false, index = 0;
    while(!found && index < arr.length)
    if(arr[index] == ele)
    found = true;
    else
    index++;
    return found;
  }

  function getIndex(input) {
    var index = -1, i = 0, found = false;
    while (i < input.form.length && index == -1)
    if (input.form[i] == input)index = i;
    else i++;
    return index;
  }
  return true;
}