From: <Saved by Microsoft Internet Explorer 5>
Subject: e-Verde Gestor v1.2
Date: Fri, 18 Oct 2002 16:02:39 +0100
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="----=_NextPart_000_005C_01C276BF.C8C7E5D0";
	type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

This is a multi-part message in MIME format.

------=_NextPart_000_005C_01C276BF.C8C7E5D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/everde/

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML lang=3Dpt><HEAD><TITLE>e-Verde Gestor v1.2</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>

<STYLE>SPAN.groupTitle130 {
	FONT-WEIGHT: bold; WIDTH: 130px; COLOR: rgb(255,255,255); =
BACKGROUND-COLOR: rgb(0,57,24); TEXT-ALIGN: center
}
SPAN.groupTitleX {
	FONT-WEIGHT: bold; COLOR: rgb(255,255,255); BACKGROUND-COLOR: =
rgb(0,57,24); TEXT-ALIGN: center
}
TD.greenBox {
	VERTICAL-ALIGN: top; BACKGROUND-COLOR: rgb(192,220,192); TEXT-ALIGN: =
center
}
</STYLE>

<SCRIPT language=3DJavaScript>
<!--
function VisitarLoja(){
	window.open("http://loja.vinhoverde.pt/", "VVSHOP");
}

function RestartRota(){
	window.document.frmAdminR._action.value =3D "VVRouteRestart";
	window.document.frmAdminR.submit();
}
//-->
</SCRIPT>

<SCRIPT language=3DJavascript>
function openPage(obj, customRow, customList){
	if (event.altKey =3D=3D true) openRow(obj, customRow);
	else openList(obj, customList);
}

function openList(obj, custom){
	// --- Open the list page
	if (custom) =
window.openChild("http://interno.cvrvv.pt/eVerde/lists/"+obj.name+".asp",=
 WinFeatures(0, 0, "no", "no", "no", "yes", "no", "yes", "yes"));
	else =
window.openChild("http://interno.cvrvv.pt/eVerde/WAMLibrary/Interface/sta=
ndard.asp?witype=3Dlist&winame=3D"+obj.name, WinFeatures(0, 0, "no", =
"no", "no", "yes", "no", "yes", "yes"));
}

function openDetailList(obj, qs, custom){
	// --- Open the list page
	if (custom) =
window.openChild("http://interno.cvrvv.pt/eVerde/detailLists/"+obj.name+"=
.asp?"+qs, WinFeatures(0, 0, "no", "no", "no", "yes", "no", "yes", =
"yes"));
	else =
window.openChild("http://interno.cvrvv.pt/eVerde/WAMLibrary/Interface/sta=
ndard.asp?witype=3Dsadlist&winame=3D"+obj.name+"&"+qs, WinFeatures(0, 0, =
"no", "no", "no", "yes", "no", "yes", "yes"));
}

function openRow(obj, custom){
	// --- Open the row page
	if (custom) =
window.openChild("http://interno.cvrvv.pt/eVerde/rows/"+obj.name+".asp", =
WinFeatures(0, 0, "no", "no", "no", "yes", "no", "yes", "yes"));
	else =
window.openChild("http://interno.cvrvv.pt/eVerde/WAMLibrary/Interface/sta=
ndard.asp?witype=3Drow&winame=3D"+obj.name, WinFeatures(0, 0, "no", =
"no", "no", "yes", "no", "yes", "yes"));
}

function openCustom(obj){
	// --- Open the list page
	=
window.openChild("http://interno.cvrvv.pt/eVerde/custom/"+obj.name+".asp"=
, WinFeatures(0, 0, "no", "no", "no", "yes", "no", "yes", "yes"));
}

//-->
</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>
  <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=3D"e-Verde Administra=E7=E3o (VVShop e =
VVRoute)"><NOBR>e-Verde:GESTOR</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><!-- COMUM -->
            <FORM name=3DfrmAdminC=20
            action=3Dhttp://interno.cvrvv.pt/eVerde/default.asp =
method=3Dget>
            <TABLE cellSpacing=3D0 cellPadding=3D5 align=3Dcenter=20
            bgColor=3Drgb(255,255,255) border=3D0>
              <TBODY>
              <TR>
                <TD class=3DgreenBox=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: =
