function getallenonly(e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	
	if (((keycode < 48 && keycode != 45 && keycode != 46) || keycode > 57) && keycode != 8)
	
	return false
}

function numbersonly(e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	
	if (((keycode < 48 && keycode != 45) || keycode > 57) && keycode != 8)
	return false
}

// HTML entities Encode
var htmlchr_decode = new Array(239);
var htmlchr_encode1 = new Array(239);
var htmlchr_encode2 = new Array(239);
htmlchr_decode[0] = "?'"; //apostrophe 
htmlchr_encode1[0] = "&#39;"; //apostrophe 
htmlchr_encode2[0] = "&apos;"; //apostrophe 
htmlchr_decode[1] = "<"; //less-than
htmlchr_encode1[1] = "&#60;"; //less-than
htmlchr_encode2[1] = "&lt;"; //less-than
htmlchr_decode[2] = ">"; //greater-than
htmlchr_encode1[2] = "&#62;"; //greater-than
htmlchr_encode2[2] = "&gt;"; //greater-than
htmlchr_decode[3] = " "; //non-breaking space
htmlchr_encode1[3] = "&nbsp;"; //non-breaking space
htmlchr_encode2[3] = "&nbsp;"; //non-breaking space
htmlchr_decode[4] = "¡"; //inverted exclamation mark
htmlchr_encode1[4] = "&#161;"; //inverted exclamation mark
htmlchr_encode2[4] = "&iexcl;"; //inverted exclamation mark
htmlchr_decode[5] = "¢"; //cent
htmlchr_encode1[5] = "&#162;"; //cent
htmlchr_encode2[5] = "&cent;"; //cent
htmlchr_decode[6] = "£"; //pound
htmlchr_encode1[6] = "&#163;"; //pound
htmlchr_encode2[6] = "&pound;"; //pound
htmlchr_decode[7] = "¤"; //currency
htmlchr_encode1[7] = "&#164;"; //currency
htmlchr_encode2[7] = "&curren;"; //currency
htmlchr_decode[8] = "¥"; //yen
htmlchr_encode1[8] = "&#165;"; //yen
htmlchr_encode2[8] = "&yen;"; //yen
htmlchr_decode[9] = "¦"; //broken vertical bar
htmlchr_encode1[9] = "&#166;"; //broken vertical bar
htmlchr_encode2[9] = "&brvbar;"; //broken vertical bar
htmlchr_decode[10] = "§"; //section
htmlchr_encode1[10] = "&#167;"; //section
htmlchr_encode2[10] = "&sect;"; //section
htmlchr_decode[11] = "¨"; //spacing diaeresis
htmlchr_encode1[11] = "&#168;"; //spacing diaeresis
htmlchr_encode2[11] = "&uml;"; //spacing diaeresis
htmlchr_decode[12] = "©"; //copyright
htmlchr_encode1[12] = "&#169;"; //copyright
htmlchr_encode2[12] = "&copy;"; //copyright
htmlchr_decode[13] = "ª"; //feminine ordinal indicator
htmlchr_encode1[13] = "&#170;"; //feminine ordinal indicator
htmlchr_encode2[13] = "&ordf;"; //feminine ordinal indicator
htmlchr_decode[14] = "«"; //angle quotation mark [left]
htmlchr_encode1[14] = "&#171;"; //angle quotation mark [left]
htmlchr_encode2[14] = "&laquo;"; //angle quotation mark [left]
htmlchr_decode[15] = "¬"; //negation
htmlchr_encode1[15] = "&#172;"; //negation
htmlchr_encode2[15] = "&not;"; //negation
htmlchr_decode[16] = "­"; //soft hyphen
htmlchr_encode1[16] = "&#173;"; //soft hyphen
htmlchr_encode2[16] = "&shy;"; //soft hyphen
htmlchr_decode[17] = "®"; //registered trademark
htmlchr_encode1[17] = "&#174;"; //registered trademark
htmlchr_encode2[17] = "&reg;"; //registered trademark
htmlchr_decode[18] = "¯"; //spacing macron
htmlchr_encode1[18] = "&#175;"; //spacing macron
htmlchr_encode2[18] = "&macr;"; //spacing macron
htmlchr_decode[19] = "°"; //degree
htmlchr_encode1[19] = "&#176;"; //degree
htmlchr_encode2[19] = "&deg;"; //degree
htmlchr_decode[20] = "±"; //plus-or-minus 
htmlchr_encode1[20] = "&#177;"; //plus-or-minus 
htmlchr_encode2[20] = "&plusmn;"; //plus-or-minus 
htmlchr_decode[21] = "²"; //superscript 2
htmlchr_encode1[21] = "&#178;"; //superscript 2
htmlchr_encode2[21] = "&sup2;"; //superscript 2
htmlchr_decode[22] = "³"; //superscript 3
htmlchr_encode1[22] = "&#179;"; //superscript 3
htmlchr_encode2[22] = "&sup3;"; //superscript 3
htmlchr_decode[23] = "´"; //spacing acute
htmlchr_encode1[23] = "&#180;"; //spacing acute
htmlchr_encode2[23] = "&acute;"; //spacing acute
htmlchr_decode[24] = "µ"; //micro
htmlchr_encode1[24] = "&#181;"; //micro
htmlchr_encode2[24] = "&micro;"; //micro
htmlchr_decode[25] = "¶"; //paragraph
htmlchr_encode1[25] = "&#182;"; //paragraph
htmlchr_encode2[25] = "&para;"; //paragraph
htmlchr_decode[26] = "·"; //middle dot
htmlchr_encode1[26] = "&#183;"; //middle dot
htmlchr_encode2[26] = "&middot;"; //middle dot
htmlchr_decode[27] = "¸"; //spacing cedilla
htmlchr_encode1[27] = "&#184;"; //spacing cedilla
htmlchr_encode2[27] = "&cedil;"; //spacing cedilla
htmlchr_decode[28] = "¹"; //superscript 1
htmlchr_encode1[28] = "&#185;"; //superscript 1
htmlchr_encode2[28] = "&sup1;"; //superscript 1
htmlchr_decode[29] = "º"; //masculine ordinal indicator
htmlchr_encode1[29] = "&#186;"; //masculine ordinal indicator
htmlchr_encode2[29] = "&ordm;"; //masculine ordinal indicator
htmlchr_decode[30] = "»"; //angle quotation mark [right]
htmlchr_encode1[30] = "&#187;"; //angle quotation mark [right]
htmlchr_encode2[30] = "&raquo;"; //angle quotation mark [right]
htmlchr_decode[31] = "¼"; //fraction 1/4
htmlchr_encode1[31] = "&#188;"; //fraction 1/4
htmlchr_encode2[31] = "&frac14;"; //fraction 1/4
htmlchr_decode[32] = "½"; //fraction 1/2
htmlchr_encode1[32] = "&#189;"; //fraction 1/2
htmlchr_encode2[32] = "&frac12;"; //fraction 1/2
htmlchr_decode[33] = "¾"; //fraction 3/4
htmlchr_encode1[33] = "&#190;"; //fraction 3/4
htmlchr_encode2[33] = "&frac34;"; //fraction 3/4
htmlchr_decode[34] = "¿"; //inverted question mark
htmlchr_encode1[34] = "&#191;"; //inverted question mark
htmlchr_encode2[34] = "&iquest;"; //inverted question mark
htmlchr_decode[35] = "×"; //multiplication
htmlchr_encode1[35] = "&#215;"; //multiplication
htmlchr_encode2[35] = "&times;"; //multiplication
htmlchr_decode[36] = "÷"; //division
htmlchr_encode1[36] = "&#247;"; //division
htmlchr_encode2[36] = "&divide;"; //division
htmlchr_decode[37] = "À"; //capital a, grave accent
htmlchr_encode1[37] = "&#192;"; //capital a, grave accent
htmlchr_encode2[37] = "&Agrave;"; //capital a, grave accent
htmlchr_decode[38] = "Á"; //capital a, acute accent
htmlchr_encode1[38] = "&#193;"; //capital a, acute accent
htmlchr_encode2[38] = "&Aacute;"; //capital a, acute accent
htmlchr_decode[39] = "Â"; //capital a, circumflex accent
htmlchr_encode1[39] = "&#194;"; //capital a, circumflex accent
htmlchr_encode2[39] = "&Acirc;"; //capital a, circumflex accent
htmlchr_decode[40] = "Ã"; //capital a, tilde
htmlchr_encode1[40] = "&#195;"; //capital a, tilde
htmlchr_encode2[40] = "&Atilde;"; //capital a, tilde
htmlchr_decode[41] = "Ä"; //capital a, umlaut mark
htmlchr_encode1[41] = "&#196;"; //capital a, umlaut mark
htmlchr_encode2[41] = "&Auml;"; //capital a, umlaut mark
htmlchr_decode[42] = "Å"; //capital a, ring
htmlchr_encode1[42] = "&#197;"; //capital a, ring
htmlchr_encode2[42] = "&Aring;"; //capital a, ring
htmlchr_decode[43] = "Æ"; //capital ae
htmlchr_encode1[43] = "&#198;"; //capital ae
htmlchr_encode2[43] = "&AElig;"; //capital ae
htmlchr_decode[44] = "Ç"; //capital c, cedilla
htmlchr_encode1[44] = "&#199;"; //capital c, cedilla
htmlchr_encode2[44] = "&Ccedil;"; //capital c, cedilla
htmlchr_decode[45] = "È"; //capital e, grave accent
htmlchr_encode1[45] = "&#200;"; //capital e, grave accent
htmlchr_encode2[45] = "&Egrave;"; //capital e, grave accent
htmlchr_decode[46] = "É"; //capital e, acute accent
htmlchr_encode1[46] = "&#201;"; //capital e, acute accent
htmlchr_encode2[46] = "&Eacute;"; //capital e, acute accent
htmlchr_decode[47] = "Ê"; //capital e, circumflex accent
htmlchr_encode1[47] = "&#202;"; //capital e, circumflex accent
htmlchr_encode2[47] = "&Ecirc;"; //capital e, circumflex accent
htmlchr_decode[48] = "Ë"; //capital e, umlaut mark
htmlchr_encode1[48] = "&#203;"; //capital e, umlaut mark
htmlchr_encode2[48] = "&Euml;"; //capital e, umlaut mark
htmlchr_decode[49] = "Ì"; //capital i, grave accent
htmlchr_encode1[49] = "&#204;"; //capital i, grave accent
htmlchr_encode2[49] = "&Igrave;"; //capital i, grave accent
htmlchr_decode[50] = "Í"; //capital i, acute accent
htmlchr_encode1[50] = "&#205;"; //capital i, acute accent
htmlchr_encode2[50] = "&Iacute;"; //capital i, acute accent
htmlchr_decode[51] = "Î"; //capital i, circumflex accent
htmlchr_encode1[51] = "&#206;"; //capital i, circumflex accent
htmlchr_encode2[51] = "&Icirc;"; //capital i, circumflex accent
htmlchr_decode[52] = "Ï"; //capital i, umlaut mark
htmlchr_encode1[52] = "&#207;"; //capital i, umlaut mark
htmlchr_encode2[52] = "&Iuml;"; //capital i, umlaut mark
htmlchr_decode[53] = "Ð"; //capital eth, Icelandic
htmlchr_encode1[53] = "&#208;"; //capital eth, Icelandic
htmlchr_encode2[53] = "&ETH;"; //capital eth, Icelandic
htmlchr_decode[54] = "Ñ"; //capital n, tilde
htmlchr_encode1[54] = "&#209;"; //capital n, tilde
htmlchr_encode2[54] = "&Ntilde;"; //capital n, tilde
htmlchr_decode[55] = "Ò"; //capital o, grave accent
htmlchr_encode1[55] = "&#210;"; //capital o, grave accent
htmlchr_encode2[55] = "&Ograve;"; //capital o, grave accent
htmlchr_decode[56] = "Ó"; //capital o, acute accent
htmlchr_encode1[56] = "&#211;"; //capital o, acute accent
htmlchr_encode2[56] = "&Oacute;"; //capital o, acute accent
htmlchr_decode[57] = "Ô"; //capital o, circumflex accent
htmlchr_encode1[57] = "&#212;"; //capital o, circumflex accent
htmlchr_encode2[57] = "&Ocirc;"; //capital o, circumflex accent
htmlchr_decode[58] = "Õ"; //capital o, tilde
htmlchr_encode1[58] = "&#213;"; //capital o, tilde
htmlchr_encode2[58] = "&Otilde;"; //capital o, tilde
htmlchr_decode[59] = "Ö"; //capital o, umlaut mark
htmlchr_encode1[59] = "&#214;"; //capital o, umlaut mark
htmlchr_encode2[59] = "&Ouml;"; //capital o, umlaut mark
htmlchr_decode[60] = "Ø"; //capital o, slash
htmlchr_encode1[60] = "&#216;"; //capital o, slash
htmlchr_encode2[60] = "&Oslash;"; //capital o, slash
htmlchr_decode[61] = "Ù"; //capital u, grave accent
htmlchr_encode1[61] = "&#217;"; //capital u, grave accent
htmlchr_encode2[61] = "&Ugrave;"; //capital u, grave accent
htmlchr_decode[62] = "Ú"; //capital u, acute accent
htmlchr_encode1[62] = "&#218;"; //capital u, acute accent
htmlchr_encode2[62] = "&Uacute;"; //capital u, acute accent
htmlchr_decode[63] = "Û"; //capital u, circumflex accent
htmlchr_encode1[63] = "&#219;"; //capital u, circumflex accent
htmlchr_encode2[63] = "&Ucirc;"; //capital u, circumflex accent
htmlchr_decode[64] = "Ü"; //capital u, umlaut mark
htmlchr_encode1[64] = "&#220;"; //capital u, umlaut mark
htmlchr_encode2[64] = "&Uuml;"; //capital u, umlaut mark
htmlchr_decode[65] = "Ý"; //capital y, acute accent
htmlchr_encode1[65] = "&#221;"; //capital y, acute accent
htmlchr_encode2[65] = "&Yacute;"; //capital y, acute accent
htmlchr_decode[66] = "Þ"; //capital THORN, Icelandic
htmlchr_encode1[66] = "&#222;"; //capital THORN, Icelandic
htmlchr_encode2[66] = "&THORN;"; //capital THORN, Icelandic
htmlchr_decode[67] = "ß"; //small sharp s, German
htmlchr_encode1[67] = "&#223;"; //small sharp s, German
htmlchr_encode2[67] = "&szlig;"; //small sharp s, German
htmlchr_decode[68] = "à"; //small a, grave accent
htmlchr_encode1[68] = "&#224;"; //small a, grave accent
htmlchr_encode2[68] = "&agrave;"; //small a, grave accent
htmlchr_decode[69] = "á"; //small a, acute accent
htmlchr_encode1[69] = "&#225;"; //small a, acute accent
htmlchr_encode2[69] = "&aacute;"; //small a, acute accent
htmlchr_decode[70] = "â"; //small a, circumflex accent
htmlchr_encode1[70] = "&#226;"; //small a, circumflex accent
htmlchr_encode2[70] = "&acirc;"; //small a, circumflex accent
htmlchr_decode[71] = "ã"; //small a, tilde
htmlchr_encode1[71] = "&#227;"; //small a, tilde
htmlchr_encode2[71] = "&atilde;"; //small a, tilde
htmlchr_decode[72] = "ä"; //small a, umlaut mark
htmlchr_encode1[72] = "&#228;"; //small a, umlaut mark
htmlchr_encode2[72] = "&auml;"; //small a, umlaut mark
htmlchr_decode[73] = "å"; //small a, ring
htmlchr_encode1[73] = "&#229;"; //small a, ring
htmlchr_encode2[73] = "&aring;"; //small a, ring
htmlchr_decode[74] = "æ"; //small ae
htmlchr_encode1[74] = "&#230;"; //small ae
htmlchr_encode2[74] = "&aelig;"; //small ae
htmlchr_decode[75] = "ç"; //small c, cedilla
htmlchr_encode1[75] = "&#231;"; //small c, cedilla
htmlchr_encode2[75] = "&ccedil;"; //small c, cedilla
htmlchr_decode[76] = "è"; //small e, grave accent
htmlchr_encode1[76] = "&#232;"; //small e, grave accent
htmlchr_encode2[76] = "&egrave;"; //small e, grave accent
htmlchr_decode[77] = "é"; //small e, acute accent
htmlchr_encode1[77] = "&#233;"; //small e, acute accent
htmlchr_encode2[77] = "&eacute;"; //small e, acute accent
htmlchr_decode[78] = "ê"; //small e, circumflex accent
htmlchr_encode1[78] = "&#234;"; //small e, circumflex accent
htmlchr_encode2[78] = "&ecirc;"; //small e, circumflex accent
htmlchr_decode[79] = "ë"; //small e, umlaut mark
htmlchr_encode1[79] = "&#235;"; //small e, umlaut mark
htmlchr_encode2[79] = "&euml;"; //small e, umlaut mark
htmlchr_decode[80] = "ì"; //small i, grave accent
htmlchr_encode1[80] = "&#236;"; //small i, grave accent
htmlchr_encode2[80] = "&igrave;"; //small i, grave accent
htmlchr_decode[81] = "í"; //small i, acute accent
htmlchr_encode1[81] = "&#237;"; //small i, acute accent
htmlchr_encode2[81] = "&iacute;"; //small i, acute accent
htmlchr_decode[82] = "î"; //small i, circumflex accent
htmlchr_encode1[82] = "&#238;"; //small i, circumflex accent
htmlchr_encode2[82] = "&icirc;"; //small i, circumflex accent
htmlchr_decode[83] = "ï"; //small i, umlaut mark
htmlchr_encode1[83] = "&#239;"; //small i, umlaut mark
htmlchr_encode2[83] = "&iuml;"; //small i, umlaut mark
htmlchr_decode[84] = "ð"; //small eth, Icelandic
htmlchr_encode1[84] = "&#240;"; //small eth, Icelandic
htmlchr_encode2[84] = "&eth;"; //small eth, Icelandic
htmlchr_decode[85] = "ñ"; //small n, tilde
htmlchr_encode1[85] = "&#241;"; //small n, tilde
htmlchr_encode2[85] = "&ntilde;"; //small n, tilde
htmlchr_decode[86] = "ò"; //small o, grave accent
htmlchr_encode1[86] = "&#242;"; //small o, grave accent
htmlchr_encode2[86] = "&ograve;"; //small o, grave accent
htmlchr_decode[87] = "ó"; //small o, acute accent
htmlchr_encode1[87] = "&#243;"; //small o, acute accent
htmlchr_encode2[87] = "&oacute;"; //small o, acute accent
htmlchr_decode[88] = "ô"; //small o, circumflex accent
htmlchr_encode1[88] = "&#244;"; //small o, circumflex accent
htmlchr_encode2[88] = "&ocirc;"; //small o, circumflex accent
htmlchr_decode[89] = "õ"; //small o, tilde
htmlchr_encode1[89] = "&#245;"; //small o, tilde
htmlchr_encode2[89] = "&otilde;"; //small o, tilde
htmlchr_decode[90] = "ö"; //small o, umlaut mark
htmlchr_encode1[90] = "&#246;"; //small o, umlaut mark
htmlchr_encode2[90] = "&ouml;"; //small o, umlaut mark
htmlchr_decode[91] = "ø"; //small o, slash
htmlchr_encode1[91] = "&#248;"; //small o, slash
htmlchr_encode2[91] = "&oslash;"; //small o, slash
htmlchr_decode[92] = "ù"; //small u, grave accent
htmlchr_encode1[92] = "&#249;"; //small u, grave accent
htmlchr_encode2[92] = "&ugrave;"; //small u, grave accent
htmlchr_decode[93] = "ú"; //small u, acute accent
htmlchr_encode1[93] = "&#250;"; //small u, acute accent
htmlchr_encode2[93] = "&uacute;"; //small u, acute accent
htmlchr_decode[94] = "û"; //small u, circumflex accent
htmlchr_encode1[94] = "&#251;"; //small u, circumflex accent
htmlchr_encode2[94] = "&ucirc;"; //small u, circumflex accent
htmlchr_decode[95] = "ü"; //small u, umlaut mark
htmlchr_encode1[95] = "&#252;"; //small u, umlaut mark
htmlchr_encode2[95] = "&uuml;"; //small u, umlaut mark
htmlchr_decode[96] = "ý"; //small y, acute accent
htmlchr_encode1[96] = "&#253;"; //small y, acute accent
htmlchr_encode2[96] = "&yacute;"; //small y, acute accent
htmlchr_decode[97] = "þ"; //small thorn, Icelandic
htmlchr_encode1[97] = "&#254;"; //small thorn, Icelandic
htmlchr_encode2[97] = "&thorn;"; //small thorn, Icelandic
htmlchr_decode[98] = "ÿ"; //small y, umlaut mark
htmlchr_encode1[98] = "&#255;"; //small y, umlaut mark
htmlchr_encode2[98] = "&yuml;"; //small y, umlaut mark
htmlchr_decode[99] = "?"; //for all
htmlchr_encode1[99] = "&#8704;"; //for all
htmlchr_encode2[99] = "&forall;"; //for all
htmlchr_decode[100] = "?"; //part
htmlchr_encode1[100] = "&#8706;"; //part
htmlchr_encode2[100] = "&part;"; //part
htmlchr_decode[101] = "?"; //exists
htmlchr_encode1[101] = "&#8707;"; //exists
htmlchr_encode2[101] = "&exist;"; //exists
htmlchr_decode[102] = "Ø"; //empty
htmlchr_encode1[102] = "&#8709;"; //empty
htmlchr_encode2[102] = "&empty;"; //empty
htmlchr_decode[103] = "?"; //nabla
htmlchr_encode1[103] = "&#8711;"; //nabla
htmlchr_encode2[103] = "&nabla;"; //nabla
htmlchr_decode[104] = "?"; //isin
htmlchr_encode1[104] = "&#8712;"; //isin
htmlchr_encode2[104] = "&isin;"; //isin
htmlchr_decode[105] = "?"; //notin
htmlchr_encode1[105] = "&#8713;"; //notin
htmlchr_encode2[105] = "&notin;"; //notin
htmlchr_decode[106] = "?"; //ni
htmlchr_encode1[106] = "&#8715;"; //ni
htmlchr_encode2[106] = "&ni;"; //ni
htmlchr_decode[107] = "?"; //prod
htmlchr_encode1[107] = "&#8719;"; //prod
htmlchr_encode2[107] = "&prod;"; //prod
htmlchr_decode[108] = "?"; //sum
htmlchr_encode1[108] = "&#8721;"; //sum
htmlchr_encode2[108] = "&sum;"; //sum
htmlchr_decode[109] = "-"; //minus
htmlchr_encode1[109] = "&#8722;"; //minus
htmlchr_encode2[109] = "&minus;"; //minus
htmlchr_decode[110] = "*"; //lowast
htmlchr_encode1[110] = "&#8727;"; //lowast
htmlchr_encode2[110] = "&lowast;"; //lowast
htmlchr_decode[111] = "?"; //square root
htmlchr_encode1[111] = "&#8730;"; //square root
htmlchr_encode2[111] = "&radic;"; //square root
htmlchr_decode[112] = "?"; //proportional to
htmlchr_encode1[112] = "&#8733;"; //proportional to
htmlchr_encode2[112] = "&prop;"; //proportional to
htmlchr_decode[113] = "?"; //infinity
htmlchr_encode1[113] = "&#8734;"; //infinity
htmlchr_encode2[113] = "&infin;"; //infinity
htmlchr_decode[114] = "?"; //angle
htmlchr_encode1[114] = "&#8736;"; //angle
htmlchr_encode2[114] = "&ang;"; //angle
htmlchr_decode[115] = "?"; //and
htmlchr_encode1[115] = "&#8743;"; //and
htmlchr_encode2[115] = "&and;"; //and
htmlchr_decode[116] = "?"; //or
htmlchr_encode1[116] = "&#8744;"; //or
htmlchr_encode2[116] = "&or;"; //or
htmlchr_decode[117] = "?"; //cap
htmlchr_encode1[117] = "&#8745;"; //cap
htmlchr_encode2[117] = "&cap;"; //cap
htmlchr_decode[118] = "?"; //cup
htmlchr_encode1[118] = "&#8746;"; //cup
htmlchr_encode2[118] = "&cup;"; //cup
htmlchr_decode[119] = "?"; //integral
htmlchr_encode1[119] = "&#8747;"; //integral
htmlchr_encode2[119] = "&int;"; //integral
htmlchr_decode[120] = "?"; //therefore
htmlchr_encode1[120] = "&#8756;"; //therefore
htmlchr_encode2[120] = "&there4;"; //therefore
htmlchr_decode[121] = "~"; //similar to
htmlchr_encode1[121] = "&#8764;"; //similar to
htmlchr_encode2[121] = "&sim;"; //similar to
htmlchr_decode[122] = "?"; //congruent to
htmlchr_encode1[122] = "&#8773;"; //congruent to
htmlchr_encode2[122] = "&cong;"; //congruent to
htmlchr_decode[123] = "˜?"; //almost equal
htmlchr_encode1[123] = "&#8776;"; //almost equal
htmlchr_encode2[123] = "&asymp;"; //almost equal
htmlchr_decode[124] = "?"; //not equal
htmlchr_encode1[124] = "&#8800;"; //not equal
htmlchr_encode2[124] = "&ne;"; //not equal
htmlchr_decode[125] = "="; //equivalent
htmlchr_encode1[125] = "&#8801;"; //equivalent
htmlchr_encode2[125] = "&equiv;"; //equivalent
htmlchr_decode[126] = "="; //less or equal
htmlchr_encode1[126] = "&#8804;"; //less or equal
htmlchr_encode2[126] = "&le;"; //less or equal
htmlchr_decode[127] = "="; //greater or equal
htmlchr_encode1[127] = "&#8805;"; //greater or equal
htmlchr_encode2[127] = "&ge;"; //greater or equal
htmlchr_decode[128] = "?"; //subset of
htmlchr_encode1[128] = "&#8834;"; //subset of
htmlchr_encode2[128] = "&sub;"; //subset of
htmlchr_decode[129] = "?"; //superset of
htmlchr_encode1[129] = "&#8835;"; //superset of
htmlchr_encode2[129] = "&sup;"; //superset of
htmlchr_decode[130] = "?"; //not subset of
htmlchr_encode1[130] = "&#8836;"; //not subset of
htmlchr_encode2[130] = "&nsub;"; //not subset of
htmlchr_decode[131] = "?"; //subset or equal
htmlchr_encode1[131] = "&#8838;"; //subset or equal
htmlchr_encode2[131] = "&sube;"; //subset or equal
htmlchr_decode[132] = "?"; //superset or equal
htmlchr_encode1[132] = "&#8839;"; //superset or equal
htmlchr_encode2[132] = "&supe;"; //superset or equal
htmlchr_decode[133] = "?"; //circled plus
htmlchr_encode1[133] = "&#8853;"; //circled plus
htmlchr_encode2[133] = "&oplus;"; //circled plus
htmlchr_decode[134] = "?"; //cirled times
htmlchr_encode1[134] = "&#8855;"; //cirled times
htmlchr_encode2[134] = "&otimes;"; //cirled times
htmlchr_decode[135] = "?"; //perpendicular
htmlchr_encode1[135] = "&#8869;"; //perpendicular
htmlchr_encode2[135] = "&perp;"; //perpendicular
htmlchr_decode[136] = "·"; //dot operator
htmlchr_encode1[136] = "&#8901;"; //dot operator
htmlchr_encode2[136] = "&sdot;"; //dot operator
htmlchr_decode[137] = "?"; //Alpha
htmlchr_encode1[137] = "&#913;"; //Alpha
htmlchr_encode2[137] = "&Alpha;"; //Alpha
htmlchr_decode[138] = "?"; //Beta
htmlchr_encode1[138] = "&#914;"; //Beta
htmlchr_encode2[138] = "&Beta;"; //Beta
htmlchr_decode[139] = "?"; //Gamma
htmlchr_encode1[139] = "&#915;"; //Gamma
htmlchr_encode2[139] = "&Gamma;"; //Gamma
htmlchr_decode[140] = "?"; //Delta
htmlchr_encode1[140] = "&#916;"; //Delta
htmlchr_encode2[140] = "&Delta;"; //Delta
htmlchr_decode[141] = "?"; //Epsilon
htmlchr_encode1[141] = "&#917;"; //Epsilon
htmlchr_encode2[141] = "&Epsilon;"; //Epsilon
htmlchr_decode[142] = "?"; //Zeta
htmlchr_encode1[142] = "&#918;"; //Zeta
htmlchr_encode2[142] = "&Zeta;"; //Zeta
htmlchr_decode[143] = "?"; //Eta
htmlchr_encode1[143] = "&#919;"; //Eta
htmlchr_encode2[143] = "&Eta;"; //Eta
htmlchr_decode[144] = "?"; //Theta
htmlchr_encode1[144] = "&#920;"; //Theta
htmlchr_encode2[144] = "&Theta;"; //Theta
htmlchr_decode[145] = "?"; //Iota
htmlchr_encode1[145] = "&#921;"; //Iota
htmlchr_encode2[145] = "&Iota;"; //Iota
htmlchr_decode[146] = "?"; //Kappa
htmlchr_encode1[146] = "&#922;"; //Kappa
htmlchr_encode2[146] = "&Kappa;"; //Kappa
htmlchr_decode[147] = "?"; //Lambda
htmlchr_encode1[147] = "&#923;"; //Lambda
htmlchr_encode2[147] = "&Lambda;"; //Lambda
htmlchr_decode[148] = "?"; //Mu
htmlchr_encode1[148] = "&#924;"; //Mu
htmlchr_encode2[148] = "&Mu;"; //Mu
htmlchr_decode[149] = "?"; //Nu
htmlchr_encode1[149] = "&#925;"; //Nu
htmlchr_encode2[149] = "&Nu;"; //Nu
htmlchr_decode[150] = "?"; //Xi
htmlchr_encode1[150] = "&#926;"; //Xi
htmlchr_encode2[150] = "&Xi;"; //Xi
htmlchr_decode[151] = "?"; //Omicron
htmlchr_encode1[151] = "&#927;"; //Omicron
htmlchr_encode2[151] = "&Omicron;"; //Omicron
htmlchr_decode[152] = "?"; //Pi
htmlchr_encode1[152] = "&#928;"; //Pi
htmlchr_encode2[152] = "&Pi;"; //Pi
htmlchr_decode[153] = "?"; //Rho
htmlchr_encode1[153] = "&#929;"; //Rho
htmlchr_encode2[153] = "&Rho;"; //Rho
htmlchr_decode[154] = "?"; //Sigma
htmlchr_encode1[154] = "&#931;"; //Sigma
htmlchr_encode2[154] = "&Sigma;"; //Sigma
htmlchr_decode[155] = "?"; //Tau
htmlchr_encode1[155] = "&#932;"; //Tau
htmlchr_encode2[155] = "&Tau;"; //Tau
htmlchr_decode[156] = "?"; //Upsilon
htmlchr_encode1[156] = "&#933;"; //Upsilon
htmlchr_encode2[156] = "&Upsilon;"; //Upsilon
htmlchr_decode[157] = "?"; //Phi
htmlchr_encode1[157] = "&#934;"; //Phi
htmlchr_encode2[157] = "&Phi;"; //Phi
htmlchr_decode[158] = "?"; //Chi
htmlchr_encode1[158] = "&#935;"; //Chi
htmlchr_encode2[158] = "&Chi;"; //Chi
htmlchr_decode[159] = "?"; //Psi
htmlchr_encode1[159] = "&#936;"; //Psi
htmlchr_encode2[159] = "&Psi;"; //Psi
htmlchr_decode[160] = "?"; //Omega
htmlchr_encode1[160] = "&#937;"; //Omega
htmlchr_encode2[160] = "&Omega;"; //Omega
htmlchr_decode[161] = "?"; //alpha
htmlchr_encode1[161] = "&#945;"; //alpha
htmlchr_encode2[161] = "&alpha;"; //alpha
htmlchr_decode[162] = "ß"; //beta
htmlchr_encode1[162] = "&#946;"; //beta
htmlchr_encode2[162] = "&beta;"; //beta
htmlchr_decode[163] = "?"; //gamma
htmlchr_encode1[163] = "&#947;"; //gamma
htmlchr_encode2[163] = "&gamma;"; //gamma
htmlchr_decode[164] = "?"; //delta
htmlchr_encode1[164] = "&#948;"; //delta
htmlchr_encode2[164] = "&delta;"; //delta
htmlchr_decode[165] = "?"; //epsilon
htmlchr_encode1[165] = "&#949;"; //epsilon
htmlchr_encode2[165] = "&epsilon;"; //epsilon
htmlchr_decode[166] = "?"; //zeta
htmlchr_encode1[166] = "&#950;"; //zeta
htmlchr_encode2[166] = "&zeta;"; //zeta
htmlchr_decode[167] = "?"; //eta
htmlchr_encode1[167] = "&#951;"; //eta
htmlchr_encode2[167] = "&eta;"; //eta
htmlchr_decode[168] = "?"; //theta
htmlchr_encode1[168] = "&#952;"; //theta
htmlchr_encode2[168] = "&theta;"; //theta
htmlchr_decode[169] = "?"; //iota
htmlchr_encode1[169] = "&#953;"; //iota
htmlchr_encode2[169] = "&iota;"; //iota
htmlchr_decode[170] = "?"; //kappa
htmlchr_encode1[170] = "&#954;"; //kappa
htmlchr_encode2[170] = "&kappa;"; //kappa
htmlchr_decode[171] = "?"; //lambda
htmlchr_encode1[171] = "&#955;"; //lambda
htmlchr_encode2[171] = "&lambda;"; //lambda
htmlchr_decode[172] = "µ"; //mu
htmlchr_encode1[172] = "&#956;"; //mu
htmlchr_encode2[172] = "&mu;"; //mu
htmlchr_decode[173] = "?"; //nu
htmlchr_encode1[173] = "&#957;"; //nu
htmlchr_encode2[173] = "&nu;"; //nu
htmlchr_decode[174] = "?"; //xi
htmlchr_encode1[174] = "&#958;"; //xi
htmlchr_encode2[174] = "&xi;"; //xi
htmlchr_decode[175] = "?"; //omicron
htmlchr_encode1[175] = "&#959;"; //omicron
htmlchr_encode2[175] = "&omicron;"; //omicron
htmlchr_decode[176] = "?"; //pi
htmlchr_encode1[176] = "&#960;"; //pi
htmlchr_encode2[176] = "&pi;"; //pi
htmlchr_decode[177] = "?"; //rho
htmlchr_encode1[177] = "&#961;"; //rho
htmlchr_encode2[177] = "&rho;"; //rho
htmlchr_decode[178] = "?"; //sigmaf
htmlchr_encode1[178] = "&#962;"; //sigmaf
htmlchr_encode2[178] = "&sigmaf;"; //sigmaf
htmlchr_decode[179] = "?"; //sigma
htmlchr_encode1[179] = "&#963;"; //sigma
htmlchr_encode2[179] = "&sigma;"; //sigma
htmlchr_decode[180] = "?"; //tau
htmlchr_encode1[180] = "&#964;"; //tau
htmlchr_encode2[180] = "&tau;"; //tau
htmlchr_decode[181] = "?"; //upsilon
htmlchr_encode1[181] = "&#965;"; //upsilon
htmlchr_encode2[181] = "&upsilon;"; //upsilon
htmlchr_decode[182] = "?"; //phi
htmlchr_encode1[182] = "&#966;"; //phi
htmlchr_encode2[182] = "&phi;"; //phi
htmlchr_decode[183] = "?"; //chi
htmlchr_encode1[183] = "&#967;"; //chi
htmlchr_encode2[183] = "&chi;"; //chi
htmlchr_decode[184] = "?"; //psi
htmlchr_encode1[184] = "&#968;"; //psi
htmlchr_encode2[184] = "&psi;"; //psi
htmlchr_decode[185] = "?"; //omega
htmlchr_encode1[185] = "&#969;"; //omega
htmlchr_encode2[185] = "&omega;"; //omega
htmlchr_decode[186] = "?"; //theta symbol
htmlchr_encode1[186] = "&#977;"; //theta symbol
htmlchr_encode2[186] = "&thetasym;"; //theta symbol
htmlchr_decode[187] = "?"; //upsilon symbol
htmlchr_encode1[187] = "&#978;"; //upsilon symbol
htmlchr_encode2[187] = "&upsih;"; //upsilon symbol
htmlchr_decode[188] = "?"; //pi symbol
htmlchr_encode1[188] = "&#982;"; //pi symbol
htmlchr_encode2[188] = "&piv;"; //pi symbol
htmlchr_decode[189] = "Œ"; //capital ligature OE
htmlchr_encode1[189] = "&#338;"; //capital ligature OE
htmlchr_encode2[189] = "&OElig;"; //capital ligature OE
htmlchr_decode[190] = "œ"; //small ligature oe
htmlchr_encode1[190] = "&#339;"; //small ligature oe
htmlchr_encode2[190] = "&oelig;"; //small ligature oe
htmlchr_decode[191] = "Š"; //capital S with caron
htmlchr_encode1[191] = "&#352;"; //capital S with caron
htmlchr_encode2[191] = "&Scaron;"; //capital S with caron
htmlchr_decode[192] = "š"; //small S with caron
htmlchr_encode1[192] = "&#353;"; //small S with caron
htmlchr_encode2[192] = "&scaron;"; //small S with caron
htmlchr_decode[193] = "Ÿ"; //capital Y with diaeres
htmlchr_encode1[193] = "&#376;"; //capital Y with diaeres
htmlchr_encode2[193] = "&Yuml;"; //capital Y with diaeres
htmlchr_decode[194] = "ƒ"; //f with hook
htmlchr_encode1[194] = "&#402;"; //f with hook
htmlchr_encode2[194] = "&fnof;"; //f with hook
htmlchr_decode[195] = "ˆ"; //modifier letter circumflex accent
htmlchr_encode1[195] = "&#710;"; //modifier letter circumflex accent
htmlchr_encode2[195] = "&circ;"; //modifier letter circumflex accent
htmlchr_decode[196] = "˜?"; //small tilde
htmlchr_encode1[196] = "&#732;"; //small tilde
htmlchr_encode2[196] = "&tilde;"; //small tilde
htmlchr_decode[197] = "?"; //en space
htmlchr_encode1[197] = "&#8194;"; //en space
htmlchr_encode2[197] = "&ensp;"; //en space
htmlchr_decode[198] = "?"; //em space
htmlchr_encode1[198] = "&#8195;"; //em space
htmlchr_encode2[198] = "&emsp;"; //em space
htmlchr_decode[199] = "?"; //thin space
htmlchr_encode1[199] = "&#8201;"; //thin space
htmlchr_encode2[199] = "&thinsp;"; //thin space
htmlchr_decode[200] = "?"; //zero width non-joiner
htmlchr_encode1[200] = "&#8204;"; //zero width non-joiner
htmlchr_encode2[200] = "&zwnj;"; //zero width non-joiner
htmlchr_decode[201] = "?"; //zero width joiner
htmlchr_encode1[201] = "&#8205;"; //zero width joiner
htmlchr_encode2[201] = "&zwj;"; //zero width joiner
htmlchr_decode[202] = "?"; //left-to-right mark
htmlchr_encode1[202] = "&#8206;"; //left-to-right mark
htmlchr_encode2[202] = "&lrm;"; //left-to-right mark
htmlchr_decode[203] = "?"; //right-to-left mark
htmlchr_encode1[203] = "&#8207;"; //right-to-left mark
htmlchr_encode2[203] = "&rlm;"; //right-to-left mark
htmlchr_decode[204] = "–"; //en dash
htmlchr_encode1[204] = "&#8211;"; //en dash
htmlchr_encode2[204] = "&ndash;"; //en dash
htmlchr_decode[205] = "—"; //em dash
htmlchr_encode1[205] = "&#8212;"; //em dash
htmlchr_encode2[205] = "&mdash;"; //em dash
htmlchr_decode[206] = "‘"; //left single quotation mark
htmlchr_encode1[206] = "&#8216;"; //left single quotation mark
htmlchr_encode2[206] = "&lsquo;"; //left single quotation mark
htmlchr_decode[207] = "’"; //right single quotation mark
htmlchr_encode1[207] = "&#8217;"; //right single quotation mark
htmlchr_encode2[207] = "&rsquo;"; //right single quotation mark
htmlchr_decode[208] = "‚"; //single low-9 quotation mark
htmlchr_encode1[208] = "&#8218;"; //single low-9 quotation mark
htmlchr_encode2[208] = "&sbquo;"; //single low-9 quotation mark
htmlchr_decode[209] = "“"; //left double quotation mark
htmlchr_encode1[209] = "&#8220;"; //left double quotation mark
htmlchr_encode2[209] = "&ldquo;"; //left double quotation mark
htmlchr_decode[210] = "”"; //right double quotation mark
htmlchr_encode1[210] = "&#8221;"; //right double quotation mark
htmlchr_encode2[210] = "&rdquo;"; //right double quotation mark
htmlchr_decode[211] = "„"; //double low-9 quotation mark
htmlchr_encode1[211] = "&#8222;"; //double low-9 quotation mark
htmlchr_encode2[211] = "&bdquo;"; //double low-9 quotation mark
htmlchr_decode[212] = "†"; //dagger
htmlchr_encode1[212] = "&#8224;"; //dagger
htmlchr_encode2[212] = "&dagger;"; //dagger
htmlchr_decode[213] = "‡"; //double dagger
htmlchr_encode1[213] = "&#8225;"; //double dagger
htmlchr_encode2[213] = "&Dagger;"; //double dagger
htmlchr_decode[214] = "•"; //bullet
htmlchr_encode1[214] = "&#8226;"; //bullet
htmlchr_encode2[214] = "&bull;"; //bullet
htmlchr_decode[215] = "…"; //horizontal ellipsis
htmlchr_encode1[215] = "&#8230;"; //horizontal ellipsis
htmlchr_encode2[215] = "&hellip;"; //horizontal ellipsis
htmlchr_decode[216] = "‰"; //per mille 
htmlchr_encode1[216] = "&#8240;"; //per mille 
htmlchr_encode2[216] = "&permil;"; //per mille 
htmlchr_decode[217] = "?"; //minutes
htmlchr_encode1[217] = "&#8242;"; //minutes
htmlchr_encode2[217] = "&prime;"; //minutes
htmlchr_decode[218] = "?"; //seconds
htmlchr_encode1[218] = "&#8243;"; //seconds
htmlchr_encode2[218] = "&Prime;"; //seconds
htmlchr_decode[219] = "‹"; //single left angle quotation
htmlchr_encode1[219] = "&#8249;"; //single left angle quotation
htmlchr_encode2[219] = "&lsaquo;"; //single left angle quotation
htmlchr_decode[220] = "›"; //single right angle quotation
htmlchr_encode1[220] = "&#8250;"; //single right angle quotation
htmlchr_encode2[220] = "&rsaquo;"; //single right angle quotation
htmlchr_decode[221] = "?"; //overline
htmlchr_encode1[221] = "&#8254;"; //overline
htmlchr_encode2[221] = "&oline;"; //overline
htmlchr_decode[222] = "€"; //euro
htmlchr_encode1[222] = "&euro;"; //euro
htmlchr_encode2[222] = "&euro;"; //euro
htmlchr_decode[223] = "™"; //trademark
htmlchr_encode1[223] = "&#8482;"; //trademark
htmlchr_encode2[223] = "&trade;"; //trademark
htmlchr_decode[224] = "?"; //left arrow
htmlchr_encode1[224] = "&#8592;"; //left arrow
htmlchr_encode2[224] = "&larr;"; //left arrow
htmlchr_decode[225] = "?"; //up arrow
htmlchr_encode1[225] = "&#8593;"; //up arrow
htmlchr_encode2[225] = "&uarr;"; //up arrow
htmlchr_decode[226] = "?"; //right arrow
htmlchr_encode1[226] = "&#8594;"; //right arrow
htmlchr_encode2[226] = "&rarr;"; //right arrow
htmlchr_decode[227] = "?"; //down arrow
htmlchr_encode1[227] = "&#8595;"; //down arrow
htmlchr_encode2[227] = "&darr;"; //down arrow
htmlchr_decode[228] = "?"; //left right arrow
htmlchr_encode1[228] = "&#8596;"; //left right arrow
htmlchr_encode2[228] = "&harr;"; //left right arrow
htmlchr_decode[229] = "?"; //carriage return arrow
htmlchr_encode1[229] = "&#8629;"; //carriage return arrow
htmlchr_encode2[229] = "&crarr;"; //carriage return arrow
htmlchr_decode[230] = "?"; //left ceiling
htmlchr_encode1[230] = "&#8968;"; //left ceiling
htmlchr_encode2[230] = "&lceil;"; //left ceiling
htmlchr_decode[231] = "?"; //right ceiling
htmlchr_encode1[231] = "&#8969;"; //right ceiling
htmlchr_encode2[231] = "&rceil;"; //right ceiling
htmlchr_decode[232] = "?"; //left floor
htmlchr_encode1[232] = "&#8970;"; //left floor
htmlchr_encode2[232] = "&lfloor;"; //left floor
htmlchr_decode[233] = "?"; //right floor
htmlchr_encode1[233] = "&#8971;"; //right floor
htmlchr_encode2[233] = "&rfloor;"; //right floor
htmlchr_decode[234] = "?"; //lozenge
htmlchr_encode1[234] = "&#9674;"; //lozenge
htmlchr_encode2[234] = "&loz;"; //lozenge
htmlchr_decode[235] = "?"; //spade
htmlchr_encode1[235] = "&#9824;"; //spade
htmlchr_encode2[235] = "&spades;"; //spade
htmlchr_decode[236] = "?"; //club
htmlchr_encode1[236] = "&#9827;"; //club
htmlchr_encode2[236] = "&clubs;"; //club
htmlchr_decode[237] = "?"; //heart
htmlchr_encode1[237] = "&#9829;"; //heart
htmlchr_encode2[237] = "&hearts;"; //heart
htmlchr_decode[238] = "?"; //diamond
htmlchr_encode1[238] = "&#9830;"; //diamond
htmlchr_encode2[238] = "&diams;"; //diamond
htmlchr_decode[239] = '"'; //double quote
htmlchr_encode1[239] = "&quot;"; //double quote
htmlchr_encode2[239] = "&quot;"; //double quote

function HTMLDecode_fieldvalues(inText) {
	result = inText;
	if (result != '') {
		result_split = result.split("&nbsp;");
		for (i = 0; i < result_split.length; i++) {
			for (a = 0; a < htmlchr_decode.length; a++) {
				result_split[i] = result_split[i].replace(htmlchr_encode1[a],htmlchr_decode[a]);
				result_split[i] = result_split[i].replace(htmlchr_encode2[a],htmlchr_decode[a]);
				
			}
		}
		result = result_split.join(" ");
	}
	return result;
}

function HTMLEncode_fieldvalues(inText) {
	result = inText;
	if (result != '') {
		result_split = result.split(" ");
		for (i = 0; i < result_split.length; i++) {
			for (a = 0; a < htmlchr_decode.length; a++) {
				result_split[i] = result_split[i].replace(htmlchr_decode[a],htmlchr_encode1[a]);
			}
		}
		result = result_split.join("&nbsp;");
	}
	
	return result;
}
