// JavaScript Document

String.prototype.trim = function() {
	return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"");
};

String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}

String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

function contentValidate(myForm){
	if(myForm.elements['name'].value.trim() == ""){
		myForm.elements['name'].focus();
		alert("You must provide a name before you can save this content.");
		return false;
	}
}