black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px =
solid"=20
                colSpan=3D4><SPAN class=3DgroupTitleX style=3D"WIDTH: =
560px">gest=E3o=20
                  comum</SPAN></TD></TR>
              <TR>
                <TD=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: 0px; =
BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"=20
                vAlign=3Dtop>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Entidades</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dentidade title=3DEntidades =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3DEntidades name=3Dentidade><INPUT =
class=3DcssWAMstandardButton id=3DtipoAgente title=3D"Tipos de Agente" =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3D"Tipos de Agente" =
name=3DtipoAgente><INPUT class=3DcssWAMstandardButton id=3DtipoEntidade =
title=3D"Tipos de Entidade" style=3D"WIDTH: 130px" =
onclick=3D"javascript: openPage(this, false, false);" type=3Dbutton =
value=3D"Tipos de Entidade" name=3DtipoEntidade></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Clientes/Visitantes</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dcliente title=3DClientes/Visitantes =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3DClientes/Visitantes =
name=3Dcliente></TD></FORM>
                      <TD class=3DgreenBox style=3D"TEXT-ALIGN: =
right"><SPAN=20
                        class=3DgroupTitleX style=3D"WIDTH: =
230px">Acesso=20
                        R=E1pido</SPAN><BR><BR>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_entidade=20
                            name=3D__frmWAMFinder_dbo_entidade=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_entidade.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_entidade.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Entidade</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_entidade=20
                              title=3D"Introduza o c=F3digo ou o nome =
abrev. da entidade"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_entidade=20
                            =
label=3D"Entidade"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_entidade(){=0A=
	objWF__WAMFinder_dbo_entidade =3D new WAMFinder('dbo', 'entidade', new =
Array('entidadeID', 'nomeAbrev'), '');=0A=
	objWF__WAMFinder_dbo_entidade._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_entidade._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_entidade_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_entidade.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_entidade);=0A=
=0A=
//-->=0A=
</SCRIPT>

                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_cliente=20
                            name=3D__frmWAMFinder_dbo_cliente=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_cliente.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_cliente.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Cliente/Visitante</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_cliente=20
                              title=3D"Introduza o UserName ou o nome do =
cliente"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_cliente=20
                              =
label=3D"Cliente/Visitante"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_cliente(){=0A=
	objWF__WAMFinder_dbo_cliente =3D new WAMFinder('dbo', 'cliente', new =
Array('userName', 'nome'), '');=0A=
	objWF__WAMFinder_dbo_cliente._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_cliente._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_cliente_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_cliente.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_cliente);=0A=
=0A=
//-->=0A=
</SCRIPT>
                      =
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- VVSHOP -->
            <FORM name=3DfrmAdminS=20
            action=3Dhttp://interno.cvrvv.pt/eVerde/default.asp =
method=3Dget>
            <TABLE cellSpacing=3D0 cellPadding=3D5 align=3Dcenter=20
            bgColor=3Drgb(255,255,255) border=3D0>
              <TBODY>
              <TR>
                <TD class=3DgreenBox=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: =
black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px =
solid"=20
                colSpan=3D4><SPAN class=3DgroupTitleX style=3D"WIDTH: =
560px">vinho=20
                  verde shop (vvshop)</SPAN></TD></TR>
              <TR>
                <TD=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: 0px; =
BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"=20
                vAlign=3Dtop>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Vendas</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dencomenda title=3DEncomendas =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, true, =
false);" type=3Dbutton value=3DEncomendas name=3Dencomenda><INPUT =
class=3DcssWAMstandardButton id=3DcomunicaShop title=3D"Comunica=E7=F5es =
da VVSHOP" style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, =
false, false);" type=3Dbutton value=3DComunica=E7=F5es =
name=3DcomunicaShop>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
var objCaller_notaDebito_asp;=0A=
function __WAMCaller_CreateCallerFor_notaDebito_asp(){=0A=
	objCaller_notaDebito_asp =3D new WAMCaller('', 'notaDebito.asp', =
null,null, null, 'null');=0A=
	objCaller_notaDebito_asp._setArguments();=0A=
	objCaller_notaDebito_asp._myName =3D 'objCaller_notaDebito_asp';=0A=
}=0A=
window.addToOnLoad(__WAMCaller_CreateCallerFor_notaDebito_asp);=0A=
=0A=
//-->=0A=
</SCRIPT>
                         <INPUT class=3DcssWAMstandardButton =
