From: <Saved by Microsoft Internet Explorer 5>
Subject: Encomenda
Date: Fri, 18 Oct 2002 16:16:32 +0100
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="----=_NextPart_000_00D8_01C276C1.B8DBBF50";
	type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

This is a multi-part message in MIME format.

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/eVerde/rows/encomenda.asp?key=11

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML lang=3Dpt><HEAD><TITLE>Encomenda</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"><LINK=20
href=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/WAMcss.win.css.txt"=20
type=3Dtext/css rel=3DSTYLESHEET><LINK=20
href=3D"http://interno.cvrvv.pt/eVerde/css/WAMcss.win.css.txt" =
type=3Dtext/css=20
rel=3DSTYLESHEET>
<SCRIPT language=3DJavaScript=20
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/window_prototype.js">=0A=
</SCRIPT>

<SCRIPT language=3DJavaScript>=0A=
<!--=0A=
var WAMRootURL =3D 'http://interno.cvrvv.pt/eVerde/';=0A=
var WAMMessages =3D new Array();=0A=
//-->=0A=
</SCRIPT>

<SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function window_onLoad(){=0A=
	window.executeOnLoad();=0A=
}=0A=
=0A=
//-->=0A=
</SCRIPT>

<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR></HEAD>
<BODY leftMargin=3D0 topMargin=3D0=20
onload=3D'javascript:if (typeof(window_onLoad) =3D=3D "function") =
window_onLoad();'=20
marginHeight=3D"0" marginWidth=3D"0"><!--- WAM --->
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" border=3D0>
  <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
var objWAMRow;=0A=
function Create_objWAMRow(){=0A=
	objWAMRow =3D new WAMRow('encomenda', =
'http://interno.cvrvv.pt/eVerde/');=0A=
	objWAMRow.rowMode =3D 2;=0A=
	objWAMRow._customRow =3D false;=0A=
}=0A=
window.addToOnLoad(Create_objWAMRow);=0A=
=0A=
//-->=0A=
</SCRIPT>

  <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
=0A=
function Columns(){=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'numEnc', 'int', 'null', =
null, 10, 0, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'data', 'datetime', 'null', =
null, 23, 3, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'estado', 'char', 'null', =
1, null, null, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'cliente', 'varchar', =
'null', 35, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaNome', 'varchar', =
'null', 80, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaMorada', 'varchar', =
'null', 255, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaCidade', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaCodex', 'varchar', =
'null', 80, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaPais', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaTelefone', =
'varchar', 'null', 30, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'entregaEmail', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaNome', 'varchar', =
'null', 80, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaMorada', 'varchar', =
'null', 255, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaCidade', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaCodex', 'varchar', =
'null', 80, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaPais', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaTelefone', =
'varchar', 'null', 30, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaEmail', 'varchar', =
'null', 60, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'facturaContrib', =
'varchar', 'null', 20, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'subTotal', 'money', =
'null', null, 19, 4, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'totalIVA', 'money', =
'null', null, 19, 4, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'total', 'money', 'null', =
null, 19, 4, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'custoTransporteSD', =
'money', 'null', null, 19, 4, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'comissaoSD', 'money', =
'null', null, 19, 4, false));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'formaPagSD', 'varchar', =
'null', 50, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'pedidoSD', 'varchar', =
'null', 50, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'nOrdemSD', 'varchar', =
'null', 50, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'distribuicaoSD', =
'varchar', 'null', 255, null, null, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'dataLevantaSD', =
'datetime', 'wamdate', null, 23, 3, true));=0A=
	objWAMRow.add(new WAMRowColumn('encomenda', 'obs', 'varchar', 'null', =
255, null, null, true));=0A=
	objWAMRow.columns['numEnc'].setPk();=0A=
}=0A=
window.addToOnLoad(Columns);=0A=
var lookups =3D new Array();=0A=
=0A=
function CreateLookups(lookups){=0A=
	var obj =3D new WAMLookup('dbo', 'FK_encomenda_cliente', 'dbo', =
'encomenda', 'dbo', 'cliente');=0A=
	obj.addPkColumn(new WAMLookupColumn('cliente', 'clienteID', 'varchar', =
'null', 35, null, null, ''), objWAMRow.columns['cliente'].getHTMLEl());=0A=
	obj.addLkColumn(new WAMLookupColumn('cliente', 'nome', 'varchar', =
'null', 60, null, null, ''));=0A=
	objWAMRow.add(obj);=0A=
	obj._customRow =3D false;=0A=
	obj._customList =3D false;=0A=
=0A=
=0A=
lookups =3D objWAMRow.lookups;=0A=
}=0A=
=0A=
function InitLKs(){=0A=
	CreateLookups(lookups);=0A=
}=0A=
window.addToOnLoad(InitLKs);=0A=
// --- This event is used when the user abandon the row without saving=0A=
function window_onBeforeUnload(){=0A=
	if (objWAMRow.isDirty() && objWAMRow.getAction() =3D=3D =
WAMROW_ACTIONEMPTY){=0A=
		window.event.returnValue =3D WAMMessages.MESSAGE_ROW_close;=0A=
	}=0A=
}=0A=
//window.onbeforeunload =3D window_onBeforeUnload;=0A=
function __RowClientMessages(){=0A=
	WAMMessages['MESSAGE_ROW_delete'] =3D "Tem a certeza que pretende =
eliminar este registo?\n\nClick em 'Ok' para apagar este registo para =
sempre. N=E3o ser=E1 poss=EDvel voltar atr=E1s.";=0A=
}=0A=
window.addToOnLoad(__RowClientMessages);=0A=
=0A=
//-->=0A=
</SCRIPT>

  <TBODY>
  <TR>
    <TD class=3DcssWAMwinTitle>&nbsp;</TD>
    <TD class=3DcssWAMwinTitle><SPAN =
class=3DcssWAMwinTitleTop><NOBR>e-Verde=20
      Gestor v1.2<BR></SPAN><SPAN class=3DcssWAMwinTitleBottom=20
      title=3DEncomenda><NOBR>Encomenda</SPAN></NOBR></TD></TR>
  <TR>
    <TD colSpan=3D2 height=3D10></TD></TR>
  <TR>
    <TD><IMG height=3D1=20
      src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/Images/space.gif" =

    width=3D10></TD>
    <TD width=3D"100%">
      <TABLE id=3DWAMCanvas cellSpacing=3D0 cellPadding=3D0 border=3D0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=3D0 cellPadding=3D0 border=3D0>
              <TBODY>
              <TR>
                <TD noWrap>
                  <FORM id=3D__formWAMRow name=3D__formWAMRow=20
                  onsubmit=3D"return false;" =
action=3D/eVerde/rows/encomenda.asp=20
                  method=3Dpost>
                  <TABLE cellSpacing=3D0 cellPadding=3D1 width=3D"100%" =
border=3D0>
                    <TBODY>
                    <TR>
                      <TD align=3Dright><BR>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
var objCaller_dbo_VVShopCancelarEncomenda;=0A=
function __WAMCaller_CreateCallerFor_dbo_VVShopCancelarEncomenda(){=0A=
	objCaller_dbo_VVShopCancelarEncomenda =3D new WAMCaller('dbo', =
'VVShopCancelarEncomenda', 'Prosseguir com a opera=E7=E3o Cancelar =
Encomenda\n(Cancelar Encomenda) ?','A encomenda 11 foi cancelada com =
sucesso', null, 'null');=0A=
	objCaller_dbo_VVShopCancelarEncomenda._setArguments('numEnc',"11");=0A=
	objCaller_dbo_VVShopCancelarEncomenda._myName =3D =
'objCaller_dbo_VVShopCancelarEncomenda';=0A=
}=0A=
window.addToOnLoad(__WAMCaller_CreateCallerFor_dbo_VVShopCancelarEncomend=
a);=0A=
=0A=
//-->=0A=
</SCRIPT>
<INPUT class=3DcssWAMstandardButton id=3Dbtndbo_VVShopCancelarEncomenda =
title=3D"Cancelar Encomenda" style=3D"WIDTH: 130px" =
onclick=3D"javascript: objCaller_dbo_VVShopCancelarEncomenda.execute();" =
type=3Dbutton value=3D"Cancelar Encomenda" =
name=3Dbtndbo_VVShopCancelarEncomenda><BR></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=3D0 cellPadding=3D1 border=3D0>
                    <TBODY>
                    <TR>
                      <TD width=3D90></TD></TR>
                    <TR>
                      <TD align=3Dright><B>N=FAmero</B></TD>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD noWrap><INPUT class=3DcssWAMstandardEdit =

                              id=3Dencomenda_numEnc title=3D"N=FAmero da =
encomenda"=20
                              style=3D"WIDTH: 74px; TEXT-ALIGN: right" =
disabled=20
                              tabIndex=3D0 size=3D11 value=3D11 =
name=3Dencomenda_numEnc=20
                              label=3D"N=FAmero"></TD>
                            <TD>&nbsp;</TD>
                            <TD vAlign=3Dcenter noWrap=20
align=3Dright><B>Data</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_data=20
                              title=3D"Data de encomenda"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: right" =
tabIndex=3D0=20
                              size=3D19 value=3D"20-02-2002 11:31:20"=20
                              name=3Dencomenda_data label=3D"Data"></TD>
                            <TD>&nbsp;</TD>
                            <TD vAlign=3Dcenter noWrap=20
                            align=3Dright><B>Estado</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><SELECT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_estado=20
                              title=3D"Estado da encomenda" disabled =
tabIndex=3D0=20
                              name=3Dencomenda_estado label=3D"Estado"> =
<OPTION=20
                                value=3DP>Pendente<OPTION=20
                                value=3DA>Autorizada<OPTION value=3DS=20
                                selected>Satisfeita<OPTION=20
                                value=3DX>Cancelada</OPTION></SELECT>=20
                        </TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap align=3Dright><B><A=20
                        class=3DcssWAMdecor title=3D"Procurar um =
registo"=20
                        =
onclick=3D'javascript:lookups["FK_encomenda_cliente"].zoomList();'=20
                        tabIndex=3D-1 =
href=3D"javascript:void(null)"><IMG height=3D12=20
                        =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/arrow-top-right.g=
if"=20
                        width=3D8 border=3D0></A>&nbsp;<A =
class=3DcssWAMzoom=20
                        title=3D"Editar registo"=20
                        =
onclick=3D'javascript:lookups["FK_encomenda_cliente"].zoomRow();'=20
                        tabIndex=3D-1=20
                        =
href=3D"javascript:void(null)">Cliente/Visitante</A></B></TD>
                      <TD=20
                      style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 0px; =
PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_cliente=20
                              type=3Dhidden size=3D35=20
                              value=3D1CT818XTLUBD9MT25R3X6UA9UKPQ3GUC=20
                              name=3Dencomenda_cliente=20
                            label=3D"Cliente/Visitante"></TD>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3DFK_encomenda_cliente_cliente_nome =
title=3D""=20
                              style=3D"WIDTH: 368px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D60 value=3D"Miguel Calejo"=20
                              name=3DFK_encomenda_cliente_cliente_nome=20
                          label=3D""></TD></TR>
                          <TR>
                            <TD></TD>
                            =
<TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=3D0 cellPadding=3D0 border=3D0>
                    <TBODY>
                    <TR>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD width=3D90></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Nome</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_entregaNome =
title=3D"Morada de Entrega: Nome" style=3D"WIDTH: 248px; HEIGHT: 36px" =
tabIndex=3D0 name=3Dencomenda_entregaNome cols=3D40 label=3D"Ent. =
Nome">Miguel Calejo</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Morada</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_entregaMorada =
title=3D"Morada de Entrega: Morada" style=3D"WIDTH: 248px; HEIGHT: 63px" =
tabIndex=3D0 name=3Dencomenda_entregaMorada rows=3D5 cols=3D40 =
label=3D"Ent. Morada">R. Cerca 88</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Cidade</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3Dencomenda_entregaCidade=20
                              title=3D"Morada de Entrega: Cidade"=20
                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3DPorto =
name=3Dencomenda_entregaCidade=20
                              label=3D"Ent. Cidade"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Codex</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_entregaCodex =
title=3D"Morada de Entrega: Codex" style=3D"WIDTH: 248px; HEIGHT: 36px" =
tabIndex=3D0 name=3Dencomenda_entregaCodex cols=3D40 label=3D"Ent. =
Codex">4150 200 PORTO</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Pa=EDs</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_entregaPais=20
                              title=3D"Morada de Entrega: Pa=EDs"=20
                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3DPT =
name=3Dencomenda_entregaPais=20
                              label=3D"Ent. Pa=EDs"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Telefone</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3Dencomenda_entregaTelefone=20
                              title=3D"Morada de Entrega: Telefone"=20
                              style=3D"WIDTH: 188px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D30 value=3D0:226109516=20
                              name=3Dencomenda_entregaTelefone=20
                              label=3D"Ent. Telefone"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ent.=20
                              Email</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_entregaEmail=20
                              title=3D"Morada de Entrega: Email"=20
                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3Dmc@declarativa.com=20
                              name=3Dencomenda_entregaEmail=20
                          label=3D"Ent. =
Email"></TD></TR></TBODY></TABLE></TD>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Nome</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_facturaNome =
title=3D"Morada de Factura=E7=E3o: Nome" style=3D"WIDTH: 248px; HEIGHT: =
36px" tabIndex=3D0 name=3Dencomenda_facturaNome cols=3D40 label=3D"Fact. =
Nome">Miguel Calejo</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Morada</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_facturaMorada =
title=3D"Morada de Factura=E7=E3o: Morada" style=3D"WIDTH: 248px; =
HEIGHT: 63px" tabIndex=3D0 name=3Dencomenda_facturaMorada rows=3D5 =
cols=3D40 label=3D"Fact. Morada">R. Cerca 88</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Cidade</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3Dencomenda_facturaCidade=20
                              title=3D"Morada de Factura=E7=E3o: Cidade" =

                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3DPorto =
name=3Dencomenda_facturaCidade=20
                              label=3D"Fact. Cidade"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Codex</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_facturaCodex =
title=3D"Morada de Factura=E7=E3o: Codex" style=3D"WIDTH: 248px; HEIGHT: =
36px" tabIndex=3D0 name=3Dencomenda_facturaCodex cols=3D40 =
label=3D"Fact. Codex">4150 200 PORTO</TEXTAREA></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Pa=EDs</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_facturaPais=20
                              title=3D"Morada de Factura=E7=E3o: Pa=EDs" =

                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3DPT =
name=3Dencomenda_facturaPais=20
                              label=3D"Fact. Pa=EDs"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Telefone</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3Dencomenda_facturaTelefone=20
                              title=3D"Morada de Factura=E7=E3o: =
Telefone"=20
                              style=3D"WIDTH: 188px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D30 value=3D0:226109516=20
                              name=3Dencomenda_facturaTelefone=20
                              label=3D"Fact. Telefone"></TD></TR>
                          <TR>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Fact.=20
                              Email</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_facturaEmail=20
                              title=3D"Morada de Factura=E7=E3o: Email"=20
                              style=3D"WIDTH: 248px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D40 value=3Dmc@declarativa.com=20
                              name=3Dencomenda_facturaEmail=20
                          label=3D"Fact. =
Email"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=3D0 cellPadding=3D1 border=3D0>
                    <TBODY>
                    <TR>
                      <TD width=3D90></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap=20
                      align=3Dright><B>Contribuinte</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                        class=3DcssWAMstandardEdit =
id=3Dencomenda_facturaContrib=20
                        title=3D"Factura=E7=E3o: n=FAmero de =
contribuinte"=20
                        style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                        value=3D107970384 =
name=3Dencomenda_facturaContrib=20
                        label=3D"Contribuinte"></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Subtotal</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                        class=3DcssWAMstandardEdit =
id=3Dencomenda_subTotal=20
                        title=3DSubtotal style=3D"WIDTH: 80px; =
TEXT-ALIGN: right"=20
                        disabled tabIndex=3D0 size=3D12 value=3D31.56=20
                        name=3Dencomenda_subTotal =
label=3D"Subtotal"></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap align=3Dright><B>Total =
IVA</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                        class=3DcssWAMstandardEdit =
id=3Dencomenda_totalIVA=20
                        title=3D"Total IVA" style=3D"WIDTH: 80px; =
TEXT-ALIGN: right"=20
                        disabled tabIndex=3D0 size=3D12 value=3D0.00=20
                        name=3Dencomenda_totalIVA label=3D"Total =
IVA"></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Total</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                        class=3DcssWAMstandardEdit id=3Dencomenda_total =
title=3DTotal=20
                        style=3D"WIDTH: 80px; TEXT-ALIGN: right" =
disabled=20
                        tabIndex=3D0 size=3D12 value=3D31.56 =
name=3Dencomenda_total=20
                        label=3D"Total"></TD></TR>
                    <TR>
                      <TD align=3Dright><B>$ Trans. SD</B></TD>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD noWrap><INPUT class=3DcssWAMstandardEdit =

                              id=3Dencomenda_custoTransporteSD=20
                              title=3D"Custo de transporte (Shopping =
Direct)"=20
                              style=3D"WIDTH: 80px; TEXT-ALIGN: right" =
disabled=20
                              tabIndex=3D0 size=3D12 value=3D3.50=20
                              name=3Dencomenda_custoTransporteSD=20
                              label=3D"$ Trans. SD"></TD>
                            <TD>&nbsp;</TD>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Comiss=E3o=20
                              SD</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_comissaoSD=20
                              title=3D"Comiss=E3o para a Shopping =
Direct"=20
                              style=3D"WIDTH: 80px; TEXT-ALIGN: right" =
disabled=20
                              tabIndex=3D0 size=3D12 value=3D2.05=20
                              name=3Dencomenda_comissaoSD=20
                          label=3D"Comiss=E3o =
SD"></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap align=3Dright><B>Forma =
Pag.=20
                      SD</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                        class=3DcssWAMstandardEdit =
id=3Dencomenda_formaPagSD=20
                        title=3D"Forma de Pagamento (Shopping Direct)"=20
                        style=3D"WIDTH: 188px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                        size=3D30 value=3D"CARTAO CREDITO" =
name=3Dencomenda_formaPagSD=20
                        label=3D"Forma Pag. SD"></TD></TR>
                    <TR>
                      <TD align=3Dright><B>Pedido SD</B></TD>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD noWrap><INPUT class=3DcssWAMstandardEdit =

                              id=3Dencomenda_pedidoSD=20
                              title=3D"Pedido (Shopping Direct)"=20
                              style=3D"WIDTH: 188px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D30 value=3DSD-1020220113431-229=20
                              name=3Dencomenda_pedidoSD label=3D"Pedido =
SD"></TD>
                            <TD>&nbsp;</TD>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Ordem=20
                              Pedido SD</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3Dencomenda_nOrdemSD=20
                              title=3D"N=FAmero de Ordem (Shopping =
Direct)"=20
                              style=3D"WIDTH: 188px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              size=3D30 value=3Dabc-000124832-xyz=20
                              name=3Dencomenda_nOrdemSD=20
                          label=3D"Ordem Pedido =
SD"></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD align=3Dright><B>Distribui=E7=E3o SD</B></TD>
                      <TD>
                        <TABLE cellSpacing=3D0 cellPadding=3D1 =
border=3D0>
                          <TBODY>
                          <TR>
                            <TD noWrap><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_distribuicaoSD =
title=3D"Distribui=E7=E3o (Shopping Direct)" style=3D"WIDTH: 248px; =
HEIGHT: 63px" tabIndex=3D0 name=3Dencomenda_distribuicaoSD rows=3D5 =
cols=3D40 label=3D"Distribui=E7=E3o =
SD">ShipMinStandard:20020301:15001800:empty</TEXTAREA></TD>
                            <TD>&nbsp;</TD>
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B>Data=20
                              Levantamento SD</B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3Dencomenda_dataLevantaSD=20
                              title=3D"Data de levantamento da encomenda =
no AE (Shopping Direct)"=20
                              style=3D"WIDTH: 74px; TEXT-ALIGN: right" =
tabIndex=3D0=20
                              size=3D10 name=3Dencomenda_dataLevantaSD=20
                              label=3D"Data Levantamento =
SD"></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD vAlign=3Dcenter noWrap=20
                      align=3Dright><B>Observa=E7=F5es</B></TD>
                      <TD vAlign=3Dcenter align=3Dleft><TEXTAREA =
class=3DcssWAMstandardEditTEXTAREA id=3Dencomenda_obs =
title=3DObserva=E7=F5es style=3D"WIDTH: 248px; HEIGHT: 63px" =
tabIndex=3D0 name=3Dencomenda_obs rows=3D5 cols=3D40 =
label=3D"Observa=E7=F5es"></TEXTAREA></TD></TR></TBODY></TABLE><BR><INPUT=
=20
                  type=3Dhidden name=3D__Action> <INPUT type=3Dhidden=20
                  name=3D__ListOpenMode> <INPUT type=3Dhidden =
name=3D__Navigation>=20
                  <INPUT type=3Dhidden value=3D1 name=3DtxtPagina> =
<INPUT type=3Dhidden=20
                  name=3Dfkn> <INPUT type=3Dhidden name=3DtxtSchemaL> =
<INPUT=20
                  type=3Dhidden name=3DtxtTableL> <INPUT type=3Dhidden=20
                  name=3DtxtColumnL> <INPUT type=3Dhidden =
name=3DtxtRequiredJoinL>=20
                  <INPUT type=3Dhidden name=3DtxtSchemaR> <INPUT =
type=3Dhidden=20
                  name=3DtxtTableR> <INPUT type=3Dhidden =
name=3DtxtColumnR> <INPUT=20
                  type=3Dhidden name=3DtxtRequiredJoinR> <INPUT =
type=3Dhidden=20
                  name=3DtxtSchema> <INPUT type=3Dhidden =
name=3DtxtTable> <INPUT=20
                  type=3Dhidden name=3DtxtColumn> <INPUT type=3Dhidden=20
                  name=3DtxtRequiredJoin> <INPUT type=3Dhidden =
name=3DtxtSort> <INPUT=20
                  type=3Dhidden name=3DtxtColumnLabel> <INPUT =
type=3Dhidden value=3Dnull=20
                  name=3DnumEnc> <!-- ############# LIST ############# =
-->
                  <TABLE cellSpacing=3D0 cellPadding=3D1 border=3D0>
                    <TBODY>
                    <TR>
                      <TD vAlign=3Dtop>
                        <TABLE id=3DWAMListHTMLTable cellSpacing=3D1 =
cellPadding=3D2=20
                        width=3D"100%" border=3D0>
                          <TBODY>
                          <TR>
                            <TD class=3DcssWAMlistDark><NOBR><SPAN=20
                              class=3DcssWAMlistDark=20
                              title=3D"Nome =
Produto&#10;(encomendaLinha.nome)"><B>Nome=20
                              Produto</B></SPAN></NOBR><BR><NOBR><A=20
                              class=3DcssWAMdecor title=3D"Ordenar =
ascendentemente"=20
                              =
onclick=3D'javascript:objList.columns[0].sort("ASC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar descendentemente"=20
                              =
onclick=3D'javascript:objList.columns[0].sort("DESC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Remover coluna da lista"=20
                              =
onclick=3Djavascript:objList.columns[0].remove();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D7=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif=
"=20
                              width=3D7 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a direita"=20
                              =
onclick=3D'javascript:objList.moveColumn(0, "right");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-right=
.gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0></NOBR></TD>
                            <TD class=3DcssWAMlistDark><NOBR><SPAN=20
                              class=3DcssWAMlistDark=20
                              title=3D"Nome abreviado ou nome mais =
conhecido da entidade&#10;(entidade.nomeAbrev)"><B>Nome=20
                              Abrev</B></SPAN></NOBR><BR><NOBR><A=20
                              class=3DcssWAMdecor title=3D"Ordenar =
ascendentemente"=20
                              =
onclick=3D'javascript:objList.columns[1].sort("ASC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar descendentemente"=20
                              =
onclick=3D'javascript:objList.columns[1].sort("DESC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Remover coluna da lista"=20
                              =
onclick=3Djavascript:objList.columns[1].remove();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D7=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif=
"=20
                              width=3D7 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a esquerda"=20
                              =
onclick=3D'javascript:objList.moveColumn(1, "left");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-left.=
gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a direita"=20
                              =
onclick=3D'javascript:objList.moveColumn(1, "right");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-right=
.gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0></NOBR></TD>
                            <TD class=3DcssWAMlistDark><NOBR><SPAN=20
                              class=3DcssWAMlistDark=20
                              title=3D"Quantidade =
encomendada&#10;(encomendaLinha.quantidade)"><B>Qtd</B></SPAN></NOBR><BR>=
<NOBR><A=20
                              class=3DcssWAMdecor title=3D"Ordenar =
ascendentemente"=20
                              =
onclick=3D'javascript:objList.columns[2].sort("ASC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar descendentemente"=20
                              =
onclick=3D'javascript:objList.columns[2].sort("DESC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Remover coluna da lista"=20
                              =
onclick=3Djavascript:objList.columns[2].remove();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D7=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif=
"=20
                              width=3D7 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a esquerda"=20
                              =
onclick=3D'javascript:objList.moveColumn(2, "left");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-left.=
gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a direita"=20
                              =
onclick=3D'javascript:objList.moveColumn(2, "right");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-right=
.gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0></NOBR></TD>
                            <TD class=3DcssWAMlistDark><NOBR><SPAN=20
                              class=3DcssWAMlistDark=20
                              title=3D"N=FAmero de garrafas por =
caixa&#10;(encomendaLinha.qtdCaixa)"><B>Caixa=20
                              de</B></SPAN></NOBR><BR><NOBR><A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar ascendentemente"=20
                              =
onclick=3D'javascript:objList.columns[3].sort("ASC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar descendentemente"=20
                              =
onclick=3D'javascript:objList.columns[3].sort("DESC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Remover coluna da lista"=20
                              =
onclick=3Djavascript:objList.columns[3].remove();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D7=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif=
"=20
                              width=3D7 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a esquerda"=20
                              =
onclick=3D'javascript:objList.moveColumn(3, "left");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-left.=
gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a direita"=20
                              =
onclick=3D'javascript:objList.moveColumn(3, "right");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-right=
.gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0></NOBR></TD>
                            <TD class=3DcssWAMlistDark><NOBR><SPAN=20
                              class=3DcssWAMlistDark=20
                              title=3D"Pre=E7o =
unit=E1rio&#10;(encomendaLinha.preco)"><B>Pre=E7o=20
                              Unit.</B></SPAN></NOBR><BR><NOBR><A=20
                              class=3DcssWAMdecor title=3D"Ordenar =
ascendentemente"=20
                              =
onclick=3D'javascript:objList.columns[4].sort("ASC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Ordenar descendentemente"=20
                              =
onclick=3D'javascript:objList.columns[4].sort("DESC");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D6=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Remover coluna da lista"=20
                              =
onclick=3Djavascript:objList.columns[4].remove();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D7=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif=
"=20
                              width=3D7 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0><A =
class=3DcssWAMdecor=20
                              title=3D"Mover coluna para a esquerda"=20
                              =
onclick=3D'javascript:objList.moveColumn(4, "left");'=20
                              href=3D"javascript:void(null);"><IMG =
height=3D8=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-left.=
gif"=20
                              width=3D6 border=3D0></A><IMG=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif"=20
                              width=3D4 border=3D0></NOBR></TD>
                            <TD class=3DcssWAMlistDark vAlign=3Dcenter =
align=3Dright=20
                            height=3D30><A class=3DcssWAMdecor=20
                              title=3D"Adicionar colunas =E0 lista"=20
                              =
onclick=3Djavascript:objList.checkMenuMode();=20
                              =
onmouseout=3D'javascript:menuPopDown("elMenu1");'=20
                              href=3D"javascript:%20void(null);"><IMG =
height=3D15=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/add-column.gif"=20
                              width=3D15 border=3D0></A></TD></TR>
                          <TR>
                            <TD class=3DcssWAMlistCell noWrap =
align=3Dleft>Portal=20
                              do Fidalgo</TD>
                            <TD class=3DcssWAMlistCell noWrap=20
                            align=3Dleft>Provam</TD>
                            <TD class=3DcssWAMlistCell noWrap =
align=3Dright>1</TD>
                            <TD class=3DcssWAMlistCell noWrap =
align=3Dright>6</TD>
                            <TD class=3DcssWAMlistCell noWrap=20
align=3Dright>5.26</TD>
                            <TD class=3DcssWAMlistCell noWrap =
align=3Dright><A=20
                              class=3DcssWAMdecor title=3D"Editar =
registo"=20
                              =
onclick=3Djavascript:objList.rows[0].exists();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D10=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/row-edit.gif"=20
                              width=3D10 border=3D0></A> <A =
class=3DcssWAMdecor=20
                              title=3D"Apagar registo"=20
                              =
