function link(file,id){
  //document.getElementById('POP'.3.tyle.display='none';
  //lo.3.r("block","loader");
  var url = "";
  var target = "";
  switch(file){
    case "autorizacaodescontos":
      url = "documentos/autorizacaodescontos.pdf";
      target = "_blank";
    break;
    
    default:
      url = "?file="+file;
      target = "_top";
      break;
  
  
  }
  
  window.open(url,target);

  correctPNG();
  setTimeout("loader('none','loader');",1000);
}

function tb(file,id,id2){
var d = "38px";
var tb = "<table width='0' height='0' border='0' cellspacing='0' cellpadding='0'><tr>"+
  "<td style='width:"+d+";height:"+d+";'><img src='imagens/tbno.png' border='0' width='"+d+"' height='"+d+"' /></td>"+
  "<td style='width:0%;   height:"+d+"'> <img src='imagens/tbn.png'  border='0' width='100%'  height='"+d+"' /></td>"+
  "<td style='width:"+d+";height:"+d+"'> <img src='imagens/tbne.png' border='0' width='"+d+"' height='"+d+"' /></td></tr><tr>"+
  "<td style='width:"+d+";height:0%;'>   <img src='imagens/tbo.png'  border='0' width='"+d+"' height='100%' /></td>"+
  "<td style='width:0%;   height:0%;background-image: url(imagens/tbf.jpg); background-repeat: repeat;'>"+
  "<div id='"+id2+"'></div>"+
"</td>"+
  "<td style='width:"+d+";height:0%;'>   <img src='imagens/tbl.png'  border='0' width='"+d+"' height='100%' /></td></tr><tr>"+
  "<td style='width:"+d+";height:"+d+";'><img src='imagens/tbso.png' border='0' width='"+d+"' height='"+d+"' /></td>"+
  "<td style='width:0%;   height:"+d+";'><img src='imagens/tbs.png'  border='0' width='100%'  height='"+d+"' /></td>"+
  "<td style='width:"+d+";height:"+d+"'> <img src='imagens/tbse.png' border='0' width='"+d+"' height='"+d+"' /></td></tr>"+
"</table>";
document.getElementById(id).innerHTML = tb;
ajaxinc(file,id2);
}