id=3DbtnnotaDebito_asp title=3D"Exportar Notas de D=E9bito" =
style=3D"WIDTH: 130px" onclick=3D"javascript: =
objCaller_notaDebito_asp.execute();" type=3Dbutton value=3D"Notas de =
D=E9bito" name=3DbtnnotaDebito_asp></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Produtos</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dproduto title=3DProdutos =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3DProdutos name=3Dproduto><INPUT =
class=3DcssWAMstandardButton id=3DtipoProduto title=3D"Tipos de Produto" =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3D"Tipos de Produto" =
name=3DtipoProduto><INPUT class=3DcssWAMstandardButton id=3Dsubregiao =
title=3DSub-regi=F5es style=3D"WIDTH: 130px" onclick=3D"javascript: =
openPage(this, false, false);" type=3Dbutton value=3DSub-regi=F5es =
name=3Dsubregiao><INPUT class=3DcssWAMstandardButton id=3Dcasta =
title=3DCastas. style=3D"WIDTH: 130px" onclick=3D"javascript: =
openPage(this, false, false);" type=3Dbutton value=3DCastas =
name=3Dcasta><BR></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Auxiliares</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dmoeda title=3DMoedas style=3D"WIDTH: =
130px" onclick=3D"javascript: openPage(this, false, false);" =
type=3Dbutton value=3DMoedas name=3Dmoeda><INPUT =
class=3DcssWAMstandardButton id=3Dpais title=3DPa=EDses style=3D"WIDTH: =
130px" onclick=3D"javascript: openPage(this, false, false);" =
type=3Dbutton value=3DPa=EDses name=3Dpais><INPUT =
class=3DcssWAMstandardButton id=3Dcomunicador title=3DComunicadores =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3DComunicadores =
name=3Dcomunicador></TD></TR></FORM></TBODY></TABLE>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox style=3D"TEXT-ALIGN: =
right"><SPAN=20
                        class=3DgroupTitleX style=3D"WIDTH: =
200px">Acesso=20
                        R=E1pido</SPAN><BR><BR>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_encomenda=20
                            name=3D__frmWAMFinder_dbo_encomenda=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_encomenda.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_encomenda.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Encomenda</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_encomenda=20
                              title=3D"Introduza o n=FAmero da =
encomenda"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_encomenda=20
                            =
label=3D"Encomenda"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_encomenda(){=0A=
	objWF__WAMFinder_dbo_encomenda =3D new WAMFinder('dbo', 'encomenda', =
new Array('numEnc'), '');=0A=
	objWF__WAMFinder_dbo_encomenda._customRow =3D true;=0A=
	objWF__WAMFinder_dbo_encomenda._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_encomenda_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_encomenda.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_encomenda)=
;=0A=
=0A=
//-->=0A=
</SCRIPT>

                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_produto=20
                            name=3D__frmWAMFinder_dbo_produto=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_produto.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_produto.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Produto</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_produto=20
                              title=3D"Introduza o c=F3digo ou o nome do =
produto"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_produto=20
                            =
label=3D"Produto"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_produto(){=0A=
	objWF__WAMFinder_dbo_produto =3D new WAMFinder('dbo', 'produto', new =
Array('codigo', 'nome'), '');=0A=
	objWF__WAMFinder_dbo_produto._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_produto._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_produto_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_produto.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_produto);=0A=
=0A=
//-->=0A=
</SCRIPT>
                      </TD>
                      <TD width=3D60></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>loja.vinhoverde.pt</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3DbtnVS title=3D"Visitar a Loja" =
style=3D"WIDTH: 130px" onclick=3D"javascript: VisitarLoja();" =
type=3Dbutton value=3DVisitar =
name=3DbtnVS></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- =
VVROUTE -->
            <FORM name=3DfrmAdminR=20
            action=3Dhttp://interno.cvrvv.pt/eVerde/default.asp =
