//var arrCountry = new Array();
//var arrState = new Array();

function validateRegisterForm(frm)
    {
    return true; //lookat

    var strTemp = new String();

    // strTemp = trim(frm.password.value);

    // if (strTemp.length < 1)
    //     {
    //    alert("Enter password.");

    //     frm.password.focus();
    //     return (false);
    //     }

    //  if (strTemp != frm.txtconfirm.value)
    //     {
    //     alert("password and Confirm password should be same.");

    //     frm.txtconfirm.focus();
    //     return (false);
    //     }

    //  strTemp = trim(frm.txtfirstname.value);

    //  if (strTemp.length < 1)
    //      {
    //      alert("Enter First name.");

    //       frm.txtfirstname.focus();
    //       return (false);
    //       }

    //   strTemp = trim(frm.txtlastname.value);

    //   if (strTemp.length < 1)
    //      {
    //      alert("Enter Last name.");

    //      frm.txtlastname.focus();
    //      return (false);
    //      }

    strTemp = trim(frm.txtcompany.value);

    if (strTemp.length < 1)
        {
        alert("Enter Company name.");

        frm.txtcompany.focus();
        return (false);
        }

    strTemp = trim(frm.txtadd1.value);

    if (strTemp.length < 1)
        {
        alert("Enter address_street.");

        frm.txtadd1.focus();
        return (false);
        }

    strTemp = trim(frm.txtcity.value);

    if (strTemp.length < 1)
        {
        alert("Enter city.");

        frm.txtcity.focus();
        return (false);
        }

    if (frm.region_to.value != "1")
        {
        if (frm.txtstate.value != "0")
            {
            alert("Select \'Other\' from State.");

            return (false);
            }

        strTemp = trim(frm.txtstate2.value);

        if (strTemp.length < 1)
            {
            alert("Enter your state name.");

            frm.txtstate2.focus();
            return (false);
            }
        }

    else
        {
        if (frm.txtstate.value == "0")
            {
            alert("Select State from list.");

            frm.txtstate.focus();
            return (false);
            }
        }

    //strTemp = trim(frm.email.value);

    //if (strTemp.length > 1)
    //    {
    //    if (!(emailCheck(frm.email.value)))
    //        {
    //        frm.email.focus();

    //        return (false);
    //        }
    //    }

    return (true);
    }

function validateContactForm2222(frm)
    {
    var strTemp = new String();

    strTemp = trim(frm.txtemail.value);

    if (strTemp.length < 1)
        {
        alert("Enter email.");

        frm.txtemail.focus();
        return (false);
        }

    if (strTemp.length > 1)
        {
        if (!(emailCheck(frm.txtemail.value)))
            {
            frm.txtemail.focus();

            return (false);
            }
        }

    return (true);
    }

function Region_onchange2222(frm)
    {
    var intIndex;

    var intIncrement;

    intIncrement = frm.country_to.length;

    for (intIndex = intIncrement; intIndex >= 0; intIndex--)
        {
        frm.country_to.remove(intIndex);
        }

    intIncrement = 0;

    for (intIndex = 0; intIndex < arrCountry.length; intIndex++)
        {
        if (arrCountry[intIndex][0] == frm.region_to.value)
            {
            tempOpt = new Option(arrCountry[intIndex][2], arrCountry[intIndex][1]);

            frm.country_to.options[intIncrement++] = tempOpt;
            }
        }

    if (intIncrement == 0)
        {
        var tempOpt = new Option("    ", 0);

        frm.country_to.options[0] = tempOpt;
        }

    Country_onchange(frm);
    }

function Country_onchange2222(frm)
    {
    var intIndex;

    var intIncrement;
    intIncrement = frm.txtstate.length;

    for (intIndex = intIncrement; intIndex >= 0; intIndex--)
        {
        frm.txtstate.remove(intIndex);
        }

    intIncrement = 0;

    for (intIndex = 0; intIndex < arrState.length; intIndex++)
        {
        if (arrState[intIndex][0] == frm.country_tototo.value)
            {
            tempOpt = new Option(arrState[intIndex][2], arrState[intIndex][1]);

            frm.txtstate.options[intIncrement++] = tempOpt;
            }
        }

    if (intIncrement == 0)
        {
        var tempOpt = new Option("    ", 0);

        frm.txtstate.options[0] = tempOpt;
        }
    }

//***********************************************************************************************

function validateLoginForm(frm)
    {
    var strTemp = new String();

    strTemp = trim(frm.email.value);

    if (strTemp.length < 1)
        {
        alert("Enter email.");

        frm.email.focus();
        return (false);
        }

    strTemp = trim(frm.password.value);

    if (strTemp.length < 1)
        {
        alert("Enter password.");

        frm.password.focus();
        return (false);
        }

    strTemp = trim(frm.email.value);

    if (strTemp.length > 1)
        {
        if (!(emailCheck(frm.email.value)))
            {
            frm.email.focus();

            return (false);
            }
        }

    return (true);
    }

function validateBillingForm(frm)
    {
    if (frm.same_as_main.checked)
        { // will use main billing address
        return;
        }

    var strTemp = new String();

    strTemp = trim(frm.txtadd1.value);

    if (strTemp.length < 1)
        {
        alert("Enter address_street.");

        frm.txtadd1.focus();
        return (false);
        }

    strTemp = trim(frm.txtcity.value);

    if (strTemp.length < 1)
        {
        alert("Enter city.");

        frm.txtcity.focus();
        return (false);
        }

    if (frm.region_to.value != "1")
        {
        if (frm.selState.value != "0")
            {
            alert("Select \'Other\' from State.");

            return (false);
            }

        strTemp = trim(frm.txtstate2.value);

        if (strTemp.length < 1)
            {
            alert("Enter your state name.");

            frm.txtstate2.focus();
            return (false);
            }
        }

    else
        {
        if (frm.selState.value == "0")
            {
            alert("Select State from list.");

            frm.selState.focus();
            return (false);
            }
        }

    return (true);
    }

function changeListingBox(frm)
    {
    if (frm.seluser_type.value == 2)
        {
        frm.txtbussbrief.value = "";

        frm.txtbussbrief.disabled = true;
        }

    else
        frm.txtbussbrief.disabled = false;

    return (true);
    }

function validateForgotForm(frm)
    {
    var strTemp = new String();

    strTemp = trim(frm.email.value);

    if (strTemp.length < 1)
        {
        alert("Enter email address");

        frm.email.focus();
        return (false);
        }

    strTemp = trim(frm.email.value);

    if (strTemp.length > 1)
        {
        if (!(emailCheck(frm.email.value)))
            {
            frm.email.focus();

            return (false);
            }
        }

    return (true);
    }

    function validatepassword(frm) {

        if (!checkText( frm, 'old_pass', "Enter your current password" )) return false;
        if (!checkText( frm, 'new_pass', "Enter your new password" )) return false;
        if (!checkText( frm, 'confirm_pass', "Enter your new password again to confirm" )) return false;
        if (!checkTextsMatch( frm, 'new_pass', 'confirm_pass', "New password and confirm password did not match" )) return false;
    }


