﻿// JScript File
var FormHelper = 
{
	IsChecked: function(field, message)
	{
		if (!$(field).checked)
		{
			alert(message);
			return false;
		}
		return true;
	}
}

// Give string object the trim method.
String.prototype.trim = function()
{
	return( this.replace(new RegExp("^([\\s]+)|([\\s]+)$", "gm"), "") );
}
 
// Give string object the left trim method.
String.prototype.leftTrim = function()
{
	return( this.replace(new RegExp("^[\\s]+", "gm"), "") );
}
 
// Give string object the right trim method.
String.prototype.rightTrim = function()
{
	return( this.replace(new RegExp("[\\s]+$", "gm"), "") );
}