method=3Dpost><INPUT=20
            id=3D_action type=3Dhidden name=3D_action>=20
            <TABLE cellSpacing=3D0 cellPadding=3D5 align=3Dcenter=20
            bgColor=3Drgb(255,255,255) border=3D0>
              <TBODY>
              <TR>
                <TD class=3DgreenBox=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: =
black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px =
solid"=20
                colSpan=3D4><SPAN class=3DgroupTitleX style=3D"WIDTH: =
560px">vinho=20
                  verde route (vvroute)</SPAN></TD></TR>
              <TR>
                <TD=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: 0px; =
BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"=20
                vAlign=3Dtop>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Itiner=E1rios</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Ditinerario title=3DItiner=E1rios =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3DItiner=E1rios name=3Ditinerario><INPUT =
class=3DcssWAMstandardButton id=3DitinerarioLocal title=3D"Locais =
Visitados (Items de um Itiner=E1rio)" style=3D"WIDTH: 130px" =
onclick=3D"javascript: openPage(this, false, false);" type=3Dbutton =
value=3D"Locais Visitados" name=3DitinerarioLocal></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Locais</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dlocal title=3DLocais style=3D"WIDTH: =
130px" onclick=3D"javascript: openPage(this, false, false);" =
type=3Dbutton value=3DLocais name=3Dlocal><INPUT =
class=3DcssWAMstandardButton id=3DtipoLocal title=3D"Tipos de Locais" =
style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, false, =
false);" type=3Dbutton value=3D"Tipos de Locais" =
name=3DtipoLocal></TD></FORM>
                      <TD class=3DgreenBox style=3D"TEXT-ALIGN: right"=20
                        width=3D200><SPAN class=3DgroupTitleX=20
                        style=3D"WIDTH: 200px">Acesso =
R=E1pido</SPAN><BR><BR>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_itinerario=20
                            name=3D__frmWAMFinder_dbo_itinerario=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_itinerario.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_itinerario.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Itinerario</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_itinerario=20
                              title=3D"Introduza o n=FAmero ou o nome do =
itiner=E1rio"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_itinerario=20
                            =
label=3D"Itinerario"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_itinerario(){=0A=
	objWF__WAMFinder_dbo_itinerario =3D new WAMFinder('dbo', 'itinerario', =
new Array('numero', 'nome'), '');=0A=
	objWF__WAMFinder_dbo_itinerario._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_itinerario._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_itinerario_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_itinerario.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_itinerario=
);=0A=
=0A=
//-->=0A=
</SCRIPT>

                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_local=20
                            name=3D__frmWAMFinder_dbo_local=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_local.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_local.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Local</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit =
id=3D__WAMFinder_dbo_local=20
                              title=3D"Introduza o c=F3digo ou o nome do =
local"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_local=20
                          =
label=3D"Local"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_local(){=0A=
	objWF__WAMFinder_dbo_local =3D new WAMFinder('dbo', 'local', new =
Array('codigo', 'nome'), '');=0A=
	objWF__WAMFinder_dbo_local._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_local._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_local_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_local.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_local);=0A=
=0A=
//-->=0A=
</SCRIPT>
                      </TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>rota.vinhoverde.pt</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3DbtnRSR title=3DRestart style=3D"WIDTH: =
130px" onclick=3D"javascript: RestartRota();" type=3Dbutton =
value=3DRestart name=3DbtnRSR></TD>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>vvsites</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3DinfoAderente title=3D"Sites dos =
Aderentes" style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, =
false, false);" type=3Dbutton value=3DVVSites =
name=3DinfoAderente></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><=
!-- VVNEWS -->
            <FORM name=3DfrmAdminN=20
            action=3Dhttp://interno.cvrvv.pt/eVerde/default.asp =
method=3Dget>
            <TABLE cellSpacing=3D0 cellPadding=3D5 align=3Dcenter=20
            bgColor=3Drgb(255,255,255) border=3D0>
              <TBODY>
              <TR>
                <TD class=3DgreenBox=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: =
black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px =
solid"=20
                colSpan=3D4><SPAN class=3DgroupTitleX style=3D"WIDTH: =