onclick=3Djavascript:objList.rows[0].del();=20
                              href=3D"javascript:void(null);"><IMG =
height=3D9=20
                              =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/row-delete.gif"=20
                              width=3D10 border=3D0></A></TD></TR>
                          <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
var objList;=0A=
function Create_objWAMList(){=0A=
	objList =3D new List('dbo.FK_encomendaLinha_encomenda', =
'dbo','encomendaLinha', 'DETAILLIST', " FROM [dbo].[encomendaLinha]	LEFT =
OUTER JOIN [dbo].[produto] ON =
[dbo].[encomendaLinha].[produto]=3D[dbo].[produto].[codigo]	LEFT OUTER =
JOIN [dbo].[entidade] ON =
[dbo].[produto].[entidade]=3D[dbo].[entidade].[entidadeID] WHERE =
[dbo].[encomendaLinha].[numEnc]=3D11 ", false);=0A=
}=0A=
window.addToOnLoad(Create_objWAMList);=0A=
function navigation(strNavTo){=0A=
	window.event.returnValue =3D false;=0A=
	objList.form.__Navigation.value =3D strNavTo;=0A=
	objList.submitForm();=0A=
}=0A=
var WAM_MENU_STARTED =3D false;=0A=
function initMenuAddCols(){=0A=
	MenuInit('WAMList', =
'http://interno.cvrvv.pt/eVerde/WAMLibrary/images/menu-more.gif', =
'declarativa', 'dbo', 'FK_encomendaLinha_encomenda', 'dbo', =
'encomendaLinha', '', =
'http://interno.cvrvv.pt/eVerde/WAMLibrary/WAMMenu.asp', objList.form);=0A=
	arMenu1 =3D new Array(=0A=
	0,0,0,'','','','','','',=0A=
	'Encomenda', '', 'numEnc', '', '', 0, 0, '',=0A=
	'Ordem', '', 'numLinha', '', '', 0, 0, '',=0A=
	'Produto', '', 'produto', '', '', 0, 0, '',=0A=
	'IVA', '', 'taxaIVA', '', '', 0, 0, '',=0A=
	'Encomenda', 'dbo', 'encomenda', 'dbo.FK_encomendaLinha_encomenda', =
'MASTER', 1, 0, '',=0A=
	'Produto', 'dbo', 'produto', 'dbo.FK_encomendaLinha_produto', 'MASTER', =
1, 0, '');=0A=
WAM_MENU_STARTED =3D true;=0A=
}=0A=
function initList(){=0A=
	objList.addColumn(new ListColumn("dbo", "encomendaLinha", "nome", "", =
"null"));=0A=
	objList.addColumn(new ListColumn("dbo", "entidade", "nomeAbrev", =
"dbo.FK_encomendaLinha_produto,dbo.FK_produto_entidade", "null"));=0A=
	objList.addColumn(new ListColumn("dbo", "encomendaLinha", "quantidade", =
"", "null"));=0A=
	objList.addColumn(new ListColumn("dbo", "encomendaLinha", "qtdCaixa", =
"", "null"));=0A=
	objList.addColumn(new ListColumn("dbo", "encomendaLinha", "preco", "", =
"null"));=0A=
	var objListRow =3D new ListRow();=0A=
	objListRow.addPKCol(new ListRow_Column("numEnc", "11", "11"));=0A=
	objListRow.addPKCol(new ListRow_Column("numLinha", "0", "0"));=0A=
	objList.addRow(objListRow);=0A=
	objList.fk =3D new Object();=0A=
	objList.fk.name =3D 'FK_encomendaLinha_encomenda';=0A=
	objList.fk.alias =3D 'FK_encomendaLinha_encomenda';=0A=
	objList.fk.columns =3D new Array();=0A=
	var objFKCol =3D new Object();=0A=
	objFKCol.name =3D 'numEnc';=0A=
	objFKCol.value =3D "11";=0A=
	objList.fk.columns['numEnc'] =3D objFKCol;=0A=
}=0A=
window.addToOnLoad(initList);=0A=
=0A=
function __ListClientMessages(){=0A=
	WAMMessages['MESSAGE_LIST_delete'] =3D "Tem a certeza que pretende =
eliminar este registo? (@K)\n\nClick em 'Ok' para apagar este registo =
para sempre. N=E3o ser=E1 poss=EDvel voltar atr=E1s.";=0A=
}=0A=
window.addToOnLoad(__ListClientMessages);=0A=
=0A=
//-->=0A=
</SCRIPT>
                          </TBODY></TABLE></TD></TR>
                    <TR>
                      <TD class=3DcssWAMlistDark>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
width=3D"100%"=20
border=3D0>
                          <TBODY>
                          <TR>
                            <TD class=3DcssWAMlistDark noWrap=20
                              height=3D1><B>&nbsp;Registos 1 a 1&nbsp;de =

                              1&nbsp;</B></TD>
                            <TD>&nbsp;&nbsp;</TD>
                            <TD class=3DcssWAMlistDark width=3D"100%">
                              <TABLE cellSpacing=3D0 cellPadding=3D0 =
width=3D"100%"=20
                              border=3D0>
                                <TBODY>
                                <TR>
                                <TD align=3Dright =
width=3D"99%">&nbsp;</TD>
                                <TD align=3Dleft width=3D1><IMG =
height=3D16=20
                                =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-firstpage-d.g=
if"=20
                                width=3D16 border=3D0></TD>
                                <TD><IMG height=3D16=20
                                =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-previouspage-=
d.gif"=20
                                width=3D16 border=3D0></TD>
                                <TD class=3DcssWAMlistDark =
align=3Dright><IMG=20
                                height=3D16=20
                                =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-nextpage-d.gi=
f"=20
                                width=3D16 align=3Dtop border=3D0></TD>
                                <TD class=3DcssWAMlistDark =
align=3Dright><IMG=20
                                height=3D16=20
                                =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-lastpage-d.gi=
f"=20
                                width=3D16 align=3Dtop=20
                              =
border=3D0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>=
</TBODY></TABLE><BR><INPUT class=3DcssWAMstandardButton =
id=3DbtnCreateRow title=3D"Novo registo" onclick=3D"javascript: =
objList.newRow();" type=3Dbutton value=3DCriar name=3DbtnCreateRow><BR>
                  <DIV id=3DMENUINSERT name=3D"MENUINSERT"></DIV><!--=0A=
--SQLStatement=0A=
SELECT [dbo].[encomendaLinha].[nome] AS 'nome__COL0', =
[dbo].[entidade].[nomeAbrev] AS 'nomeAbrev__COL1', =
[dbo].[encomendaLinha].[quantidade] AS 'quantidade__COL2', =
[dbo].[encomendaLinha].[qtdCaixa] AS 'qtdCaixa__COL3', =
[dbo].[encomendaLinha].[preco] AS 'preco__COL4', =
[dbo].[encomendaLinha].[numEnc], [dbo].[encomendaLinha].[numLinha] FROM =
[dbo].[encomendaLinha]	LEFT OUTER JOIN [dbo].[produto] ON =
[dbo].[encomendaLinha].[produto]=3D[dbo].[produto].[codigo]	LEFT OUTER =
JOIN [dbo].[entidade] ON =
[dbo].[produto].[entidade]=3D[dbo].[entidade].[entidadeID] WHERE =
[dbo].[encomendaLinha].[numEnc]=3D11  ORDER BY =
[dbo].[encomendaLinha].[numEnc], [dbo].[encomendaLinha].[numLinha]=0A=
-->
                  <P align=3Dright><INPUT class=3DcssWAMstandardButton =
id=3DbtnDelete title=3D"Apagar registo" onclick=3D"javascript: =
objWAMRow.aspDelete();" type=3Dbutton value=3DApagar =
name=3DbtnDelete>&nbsp;&nbsp;<INPUT class=3DcssWAMstandardButton =
id=3DbtnCancel title=3DCancelar onclick=3D"javascript: =
objWAMRow.cancel();" type=3Dbutton value=3DCancelar =
name=3DbtnCancel>&nbsp;&nbsp;<INPUT class=3DcssWAMstandardButton =
id=3DbtnUpdate title=3D"Guardar registo" disabled onclick=3D"javascript: =
objWAMRow.aspUpdate();" type=3Dbutton value=3DGuardar =
name=3DbtnUpdate></P>
                  <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function Caller_CancelarEncomenda_AfterExecute(){=0A=
	objWAMRow.columns.estado.setValue('X');=0A=
}=0A=
=0A=
function Callers(){=0A=
	=
objCaller_dbo_VVShopCancelarEncomenda.event.set(WAMCALLER_ONAFTEREXECUTE,=
 Caller_CancelarEncomenda_AfterExecute);=0A=
}=0A=
=0A=
window.addToOnLoad(Callers);=0A=
//-->=0A=
</SCRIPT>
                  <INPUT id=3D__disabled_encomenda_numEnc type=3Dhidden=20
                  name=3D__disabled_encomenda_numEnc> <INPUT=20
                  id=3D__disabled_encomenda_estado type=3Dhidden=20
                  name=3D__disabled_encomenda_estado> <INPUT=20
                  id=3D__disabled_encomenda_subTotal type=3Dhidden=20
                  name=3D__disabled_encomenda_subTotal> <INPUT=20
                  id=3D__disabled_encomenda_totalIVA type=3Dhidden=20
                  name=3D__disabled_encomenda_totalIVA> <INPUT=20
                  id=3D__disabled_encomenda_total type=3Dhidden=20
                  name=3D__disabled_encomenda_total> <INPUT=20
                  id=3D__disabled_encomenda_custoTransporteSD =
type=3Dhidden=20
                  name=3D__disabled_encomenda_custoTransporteSD> <INPUT=20
                  id=3D__disabled_encomenda_comissaoSD type=3Dhidden=20
                  name=3D__disabled_encomenda_comissaoSD> <INPUT=20
                  id=3D__old_encomenda_numEnc type=3Dhidden value=3D11=20
                  name=3D__old_encomenda_numEnc> <INPUT id=3DwrAction =
type=3Dhidden=20
                  value=3DSR name=3DwrAction> <INPUT id=3DwrAutoSave =
type=3Dhidden=20
                  value=3Dfalse name=3DwrAutoSave> <INPUT =
id=3DwrSaveAndEditNew=20
                  type=3Dhidden value=3Dfalse name=3DwrSaveAndEditNew> =
<INPUT=20
                  id=3DwrSaveAndEdit type=3Dhidden value=3Dfalse =
name=3DwrSaveAndEdit>=20
                  <INPUT id=3Dwrsac type=3Dhidden value=3Dfalse =
name=3Dwrsac> <INPUT=20
                  id=3DwrKeyText type=3Dhidden value=3Dkey=3D11 =
name=3DwrKeyText> <INPUT=20
                  id=3DwrIsDirty type=3Dhidden value=3Dfalse =
name=3DwrIsDirty> <INPUT=20
                  id=3Dwrftoexe type=3Dhidden name=3Dwrftoexe>=20
            </FORM></TD></TR></TBODY></TABLE>
            <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
window.document.title +=3D " (11)";=0A=
=0A=
//-->=0A=
</SCRIPT>

            <SCRIPT language=3DJavaScript=20
            =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/ClientJavaScript.js.asp?=
wr=3D1&amp;wl=3D1&amp;wpc=3D1">=0A=
</SCRIPT>

            <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function WAMCanvasResize(){=0A=
	if (isUndefined(window.WAMCanvas)) return false;=0A=
	var iAH, iAW, iCH, iCW, iWX, iWY, iST, SL;=0A=
	iST =3D window.screenTop;=0A=
	iSL =3D window.screenLeft;=0A=
	iAH =3D screen.availHeight;=0A=
	iAW =3D screen.availWidth;=0A=
	iCH =3D window.WAMCanvas.clientHeight;=0A=
	iCW =3D window.WAMCanvas.clientWidth;=0A=
	iWX =3D iCW+50 > iAW-iSL ? iAW-iSL-20 : iCW+50;=0A=
	iWY =3D iCH+150 > iAH-iST ? iAH-iST+20 : iCH+150;=0A=
	window.resizeTo(iWX, iWY);=0A=
}=0A=
window.addToOnLoad(WAMCanvasResize);=0A=
//-->=0A=
</SCRIPT>
          </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<DIV id=3D_ExecuteOnServer style=3D"VISIBILITY: hidden"=20
name=3D"_ExecuteOnServer"></DIV>
<STYLE type=3Dtext/css media=3Dprint>SPAN.cssWAMVERSION {
	VISIBILITY: hidden
}
</STYLE>
<BR><BR><SPAN class=3DcssWAMVERSION=20
style=3D"FONT: 9px tahoma,verdana,arial">&nbsp;Web Application Maker =
Version=20
v8.01<BR>&nbsp;WAMLibrary =A9 Declarativa 2000-2002<BR><BR>&nbsp;Hello,=20
declarativa&nbsp;&nbsp;|&nbsp;&nbsp;18-10-2002 =
16:27:14:824</SPAN></BODY></HTML>

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/Images/space.gif

R0lGODlhCAAIAID/AMDAwAAAACH5BAEAAAAALAAAAAAIAAgAAAIHhI+py+1dAAA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/arrow-top-right.gif

R0lGODlhCAAMAMT/AMDAwO3t7ePj497e3tbW1s/Pz8fHx76+vrW1taurq6SkpJWVlYaGhn5+fnZ2
dlpaWlVVVU5OTkZGRj8/PzExMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA
AAAALAAAAAAIAAwAQAU7ICACQpFMy8E8oxgcBlIUk5AcxHxMJtA4ooNqAmmJBgfFbQIgKAaB0iSA
MAgkBwRlEYsURpAfy5gYi0IAOzExMQAAAAAAAAAAAAAAACwAAAAACAAMAEAGQUCAELCgjGqpjSo2
FCI2lw+FUluMNpDppmYEsF6Aw0ZZkzWFj43pWjtATA9EsYb4XBa0zWeXis4oQzJfTGcjhEJBADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-asc.gif

R0lGODlhCgAGAKL/AP///8DAwMbOzmNjYzkxMTExMSkpKQAAACH5BAEAAAEALAAAAAAKAAYAQAMX
GBpWGwUAQcUYDspLnsZPNFlgYRbEmSYAOw==

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/order-desc.gif

R0lGODlhCgAGAKL/AP///8DAwMbOzmNjYzkxMTExMSkpKQAAACH5BAEAAAEALAAAAAAKAAYAQAMY
WFq0HbCAUWAEQIhBg8za1nkYR1iWUVkJADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/remove-column.gif

R0lGODlhBwAHAKL/AAAAALCwsLa2tsHBwcvLy8DAwAAAAAAAACH5BAEAAAUALAAAAAAHAAcAQAMV
WADKEASGJQYhwmkVgSBOMGTK6IEJADsWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAABwAHAAAIJgD/AQAg
kCCAZbAA2Fo20FawZctsGYQVTKJAWAgRDqyokGHBjwEBADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/space.gif

R0lGODlhCAAIAID/AMDAwAAAACH5BAEAAAAALAAAAAAIAAgAAAIHhI+py+1dAAA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-right.gif

R0lGODlhBgAIAJH/AAAAALW1tcDAwAAAACH5BAEAAAIALAAAAAAGAAgAQAIPlGAXG+CLjEsnAtZe
S1EUADsQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAABgAIAAAIHgD//QMg
sCAAggMB1KpFUOFChg4XHnSIMGHBgQUDAgA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/move-column-left.gif

R0lGODlhBgAIAJH/AAAAALW1tcDAwAAAACH5BAEAAAIALAAAAAAGAAgAQAIPlHGhgaCABDQnutVe
lKYAADsQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAABgAIAAAIHQD/CQQg
cCDBgbVqAViYMCHDhgQBODy4sOBAgQEBADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/add-column.gif

R0lGODlhDwAPAKIAAAAAACEhIcDAwGRkZMjIyP///wAAAAAAACH5BAEAAAIALAAAAAAPAA8AQAM0
KKowNGDJFWqds72Yi+cC4BXgokEYFqTpmoqfOZbMQ9CZjUtA37MSF1BheflARw6MJIslAAA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/row-edit.gif

R0lGODlhCgAKANX/AMDAwEdHR0hISExMTFBQUFFRUWNjY2VlZWlpaWtra3FxcXJycnR0dHV1dXd3
d3t7e3x8fH9/f4uLi5CQkJiYmJmZmZycnKampqenp6qqqqurq6ysrK2trbCwsLGxsbOzs7W1tbm5
ubq6ury8vL29vb6+vszMzNfX19jY2NnZ2d3d3d7e3uDg4OPj4+Tk5Obm5u3t7QAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAKAAoAQAZEQECn
FIJcAMik0sOIDESik4oiyCRHLlQK9pAoAaIQoOIIaACfVOtlQoCSpNaKBWtYlBPDYbEhYL5IGwoQ
AhyAABwJBUEAO15eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///yH5BAEAAAEALAAAAAAKAAoA
QAhXAP/B8pWLj6kACBMqjEXnDxNduq51w4REVUJe5LBla7dnkcIAunL9y3TnyKoAs7KNM8csTa2E
vcZ5A9euDqeE/yCNKSOHFZRTHxGyisMHSaugAVqtiRIQADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/row-delete.gif

R0lGODlhCgAJAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///yH5BAEAAAAALAAAAAAKAAkA
QAhMAJvVuVMOgMF7xSjdK1TLoEMAqxzWqqPnjrWH3+7c0bbIj8NVdRY53OUIwLtBAwsCiOTnncNy
d0I+hFgnEoBidZoBMFanTrGHxawFBAA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-firstpage-d.gif

R0lGODlhEAAQAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAAEAAQAAAIqABFCBxI
sKBAdOTQKUSYkCE5ZgLJSSTnzZs2bdOoTYvGbNXBiha1eZuGkSMzVx+9WfJ27Ro3S9FMohRBUWXL
lzCZMUs2E91FS9eQWRo6lFmxnte0WcJJ1NJOWRGTLm069NgxpNcsTRPa9NgwqCLQXaOmlRnXY8W8
9tSp9ZlZS16HDZtJLtrGaTqPJYvbiy4zjs+S7ZU7rNctsM9cKV7sStbiVTMNShYYEAA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-previouspage-d.gif

R0lGODlhEAAQAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAAEAAQAAAIoQBFCBxI
sKBAdOTQKUSYkCE5ZgLJSSTnzZs2bdOoTYvGbNXBiha1eZuGkSMzVx+9XVN5zVK0l8xORgR5raUl
ZiaToRSB7qI2m5aCxiy2E921n0GTWkrGLJmsiEeBJk127FjRmhqVLj027CnPaxqnMRN6rBjXojGj
TXs21uywtzvJqVUb8xjVt73i4mT2LNldvLe8PnNFuLArWYVX7TTIWGBAADs=

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-nextpage-d.gif

R0lGODlhEAAQAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAAEAAQAAAIpQBFCBxI
sKBAdOTQKUSYkCE5ZgLJSSTnzZs2bdOoTYvGbNXBiha1eZuGkSMzVx+9XVNpqVe0l8xORgR57Zol
S8xMJkMpAt1FbTeD9opZjCe6a9psBr2ZjFkyWRGRKl2a7NgxozWpLW1ZdRjUntc0TmN2k9mxYseG
GY0ZbdqzlmiHyeVJrm3bmMe6DutFNyezZ8n07r319Zmrw4hdyUK8iqfBxwIDAgA7

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/images/nav-lastpage-d.gif

R0lGODlhEAAQANUAAP///+jo6OTk5OHh4ODg4N7e3tzc3Nra2tnZ2NjY2NfY1tfX19XV1NTU1NPT
09HR0c/Pz87Ozs3NzczMzMrKysnJycjIyMfHx8XFxcTExMPDw729vbe3t7Kysq6urqurq5aWliIi
IgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAEAAQAAAGkcCQcEgsCgOCgBKZ
ZAomQoFUUCgcDo6G4zH5HKvWQ8GB5U4838KiACJoHg/Q5BwFL0CgRyQ+qaBDAVd4gwkachh/AQsH
g4MMchUdUYuNeAogFxeJC3eNAxKYGpKAC1oOeAYWF6GJcw+nCBmZIBoafwKvrxMUFxUXtRu3E1wQ
Fb61GhscoxAezs8eHc8ff0bWQkEAOw==

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/eVerde/css/WAMcss.win.css.txt

BODY {
	FONT: 11px tahoma, verdana, arial; BACKGROUND-COLOR: rgb(255,255,255)
}
TD.cssWAMwinTitle {
	HEIGHT: 45px; BACKGROUND-COLOR: rgb(0,57,24)
}
SPAN.cssWAMwinTitleTop {
	FONT: 10px tahoma,verdana,arial; COLOR: rgb(255,255,255)
}
SPAN.cssWAMwinTitleBottom {
	FONT: bold 24px tahoma,verdana,arial; COLOR: rgb(255,255,255)
}
TD.cssWAMlistDark {
	FONT: 11px tahoma,verdana,arial; COLOR: rgb(0,0,0); BACKGROUND-COLOR: =
rgb(192,220,192)
}
TR.cssWAMlistLight {
	FONT: 11px tahoma,verdana,arial; BACKGROUND-COLOR: rgb(235,235,235)
}
TR.cssWAMlistSelected {
	FONT: 11px tahoma,verdana,arial; COLOR: rgb(255,255,255); =
BACKGROUND-COLOR: rgb(192,220,192)
}
IMG.cssdbotipoLocalpictograma {
	HEIGHT: 20px
}
IMG.cssdbotipoProdutoimagem1 {
	HEIGHT: 17px
}
IMG.cssdbotipoProdutoimagem2 {
	HEIGHT: 17px
}

------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: application/x-javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/window_prototype.js

function WinFeatures(w, h, t, l, d, s, m, sc, r){
	var c =3D "toolbar=3D"+t+
//	var c =3D "toolbar=3D"+1+
		",location=3D"+l+
//		",location=3D"+1+
		",directories=3D"+d+
		",status=3D"+s+
//		",menubar=3D"+m+
		",menubar=3D"+1+
		",scrollbars=3D"+sc+
		",resizable=3D"+r+
		",width=3D"+150+
		",height=3D"+1+
		"";
	return c;
}

// --- Properties
window.childWindows =3D new Array();
window._nChilds =3D 0;
window.toExecuteOnOnLoad =3D new Array();
window.addToOnLoad =3D window_addToOnLoad;
window.executeOnLoad =3D window_executeOnLoad;
window.browser =3D new Browser();

// --- Methods
window.newWindowName =3D window_newWindowName;
window.openChild =3D window_openChild;
window.closeChild =3D window_closeChild;
window.closeAllChilds =3D window_closeAllChilds;
window.deleteChild =3D window_deleteChild;
window.deleteFromParent =3D window_deleteFromParent
window.onunload =3D window_onUnLoad;

function window_newWindowName(){
	var dt =3D new Date();
	return =
"window"+dt.getFullYear()+dt.getMonth()+dt.getDate()+dt.getHours()+dt.get=
Minutes()+dt.getSeconds()+dt.getMilliseconds()+(++this._nChilds);
}

function window_openChild(strURL, strWinFeatures){
	var strWinName =3D this.newWindowName();
	var win =3D window.open(strURL, strWinName, strWinFeatures, true);
	this.childWindows[win.name] =3D win;
	return strWinName;
}

function window_closeChild(strWindowName){
	if (typeof(this.childWindows[strWindowName]) !=3D "undefined"){
		this.childWindows[strWindowName].close();
		this.deleteChild(strWindowName);
	}
}

function window_closeAllChilds(){
	var win;
	for (el in this.childWindows){
		win =3D this.childWindows[el];
		this.deleteChild(el);
		if (!win.closed) win.close();
	}
}

function window_deleteChild(strWindowName){
	delete(this.childWindows[strWindowName]);
}

function window_deleteFromParent(){
	if (this.opener+"" !=3D "undefined" && this.opener+"" !=3D "null")
		if (typeof(this.opener.childWindows) !=3D "undefined")
			if (typeof(this.opener.childWindows[this.name]) !=3D "undefined")
				this.opener.deleteChild(this.name);
}

function window_addToOnLoad(varIN){
	this.toExecuteOnOnLoad[this.toExecuteOnOnLoad.length] =3D varIN;
}

function window_executeOnLoad(){
	var i;
	for (i =3D 0; i < this.toExecuteOnOnLoad.length; i++){
		switch (typeof(this.toExecuteOnOnLoad[i])){
			case "function":
				this.toExecuteOnOnLoad[i]();
				break;
			case "string":
				eval(this.toExecuteOnOnLoad[i]);
				break;
		}
	}
}

function window_onUnLoad(){
	this.closeAllChilds();
//	this.deleteFromParent();
}

function Browser() {
	var n =3D navigator.appName;
	if (n =3D=3D "Netscape") this.name =3D "ns";
	else if (n =3D=3D "Microsoft Internet Explorer") this.name =3D "ie";
	else this.name =3D name;

	var ua =3D navigator.userAgent.toLowerCase();
	if (ua.indexOf("win") > -1) this.platform =3D "win32";
	else if (ua.indexOf("mac") > -1) this.platform =3D "mac";
	else this.platform =3D "other";
=09
	this.isNS =3D this.name =3D=3D "ns";
	this.isIE =3D this.name =3D=3D "ie";
	this.isIEMAC =3D this.name =3D=3D "ie" && this.platform =3D=3D "mac";
}

if (window.browser.isNS){
	window.captureEvents(Event.CLICK);
	window.captureEvents(Event.KEYPRESS);
	window.document.onclick =3D function __setIEEvent(e){
			event =3D e;
		}
}
------=_NextPart_000_00D8_01C276C1.B8DBBF50
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/ClientJavaScript.js.asp?wr=1&wl=1&wpc=1

function _Date_toHTMLFormat(domain){
	var r, tYear, tMonth, tDate, tHours, tMinutes, tSeconds;

	switch (domain){
		case WAMDomain.wamdate:
			// --- Get Date
			tYear =3D this.getFullYear();
			tMonth =3D this.getMonth() + 1;
			tDate =3D this.getDate();
			tMonth =3D tMonth < 10 ? "0"+tMonth : tMonth;
			tDate =3D tDate < 10 ? "0"+tDate : tDate;
			r =3D tDate+"-"+tMonth+"-"+tYear;
			break;
		case WAMDomain.wamtime:
			// --- Get Time
			tHours =3D this.getHours(); tHours =3D tHours < 10 ? "0"+tHours : =
tHours;
			tMinutes =3D this.getMinutes(); tMinutes =3D tMinutes < 10 ? =
"0"+tMinutes : tMinutes;
			tSeconds =3D this.getSeconds(); tSeconds =3D tSeconds < 10 ? =
"0"+tSeconds : tSeconds;
			r =3D tHours+":"+tMinutes+":"+tSeconds;
			break;
		default:
			// --- Get DateTime
			tYear =3D this.getFullYear();
			tMonth =3D this.getMonth() + 1;
			tDate =3D this.getDate();
			tMonth =3D tMonth < 10 ? "0"+tMonth : tMonth;
			tDate =3D tDate < 10 ? "0"+tDate : tDate;
			tHours =3D this.getHours(); tHours =3D tHours < 10 ? "0"+tHours : =
tHours;
			tMinutes =3D this.getMinutes(); tMinutes =3D tMinutes < 10 ? =
"0"+tMinutes : tMinutes;
			tSeconds =3D this.getSeconds(); tSeconds =3D tSeconds < 10 ? =
"0"+tSeconds : tSeconds;
			r =3D tDate+"-"+tMonth+"-"+tYear+" =
"+tHours+":"+tMinutes+":"+tSeconds;
			break;
	}
	return r;
}

function _String_formatNum(format){
	var newStr =3D "";

	for (i =3D 0; i < format.length-this.length; i++) newStr +=3D =
format.charAt(i);
	return newStr+this.valueOf();
}

function _String_toNumber(){
	return new Number(this.replace(/ /g, ""));
}

function _String_replaceSubstr(iFrom, strWith){
	var newStr =3D "";
	iFrom--;
	return this.substr(0,iFrom)+this.substr(iFrom).replace(new =
RegExp("#{"+strWith.length+"}"), strWith);
}

function _String_splitWords(sep){
	var r; var i; var s =3D "";
=09
	r =3D this.split(sep);
	for (i in r){
		if (!isEmpty(r[i])){
			s +=3D r[i]+" ";
		}
	}
	s =3D s.substr(0, s.length-1);
	this._words =3D s.split(sep);
}

function _String_getWord(i){
	var r;

	this.splitWords(" ");
	if (isNaN(i)){
		r =3D "";
	} else {
		if (isUndefined(this._words[i-1])){
			r =3D "";
		} else {
			r =3D this._words[i-1];
		}
	}
	delete(this._words);
	return r;
}

function _String_deleteWord(iBegin, iEnd){
	var i; var s;

	this.splitWords(" ");
	if (isUndefined(iEnd)){
		iEnd =3D iBegin;
	} else {
		if (iEnd > this._words.length){
			iEnd =3D this._words.length;
		}
	}
	for (i =3D iBegin; i <=3D iEnd; i++){
		delete(this._words[i-1]);
	}
	s =3D new String(this._words.join(" "));
	s.splitWords(" ");
	delete(this._words);
	return new String(s._words.join(" "));
}

function _String_toScriptFormat(){
	return this.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/"/g, =
'\\"');
}

