	function htmlentities(html)  {
		html = html.replace("&lt;", '<');
		html = html.replace("&gt;", '>');
		html = html.replace("&quot;", '"');
		html = html.replace("&amp;", '&');
		return html;
	}
				
	function trim( str, charlist ) { 
		charlist = !charlist ? ' ' : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');
		var re = new RegExp('^[' + charlist + ']+|[' + charlist + ']+$', 'g');
		return str.replace(re, '');
	}
	
	function implode( glue, pieces ) {
		return ( ( pieces instanceof Array ) ? pieces.join ( glue ) : pieces );
	}

	function is_array(obj) {
		if (obj.constructor.toString().indexOf("Array") == -1){
	    	return false;
		}else{
	    	return true;
		}
	}

