/*
Description:	Information/Validation for Textarea Input, in the form of
						<textarea></textarea>
Author:			Tim Chan
Version:		1.0
Date:			6 May 2004
Specification:	Javascript v1.2
				Netscape 4+
				Explorer 4+
Feature:		First version.
Next Feature:	Need to fix the validation so it can ignore/stripe whitespace?
				I think this could goes the same for other input as well.
				Need to fix the linefeed as well
*/

function FormTextArea(){
  return FormTextArea();
}

FormTextArea.hasValue = function(obj) {
  if(Expression.isBlank(obj.value)) return false;
	return true;
}
  
FormTextArea.isDecimal = function(obj) {
  return Expression.isDecimal(obj.value) || 
  		 Expression.isBlank(obj.value);
}
  
FormTextArea.isPositive = function(obj) {
  return Expression.isPositive(obj.value) ||
	  	 Expression.isBlank(obj.value);
}
	
FormTextArea.isInteger = function(obj) {
  return Expression.isInteger(obj.value) ||
	     Expression.isBlank(obj.value);
}

FormTextArea.isEmail = function(obj) {
  return Expression.isEmail(obj.value) ||
	     Expression.isBlank(obj.value);
}
  
FormTextArea.isPostcode = function(obj) {
  return Expression.isPostcode(obj.value) ||
	 	 Expression.isBlank(obj.value);
}

FormTextArea.isExpression = function(obj, expr) {
  return Expression.isExpression(obj.value, expr) ||
	 	 Expression.isBlank(obj.value);
}

FormTextArea.putValue = function(obj, value) {
  if(value != "") obj.value = value;
}
