﻿// JScript File


/* 
    Usage:
    <asp:TextBox ID="txtDescription" MaxLength="500" runat="server" TextMode="MultiLine" onkeypress="return isMaxLength(this, 500)" ></asp:TextBox>
*/
function isMaxLength(txtBox, max) 
{
    if(txtBox) 
    { 
        return ( txtBox.value.length <= max);
    }
}
function isMaxWord(txtBox2, max2) 
{
    var arrWord = new Array(max2);
    if(txtBox2) 
    { 
        arrWord = txtBox2.value.split(" ");
        if(arrWord.length > max2){return false;}
        else{return true;}
    }
}