//js.url_encode/decode　
function decodeURL(str){var s0, i, j, s, ss, u, n, f;s0 = "";for (i = 0; i < str.length; i++){s = str.charAt(i);if (s == "+"){s0 += " ";}else {if (s != "%"){s0 += s;}	else{u = 0;f = 1;while (true) {ss = "";for (j = 0; j < 2; j++ ) {sss = str.charAt(++i);if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {ss += sss;} else {--i; break;}}n = parseInt(ss, 16);if (n <= 0x7f){u = n; f = 1;}if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}if (f <= 1){break;}if (str.charAt(i + 1) == "%"){ i++ ;}else {break;}}s0 += String.fromCharCode(u);}}}return s0;}
function encodeURL(str){var s0, i, s, u;s0 = "";for (i = 0; i < str.length; i++){s = str.charAt(i);u = str.charCodeAt(i);if (s == " "){s0 += "+";}else {if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){s0 = s0 + s;}else {if ((u >= 0x0) && (u <= 0x7f)){s = "0"+u.toString(16);s0 += "%"+ s.substr(s.length-2);}else if (u > 0x1fffff){s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);s0 += "%" + (0x80 + (u & 0x3f)).toString(16);}else if (u > 0x7ff){s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);s0 += "%" + (0x80 + (u & 0x3f)).toString(16);}else {s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);s0 += "%" + (0x80 + (u & 0x3f)).toString(16);}}}}return s0;}
