function json_decode(str_json){var json=this.window.JSON;if(typeof json==='object'&&typeof json.parse==='function'){return json.parse(str_json);}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var j;var text=str_json;cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if((/^[\],:{}\s]*$/).test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return j;}
throw new SyntaxError('json_decode');}
function json_encode(mixed_val){var json=this.window.JSON;if(typeof json==='object'&&typeof json.stringify==='function'){return json.stringify(mixed_val);}
var value=mixed_val;var quote=function(string){var escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';};var str=function(key,holder){var gap='';var indent='    ';var i=0;var k='';var v='';var length=0;var mind=gap;var partial=[];var value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}};return str('',{'':value});}
function urldecode(str){var hash_map={},ret=str.toString(),unicodeStr='',hexEscStr='';var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace);};hash_map["'"]='%27';hash_map['(']='%28';hash_map[')']='%29';hash_map['*']='%2A';hash_map['~']='%7E';hash_map['!']='%21';hash_map['%20']='+';hash_map['\u00DC']='%DC';hash_map['\u00FC']='%FC';hash_map['\u00C4']='%D4';hash_map['\u00E4']='%E4';hash_map['\u00D6']='%D6';hash_map['\u00F6']='%F6';hash_map['\u00DF']='%DF';hash_map['\u20AC']='%80';hash_map['\u0081']='%81';hash_map['\u201A']='%82';hash_map['\u0192']='%83';hash_map['\u201E']='%84';hash_map['\u2026']='%85';hash_map['\u2020']='%86';hash_map['\u2021']='%87';hash_map['\u02C6']='%88';hash_map['\u2030']='%89';hash_map['\u0160']='%8A';hash_map['\u2039']='%8B';hash_map['\u0152']='%8C';hash_map['\u008D']='%8D';hash_map['\u017D']='%8E';hash_map['\u008F']='%8F';hash_map['\u0090']='%90';hash_map['\u2018']='%91';hash_map['\u2019']='%92';hash_map['\u201C']='%93';hash_map['\u201D']='%94';hash_map['\u2022']='%95';hash_map['\u2013']='%96';hash_map['\u2014']='%97';hash_map['\u02DC']='%98';hash_map['\u2122']='%99';hash_map['\u0161']='%9A';hash_map['\u203A']='%9B';hash_map['\u0153']='%9C';hash_map['\u009D']='%9D';hash_map['\u017E']='%9E';hash_map['\u0178']='%9F';hash_map['\u00C6']='%C3%86';hash_map['\u00D8']='%C3%98';hash_map['\u00C5']='%C3%85';for(unicodeStr in hash_map){hexEscStr=hash_map[unicodeStr];ret=replacer(hexEscStr,unicodeStr,ret);}
ret=decodeURIComponent(ret);return ret;}
function urlencode(str){var hexStr=function(dec){return'%'+dec.toString(16).toUpperCase();};var ret='',unreserved=/[\w.-]/;str=(str+'').toString();for(var i=0,dl=str.length;i<dl;i++){var ch=str.charAt(i);if(unreserved.test(ch)){ret+=ch;}
else{var code=str.charCodeAt(i);if(code===32){ret+='+';}
else if(code<128){ret+=hexStr(code);}
else if(code>=128&&code<2048){ret+=hexStr((code>>6)|0xC0);ret+=hexStr((code&0x3F)|0x80);}
else if(code>=2048&&code<65536){ret+=hexStr((code>>12)|0xE0);ret+=hexStr(((code>>6)&0x3F)|0x80);ret+=hexStr((code&0x3F)|0x80);}
else if(code>=65536){ret+=hexStr((code>>18)|0xF0);ret+=hexStr(((code>>12)&0x3F)|0x80);ret+=hexStr(((code>>6)&0x3F)|0x80);ret+=hexStr((code&0x3F)|0x80);}}}
return ret;}