/*
Copyright 2005 Speartek, Inc.

All rights reserved.

All materials contained in this file are protected by United States copyright law
and may not be reproduced, distributed, transmitted, displayed, published or
broadcast without the prior written permission of Speartek, Inc.
You may not alter or remove this notice.
*/
function ValidateCFM(tags) {
    var IsValid;
    for (var i = 0; i < arguments.length; i++) {
        if (document[ARYFORM[0]][arguments[i]].value.length == 0) {
            IsValid = false;
            alert(ARYFORM[i + 1] + ' is required, please enter a value.');
            document[ARYFORM[0]][arguments[i]].focus();
            break;
        }
        else {
            IsValid = true;
        }
    }
    return IsValid;

}

function CFMTextAreaCounter(INtagTextArea, INtagCountField) {
    var lngMaxLength = 255
    if (INtagTextArea.value.length > lngMaxLength) {
        INtagTextArea.value = INtagTextArea.value.substring(0, lngMaxLength - 1);
        alert('The maximum length for this field is ' + lngMaxLength.toString() + '.');
        INtagTextArea.focus();
        return false;
    }
}