/*
Description:	Information/Validation for Radio Input, in the form of
						<input type="radio">
Author:			Tim Chan
Version:		1.0
Date:			6 May 2004
Specification:	Javascript v1.2
				Netscape 4+
				Explorer 4+
Feature:		First version.
*/

function FormInputRadio(){
  return FormInputRadio();
}

FormInputRadio.hasValue = function(obj) {
  if(Expression.isBlank(obj.value) || !obj.checked) return false;
	return true;
}
  
FormInputRadio.isDecimal = function(obj) {
  if(obj.checked)
    return Expression.isDecimal(obj.value);
  return true;
}
  
FormInputRadio.isPositive = function(obj) {
  if(obj.checked)
	return Expression.isPositive(obj.value);
  return true;
}
	
FormInputRadio.isInteger = function(obj) {
  if(obj.checked)
	return Expression.isInteger(obj.value);
  return true;
}

FormInputRadio.isEmail = function(obj) {
  if(obj.checked)
    return Expression.isEmail(obj.value);
  return true;
}
  
FormInputRadio.isPostcode = function(obj) {
  if(obj.checked)
    return Expression.isPostcode(obj.value);
  return true;
}

FormInputRadio.isExpression = function(obj, expr) {
  if(obj.checked)
    return Expression.isExpression(obj.value, expr);
  return true;
}

FormInputRadio.putValue = function(obj, value) {
  if(obj.value == value) obj.checked = true;
}