560px">vinho=20
                  verde newsletter (vvnews)</SPAN></TD></TR>
              <TR>
                <TD=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: 0px; =
BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"=20
                vAlign=3Dtop>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        =
class=3DgroupTitle130>Newsletter</SPAN><BR><BR><INPUT =
class=3DcssWAMstandardButton id=3Dassinante title=3D"Assinante da =
newsletter" style=3D"WIDTH: 130px" onclick=3D"javascript: openPage(this, =
false, false);" type=3Dbutton value=3DAssinante name=3Dassinante><INPUT =
class=3DcssWAMstandardButton id=3DcomunicaNews title=3D"Comunica=E7=F5es =
da Newsletter" style=3D"WIDTH: 130px" onclick=3D"javascript: =
openPage(this, false, false);" type=3Dbutton value=3DComunica=E7=F5es =
name=3DcomunicaNews><INPUT class=3DcssWAMstandardButton id=3Dnewsletter =
title=3DNewsletter style=3D"WIDTH: 130px" onclick=3D"javascript: =
openPage(this, false, false);" type=3Dbutton value=3DNewsletter =
name=3Dnewsletter></TD></FORM>
                      <TD class=3DgreenBox style=3D"TEXT-ALIGN: right"=20
                        width=3D200><SPAN class=3DgroupTitleX=20
                        style=3D"WIDTH: 200px">Acesso =
R=E1pido</SPAN><BR><BR>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_assinante=20
                            name=3D__frmWAMFinder_dbo_assinante=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_assinante.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_assinante.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Assinante</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_assinante title=3D""=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_assinante=20
                            =
label=3D"Assinante"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_assinante(){=0A=
	objWF__WAMFinder_dbo_assinante =3D new WAMFinder('dbo', 'assinante', =
new Array('email'), '');=0A=
	objWF__WAMFinder_dbo_assinante._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_assinante._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_assinante_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_assinante.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_assinante)=
;=0A=
=0A=
//-->=0A=
</SCRIPT>

                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM id=3D__frmWAMFinder_dbo_newsletter=20
                            name=3D__frmWAMFinder_dbo_newsletter=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_newsletter.execute(); return false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_newsletter.openList();=20
                              tabIndex=3D-1=20
                              =
href=3D"javascript:void(null)">Newsletter</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_newsletter title=3D"" =

                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_newsletter=20
                            =
label=3D"Newsletter"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_newsletter(){=0A=
	objWF__WAMFinder_dbo_newsletter =3D new WAMFinder('dbo', 'newsletter', =
new Array('codigo'), '');=0A=
	objWF__WAMFinder_dbo_newsletter._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_newsletter._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_newsletter_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_newsletter.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_newsletter=
);=0A=
=0A=
//-->=0A=
</SCRIPT>
                      =
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- NOTICIAS =
FRESCAS -->
            <FORM name=3DfrmAdminNF=20
            action=3Dhttp://interno.cvrvv.pt/eVerde/default.asp =
method=3Dget>
            <TABLE cellSpacing=3D0 cellPadding=3D5 align=3Dcenter=20
            bgColor=3Drgb(255,255,255) border=3D0>
              <TBODY>
              <TR>
                <TD class=3DgreenBox=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: =
black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px =
solid"=20
                colSpan=3D4><SPAN class=3DgroupTitleX=20
                  style=3D"WIDTH: 560px">not=EDcias =
frescas</SPAN></TD></TR>
              <TR>
                <TD=20
                style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: 0px; =
BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"=20
                vAlign=3Dtop>
                  <TABLE cellSpacing=3D10 cellPadding=3D5 border=3D0>
                    <TBODY>
                    <TR>
                      <TD class=3DgreenBox width=3D130><SPAN=20
                        class=3DgroupTitle130>Not=EDcias =
Frescas</SPAN><BR><BR><INPUT class=3DcssWAMstandardButton =
id=3DnoticiasFrescas title=3D"Not=EDcias Frescas" style=3D"WIDTH: 130px" =
onclick=3D"javascript: openPage(this, false, false);" type=3Dbutton =
value=3D"Not=EDcias Frescas" name=3DnoticiasFrescas></TD></FORM>
                      <TD class=3DgreenBox style=3D"TEXT-ALIGN: right"=20
                        width=3D230><SPAN class=3DgroupTitleX=20
                        style=3D"WIDTH: 230px">Acesso =
