function FRM(AFormName,ABodyId,ACaption,AEncodeType,ABorderIcons,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,AClassId,AExceptionMessage,ASystemMessage,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,AHRef,ASID,AWidth,AHeight,AFormId,APpmCnt,AInnerHtml) {
  AComponentIndex = 0;
  AId = IgTplId(0);
  var ABody = eval("document.all." + ABodyId);
  ABody.insertAdjacentHTML('beforeEnd',
    '<table id="TblFormParent" class=TIgFormTable border=0 width=100% height=100% cellpadding=0 cellspacing=0>' + 
    '  <tr>' + 
    '    <td><img src=/images/curva_form.gif></td>' + 
    '    <td width=100% background=/images/retahoriz_form.gif></td>' + 
    '  </tr>' + 
    '  <tr>' + 
    '    <td height=100% background=/images/retavert_form.gif></td>' + 
    '    <td valign=top>' + 
    '    <table border=0 width=100% height=100% align=top cellpadding=0 cellspacing=0>' + 
    '      <tr>' + 
    '        <td width=17><img src=/images/bordamarbol.gif width=17 height=23></td>' + 
    '        <td id="TdFormCaption" width=100% background=/images/cabecalhoamar.gif class=TIgFormCaption>' + ACaption + '<div align=right></div></td>' + 
    '        <td id="TdFormIcons" background=/images/cabecalhoamar.gif class=TIgFormBorderIcons align=right>' + IgTplFRMBorderIcons(AId,ABorderIcons) + '</td>' + 
    '        <td width=17><img src=/images/fimbordamar.gif width=17 height=23></td>' + 
    '      </tr>' + 
    '      <tr><td><img src="/images/SPACER.gif" height="2"></td></tr>' + 
    '      <tr>' + 
    '        <td height=100% colspan=4 bgcolor="#CECE9C"><form id=' + AId + ' enctype=' + IgHtmlEncodeType(AEncodeType) + '></form>' + AInnerHtml + '</td>' + 
    '      </tr>' + 
    '    </table>' + 
    '    </td>' + 
    '  </tr>' + 
    '</table>');
  AForm = eval("document.all." + AId);
  AForm.AClassId = AClassId;
  AForm.AFormId = AFormId;
  AForm.AClickNew = AClickNew;
  AForm.AWidth = AWidth;
  AForm.AHeight = AHeight;
  AForm.BodyWidth = AWidth;
  AForm.BodyHeight = AHeight;
  AForm.ATbsSel = true;
  DHgt = document.body.offsetHeight - AForm.BodyHeight;
  DWdt = document.body.offsetWidth - AForm.BodyWidth;
  if (DHgt < 0) DHgt = 0;
  if (DWdt < 0) DWdt = 0;
  AForm.AComponentIndex = AComponentIndex;
  AForm.name = AForm.id;
  AWindowHRef = AHRef;
  AFormHasDefault=0;
  AForm.insertAdjacentHTML('beforeEnd',
    '<input type=hidden name=SID value="' + ASID + '">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopFirst">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopPrev">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopNext">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopLast">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopBack">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopNew">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopHelp">' + 
    '<input type=hidden name="' + AForm.id + PPN + 'FormTopModify">')
  if (document.all.HIN == null) ABody.insertAdjacentHTML('beforeEnd',
    '<div id=HIN name=HIN class=TIgHint style="float:none;position:absolute;' + 
    'left:0;top:0;z-index:99998;visibility:hidden;"></div>')
  IgTplGroup(AForm,null,AForm,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,null,APpmCnt);
  AForm.method="post"
  AForm.autocomplete="off"
  AForm.action=AFormName;
  document.all.TdFormCaption.innerText = ACaption;
  IgInsertOnForm(AForm,AId,'UniqueId','');
  ExceptionMessage = AExceptionMessage;
  SystemMessage = ASystemMessage;
};
function IgTplFRMBorderIcons(AFormId,ABorderIcons) {
  return(
    '<table border=0 cellpadding=0 cellspacing=2 align=right background=/images/cabecalhoamar.gif>' + 
    '  <tr>' + 
    '    ' + IgTplHtmlBorderIcons(AFormId,ABorderIcons) + '' + 
    '  </tr>' + 
    '</table>');
};
function IgTplFRMBorderIcon(AFormId,ACaption,AId) {
  return(
    '<td id=' + AId + ' class=TIgFormBorderIcons>' + 
    '  <img src="/images/Ig' + AId + '.gif" onclick="javascript:Ig' + AId + 'Click()">' + 
    '  <td class=TIgFormBorderIcons><a onclick="javascript:Ig' + AId + 'Click()">' + ACaption + '</a>&nbsp&nbsp&nbsp</td>' + 
    '</td>');
};
function BTN(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AKind,AIcon,AGroupValidate,AGroupCheckPending,AConfirmMessage,ASubmitButton,ADefault,AAligners) {
  AHeight = 18;
  ACaption = IgExtractAccessKey(ACaption);
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  if (AAccessKey != "") 
    BTA(AId,AParentId,AIcon,ACaption)
  else if ((ADefault != 0) && (AVisible !=0) && (AEnabled != 0)) { 
    AFormHasDefault=1;
    BTD(AId,AParentId,AIcon,ACaption);
  } else if (ACaption == "")
    BTL(AId,AParentId,AIcon)
  else
    BTO(AId,AParentId,AIcon,ACaption)
  var AButton = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,AButton,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners);
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AButton.id + PPN + 'Submitted" value=0>')
  AButton.AKind = AKind;
  if ((AKind == 2) && (AButtonNewClick == null)) AButtonNewClick = AButton;
  AButton.AIcon = AIcon;
  AButton.AGroupValidate = AGroupValidate;
  AButton.AGroupCheckPending = AGroupCheckPending;
  AButton.AConfirmMessage = AConfirmMessage;
  AButton.ASubmitButton = ASubmitButton;
  AButton.ACaption = ACaption;
  AButton.onclick = IgButtonClick;
  AButton.AFMntFormName = "";
  AButton.onkeydown = IgButtonKeyDown;
};
function JFC(AEventId,AControl,AControl1,AOperator,AControl2,AMessage) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 0;
  AControl.AControl1 = AControl1;
  AControl.AOperator = AOperator;
  AControl.AControl2 = AControl2;
  AControl.AMessage = AMessage;
};
function JFL(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 1;
  AControl.AParameters = AParameters;
};
function JCC(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 2;
  AControl.AParameters = AParameters;
};
function JCV(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 3;
  AControl.AParameters = AParameters;
};
function JAV(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 4;
  AControl.AParameters = AParameters;
};
function JUV(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 5;
  AControl.AParameters = AParameters;
  IgBroadcastFunction(AControl);
};
function JCS(AEventId,AControl,AParameters) {
  AControl.AEventId = AEventId;
  AControl.AFunction = 6;
  AControl.AParameters = AParameters;
};
function BTO(AId,AParentId,AIcon,ACaption) {
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<input type=button align=left id=' + AId + ' value="' + ACaption + '" class=TIgButton ' + 
    '  style="background: beige url(/images/IgButton' + IgHtmlButtonIcon(AIcon) + '.gif) no-repeat center left">');
};
function BTA(AId,AParentId,AIcon,ACaption) {
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<button align=left id=' + AId + ' class=TIgButton accesskey=' + AAccessKey + ' style="background:beige url(/images/IgButton' + IgHtmlButtonIcon(AIcon) + '.gif) no-repeat center left">' + AStartCaption + '<SPAN style="text-decoration:underline;">' + AAccessKey + '</SPAN>' + AEndCaption + '</button>');
};
function BTD(AId,AParentId,AIcon,ACaption) {
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<input type=submit align=left id=' + AId + ' value="' + ACaption + '" class=TIgButton ' + 
    '  style="background: beige url(/images/IgButton' + IgHtmlButtonIcon(AIcon) + '.gif) no-repeat center left">');
};
function BTL(AId,AParentId,AIcon) {
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<input type=button id=' + AId + ' class=TIgButton ' + 
    '  style="background: beige url(/images/IgButton' + IgHtmlButtonIcon(AIcon) + '.gif) no-repeat center center">');
};
function LBL(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AClassId,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<label id=' + AId + ' class=TIgLabel>' + ACaption + '</label>');
  var ALabel = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,ALabel,ALeft-40,ATop,AWidth+40,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,-1,AClassId,AComponentIndex,AAligners);
};
function LB2(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AClassId,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<label id=' + AId + ' class=TIgNewLabel>' + ACaption + '</label>');
  var ALabel = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,ALabel,ALeft+2,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,-1,AClassId,AComponentIndex,AAligners);
};
function LNK(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AClassId,ALink,ASubmit,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<a id=' + AId + ' class=TIgLabel>' + ACaption + '</a>');
  var ALnk = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  ALnk.href = ALink;
  var F = 0;
  if (AAlignment == 1) F = 40;
  IgTplControl(AForm,AParent,ALnk,ALeft-F,ATop,AWidth+40,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,-1,AClassId,AComponentIndex,AAligners);
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + ALnk.id + PPN + 'Submitted" value=0>')
  if (ASubmit != 0) ALnk.onclick = IgLinkClick;
};
function EDT(AParentId,AId,AValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,APasswordChar,AMaxLength,ACharCase,ADataType,ADisplayLabel,AReadOnly,ARequired,AMinValue,AMaxValue, ADtsId,AFIndex,ANumCasasDec,AReadOnlyE,AValidChars,AAligners,ADefaultValue,AMask,ASbmOnEx) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  var AEdit = document.createElement(
    '<input id=' + AId + ' class=T' + AParent.AClassId + 'IgEdit>');
  IgTplAdjustStyle(AEdit,AParent,AClassId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,AEdit,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners);
  AEdit.type = IgHtmlPassword(APasswordChar);
  AEdit.AMask = AMask;
  AEdit.ASbmOnEx = ASbmOnEx;
  IgTplInput(AEdit,AValue,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,ANumCasasDec,AReadOnlyE,ADefaultValue);
  AEdit.AMinValue = AMinValue;
  AEdit.AMaxValue = AMaxValue;
  if ((AMaxLength != -1) && (AMaxLength != 0)) AEdit.maxLength = AMaxLength;
  AEdit.style.textTransform = IgHtmlCharCase(ACharCase);
  AEdit.onkeypress = IgEditKeyPress;
  AEdit.onfocus = IgEditFocus;
  AEdit.onblur = IgEditBlur;
  AEdit.AValidChars = AValidChars;
  AParent.appendChild(AEdit);
};
function MEM(AParentId,AId,AValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADataType,ADisplayLabel,AReadOnly,ARequired,ADtsId,AFIndex,AInPGC,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  var AEdit = document.createElement(
    '<textarea id=' + AId + ' class=T' + AParent.AClassId + 'IgEdit></textarea>');
  IgTplAdjustStyle(AEdit,AParent,AClassId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,AEdit,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners);
  AValue = IgDecodeNewLines(AValue);
  IgTplInput(AEdit,AValue,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,0,0);
  AEdit.onfocus = IgEditFocus;
  AEdit.onblur = IgEditBlur;
  AEdit.ADefaultValue = "";
  var ABfsStr = AId + "#IgMemoBeforeSubmit" + MAGICCHAR;
  if (AInPGC==0) 
    ABeforeSubmit = ABeforeSubmit + ABfsStr
  else 
    APgcBeforeSubmit = APgcBeforeSubmit + ABfsStr;
  AParent.appendChild(AEdit);
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'TextValue" value="">')
};
function UPL(AParentId,AId,ALeft,ATop,AWidth,AHeight,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADataType,ADisplayLabel,AReadOnly,ARequired,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  var AEdit = document.createElement(
    '<input id=' + AId + ' class=T' + AParent.AClassId + 'IgEdit>');
  IgTplAdjustStyle(AEdit,AParent,AClassId);
  var AForm = eval("document.all." + AFormId);
  IgTplControl(AForm,AParent,AEdit,ALeft,ATop,AWidth,AHeight,0,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners,true);
  AEdit.type = 'file';
  AEdit.ADefaultValue = "";
  IgTplAlign(AEdit);
  IgTplInput(AEdit,'',AReadOnly,ARequired,ADataType,ADisplayLabel,-1,-1,0,0);
  AEdit.onkeypress = IgEditKeyPress;
  AParent.appendChild(AEdit);
};
function GBX(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AVisible,AStatus,  ARecordChanged,ADefaultControlId,AKeyValues,AClassId,AZIndex,ADtsId,ADetailGrpList,  ADetailKFld,AMasterIdx,AClickNew,AAligners,APpmCnt) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' class=TIgGroupBox>' + 
    '  <table width=100% height=100% class=TIgGroupBoxTable border=1 cellpadding=0 cellspacing=0>' + 
    '    <tr>' + 
    '      <td class=TIgGroupBoxCaption align=left valign=top width=100%>&nbsp' + ACaption + '</td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
  var AGroupBox = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  AGroupBox.AClassId = AClassId;
  AGroupBox.name = AGroupBox.id;
  AGroupBox.AComponentIndex = AComponentIndex;
  AGroupBox.style.position = "absolute";
  AGroupBox.style.left = ALeft;
  AGroupBox.style.top = ATop;
  AGroupBox.style.width = AWidth;
  AGroupBox.style.height = AHeight;
  AGroupBox.AVisible = AVisible;
  AGroupBox.style.visibility = IgHtmlVisibility(AVisible);
  IgTplGroup(AForm,AParent,AGroupBox,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,AAligners,APpmCnt);
};
function SCG(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AVisible,AStatus,  ARecordChanged,ADefaultControlId,AKeyValues,AClassId,AZIndex,ADtsId,ADetailGrpList,  ADetailKFld,AMasterIdx,AClickNew,AAligners,APpmCnt) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' class=TIgGroupBox>' + 
    '  <table width=100% height=100% class=TIgGroupBoxTable border=0 cellpadding=0 cellspacing=0>' + 
    '    <tr>' + 
    '      <td class=TIgGroupBoxCaption align=left valign=top width=100%>&nbsp' + ACaption + '</td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
  var AGroupBox = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  AGroupBox.AClassId = AClassId;
  AGroupBox.name = AGroupBox.id;
  AGroupBox.AComponentIndex = AComponentIndex;
  AGroupBox.style.position = "absolute";
  AGroupBox.style.left = ALeft;
  AGroupBox.style.top = ATop;
  AGroupBox.style.width = AWidth;
  AGroupBox.style.height = AHeight;
  AGroupBox.style.visibility = IgHtmlVisibility(AVisible);
  AGroupBox.style.overflow = "auto";
  AGroupBox.AVisible = AVisible;
  IgTplGroup(AForm,AParent,AGroupBox,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,AAligners,APpmCnt);
  AGroupBox.style.zIndex = AZIndex;
};
function TBS(AParentId,AId,ACaption,ALeft,ATop,AWidth,AHeight,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,AClassId,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,APpmCnt) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' class=TIgTabSheet>' + 
    '</div>');
  var ATabSheet = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  ATabSheet.AClassId = AClassId;
  ATabSheet.name = ATabSheet.id;
  ATabSheet.AComponentIndex = AComponentIndex;
  IgTplGroup(AForm,AParent,ATabSheet,AStatus,ARecordChanged,ADefaultControlId,AKeyValues,ADtsId,ADetailGrpList,ADetailKFld,AMasterIdx,AClickNew,null,APpmCnt);
  ATabSheet.style.position = "absolute";
  ATabSheet.style.left = ALeft;
  ATabSheet.style.top = ATop;
  ATabSheet.style.width = AWidth;
  ATabSheet.style.height = AHeight;
  ATabSheet.ATbsSel = (AParent.AActiveTbsId == AId);
};
function PGC(AParentId,AId,ALeft,ATop,AHeight,AClassId,ALeftTabIndex,AActivePageIndex,APageCount,ATopControls,AIsWizard,AMaxTabs,AShowArrs,ASbmChg) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  APageControlId = AId;
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' style="background-color:#EFEFCB;">' + 
    '  <table id=Tbl' + AId + ' style="background-color:#CECE9C" border=0 cellpadding=0 cellspacing=0>' + 
    '    <tr>' + IgTplHtmlPages(AActivePageIndex,APageCount,AComponentIndex,ALeftTabIndex,AIsWizard,AMaxTabs) + '<td width=100%></td></tr>' + 
    '  </table>' + 
    '</div>' + 
    '');
  var APageControl = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  APageControl.AMaxTabs = AMaxTabs;
  APageControl.AForm = AForm;
  APageControl.AParent = AParent;
  APageControl.ATbsSel = true;
  APageControl.AComponentIndex = AComponentIndex;
  APageControl.AActivePageIndex = AActivePageIndex;
  APageControl.AActiveTbsId = "CMP" + AComponentIndexArr[AActivePageIndex];
  APageControl.ATopControls = ATopControls;
  APageControl.AIsWizard = AIsWizard;
  APageControl.AShowArrs = AShowArrs;
  APageControl.ASbmChg = ASbmChg;
  ARenderTopControls = AId;
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'ActivePageIndex" value=' + AActivePageIndex + '>')
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'LeftTabIndex" value=' + ALeftTabIndex + '>')
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'SbmChg" value=0 AClassId=' + AClassId + '>')
  if (AShowArrs != 0) {
    if (ALeftTabIndex > 0) {
      IgTplPGCArrow(AParent,105,552,"PgcFirst",0);
      IgTplPGCArrow(AParent,104,572,"PgcLeft",IgPrevVisible(ALeftTabIndex-1)); }; 
    if (IgVisiblePageCount(APageCount) > AMaxTabs + ALeftTabIndex) {
      IgTplPGCArrow(AParent,105,592,"PgcRight",IgNextVisible(ALastVisiblePage+1,APageCount));
      IgTplPGCArrow(AParent,105,612,"PgcLast",IgPrevVisible(APageCount-1)); } } ;
  APageControl.AClassId = AClassId;
  APageControl.name = APageControl.id;
  APageControl.style.position = "absolute";
  APageControl.style.left = ALeft;
  APageControl.style.top = ATop;
  APageControl.style.height = "100%";
  APageControl.style.width = "100%";
  APageControl.ALeftTabIndex = ALeftTabIndex;
  APageControl.APageCount = APageCount;
  APageControl.ALastVisiblePage = ALastVisiblePage;
  AEnqueuedPageChangeIdx = APageControl.AActivePageIndex;
};
function IgTplPGCBorderSides(AImageName,APageIndex) {
  return(
    '<td><img src="/images/' + AImageName + '.gif"></td>' + 
    '');
};
function IgTplPGCBorderBack(AImageName,ACaption,APageIndex) {
  return(
    '<td onclick=IgPageControlClick("' + APageControlId + '",' + APageIndex + '); style="cursor:hand" class=TIgPageControlBorder background="/images/' + AImageName + '.gif">&nbsp;&nbsp;' + ACaption + '&nbsp;&nbsp;</td>' + 
    '');
};
function IgTplPGCArrow(AParent,ATop,ALeft,AId,APageIndex) {
  AArrow = document.createElement(
    '<img onclick=IgPageControlClick("' + APageControlId + '",' + APageIndex + '); id=' + AId + ' src="/images/' + AId + '.gif">' + 
    '');
  AArrow.style.position = "absolute";
  AArrow.style.left = ALeft;
  AArrow.style.top = ATop;
  AArrow.style.cursor = "hand";
  AParent.appendChild(AArrow);
};
function IgTplPGWBorderBack(AImageName,ACaption,APageIndex) {
  return(
    '<td class=TIgPageControlBorder background="/images/' + AImageName + '.gif">&nbsp;&nbsp;' + ACaption + '&nbsp;&nbsp;</td>' + 
    '');
};
function CHB(AParentId,AId,AValue,ALeft,ATop,AHeight,ACaption,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADisplayLabel,AReadOnly,ARequired,ADtsId,AFIndex,AReadOnlyE,AAligners,ADefaultValue) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<table id=Tbl' + AId + ' border=0 width=0 style="position:absolute;left:' + ALeft + '; top:' + (ATop-3) + '; height:' + AHeight + ';background-color:transparent;" class=TIgCheckBoxTable>' + 
    '  <tr>' + 
    '    <td><input type=checkbox id=' + AId + '></td>' + 
    '    <td>' + ACaption + '</td>' + 
    '  </tr>' + 
    '</table>');
  var AForm = eval("document.all." + AFormId);
  var ACheckBox = eval("document.all." + AId);
  var ATable = eval("document.all.Tbl" + AId);
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + ACheckBox.id + PPN + 'SubmittedValue" value="' + AValue + '">')
  IgTplAdjustStyle(ACheckBox,AParent,AClassId);
  ACheckBox.AClassId = AClassId;
  ACheckBox.onclick = IgCheckBoxClick;
  ACheckBox.name = ACheckBox.id;
  ACheckBox.onkeypress = IgEnterLikeTab;
  ACheckBox.AComponentIndex = AComponentIndex;
  ACheckBox.AForm = AForm;
  ATable.AParent = AParent;
  ACheckBox.AParent = AParent;
  ACheckBox.AClearOnNew = 1;
  ACheckBox.style.zIndex = AZIndex;
  ACheckBox.style.visibility = IgHtmlVisibility(AVisible);
  ACheckBox.AVisible = AVisible;
  ATable.style.visibility = IgHtmlVisibility(AVisible);
  ACheckBox.style.cursor = IgHtmlCursor(ACursor);
  ACheckBox.disabled = IgHtmlDisabled(AEnabled);
  IgCheckBoxChanged(ACheckBox,(AValue == "S"));
  if (ACheckBox.disabled != 0) ACheckBox.style.cursor = "default";
  if (AHint != "") {
    ACheckBox.onmousemove = IgShowHint;
    ACheckBox.onmouseout = IgHideHint;
  };
  IgTplInput(ACheckBox,AValue,AReadOnly,ARequired,0,ADisplayLabel,ADtsId,AFIndex,0,AReadOnlyE,ADefaultValue);
  IgCheckParentInTbsSel(ACheckBox,AParent);
  ACheckBox.AAligners = AAligners;
  IgTplAlign(ACheckBox);
};
function CBB(AParentId,AId,AValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADisplayLabel,AReadOnly,ARequired,ADataType,ADtsId,AItemIndex,AItemCount,AFIndex,ASubmitOnClick,AInPGC,AReadOnlyE,AAligners,ADefaultValue,ASelWidth) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<input id=' + AId + ' class=T' + AParent.AClassId + 'IgComboBox>');
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'Submitted" value=0>')
  var AForm = eval("document.all." + AFormId);
  var AComboBox = eval("document.all." + AId);
  AComboBox.ASubmitOnClick = ASubmitOnClick;
  AComboBox.AKeyValue = AValue;
  AComboBox.ASelWidth = ASelWidth;
  AComboBox.onkeydown = IgComboKeyDown;
  AComboBox.ADtlLkpIds = "";
  IgTplAdjustStyle(AComboBox,AParent,AClassId);
  IgTplControl(AForm,AParent,AComboBox,ALeft,ATop,AWidth-20,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,null);
  IgTplInput(AComboBox,AValue,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,0,AReadOnlyE,ADefaultValue);
  AComboBox.AAligners = AAligners;
  IgInsertIntoSelListAccTabOrder(AZIndex,"IgTplComboBox('" + AId + "'," + ALeft + "," + ATop + "," + AWidth + "," + AItemIndex + "," + AInPGC + ")");
};
function IgTplCBBArrow(AId) {
  return(
    '<img id=' + AId + ' src=/images/setacombo.gif>' + 
    '');
};
function IgTplCBBSelect(AId,AParent) {
  return(
    '<select id=' + AId + ' class=T' + AParent.AClassId + 'IgComboBox size=8></select>' + 
    '');
};
function RDB(AParentId,AId,AName,ACaption,ALeft,ATop,AWidth,AHeight,AZIndex,AClassId,AValue,AChecked) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<table id=Tbl' + AId + ' border=0 width=0 style="position:absolute;left:' + ALeft + '; top:' + (ATop-3) + '; height:' + AHeight + ';width:' + AWidth + ';background-color:transparent" class=TIgRadioTable>' + 
    '  <tr>' + 
    '    <td width=17><input type=radio id=' + AId + ' name=' + AName + '></td>' + 
    '    <td align=left>' + ACaption + '</td>' + 
    '  </tr>' + 
    '</table>');
  var ATable = eval("document.all.Tbl" + AId);
  ATable.style.zIndex = AZIndex;
  var ARadio = eval("document.all." + AId);
  ARadio.name = AName;
  ARadio.value = AValue;
  ARadio.checked = AChecked;
  ARadio.style.zIndex = AZIndex;
  ARadio.onkeypress = IgEnterLikeTab;
  var AForm = eval("document.all." + AFormId);
};
function RDG(AParentId,AId,ACaption,AItemIndex,ALeft,ATop,AWidth,AHeight, AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,ADataType,ADisplayLabel,AReadOnly,ARequired,ADtsId,AFIndex) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' class=TIgGroupBox>' + 
    '  <table width=100% height=100% class=TIgGroupBoxTable border=1 cellpadding=0 cellspacing=0>' + 
    '    <tr>' + 
    '      <td class=TIgGroupBoxCaption align=left valign=top width=100%>&nbsp' + ACaption + '</td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
  var ARadio = eval("document.all." + AId);
  var AForm = eval("document.all." + AFormId);
  ARadio.AClassId = AClassId;
  ARadio.name = ARadio.id;
  ARadio.AComponentIndex = AComponentIndex;
  IgTplAdjustStyle(ARadio,AParent,AClassId);
  IgTplControl(AForm,AParent,ARadio,ALeft,ATop,AWidth-20,AHeight,0,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex);
  IgTplInput(ARadio,AItemIndex,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,0,0,"");
  if (AVisible != 0) IgTplRadioGroup(ARadio.id,ALeft,ATop,AWidth,AItemIndex);
};
function LCB(AParentId,AId,AValue,AKeyValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADisplayLabel,AReadOnly,ARequired,ADataType,ADtsId,AItemIndex,AItemCount,AFIndex,ASubmitOnClick, AInPGC,AReadOnlyE,AMasterLkpId,ADtlLkpIds,AClearOnNew,AAligners,AFcEnb,ADefaultValue,ASelWidth) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<input id=' + AId + ' class=T' + AParent.AClassId + 'IgComboBox>');
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'Submitted" value=0>')
  var AForm = eval("document.all." + AFormId);
  var AComboBox = eval("document.all." + AId);
  AComboBox.ASubmitOnClick = ASubmitOnClick;
  AComboBox.AMasterLkpId = IgTplId(AMasterLkpId);
  AComboBox.ADtlLkpIds = ADtlLkpIds;
  AComboBox.ASelWidth = ASelWidth;
  AComboBox.AKeyValue = AKeyValue;
  AComboBox.onkeydown = IgComboKeyDown;
  IgTplAdjustStyle(AComboBox,AParent,AClassId);
  IgTplControl(AForm,AParent,AComboBox,ALeft,ATop,AWidth-20,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex);
  IgTplInput(AComboBox,AValue,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,0,AReadOnlyE,ADefaultValue);
  AComboBox.AAligners = AAligners;
  AComboBox.AFcEnb = AFcEnb;
  IgInsertIntoSelListAccTabOrder(AZIndex,"IgTplComboBox('" + AId + "'," + ALeft + "," + ATop + "," + AWidth + "," + AItemIndex + "," + AInPGC + ")");
  AComboBox.AClearOnNew = AClearOnNew;
};
function FCB(AParentId,AId,AValue,AKeyValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADisplayLabel,AReadOnly,ARequired,ADataType,ADtsId,AItemIndex,AItemCount,AFIndex,ASubmitOnClick, AInPGC,AReadOnlyE,AMasterLkpId,ADtlLkpIds,AClearOnNew,AAligners,AFcEnb,ADefaultValue,ASelWidth) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<iframe name=Frm' + AId + ' ID=Frm' + AId + ' frameborder=0 SRC="" ALLOWTRANSPARENCY="true"></iframe>');
  var AForm = eval("document.all." + AFormId);
  var AComboBox = eval("document.all.Frm" + AId);
  AComboBox.ASubmitOnClick = ASubmitOnClick;
  AComboBox.AMasterLkpId = IgTplId(AMasterLkpId);
  AComboBox.ADtlLkpIds = ADtlLkpIds;
  AComboBox.ASelWidth = ASelWidth;
  AComboBox.AKeyValue = AKeyValue;
  AComboBox.onkeydown = IgComboKeyDown;
  IgTplAdjustStyle(AComboBox,AParent,AClassId);
  IgTplControl(AForm,AParent,AComboBox,ALeft,ATop,AWidth-20,AHeight+4,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex);
  IgTplInput(AComboBox,AValue,AReadOnly,ARequired,ADataType,ADisplayLabel,ADtsId,AFIndex,0,AReadOnlyE,ADefaultValue);
  AComboBox.AAligners = AAligners;
  AComboBox.AFcEnb = AFcEnb;
  AComboBox.style.overflow = "hidden";
  IgInsertIntoSelListAccTabOrder(AZIndex,"IgFrmComboBox('Frm" + AId + "'," + ALeft + "," + ATop + "," + AWidth + "," + AItemIndex + "," + AInPGC + ")");
  AComboBox.AClearOnNew = AClearOnNew;
};
function GRD(AParentId,AId,AValue,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint, AZIndex,AClassId,ADtsId,AGridStyle,AAlign,ASubmit,ACbxGrdClk,ARecCount,AColCount,ASelectedIndex,ACalcFields,ASumFactor, ASumResult,AInPGC,ASelOnClick,AAligners,ACellHdrs) {
  ACountGrid++;
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  AIdx = AId;
  AId = IgTplId(AId);
  var AParent = eval("document.all." + AParentId);
  if ((AGridStyle == 0) || (AGridStyle == 2) || (AGridStyle == 3)) // Table
    AParent.insertAdjacentHTML('beforeEnd',IgTplGRDTable(AId))
  else if (AGridStyle == 1) // Select
    AParent.insertAdjacentHTML('beforeEnd',IgTplGRDSelect(AId))
  else if (AGridStyle == 4) // Widget
    AParent.insertAdjacentHTML('beforeEnd',IgTplGRDWidget(AId));
  var AForm = eval("document.all." + AFormId);
  var AGrid = eval("document.all." + AId);
  IgTplControl(AForm,AParent,AGrid,ALeft,ATop,AWidth,AHeight,AAlignment,AVisible,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners);
  IgInsertOnForm(AForm,AGrid.id,'SelectedIndex',ASelectedIndex);
  IgInsertOnForm(AForm,AGrid.id,'Submitted','0' + ' AClassId=' + AClassId);
  IgInsertOnForm(AForm,AGrid.id,'Cleared',0);
  IgInsertOnForm(AForm,AGrid.id,'SelectedCol',0);
  AGrid.value = AValue;
  AGrid.AForm = AForm;
  AGrid.ADtsId = ADtsId;
  AGrid.AInPGC = AInPGC;
  AGrid.ASubmitOnClick = ASubmit;
  AGrid.ACalcFields = ACalcFields;
  AGrid.ACbxGrdClk = ACbxGrdClk;
  AGrid.ASumFactor = ASumFactor;
  AGrid.ASumResult = ASumResult;
  AGrid.ARecCount = ARecCount;
  AGrid.AGridStyle = AGridStyle;
  AGrid.ASelOnClick = ASelOnClick;
  var ATable = eval("document.all.Tbl" + AId);
  if (AAlign == 5) {
    AGrid.style.position = "";
    AGrid.style.width = "100%";
    AGrid.style.height = "100%";
  } else
    AGrid.style.overflow = "auto";
  if ((AGridStyle == 0) || (AGridStyle == 2) || (AGridStyle == 3)) { // Table
    IgTplGridTable(AId,ATable,AGrid,AComponentIndex,ACbxGrdClk,ARecCount,AInPGC);
  }
  else if (AGridStyle == 1) {
    var ASelect = eval("document.all.Sel" + AId);
    ASelect.AGrid = AGrid;
    IgTplGridSelect(AId,ATable,ASelect,AComponentIndex);
  }
  else if (AGridStyle == 4) {
    AGrid.ACmbCols = MAGICCHAR;
    IgTplGridWidget(AGrid,ARecCount,AColCount,ASelectedIndex);
  }
  if (ACellHdrs) IgTplCellHdrs(AGrid,ACellHdrs);;
  ARenderGridSelectList = ARenderGridSelectList + "IgTplGridSelectList('" + AId + "')" + MAGICCHAR;
};
function TED(AParentId,AId,AValue,ALeft,ATop,AWidth,AHeight,AEnabled,ACursor,AHint, AZIndex,AClassId,ADtsId,AInPGC,AAligners) {
  AComponentIndex = AId;
  AFormId = IgTplId(0);
  AParentId = IgTplId(AParentId);
  var idGenerator = new IDGenerator(0);
  var editor = new Editor(idGenerator);
  var AParent = eval("document.all." + AParentId);
  AId = IgTplId(AId);
  AParent.insertAdjacentHTML('beforeEnd',
    '<div id=' + AId + ' style="background-color:#EFEFCB">' + 
    '  <table width=100% height=100% cellspacing=0 cellpadding=1 border=0>' + 
    '    <tr valign="top">' + 
    '      <td>' + 
    '        ' + editor.Instantiate(AWidth,AHeight) + '' + 
    '      </td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
  var AForm = eval("document.all." + AFormId);
  var AEditor = eval("document.all." + AId);
  AEditor.editor = editor;
  IgTplControl(AForm,AParent,AEditor,ALeft,ATop,AWidth,AHeight,0,1,AEnabled,ACursor,AHint,AZIndex,AClassId,AComponentIndex,AAligners);
  AEditor.value = AValue;
  AEditor.AForm = AForm;
  AEditor.ADtsId = ADtsId;
  AEditor.ADefaultValue = "";
  var html = '';
  html += '<style type="text/css">p {margin-top:0px;margin-bottom:0px;}</style><body style="font:10pt arial">' + IgDecodeQuotes2(AValue);
  html += '</body>';
  var AFrame = eval(EDITOR_COMPOSITION_PREFIX + editor.id);
  AFrame.document.open();
  AFrame.document.write(html);
  AFrame.document.close();
  AFrame.document.designMode = "on";
  var ABfsStr = AId + "#IgTextEdBeforeSubmit" + MAGICCHAR;
  if (AInPGC==0) 
    ABeforeSubmit = ABeforeSubmit + ABfsStr
  else 
    APgcBeforeSubmit = APgcBeforeSubmit + ABfsStr;
  AParent.insertAdjacentHTML('beforeEnd','<input type=hidden name="' + AId + PPN + 'TextValue" value="">')
};
function IgTplGRDTable(AId,AParent) {
  return(
    '<div id=' + AId + ' style="background-color:#EFEFCB">' + 
    '  <table width=100% height=100% cellspacing=0 cellpadding=1 border=0>' + 
    '    <tr>' + 
    '      <td>' + 
    '        <table id=Tbl' + AId + ' width=100% height=100% cellspacing=0 cellpadding=1 border=2>' + 
    '        </table>' + 
    '      </td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
};
function IgTplGRDWidget(AId,AParent) {
  return(
    '<div id=' + AId + ' style="background-color:#EFEFCB">' + 
    '</div>');
};
function IgTplGRDTitleRow(AId,AParent) {
  return(
    '<TR class=TIgGridTitleRow></tr>' + 
    '<tr>' + 
    '  <td class=TIgGridTitleRow></td>' + 
    '</tr>');
};
function IgTplGRDTableOddRow(AId,AParent) {
  return(
    '<TR class=TIgGridTableOddRow></tr>');
};
function IgTplGRDTableEvenRow(AId,AParent) {
  return(
    '<TR class=TIgGridTableEvenRow></tr>');
};
function IgTplGRDSelect(AId,AParent) {
  return(
    '<div id=' + AId + ' >' + 
    '  <table id=Tbl' + AId + ' height=100% width=100% cellspacing=0 cellpadding=0 border=0>' + 
    '    <tr>' + 
    '      <td>' + 
    '        <select id=Sel' + AId + ' style="font-size:9px">' + 
    '        </select>' + 
    '      </td>' + 
    '    </tr>' + 
    '  </table>' + 
    '</div>');
};
function IgTplGRDSelectOddRow(AId,AParent) {
  return(
    '<option class=TIgGridSelectOddRow></option>');
};
function IgTplGRDSelectEvenRow(AId,AParent) {
  return(
    '<option class=TIgGridSelectEvenRow></option>');
};
function MNU(ABodyId) {
  var ABody = eval("document.all." + ABodyId);
  ABody.insertAdjacentHTML('beforeEnd',
    '<style type="text/css"> ' + 
    '<!-- ' + 
    '.textomenu { ' + 
    '	font-family: Verdana, Arial, Helvetica, sans-serif; ' + 
    '	font-size: 9px; ' + 
    '	font-style: normal; ' + 
    '	font-weight: bold; ' + 
    '	color: #333333; ' + 
    '} ' + 
    '.textoSUBmenu { ' + 
    '	font-family: Verdana, Arial, Helvetica, sans-serif; ' + 
    '	font-size: 9px; ' + 
    '	font-style: normal; ' + 
    '	font-weight: normal; ' + 
    '	color: #FFFFFF; ' + 
    '	text-decoration: none; ' + 
    '} ' + 
    '.BEsqCinza { ' + 
    '	border-left-width: 1px; ' + 
    '	border-left-style: solid; ' + 
    '	border-left-color: #CCCCCC; ' + 
    '} ' + 
    '--> ' + 
    '</style> ' + 
    '<HTML> ' + 
    '<BODY style="marginleft:5"> ' + 
    '</BODY> ' + 
    '</HTML> ' + 
    '<script language=javascript src="/js/menulib.js"></script> ' + 
    '<script language=javascript> ' + 
    '' + IgTplMenu() + '' + 
    '</script>' + 
    '</HTML>' + 
    '');
};
function IDX(ABodyId) {
  var ABody = eval("document.all." + ABodyId);
  ABody.insertAdjacentHTML('beforeEnd',
    '<HTML><HEAD></HEAD>' + 
    '<frameset border=0 cols="100%" rows="55,*">' + 
    '<frame name=title src=FTitle scrolling=no noresize marginwidth=5 marginheight=5>' + 
    '<frameset cols="160,*" rows="100%">' + 
    '<frame name=menu src=FMenu scrolling=auto marginwidth=5 marginheight=0>' + 
    '<frame name=body src=FBody scrolling=no marginwidth=0 marginheight=0 APPLICATION=yes></frameset></frameset>' + 
    '</HTML>' + 
    '');
};
function TIT(ABodyId) {
  var ABody = eval("document.all." + ABodyId);
  AFormHasDefault = 0;
  ABody.insertAdjacentHTML('beforeEnd',
    '<table width=100% border=0 bordercolor=red class=BEsqCinza cellpadding=0 cellspacing=0>' + 
    '  <tr>' + 
    '    <td><table width=100% border=0 height=100% bordercolor=black class=BEsqCinza cellpadding=0 cellspacing=0>' + 
    '      <tr>       ' + 
    '        <td><img src=/images/Flogoesq.jpg></td>' + 
    '        <td><table width=100% border=0 height=100% bordercolor=blue class=BEsqCinza cellpadding=0 cellspacing=0>' + 
    '          <tr><td valign=top><img src=/images/Flogomeio.jpg></td></tr>' + 
    '          <tr><td><img name=ImgLogoCorp width=50 height=48 src=/images/spacer.gif></td></tr>' + 
    '        </table></td>' + 
    '      </tr>' + 
    '    </table></td>' + 
    '    <td><img src=/images/barralisesquerda.jpg></td>' + 
    '    <td width=100% background=/images/barralismeio.jpg></td>' + 
    '    <td><img src=/images/barralisdireita.jpg></td>' + 
    '    <td><table width=100% border=0 height=100% bordercolor=black class=BEsqCinza cellpadding=0 cellspacing=0>' + 
    '      <tr>       ' + 
    '        <td><table width=100% border=0 height=100% bordercolor=blue class=BEsqCinza cellpadding=0 cellspacing=0>' + 
    '          <tr><td valign=top><img src=/images/Flogomeio.jpg></td></tr>' + 
    '          <tr><td><img name=ImgLogoEnt width=50 height=48 src=/images/spacer.gif></td></tr>' + 
    '        </table></td>' + 
    '        <td><img src=/images/Flogodir.jpg></td>' + 
    '      </tr>' + 
    '    </table></td>' + 
    '  </tr>' + 
    '  <tr>' + 
    '    <td><img src=/images/lisazubresq1.jpg></td>' + 
    '    <td><img src=/images/lisazubresq2.jpg></td>' + 
    '    <td><img src=/images/lisazubresq.jpg></td>' + 
    '    <td width=100% background=/images/lisazubrmeio.jpg></td>' + 
    '    <td width=100% background=/images/lisazubrdir.jpg></td>' + 
    '    <td width=100% background=/images/lisazubrmeio.jpg></td>' + 
    '  </tr>' + 
    '</table>' + 
    '');
};
function BOD(ABodyId) {
  var ABody = eval("document.all." + ABodyId);
  ABody.insertAdjacentHTML('beforeEnd',
    '<body leftmargin=1 topmargin=1 rightmargin=5 bottommargin=1>' + 
    '<table class=TIgFormTable border=0 width=100% height=100% cellpadding=0 cellspacing=0>' + 
    '  <tr>' + 
    '    <td><img src=/images/curva_form.gif></td>' + 
    '    <td width=100% background=/images/retahoriz_form.gif></td>' + 
    '  </tr>' + 
    '  <tr>' + 
    '    <td height=100% background=/images/retavert_form.gif></td>' + 
    '    <td valign=top>' + 
    '    <table border=0 width=100% height=100% align=top cellpadding=0 cellspacing=0>' + 
    '      <tr>' + 
    '        <td width=17><img src=/images/bordamarbol.gif width=17 height=23></td>' + 
    '        <td background=/images/cabecalhoamar.gif class=TIgFormCaption>&nbsp;<div align=right></div></td>' + 
    '        <td background=/images/cabecalhoamar.gif class=TIgFormBorderIcons align=right></td>' + 
    '        <td width=17><img src=/images/fimbordamar.gif width=17 height=23></td>' + 
    '      </tr>' + 
    '      <tr><td><img src="/images/SPACER.gif" height="2"></td></tr>' + 
    '      <tr>' + 
    '        <td height=100% colspan=4 bgcolor="#CECE9C"></td>' + 
    '      </tr>' + 
    '    </table>' + 
    '    </td>' + 
    '  </tr>' + 
    '</table>' + 
    '</body>');
};
