
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

	function setBorder( name, bord )
	{
		name.style.border	= bord;
	}

	function setBorderId( id, bord )
	{
		var	elem	= document.getElementById( id );
		elem.style.border	= bord;
	}
	
	function setOpacity( itm, degree )
	{
		itm.style.opacity	= degree;
		itm.style.filter 	= "alpha(opacity=" + (degree * 100) + ")";
		if ( itm.style.filters )
			itm.style.filters.alpha.opacity	= (degree * 100);
	}