R=E1pido</SPAN><BR><BR>
                        <TABLE cellSpacing=3D0 cellPadding=3D0 =
border=3D0>
                          <TBODY>
                          <TR>
                            <FORM =
id=3D__frmWAMFinder_dbo_noticiasFrescas=20
                            name=3D__frmWAMFinder_dbo_noticiasFrescas=20
                            =
onsubmit=3D"objWF__WAMFinder_dbo_noticiasFrescas.execute(); return =
false;">
                            <TD vAlign=3Dcenter noWrap =
align=3Dright><B><A=20
                              title=3D"Abrir lista"=20
                              =
onclick=3Djavascript:objWF__WAMFinder_dbo_noticiasFrescas.openList();=20
                              tabIndex=3D-1 =
href=3D"javascript:void(null)">Not=EDcias=20
                              Frescas</A></B></TD>
                            <TD vAlign=3Dcenter align=3Dleft><INPUT=20
                              class=3DcssWAMstandardEdit=20
                              id=3D__WAMFinder_dbo_noticiasFrescas=20
                              title=3D"Introduza a data ou t=EDtulo da =
not=EDcia"=20
                              style=3D"WIDTH: 128px; TEXT-ALIGN: left" =
tabIndex=3D0=20
                              name=3D__WAMFinder_dbo_noticiasFrescas=20
                              label=3D"Not=EDcias =
Frescas"></TD></FORM></TR></TBODY></TABLE>
                        <SCRIPT language=3DJavaScript>=0A=
<!--=0A=
function __WAMFinder_CreateFinderFor___WAMFinder_dbo_noticiasFrescas(){=0A=
	objWF__WAMFinder_dbo_noticiasFrescas =3D new WAMFinder('dbo', =
'noticiasFrescas', new Array('data', 'titulo'), '');=0A=
	objWF__WAMFinder_dbo_noticiasFrescas._customRow =3D false;=0A=
	objWF__WAMFinder_dbo_noticiasFrescas._customList =3D false;=0A=
}=0A=
function objWF__WAMFinder_dbo_noticiasFrescas_onKeyPress(){=0A=
	if (event.keyCode =3D=3D 13 || event.keyCode =3D=3D 3)=0A=
		objWF__WAMFinder_dbo_noticiasFrescas.execute();=0A=
}=0A=
window.addToOnLoad(__WAMFinder_CreateFinderFor___WAMFinder_dbo_noticiasFr=
escas);=0A=
=0A=
//-->=0A=
</SCRIPT>
                      =
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
            <SCRIPT language=3DJavaScript=20
            =
src=3D"http://interno.cvrvv.pt/eVerde/WAMLibrary/ClientJavaScript.js.asp?=
wfld=3D1&amp;wf=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:13:20:917</SPAN></BODY></HTML>

------=_NextPart_000_005C_01C276BF.C8C7E5D0
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_005C_01C276BF.C8C7E5D0
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_005C_01C276BF.C8C7E5D0
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_005C_01C276BF.C8C7E5D0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://interno.cvrvv.pt/eVerde/WAMLibrary/ClientJavaScript.js.asp?wfld=1&wf=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);
function __WAMField_OnFocus_TEXT_TEXTAREA(){
	this.select();
}

function __WAMField_OnBlur_TEXT_TEXTAREA(){
	var newVal =3D validateGeneric(this.wfdataType, this.wfdomain, =
this.value, this.wflength, this.wfprecision, this.wfscale);
	if (newVal !=3D invalidValue()){
		this.value =3D newVal;
	} else {
		Error.setMacro('F', this.label);
		Error.setFocusTo(this);
		Error.catchErrors();
		return false;
	}
}

function __WAMField_OnClick_RADIO(){
	if (this._checked =3D=3D true) this.checked =3D false;
}

