<!--
//***************************************************************************
//   Empower Mobility LLC, Essex Junction, Vermont 05452
//   Copyright © 2001-08, All Rights Reserved.
//***************************************************************************
//
// FILE:        emWeb.js
// AUTHOR:      Tom Jaros
// NOTICE:      Copyright Notice
//
//              This software, 'emWeb.js', is provided 'AS-IS' and without any express or 
//              implied warranty.  In no event will the author or Empower Mobility LLC
//              be held liable for any damages arising from the use of this software.
//              
//              This software must not be modified or redistributed without prior written 
//              approval by the author or an authorized agent of Empower Mobility LLC.  All
//              bug fixes or enhancements will be performed by Empower Mobility LLC unless
//              otherwise noted.
//
//              Usage is also subject to the following conditions:
//
//              1. The origin of this software must not be misrepresented; you must not
//                 claim that you wrote the original software. 
//
//              2. This notice may not be removed or altered from any source distribution.
//
//***************************************************************************
var gNav_Labels =           ['Home', 'Products', 'Services', 'Company', 'Support', 'Blog'];
var gSubNav_Labels =        [   
                                [],
                                ['Seymour', 'PocketMoney&reg;', 'In The Works'],
                                [],
                                ['About', 'Showcase', 'Press', 'Contacts'],
                                [],
                                ['http://blog.empowermobility.com'],                                
                            ];
var gsCompanyName =         'Empower Mobility LLC';
var gsCompanyURL =          '';
var gCustomerSelectedi =    0;
//***************************************************************************
if (document.location.protocol != "file:")
{
	gsCompanyURL = 'http://www.empowermobility.com';
}
else
{
	gsCompanyURL = './index.html';
}	
//***************************************************************************
function WebSubmitOnChange(obj)
{
    var listObj, 
        newOpt,
        i, 
        verArray;

    listObj = obj.form.version;
    while (listObj.options.length)
    {
        listObj.remove(0);
    }

    switch(obj.options[obj.selectedIndex].text)
    {
        case "General Inquiry":
            verArray = new Array("", "Product Idea", "Question", "Other");
            break;
        case "Seymour":
            verArray = new Array("", "1.5.6", "1.5.5", "1.5.4", "1.5.3", "1.5.2", "1.5.1", "1.5", "Unknown");
            break;
    }
    
    for (i = 0; i < verArray.length; i++)
    {
        newOpt = document.createElement("option");
        newOpt.value = i;
        newOpt.text = verArray[i];
        if (ie4)
        {
            listObj.add(newOpt);
        }
        else
        {
            listObj.add(newOpt, null);
        }
    }

    listObj.options[0].selected = true;
}
//***************************************************************************
function WebResetErrorReport(obj)
{
    var newOpt, listObj;

    listObj = obj.version;
    while (listObj.options.length)
    {
        listObj.remove(0);
    }

    newOpt = document.createElement("option");
    newOpt.text = "";
    listObj.add(newOpt);

    return(true);
}
//***************************************************************************
function WebSubmitErrorReport(obj)
{
    var i, elArray, el, s, bOK, bSkip, bFirstTime, sName, sValue;

    elArray = obj.form.elements;
    bOK = true;

    s = "http://www.empowermobility.com/cgi-local/em_rp.pl";
    bFirstTime = true;

    for (i = 0; (bOK == true) && (i < elArray.length); i++)
    {
        bOK = true;
        bSkip = false;

        el = elArray[i];
        sValue = "";
        sName = el.name;

        switch(el.type)
        {
            case "text":
            case "textarea":
                sValue = el.value;
                break;
            case "select-one":
                sValue = el.options[el.selectedIndex].text;
                break;
            default:
                bSkip = true;
                break;
        }

        if (bSkip == false)
        {
            bOK = (sName == "emailAddress") ? true : !(sValue.length == 0);
            if (bOK)
            {
                s = s + (bFirstTime ? "?" : "&") + sName + "=" + sValue;
                bFirstTime = false;
            }
        }
    }

    if (bOK)
    {
        var obj;

        obj = WebToolsGetObject("web_content_center_hidden");
        if (obj != null)
        {
            obj.src = s;
        }
    }
    else
    {
        alert("Please be sure to fill out the red colored fields.");
    }
}
//***************************************************************************
function WebCustomerSelect(i)
{
    WebOpenRawLink("p_3_1_" + String(i) + ".html");
}
//***************************************************************************
-->
