var allowDefault = false;
var formchecks = new Array();

function notDefault(el)
{
    if(allowDefault !== undefined && allowDefault == true)
    {
        return true;
    }
    if(el.defaultValue != el.value) {
        return true;
    }
    else {
        el.errors.push(el.name + ' is required.');
        return false;
    }
}

function clearme(formfield)
{
    if (formfield.defaultValue==formfield.value)
        formfield.value = "";
}

function unclearme(formfield)
{
    if(formfield.value=='')
    {
        formfield.value = formfield.defaultValue;
    }
}

function highlightme(formfield)
{
    if (formfield.defaultValue==formfield.value)
        formfield.select();
}

function alwayshighlightme(formfield)
{
    formfield.select();
}


window.addEvent('domready',function()
{

    $$('.formcheck').each(function(e)
    {
        var fc = new FormCheck(e, {
            display: {
                showErrors: 1,
                indicateErrors: 1,
                tipsOffsetY: -47
            }
        });

        if(e.getProperty('id') != null)
        {
            formchecks[e.getProperty('id')] = fc;
        }

    });



    $$('a[href$=faq]').each(function(e)
{
    e.setProperty('onclick', "window.open(this.href,'Live Chat','width=257,height=610,scrollbars=no,resizable=no,toolbar=no,location=no,directories=yes,status=no,menubar=no'); return false");
});



});