function _Number_toMoney(casasDecimais){
	return formatNumber(this.round(casasDecimais), 2);
}

function _Number_round(numDecimalPlaces){
	if (isUndefined(numDecimalPlaces)) numDecimalPlaces =3D 0;
	return Math.round(this*Math.pow(10, numDecimalPlaces))/Math.pow(10, =
numDecimalPlaces)
}

function formatNumber(val, dec, mSep){
	var iIntPart, iDot, lDecPart, i;
	val +=3D "";
=09
	if (isUndefined(mSep)) mSep =3D " ";

	iDot =3D val.indexOf(".", 0);
	iIntPart =3D (iDot =3D=3D -1 ? val.length : iDot);
	lDecPart =3D val.substr(iIntPart+1).length;
=09
	for (i =3D iIntPart-4; i > 0; i-=3D3){
		val =3D val.substr(0, i+1) + mSep + val.substr(i+1);
	}
	if (i =3D=3D 0) val =3D val.substr(0, i+1) + mSep + val.substr(i+1);
	if (isNaN(dec)) return val;
	if (iDot =3D=3D -1) val +=3D ".";
	for (i=3D0; i<(dec-lDecPart); i++) val +=3D "0";
	return val;
}

function GetScriptEngineInfo(){
    var s;
    s =3D ""; // Build string with necessary info.
    s +=3D ScriptEngine() + " Version ";
    s +=3D ScriptEngineMajorVersion() + ".";
    s +=3D ScriptEngineMinorVersion() + ".";
    s +=3D ScriptEngineBuildVersion();
    return(s);
}

function encodeURL(strToEncode){
	// --- * @ - _ + . /
	return escape(strToEncode).replace(/\+/g, "%2B");
}

function validMask(varValue, strMask){
	var re =3D new RegExp(strMask);

	if (re.test(varValue)){
		return true;
	} else {
		return false;
	}
}

function isUndefined(varIn){
	if (varIn+"" =3D=3D "undefined"){
		return true;
	} else {
		return false;
	}
}

function isNull(varIn){
	if (varIn =3D=3D null){
		return true;
	} else {
		return false;
	}
}

function isEmpty(varIn){
	if (varIn+"" =3D=3D ""){
		return true;
	} else {
		return false;
	}
}

function isDigit(val){
	var digits =3D "^\\d$";
	return validMask(val, digits);
}

function previewImage(formEl, strIMGName, OLDsource){
	var strFileTemp;

	strFileTemp =3D formEl.value;
	if (typeof(__strFileUpLoadPath) =3D=3D "undefined") __strFileUpLoadPath =
=3D null;
	if (strFileTemp !=3D __strFileUpLoadPath){
		if (strFileTemp =3D=3D ""){
			window.document.all[strIMGName].src =3D OLDsource;
		} else {
			window.document.all[strIMGName].src =3D "file://" + strFileTemp;
		}
		__strFileUpLoadPath =3D strFileTemp;
	}
}

Date.prototype.toHTMLFormat =3D _Date_toHTMLFormat;
String.prototype.formatNum =3D _String_formatNum;
String.prototype.toNumber =3D _String_toNumber;
String.prototype.replaceSubstr =3D _String_replaceSubstr;
String.prototype.splitWords =3D _String_splitWords;
String.prototype.getWord =3D _String_getWord;
String.prototype.deleteWord =3D _String_deleteWord;
String.prototype.toScriptFormat =3D _String_toScriptFormat;

Number.prototype.toMoney =3D _Number_toMoney;
Number.prototype.round =3D =
_Number_round;//*********************************************************=
***************/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
//***********************************************************************=
*/
// ASPExecute Object (Client Side)
//***********************************************************************=
*/
function ASPExecute(){
	var AE =3D new _ASPExecute();
//AE.setDebug(true);
	return AE;
}

function _ASPExecute(){
	if (typeof(_ASPExecutePrototypeCalled) =3D=3D "undefined")
		_ASPExecute__Prototype();
}

function _ASPExecute__Prototype(){
	_ASPExecutePrototypeCalled =3D true;

	_ASPExecute.prototype.url =3D null;
	_ASPExecute.prototype.form =3D null;
	_ASPExecute.prototype.formName =3D null;
	_ASPExecute.prototype.debug =3D false;

	_ASPExecute.prototype._window =3D window;
	if (window.browser.isNS) window._ExecuteOnServer =3D =
window.document.getElementById("_ExecuteOnServer");
	_ASPExecute.prototype._iFrameHidden =3D "<iframe src=3D'about:blank' =
id=3D'ExecuteOnServer' name=3D'ExecuteOnServer' =
style=3D'visibility:hidden;width:0px;height:0px;'></iframe>";
	_ASPExecute.prototype._iFrameVisible =3D "<iframe src=3D'about:blank' =
id=3D'ExecuteOnServer' name=3D'ExecuteOnServer' =
style=3D'visibility:visible;width:600px;height:300px;'></iframe>";

	_ASPExecute.prototype.execute =3D ASPExecute_execute;
	_ASPExecute.prototype.setForm =3D ASPExecute_setForm;
	_ASPExecute.prototype.setURL =3D ASPExecute_setURL;
	_ASPExecute.prototype.setDebug =3D ASPExecute_setDebug;
=09
	function ASPExecute_execute(){
		var i;

		for (i =3D 0; i < __arASPExecute.length; i++){}
		if (isNull(__arASPExecute[i])) __arASPExecute[i] =3D this;
		setTimeout("__ASPExecute_execute__("+i+")", 100);
	}
=09
	function ASPExecute_setForm(strForm, strFormName){
		this.form =3D strForm;
		this.formName =3D strFormName;
	}
=09
	function ASPExecute_setURL(strURL){
		this.url =3D strURL;
	}

	function ASPExecute_setDebug(bolDebug){
		this.debug =3D bolDebug;
		if (this.debug =3D=3D true){
			this._window._ExecuteOnServer.style.visibility =3D "visible";
		} else {
			this._window._ExecuteOnServer.style.visibility =3D "hidden";
		}
	}
}

