﻿<!--
/*
//::|ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññ|                        ~ A R I E L   P R O D U C T I O N S ~                     |ññ|::
//::|ññ|                               ~ ALL RIGHTS RESERVED ~                            |ññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññ| ~ PROGRAM DATA ~                                                      /--------/ |ññ|::
//::|ññ|                                                                     /--------/ | |ññ|::
//::|ññ| PROGRAMMER:: James Dougherty                                        | |      | | |ññ|::
//::|ññ| COPYRIGHT :: ©2008 Ariel Productions                                | |      | | |ññ|::
//::|ññ| TYPE      :: N/A                                                    | /------|-/ |ññ|::
//::|ññ|                                                                     /--------/   |ññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññ| ~ SOURCE DATA ~                                                                  |ññ|::
//::|ññ|                                                                                  |ññ|::
//::|ññ| FILENAME :: APINC_Watermark.js                                                   |ññ|::
//::|ññ| VERSION  :: 1.0                                                                  |ññ|::
//::|ññ|                                                                                  |ññ|::
//::|ññ| HISTORY DATA                                                                     |ññ|::
//::|ññ| |                                                                                |ññ|::
//::|ññ| |-N/A                                                                            |ññ|::
//::|ññ| |                                                                                |ññ|::
//::|ññ|                                                                                  |ññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññ| This program is Copyright ©2008 Ariel Productions (James Dougherty). This        |ññ|::
//::|ññ| program is not in the public domain, therefore, it is not open source and all	  |ññ|::
//::|ññ| copyrights remain intact. This program constitutes proprietary information and   |ññ|::
//::|ññ| trade secrets of Ariel Productions, Ashland, Ohio. This program or any part of   |ññ|::
//::|ññ| this program may not be copied, sold, rented, leased, given, assigned, or        |ññ|::
//::|ññ| otherwise made available to any other individual or organization without the     |ññ|::
//::|ññ| written consent of Ariel Productions. Also, no part of this unpublished work may |ññ|::
//::|ññ| be reproduced, transmitted, or stored in a retrieval system. Nor can this        |ññ|::
//::|ññ| program be translated into any human or computer language in any form or by any  |ññ|::
//::|ññ| means electronically, mechanically, magnetically, optically, chemically, manual  |ññ|::
//::|ññ| or otherwise without the written permission of the copyright owner               |ññ|::
//::|ññ| (Ariel Productions). Contact information is listed below for more information.   |ññ|::
//::|ññ|                                                                                  |ññ|::
//::|ññ| Ariel Productions                                                                |ññ|::
//::|ññ| James Dougherty                                                                  |ññ|::
//::|ññ| jdougherty@arielproductions.com                                                  |ññ|::
//::|ññ|                                                                                  |ññ|::
//::|ññ ---------------------------------------------------------------------------------- ññ|::
//::|ññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññññ|::
*/
function APWM_ProcessFields(strAction)
{
    if(strAction != "Init" && strAction != "Reset" && strAction != "Clear")
    {
        return;
    }

    for(intFormID = 0; intFormID < document.forms.length; intFormID++)
    {
        for(intFieldID = 0; intFieldID < document.forms[intFormID].elements.length; intFieldID++)
        {
            var objElement = document.forms[intFormID].elements[intFieldID];
            if((objElement.type == "text" || objElement.type == "textarea") &&
                objElement.WM != "" && objElement.WM != undefined)
            {
                switch(strAction)
                {
                    case "Init":
                      objElement.value = objElement.WM;
                      objElement.onfocus = function(){ APWM_Enter(); }
                      objElement.onblur = function(){ APWM_Leave(); }
                      objElement.style.color = ((objElement.WMC == undefined) ? "#D0D0D0" : objElement.WMC);
                      break;

                    case "Reset":
                      if(objElement.value.replace(/^\s+|\s+$/g, "") == "" && objElement.value != objElement.WM)
                      {
                          objElement.value = objElement.WM;
                      }
                      break;

                    case "Clear":
                      if(objElement.value == objElement.WM)
                      {
                          objElement.value = "";
                      }
                      break;
                }
                
            }
        }
    }
}
function APWM_Enter()
{
    var objElement = event.srcElement;
    objElement.style.color = ((objElement.NMC == undefined) ? "#000000" : objElement.NMC);

    if(objElement.value == objElement.WM)
    {
        objElement.value = "";
    }
}
function APWM_Leave()
{
    var objElement = event.srcElement;
    objElement.style.color = ((objElement.NMC == undefined) ? "#000000" : objElement.NMC);

    if(objElement.value.replace(/^\s+|\s+$/g, "") == "")
    {
        objElement.value = objElement.WM;
        objElement.style.color = ((objElement.WMC == undefined) ? "#D0D0D0" : objElement.WMC);
    }
}
-->
