    function URLEncode(string){
	    return encodeURIComponent(string);
    }

    function URLDecode(string){
       return decodeURIComponent(string);
    }

    function HTMLDecode(string){
       var plaintext = string
   	    plaintext = plaintext.replace(/&lt;/g, "<");
   	    plaintext = plaintext.replace(/&gt;/g, ">");
   	    plaintext = plaintext.replace(/&pound;/g, "£");
   	    plaintext = plaintext.replace(/&amp;/g, "&");
   	    plaintext = plaintext.replace(/&nbsp;/g, " ");
   	    plaintext = plaintext.replace(/<br>/g, "\r");
   	    plaintext = plaintext.replace(/<BR>/g, "\r");
       return plaintext;
    }
	
	function HTML_Decode(string){
		var re = /(<br([^>]*)>)/gi;
		string=string.replace(re, "\n")
		string=string.replace("&amp", "&")
		
		return string;
	}
	
	function HTML_Encode(string){
		string=string.replace("\n", "<br />")
		string=string.replace("&", "&amp")
		
		return string;
	}
	
	function HTML_Remove(string) {
		var re = /(<([^>]+)>)/gi;
		string=string.replace(re, "")
		
		return string;
	}