String.prototype.trim = function()
{
	return( this.replace(/(^\s+)|(\s+$)/g, "") );
}

String.prototype.isEmail = function()
{
	return( /.*@.*\..+/.test(this) );
}

var isDOM = typeof document.addEventListener != "undefined";

function getCommonEvent(e)
{
	var obj = e;
	
	if ( !isDOM )
	{
		obj.layerX = e.offsetX;
		obj.layerY = e.offsetY;
		obj.target = e.srcElement;
		obj.stopPropagation = function() { event.cancelBubble = true; }
	}
	
	return( obj );
}

/*window.onload = function()
{
	var body_content = document.getElementById("body_content");
	var quote_img = document.getElementById("quote");
	
	if (body_content.offsetHeight < quote_img.offsetHeight + 10)
		body_content.style.height = (quote_img.offsetHeight + 10) +"px";
}*/