function __WAMField_OnMouseDown_RADIO(){
	this._checked =3D this.checked;
}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 Declarativa 2000. All Rights Reserved.
//***********************************************************************=
*/
// WAMFinder Object (Client Side)
//***********************************************************************=
*/
function WAMFinder(strSchema, strTable, arColumns, strSequence){
	if (typeof(strTable) =3D=3D "string" && strTable !=3D ""){
		return new _WAMFinder(strSchema, strTable, arColumns, strSequence);
	}
	// --- No object was created
	return null;
}

function _WAMFinder(strSchema, strTable, arColumns, strSequence){
	if (typeof(_WAMFinderPrototypeCalled) =3D=3D "undefined")
		_WAMFinder__Prototype();

	// --- Properties
	this.schema =3D strSchema;
	this.table =3D strTable;
	this.sequence =3D strSequence;
=09
	// --- Collections
	this.columns =3D arColumns;

	this._setHTMLEl();
}

function _WAMFinder__Prototype(){
	_WAMFinderPrototypeCalled =3D true;
=09
	// --- Properties
	_WAMFinder.prototype.schema =3D null;
	_WAMFinder.prototype.table =3D null;
	_WAMFinder.prototype.sequence =3D null;
	_WAMFinder.prototype.HTMLEl =3D null;
	_WAMFinder.prototype.advancedSearchURL =3D =
WAMRootURL+"WAMLibrary/Criterion/criterion.asp";

	// --- Methods
	_WAMFinder.prototype.execute =3D _WAMFinder_execute;
	_WAMFinder.prototype.getHTMLEl =3D _WAMFinder_getHTMLEl;
	_WAMFinder.prototype.getSequence =3D _WAMFinder_getSequence;
	_WAMFinder.prototype.openRow =3D _WAMFinder_openRow;
	_WAMFinder.prototype.openList =3D _WAMFinder_openList;
	_WAMFinder.prototype.advancedSearch =3D _WAMFinder_advancedSearch;

	// --- Private Methods
	_WAMFinder.prototype._setHTMLEl =3D _WAMFinder__setHTMLEl;
	_WAMFinder.prototype._getPageName =3D _WAMFinder__getPageName;

	// --- Private Properties
	_WAMFinder.prototype._customRow =3D false;
	_WAMFinder.prototype._customList =3D false;
=09
	// --- START --- Methods implementation
	function _WAMFinder_execute(){
		var objAE; var qs;
		if (this.getHTMLEl().value !=3D ""){
			qs =3D "__wfs=3D"+encodeURL(this.schema)+
				"&__wft=3D"+encodeURL(this.table)+
				"&__wfc=3D"+encodeURL(this.columns.join(","))+
				"&__wfv=3D"+encodeURL(this.getHTMLEl().value)+
				"&__wfseq=3D"+encodeURL(this.getSequence());
			objAE =3D new ASPExecute();
			objAE.setURL(WAMRootURL+"WAMLibrary/Finder/finder.asp?"+qs);
			objAE.execute();
		}
	}

	function _WAMFinder_openRow(qs){
		window.openChild(WAMRootURL+this._getPageName("ROW")+qs, =
WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMFinder_openList(qs){
		window.openChild(WAMRootURL+this._getPageName("LIST")+qs, =
WinFeatures(0, 0, 'no', 'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMFinder_advancedSearch(){
		var qs =3D "?__wamList=3D"+encodeURL(this.schema+"."+this.table)+"&"+
			"__wamListType=3DLIST&"+
			"__wamEditTable=3D"+encodeURL(this.schema+"."+this.table)+"&"+
			"wcAction=3Dnew";
		window.openChild(this.advancedSearchURL+qs, WinFeatures(0, 0, 'no', =
'no', 'no', 'yes', 'no', 'yes', 'yes'));
	}

	function _WAMFinder_getHTMLEl(){
		return this.HTMLEl;
	}

	function _WAMFinder_getSequence(){
		return this.sequence;
	}
	// --- END --- Methods implementation

	// --- START --- Private methods implementation
	function _WAMFinder__setHTMLEl(){
		this.HTMLEl =3D =
eval("window.document.__frmWAMFinder_"+this.schema+"_"+this.table+".__WAM=
Finder_"+this.schema+"_"+this.table);
	}

	function _WAMFinder__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
}
//***********************************************************************=
*/
// 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_005C_01C276BF.C8C7E5D0--