var __arASPExecute =3D new Array();
function __ASPExecute_execute__(i){
	__arASPExecute[i]._window._ExecuteOnServer.innerHTML =3D "";
	if (__arASPExecute[i].debug =3D=3D true){
		__arASPExecute[i]._window._ExecuteOnServer.innerHTML =3D =
__arASPExecute[i]._iFrameVisible;
	} else {
		__arASPExecute[i]._window._ExecuteOnServer.innerHTML =3D =
__arASPExecute[i]._iFrameHidden;
	}

	if (window.browser.isNS) window.ExecuteOnServer =3D =
window.document.getElementById("ExecuteOnServer");

	if (__arASPExecute[i].url !=3D null){
		if (window.browser.isNS) __arASPExecute[i]._window.ExecuteOnServer.src =
=3D __arASPExecute[i].url;
		else __arASPExecute[i]._window.ExecuteOnServer.location.href =3D =
__arASPExecute[i].url;
	} else {
		if (__arASPExecute[i].form !=3D null){
			=
__arASPExecute[i]._window.document.frames('ExecuteOnServer').document.ope=
n('text/html', 'replace');
			=
__arASPExecute[i]._window.document.frames('ExecuteOnServer').document.cha=
rset =3D 'iso8859-1';
			=
__arASPExecute[i]._window.document.frames('ExecuteOnServer').document.wri=
te("<html><body>"+__arASPExecute[i].form+"</body></html>");
			=
__arASPExecute[i]._window.document.frames('ExecuteOnServer').document.clo=
se();
			=
eval("__arASPExecute[i]._window.document.frames('ExecuteOnServer').docume=
nt."+__arASPExecute[i].formName+".submit()");
		}
	}
	__arASPExecute[i].url =3D null;
	__arASPExecute[i].form =3D null;
	__arASPExecute[i].formName =3D null;
	__arASPExecute[i] =3D null;
}//**********************************************************************=
**/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
//***********************************************************************=
*/
// WAMEventHandler Object (Client side)
//***********************************************************************=
*/
function WAMEventHandler(objParent){
	return new _WAMEventHandler(objParent);
}

function _WAMEventHandler(objParent){
	if (typeof(_WAMEventHandlerPrototypeCalled) =3D=3D "undefined")
		_WAMEventHandler__Prototype();
	=09
	this.parent =3D objParent;
}

function _WAMEventHandler__Prototype(){
	_WAMEventHandlerPrototypeCalled =3D true;
=09
	// --- Methods
	_WAMEventHandler.prototype.set =3D _WAMEventHandler_set;
	_WAMEventHandler.prototype.fire =3D _WAMEventHandler_fire;
=09
	function _WAMEventHandler_set(strEventName, =
varObjectName/*string=3Deval()...; function=3D...()*/){
		eval("this.parent."+strEventName+"=3D"+varObjectName);
	}
=09
	function _WAMEventHandler_fire(strEventName, bolTimeOut){
		if (typeof(bolTimeOut) !=3D "boolean") bolTimeOut =3D true;
		__event =3D eval("this.parent."+strEventName);
		if (__event !=3D null){
			switch (typeof(__event)){
				case "string":
					if (bolTimeOut) window.setTimeout("eval(__event)", 1);
					else return eval(__event);
					break;
				case "function":
					if (bolTimeOut) window.setTimeout("__event();", 1);
					else return __event();
					break;
			}
		}
	}
}//**********************************************************************=
**/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
function WAMDialog(strWinTitle, strTitle, strText){
	var objWAMDialog;
=09
	objWAMDialog =3D new _WAMDialog(strWinTitle, strTitle, strText);

	return objWAMDialog;
}

// _WAMDIALOG OBJECT
function _WAMDialog(strWinTitle, strTitle, strText){
	if (isUndefined(typeof(_WAMDialogPrototypeCalled)))
		_WAMDialog__Prototype();

	this.height			=3D null;
	this.width			=3D null;
	this.top			=3D null;
	this.left			=3D null;
	this.winTitle		=3D "";
	this.title			=3D "";
	this.text			=3D "";
	this.inputText		=3D null;
	this.inputWidth		=3D 200;
	this.buttons		=3D new Array();
	this.isPromptDialog	=3D false;
=09
	if (!isUndefined(strWinTitle) && !isNull(strWinTitle)) =
this.setWinTitle(strWinTitle);
	if (!isUndefined(strTitle) && !isNull(strTitle)) =
this.setTitle(strTitle);
	if (!isUndefined(strText) && !isNull(strText)) this.setText(strText);
}

// _WAMDIALOG PROTOTYPE
function _WAMDialog__Prototype(){
	_WAMDialogPrototypeCalled =3D true;
=09
	_WAMDialog.prototype.setHeight		=3D _WAMDialog_setHeight;
	_WAMDialog.prototype.setWidth		=3D _WAMDialog_setWidth;
	_WAMDialog.prototype.setTop			=3D _WAMDialog_setTop;
	_WAMDialog.prototype.setLeft		=3D _WAMDialog_setLeft;
	_WAMDialog.prototype.setWinTitle	=3D _WAMDialog_setWinTitle;
	_WAMDialog.prototype.setTitle		=3D _WAMDialog_setTitle;
	_WAMDialog.prototype.setText		=3D _WAMDialog_setText;
	_WAMDialog.prototype.addLine		=3D _WAMDialog_addLine;
	_WAMDialog.prototype.addEmptyLine	=3D _WAMDialog_addEmptyLine;
	_WAMDialog.prototype.addLineBr		=3D _WAMDialog_addLineBr;
	_WAMDialog.prototype.addButton		=3D _WAMDialog_addButton;
	_WAMDialog.prototype.show			=3D _WAMDialog_show;
	_WAMDialog.prototype.alert			=3D _WAMDialog_alert;
	_WAMDialog.prototype.prompt			=3D _WAMDialog_prompt;
=09
	function _WAMDialog_setHeight(height){
		this.height =3D height;
	}
=09
	function _WAMDialog_setWidth(width){
		this.width =3D width;
	}
=09
	function _WAMDialog_setTop(top){
		this.top =3D top;
	}=09
=09
	function _WAMDialog_setLeft(left){
		this.left =3D left;
	}
=09
	function _WAMDialog_setWinTitle(strTitle){
		this.winTitle =3D strTitle;
	}

	function _WAMDialog_setTitle(strTitle){
		this.title =3D strTitle;
	}

	function _WAMDialog_setText(strText){
		this.text =3D strText;
	}
=09
	function _WAMDialog_addLine(strLine){
		if (isNull(this.text))
			this.text =3D strLine;
		else
			this.text +=3D strLine;
	}
=09
	function _WAMDialog_addEmptyLine(intNLines){
		if (isUndefined(intNLines) || isNull(intNLines))
			intNLines =3D 1;		=09
		var l;
		for (l=3D1; l<=3DintNLines; l++)
			this.text +=3D "\n";
	}

	function _WAMDialog_addLineBr(strLine){
		if (isNull(this.text))
			this.text =3D strLine;
		else
			this.text +=3D strLine + "<br>";
	}

	function _WAMDialog_addButton(objWAMButton){
		this.buttons[this.buttons.length] =3D objWAMButton;
	}

	function _WAMDialog_show(){
		var strFeatures =3D "";
		strFeatures +=3D "dialogHeight:" + ((isNull(this.height)) ? "300px;" : =
this.height + ";");
		strFeatures +=3D "dialogWidth:" + ((isNull(this.width)) ? "300px;" : =
this.width + ";");
		if (!isNull(this.left))
			strFeatures +=3D "dialogTop:" + this.top + ";";
		if (!isNull(this.left))
			strFeatures +=3D "dialogLeft:" + this.left + ";";
		strFeatures +=3D "status: no";
		var objDialogArgs =3D new Object();
		objDialogArgs.winTitle =3D this.winTitle;
		objDialogArgs.title =3D this.title;
		objDialogArgs.text =3D this.text.replace(/\n|\r|\n\r/g, "<br>");
		objDialogArgs.text =3D objDialogArgs.text.replace(/\t/g, =
"&nbsp;&nbsp;&nbsp;&nbsp;");
		objDialogArgs.isPromptDialog =3D this.isPromptDialog;
		objDialogArgs.inputText =3D this.inputText;
		objDialogArgs.inputWidth =3D this.inputWidth;
		objDialogArgs.buttons =3D this.buttons;
		var answer =3D =
window.showModalDialog(WAMRootURL+"/wamlibrary/dialog/wamdialog.htm", =
objDialogArgs, strFeatures);
		return answer;
	}

	function _WAMDialog_alert(){
		this.addButton(new WAMButton("OK", "OK"));
		this.show();
	}
=09
	function _WAMDialog_prompt(defValue, inputWidth){
		this.isPromptDialog =3D true;
		(isUndefined(defValue) || isNull(defValue)) ? this.inputText =3D "" : =
this.inputText =3D defValue;
		if (!isUndefined(inputWidth) || !isNull(inputWidth)) this.inputWidth =
=3D inputWidth;
		this.buttons =3D new Array();
		this.addButton(new WAMButton("OK"));
		this.addButton(new WAMButton("Cancel"));
		answer =3D this.show();
		return answer;=20
	}
}




function WAMButton(label, value, tip, width){
	var objWAMButton;
	objWAMButton =3D new _WAMButton(label, value, tip, width);
	return objWAMButton;
}
=09
function _WAMButton(label, value, tip, width){
	if (isUndefined(typeof(_WAMButtonPrototypeCalled)))
		_WAMButton__Prototype();
=09
	this.label		=3D label;
	(isUndefined(tip) || isNull(tip)) ? this.value =3D this.label : =
this.value =3D value;
	this.name		=3D "btn_" + this.label;
	(isUndefined(tip) || isNull(tip)) ? this.tip =3D "" : this.tip =3D tip;
	if (!isUndefined(width)) this.width =3D width;
}

function _WAMButton__Prototype(){
	_WAMButtonPrototypeCalled =3D true;

	// --- Properties
	_WAMButton.prototype.name		=3D "";
	_WAMButton.prototype.value		=3D null;
	_WAMButton.prototype.label		=3D "";
	_WAMButton.prototype.tip		=3D "";
	_WAMButton.prototype.width		=3D "75px";

	// --- Methods
	_WAMButton.prototype.setValue	=3D _WAMButton_setValue;
	_WAMButton.prototype.setLabel	=3D _WAMButton_setLabel;
	_WAMButton.prototype.getLabel	=3D _WAMButton_getLabel;
	_WAMButton.prototype.setTip		=3D _WAMButton_setTip;
	_WAMButton.prototype.getTip		=3D _WAMButton_getTip;
	_WAMButton.prototype.setWidth	=3D _WAMButton_setWidth;

	function _WAMButton_setValue(value){
		this.value =3D value;
	}

	function _WAMButton_setLabel(strLabel){
		this.label =3D strLabel;
	}
=09
	function _WAMButton_getLabel(){
		return this.label;
	}

	function _WAMButton_setTip(strTip){
		this.tip =3D strTip;
	}

	function _WAMButton_getTip(){
		return (isNull(this.tip) ? "" : this.tip);
	}

	function _WAMButton_setWidth(strWidth){
		this.width =3D strWidth;
	}
}
//***********************************************************************=
*/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
function WAMError(rootURL){
	var objWAMError;
=09
	objWAMError =3D new _WAMError();
	objWAMError.rootURL =3D rootURL;

	return objWAMError;
}

// _WAMERROR OBJECT
function _WAMError(){
	if (isUndefined(typeof(_WAMErrorPrototypeCalled)))
		_WAMError__Prototype();

	this.rootURL =3D null;
	this.errors =3D new Array();
	this.errorMsgs =3D new Array();
	this.focus =3D null;
	this.aspExecuted =3D true;
}

// _WAMERROR PROTOTYPE
function _WAMError__Prototype(){
	_WAMErrorPrototypeCalled =3D true;
=09
	_WAMError.prototype.existsMsg		=3D _WAMError_existsMsg;
	_WAMError.prototype.add				=3D _WAMError_add;
	_WAMError.prototype.addMsg			=3D _WAMError_addMsg;
	_WAMError.prototype.addError		=3D _WAMError_addError;
	_WAMError.prototype.setError		=3D _WAMError_setError;
	_WAMError.prototype.setMacro		=3D _WAMError_setMacro;
	_WAMError.prototype.catchErrors		=3D _WAMError_catchErrors;
	_WAMError.prototype.show			=3D _WAMError_show;
	_WAMError.prototype.showParsed		=3D _WAMError_showParsed;
	_WAMError.prototype.clear			=3D _WAMError_clear;
	_WAMError.prototype.setParameters	=3D _WAMError_setParameters;
	_WAMError.prototype.setFocusTo		=3D _WAMError_setFocusTo;
	_WAMError.prototype.hasErrors		=3D _WAMError_hasErrors;
	_WAMError.prototype.setASPExecuted	=3D _WAMError_setASPExecuted;
	_WAMError.prototype.getASPExecuted	=3D _WAMError_getASPExecuted;
}

function _WAMError_setASPExecuted(blnExecuted){
	if (isUndefined(blnExecuted))
		this.aspExecuted =3D false;
	else
		this.aspExecuted =3D blnExecuted;
}

function _WAMError_getASPExecuted(){
	return this.aspExecuted;
}

function _WAMError_existsMsg(strCode){
	if (isUndefined(this.errorMsgs[strCode]))
		return null;
	else
		return this.errorMsgs[strCode];
}

function _WAMError_addMsg(strCode, objErrorMsg){
	this.errorMsgs[strCode] =3D objErrorMsg;
}

function _WAMError_addError(objError){
	this.errors[this.errors.length] =3D objError;
}

function _WAMError_setParameters(){
	var arrParam =3D new Array();
	var i;
	for (i=3D0; i<_WAMError_setParameters.arguments.length; i+=3D2)
		arrParam[_WAMError_setParameters.arguments[i]] =3D =
_WAMError_setParameters.arguments[i+1];
	return arrParam;
}

function _WAMError_add(strCode, strDescription, arrParameters, =
bolCacheMode/*default=3Dfalse*/){
	var objError;
	var objErrorMsg =3D this.existsMsg(strCode);
=09
	if (isUndefined(bolCacheMode) || isNull(bolCacheMode))
		bolCacheMode =3D false;
=09
	if (isNull(objErrorMsg)){
		objErrorMsg =3D new _ErrorMsg(strCode, strDescription);
		this.addMsg(strCode, objErrorMsg);
	}
=09
	if (!bolCacheMode){
		if (isUndefined(arrParameters))
			this.addError(new _Error(objErrorMsg));
		else{
			objError =3D new _Error(objErrorMsg);
			objError.parameters =3D arrParameters;
			this.addError(objError);
		}
	}
}

function _WAMError_setError(strCode){
	this.add(strCode, null);
}

function _WAMError_setMacro(strParam, strValue){
	strParam =3D "@" + strParam;
	this.errors[this.errors.length-1].addParameter(strParam, strValue);
}

function _WAMError_setFocusTo(objHTMLEl){
	this.focus =3D objHTMLEl;
}

function _WAMError_hasErrors(){
	return (!this.errors.length =3D=3D 0);
}
=09
function _WAMError_catchErrors(blnShowErrors){
	var err;=20
	var blnGetFromServer =3D false;=20
	var strForm=3D"";
	var objASPExec;
=09
	//----
	if (!this.getASPExecuted()) return;
	//----
=09
	if (isUndefined(blnShowErrors) || isNull(blnShowErrors))
		blnShowErrors =3D true; // Show alert with erros imediatly after =
receiving errors from the Server
	for (err in this.errorMsgs){
		// Only get description from the server for those errors not yet =
loaded in client
		if (isNull(this.errorMsgs[err].description)){
			strForm +=3D "\t\t<input type=3D'text' name=3D'txtError' value=3D'" + =
this.errorMsgs[err].code + "'>\n";
			blnGetFromServer =3D true;
		}
	}
	if (blnGetFromServer =3D=3D true){
		strForm =3D ""+
			"\t<form name=3D'frmErrors' action=3D'" + this.rootURL + =
"/WAMLibrary/WAMError_Get.asp' method=3D'post'>\n" +
			strForm + // --- INPUTs
			"\t\t<input type=3D'text' name=3D'__showErrors' value=3D'" + =
blnShowErrors + "'>\n" +
			"\t</form>\n";
		//----
		this.setASPExecuted(false);
		//----
		// Get errors description from the Server
		objASPExec =3D new ASPExecute();
		objASPExec.setForm(strForm, "frmErrors");
//objASPExec.setDebug(true);
		objASPExec.execute();
	}
	else {
		if (blnShowErrors) this.showParsed();
	}
}

function _WAMError_show(){
	var e;
	var p;
	var strErrors =3D "";
	var strParameters;
=09
	for (e in this.errors){
		strErrors +=3D this.errors[e].msg.code + "-> " + =
this.errors[e].msg.description + "\n";
		strParameters =3D "\t";
		for (p in this.errors[e].parameters)
			strParameters +=3D p + " =3D " + this.errors[e].parameters[p] + "   =
";
		strErrors +=3D strParameters + "\n\n";
	}
	alert(strErrors);
}

function _WAMError_clear(){
	delete(this.errors);
	this.errors =3D new Array();
}

function _WAMError_showParsed(bolClearErrors/*default=3Dtrue*/){
	var e;=20
	var strErrors =3D "";=20
	var objHTLMEl;
	for (e in this.errors)
		strErrors +=3D this.errors[e].parse() + "\n\n";
	alert(strErrors);
	if (bolClearErrors !=3D false){
		this.clear();
	}
	if (!isNull(this.focus)){
		//HTMLEl =3D eval("window.document." + this.focus);
		objHTLMEl =3D this.focus;
		if (typeof(objHTLMEl.name) !=3D "undefined" && objHTLMEl.type !=3D =
"hidden" && objHTLMEl.disabled !=3D true){
			objHTLMEl.focus();
		}
	}
}

function _ErrorMsg(strCode, strDescription){
	this.code =3D strCode;
	this.description =3D strDescription;
}

function _Error(objErrorMsg){
	this.msg =3D objErrorMsg;
	this.parameters =3D new Array();
	this.addParameter =3D _Error_addParameter;
	this.parse =3D _Error_Parse;
}

function _Error_addParameter(strParam, strValue){
	this.parameters[strParam] =3D strValue;
}

function _Error_Parse(){
	var p;
	var strErrorMsg;
	strErrorMsg =3D this.msg.description;
	for (p in this.parameters)
		strErrorMsg =3D strErrorMsg.replace(p, this.parameters[p]);
	return strErrorMsg;
}
var Error =3D new WAMError(WAMRootURL);
var WAMDataType =3D new Object();
WAMDataType.dtbit =3D "bit";
WAMDataType.dtbigint =3D "bigint";
WAMDataType.dtint =3D "int";
WAMDataType.dtsmallint =3D "smallint";
WAMDataType.dttinyint =3D "tinyint";
WAMDataType.dtdecimal =3D "decimal";
WAMDataType.dtnumeric =3D "numeric";
WAMDataType.dtmoney =3D "money";
WAMDataType.dtsmallmoney =3D "smallmoney";
WAMDataType.dtfloat =3D "float";
WAMDataType.dtreal =3D "real";
WAMDataType.dtdatetime =3D "datetime";
WAMDataType.dtsmalldatetime =3D "smalldatetime";
WAMDataType.dtcursor =3D "cursor";
WAMDataType.dttimestamp =3D "timestamp";
WAMDataType.dtchar =3D "char";
WAMDataType.dtvarchar =3D "varchar";
WAMDataType.dttext =3D "text";
WAMDataType.dtnchar =3D "nchar";
WAMDataType.dtnvarchar =3D "nvarchar";
WAMDataType.dtntext =3D "ntext";
WAMDataType.dimage =3D "image";

var WAMDomain =3D new Object();
WAMDomain.wamdate =3D "wamdate";
WAMDomain.wamtime =3D "wamtime";
WAMDomain.wamexternalimage =3D "wamexternalimage";
WAMDomain.wamhierarchical1 =3D "wamhierarchical1";
WAMDomain.wamhierarchical2 =3D "wamhierarchical2";
WAMDomain.wammoment =3D "wammoment";
WAMDomain.wamemail =3D "wamemail";
WAMDomain.wamurl =3D "wamurl";
WAMDomain.wamrange =3D "wamrange";

function invalidValue(){
	return "_invalid_value_";
}

function validateGeneric(strDataType, strDomain, varVal, intLen, =
intPrec, intDecs){
	var newVal;
	switch (strDataType){
		case WAMDataType.dtbit:
			newVal =3D validateBit(varVal); break;
		case WAMDataType.dtbigint:
			newVal =3D validateBigint(varVal); break;
		case WAMDataType.dtint:
			newVal =3D validateInt(varVal); break;
		case WAMDataType.dtsmallint:
			newVal =3D validateSmallint(varVal); break;
		case WAMDataType.dttinyint:
			newVal =3D validateTinyint(varVal); break;
		case WAMDataType.dtdecimal:
			newVal =3D validateDecimal(varVal, intPrec, intDecs); break;
		case WAMDataType.dtnumeric:
			newVal =3D validateNumeric(varVal); break;
		case WAMDataType.dtmoney:
			newVal =3D validateMoney(varVal, intPrec, intDecs); break;
		case WAMDataType.dtsmallmoney:
			newVal =3D validateSmallmoney(varVal); break;
		case WAMDataType.dtfloat:
			newVal =3D validateFloat(varVal); break;
		case WAMDataType.dtreal:
			newVal =3D validateReal(varVal); break;
		case WAMDataType.dtdatetime:
			newVal =3D validateDatetime(varVal, strDomain); break;
		case WAMDataType.dtsmalldatetme:
			newVal =3D validateSmalldatetime(varVal, strDomain); break;
		case WAMDataType.dtchar:
		case WAMDataType.dtnchar:
			newVal =3D validateChar(varVal, strDomain, intLen); break;
		case WAMDataType.dtvarchar:
		case WAMDataType.dtnvarchar:
			newVal =3D validateVarchar(varVal, strDomain, intLen); break;
		case WAMDataType.dttext:
			newVal =3D validateText(varVal, strDomain, 2147483647); break;
		case WAMDataType.dtntext:
			newVal =3D validateNText(varVal, strDomain, 1073741823); break;
		default:
			alert("Unknown type code at validateGeneric.");
			newVal =3D invalidValue();
			break;
	}
	return newVal;
}



function validateBit(val){
	if (isEmpty(val)) return val;
	if (isNaN(val) || (val !=3D true && val !=3D false) || (val !=3D 1 && =
val !=3D 0)){
		Error.setError("TYPBADBOOL");
		return invalidValue()
	}
	return val;
}

function validateBigint(val){
	if (isEmpty(val)) return val;
	if (isNaN(val)){
		Error.setError("TYPBADINT");
		return invalidValue();
	}
	if (val.toString().indexOf(".", 0) !=3D -1){
		Error.setError("TYPBADINT");
		return invalidValue()
	}
	if (val < -9223372036854775808 || val > 9223372036854775807){
		Error.setError("TYPINTRNG");
		return invalidValue();
	}
	return val;
}

function validateInt(val){
	if (isEmpty(val)) return val;
	if (isNaN(val)){
		Error.setError("TYPBADINT");
		return invalidValue();
	}
	if (val.toString().indexOf(".", 0) !=3D -1){
		Error.setError("TYPBADINT");
		return invalidValue()
	}
	if (val < -2147483648 || val > 2147483647){
		Error.setError("TYPINTRNG");
		return invalidValue();
	}
	return val;
}

function validateSmallint(val){
	if (isEmpty(val)) return val;
	if (isNaN(val)){
		Error.setError("TYPBADINT");
		return invalidValue();
	}
	if (val.toString().indexOf(".", 0) !=3D -1){
		Error.setError("TYPBADINT");
		return invalidValue()
	}
	if (val < -32768 || val > 32767){
		Error.setError("TYPSMIRNG");
		return invalidValue();
	}
	return val;
}

function validateTinyint(val){
	if (isEmpty(val)) return val;
	if (isNaN(val)){
		Error.setError("TYPBADINT");
		return invalidValue();
	}
	if (val.toString().indexOf(".", 0) !=3D -1){
		Error.setError("TYPBADINT");
		return invalidValue()
	}
	if (val < 0 || val > 255){
		Error.setError("TYPTNIRNG");
		return invalidValue();
	}
	return val;
}

function validateDecimal(val, intPrec, intDecs){
	var num;
	if (isEmpty(val)) return val;
	val =3D val.replace(/ /g, "");
	if (isNaN(val)){
		Error.setError("TYPBADDEC");
		return invalidValue();
	}
	if (isNull(intDecs)){
		return val;
	} else {
		num =3D new Number(val);
		val =3D formatNumber(num.round(intDecs), intDecs);
	}
	return val;
}

function validateNumeric(val){
	if (isEmpty(val)) return val;
	if (isNaN(val)){
		Error.setError("TYPBADNUM");
		return invalidValue();
	}
	return val;
}

function validateMoney(val, intLen/*Precision*/, intDecs/*Scale*/){
	if (isEmpty(val)) return val;
	if (true/*sis_EuroEnabled*/) return validateEUROMoney(val, intLen, =
intDecs);
/*
put replaceChar(val,"$",".") into val
put dropChar(val,space) into val
put the value of val into val
if val is not a number then
setError "TYPBADMONY"
return invalidValue()
end if
return replaceChar(formatNumber(val,"###' '###' '###.",true),".","$")
*/
}

function validateSmallmoney(val, intLen/*Precision*/, intDecs/*Scale*/){
	return validateMoney(val, intLen, intDecs);
}

function validateEUROMoney(val, intLen, intDecs){
	var EUROTax =3D 200.482;

	val =3D val+"";
	if (val.charAt(val.length-1).toLowerCase() =3D=3D "e"){
		val =3D val.replace(/,/, ".");
		val =3D val.replace(/e/i, "");
		if (isNaN(val)){
			Error.setError("TYPBADMONY");
			return invalidValue();
		}
		val =3D Math.round(val * EUROTax)
	} else {
		val =3D val.replace(/\$/, ".");
		val =3D val.replace(/ /g,"");
		if (isNaN(val)){
			Error.setError("TYPBADMONY");
			return invalidValue();
		}
		val =3D new Number(val);
	}
	val =3D val.toMoney(2);
	return val;
}

function validateFloat(val){
	return validateNumeric(val);
}

function validateReal(val){
	return validateNumeric(val);
}

function validateWAMDate(val, domain){
	var dt; var tYear;

	if (val =3D=3D "h" || val =3D=3D "hoje" || isEmpty(val)){
		var dt =3D new Date();
	} else {
		val =3D (val+"").replace(/ |\.|,/g, "-");
		// --- dd-mm
		if (validMask(val, "^[0-9]{1,2}-[0-9]{1,2}$")){
			var dt =3D new Date();
			dt.setDate(1); dt.setMonth(0);
			dt.setMonth(Math.ceil(val.substr(val.indexOf("-")+1))-1);
			dt.setDate(Math.ceil(val.substr(0,val.indexOf("-"))));
		} else {
			// --- dd-mm-yyyy
			if (validMask(val, "^[0-9]{1,2}-[0-9]{1,2}-[0-9]{1,4}$")){
				var dt =3D new Date();
				tYear =3D Math.ceil(val.substr(val.lastIndexOf("-")+1))
				if (tYear < 1000) tYear+=3D2000;
				dt.setDate(1); dt.setMonth(0);
				dt.setFullYear(tYear);
				dt.setMonth(Math.ceil(val.substr(val.indexOf("-")+1, =
val.lastIndexOf("-")-val.indexOf("-")-1))-1);
				dt.setDate(Math.ceil(val.substr(0,val.indexOf("-"))));
			} else {
				// --- dd
				if (!isNaN(val)){
					var dt =3D new Date();
					dt.setDate(Math.ceil(val));
					if (dt.toString() =3D=3D "NaN"){
						Error.setError("TYPBADDATE");
						Error.setMacro("D", (new Date()).toHTMLFormat(domain));
						return invalidValue();
					}
					if (dt.getFullYear() > 9999){
						Error.setError("TYPBADDATE");
						Error.setMacro("D", (new Date()).toHTMLFormat(domain));
						return invalidValue();
					}
				} else {
					Error.setError("TYPBADDATE");
					Error.setMacro("D", (new Date()).toHTMLFormat(domain));
					return invalidValue();
				}
			}
		}
	}
	return dt.toHTMLFormat(domain);
}

function validateWAMTime(val, domain){
	var dt;

	if (val =3D=3D "a" || val =3D=3D "agora" || isEmpty(val)){
		var dt =3D new Date();
	} else {
		val =3D val.replace(/ |\.|,/g, ":");
		// --- hh:mm
		if (validMask(val, "^[0-9]{1,2}:[0-9]{1,2}$")){
			var dt =3D new Date();
			dt.setHours(Math.ceil(val.substr(0,val.indexOf(":"))));
			dt.setMinutes(Math.ceil(val.substr(val.indexOf(":")+1))-1);
		} else {
			// --- hh:mm:ss
			if (validMask(val, "^[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}$")){
				var dt =3D new Date();
				dt.setHours(Math.ceil(val.substr(0,val.indexOf(":"))));
				dt.setMinutes(Math.ceil(val.substr(val.indexOf(":")+1, =
val.lastIndexOf(":")-val.indexOf(":")-1)));
				dt.setSeconds(Math.ceil(val.substr(val.lastIndexOf(":")+1)));
			} else {
				// --- hh
				if (!isNaN(val)){
					var dt =3D new Date();
					dt.setHours(Math.ceil(val));
				} else {
					Error.setError("TYPBADDATE");
					Error.setMacro("D", (new Date()).toHTMLFormat(domain));
					return invalidValue();
				}
			}
		}
	}
	return dt.toHTMLFormat(domain);
}

function validateDatetime(val, domain){
	var iSpace;

	if (isEmpty(val)) return val;
	switch (domain){
		case WAMDomain.wamdate:
			return validateWAMDate(val, domain);
			break;
		case WAMDomain.wamtime:
			return validateWAMTime(val, domain);
			break;
		default:
			iSpace =3D val.indexOf(" ");
			if (iSpace =3D=3D -1) iSpace =3D val.length;
			strDate =3D validateWAMDate(val.substr(0, iSpace));
			if (strDate =3D=3D invalidValue()){
				return invalidValue();
			}
			strTime =3D validateWAMTime(val.substr(iSpace+1));
			if (strTime =3D=3D invalidValue()){
				return invalidValue();
			}
			return strDate.substr(0,10)+" "+strTime.substr(11);
			break;
	}
}

function validateSmalldatetime(val, domain){
	return validateDatetime(val, domain);
}

function validateTimestamp(val){
}

function validateChar(val, domain, intLen){
	return validateVarchar(val, domain, intLen);
}

function validateVarchar(val, domain, intLen){
	if (isEmpty(val) || isUndefined(val)) return val;
	switch (domain){
		case WAMDomain.wammoment:
			return validateWAMMoment(val);
			break;
		case WAMDomain.wamemail:
			return validateWAMEmail(val);
			break;
		case WAMDomain.wamurl:
			return validateWAMUrl(val);
			break;
	}
	if (!isUndefined(intLen)){
		if (val.length > intLen){
			Error.setError("TYPTOOLONG");
			Error.setMacro("N", intLen);
			return invalidValue();
		}
	}
	return val;
}

function validateText(val, domain, intLen){
	if (isEmpty(val) || isUndefined(val)) return val;
	if (val.length > intLen){
		Error.setError("TYPTOOLONG");
		Error.setMacro("N", intLen);
		return invalidValue();
	}
	return val;
}

function validateNText(val, domain, intLen){
	return validateText(val, domain, intLen);
}

function validateWAMEmail(val){
	if (isEmpty(val)) return val;
	var emailMask =3D =
"^[A-Za-z0-9!#\$%&'\*\+\-/=3D\?\^_`{|}~]+(\.[A-Za-z0-9!#\$%&'\*\+\-/=3D\?=
\^_`{|}~]+)*\.?@[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9](\.[A-Za-z0-9][A-Za-z=
0-9\-]*[A-Za-z0-9])+$";

	if (validMask(val, emailMask)) return val;
	else {
		Error.setError("TYPBADMAIL");
		return invalidValue();
	}
}

function validateWAMUrl(val){
	if (isEmpty(val)) return val;
	var urlMask =3D "^[hH][tT][tT][pP]://.*$";

	if (validMask(val, urlMask)) return val;
	else {
		Error.setError("TYPBADURL");
		return invalidValue();
	}
}

function validateWAMMoment(val){
	return validateConvertWAMMoment(true/*VALIDATE*/, val);
}

function validateConvertWAMMoment(VALIDATE, val){
	var dt, dtNew, theYea, theMon, theCen, theDec;
	var strCen =3D strDec =3D strYea =3D ""; var numCen, numDec, numMonth; =
var isCentury, isDecade;
	var w1, w2; var arWord; var newVal; var p;
	var oldVal;

	if (isEmpty(val)){
		if (VALIDATE) return val; // --- VALIDATE
		else return nullValue();
	}
	// --- Srips seps and separate numbers
	oldVal =3D val; // --- For later use
	val =3D stripWAMMoment(val);

	// --- Set defaults
	dt =3D new Date();
	theYea =3D dt.getFullYear();
	theMon =3D dt.getMonth() + 1;
	theCen =3D (theYea / 100) + 1;
	theDec =3D ((theYea % 100) / 10) * 10;

	// --- Try first word for century
	w1 =3D val.getWord(1);
	isCentury =3D isCenturyPO(w1);
	if (isCentury){
		// --- First word is century
		w2 =3D val.getWord(2);
		// --- Second word empty =3D> Default century
		if (isEmpty(w2)){
			if (VALIDATE) return centuryPO(theCen); // --- VALIDATE
			else return packedWAMMoment(theCen, null, null, null, null);
		}
		// --- Second word integer =3D> Century
		if (!isNaN(w2)){
			// --- IF CENTURY < 100 =3D> OK
			if (w2 < 100){
				val =3D val.deleteWord(1, 2);
				if (VALIDATE) strCen =3D centuryPO(w2); // --- VALIDATE
				else strCen =3D "there-is-century";
				numCen =3D w2;
			}
		}
		if (isEmpty(strCen)){
			// --- Second word is wrong
			Error.setError("TYPBADMOMT")
			return invalidValue();
		}
	}

	// --- Try first/third word for decade
	w1 =3D val.getWord(1);
	isDecade =3D isDecadePO(w1);
	if (isDecade){
		w2 =3D val.getWord(2);
		// -- Second word empty =3D> Default decade
		if (isEmpty(w2)){
			strDec =3D decadePO(theDec);
			numDec =3D theDec;
			// --- Second word integer =3D> Decade
		} else if (!isNaN(w2)){
			// --- IF DECADE IN (0,10,20..., 90) =3D> OK
			if (w2 % 10 =3D=3D 0 && w2 <=3D 90){
				if (w2 =3D=3D 0) w2 =3D "0";
				strDec =3D decadePO(w2);
				numDec =3D w2;
			}
		}
		if (isEmpty(strDec)){
			// --- Second word is wrong
			Error.setError("TYPBADMOMT");
			return invalidValue();
		}
	}

	if (!isEmpty(strCen)){
		if (!isEmpty(strDec)){
			if ((numCen !=3D theCen)){
				if (VALIDATE) return strCen+", "+strDec; // --- VALIDATE
				else return packedWAMMoment(numCen, numDec, null, null, null);
			} else {
				if (VALIDATE) return strDec; // --- VALIDATE
				else return packedWAMMoment(theCen, numDec, null, null, null);
			}
		} else {
			if (VALIDATE) return strCen; // --- VALIDATE
			else return packedWAMMoment(numCen, null, null, null, null);
		}
	} else { // --- strCen is empty
		if (!isEmpty(strDec)){
			if (VALIDATE) return strDec; // --- VALIDATE
			else return packedWAMMoment(theCen, numDec, null, null, null);
		} else {
			// --- Continue
		}
	}

	// --- Here both cenStr and decStr are empty

	// --- Try first word for a year
	w1 =3D val.getWord(1);
	isYear =3D isYearPO(w1);
	if (isYear){ // --- First word is a year
		w2 =3D val.getWord(2);
		// --- Second word empty =3D> Default year
		if (isEmpty(w2)){
			if (VALIDATE) return yearPO(theYea); // --- VALIDATE
			else return packedWAMMoment(null, null, theYea, null, null);
		}
		// --- Second word integer =3D> Year
		if (!isNaN(w2)){
			if (VALIDATE) return yearPO(w2,"noDefaultCentury"); // --- VALIDATE
			else return packedWAMMoment(null, null, year4(w2,"noDefaultCentury"), =
null, null);
		}
		// --- Second word is wrong
		Error.setError("TYPBADMOMT")
		return invalidValue()
	}

	// --- Try first word for a month
	w1 =3D val.getWord(1);
	numMonth =3D isMonthPO(w1);
	if (numMonth > 0){ // --- First word is a month
		w2 =3D val.getWord(2);
		// --- Second word empty =3D> Default year
		if (isEmpty(w2)){
			if (VALIDATE) return month3PO(numMonth)+" "+year4(theYea); // --- =
VALIDATE
			else return packedWAMMoment(null, null, year4(theYea), numMonth, =
null);
		}
		// --- Second word integer =3D> Year
		if (!isNaN(w2)){
			if (VALIDATE) return month3PO(numMonth)+" "+year4(w2); // --- =
VALIDATE
			else return packedWAMMoment(null, null, year4(w2), numMonth, null);
		}
		// --- Second word is wrong
		Error.setError("TYPBADMOMT");
		return invalidValue();
	}

	// --- Try validate as year
	if (!isNaN(val)){
		if (val >=3D 1000){
			if (VALIDATE) return yearPO(val); // --- VALIDATE
			else return packedWAMMoment(null, null, year4(val), null, null);
		}
	}

	// --- Try validate as date
	val =3D oldVal;
	if (VALIDATE) newVal =3D validateDatetime(val, WAMDomain.wamdate);
	else newVal =3D convertDatetime(val, WAMDomain.wamdate);
	if (!Error.hasErrors()){
		if (VALIDATE) return newVal; // --- VALIDATE
		else {
			return packedWAMMoment(null, null, newVal.getFullYear(), =
newVal.getMonth()+1, newVal.getDate());
		}
	}
	Error.clear();

	// --- Try validate as month/year
	p =3D val.indexOf("/");
	if (p !=3D -1){
		dtNew =3D val.substr(0, p+1)+"1/"+val.substr(p+1);
		dtNew =3D Date.parse(dtNew);
		if (!isNaN(dtNew)){
			dtNew =3D new Date(dtNew);
			if (VALIDATE) return month3PO(dtNew.getMonth()+1)+dtNew.getDate(); // =
--- VALIDATE
			else return packedWAMMoment(null, null, newVal.getFullYear(), =
newVal.getMonth()+1);
		}
	}
	Error.setError("TYPBADMOMT");
	return invalidValue();
}

function stripWAMMoment(val){
	var i;

	val =3D val.replace(/\.|,/g, " ")+""; // --- convert to string
	for (i =3D val.length; i > 2; i--){
		if (isDigit(val.charAt(i))){
			if (!isDigit(val.charAt(i-1))){
				val =3D val.substr(0,i)+" "+val.substr(i);
			}
		}
	}
	return val;
}

function centuryPO(centuryNum){
	return "S=E9c. "+Number(centuryNum);
}

function isCenturyPO(centuryWord){
	return "S=C9CULO".indexOf(centuryWord.toUpperCase())=3D=3D0 && =
centuryWord.length>=3D3;
}

function decadePO(decadeNum){
	return "Anos "+Number(decadeNum);
}

function isDecadePO(decadeWord){
	return decadeWord.toUpperCase() =3D=3D "ANOS";
}

function yearPO(yearNum, noDefaultCentury){
	return "Ano "+year4(yearNum,noDefaultCentury);
}

function isYearPO(yearWord){
	return "ANO".indexOf(yearWord.toUpperCase())=3D=3D0;
}

function year4(yearNum, noDefaultCentury){
	var i;

	if (!isNaN(yearNum)){
		if (yearNum < 0) return "ANOaC?";
		if (yearNum < 100 && yearNum.charAt(0) !=3D "0" && =
isUndefined(noDefaultCentury)){
			return (1900+Number(yearNum));
		} else {
			yearNum =3D yearNum % 10000;
			return yearNum.toString().formatNum("0000");
		}
	}
	return "ANO?";
}

function monthPO(monthNum){
	var arMonthsPO =3D new Array("Janeiro", "Fevereiro", "Mar=E7o", =
"Abril",
						"Maio", "Junho", "Julho", "Agosto",
						"Setembro", "Outubro", "Novembro", "Dezembro");

	if (monthNum < 1 || 12 < monthNum){
		return "MES"+monthNum+"?";
	} else {
		return arMonthsPO[monthNum-1];
	}
}

function month3PO(monthNum){
	if (monthNum < 1 || 12 < monthNum){
		return "MES"+monthNum+"?";
	} else {
		return monthPO(monthNum).substr(0, 3);
	}
}

function isMonthPO(monthWord){
	var x;

	x =3D ("JANEIRO  FEVEREIROMAR=C7O    ABRIL    MAIO     JUNHO    "+
		"JULHO    AGOSTO   SETEMBRO OUTUBRO  NOVMEBRO =
DEZEMBRO").indexOf(monthWord.toUpperCase())+9;
	if (x % 9 =3D=3D 0)	return x / 9;
	else return 0;
}

function packedWAMMoment(){
	return "";
}//**********************************************************************=
**/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
//***********************************************************************=
*/
// WAMRow Object (Client Side)
//***********************************************************************=
*/
function WAMRow(strTable){
	if (typeof(strTable) =3D=3D "string" && strTable !=3D ""){
		var WR =3D new _WAMRow(strTable);
		return WR;
	}
	// --- No object was created
	return null;
}

function _WAMRow(strTable){
	if (typeof(_WAMRowPrototypeCalled) =3D=3D "undefined")
		_WAMRow__Prototype();

	// --- Properties
	this.table =3D strTable;
	this.rootURL =3D WAMRootURL;
=09
	// --- Collections
	this.pkColumns =3D new Array();
	this.columns =3D new Array();
	this.lookups =3D new Array();
	this.buttons =3D new Object();
	this.lookups =3D new Array();

	this.event =3D new WAMEventHandler(this);
	this._setButtons();
}

function _WAMRow__Prototype(){
	_WAMRowPrototypeCalled =3D true;

	// --- Constants
	WAMROW_MODENEWROW =3D 1;
	WAMROW_MODEEDITROW =3D 2;
	WAMROW_MODEINSERTROW =3D 3;
	WAMROW_MODEUPDATEROW =3D 4;
	WAMROW_MODEDELETEROW =3D 5;
=09
	WAMROW_ACTIONINSERTROW =3D "IR";
	WAMROW_ACTIONUPDATEROW =3D "UR";
	WAMROW_ACTIONDELETEROW =3D "DR";
	WAMROW_ACTIONREFRESHROW =3D "ER";
	WAMROW_ACTIONEMPTY =3D "";

	// --- Event constants
	WAMROW_ONBEFOREINSERT =3D "onBeforeInsert";
	WAMROW_ONBEFOREUPDATE =3D "onBeforeUpdate";
	WAMROW_ONBEFOREDELETE =3D "onBeforeDelete";

	// --- Properties
	_WAMRow.prototype.rowMode =3D WAMROW_MODENEWROW; // --- Default mode
	_WAMRow.prototype.dirty =3D false;
	_WAMRow.prototype.action =3D "";
	_WAMRow.prototype.form =3D window.document.__formWAMRow;
	_WAMRow.prototype.pImages =3D false;
	_WAMRow.prototype.hierarchical =3D null;
	_WAMRow.prototype.hierarchicalLevel =3D 0;

	// --- Methods
	_WAMRow.prototype.add =3D _WAMRow_add;
	_WAMRow.prototype.prepareNew =3D _WAMRow_prepareNew;
	_WAMRow.prototype.aspInsert =3D _WAMRow_aspInsert;
	_WAMRow.prototype.aspUpdate =3D _WAMRow_aspUpdate;
	_WAMRow.prototype.aspDelete =3D _WAMRow_aspDelete;
	_WAMRow.prototype.cancel =3D _WAMRow_cancel;
	_WAMRow.prototype.isNew =3D _WAMRow_isNew;
	_WAMRow.prototype.isDirty =3D _WAMRow_isDirty;
	_WAMRow.prototype.setDirty =3D _WAMRow_setDirty;
	_WAMRow.prototype.setAction =3D _WAMRow_setAction;
	_WAMRow.prototype.getAction =3D _WAMRow_getAction;
	_WAMRow.prototype.checkAction =3D _WAMRow_checkAction;
	_WAMRow.prototype.checkSaveMode =3D _WAMRow_checkSaveMode;
	_WAMRow.prototype.hasImages =3D _WAMRow_hasImages;
	_WAMRow.prototype.isHierarchical =3D _WAMRow_isHierarchical;
	_WAMRow.prototype.openDetailList =3D _WAMRow_openDetailList;
	_WAMRow.prototype.openFather =3D _WAMRow_openFather;
	_WAMRow.prototype.openDescendants =3D _WAMRow_openDescendants;
	_WAMRow.prototype.submitForm =3D _WAMRow_submitForm;
	_WAMRow.prototype.refresh =3D _WAMRow_refresh;
	_WAMRow.prototype.setAutoSave =3D _WAMRow_setAutoSave;
	_WAMRow.prototype.setSaveAndEdit =3D _WAMRow_setSaveAndEdit;

	// --- Private properties
	_WAMRow.prototype._strForm =3D "window.document.__formWAMRow";
	_WAMRow.prototype._customRow =3D false;
	_WAMRow.prototype._customList =3D false;

	// --- Private methods
	_WAMRow.prototype._setAutoSave =3D _WAMRow__setAutoSave;
	_WAMRow.prototype._setAutoSaveFunction =3D =
_WAMRow__setAutoSaveFunction;
	_WAMRow.prototype._prepareForm =3D _WAMRow__prepareForm;
	_WAMRow.prototype._setButtons =3D _WAMRow__setButtons;
	_WAMRow.prototype._getPageName =3D _WAMRow__getPageName;

	// --- START --- Methods implementation
	function _WAMRow_add(obj, bolNonDBCol){
		switch (obj.constructor){
			case _WAMRowColumn:
				this.columns[obj.getName()] =3D obj;
				this.columns[obj.getName()].parent =3D this;
				this.columns[obj.getName()].setHTMLEl();
				this.columns[obj.getName()]._setMyEvents(bolNonDBCol);
				break;
			case _WAMLookup:
				this.lookups[obj.getName()] =3D obj;
				this.lookups[obj.getName()].parent =3D this;
				lookups[obj.getName()] =3D obj; // --- ??? to be deleted
				break;
		}
	}

	function _WAMRow_prepareNew(obj){
		this.setAction(WAMROW_ACTIONNEWROW);
		this.submitForm();
	}

	function _WAMRow_aspInsert(obj){
		if (this.event.fire(WAMROW_ONBEFOREINSERT, false) =3D=3D false) return =
false;
		this.setAction(WAMROW_ACTIONINSERTROW);
		this._prepareForm();
		if (this.buttons.btnInsert !=3D null) this.buttons.btnInsert.disabled =
=3D true;
		this.submitForm();
	}

	function _WAMRow_aspUpdate(obj){
		this.setAction(WAMROW_ACTIONUPDATEROW);
		this._prepareForm();

		if (this.buttons.btnUpdate !=3D null) this.buttons.btnUpdate.disabled =
=3D true;
		this.submitForm();
	}

	function _WAMRow_aspDelete(obj){
		if (confirm(WAMMessages["MESSAGE_ROW_delete"])){
			if (this.event.fire(WAMROW_ONBEFOREDELETE, false) =3D=3D false) =
return false;
			this.setAction(WAMROW_ACTIONDELETEROW);
			this._prepareForm();

			if (this.buttons.btnDelete !=3D null) this.buttons.btnDelete.disabled =
=3D true;
			this.submitForm();
		}
	}

	function _WAMRow_cancel(obj){
		this.setAction(WAMROW_ACTIONEMPTY);
		window.close();
	}

	function _WAMRow_isNew(){
		if (this.rowMode =3D=3D WAMROW_MODENEWROW || this.rowMode =3D=3D =
WAMROW_MODEINSERTROW){
			return true;
		} else {
			return false;
		}
	}

	function _WAMRow_isDirty(){
		return this.dirty;
	}

	function _WAMRow_setDirty(){
		if (isUndefined(_WAMRow_setDirty.arguments[0]+"")){
			if (!this.isDirty()){
				this.dirty =3D true;
				this.form.wrIsDirty.value =3D "true";
			} else {
				return;
			}
		} else {
			this.dirty =3D _WAMRow_setDirty.arguments[0];
		}
		// --- Disable/enable buttons
		if (this.isNew()){
			if (this.buttons.btnInsert.length > 1)
				for (var i =3D 0; i < this.buttons.btnInsert.length; i++)
					this.buttons.btnInsert[i].disabled =3D !this.isDirty();
			else
				this.buttons.btnInsert.disabled =3D !this.isDirty();
		} else {
			if (this.buttons.btnUpdate.length > 1)
				for (var i =3D 0; i < this.buttons.btnUpdate.length; i++)
					this.buttons.btnUpdate[i].disabled =3D !this.isDirty();
			else
				this.buttons.btnUpdate.disabled =3D !this.isDirty();
		}
	}
=09
	function _WAMRow_setAction(strAction){
		this.action =3D strAction
		this.form.wrAction.value =3D this.action;
	}
=09
	function _WAMRow_getAction(){
		return this.action;
	}
=09
	function _WAMRow_checkAction(){
		if (this.getAction() =3D=3D WAMROW_ACTIONEMPTY) this._prepareForm();
	}
=09
	function _WAMRow_checkSaveMode(){
		if (!isNull(event) && !isUndefined(event) && event.altKey =3D=3D true =
&& event.shiftKey =3D=3D true && this.form.wrAutoSave.value !=3D true) =
this.form.wrSaveAndEditNew.value =3D true;
		if (!isNull(event) && !isUndefined(event) && event.altKey =3D=3D true =
&& this.form.wrAutoSave.value !=3D true) this.form.wrsac.value =3D true;
	}
=09
	function _WAMRow_hasImages(){
		return this.pImages;
	}

	function _WAMRow_isHierarchical(){
		return (!isNull(this.hierarchical) ? true : false);
	}

	function _WAMRow_openDetailList(strURL){
		var qs =3D ""; var el; var func;

		if (this.isNew()){
			this.form.wrAutoSave.value =3D true;
			if (!isUndefined(strURL)){
				func =3D new String(_WAMRow_openDetailList.caller);
				func =3D func.substr(9, func.indexOf("(")-9);
				this.form.wrftoexe.value =3D func; // --- wrftoexe =3D WAMRow =
function to execute
			}
			this.aspInsert();
			return;
		}
		return window.openChild(strURL, WinFeatures(0, 0, 'no', 'no', 'no', =
'yes', 'no', 'yes', 'yes'));
	}

	function _WAMRow_openFather(){
		var el; var strQS =3D "";

		for (el in this.pkColumns){
			if (this.hierarchical =3D=3D this.pkColumns[el].getName())
				strQS +=3D =
"&key=3D"+encodeURL(this.pkColumns[el].getHTMLEl().value.substr(0, =
(this.hierarchicalLevel-1)*2));
			else
				strQS +=3D =
"&key=3D"+encodeURL(this.pkColumns[el].getHTMLEl().value);
		}
		strQS =3D strQS.substr(1);
		return window.openChild(this.rootURL+this._getPageName("ROW")+strQS, =
WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMRow_openDescendants(){
		var strQS =3D "";

		strQS =3D =
"__hn_to=3DDOWN&__hn_selected=3D"+encodeURL(this.pkColumns[this.hierarchi=
cal].getHTMLEl().value);
		window.openChild(this.rootURL+this._getPageName("LIST")+strQS, =
WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMRow_submitForm(){
		if (_WAMRow_submitForm.caller =3D=3D _WAMRow_refresh || =
(typeof(List_submitForm) =3D=3D "function" && _WAMRow_submitForm.caller =
=3D=3D List_submitForm)){
			if (this.form.action.indexOf(".asp?") !=3D -1)
				this.form.action +=3D "&"+this.form.wrKeyText.value;
			else
				this.form.action +=3D "?"+this.form.wrKeyText.value;
		}
		this.checkAction();
		this.checkSaveMode();
		this.form.submit();
	}

	function _WAMRow_refresh(){
		this.setAction(WAMROW_ACTIONREFRESHROW);
		this.submitForm();
	}

	function _WAMRow_setAutoSave(oWAM, bAS){
		oWAM._rowAutoSave =3D typeof(bAS) =3D=3D "boolean" ? bAS : true;
	}

	function _WAMRow_setSaveAndEdit(bVal){
		this.form.wrSaveAndEdit.value =3D typeof(bVal) =3D=3D "boolean" ? bVal =
: true;
	}
	// --- END --- Methods implementation

	// --- START --- Private methods implementation
	function _WAMRow__setAutoSave(bAS){
		this.form.wrAutoSave.value =3D typeof(bAS) =3D=3D "boolean" ? bAS : =
true;
	}

	function _WAMRow__setAutoSaveFunction(sFuncName){
		this.form.wrftoexe.value =3D sFuncName;
	}

	function _WAMRow__prepareForm(){
		var el1, el2; var HTMLEl, disabledHTMLEl;
	=09
		// --- Copy the disabled columns' values to the hidden columns' values
		// --- Row columns
		for (el1 in this.columns){
			if (this.columns[el1].getType() =3D=3D "radio"){
				HTMLEl =3D this.columns[el1].getHTMLEl()[0];
				if (HTMLEl.disabled)
					for (var i =3D 0; i < HTMLEl.length; i++)
						if (HTMLEl[i].checked){
							disabledHTMLEl =3D =
eval(this._strForm+".__disabled_"+HTMLEl[i].name);
							if (isUndefined(disabledHTMLEl)) disabledHTMLEl =3D =
this.columns[el1]._createHidden(HTMLEl[i].name);
							disabledHTMLEl.value =3D HTMLEl[i].value;
						}
			} else {
				HTMLEl =3D this.columns[el1].getHTMLEl();
				if (HTMLEl.disabled){
					disabledHTMLEl =3D eval(this._strForm+".__disabled_"+HTMLEl.name);
					if (isUndefined(disabledHTMLEl)) disabledHTMLEl =3D =
this.columns[el1]._createHidden(HTMLEl.name);
					disabledHTMLEl.value =3D HTMLEl.value;
				}
			}
		}
		// --- Looked-up columns
		if (typeof(lookups) !=3D "undefined"){
			for (el1 in lookups){
				for (el2 in lookups[el1].lkColumns){
					HTMLEl =3D =
eval(this._strForm+"."+lookups[el1].lkColumns[el2].getHTMLEl().name);
					if (HTMLEl.disabled){
						disabledHTMLEl =3D eval(this._strForm+".__disabled_"+HTMLEl.name);
						if (isUndefined(disabledHTMLEl)) disabledHTMLEl =3D =
lookups[el1].lkColumns[el2]._createHidden(HTMLEl.name);
						disabledHTMLEl.value =3D HTMLEl.value;
					}
				}
			}
		}
	}

	function _WAMRow__setButtons(){
		this.buttons.btnNew =3D !isUndefined(typeof(this.form.btnNew)) ? =
this.form.btnNew : null;
		this.buttons.btnInsert =3D !isUndefined(typeof(this.form.btnInsert)) ? =
this.form.btnInsert : null;
		this.buttons.btnDelete =3D !isUndefined(typeof(this.form.btnDelete)) ? =
this.form.btnDelete : null;
		this.buttons.btnUpdate =3D !isUndefined(typeof(this.form.btnUpdate)) ? =
this.form.btnUpdate : null;
		this.buttons.btnCancel =3D !isUndefined(typeof(this.form.btnCancel)) ? =
this.form.btnCancel : null;
	}

	function _WAMRow__getPageName(strType){
		switch (strType.toUpperCase()){
			case "ROW":
				if (this._customRow) return "rows/"+this.table+".asp?";
				else return =
"WAMLibrary/Interface/standard.asp?witype=3Drow&winame=3D"+encodeURL(this=
.table)+"&";
				break;
			case "LIST":
				if (this._customList) return "lists/"+this.table+".asp?";
				else return =
"WAMLibrary/Interface/standard.asp?witype=3Dlist&winame=3D"+encodeURL(thi=
s.table)+"&";
				break;
		}
	}
	// --- END --- Private methods implementation
}

//***********************************************************************=
*/
// WAMRowColumn Object (Client Side)
//***********************************************************************=
*/
function WAMRowColumn(strTable, strName, strDataType, strDomain, =
intLength, intPrecision, intScale, bolEnabled, strIMGName, strURL){
	return new _WAMRowColumn(strTable, strName, strDataType, strDomain, =
intLength, intPrecision, intScale, bolEnabled, strIMGName, strURL);
}

function _WAMRowColumn(strTable, strName, strDataType, strDomain, =
intLength, intPrecision, intScale, bolEnabled, strIMGName, strURL){
	if (typeof(_WAMRowColumnPrototypeCalled) =3D=3D "undefined")
		_WAMRowColumn__Prototype();

	this.table =3D strTable;
	this.name =3D strName;
	this.setDataType(strDataType);
	this.setDomain(strDomain);
	this.setLength(intLength);
	this.setPrecision(intPrecision);
	this.setScale(intScale);
	this.setEnabled(bolEnabled);

	if (strDomain =3D=3D WAMDomain.wamexternalimage){
		this.image =3D new Object();
		this.image.name =3D strIMGName;
		this.image.URL =3D strURL;
	} else this.image =3D null;
}

function _WAMRowColumn__Prototype(){
	_WAMRowColumnPrototypeCalled =3D true;

	// --- Properties
	_WAMRowColumn.prototype.table =3D null;
	_WAMRowColumn.prototype.name =3D null;
	_WAMRowColumn.prototype.value =3D null;
	_WAMRowColumn.prototype.dataType =3D null;
	_WAMRowColumn.prototype.domain =3D null;
	_WAMRowColumn.prototype.length =3D null;
	_WAMRowColumn.prototype.precision =3D null;
	_WAMRowColumn.prototype.scale =3D null;
	_WAMRowColumn.prototype.disabled =3D false;
	_WAMRowColumn.prototype.HTMLEl =3D null;
	_WAMRowColumn.prototype.parent =3D null;

	// --- Methods
	_WAMRowColumn.prototype.getName =3D _WAMRowColumn_getName;
	_WAMRowColumn.prototype.setName =3D _WAMRowColumn_setName;
	_WAMRowColumn.prototype.getTable =3D _WAMRowColumn_getTable;
	_WAMRowColumn.prototype.setTable =3D _WAMRowColumn_setTable;
	_WAMRowColumn.prototype.getValue =3D _WAMRowColumn_getValue;
	_WAMRowColumn.prototype.setValue =3D _WAMRowColumn_setValue;
	_WAMRowColumn.prototype.setValidated =3D _WAMRowColumn_setValidated;
	_WAMRowColumn.prototype.clearValue =3D _WAMRowColumn_clearValue;
	_WAMRowColumn.prototype.getType =3D _WAMRowColumn_getType;
	_WAMRowColumn.prototype.setType =3D _WAMRowColumn_setType;
	_WAMRowColumn.prototype.getDataType =3D _WAMRowColumn_getDataType;
	_WAMRowColumn.prototype.setDataType =3D _WAMRowColumn_setDataType;
	_WAMRowColumn.prototype.setDomain =3D _WAMRowColumn_setDomain;
	_WAMRowColumn.prototype.getDomain =3D _WAMRowColumn_getDomain;
	_WAMRowColumn.prototype.setLength =3D _WAMRowColumn_setLength;
	_WAMRowColumn.prototype.getLength =3D _WAMRowColumn_getLength;
	_WAMRowColumn.prototype.setPrecision =3D _WAMRowColumn_setPrecision;
	_WAMRowColumn.prototype.getPrecision =3D _WAMRowColumn_getPrecision;
	_WAMRowColumn.prototype.setScale =3D _WAMRowColumn_setScale;
	_WAMRowColumn.prototype.getScale =3D _WAMRowColumn_getScale;
	_WAMRowColumn.prototype.setEnabled =3D _WAMRowColumn_setEnabled;
	_WAMRowColumn.prototype.isEnabled =3D _WAMRowColumn_isEnabled;
	_WAMRowColumn.prototype.getHTMLEl =3D _WAMRowColumn_getHTMLEl;
	_WAMRowColumn.prototype.setHTMLEl =3D _WAMRowColumn_setHTMLEl;
	_WAMRowColumn.prototype.setPk =3D _WAMRowColumn_setPk;

	// --- Private Methods
	_WAMRowColumn.prototype._setMyEvents =3D _WAMRowColumn__setMyEvents;
	_WAMRowColumn.prototype._getHTMLName =3D _WAMRowColumn__getHTMLName;
	_WAMRowColumn.prototype._getID =3D _WAMRowColumn__getID;
	_WAMRowColumn.prototype._createHidden =3D _WAMRowColumn__createHidden;
=09
	function _WAMRowColumn_getName(){
		return this.name;
	}
=09
	function _WAMRowColumn_setName(strName){
		this.name =3D strName;
		this.setHTMLEl();
	}
=09
	function _WAMRowColumn_getTable(){
		return this.table;
	}
=09
	function _WAMRowColumn_setTable(strTable){
		this.table =3D strTable;
		this.setHTMLEl();
	}
=09
	function _WAMRowColumn_getValue(){
		switch (this.type){
			case "checkbox":
				return this.HTMLEl.checked;
				break;
			default:
				if (this.getDataType() =3D=3D WAMDataType.dtbit) return =
this.HTMLEl.value.toUpperCase() =3D=3D "TRUE" ? true : false;
				return this.HTMLEl.value;
				break;
		}
	}
=09
	function _WAMRowColumn_setValue(varValue){
		if (varValue =3D=3D null){
			varValue =3D "";
		}
		switch (this.type){
			case "checkbox":
				switch ((varValue+"").toUpperCase()){
					case "TRUE":
					case "1":
					case "ON":
						this.HTMLEl.checked =3D true;
						break;
					default:
						this.HTMLEl.checked =3D false;
						break;
				}
				break;
			default:
				this.HTMLEl.value =3D varValue;
				break;
		}
		this.value =3D varValue;
	}

	function _WAMRowColumn_setValidated(varVal){
		var newVal =3D validateGeneric(this.getDataType(), this.getDomain(), =
varVal+"", this.getLength(), this.getPrecision(), this.getScale());
		if (newVal !=3D invalidValue()){
			this.setValue(newVal);
		} else {
			Error.setMacro('F', this.getHTMLEl().label);
			Error.setFocusTo(this.getHTMLEl());
			Error.catchErrors();
			return false;
		}
	}

	function _WAMRowColumn_clearValue(){
		switch (this.type){
			case "checkbox":
				this.HTMLEl.checked =3D false;
				break;
			default:
				this.HTMLEl.value =3D "";
				break;
		}
	}
=09
	function _WAMRowColumn_getType(){
		return this.type;
	}
=09
	function _WAMRowColumn_setType(strType){
		this.type =3D strType;
	}
=09
	function _WAMRowColumn_getDataType(){
		return this.dataType;
	}
=09
	function _WAMRowColumn_setDataType(strDataType){
		this.dataType =3D strDataType;
	}
=09
	function _WAMRowColumn_setDomain(strDomain){
		this.domain =3D ((strDomain !=3D null) ? strDomain.toLowerCase() : =
strDomain);
	}
=09
	function _WAMRowColumn_getDomain(){
		return this.domain;
	}
=09
	function _WAMRowColumn_setLength(intLength){
		this.length =3D intLength;
	}
=09
	function _WAMRowColumn_getLength(){
		return this.length;
	}
=09
	function _WAMRowColumn_setPrecision(intPrecision){
		this.precision =3D intPrecision;
	}
=09
	function _WAMRowColumn_getPrecision(){
		return this.precision;
	}
=09
	function _WAMRowColumn_setScale(intScale){
		this.scale =3D intScale;
	}
=09
	function _WAMRowColumn_getScale(){
		return this.scale;
	}
=09
	function _WAMRowColumn_setEnabled(bolEnabled){
		this.enabled =3D bolEnabled;
	}
=09
	function _WAMRowColumn_isEnabled(){
		return this.enabled;
	}
=09
	function _WAMRowColumn_getHTMLEl(){
		return this.HTMLEl;
	}

	function _WAMRowColumn_setHTMLEl(obj){
		var i;

		if (typeof(obj) =3D=3D "undefined"){
			if (this.name !=3D null && this.table !=3D null){
				switch (this.constructor){
					case _WAMRowColumn:
						var obj =3D eval(this.parent._strForm+"."+this._getHTMLName());
						break;
					case _WAMLookupColumn:
						var obj =3D eval(objWAMRow._strForm+"."+this._getHTMLName());
						break;
				}
			}
		}
		if (typeof(obj) !=3D "undefined"){
			switch (this.constructor){
				case _WAMRowColumn:
					this.HTMLEl =3D obj;
					if (obj.length > 1 && obj[0].type =3D=3D "radio")
						for (i =3D 0; i < obj.length; i++) obj[i].WAMRowColumn =3D this;
					else
						obj.WAMRowColumn =3D this;
					break;
				case _WAMLookupColumn:
					this.HTMLEl =3D obj;
					if (obj.length > 1 && obj[0].type =3D=3D "radio")
						for (i =3D 0; i < obj.length; i++) obj[i].WAMLookupColumn =3D =
this;
					else
						obj.WAMLookupColumn =3D this;
					break;
			}

			if (obj.length > 1 && obj[0].type =3D=3D "radio"){
				this.setType(obj[0].type);
			} else {
				this.setType(obj.type);
			}
		}
	}

	function _WAMRowColumn_setPk(){
		this.parent.pkColumns[this.name] =3D this.parent.columns[this.name];
	}

	function _WAMRowColumn__setMyEvents(bolNonDBCol){
		var n; var el =3D this.getHTMLEl();
		if (!el.disabled){
			switch (this.getType()){
				case "text":
				case "textarea":
				case "hidden":
				case "file":
					if (this.getDomain() !=3D WAMDomain.wamexternalimage){
						el.onfocus =3D __WAMRowColumn_OnFocus_TEXT_TEXTAREA;
						el.onblur =3D __WAMRowColumn_OnBlur_TEXT_TEXTAREA_CHECKBOX;
					} else {
						el.onfocus =3D __WAMRowColumn_OnFocus_IMAGE;
						el.onblur =3D __WAMRowColumn_OnBlur_IMAGE;
					}
					if (bolNonDBCol !=3D true) el.onchange =3D =
__WAMRowColumn_OnChange_ALLTYPES;
					break;
				case "checkbox":
					el.onblur =3D __WAMRowColumn_OnBlur_TEXT_TEXTAREA_CHECKBOX;
					if (bolNonDBCol !=3D true) el.onchange =3D =
__WAMRowColumn_OnChange_ALLTYPES;
					if (bolNonDBCol !=3D true) el.onclick =3D =
__WAMRowColumn_OnClick_CHECKBOX;
					break;
				case "radio":
					n =3D el.length;
					for (var i =3D 0; i < n; i++){
						if (bolNonDBCol !=3D true) el(i).onchange =3D =
__WAMRowColumn_OnChange_ALLTYPES;
						if (bolNonDBCol !=3D true) el(i).onclick =3D =
__WAMRowColumn_OnClick_RADIO;
						el(i).onmousedown =3D __WAMRowColumn_OnMouseDown_RADIO;
					}
					break;
				case "select-one":
					if (bolNonDBCol !=3D true) el.onchange =3D =
__WAMRowColumn_OnChange_ALLTYPES;
					break;
			}
		}
	}

	function _WAMRowColumn__getHTMLName(){
		switch (this.constructor){
			case _WAMRowColumn:
				return this.table.replace(/ /g, "_")+"_"+this.name.replace(/ /g, =
"_");
				break;
			case _WAMLookupColumn:
				if (isEmpty(this.getRequiredJoin()))
					return this.parent.getName().replace(/ /g, =
"_")+"_"+this.table.replace(/ /g, "_")+"_"+this.name.replace(/ /g, "_");
				else
					return this.parent.getName().replace(/ /g, =
"_")+"_"+this.table+"_"+this.name+"_"+this.getRequiredJoin().replace(/,|\=
.| /g, "_");
				break;
		}
	}

	function _WAMRowColumn__getID(){
		var strRJ =3D this.getRequiredJoin();
		if (isEmpty(strRJ)) return this.getName();
		else return this.getName()+"+"+strRJ;
	}
=09
	function _WAMRowColumn__createHidden(strHTMLElname){
		var obj; var strNewName; var oRow;

		strNewName =3D "__disabled_"+strHTMLElname;
		if (window.browser.isIEMAC){
			obj =3D window.document.createElement("INPUT");
			obj.style.display =3D "none";
			obj.style.visibility =3D "hidden";
			obj.id =3D obj.name =3D strNewName;
			if (this.parent.constructor =3D=3D _WAMRow) oRow =3D this.parent;
			else oRow =3D this.parent.parent;
			oRow.form.appendChild(obj);
		} else {
			if (this.parent.constructor =3D=3D _WAMRow) oRow =3D this.parent;
			else oRow =3D this.parent.parent;
			oRow.form.insertAdjacentHTML("beforeEnd", "<input type=3D'hidden' =
name=3D'"+strNewName+"' id=3D'"+strNewName+"' value=3D''>");
			obj =3D eval(oRow._strForm+".__disabled_"+strHTMLElname);
		}
		return obj;
	}
}



function __WAMRowColumn_OnFocus_TEXT_TEXTAREA(){
	this.select();
}

function __WAMRowColumn_OnFocus_IMAGE(){
	var rc =3D this.WAMRowColumn;
	WAMTIMERID =3D =
setInterval('previewImage(objWAMRow.columns["'+rc.getName()+'"].getHTMLEl=
(), "'+rc.image.name+'", "'+rc.image.URL+'")', 100);
}

function __WAMRowColumn_OnBlur_TEXT_TEXTAREA_CHECKBOX(){
	var rc =3D this.WAMRowColumn;
	var val;

	val =3D rc.getValue();
	var newVal =3D validateGeneric(rc.getDataType(), rc.getDomain(), val, =
rc.getLength(), rc.getPrecision(), rc.getScale());
	if (newVal !=3D invalidValue()){
		rc.setValue(newVal);
	} else {
		Error.setMacro('F', this.label);
		Error.setFocusTo(this);
		Error.catchErrors();
		return false;
	}
}

function __WAMRowColumn_OnBlur_IMAGE(){
	clearInterval(WAMTIMERID);
	this.WAMRowColumn.parent.setDirty();
}

function __WAMRowColumn_OnChange_ALLTYPES(){
	this.WAMRowColumn.parent.setDirty();
}

function __WAMRowColumn_OnClick_RADIO(){
	if (this._checked =3D=3D true) this.checked =3D false;
	this.WAMRowColumn.parent.setDirty();
}

function __WAMRowColumn_OnClick_CHECKBOX(){
	this.WAMRowColumn.parent.setDirty();
}

function __WAMRowColumn_OnMouseDown_RADIO(){
	this._checked =3D this.checked;
}//**********************************************************************=
**/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
//***********************************************************************=
*/
// WAMLookup Object (Client Side)
//***********************************************************************=
*/
function WAMLookup(strSchema, strName, strDetailSchemaName, =
strDetailTableName, strBaseMasterSchemaName, strBaseMasterTableName){
	var WL =3D new _WAMLookup(strSchema, strName, strDetailSchemaName, =
strDetailTableName, strBaseMasterSchemaName, strBaseMasterTableName);
	return WL;
}

function _WAMLookup(strSchema, strName, strDetailSchemaName, =
strDetailTableName, strBaseMasterSchemaName, strBaseMasterTableName){
	if (typeof(_WAMLookupPrototypeCalled) =3D=3D "undefined")
		_WAMLookup__Prototype();

	this.schema =3D strSchema;
	this.name =3D strName;
	if (!isUndefined(strDetailSchemaName) && =
!isUndefined(strDetailTableName)){
		this.detailSchema =3D strDetailSchemaName;
		this.detailTable =3D strDetailTableName;
	}

	if (!isUndefined(strBaseMasterSchemaName) && =
!isUndefined(strBaseMasterTableName)){
		this.masterSchema =3D strBaseMasterSchemaName;
		this.masterTable =3D strBaseMasterTableName;
	}

	// --- Collections
	this.pkColumns =3D new Array();
	this.lkColumns =3D new Array();

	this.event =3D new WAMEventHandler(this);
}

function _WAMLookup__Prototype(){
	_WAMLookupPrototypeCalled =3D true;

	// --- Event constants
	WAMLOOKUP_ONAFTEREXECUTE =3D "onAfterExecute";

	// --- Properties
	_WAMLookup.prototype.schema =3D null;
	_WAMLookup.prototype.name =3D null;
	_WAMLookup.prototype.detailSchema =3D null;
	_WAMLookup.prototype.detailTable =3D null;
	_WAMLookup.prototype.masterSchema =3D null;
	_WAMLookup.prototype.masterTable =3D null;
	_WAMLookup.prototype.reverseColumn =3D null;

	_WAMLookup.prototype.filterColumn =3D null;
	_WAMLookup.prototype.filterValue =3D null;
	_WAMLookup.prototype.filterColumnValue =3D null;

	// --- Methods
	_WAMLookup.prototype.addPkColumn =3D _WAMLookup_addPkColumn;
	_WAMLookup.prototype.addLkColumn =3D _WAMLookup_addLkColumn;
	_WAMLookup.prototype.setFilterColumn =3D _WAMLookup_setFilterColumn;
	_WAMLookup.prototype.getFilterValue =3D _WAMLookup_getFilterValue;
	_WAMLookup.prototype.setFilterValue =3D _WAMLookup_setFilterValue;
	_WAMLookup.prototype.setFilterColumnValue =3D =
_WAMLookup_setFilterColumnValue;
	_WAMLookup.prototype.getName =3D _WAMLookup_getName;
	_WAMLookup.prototype.execute =3D _WAMLookup_execute;
	_WAMLookup.prototype.showResult =3D _WAMLookup_showResult;
	_WAMLookup.prototype.zoomList =3D _WAMLookup_zoomList;
	_WAMLookup.prototype.zoomRow =3D _WAMLookup_zoomRow;
	_WAMLookup.prototype.setRootURL =3D _WAMLookup_setRootURL;
	_WAMLookup.prototype.setZoomListEnabled =3D =
_WAMLookup_setZoomListEnabled;
	_WAMLookup.prototype.isZoomListEnabled =3D =
_WAMLookup_isZoomListEnabled;
	_WAMLookup.prototype.disableReverseLk =3D _WAMLookup_disableReverseLk;
	_WAMLookup.prototype.enableReverseLk =3D _WAMLookup_enableReverseLk;
=09
	// --- Private properties
	_WAMLookup.prototype._lookupPage =3D =
"WAMLibrary/liveLookup/liveLookup.asp?";
	_WAMLookup.prototype._zoomRowPage =3D =
"WAMLibrary/liveLookup/zoomRowExists.asp?";
	_WAMLookup.prototype._lookupURL =3D WAMRootURL;
	_WAMLookup.prototype._customRow =3D false;
	_WAMLookup.prototype._customList =3D false;
	_WAMLookup.prototype._zlEnabled =3D true;

	// --- Private Methods
	_WAMLookup.prototype._getPageName =3D _WAMLookup__getPageName;

	// --- Events
	_WAMLookup.prototype.onAfterExecute =3D null;

	function _WAMLookup_addPkColumn(obj){
		this.pkColumns[obj.getName()] =3D obj;
		obj.parent =3D this;
		obj.setHTMLEl(_WAMLookup_addPkColumn.arguments[1]);

		obj.getHTMLEl().exeLookup =3D __WAMLookupColumn_LKExecute;
		obj.getHTMLEl().onchange =3D __WAMLookupColumn_OnChange_FOR_EXELOOKUP;
	}
=09
	function _WAMLookup_addLkColumn(obj){
		this.lkColumns[obj._getID()] =3D obj;
		obj.parent =3D this;
		obj.setHTMLEl(_WAMLookup_addLkColumn.arguments[1]);
		if (_WAMLookup_addLkColumn.arguments[2] =3D=3D false){
		} else {
			obj._setMyEvents();
			obj.getHTMLEl().exeReverseLookup =3D =
__WAMLookupColumn_LKReverseExecute;
		}
	}

	function _WAMLookup_setFilterColumn(obj){
		this.filterColumn =3D obj;
	}

	function _WAMLookup_getFilterValue(){
		return isNull(this.filterValue) ? "" : this.filterValue;
	}

	function _WAMLookup_setFilterValue(varFilterValue){
		this.filterValue =3D varFilterValue;
	}

	function _WAMLookup_setFilterColumnValue(objCol){
		this.filterColumnValue =3D objCol;
	}

	function _WAMLookup_getName(){
		return this.name;
	}

	function _WAMLookup_execute(){
		var strIf; var el, ultEl; var objCol; var strQS; var varVal;

		if (_WAMLookup_execute.arguments.length > 0){
			this.reverseColumn =3D _WAMLookup_execute.arguments[1];
		} else {
			this.reverseColumn =3D null;
		}
	=09
		// --- Verifies if this is a reverse LK
		if (!isNull(this.reverseColumn)){
			// --- Execute a reverse LK
			// --- Clear pkColumns
			for (el in this.pkColumns) this.pkColumns[el].clearValue();
			// --- Clear lkColumns, except the reverse column
			for (el in this.lkColumns){
				if (this.lkColumns[el]._getID() !=3D this.reverseColumn._getID()) =
this.lkColumns[el].clearValue("");
			}
			// --- Verifies if the reverse column has value
			varVal =3D this.reverseColumn.getValue();
			if (isEmpty(varVal) || isNull(varVal) || isUndefined(varVal)){
				// --- We need a value for the reverse column
				this.reverseColumn =3D null;
				return false
			}
			// --- Set the focus
			if (this.reverseColumn.getType() !=3D "hidden" && =
this.reverseColumn.getHTMLEl().disabled =3D=3D false){
				this.reverseColumn.getHTMLEl().focus();
			}
		} else {
			// --- Execute a normal LK
			// --- Clear looked-up columns
			for (el in this.lkColumns) this.lkColumns[el].clearValue();
			// --- Check if all pkColumns has values
			strIf =3D "";
			for (el in this.pkColumns){
				strIf +=3D " && this.pkColumns['"+el+"'].getValue().length > 0";
			}
			strIf =3D strIf.substr(4);
			if(!eval(strIf)){
				// --- We need more values for pkColumns
				this.reverseColumn =3D null;
				return false;
			}
			// --- Set the focus
			for (el in this.pkColumns) ultEl =3D el;
			if (this.pkColumns[ultEl].getHTMLEl().type !=3D "hidden" && =
this.pkColumns[ultEl].getHTMLEl().disabled =3D=3D false){
				this.pkColumns[ultEl].getHTMLEl().focus();
			}
		}
	=09
		// --- Generate QueryString
		strQS =3D "";

		// --- Filter column info
		if (!isNull(this.filterColumn)){
			if (!isNull(this.filterColumnValue)) varVal =3D =
this.filterColumnValue.getValue();
			else varVal =3D this.getFilterValue();
			if (!isEmpty(varVal)){
				objCol =3D this.filterColumn;
				strQS +=3D "&lkfiltercs=3D"+encodeURL(this.masterSchema)+
					"&lkfilterct=3D"+encodeURL(objCol.getTable())+
					"&lkfiltercn=3D"+encodeURL(objCol._getID())+
					"&lkfiltercv=3D"+encodeURL(varVal)+
					"&lkfiltercdt=3D"+encodeURL(objCol.getDataType())+
					"&lkfiltercd=3D"+encodeURL(objCol.getDomain())+
					"&lkfilterot=3D";
			}
		}
	=09
		if (!isNull(this.reverseColumn)){
			// --- Execute a reverse LK
			strQS +=3D "&lkcid=3D"+encodeURL(this.reverseColumn._getID())+
				"&lkcv=3D"+encodeURL(this.reverseColumn.getValue())+
				"&lktype=3Dreverse";
		} else {
			// --- Execute a normal LK
			// --- pkColumns
			for (el in this.pkColumns){
				strQS +=3D "&pkcn=3D"+encodeURL(this.pkColumns[el].getName())+
					"&pkcv=3D"+encodeURL(this.pkColumns[el].getValue());
			}
			strQS +=3D "&lktype=3Dnormal";
		}

		// --- Lookup's schema & name
		strQS +=3D "&lkschema=3D"+encodeURL(this.schema);
		strQS +=3D "&lkname=3D"+encodeURL(this.name);

		// --- Detail table schema & name
		if (!isNull(this.detailSchema) && !isNull(this.detailTable))
			strQS +=3D "&lkdetailschema=3D"+encodeURL(this.detailSchema)+
				"&lkdetailtable=3D"+encodeURL(this.detailTable);

		// --- Verifies if we need to send the lk columns (LOOSE FK)
		if (isNull(this.detailSchema) || isNull(this.detailName)){
		for (el in this.lkColumns)
			strQS +=3D "&lkcn=3D"+encodeURL(this.lkColumns[el].getName());
		}

		// --- Verifies if there are default values for the looked-up columns
		var hd =3D 0; // --- hd =3D has defaults
		for (el in this.lkColumns)
			if (this.lkColumns[el].getDefaultValue() !=3D null){
				hd =3D 1; break;
			}
		strQS +=3D "&hd=3D"+hd;
		strQS =3D strQS.substr(1);

		var AE =3D new ASPExecute();
		AE.setURL(this._lookupURL + this._lookupPage + strQS);
		AE.execute();
	}

	function _WAMLookup_showResult(){
		var elToFocus, el, lastEl; var objCol; var HTMLEl;
	=09
		// --- Verifies if is to show the looked-up columns' default values
		if (_WAMLookup_showResult.arguments[0] =3D=3D "ShowDefaults"){
			for (el in this.pkColumns){ objCol =3D this.pkColumns[el];
				if (isEmpty(objCol.getValue())) =
objCol.setValue(objCol.getDefaultValue());
			}
			for (el in this.lkColumns){ objCol =3D this.lkColumns[el];
				objCol.setValue(objCol.getDefaultValue());
			}
			elToFocus =3D objCol.getHTMLEl().name;
		} else {
			for (el in this.pkColumns){ objCol =3D this.pkColumns[el];
				objCol.setValue(objCol._getLkValue());
			}
			for (el in this.lkColumns){ objCol =3D this.lkColumns[el];
				objCol.setValue(objCol._getLkValue());
				elToFocus =3D objCol.getHTMLEl().name;
			}
		}
		if (isUndefined(this.event.fire(WAMLOOKUP_ONAFTEREXECUTE))){
			lastEl =3D "";
			for (el in this.parent.form.elements){
				if (lastEl =3D=3D elToFocus){
					elToFocus =3D el;
					HTMLEl =3D this.parent.form.elements.item(elToFocus);
					if (isUndefined(HTMLEl.length) || HTMLEl.type =3D=3D "select-one"){
						if (HTMLEl.style.visibility !=3D "hidden" && HTMLEl.type !=3D =
"hidden" && HTMLEl.disabled !=3D true){
							HTMLEl.focus();
							break;
						}
					} else {
						if (HTMLEl(0).style.visibility !=3D "hidden" && HTMLEl(0).type =
!=3D "hidden" && HTMLEl(0).disabled !=3D true){
							HTMLEl(0).focus();
							break;
						}
					}
				}
				lastEl =3D el;
			}
			if (el !=3D elToFocus) window.focus();
		}
	}

	function _WAMLookup_zoomList(strZoomColumnName){
		var el; var qsPkCols =3D ""; var strZoom; var objCol; var varVal;
	=09
		if (!this.isZoomListEnabled()) return false;

		strZoom =3D "";
		for (el in this.pkColumns){
			qsPkCols +=3D =
"&fkcn=3D"+encodeURL(this.pkColumns[el].getHTMLEl().name);
		}
		if (!isUndefined(strZoomColumnName)){
			objCol =3D this.lkColumns[strZoomColumnName];
			strZoom =3D "&__listopenmode=3DzoomWhere"+
				"&__zoomcs=3D"+encodeURL(this.masterSchema)+
				"&__zoomct=3D"+encodeURL(objCol.getTable())+
				"&__zoomcn=3D"+encodeURL(strZoomColumnName)+
				"&__zoomcv=3D"+encodeURL(objCol.getValue())+
				"&__zoomcdt=3D"+encodeURL(objCol.getDataType())+
				"&__zoomcd=3D"+encodeURL(objCol.getDomain())+
				"&__zoomot=3D";
		}
		if (!isNull(this.filterColumn)){
			if (!isNull(this.filterColumnValue)) varVal =3D =
this.filterColumnValue.getValue();
			else varVal =3D this.getFilterValue();
			if (!isEmpty(varVal)){
				objCol =3D this.filterColumn;
				if (isEmpty(strZoom)) strZoom =3D "&__listopenmode=3DzoomWhere";
				strZoom +=3D "&__zoomcs=3D"+encodeURL(this.masterSchema)+
					"&__zoomct=3D"+encodeURL(objCol.getTable())+
					"&__zoomcn=3D"+encodeURL(objCol._getID())+
					"&__zoomcv=3D"+encodeURL(varVal)+
					"&__zoomcdt=3D"+encodeURL(objCol.getDataType())+
					"&__zoomcd=3D"+encodeURL(objCol.getDomain())+
					"&__zoomot=3D";
			}
		}
		if (isEmpty(strZoom)) strZoom =3D "&__listopenmode=3Dzoom";

		=
window.openChild(this._lookupURL+this._getPageName("LIST")+"fkn=3D"+this.=
name+qsPkCols+strZoom,
			WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}
=09
	function _WAMLookup_zoomRow(){
		var strQS;
		var el;
	=09
		strQS =3D "";

		for (el in this.pkColumns)
			if (isEmpty(this.pkColumns[el].getValue())){
				Error.setError("ZOMNOKEY_");
				Error.catchErrors();
				return;
			}

		if (_WAMLookup_zoomRow.arguments[0] !=3D true){ // --- Verifies if the =
row exists in the database
			strQS =3D "&__t=3D"+this.masterTable+"&__n=3D"+this.name;
			for (el in this.pkColumns)
				strQS +=3D "&__cn=3D"+this.pkColumns[el].getName()+
					"&__ct=3D"+this.pkColumns[el].getDataType()+
					"&__cd=3D"+this.pkColumns[el].getDomain()+
					"&__cv=3D"+encodeURL(this.pkColumns[el].getValue());
			var objAE =3D new ASPExecute();
			strQS =3D strQS.substr(1);
			objAE.setURL(this._lookupURL + this._zoomRowPage + strQS);
			objAE.execute();
			return
			// --- ... waiting for response ...
		}

		for (el in this.pkColumns){
			strQS +=3D "&key=3D"+encodeURL(this.pkColumns[el].getValue());
		}
		strQS =3D strQS.substr(1);

		window.openChild(this._lookupURL+this._getPageName("ROW")+strQS,
			WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMLookup_setRootURL(strURL){
		this._lookupURL =3D strURL;
	}

	function _WAMLookup__getPageName(strType){
		switch (strType.toUpperCase()){
			case "ROW":
				if (this._customRow) return "rows/"+this.masterTable+".asp?";
				else return =
"WAMLibrary/Interface/standard.asp?witype=3Drow&winame=3D"+encodeURL(this=
.masterTable)+"&";
				break;
			case "LIST":
				if (this._customList) return "lists/"+this.masterTable+".asp?";
				else return =
"WAMLibrary/Interface/standard.asp?witype=3Dlist&winame=3D"+encodeURL(thi=
s.masterTable)+"&";
				break;
		}
	}

	function _WAMLookup_setZoomListEnabled(bolEnabled){
		this._zlEnabled =3D typeof(bolEnabled) =3D=3D "boolean" ? bolEnabled : =
true;
	}

	function _WAMLookup_isZoomListEnabled(){
		return this._zlEnabled;
	}

	function _WAMLookup_disableReverseLk(strColumnName){
		if (!isUndefined(this.lkColumns[strColumnName])) =
this.lkColumns[strColumnName].rlk =3D false;
	}

	function _WAMLookup_enableReverseLk(strColumnName){
		if (!isUndefined(this.lkColumns[strColumnName])) =
this.lkColumns[strColumnName].rlk =3D true;
	}
}


//***********************************************************************=
*/
// WAMLookupColumn Object (Client Side)
//***********************************************************************=
*/
function WAMLookupColumn(strTable, strName, strDataType, strDomain, =
intLength, intPrecision, intScale, strRequiredJoin){
	var c =3D new _WAMLookupColumn(strTable, strName, strDataType, =
strDomain, intLength, intPrecision, intScale, strRequiredJoin);
	return c;
}

function _WAMLookupColumn(strTable, strName, strDataType, strDomain, =
intLength, intPrecision, intScale, strRequiredJoin){
	if (typeof(_WAMLookupColumnPrototypeCalled) =3D=3D "undefined")
		_WAMLookupColumn__Prototype();

	// --- Properties
	this.table =3D strTable;
	this.name =3D strName;
	this.requiredJoin =3D strRequiredJoin;
	this.setDataType(strDataType);
	this.setDomain(strDomain);
	this.setLength(intLength);
	this.setPrecision(intPrecision);
	this.setScale(intScale);
}

function _WAMLookupColumn__Prototype(){
	_WAMLookupColumnPrototypeCalled =3D true;

	// --- Properties
	_WAMLookupColumn.prototype.table =3D null;
	_WAMLookupColumn.prototype.name =3D null;
	_WAMLookupColumn.prototype.dataType =3D null;
	_WAMLookupColumn.prototype.domain =3D null;
	_WAMLookupColumn.prototype.length =3D null;
	_WAMLookupColumn.prototype.precision =3D null;
	_WAMLookupColumn.prototype.scale =3D null;
	_WAMLookupColumn.prototype.requiredJoin =3D "";
	_WAMLookupColumn.prototype.HTMLEl =3D null;
	_WAMLookupColumn.prototype.parent =3D null;
	_WAMLookupColumn.prototype.rlk =3D true;
=09
	// --- Methods
	_WAMLookupColumn.prototype.getTable =3D =
_WAMRowColumn.prototype.getTable;
	_WAMLookupColumn.prototype.setTable =3D =
_WAMRowColumn.prototype.setTable;
	_WAMLookupColumn.prototype.getName =3D _WAMRowColumn.prototype.getName;
	_WAMLookupColumn.prototype.setName =3D _WAMRowColumn.prototype.setName;
	_WAMLookupColumn.prototype.getValue =3D =
_WAMRowColumn.prototype.getValue;
	_WAMLookupColumn.prototype.setValue =3D =
_WAMRowColumn.prototype.setValue;
	_WAMLookupColumn.prototype.setValidated =3D =
_WAMRowColumn.prototype.setValidated;
	_WAMLookupColumn.prototype.clearValue =3D =
_WAMRowColumn.prototype.clearValue;
	_WAMLookupColumn.prototype.getType =3D _WAMRowColumn.prototype.getType;
	_WAMLookupColumn.prototype.setType =3D _WAMRowColumn.prototype.setType;
	_WAMLookupColumn.prototype.getDataType =3D =
_WAMRowColumn.prototype.getDataType;
	_WAMLookupColumn.prototype.setDataType =3D =
_WAMRowColumn.prototype.setDataType;
	_WAMLookupColumn.prototype.setDomain =3D =
_WAMRowColumn.prototype.setDomain;
	_WAMLookupColumn.prototype.getDomain =3D =
_WAMRowColumn.prototype.getDomain;
	_WAMLookupColumn.prototype.setLength =3D =
_WAMRowColumn.prototype.setLength;
	_WAMLookupColumn.prototype.getLength =3D =
_WAMRowColumn.prototype.getLength;
	_WAMLookupColumn.prototype.setPrecision =3D =
_WAMRowColumn.prototype.setPrecision;
	_WAMLookupColumn.prototype.getPrecision =3D =
_WAMRowColumn.prototype.getPrecision;
	_WAMLookupColumn.prototype.setScale =3D =
_WAMRowColumn.prototype.setScale;
	_WAMLookupColumn.prototype.getScale =3D =
_WAMRowColumn.prototype.getScale;
	_WAMLookupColumn.prototype.getHTMLEl =3D =
_WAMRowColumn.prototype.getHTMLEl;
	_WAMLookupColumn.prototype.setHTMLEl =3D =
_WAMRowColumn.prototype.setHTMLEl;

	_WAMLookupColumn.prototype.getRequiredJoin =3D =
_WAMLookupColumn_getRequiredJoin;
	_WAMLookupColumn.prototype.setRequiredJoin =3D =
_WAMLookupColumn_setRequiredJoin;
	_WAMLookupColumn.prototype.getDefaultValue =3D =
_WAMLookupColumn_getDefaultValue;
	_WAMLookupColumn.prototype.setDefaultValue =3D =
_WAMLookupColumn_setDefaultValue;

	// --- Private Properties
	_WAMLookupColumn.prototype._lkValue =3D null;

	// --- Private Methods
	_WAMLookupColumn.prototype._getLkValue =3D =
_WAMLookupColumn__getLkValue;
	_WAMLookupColumn.prototype._setLkValue =3D =
_WAMLookupColumn__setLkValue;
	_WAMLookupColumn.prototype._getHTMLName =3D =
_WAMRowColumn.prototype._getHTMLName;
	_WAMLookupColumn.prototype._getID =3D _WAMRowColumn.prototype._getID;
	_WAMLookupColumn.prototype._setMyEvents =3D =
_WAMLookupColumn__setMyEvents;
	_WAMLookupColumn.prototype._createHidden =3D =
_WAMRowColumn.prototype._createHidden;

	function _WAMLookupColumn_getRequiredJoin(){
		return this.requiredJoin;
	}

	function _WAMLookupColumn_setRequiredJoin(strRequiredJoin){
		this.requiredJoin =3D strRequiredJoin;
		this.setHTMLEl();
	}

	function _WAMLookupColumn_getDefaultValue(){
		return this.defaultValue;
	}

	function _WAMLookupColumn_setDefaultValue(varDefaultValue){
		this.defaultValue =3D varDefaultValue;
	}

	function _WAMLookupColumn__getLkValue(){
		return this._lkValue;
	}

	function _WAMLookupColumn__setLkValue(varValue){
		this._lkValue =3D varValue;
	}

	function _WAMLookupColumn__setMyEvents(){
		var n; var el =3D this.getHTMLEl();
		if (!el.disabled){
			switch (this.getType()){
				case "text":
				case "textarea":
				case "hidden":
				case "file":
					if (this.getDomain() !=3D WAMDomain.wamexternalimage){
						el.onfocus =3D __WAMRowColumn_OnFocus_TEXT_TEXTAREA;
					} else {
					}
					el.onchange =3D __WAMLookupColumn_OnChange_ALLTYPES;
					break;
				case "checkbox":
					el.onchange =3D __WAMLookupColumn_OnChange_ALLTYPES;
					el.onclick =3D __WAMLookupColumn_OnClick_CHECKBOX;
					break;
				case "radio":
					n =3D el.length;
					for (var i =3D 0; i < n; i++){
						el(i).onchange =3D __WAMLookupColumn_OnChange_ALLTYPES;
						el(i).onclick =3D __WAMLookupColumn_OnClick_RADIO;
						el(i).onmousedown =3D __WAMRowColumn_OnMouseDown_RADIO;
					}
					break;
				case "select-one":
					el.onchange =3D __WAMLookupColumn_OnChange_ALLTYPES;
					break;
			}
		}
	}
}

function __WAMLookupColumn_LKExecute(){
	this.WAMLookupColumn.parent.execute();
	this.WAMLookupColumn.parent.parent.setDirty();
}

function __WAMLookupColumn_LKReverseExecute(){
	if (this.WAMLookupColumn.rlk =3D=3D true){
		this.WAMLookupColumn.parent.execute("REVERSE", this.WAMLookupColumn);
		this.WAMLookupColumn.parent.parent.setDirty();
	}
}

function __WAMLookupColumn_OnChange_FOR_EXELOOKUP(){ // for pkColumns
	var lkc =3D this.WAMLookupColumn;
	var val;

	val =3D lkc.getValue();
	var newVal =3D validateGeneric(lkc.getDataType(), lkc.getDomain(), val, =
lkc.getLength(), lkc.getPrecision(), lkc.getScale());
	if (newVal !=3D invalidValue()){
		lkc.setValue(newVal);
		this.exeLookup();
		lkc.parent.parent.setDirty();
	} else {
		Error.setMacro('F', this.label);
		Error.setFocusTo(this);
		Error.catchErrors();
		return false;
	}
}

function __WAMLookupColumn_OnChange_ALLTYPES(){
	var lkc =3D this.WAMLookupColumn;
	var val;

	val =3D lkc.getValue();
	var newVal =3D validateGeneric(lkc.getDataType(), lkc.getDomain(), val, =
lkc.getLength(), lkc.getPrecision(), lkc.getScale());
	if (newVal !=3D invalidValue()){
		lkc.setValue(newVal);
		this.exeReverseLookup();
	} else {
		Error.setMacro('F', this.label);
		Error.setFocusTo(this);
		Error.catchErrors();
		return false;
	}
}

function __WAMLookupColumn_OnClick_RADIO(){
	if (this._checked =3D=3D true) this.checked =3D false;
	this.WAMLookupColumn.parent.parent.setDirty();
}

function __WAMLookupColumn_OnClick_CHECKBOX(){
	this.WAMLookupColumn.parent.parent.setDirty();
}
/*hierMenus.js
* by Peter Belesis. v3.10.1 000630
* Copyright (c) 2000 internet.com Corp. All Rights Reserved.
* Originally published and documented at http://www.dhtmlab.com/
* You may use this code on a public Web site only if this entire
* copyright notice appears unchanged and you publicly display
* on the Web page a link to http://www.dhtmlab.com/.
*
* Contact pbel@websentric.com for all other uses.
*/

function menuPopUp(){return};
function menuPopDown(){return};

var objWAMMenu =3D new Object();

var isLoaded =3D false;
function MenuInit(strMenuType, strImageSrc, strUser, strListSchema, =
strListName, strListTableSchema, strListTable, strCriterionDescription, =
strAction, elForm, intMenusCount){
	var m;
=09
	if (isUndefined(intMenusCount)) intMenusCount =3D 1;
=09
	objWAMMenu.menuType =3D strMenuType;
	objWAMMenu.imgSrc =3D strImageSrc;
	objWAMMenu.user =3D strUser;
	objWAMMenu.schema =3D strListSchema;
	objWAMMenu.name =3D strListName;
	objWAMMenu.listTableSchema =3D strListTableSchema;
	objWAMMenu.listTableName =3D strListTable;
	objWAMMenu.criterionDescription =3D strCriterionDescription;
	objWAMMenu.action =3D strAction;
	objWAMMenu.form =3D elForm;

	//---
	for (m=3D1; m<=3DintMenusCount; m++)
		eval("var arMenu" + m);
	//---

	NS4 =3D (document.layers);
	IE4 =3D (document.all);
	ver4 =3D (NS4 || IE4);
	IE5 =3D (IE4 && navigator.appVersion.indexOf("5.")!=3D-1);
	isMac =3D (navigator.appVersion.indexOf("Mac") !=3D -1);
	isMenu =3D (NS4 || (IE4 && !isMac) || (IE5 && isMac));
=09
	if (!ver4) event=3Dnull;
	curPage=3D1;

	if (isMenu) {
		menuVersion =3D 3;
		menuWidth =3D 120;
		childOverlap =3D 10; //20;
		childOffset =3D 8; // 5;
		perCentOver =3D 2;
		secondsVisible =3D 0; //.5;

		fntCol =3D "#FFFFFF";		//"blue";
		fntSiz =3D "8";			//"10";
		fntBold =3D false;
		fntItal =3D false;
		fntFam =3D "ms sans serif";//"Arial,sans-serif";

		backCol =3D "#63639C";	//"#DDDDDD";
		overCol =3D "#D6D6F7";	//"#FFCCCC";
		overFnt =3D "000000";		//"purple";
//		backCol =3D "#336699";	//"#DDDDDD";
//		overCol =3D "#6699cc";	//"#FFCCCC";
//		overFnt =3D "ffffff";		//"purple";

		borWid =3D 1;	//2;
		borCol =3D "black";
		borSty =3D "solid";
		itemPad =3D 3;

		imgSiz =3D 10;

		separator =3D 1;	//2;
		separatorCol =3D "#000000";	//"black";

		isFrames =3D false;
		navFrLoc =3D "left";     //***********

		keepHilite =3D true;=20
		NSfontOver =3D true;
		clickStart =3D false;
		clickKill =3D true;	//false
	}


	loader =3D (isFrames) ? (NS4) ? parent : parent.document.body : window;
	//loader.onload =3D Menu_startIt;

	//.... Loader substituted by window ....//
	//loader.addToOnLoad(Menu_startIt);

	if(NS4){
		origWidth =3D loader.innerWidth;
		origHeight =3D loader.innerHeight;
		loader.onresize =3D reDo;
	}
	isLoaded =3D false;
	NSresized =3D false;

	if (!window.menuVersion) clickKill =3D keepHilite =3D clickStart =3D =
false;
	if (!window.imgHspace) imgHspace=3D0;

	isWin =3D (navigator.appVersion.indexOf("Win") !=3D -1)

	mSecsVis =3D secondsVisible*1000;
	isRight =3D (window.navFrLoc && navFrLoc =3D=3D "right");
	fullImgSize =3D (imgSiz+(imgHspace*2));
	if(!IE5) {
		imgSuf =3D (isRight) ? ">"  : " ALIGN=3DRIGHT>";
		imgStr =3D "<IMG SRC=3D'" + objWAMMenu.imgSrc + "' WIDTH=3D" + imgSiz =
+ " HEIGHT=3D" + imgSiz +" VSPACE=3D2 HSPACE=3D"+ imgHspace +" =
BORDER=3D0"+ imgSuf;
		if(IE4) imgStr =3D "<SPAN STYLE=3D'height:100%;width:"+ =
(fullImgSize-(isRight?3:0)) +";float:"+ (isRight?"left":"right") =
+";overflow:hidden'>"+ imgStr +"</SPAN>";
	}

	areCreated =3D false;
	menuLoc =3D null;

	initVars();

	window.onerror =3D handleErr;
}


function initVars() {
	if(areCreated) {
		for(i=3D1; i<topCount; i++) {
			cur =3D eval("elMenu"+i);
			clearTimeout(cur.hideTimer);
			cur.hideTimer=3Dnull;
		}
		clearTimeout(allTimer);
	}
	topCount =3D 1;
	areCreated =3D false;
	beingCreated =3D false;
	isOverMenu =3D false;
	currentMenu =3D null;
	allTimer =3D null;
}

function NSunloaded(){
	isLoaded =3D false;
}

function NSloaded(e){
	if (e.target.name =3D=3D mainFrName) {
		initVars();
		Menu_startIt();
	}
}

function IEunloaded() {
	initVars();
	isLoaded =3D false;
	setTimeout("keepTrack()",50)
}

function keepTrack() {
	if (menuLoc.document.readyState =3D=3D "complete") {
		initVars();
		Menu_startIt();
	}
	else {
		setTimeout("keepTrack()",50);
	}
}

function Menu_startIt() {
	isLoaded =3D true;
	if (isFrames) {
		menuLoc =3D eval("parent.frames." + mainFrName);
		if (NS4) {
			loader.captureEvents(Event.LOAD);
			loader.addToOnLoad(NSloaded);
			menuLoc.onunload =3D NSunloaded;
		}
		if (IE4) {
			menuLoc.document.body.onunload =3D IEunloaded;
		}
	}
	else {
		menuLoc =3D window;
	}
	menuLoc.nav =3D nav =3D window;
	if (clickKill) {
		if (NS4) menuLoc.document.captureEvents(Event.MOUSEDOWN);
		menuLoc.document.onmousedown =3D clicked;
	}
	makeTop();  =20
}

function makeTop(){
	beingCreated =3D true;
	if(IE4) {
		topZ =3D 0;
		for (z=3D0;z<menuLoc.document.all.length;z++){
			oldEl =3D menuLoc.document.all(z);
			topZ =3D Math.max(oldEl.style.zIndex,topZ)
		}
	}
	while(eval("window.arMenu" + topCount)) {
		(NS4) ? makeMenuNS(false,topCount) : makeMenuIE(false,topCount);
		topCount++;
	}
	//status =3D (topCount-1) + " Hierarchical Menu Trees Created"
	areCreated =3D true;
	beingCreated =3D false;
}

function makeMenuNS(isChild,menuCount,parMenu,parItem) {
	tempArray =3D eval("arMenu" + menuCount);
=09
	if (!isChild) {
		tempWidth =3D tempArray[0] ? tempArray[0] : menuWidth;
		menu =3D makeElement("elMenu" + menuCount,tempWidth,null,null);
	}
	else {
		menu =3D makeElement("elMenu" + menuCount,null,parMenu,null);
	}
	menu.array =3D tempArray;
	menu.setMenuTree =3D setMenuTree;
	menu.setMenuTree(isChild,parMenu);

	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
	=09
		status =3D "Creating Hierarchical Menus: " + menuCount + " / " + =
menu.itemCount;
	=09
		prevItem =3D (menu.itemCount > 1) ? menu.item : null;
		itemName =3D "item" + menuCount + "_" + menu.itemCount;

		menu.item =3D makeElement(itemName,null,null,menu);

		menu.item.prevItem =3D prevItem;
		menu.item.setup =3D itemSetup;
		menu.item.setup(menu.itemCount,menu.array);
		if (menu.item.hasMore) {
			makeMenuNS(true,menuCount + "_" + menu.itemCount,menu,menu.item);
			menu =3D menu.parentMenu;
		}
	}
	menu.lastItem =3D menu.item;
	menu.setup(isChild,parMenu,parItem);
}

function findTree(men){
	foundTree =3D false;
	for(i=3D11;i<men.array.length;i+=3D3){
		if(men.array[i]) {
			foundTree =3D true;
			break;
		}
	}
	return foundTree;
}

function setMenuTree(isChild,parMenu) {
	if (!isChild) {
		this.menuWidth =3D this.array[0] ? this.array[0] : menuWidth;
		this.menuLeft =3D this.array[1];
		this.menuTop =3D this.array[2];
		this.menuFontColor =3D this.array[3] ? this.array[3] : fntCol;
		this.menuFontOver =3D this.array[4] ? this.array[4] : overFnt;
		this.menuBGColor =3D this.array[5] ? this.array[5] : backCol;
		this.menuBGOver =3D this.array[6] ? this.array[6] : overCol;
		this.menuBorCol =3D this.array[7] ? this.array[7] : borCol;
		this.menuSeparatorCol =3D this.array[8] ? this.array[8] : =
separatorCol;
		this.treeParent =3D this;
		this.startChild =3D this;
		this.isTree =3D findTree(this);
	}
	else {
		this.menuWidth =3D parMenu.menuWidth;
		this.menuLeft =3D parMenu.menuLeft;
		this.menuTop =3D parMenu.menuTop;
		this.menuFontColor =3D parMenu.menuFontColor;
		this.menuFontOver =3D parMenu.menuFontOver;
		this.menuBGColor =3D parMenu.menuBGColor;
		this.menuBGOver =3D parMenu.menuBGOver;
		this.menuBorCol =3D parMenu.menuBorCol;
		this.menuSeparatorCol =3D parMenu.menuSeparatorCol;
		this.treeParent =3D parMenu.treeParent;
		this.isTree =3D parMenu.isTree;
	}

	this.maxItems =3D (isChild) ? this.array.length/8 : =
(this.array.length-9)/8;
	//## this.maxItems =3D (isChild) ? this.array.length/3 : =
(this.array.length-9)/3;
	this.hasParent =3D isChild;
	this.setup =3D menuSetup;
	this.itemCount =3D 0;
}

function makeMenuIE(isChild,menuCount,parMenu, arrMenu) {
	//----*
	var el =3D eval("window.document.all.elMenu" + menuCount);
	if (isUndefined(el))
		menu =3D makeElement("elMenu" + menuCount);
	else{
		el.innerHTML =3D "";
		menu =3D el;
	}
	//----*
	=09
	//menu.array =3D eval("arMenu" + menuCount);
	if (isUndefined(arrMenu))
		menu.array =3D eval("arMenu" + menuCount);
	else
		menu.array =3D arrMenu;

	menu.setMenuTree =3D setMenuTree;
	menu.setMenuTree(isChild,parMenu);
	menu.itemStr =3D "";
=09
	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
		//status =3D "Creating Hierarchical Menus: " + menuCount + " / " + =
menu.itemCount;
		itemName =3D "item" + menuCount + "_" + menu.itemCount;
		//## arrayPointer =3D (isChild) ? (menu.itemCount-1)*3 =
:((menu.itemCount-1)*3)+9;
		arrayPointer =3D (isChild) ? (menu.itemCount-1)*8 =
:((menu.itemCount-1)*8)+9;
		dispText =3D menu.array[arrayPointer];
	=09
		//##
		hasMore =3D menu.array[arrayPointer + 5];
		showMore =3D menu.array[arrayPointer + 6];

		if(IE5) {
			newSpan =3D menuLoc.document.createElement("SPAN");
			with(newSpan) {
				id =3D itemName;
				with(style) {
					width =3D (menu.menuWidth-(borWid*2));
					fontSize =3D fntSiz + "pt";
					fontWeight =3D (fntBold) ? "bold" : "normal";
					fontStyle =3D (fntItal) ? "italic" : "normal";
					fontFamily =3D fntFam;
					padding =3D itemPad;
					borderBottomWidth =3D separator + "px";
					borderBottomStyle =3D "solid";
				}
				innerHTML =3D dispText;
			}
=09
			newBreak =3D menuLoc.document.createElement("BR");
			menu.appendChild(newSpan);
			menu.appendChild(newBreak);
			if(hasMore) {
				newImage =3D menuLoc.document.createElement("IMAGE");
				with(newImage){
					src =3D objWAMMenu.imgSrc;
					with(style) {
						position =3D "absolute";
						width =3D imgSiz;
						height =3D imgSiz;
						left =3D (isRight) ? itemPad : (newSpan.style.pixelWidth - itemPad =
- imgSiz);
						top =3D newSpan.offsetTop + itemPad + (isMac ? 0 : 2);
					}
				}
				newSpan.appendChild(newImage);
			}
		}
		else {
			htmStr =3D (hasMore) ? imgStr + dispText : dispText;
			menu.itemStr +=3D "<SPAN ID=3D" + itemName + " =
STYLE=3D\"cursor:hand;width:" + (menu.menuWidth-(borWid*2)) + "\">" + =
htmStr + "</SPAN><BR>";
		}
		//if (hasMore) {
		if (hasMore && showMore){
			makeMenuIE(true,menuCount + "_" + menu.itemCount,menu);
			menu =3D menu.parentMenu;
		}
	}

	if(!IE5) menu.innerHTML =3D menu.itemStr;

	itemColl =3D menu.children.tags("SPAN");
	for (i=3D0; i<itemColl.length; i++) {
		it =3D itemColl(i);
		it.setup =3D itemSetup;
		it.setup(i+1,menu.array);
	}
	menu.lastItem =3D itemColl(itemColl.length-1);
	menu.setup(isChild,parMenu);
}

function makeElement(whichEl,whichWidth,whichParent,whichContainer) {
	if (NS4) {
		if (whichWidth) {
			elWidth =3D whichWidth;
		}
		else {
			elWidth =3D (whichContainer) ? whichContainer.menuWidth : =
whichParent.menuWidth;
			if (whichContainer) elWidth =3D elWidth-(borWid*2)-(itemPad*2);
		}
		if (!whichContainer) whichContainer =3D menuLoc;
		eval(whichEl + "=3D new Layer(elWidth,whichContainer)");
	}
	else {
		if (IE5) {
			newDiv =3D menuLoc.document.createElement("DIV");
			newDiv.style.position =3D "absolute";
			newDiv.id =3D whichEl;
			menuLoc.document.body.appendChild(newDiv);
		}
		else {
			elStr =3D "<DIV ID=3D" + whichEl + " =
STYLE=3D'position:absolute'></DIV>";
			menuLoc.document.body.insertAdjacentHTML("BeforeEnd",elStr);
		}
		if (isFrames) eval(whichEl + "=3D menuLoc." + whichEl);
	}
	return eval(whichEl);
}

function itemSetup(whichItem,whichArray) {
	this.onmouseover =3D itemOver;
	this.onmouseout =3D itemOut;
	//....
	this.createSubMenu =3D itemCreateSubMenu;
	this.loadSubMenu =3D itemLoadSubMenu;
	this.showSubMenu =3D itemShowSubMenu;
	//....
	this.container =3D (NS4) ? this.parentLayer : this.parentElement;

	arrayPointer =3D (this.container.hasParent) ? (whichItem-1)*8 : =
((whichItem-1)*8)+9;
	//## arrayPointer =3D (this.container.hasParent) ? (whichItem-1)*3 : =
((whichItem-1)*3)+9;
=09
	this.dispText =3D whichArray[arrayPointer];
	this.schema =3D whichArray[arrayPointer + 1];
	this.name =3D whichArray[arrayPointer + 2];
	this.join =3D whichArray[arrayPointer + 3];
	this.relationshipType =3D whichArray[arrayPointer + 4]; // --- MASTER =
or DETAIL or empty (column)
	this.hasMore =3D whichArray[arrayPointer + 5];
	this.showMore =3D whichArray[arrayPointer + 6];
	this.linkText =3D whichArray[arrayPointer + 7];

	//if (IE4 && this.hasMore) {
	if (IE4 && this.hasMore && this.showMore) {
		this.child =3D eval("elMenu" + this.id.substr(4));
		this.child.parentMenu =3D this.container;
		this.child.parentItem =3D this;
	}
=09
	//....
	if (this.name =3D=3D "" && this.linkText =3D=3D ""){
	} else if (this.linkText){
		this.onclick =3D linkIt;
		this.style.cursor =3D "hand";
	} else if (!this.hasMore){
		this.onclick =3D itemClick;
		this.style.cursor =3D "hand";
	} else {
		this.style.cursor =3D "hand";
	}
	//....
=09
	/*
	if (this.linkText) {
		if (NS4) {
			this.captureEvents(Event.MOUSEUP)
			this.onmouseup =3D linkIt;
		}
		else {
			this.onclick =3D linkIt;
			this.style.cursor =3D "hand";
		}
	}
	*/

	if (NS4) {
		htmStr =3D this.dispText;
		if (fntBold) htmStr =3D htmStr.bold();
		if (fntItal) htmStr =3D htmStr.italics();

		htmStr =3D "<FONT FACE=3D'" + fntFam + "' POINT-SIZE=3D" + fntSiz + =
">" + htmStr+ "</FONT>";
		this.htmStrOver =3D htmStr.fontcolor(this.container.menuFontOver);
		this.htmStr =3D htmStr.fontcolor(this.container.menuFontColor);
		if(this.hasMore) {
			this.document.write(imgStr);
			this.document.close();
		}
		this.visibility =3D "inherit";
		this.bgColor =3D this.container.menuBGColor;

		if (whichItem =3D=3D 1) {
			this.top =3D borWid + itemPad;
		}
		else {
			this.top =3D this.prevItem.top + this.prevItem.clip.height + =
separator;
		}
		this.left =3D borWid + itemPad;
		this.clip.top =3D this.clip.left =3D -itemPad;
		this.clip.right =3D this.container.menuWidth-(borWid*2)-itemPad;
		maxTxtWidth =3D this.container.menuWidth-(borWid*2)-(itemPad*2);
		if (this.container.isTree) maxTxtWidth-=3D(fullImgSize);

		this.txtLyrOff =3D new Layer(maxTxtWidth,this);
		if (isRight && this.container.isTree) this.txtLyrOff.left =3D =
fullImgSize;
		this.txtLyrOff.document.write(this.htmStr);
		this.txtLyrOff.document.close();
		this.txtLyrOff.visibility =3D "inherit";

		this.clip.bottom =3D this.txtLyrOff.document.height+itemPad;

		this.txtLyrOn =3D new Layer(maxTxtWidth,this);
		if (isRight && this.container.isTree) this.txtLyrOn.left =3D =
fullImgSize;
		this.txtLyrOn.document.write(this.htmStrOver);
		this.txtLyrOn.document.close();
		this.txtLyrOn.visibility =3D "hide";

		this.dummyLyr =3D new Layer(100,this);
		this.dummyLyr.left =3D this.dummyLyr.top =3D -itemPad;
		this.dummyLyr.clip.width =3D this.clip.width;
		this.dummyLyr.clip.height =3D this.clip.height;
		this.dummyLyr.visibility =3D "inherit";
	}
	else {
		with (this.style) {
			if(!IE5) {
				fontSize =3D fntSiz + "pt";
				fontWeight =3D (fntBold) ? "bold" : "normal";
				fontStyle =3D   (fntItal) ? "italic" : "normal";
				fontFamily =3D fntFam;
				padding =3D itemPad;
				borderBottomWidth =3D separator + "px";
				borderBottomStyle =3D "solid";
			}
			if (this.container.isTree && (IE5 || (!IE5 && !this.hasMore))) {
				//**** if (isRight && !this.hasMore) paddingLeft =3D =
parseInt(padding)+imgSiz;
				if (isRight) paddingLeft =3D itemPad+fullImgSize;
				else paddingRight =3D itemPad+fullImgSize;
			}
			color =3D this.container.menuFontColor;
			borderBottomColor =3D this.container.menuSeparatorCol;
			backgroundColor =3D this.container.menuBGColor;
		}
	}
}  =20

function menuSetup(hasParent,openCont,openItem) {
	this.onmouseover =3D menuOver;
	this.onmouseout =3D menuOut;
=09
	this.showIt =3D showIt;
	this.keepInWindow =3D keepInWindow;
	this.hideTree =3D hideTree
	this.hideParents =3D hideParents;
	this.hideChildren =3D hideChildren;
	this.hideTop =3D hideTop;
	this.hasChildVisible =3D false;
	this.isOn =3D false;
	this.hideTimer =3D null;

	this.childOverlap =3D (perCentOver !=3D null) ? ((perCentOver/100) * =
this.menuWidth) : childOverlap;
	this.currentItem =3D null;
	this.hideSelf =3D hideSelf;
=09
	this.has2JoinsToTable =3D menuHas2JoinsToTable;
	=09
	if (hasParent) {
		this.hasParent =3D true;
		this.parentMenu =3D openCont;
		if (NS4) {
			this.parentItem =3D openItem;
			this.parentItem.child =3D this;
		}
	}
	else {
		this.hasParent =3D false;
	}

	if (NS4) {
		this.bgColor =3D this.menuBorCol;
		this.fullHeight =3D this.lastItem.top + this.lastItem.clip.bottom + =
borWid;
		this.clip.right =3D this.menuWidth;
		this.clip.bottom =3D this.fullHeight;
	}
	else {
		with (this.style) {
			width =3D this.menuWidth;
			borderWidth =3D borWid;
			borderColor =3D this.menuBorCol;
			borderStyle =3D borSty;
			zIndex =3D topZ;
		}
		this.lastItem.style.border=3D"";
		this.fullHeight =3D this.offsetHeight;
		if(isMac)this.style.pixelHeight =3D this.fullHeight;
		this.fullHeight =3D this.scrollHeight;
		this.showIt(false);
		this.onselectstart =3D cancelSelect;
		this.moveTo =3D moveTo;
		this.moveTo(0,0);
	}
}

function menuPopUp(menuName,e,startMenu){
	if (!WAM_MENU_STARTED){
		initMenuAddCols();
		Menu_startIt();
	}
	if (NS4 && NSresized) Menu_startIt();
	if (!isLoaded) return;
	linkEl =3D (NS4) ? e.target : event.srcElement;
	if (clickStart) linkEl.onclick =3D popMenu;
	if (!beingCreated && !areCreated) Menu_startIt();
	if (startMenu){
		(NS4) ? makeMenuNS(false,topCount) : makeMenuIE(false,topCount);
	}
	linkEl.menuName =3D menuName;  =20
	if (!clickStart) popMenu(e);
}

function popMenu(e){
	if (!isLoaded || !areCreated) return true;

	eType =3D (NS4) ? e.type : event.type;
	if (clickStart && eType !=3D "click") return true;
	hideAll();

	linkEl =3D (NS4) ? e.target : event.srcElement;
=09
	currentMenu =3D eval(linkEl.menuName);
	currentMenu.hasParent =3D false;
	currentMenu.treeParent.startChild =3D currentMenu;
=09
	if (IE4) menuLocBod =3D menuLoc.document.body;
	if (!isFrames) {
		xPos =3D (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? =
e.pageX : (event.clientX + menuLocBod.scrollLeft);
		yPos =3D (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? e.pageY =
: (event.clientY + menuLocBod.scrollTop);
	}
	else {
		switch (navFrLoc) {
			case "left":
				xPos =3D (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? =
menuLoc.pageXOffset : menuLocBod.scrollLeft;
				yPos =3D (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? =
(e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + =
menuLocBod.scrollTop;
				break;
			case "top":
				xPos =3D (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? =
(e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + =
menuLocBod.scrollLeft;
				yPos =3D (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? =
menuLoc.pageYOffset : menuLocBod.scrollTop;
				break;
			case "bottom":
				xPos =3D (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? =
(e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + =
menuLocBod.scrollLeft;
				yPos =3D (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? =
menuLoc.pageYOffset+menuLoc.innerHeight : menuLocBod.scrollTop + =
menuLocBod.clientHeight;
				break;
			case "right":
				xPos =3D (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? =
menuLoc.pageXOffset+menuLoc.innerWidth : =
menuLocBod.scrollLeft+menuLocBod.clientWidth;
				yPos =3D (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? =
(e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + =
menuLocBod.scrollTop;
				break;
		}
	}

	currentMenu.moveTo(xPos,yPos);
	currentMenu.keepInWindow()
	currentMenu.isOn =3D true;
	currentMenu.showIt(true);

	return false;
}

function menuOver(e) {
	this.isOn =3D true;
	isOverMenu =3D true;
	currentMenu =3D this;
	if (this.hideTimer) clearTimeout(this.hideTimer);
}

function menuOut() {
	if (IE4) {
		theEvent =3D menuLoc.event;
		if (theEvent.srcElement.contains(theEvent.toElement)) return;
	}
	this.isOn =3D false;
	isOverMenu =3D false;

	menuLoc.status =3D "";
	if (!clickKill) allTimer =3D setTimeout("currentMenu.hideTree()",10); =20
}


function menuHas2JoinsToTable(strSchema, strName){
	var i =3D 0;
	var nJoins =3D 0;
=09
	itemColl =3D this.children.tags("SPAN");
	while (i<itemColl.length && nJoins<2){
		it =3D itemColl(i);
		if (it.schema=3D=3DstrSchema && it.name=3D=3DstrName){
			nJoins++;
		}
		i++;	=09
	}

	if (nJoins<2)
		return false;
	else
		return true;
}


function itemClick(){
	var itemCol =3D currentMenu.currentItem;
	var elForm;
=09
	// Add selected column to the list
	if (!itemCol.container.hasParent){
		// Column belongs to List Base Table
		schema =3D objWAMMenu.listTableSchema;
		table =3D objWAMMenu.listTableName;
		requiredJoin =3D '';
	} else {
		schema =3D itemCol.container.parentItem.schema;
		table =3D itemCol.container.parentItem.name;
		if (!itemCol.container.parentMenu.hasParent){
			// Column belongs to a 2nd level join table
			// The fk name is only required for ambiguos paths or when the =
relationshipType =3D DETAIL (tables linked twice)
			if (itemCol.container.parentMenu.has2JoinsToTable(schema, table))
				requiredJoin =3D itemCol.container.parentItem.join;
			else if (itemCol.container.parentItem.relationshipType =3D=3D =
"DETAIL")
				requiredJoin =3D itemCol.container.parentItem.join;
			else
				requiredJoin =3D '';
		} else {
			// >2nd level join table
			requiredJoin =3D itemCol.container.parentItem.join;
		}
	}

	objWAMMenu.form.txtSchema.value =3D schema;
	objWAMMenu.form.txtTable.value =3D table;
	objWAMMenu.form.txtColumn.value =3D itemCol.name;
	objWAMMenu.form.txtRequiredJoin.value =3D requiredJoin;
	objWAMMenu.form.txtColumnLabel.value =3D itemCol.description;

	switch(objWAMMenu.menuType){
		case 'WAMList':
			objWAMMenu.form.__Action.value=3D'addColumn';
			objList.refresh();
			break;
		case 'WAMCriterion':
			objWAMMenu.form.wcAction.value=3D'addColumn';
			objCriterion.refresh();
			break;
	}
}


function itemCreateSubMenu(){
	var objASPExec;
	var strForm;
	var strJoin =3D "";


	if (this.container.hasParent)
		strJoin =3D this.join;
	else if (this.container.has2JoinsToTable(this.schema, this.name))
		strJoin =3D this.join;
	else if (this.relationshipType =3D=3D "DETAIL")
		strJoin =3D this.join;

	strForm =3D "" +=20
		"\t<form name=3D'frmLoadMenu' action=3D'" + objWAMMenu.action + "' =
method=3D'post'>\n" +
		"\t\t<input type=3D'text' name=3D'txtMenuType' value=3D'" + =
objWAMMenu.menuType + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtUser' value=3D'" + =
objWAMMenu.user + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtListSchema' value=3D'" + =
objWAMMenu.schema + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtListName' value=3D'" + =
objWAMMenu.name + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtEditTableSchema' value=3D'" + =
objWAMMenu.listTableSchema + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtEditTableName' value=3D'" + =
objWAMMenu.listTableName + "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtSchema' value=3D'" + this.schema =
+ "'>\n" +
		"\t\t<input type=3D'text' name=3D'txtTable' value=3D'" + this.name + =
"'>\n" +
		"\t\t<input type=3D'text' name=3D'txtCriterionDescription' value=3D\"" =
+ objWAMMenu.criterionDescription.toScriptFormat() + "\">\n" +
		"\t\t<input type=3D'text' name=3D'txtJoin' value=3D'" + strJoin + =
"'>\n" +
		"\t</form>";

	objASPExec =3D new ASPExecute();
//	objASPExec.setDebug(true);
	objASPExec.setForm(strForm, "frmLoadMenu");
	objASPExec.execute();
}


function itemLoadSubMenu(arrSubMenu){
	var itemCount =3D this.id.substring(this.id.lastIndexOf("_")+1);
	menuCount =3D this.id.substring(4);
	var parMenu =3D eval(this.container.id);
	this.showMore=3D1;
	(NS4) ? makeMenuNS(true,menuCount,parMenu) : =
makeMenuIE(true,menuCount,parMenu,arrSubMenu);
	this.child =3D eval("elMenu" + this.id.substr(4));
	this.child.parentMenu =3D this.container;
	this.child.parentItem =3D this;
	this.showSubMenu();
}


function itemShowSubMenu(){
	horOffset =3D (isRight) ? (this.container.childOverlap - =
this.container.menuWidth) : (this.container.menuWidth - =
this.container.childOverlap);
	if (NS4) {
		this.childX =3D this.container.left + horOffset;
		this.childY =3D (this.pageY+this.clip.top) + childOffset;
	}
	else {
		this.childX =3D this.container.style.pixelLeft + horOffset;
		this.childY =3D this.offsetTop + this.container.style.pixelTop + =
childOffset + borWid;
	}
	this.child.moveTo(this.childX,this.childY);
	this.child.keepInWindow();
	this.container.hasChildVisible =3D true;
	this.container.visibleChild =3D this.child;
	this.child.showIt(true);
}


function itemOver(){
	if (keepHilite) {
		if (this.container.currentItem && this.container.currentItem !=3D =
this) {
			if (NS4) {
				this.container.currentItem.bgColor =3D this.container.menuBGColor;
				this.container.currentItem.txtLyrOff.visibility =3D "inherit";
				this.container.currentItem.txtLyrOn.visibility =3D "hide";
			}
			else {
				with (this.container.currentItem.style) {
					backgroundColor =3D this.container.menuBGColor;
					color =3D this.container.menuFontColor;
				}
			}
		}
	}

	if (IE4) {
		theEvent =3D menuLoc.event;
		if (theEvent.srcElement.tagName =3D=3D "IMG") return;
		this.style.backgroundColor =3D this.container.menuBGOver;
		this.style.color =3D this.container.menuFontOver;
	}
	else {
		this.bgColor =3D this.container.menuBGOver;
		this.txtLyrOff.visibility =3D "hide";
		this.txtLyrOn.visibility =3D "inherit";
	}

	//menuLoc.status =3D this.linkText;

	this.container.currentItem =3D this;

	if (this.container.hasChildVisible) {
		this.container.hideChildren(this);
	}

	if (this.hasMore) {
		if (isUndefined(this.child)){=20
			// Make child menu
			this.createSubMenu();
		}
		else{
			this.showSubMenu();
		}
	=09
		/*
		horOffset =3D (isRight) ? (this.container.childOverlap - =
this.container.menuWidth) : (this.container.menuWidth - =
this.container.childOverlap);

		if (NS4) {
			this.childX =3D this.container.left + horOffset;
			this.childY =3D (this.pageY+this.clip.top) + childOffset;
		}
		else {
			this.childX =3D this.container.style.pixelLeft + horOffset;
			this.childY =3D this.offsetTop + this.container.style.pixelTop + =
childOffset + borWid;
		}

		this.child.moveTo(this.childX,this.childY);
		this.child.keepInWindow();
		this.container.hasChildVisible =3D true;
		this.container.visibleChild =3D this.child;
		this.child.showIt(true);
		*/
	}
}

function itemOut() {
	if (IE4) {
		theEvent =3D menuLoc.event;
		 if (theEvent.srcElement.contains(theEvent.toElement)
	  || (theEvent.fromElement.tagName=3D=3D"IMG" && =
theEvent.toElement.contains(theEvent.fromElement)))
		  return;
		if (!keepHilite) {
			this.style.backgroundColor =3D this.container.menuBGColor;
			this.style.color =3D this.container.menuFontColor;
		}
	}
	else {
		if (!keepHilite) {
			this.bgColor =3D this.container.menuBGColor;
			this.txtLyrOff.visibility =3D "inherit";
			this.txtLyrOn.visibility =3D "hide";
		}
		if (!isOverMenu && !clickKill) {
			allTimer =3D setTimeout("currentMenu.hideTree()",10);=20
		}
	}
}

function moveTo(xPos,yPos) {
	this.style.pixelLeft =3D xPos;
	this.style.pixelTop =3D yPos;
}

function showIt(on) {
	if (NS4) {
		this.visibility =3D (on) ? "show" : "hide";
		if (keepHilite && this.currentItem) {
			this.currentItem.bgColor =3D this.menuBGColor;
			this.currentItem.txtLyrOff.visibility =3D "inherit";
			this.currentItem.txtLyrOn.visibility =3D "hide";
		}
	}
	else {
		this.style.visibility =3D (on) ? "visible" : "hidden";
		if (keepHilite && this.currentItem) {
			with (this.currentItem.style) {
				backgroundColor =3D this.menuBGColor;
				color =3D this.menuFontColor;
			}
		}
	}
	this.currentItem =3D null;
}

function keepInWindow() {
	scrBars =3D 20;
	botScrBar =3D (isFrames && navFrLoc=3D=3D"bottom") ? (borWid*2) : =
scrBars;
	rtScrBar =3D (isFrames && navFrLoc=3D=3D"right") ? (borWid*2) : =
scrBars;
	if (NS4) {
		winRight =3D (menuLoc.pageXOffset + menuLoc.innerWidth) - rtScrBar;
		rightPos =3D this.left + this.menuWidth;
=09
		if (rightPos > winRight) {
			if (this.hasParent) {
				parentLeft =3D this.parentMenu.left;
				newLeft =3D ((parentLeft-this.menuWidth) + this.childOverlap);
				this.left =3D newLeft;
			}
			else {
				dif =3D rightPos - winRight;
				this.left -=3D dif;
			}
		}

		winBot =3D (menuLoc.pageYOffset + menuLoc.innerHeight) - botScrBar ;
		botPos =3D this.top + this.fullHeight;

		if (botPos > winBot) {
			dif =3D botPos - winBot;
			this.top -=3D dif;
		}
	=09
		winLeft =3D menuLoc.pageXOffset;
		leftPos =3D this.left;

		if (leftPos < winLeft) {
			if (this.hasParent) {
				parentLeft =3D this.parentMenu.left;
				newLeft =3D ((parentLeft+this.menuWidth) - this.childOverlap);
				this.left =3D newLeft;
			}
			else {
				this.left =3D 5;
			}
		}
	}
	else {
	    winRight =3D (menuLoc.document.body.scrollLeft + =
menuLoc.document.body.clientWidth) - rtScrBar;
		rightPos =3D this.style.pixelLeft + this.menuWidth;
=09
		if (rightPos > winRight) {
			if (this.hasParent) {
				parentLeft =3D this.parentMenu.style.pixelLeft;
				newLeft =3D ((parentLeft - this.menuWidth) + this.childOverlap);
				this.style.pixelLeft =3D newLeft;
			}
			else {
				dif =3D rightPos - winRight;
				this.style.pixelLeft -=3D dif;
			}
		}

		winBot =3D (menuLoc.document.body.scrollTop + =
menuLoc.document.body.clientHeight) - botScrBar;
		botPos =3D this.style.pixelTop + this.fullHeight;

		if (botPos > winBot) {
			dif =3D botPos - winBot;
			// --- MFA [04-02-2002]
			if (this.style.pixelTop - dif < 10) this.style.pixelTop =3D 10;
			else this.style.pixelTop -=3D dif;
			//this.style.pixelTop -=3D dif;
		}
	=09
		winLeft =3D menuLoc.document.body.scrollLeft;
		leftPos =3D this.style.pixelLeft;

		if (leftPos < winLeft) {
			if (this.hasParent) {
				parentLeft =3D this.parentMenu.style.pixelLeft;
				newLeft =3D ((parentLeft+this.menuWidth) - this.childOverlap);
				this.style.pixelLeft =3D newLeft;
			}
			else {
				this.style.pixelLeft =3D 5;
			}
		}
	}
}

function linkIt() {
	if (this.linkText.indexOf("javascript:")!=3D-1) eval(this.linkText)
	else menuLoc.location.href =3D this.linkText;
}

function menuPopDown(menuName){
	if (!isLoaded || !areCreated) return;
	whichEl =3D eval(menuName);
	whichEl.isOn =3D false;
	if (!clickKill) whichEl.hideTop();
}

function hideAll() {
	for(i=3D1; i<topCount; i++) {
		temp =3D eval("elMenu" + i + ".startChild");
		temp.isOn =3D false;
		if (temp.hasChildVisible) temp.hideChildren();
		temp.showIt(false);
	}  =20
}

function hideTree() {=20
	allTimer =3D null;
	if (isOverMenu) return;
	if (this.hasChildVisible) {
		this.hideChildren();
	}
	this.hideParents();
}

function hideTop() {
	whichTop =3D this;
	(clickKill) ? whichTop.hideSelf() : (this.hideTimer =3D =
setTimeout("if(whichTop.hideSelf)whichTop.hideSelf()",mSecsVis));
}

function hideSelf(isToHide) {
	this.hideTimer =3D null;
	if ((!this.isOn && !isOverMenu) || isToHide) {=20
		this.showIt(false);
	}
}

function hideParents() {
	tempMenu =3D this;
	while (tempMenu.hasParent) {
		tempMenu.showIt(false);
		tempMenu.parentMenu.isOn =3D false;     =20
		tempMenu =3D tempMenu.parentMenu;
	}
	tempMenu.hideTop();
}

function hideChildren(item) {
	tempMenu =3D this.visibleChild;
	while (tempMenu.hasChildVisible) {
		tempMenu.visibleChild.showIt(false);
		tempMenu.hasChildVisible =3D false;
		tempMenu =3D tempMenu.visibleChild;
	}

	if (!this.isOn || !item.hasMore || this.visibleChild !=3D this.child) {
		this.visibleChild.showIt(false);
		this.hasChildVisible =3D false;
	}
}

function cancelSelect(){return false}

function reDo(){
	if (loader.innerWidth=3D=3DorigWidth && =
loader.innerHeight=3D=3DorigHeight) return;
	initVars();
	NSresized=3Dtrue;
	menuLoc.location.reload();
}

function clicked() {
	if (!isOverMenu && currentMenu!=3Dnull && !currentMenu.isOn) {
		whichEl =3D currentMenu;
		whichEl.hideTree();
	}
}

function handleErr(){
	arAccessErrors =3D ["permission","access"];
	mess =3D arguments[0].toLowerCase();
	found =3D false;
	for (i=3D0;i<arAccessErrors.length;i++) {
		errStr =3D arAccessErrors[i];
		if (mess.indexOf(errStr)!=3D-1) found =3D true;
	}
	return found;
}
//end

//***********************************************************************=
*/
// Web Application Maker Library
//
// Copyright (c) Declarativa 2000-2001. All Rights Reserved.
//***********************************************************************=
*/
//***********************************************************************=
*/
// WAMList Object
//***********************************************************************=
*/
function List(strWAMList, strSchema, strTable, strType, strSelectCount, =
blnUseCustomRow){
	if (isUndefined(window.document.frmList))
		this.form			=3D window.document.__formWAMRow;
	else
		this.form			=3D window.document.frmList;
	this.wamList			=3D strWAMList;
	this.table				=3D strTable;
	this.schema				=3D strSchema;
	this.type				=3D strType;
	this.selectCount		=3D strSelectCount;
	this.rootURL			=3D WAMRootURL;
	this.urlForCustomRow	=3D this.rootURL + "rows/" + this.table + ".asp";
	this.criterionURL		=3D this.rootURL + =
"WAMLibrary/Criterion/criterion.asp";
	this.qsForStandardASP	=3D =
"witype=3Drow&winame=3D"+encodeURL(this.table);
	this.useCustomRow		=3D blnUseCustomRow;
	this.rows				=3D new Array();
	this.columns			=3D new Array();
	this.menu				=3D null;
	this.fk					=3D null;
	this.submitForm			=3D List_submitForm;
	this.setForm			=3D List_setForm;
	this.getForm			=3D List_getForm;
	this.addRow				=3D List_AddRow;
	this.addColumn			=3D List_AddColumn;
	this.resetColumns		=3D List_ResetColumns;
	this.newRow				=3D List_NewRow;
	this.changeCriterion	=3D List_ChangeCriterion;
	this.editCriterion		=3D List_EditCriterion;
	this.newCriterion		=3D List_NewCriterion;
	this.moveColumn			=3D List_MoveColumn;
	this.refresh			=3D List_Refresh;
	this.setDistinctRS		=3D List_SetDistinctRS;
	this.navToTopLevel		=3D List_navToTopLevel;
	this.navToPreviousLevel	=3D List_navToPreviousLevel;
	this.navToNextLevel		=3D List_navToNextLevel;
	this.navToAll			=3D List_navToAll;
	this.exportList			=3D List_exportList;
	this.selectLine			=3D List_selectLine;
	this.selectedLine		=3D null;
	this._rowAutoSave		=3D false;
	this.checkMenuMode		=3D List_checkMenuMode;

	// Set selected index in cmbCriterion
	if (!isUndefined(this.form.cmbCriterion)) =
this.form.cmbCriterion.oldSelectedIndex =3D =
this.form.cmbCriterion.selectedIndex;
}



function List_checkMenuMode(){
	if (!isNull(event) && !isUndefined(event) && event.altKey =3D=3D true)
		this.resetColumns();
	else
		menuPopUp("elMenu1",event);
}


function List_submitForm(){
	if (this.getForm().name =3D=3D "__formWAMRow"){
		objWAMRow.submitForm();
	} else {
		this.getForm().submit();
	}
}

function List_setForm(elForm){
	this.form =3D elForm;
}

function List_getForm(){
	return this.form;
}

function List_AddRow(objListRow){
	this.rows[this.rows.length] =3D objListRow;
	objListRow.id =3D this.rows.length-1;
	objListRow.parent =3D this;
}

function List_AddColumn(objListColumn){
	this.columns[this.columns.length] =3D objListColumn;
	objListColumn.parent =3D this;
}

function List_ResetColumns(){
	window.event.returnValue =3D false;
	this.getForm().__Action.value=3D'resetColumns';
	this.submitForm();
}

function List_NewRow(){
	var qs; var el1, el2;

	qs =3D "";
	if (typeof(objWAMRow) !=3D "undefined"){
		if (objWAMRow.isNew()){
			objWAMRow._setAutoSave();
			objWAMRow.aspInsert();
			return;
		} else if (objWAMRow.isDirty() && this._rowAutoSave =3D=3D true){
			objWAMRow._setAutoSave();
			objWAMRow.aspUpdate();
			return;
		}
	}

	// --- If it is a DetailList then we need to pass the master key's =
column names and values to the new row
	if (!isNull(this.fk)){
		qs =3D "wrdlfkn=3D"+this.fk.name; // wrdlfkn -> DetailListFKname
		qs +=3D "&wrdlfka=3D"+this.fk.alias; // wrdlfka -> DetailListFKalias
		for (el in this.fk.columns)
			qs +=3D =
"&wrdlfkcn=3D"+this.fk.columns[el].name+"&wrdlfkcv=3D"+this.fk.columns[el=
].value // cn -> ColumnName; cv -> ColumnValue
	}
=09
	if (this.useCustomRow)
		window.openChild(this.urlForCustomRow + "?" + qs, WinFeatures(0, 0, =
'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	else
		window.openChild(this.rootURL + 'WAMLibrary/Interface/standard.asp?' + =
this.qsForStandardASP + "&" + qs, WinFeatures(0, 0, 'no', 'no', 'no', =
'yes', 'no', 'yes', 'yes'));
=09
}

function List_ChangeCriterion(HTMLEl){
	var el;
	var specialCritNames =3D new Array("_SEPARATOR_", "_EDITCRITERION_", =
"_NEWCRITERION_");

	if (HTMLEl.value =3D=3D specialCritNames[0]){
		HTMLEl.selectedIndex =3D HTMLEl.oldSelectedIndex;
		return false;
	} else if (HTMLEl.value =3D=3D specialCritNames[1]){
		HTMLEl.selectedIndex =3D HTMLEl.oldSelectedIndex;
		this.editCriterion(HTMLEl.value);
		return true;
	} else if (HTMLEl.value =3D=3D specialCritNames[2]){
		HTMLEl.selectedIndex =3D HTMLEl.oldSelectedIndex;
		this.newCriterion();
		return true;
	}

	HTMLEl.oldSelectedIndex =3D HTMLEl.selectedIndex;
	this.getForm().__Action.value=3D'changeCriterion';
	if (this.getForm().__ListOpenMode.value.indexOf("zoom") !=3D -1)
		this.getForm().__ListOpenMode.value=3D'zoom';
	else if (this.getForm().__ListOpenMode.value =3D=3D "where")
		this.getForm().__ListOpenMode.value=3D'';
	this.submitForm();
}

function List_EditCriterion(strCriterion){
	var qs =3D "?__wamList=3D"+encodeURL(this.wamList)+"&"+
		"__wamListType=3D"+encodeURL(this.type)+"&"+
		"__wamEditTable=3D"+encodeURL(this.schema+"."+this.table)+"&"+
		"__wamCurrCrit=3D"+encodeURL(strCriterion);
	window.openChild(this.criterionURL+qs, WinFeatures(0, 0, 'no', 'no', =
'no', 'yes', 'no', 'yes', 'yes'));
}

function List_NewCriterion(){
	var qs =3D "?__wamList=3D"+encodeURL(this.wamList)+"&"+
		"__wamListType=3D"+encodeURL(this.type)+"&"+
		"__wamEditTable=3D"+encodeURL(this.schema+"."+this.table)+"&"+
		"wcAction=3Dnew";
	window.openChild(this.criterionURL+qs, WinFeatures(0, 0, 'no', 'no', =
'no', 'yes', 'no', 'yes', 'yes'));
}

function List_MoveColumn(intCol, strDirection){
	var objColLeft;
	var objColRight;
	switch (strDirection.toUpperCase()){
		case "LEFT":
			objColLeft =3D this.columns[intCol];
			objColRight =3D this.columns[intCol-1];
			break;
		case "RIGHT":
			objColLeft =3D this.columns[intCol+1];
			objColRight =3D this.columns[intCol];
			break;
		default:
			return;
			break;
	}
=09
	window.event.returnValue =3D false;
	//...
	this.getForm().txtSchemaL.value =3D objColLeft.schema;
	this.getForm().txtTableL.value =3D objColLeft.table;
	this.getForm().txtColumnL.value =3D objColLeft.name;
	this.getForm().txtRequiredJoinL.value =3D objColLeft.requiredJoin;
	this.getForm().txtSchemaR.value =3D objColRight.schema;
	this.getForm().txtTableR.value =3D objColRight.table;
	this.getForm().txtColumnR.value =3D objColRight.name;
	this.getForm().txtRequiredJoinR.value =3D objColRight.requiredJoin;
	this.getForm().__Action.value=3D'moveColumn';
	this.submitForm();
}

function List_Refresh(){
	this.submitForm();
}

function List_SetDistinctRS(){
	window.event.returnValue =3D false;
	this.getForm().__Action.value=3D'setDistinctRS';
	this.submitForm();
}

function List_navToTopLevel(){
	this.getForm().__hn_to.value =3D "TOP";
	this.submitForm();
}

function List_navToPreviousLevel(){
	this.getForm().__hn_to.value =3D "UP";
	this.submitForm();
}

function List_navToNextLevel(){
	if (!isNull(this.selectedLine)){
		this.getForm().__hn_to.value =3D "DOWN";
		this.getForm().__hn_selected.value =3D =
objList.rows[this.selectedLine-1].pk[this.getForm().__hn_pkColumn.value].=
value;
		this.submitForm();
	} else {
		Error.setError("LSTNOCURR");
		Error.catchErrors();
	}
}

function List_navToAll(){
	this.getForm().__hn_to.value =3D "";
	this.getForm().__hn_father.value =3D "";
	this.getForm().__hn_selected.value =3D "";
	this.getForm().__Action.value =3D "";
	this.submitForm();
}

function List_exportList(){
	this.getForm().__Action.value =3D "EXPORT";
	this.submitForm();
}

function List_selectLine(oLine){
	if (this.selectedLine !=3D oLine.rowIndex){
		if (!isNull(this.selectedLine)){
			if (this.selectedLine % 2 =3D=3D 0) =
oLine.parentElement.rows(this.selectedLine).className =3D =
"cssWAMlistLight";
			else oLine.parentElement.rows(this.selectedLine).className =3D "";
		}
		this.selectedLine =3D oLine.rowIndex;
		oLine.className =3D "cssWAMlistSelected";
	} else {
		if (oLine.rowIndex % 2 =3D=3D 0) oLine.className =3D =
"cssWAMlistLight";
		else oLine.className =3D "";
		this.selectedLine =3D null;
	}
}

//***********************************************************************=
*/
// LISTROW Object
//***********************************************************************=
*/
function ListRow(){
	this.id =3D null;
	this.pk =3D new Array();
	this.lk =3D new Array();
	this.addPKCol =3D ListRow_addPKCol;
	this.addLKCol =3D ListRow_addLKCol;
	this.exists =3D ListRow_Exists;
	this.edit =3D ListRow_Edit;
	this.del =3D ListRow_Delete;
	this.zoomReturn =3D ListRow_zoomReturn;
}

function ListRow_addPKCol(objPKColumn){
	this.pk[this.pk.length] =3D objPKColumn;
}

function ListRow_addLKCol(objLookupColumn){
	this.lk[this.lk.length] =3D objLookupColumn;
}

function ListRow_Exists(){
	var qs; var pkCol; var strPK; var objASPExec =3D new ASPExecute();

	qs =3D =
"schema=3D"+encodeURL(this.parent.schema)+"&table=3D"+encodeURL(this.pare=
nt.table)+"&row=3D"+this.id+"&pk=3D";
	strPK =3D "";
	for (pkCol in this.pk)
		strPK +=3D "["+this.pk[pkCol].column + "] =3D " + =
this.pk[pkCol].sqlValue + " AND ";
	strPK =3D strPK.substring(0, strPK.length-5);
	qs +=3D strPK;
	objASPExec.setURL(this.parent.rootURL + =
"WAMLibrary/WAMList_RowEdit.asp?" +qs);
	objASPExec.execute();
}

function ListRow_Edit(bolClone){
	var strQS =3D "";
	for (pkCol in this.pk) strQS +=3D =
"key=3D"+encodeURL(this.pk[pkCol].value)+"&";

	if (bolClone) strQS +=3D "wrsac=3Dtrue";
	else strQS =3D strQS.substring(0, strQS.length-1);

	// --- If it is a DetailList then we need to pass the master key's =
column names and values to the new row
	if (!isNull(this.parent.fk)){
		strQS +=3D "&wrdlfkn=3D"+this.parent.fk.name; // wrdlfkn -> =
DetailListFKname
		strQS +=3D "&wrdlfka=3D"+this.parent.fk.alias; // wrdlfka -> =
DetailListFKalias
	}

	if (this.parent.useCustomRow)
		strForm =3D window.openChild(this.parent.urlForCustomRow + "?" + =
strQS, WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	else
		strForm =3D window.openChild(this.parent.rootURL + =
'WAMLibrary/Interface/standard.asp?' + this.parent.qsForStandardASP + =
"&" + strQS, WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', =
'yes'));
}

function ListRow_Delete(){
	var objASPExec =3D new ASPExecute();
	var strForm;
	var strInputsPK=3D"";
	var pkCol;
	var strMsgConfirm;
	var confirmDelete;
	var strPKDel =3D "";

	for (pkCol in this.pk){
		strPKDel +=3D this.pk[pkCol].column + "=3D" + this.pk[pkCol].value + =
", ";
		strInputsPK +=3D "<input type=3D'text' name=3D'__old_" + =
this.parent.table.replace(/ /g, "_") + "_" + =
this.pk[pkCol].column.replace(/ /g, "_") + "' value=3D'" + =
this.pk[pkCol].value + "'>";
	}
	strPKDel =3D strPKDel.substring(0, strPKDel.length-2);

	// Only deletes the record after user confirmation
	if (typeof(MyListDeleteConfirmMessage) =3D=3D "function"){
		strMsgConfirm =3D MyListDeleteConfirmMessage(this.id+1) + "\n\n'OK' =
para apagar, 'Cancel' para cancelar.";
	} else {
		strMsgConfirm =3D WAMMessages["MESSAGE_LIST_delete"].replace(/@k/i, =
strPKDel);
	}
	confirmDelete =3D window.confirm(strMsgConfirm);
	if (confirmDelete){
		if (this.parent.useCustomRow)
			strForm =3D "<form name=3D'frmRowEdit' action=3D'" + =
this.parent.urlForCustomRow + "?wrAction=3DDRFL' method=3D'post'>";
		else
			strForm =3D "<form name=3D'frmRowEdit' action=3D'" + =
this.parent.rootURL + =
"WAMLibrary/Interface/standard.asp?wrAction=3DDRFL&" + =
this.parent.qsForStandardASP + "' method=3D'post'>";
		=09
		strForm +=3D strInputsPK + "</form>";
		objASPExec.setForm(strForm, "frmRowEdit");
//		objASPExec.setDebug(true);
		objASPExec.execute();
	}
}

function ListRow_zoomReturn(fkName){
	var lkCol;
	var strEval =3D "";
	window.event.returnValue =3D false;
	for (lkCol in this.lk)
		strEval +=3D "window.opener.document.__formWAMRow." + =
this.lk[lkCol].column + ".value =3D\"" + this.lk[lkCol].value + "\";\n";
	strEval +=3D "window.opener.objWAMRow.lookups['" + fkName + =
"'].execute();\n";
	strEval +=3D "window.opener.objWAMRow.setDirty();\n";
	strEval +=3D "self.close();";
	eval(strEval);
}

//***********************************************************************=
*/
// LISTROW_COLUMN Object
//***********************************************************************=
*/
function ListRow_Column(columnName, columnValue, sqlValue){
	this.column =3D columnName;
	this.value =3D columnValue;
	if (isUndefined(sqlValue))
		this.sqlValue =3D null;
	else
		this.sqlValue =3D sqlValue;
}

//***********************************************************************=
*/
// LISTCOLUMN Object
//***********************************************************************=
*/
function ListColumn(strSchema, strTable, strName, strRequiredJoin, =
strSort){
	this.parent			=3D null;
	this.schema			=3D strSchema;
	this.table			=3D strTable;
	this.name			=3D strName;
	this.requiredJoin	=3D strRequiredJoin;
	this.sorted			=3D strSort;
	this.sort			=3D ListColumn_Sort;
	this.remove			=3D ListColumn_Remove;
}

function ListColumn_Sort(strSort){
	if (strSort.toUpperCase()=3D=3Dthis.sorted)	strSort=3D'none';
	window.event.returnValue =3D false;
	this.parent.getForm().txtSchema.value =3D this.schema;
	this.parent.getForm().txtTable.value =3D this.table;
	this.parent.getForm().txtColumn.value =3D this.name;
	this.parent.getForm().txtRequiredJoin.value =3D this.requiredJoin;
	this.parent.getForm().txtSort.value =3D strSort;
	this.parent.getForm().__Action.value=3D'changeSorting';
	this.parent.submitForm();
}

function ListColumn_Remove(){
	window.event.returnValue =3D false;
	this.parent.getForm().txtSchema.value =3D this.schema;
	this.parent.getForm().txtTable.value =3D this.table;
	this.parent.getForm().txtColumn.value =3D this.name;
	this.parent.getForm().txtRequiredJoin.value =3D this.requiredJoin;
	this.parent.getForm().__Action.value=3D'removeColumn';
	this.parent.submitForm();
}//**********************************************************************=
**/
// Web Application Maker Library
//
// Copyright Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
// WAMCaller Object (Client Side)
//***********************************************************************=
*/
function WAMCaller(strSchema, strProcedure, strConfirmMsg, =
strSuccessMsg, intRecordsForWarning, strWarningMsg){
	if (typeof(strProcedure) =3D=3D "string" && strProcedure !=3D ""){
		return new _WAMCaller(strSchema, strProcedure, strConfirmMsg, =
strSuccessMsg, intRecordsForWarning, strWarningMsg);
	}
=09
	// --- No object was created
	return null;
}

function _WAMCaller(strSchema, strProcedure, strConfirmMsg, =
strSuccessMsg, intRecordsForWarning, strWarningMsg){
	if (typeof(_WAMCallerPrototypeCalled) =3D=3D "undefined")
		_WAMCaller__Prototype();

	// --- Properties
	this.schema =3D strSchema;
	this.procedure =3D strProcedure;
	this.proceduresURL =3D WAMRootURL + "Procedures/";
=09
	// --- Collections
	this.arguments =3D new Array();
	this.outputArgs =3D new Array(); //###
=09
	this.event =3D new WAMEventHandler(this);

	if (isEmpty(this.schema))
		this.executeSP =3D false;
	else
		this.executeSP =3D true;
=09
	if (!isNull(strConfirmMsg)){
		this.showConfirm =3D true;
		this.setConfirmMsg(strConfirmMsg);
	}
	if (!isNull(strSuccessMsg))
		this.setSuccessMsg(strSuccessMsg);
	if (!isNull(intRecordsForWarning)){
		this.recordsForWarning =3D intRecordsForWarning;
		this.setWarningMsg(strWarningMsg);
	}
}

function _WAMCaller__Prototype(){
	_WAMCallerPrototypeCalled =3D true;

	// --- Event constants
	WAMCALLER_ONBEFOREEXECUTE =3D "onBeforeExecute";
	WAMCALLER_ONAFTEREXECUTE =3D "onAfterExecute";
	// --- Status constants
	WAMCALLER_STATUSSUCCESS =3D 1;
	WAMCALLER_STATUSFAIL =3D 0;
=09
	// --- Properties
	_WAMCaller.prototype.showConfirm =3D false;
	_WAMCaller.prototype.confirmMsg =3D null;
	_WAMCaller.prototype.successMsg =3D null;
	_WAMCaller.prototype.recordsForWarning =3D null;
	_WAMCaller.prototype.showWarning =3D false;
	_WAMCaller.prototype.warningMsg =3D null;
	_WAMCaller.prototype.returnStatus =3D null;	// SP execution ended with =
{"SUCCESS"|"FAIL"}

	// --- Methods
	_WAMCaller.prototype.add				=3D _WAMCaller_add;
	_WAMCaller.prototype.addOutArg			=3D _WAMCaller_addOutArg;//###
	_WAMCaller.prototype.setConfirmMsg		=3D _WAMCaller_setConfirmMsg;
	_WAMCaller.prototype.setSuccessMsg		=3D _WAMCaller_setSuccessMsg;
	_WAMCaller.prototype.setWarningMsg		=3D _WAMCaller_setWarningMsg;
	_WAMCaller.prototype.showWarningMsg		=3D _WAMCaller_showWarningMsg;
	_WAMCaller.prototype.countRecords		=3D _WAMCaller_countRecords;
	_WAMCaller.prototype.execute			=3D _WAMCaller_execute;
	_WAMCaller.prototype.showSuccessMsg		=3D _WAMCaller_showSuccessMsg;
	_WAMCaller.prototype.getReturnStatus	=3D _WAMCaller_getReturnStatus;

	// --- Private Methods
	_WAMCaller.prototype._setArguments		=3D _WAMCaller__setArguments;
	_WAMCaller.prototype._getQSArguments	=3D _WAMCaller__getQSArguments;
	_WAMCaller.prototype._setReturnStatus	=3D _WAMCaller__setReturnStatus;
=09
	// --- Private Properties
	_WAMCaller.prototype._rowAutoSave		=3D true;
=09

	// --- START --- Methods implementation
	function _WAMCaller_add(obj /*WAMArgument*/){
		this.arguments[obj.getName()] =3D obj;
		this.arguments.length ++;
	}
=09
	function _WAMCaller_addOutArg(obj){//###
		this.outputArgs[obj.getName()] =3D obj;
	}

	function _WAMCaller_setConfirmMsg(strConfirmMsg){
		this.confirmMsg =3D strConfirmMsg;
	}
=09
	function _WAMCaller_setSuccessMsg(strSuccessMsg){
		this.successMsg =3D strSuccessMsg;
	}
=09
	function _WAMCaller_setWarningMsg(strWarningMsg){
		this.warningMsg =3D strWarningMsg;
	}
=09
	function _WAMCaller_showWarningMsg(){
		var bolConfirm =3D window.confirm(this.warningMsg);
		if (bolConfirm) this.execute();
	}=20

	function _WAMCaller_countRecords(){
		var arg;
		var strForm;
		var objASPExec =3D new ASPExecute();
		strForm =3D "" +=20
			"<form name=3D'frmCallerCOUNT' action=3D'" + WAMRootURL + =
"WAMLibrary/ProcedureCaller/caller.asp' method=3D'post'>" +
				"<input type=3D'text' name=3D'__wcMode' value=3D'COUNT'>" +
				"<input type=3D'text' name=3D'__wcProcedure' value=3D'" + =
(isEmpty(this.schema)? this.procedure : (this.schema + "." + =
this.procedure)) + "'>" +
				"<input type=3D'text' name=3D'__wcRecordsForWarning' value=3D'" + =
this.recordsForWarning + "'>" +
				"<input type=3D'text' name=3D'__wcSelectCount' value=3D\"" + =
objList.selectCount + "\">" +
			"</form>";
		objASPExec.setForm(strForm, "frmCallerCOUNT");
//objASPExec.setDebug(true);
		objASPExec.execute();
	}
=09
	function _WAMCaller_execute(){
		var bolConfirm =3D true;
		if (_WAMCaller_execute.arguments[0] !=3D "RAS"){ // --- RAS =3D row =
auto save
			if (this.showConfirm)
				bolConfirm =3D window.confirm(this.confirmMsg);
			if (!bolConfirm) return;
			if (this._rowAutoSave){
	 			if (typeof(objWAMRow) !=3D "undefined"){
					if (objWAMRow.isNew()){
						=
objWAMRow._setAutoSaveFunction("\""+this._myName+".execute('RAS')"+"\"");=

						objWAMRow._setAutoSave();
						objWAMRow.aspInsert();
						return;
					} else if (objWAMRow.isDirty()){
						=
objWAMRow._setAutoSaveFunction("\""+this._myName+".execute('RAS')"+"\"");=

						objWAMRow._setAutoSave();
						objWAMRow.aspUpdate();
						return;
					}
				}
			}
		}

		if (this.event.fire(WAMCALLER_ONBEFOREEXECUTE, false) =3D=3D false) =
return false;
		if (Error.hasErrors()) return false;

		var arg; var strURL;
		var strForm;
		var objASPExec =3D new ASPExecute();
		if (this.executeSP){
			strForm =3D "" +=20
				"<form name=3D'frmCallerEXE' action=3D'" + WAMRootURL + =
"WAMLibrary/ProcedureCaller/caller.asp' method=3D'post'>" +
				"<input type=3D'text' name=3D'__wcProcedure' value=3D'" + =
this.schema + "." + this.procedure + "'>";
			if (this.arguments.length > 0)
				for (arg in this.arguments){
					strForm +=3D "<input type=3D'hidden' name=3D'@" + =
this.arguments[arg].name + "' value=3D\"" +=20
						((typeof(this.arguments[arg].value) =3D=3D 'string') ? =
this.arguments[arg].value.toScriptFormat() : this.arguments[arg].value) =
+ "\">";
				}
			else
				strForm +=3D "<input type=3D'text' name=3D'__wcNoArgs'>";
			strForm +=3D "<input type=3D'text' name=3D'__wcMode' value=3D'EXEC'>" =
+
				"</form>";
			objASPExec.setForm(strForm, "frmCallerEXE");
//objASPExec.setDebug(true);
			objASPExec.execute();
		}
		else{
			strURL =3D this.proceduresURL + this.procedure + "?" + =
this._getQSArguments();
			if (typeof(objWAMRow) !=3D "undefined") strURL +=3D =
"&wrtablename=3D"+objWAMRow.table;
			window.openChild(strURL, WinFeatures(0, 0, 'no', 'no', 'no', 'yes', =
'no', 'yes', 'yes'));
		}
	}

	function _WAMCaller_showSuccessMsg(){
		var arg;
		if (!isNull(this.successMsg)){
			for (arg in this.outputArgs){
				this.successMsg =3D =
this.successMsg.replace(this.outputArgs[arg].getName(), =
this.outputArgs[arg].getValue());
			}
			var objDialog =3D new WAMDialog();
			objDialog.setText(this.successMsg);
			objDialog.alert();
			//alert(this.successMsg);
		}
	}

	function _WAMCaller_getReturnStatus(){
		return this.returnStatus;
	}
=09
	// --- END --- Methods implementation

	// --- START --- Private methods implementation
	function _WAMCaller__setArguments(/*{name,value}[,...n]*/){
		var i;
		var arguments =3D _WAMCaller__setArguments.arguments;

		this.arguments =3D new Array();
	=09
		if (arguments.length > 1)
			for (i=3D0; i<arguments.length; i+=3D2)
				this.add(new WAMArgument(arguments[i], arguments[i+1]));
	}

	function _WAMCaller__getQSArguments(){
		var arg;
		var strQSArgs=3D"";

		for (arg in this.arguments){
			strQSArgs +=3D "&" + this.arguments[arg].name + "=3D" +
				encodeURL(this.arguments[arg].value);
		}
		strQSArgs =3D strQSArgs.substr(1);

		return strQSArgs;
	}

	function _WAMCaller__setReturnStatus(strStatus){
		switch (strStatus){
			case WAMCALLER_STATUSSUCCESS:
			case WAMCALLER_STATUSFAIL:
				this.returnStatus =3D strStatus;
				break;
		}
	}
	// --- END --- Private methods implementation
}


//***********************************************************************=
*/
// WAMArgument Object (Client Side)
//***********************************************************************=
*/
function WAMArgument(strName, value){
	return new _WAMArgument(strName, value);
}

function _WAMArgument(strName, value){
	if (typeof(_WAMArgumentPrototypeCalled) =3D=3D "undefined")
		_WAMArgument__Prototype();

	this.name =3D strName;
	this.value =3D value;
}

function _WAMArgument__Prototype(){
	// --- Methods
	_WAMArgument.prototype.setName =3D _WAMArgument_setName;
	_WAMArgument.prototype.setValue =3D _WAMArgument_setValue;
	_WAMArgument.prototype.getName =3D _WAMArgument_getName;
	_WAMArgument.prototype.getValue =3D _WAMArgument_getValue;
=09
	function _WAMArgument_setName(strName){
		this.name =3D strName;
	}
=09
	function _WAMArgument_setValue(varValue){
		this.value =3D varValue;
	}

	function _WAMArgument_getName(){
		return this.name;
	}
=09
	function _WAMArgument_getValue(){
		return this.value;
	}
}
------=_NextPart_000_00D8_01C276C1.B8DBBF50--

