String.prototype.trim = function()
{
	return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1");
};

String.prototype.propercase = function()
{
	return this.substr(0,1).toUpperCase() + this.substr(1);
};

function CheckFields()
{
	//make sure fields were supplied
	var fields = ['name','address','city','state','zip','email'];
	for (var j=0; j < fields.length; j++)
	{
		field = document.getElementById(fields[j]);
		if (field.value.trim() == '')
		{
			alert("Please enter your " + fields[j] + ".");
			return false;
		}
	}
	return true;
}
