var __curPnl = "";
function initPopUp(popUpContentId, pT, w, h, u) {
    __curPnl = popUpContentId;
    var popUpContainerObject = document.getElementById('popupContainer');
    if (u != "0") {
        pT = pT + "<br><span style='color:navy; font-size:15px; font-weight:bold'>" + u + "</span>";
    }
    var popUpHtml = document.getElementById(popUpContentId).innerHTML;
    theBody = document.getElementsByTagName('BODY')[0];
    if (popUpContainerObject != null) {
        theBody.removeChild(popUpContainerObject);
    }
    popmask = document.createElement('div');
    popmask.id = 'popupMask';
    popcont = document.createElement('div');
    popcont.id = 'popupContainer';
    popcont.innerHTML = '<div id="popupInner"><table bgcolor="transparent" width="' + w + '" height="' + h + '" border="0" cellpadding="0" cellspacing="0" ><tr><td colspan="3"><table width="100%" border="0" cellpadding="0" cellspacing="0" ><tr><td width="7" valign="top" style="background-image:url(imagesGif1/ICGif1_r9_c14_3.gif)" ><img src="imagesGif1/spacer.gif" /></td><td align="center" rowspan="2" class="tdBoxTitle" style="background-image:url(imagesGif1/ICGif1_r9_c16_2.gif); background-repeat:repeat-x; ">' + '<div id="popupTitleBar"><table width="100%" cellpadding="0" cellspacing="0"><tr><td>' + '<div id="popupTitle">' + pT + '</div></td><td valign="top" style="padding-left:8px">' + '<div id="popupControls">' + '<img src="imagesGif1/close.gif" title="Cerrar" onclick="hidePopWin(true);" id="popCloseBox" />' + '</div></td></tr></table>' + '</div>' + '</td><td width="7" valign="top" style="background-image:url(imagesGif1/ICGif1_r9_c18_3.gif)" ><img src="imagesGif1/spacer.gif" width="8" height="27" border="0" /></td></tr><tr><td width="7" valign="top" style="background-image:url(imagesGif1/ICGif1_r9_c14_2.gif); background-repeat:repeat-y" ><img src="imagesGif1/spacer.gif" width="1" height="1" /></td><td width="7" style="background-image:url(imagesGif1/ICGif1_r9_c18_2.gif); background-repeat:repeat-y" valign="top" ><img src="imagesGif1/spacer.gif" width="1" height="1" /></td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td style="width:8px"><img src="images2/lightBlueLineLeft_2.gif" width="8" height="1"></td><td align="right" style="" background="images2/lightBlueLineBottom_2.jpg"><img src="imagesGif1/spacer.gif"></td><td style="width:10px"><img src="images2/lightBlueLineRight_2.gif" width="8" height="1"></td></tr></table></td></tr>' + '<tr><td width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background-image:url(imagesGif1/ICGif1_r12_c14.gif); background-repeat:repeat-y; "><img src="imagesGif1/spacer.gif" width="3" height="1"></td><td style=" width:100%; padding:0px; background-color:#FFFFFF; height:' + h + '" align="center">' + popUpHtml + '</td><td style="background-image:url(imagesGif1/ICGif1_r12_c18.gif); background-repeat:repeat-y; background-position:right "><img src="imagesGif1/spacer.gif" width="5" height="1"></td></tr><tr><td style="background-image:url(imagesGif1/ICGif1_r12_c14.gif); background-repeat:repeat-y; "><img src="imagesGif1/spacer.gif" width="3" height="1"></td><td style=" width:100%; font-weight:bold; border-top:1px solid gainsboro; padding:0px 6px; background-color:#FFFFFF; height:24px; font-family:arial; font-size:11px" align="right" nowrap="nowrap">No volver a mostrar este mensaje <input onClick="igMes(this)" type="checkbox" /></td><td style="background-image:url(imagesGif1/ICGif1_r12_c18.gif); background-repeat:repeat-y; background-position:right "><img src="imagesGif1/spacer.gif" width="5" height="1"></td></tr></table></td></tr><tr><td colspan="3"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="7" height="7" background="imagesGif1/ICGif1_r14_c14.gif" class="tdSeven"><img src="imagesGif1/spacer.gif" width="7" height="1"></td><td background="imagesGif1/ICGif1_r14_c16.gif" class="tdSeven"><img src="imagesGif1/spacer.gif" width="1" height="1"></td><td width="7" height="7" background="imagesGif1/ICGif1_r14_c18.gif" class="tdSeven"><img src="imagesGif1/ICGif1_r14_c18.gif" width="8" height="7"></td></tr></table></td></tr></table>' + '</div>';
    theBody.appendChild(popmask);
    theBody.appendChild(popcont);
    gPopupMask = document.getElementById("popupMask");
    gPopupContainer = document.getElementById("popupContainer");
    gPopFrame = document.getElementById("popupFrame");
    var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
    if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
        gHideSelects = true;
    }
    var elms = document.getElementsByTagName('a');
    for (i = 0; i < elms.length; i++) {
        if (elms[i].className.indexOf("submodal") == 0) {
            elms[i].onclick = function() {
                var width = 400;
                var height = 200;
                params = this.className.split('-');
                if (params.length == 3) {
                    width = parseInt(params[1]);
                    height = parseInt(params[2]);
                }
                showPopWin(this.href, width, height, null);
                return false;
            }
        }
    }
}