/*
   popup.js - função para criar popups do tipo layer
   Emerson Ribeiro
   06/2006
*/

// Parâmetros do popup - altere conforme sua necessidade
var pColor       = "#5B9A9F";           // Cor da barra superior e das laterais do popup
var pBorderStyle = "1px solid #5B9A9F"; // Estilo das bordas do popup

// Não mexa daqui para baixo a não ser que saiba o que está fazendo

     document.write("  <div id='msgBox'");
     document.write("     style='position:         absolute;");
     document.write("            width:            0;");
     document.write("            height:           0;");
     document.write("            left:             0;");
     document.write("            top:              0;");
     document.write("            clear:            both;");
     document.write("            border-bottom:    " + pBorderStyle + ";");
     document.write("            border-top:       " + pBorderStyle + ";");
     document.write("            border-right:     " + pBorderStyle + ";");
     document.write("            border-left:      " + pBorderStyle + ";");
     document.write("            padding:          0px 0px 0px 0px;'>");
     document.write("   <table border=0 width='100%' height='100%' cellpadding=0 cellspacing=0 bgcolor=white>");
     document.write("    <tr><td align='right' height='20' bgcolor=" + pColor + "> <a href='javascript:fClosePopUp();' style='text-decoration: none;'><font face=arial color=white><small><b>Fechar</b></small></font></a>&nbsp;</td></tr>");        
     document.write("    <tr><td align='left'  height='100%' valign='top'>");
     document.write("      <iframe width=100% height=100% frameborder=0 id=msgBoxConteudo></iframe>");
     document.write("    </td></tr></table>");
     document.write("  </div>");
     fClosePopUp();

     function fOpenPopUp(pURL, pWidth, pHeight, pTop, pLeft) {
        var obj = document.getElementById('msgBoxConteudo');
        obj.src=pURL;

        var obj = document.getElementById('msgBox');
        obj.style.width   = pWidth  ;
        obj.style.height  = pHeight ;
        obj.style.left    = pLeft   ;
        obj.style.top     = pTop    ;
        obj.style.display = 'block' ;
     }     


     function fClosePopUp() {
        var obj = document.getElementById('msgBox');
        obj.style.display = 'none';
     }     
 
