try{if(!this.JSON){this.JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){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+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}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;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{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;}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});};}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}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 typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");};}}());}catch(ex){}try{var JsonML;if("undefined"===typeof JsonML){JsonML={};}(function(){var D={rowspan:"rowSpan",colspan:"colSpan",cellpadding:"cellPadding",cellspacing:"cellSpacing",tabindex:"tabIndex",accesskey:"accessKey",hidefocus:"hideFocus",usemap:"useMap",maxlength:"maxLength",readonly:"readOnly",contenteditable:"contentEditable"},B={enctype:"encoding",onscroll:"DOMMouseScroll"},I=(function(N){var M={};while(N.length){var L=N.shift();M["on"+L.toLowerCase()]=L;}return M;})("blur,change,click,dblclick,error,focus,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,resize,scroll,select,submit,unload".split(","));function F(N,L,M){if("string"===typeof M){M=new Function("event",M);}if("function"!==typeof M){return;}N[L]=M;}function C(M,P){if(P.name&&document.attachEvent){try{var Q=document.createElement("<"+M.tagName+" name='"+P.name+"'>");if(M.tagName===Q.tagName){M=Q;}}catch(O){}}for(var L in P){if(P.hasOwnProperty(L)){var N=P[L];if(L&&N){L=D[L.toLowerCase()]||L;if(L==="style"){if("undefined"!==typeof M.style.cssText){M.style.cssText=N;}else{M.style=N;}}else{if(L==="class"){M.className=N;}else{if(I[L]){F(M,L,N);if(B[L]){F(M,B[L],N);}}else{if("string"===typeof N||"number"===typeof N||"boolean"===typeof N){M.setAttribute(L,N);if(B[L]){M.setAttribute(B[L],N);}}else{M[L]=N;if(B[L]){M[B[L]]=N;}}}}}}}}return M;}function K(M,O){if(O){if(M.tagName&&M.tagName.toLowerCase()==="table"&&M.tBodies){if(!O.tagName){if(O.nodeType===11){while(O.firstChild){K(M,O.removeChild(O.firstChild));}}return;}var P=O.tagName.toLowerCase();if(P&&P!=="tbody"&&P!=="thead"){var N=M.tBodies.length>0?M.tBodies[M.tBodies.length-1]:null;if(!N){N=document.createElement(P==="th"?"thead":"tbody");M.appendChild(N);}N.appendChild(O);}else{if(M.canHaveChildren!==false){M.appendChild(O);}}}else{if(M.canHaveChildren!==false){M.appendChild(O);}else{if(M.tagName&&M.tagName.toLowerCase()==="object"&&O.tagName&&O.tagName.toLowerCase()==="param"){try{M.appendChild(O);}catch(Q){}try{if(M.object){M.object[O.name]=O.value;}}catch(L){}}}}}}function G(L){return L&&(L.nodeType===3)&&(!L.nodeValue||!/\S/.exec(L.nodeValue));}function E(L){if(L){while(G(L.firstChild)){L.removeChild(L.firstChild);}while(G(L.lastChild)){L.removeChild(L.lastChild);}}}function J(L){var N=document.createElement("div");N.innerHTML=L;E(N);if(N.childNodes.length===1){return N.firstChild;}var M=document.createDocumentFragment?document.createDocumentFragment():document.createElement("");while(N.firstChild){M.appendChild(N.firstChild);}return M;}function H(L){this.value=L;}JsonML.raw=function(L){return new H(L);};function A(N,L,M){return document.createTextNode("["+N+"]");}JsonML.onerror=null;JsonML.parse=function(U,M){try{if(!U){return null;}if("string"===typeof U){return document.createTextNode(U);}if(U instanceof H){return J(U.value);}if(!JsonML.isElement(U)){throw new SyntaxError("invalid JsonML");}var L;var N=U[0];if(!N){var O=document.createDocumentFragment?document.createDocumentFragment():document.createElement("");for(L=1;L<U.length;L++){K(O,JsonML.parse(U[L],M));}E(O);if(O.childNodes.length===1){return O.firstChild;}return O;}var T=(N.toLowerCase()==="style"&&document.createStyleSheet);var Q=T?document.createStyleSheet():document.createElement(N);for(L=1;L<U.length;L++){if(U[L] instanceof Array||"string"===typeof U[L]){if(T){Q.cssText=U[L];}else{K(Q,JsonML.parse(U[L],M));}}else{if(U[L] instanceof H){K(Q,J(U[L].value));}else{if("object"===typeof U[L]&&U[L]!==null&&Q.nodeType===1){Q=C(Q,U[L]);}}}}if(T){return null;}E(Q);return(Q&&"function"===typeof M)?M(Q):Q;}catch(S){try{var R=("function"===typeof JsonML.onerror)?JsonML.onerror:A;return R(S,U,M);}catch(P){return document.createTextNode("["+P+"]");}}};JsonML.isElement=function(L){return(L instanceof Array)&&("string"===typeof L[0]);};JsonML.isFragment=function(L){return(L instanceof Array)&&(L[0]==="");};JsonML.getTagName=function(L){return L[0]||"";};JsonML.isAttributes=function(L){return !!L&&("object"===typeof L)&&!(L instanceof Array);};JsonML.hasAttributes=function(L){if(!JsonML.isElement(L)){throw new SyntaxError("invalid JsonML");}return JsonML.isAttributes(L[1]);};JsonML.getAttributes=function(O,M){if(JsonML.hasAttributes(O)){return O[1];}if(!M){return undefined;}var L=O.shift();var N={};O.unshift(N);O.unshift(L||"");return N;};JsonML.addAttributes=function(P,O){if(!JsonML.isElement(P)||!JsonML.isAttributes(O)){throw new SyntaxError("invalid JsonML");}if(!JsonML.isAttributes(P[1])){var L=P.shift();P.unshift(O);P.unshift(L||"");return;}var N=P[1];for(var M in O){if(O.hasOwnProperty(M)){N[M]=O[M];}}};JsonML.getAttribute=function(M,L){if(!JsonML.hasAttributes(M)){return undefined;}return M[1][L];};JsonML.setAttribute=function(N,M,L){JsonML.getAttributes(N,true)[M]=L;};JsonML.appendChild=function(L,M){if(M instanceof Array&&M[0]===""){M.shift();while(M.length){JsonML.appendChild(L,M.shift(),arguments[2]);}}else{if(M&&"object"===typeof M){if(M instanceof Array){if(!JsonML.isElement(L)||!JsonML.isElement(M)){throw new SyntaxError("invalid JsonML");}if("function"===typeof arguments[2]){arguments[2](L,M);}L.push(M);}else{if(M instanceof H){if(!JsonML.isElement(L)){throw new SyntaxError("invalid JsonML");}L.push(M);}else{JsonML.addAttributes(L,M);}}}else{if("undefined"!==typeof M&&M!==null){if(!(L instanceof Array)){throw new SyntaxError("invalid JsonML");}M=String(M);if(M&&L.length>1&&"string"===typeof L[L.length-1]){L[L.length-1]+=M;}else{if(M||!L.length){L.push(M);}}}}}};JsonML.getChildren=function(L){if(JsonML.hasAttributes(L)){L.slice(2);}L.slice(1);};})();}catch(ex){}try{var JsonML;if("undefined"===typeof JsonML){JsonML={};}JsonML.BST=(function(){var E="jbst:visible",A="jbst:oninit",G="jbst:onload";function B(L,K){var J=L[K]||null;if(J){if("function"!==typeof J){try{J=new Function(String(J));}catch(M){J=null;}}if(J){L[K.split(":").join("$")]=J;}delete L[K];}return J;}function I(J){return"["+J+"]";}function D(L,K){K=K.split(":").join("$");var J=L[K];if(J){try{delete L[K];}catch(M){L[K]=undefined;}}return J;}function C(K){var J=D(K,A);if("function"===typeof J){J.call(K);}J=D(K,G);if("function"===typeof J){setTimeout(function(){J.call(K);J=K=null;},0);}if(JsonML.BST.filter){return JsonML.BST.filter(K);}return K;}function F(N,P,O,J,L,K,M){try{N.data=("undefined"!==typeof P)?P:null;N.index=isFinite(O)?Number(O):NaN;N.count=isFinite(J)?Number(J):NaN;N.args=("undefined"!==typeof L)?L:null;return K.apply(N,M||[]);}finally{delete N.count;delete N.index;delete N.data;delete N.args;}}function H(K){if("undefined"===typeof K){throw new Error("JBST tree is undefined");}var L=this,M=JsonML.appendChild;function J(T,U,b,N,W){try{if(T){var Y;if("function"===typeof T){Y=F(L,U,b,N,W,T);if(Y instanceof H){return Y.dataBind(U,b,N,W);}return Y;}if(T instanceof Array){var P=("function"===typeof JsonML.BST.onbound)&&JsonML.BST.onbound,S=("function"===typeof JsonML.BST.onappend)&&JsonML.BST.onappend,R=S&&function(e,f){F(L,U,b,N,W,S,[e,f]);};Y=[];for(var V=0;V<T.length;V++){var a=J(T[V],U,b,N,W);M(Y,a,R);if(!V&&!Y[0]){S=R=null;}}if(Y[0]&&P){F(L,U,b,N,W,P,[Y]);}if(JsonML.hasAttributes(Y)){var c=Y[1][E];if("undefined"!==typeof c){if(!c){return"";}delete Y[1][E];}B(Y[1],A);B(Y[1],G);}return Y;}if("object"===typeof T){Y={};for(var O in T){if(T.hasOwnProperty(O)){var X=J(T[O],U,b,N,W);if("undefined"!==typeof X&&X!==null){Y[O]=X;}}}return Y;}}return T;}catch(Q){try{var d=("function"===typeof JsonML.BST.onerror)?JsonML.BST.onerror:I;return F(L,U,b,N,W,d,[Q]);}catch(Z){return"["+Z+"]";}}}L.dataBind=function(S,R,N,O){if(S instanceof Array){var Q=[""];N=S.length;for(var P=0;P<N;P++){M(Q,J(K,S[P],P,N,O));}return Q;}else{return J(K,S,R,N,O);}};L.bind=function(R,Q,N,O){var P=L.dataBind(R,Q,N,O);return JsonML.parse(P,C);};L.replace=function(Q,S,R,N,O){if("string"===typeof Q){Q=document.getElementById(Q);}if(Q&&Q.parentNode){var P=L.bind(S,R,N,O);if(P){Q.parentNode.replaceChild(P,Q);}}};}return function(J){return(J instanceof H)?J:new H(J);};})();JsonML.BST.filter=null;JsonML.BST.onerror=null;JsonML.BST.onappend=null;JsonML.BST.onbound=null;}catch(ex){}try{if("undefined"===typeof JSON){throw new Error("JsonFx.IO requires JSON");}(function(){var A;if("undefined"===typeof XMLHttpRequest){A=!ActiveXObject?[]:["Msxml2.XMLHTTP.6.0","Msxml2.XMLHttp.5.0","Msxml2.XMLHttp.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];XMLHttpRequest=function(){while(A.length){try{return new ActiveXObject(A[0]);}catch(B){A.shift();}}return null;};}})();var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}if("undefined"===typeof JsonFx.jsonReviver){JsonFx.jsonReviver=function(B,A){var C;if("string"===typeof A){C=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z)?$/.exec(A);if(C){if(C[7]){return new Date(Date.UTC(+C[1],+C[2]-1,+C[3],+C[4],+C[5],+C[6]));}else{return new Date(+C[1],+C[2]-1,+C[3],+C[4],+C[5],+C[6]);}}}return A;};}JsonFx.IO={hasAjax:!!new XMLHttpRequest(),timeout:60000,onCreate:null,onBeginRequest:null,onEndRequest:null,onSuccess:null,onTimeout:null,onComplete:null,onFailure:function(F,D,E){if(E){var A=E.name||"Error",C=E.message||String(E),B=isFinite(E.code)?Number(E.code):Number(E.number);if(isFinite(B)){A+=" ("+B+")";}(onerror||alert)("Request "+A+':\n"'+C+'"',F,E.lineNumber||E.line||1);}},validateOptions:function(A){if("object"!==typeof A){A={};}if("boolean"!==typeof A.async){A.async=true;}if("string"!==typeof A.method){A.method="POST";}else{A.method=A.method.toUpperCase();}if("string"!==typeof A.params){A.params=null;}if("object"!==typeof A.headers){A.headers={};}if(A.method==="POST"&&A.params&&!A.headers["Content-Type"]){A.headers["Content-Type"]="application/x-www-form-urlencoded";}A.headers["If-Modified-Since"]="Sun, 1 Jan 1995 00:00:00 GMT";A.headers["Cache-Control"]="no-cache";A.headers.Pragma="no-cache";if("number"!==typeof A.timeout){A.timeout=JsonFx.IO.timeout;}if("function"!==typeof A.onCreate){A.onCreate=JsonFx.IO.onCreate;}if("function"!==typeof A.onSuccess){A.onSuccess=JsonFx.IO.onSuccess;}if("function"!==typeof A.onFailure){A.onFailure=JsonFx.IO.onFailure;}if("function"!==typeof A.onTimeout){A.onTimeout=JsonFx.IO.onTimeout;}if("function"!==typeof A.onComplete){A.onComplete=JsonFx.IO.onComplete;}if("undefined"===typeof A.context){A.context=JsonFx.IO.context;}return A;},sendRequest:function(D,A){A=JsonFx.IO.validateOptions(A);var B=new XMLHttpRequest();if(A.onCreate){A.onCreate.call(this,B,A.context);}if(!B){if(A.onFailure){A.onFailure.call(this,B,A.context,new Error("XMLHttpRequest not supported"));}if(A.onComplete){A.onComplete.call(this,B,A.context);}return;}var E;if(A.timeout>0){E=setTimeout(function(){if(B){B.onreadystatechange=function(){};B.abort();B=null;}if(A.onTimeout){A.onTimeout.call(this,B,A.context,new Error("Request Timeout"));}else{if(A.onFailure){A.onFailure.call(this,B,A.context,new Error("Request Timeout"));}}if(A.onComplete){A.onComplete.call(this,B,A.context);}},A.timeout);}function G(){var J,K;if(B&&B.readyState===4){clearTimeout(E);J=0;try{J=Number(B.status);}catch(I){}if(J===0){return;}else{if(Math.floor(J/100)===2){if(A.onSuccess){A.onSuccess.call(this,B,A.context);}}else{if(A.onFailure){K=new Error(B.statusText);K.code=J;A.onFailure.call(this,B,A.context,K);}}}if(A.onComplete){A.onComplete.call(this,B,A.context);}B=null;}}try{B.onreadystatechange=G;B.open(A.method,D,A.async);if(A.headers){for(var H in A.headers){if(A.headers.hasOwnProperty(H)&&A.headers[H]){try{B.setRequestHeader(H,A.headers[H]);}catch(C){}}}}if(A.method==="POST"&&!A.params){A.params="";}B.send(A.params);}catch(F){if(A.onFailure){A.onFailure.call(this,B,A.context,F);}}finally{G();}},sendJsonRequest:function(A,B){if("undefined"!==typeof B&&"undefined"!==typeof B.params){if(!B.headers||!B.headers["Content-Type"]){B.params=JSON.stringify(B.params);if(!B.headers){B.headers={};}B.headers["Content-Type"]="application/json";}}B=JsonFx.IO.validateOptions(B);B.headers.Accept="application/json, application/jsonml+json";var C=B.onSuccess;B.onSuccess=function(G,E){var F=G?G.responseText:null;try{F=(F&&"string"===typeof F)?JSON.parse(F,JsonFx.jsonReviver):null;if("function"===typeof C){C.call(this,F,E);}}catch(H){if(B.onFailure){B.onFailure.call(this,G,E,H);}}finally{C=B=null;}};var D=null;if(B.onFailure){D=B.onFailure;B.onFailure=function(F,E,G){D.call(this,(F&&F.responseText),E,G);D=null;};}JsonFx.IO.sendRequest.call(this,A,B);},jsonRpcPathEncode:function(C,E){var B,F=encodeURIComponent,A="/";if(C&&C!=="system.describe"){A+=F(C);}if("object"===typeof E){A+="?";if(E instanceof Array){for(B=0;B<E.length;B++){if(B>0){A+="&";}A+=F(B);A+="=";A+=F(E[B]);}}else{for(var D in E){if(E.hasOwnProperty(D)){A+=F(D);A+="=";A+=F(E[D]);}}}}},sendJsonRpc:function(D,C,H,A){A=JsonFx.IO.validateOptions(A);if(!A.headers.Accept){A.headers.Accept="application/json, application/jsonml+json";}var F=A.onSuccess;var E=A.onFailure;A.onSuccess=function(K,J){var I=K?K.responseText:null;try{I=("string"===typeof I)?JSON.parse(I,JsonFx.jsonReviver):null;if(I.error){if(E){E.call(this,I,J,I.error);}}else{if(F){F.call(this,I.result,J);}}}catch(L){if(E){E.call(this,I,J,L);}}E=F=null;};A.onFailure=function(L,K,M){var J=L?L.responseText:null;try{J=(J&&"string"===typeof J)?JSON.parse(J,JsonFx.jsonReviver):null;if(E){E.call(this,J,K,M);}}catch(I){if(E){E.call(this,J,K,M?M:I);}}E=null;};if("object"!==typeof H){H=[H];}var G;if(A.method==="GET"){D+=JsonFx.IO.jsonRpcPathEncode(C,H);}else{G={jsonrpc:"2.0",method:C,params:H,id:new Date().valueOf()};try{G=JSON.stringify(G,function(J,I){return I===""?"":I;});}catch(B){if(E){E.call(this,G,A.context,B);}return;}A.params=G;A.headers["Content-Type"]="application/json";A.headers["Content-Length"]=G.length;}JsonFx.IO.sendRequest(D,A);},loadScript:function(C,E){if(!C){return;}if(E){var A=document.getElementsByTagName("script");for(var D=0;D<A.length;D++){if(A[D].src===C){return;}}}if(!document.body){document.write("<"+'script src="'+C+'" type="text/javascript"><'+"/script>");}else{var B=document.createElement("script");B.setAttribute("type","text/javascript");B.setAttribute("src",C);document.body.appendChild(B);}}};JsonFx.IO.Service=function(A){this.address=A||"";};JsonFx.IO.Service.appRoot="";JsonFx.IO.Service.setAppRoot=function(A){if(!A){JsonFx.IO.Service.appRoot="";return;}if(A.charAt(A.length-1)==="/"){A=A.substr(0,A.length-1);}JsonFx.IO.Service.appRoot=A;};JsonFx.IO.Service.prototype.onBeginRequest=null;JsonFx.IO.Service.prototype.onEndRequest=null;JsonFx.IO.Service.prototype.onAddCustomHeaders=null;JsonFx.IO.Service.prototype.getAddress=function(){if(JsonFx.IO.Service.appRoot){return JsonFx.IO.Service.appRoot+this.address;}else{return this.address;}};JsonFx.IO.Service.prototype.invoke=function(B,D,E){E=JsonFx.IO.validateOptions(E);if(this.isDebug){E.timeout=-1;}var C=this,A=null;if("function"===typeof this.onEndRequest){A=E.onComplete;E.onComplete=function(F,G){C.onEndRequest(G);if(A){A(F,G);}C=A=null;};}if("function"===typeof this.onAddCustomHeaders){this.onAddCustomHeaders(E.headers);}if("function"===typeof this.onBeginRequest){this.onBeginRequest(E.context);}JsonFx.IO.sendJsonRpc(this.getAddress(),B,D,E);};JsonFx.IO.Service.prototype["system.describe"]=JsonFx.IO.Service.prototype.$describe=function(A){this.invoke("system.describe",null,A);};}catch(ex){}try{var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}JsonFx.userAgent={};JsonFx.UA={parseUserAgent:function(J){var M={};if(!J){return M;}J=J.toLowerCase();var B=/[\w\-\.]+[\/][v]?\d+(\.\d+)*/g;var I=/\b(america online browser|aol)[\s\/]*(\d+(\.\d+)*)/;var L=/(\bmsie|microsoft internet explorer)[\s\/]*(\d+(\.\d+)*)/;var N=/rv[:](\d+(\.\d+)*).*?gecko[\/]\d+/;var C=/\bopera[\s\/]*(\d+(\.\d+)*)/;var O=/\b(mspie|microsoft pocket internet explorer)[\s\/]*(\d+(\.\d+)*)/;var H=/\bicab[\s\/]*(\d+(\.\d+)*)/;var D=/\bblackberry\w+[\s\/]+(\d+(\.\d+)*)/;var E=/(\w*mobile\w*|\w*phone\w*|\bpda\b|\bchtml\b|\bmidp\b|\bcldc\b|blackberry\w*|windows ce\b|palm\w*\b|symbian\w*\b)/;var A,K,F,G=J.match(B);if(G){for(A=0;A<G.length;A++){K=G[A].indexOf("/");F=G[A].substring(0,K);if(F&&F!=="mozilla"){if(F==="applewebkit"){F="webkit";}M[F]=G[A].substr(K+1);}}}if(I.exec(J)){M.aol=RegExp.$2;}if(C.exec(J)){M.opera=RegExp.$1;}else{if(H.exec(J)){M.icab=RegExp.$1;}else{if(L.exec(J)){M.ie=RegExp.$2;}else{if(O.exec(J)){M.mspie=RegExp.$2;}else{if(N.exec(J)){M.gecko=RegExp.$1;}}}}}if(!M.blackberry&&D.exec(J)){M.blackberry=RegExp.$1;}if(!M.mobile&&E.exec(J)){M.mobile=RegExp.$1;}return M;},formatCssUserAgent:function(A){function B(H,G){var E=" ua-";H=H.split(".").join("-");var F=E+H;if(G){G=G.split(".").join("-");var I=G.indexOf("-");while(I>0){F+=E+H+"-"+G.substring(0,I);I=G.indexOf("-",I+1);}F+=E+H+"-"+G;}return F;}var D="";for(var C in A){if(C&&A.hasOwnProperty(C)){D+=B(C,A[C]);}}return D;},encodeUserAgent:function(A){var C="";for(var B in A){if(B&&A.hasOwnProperty(B)){if(C){C+="&";}C+=encodeURIComponent(B)+"="+encodeURIComponent(A[B]);}}return C;},setCssUserAgent:function(){JsonFx.userAgent=JsonFx.UA.parseUserAgent(navigator.userAgent);var A=JsonFx.UA.formatCssUserAgent(JsonFx.userAgent);function B(){if(document.body.className){document.body.className+=A;}else{document.body.className=A.substr(1);}}function C(){if(document.body){B();}else{setTimeout(C,0);}}if(typeof jQuery!=="undefined"){jQuery(B);}else{C();}}};}catch(ex){}try{var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}if("undefined"===typeof JsonFx.Lang){JsonFx.Lang=function(){var D="";var E={};var A={};function B(F){F=F.replace(/^\s+|\s+$/g,"");F=F.replace(/\s+,|,\s+/g,",");F=F.toLowerCase();return F;}function C(G,F){if(!G){return;}E[B(G)]=F;G=G.split(",",2);if(!G||G.length<2){return;}if(!A.hasOwnProperty(G)){A[G[0]]={};}A[G[0]][G[1]]=F;}this.add=function(F,G){if(!F){return;}if("string"===typeof G){D=G;}for(var H in F){if(F.hasOwnProperty(H)){C(H,F[H]);}}};this.get=function(F){if("string"!==typeof F){F="";}F=B(F);return E.hasOwnProperty(F)?E[F]:"$$"+F+"$$";};this.getLang=function(){return D;};this.getAll=function(){return A;};};JsonFx.Lang=new JsonFx.Lang();}}catch(ex){}try{var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}JsonFx.Bindings=function(){var E=this;var I=1,C=2;var F={};var B=/^\s*([\w\-]*|[*])(?:#([\w\-]+)|\.([\w\-]+))?(?:#([\w\-]+)|\.([\w\-]+))?\s*$/;E.add=function(N,M,L){if(typeof M!=="function"){M=null;}if(typeof L!=="function"){L=null;}if(!N||(!M&&!L)){return;}var K=N instanceof Array?N:String(N).split(",");while(K.length>1){E.add(K.shift(),M,L);}N=K.shift();K=B.exec(N);if(K){K={tag:(K[1]||"*").toLowerCase(),css:(K[3]||K[5]||"*"),id:(K[2]||K[4]||"")};}if(K&&K.id&&K.tag==="*"&&K.css==="*"){if("undefined"===typeof F["#"]){F["#"]={};}F["#"][K.id]={};F["#"][K.id][I]=M;F["#"][K.id][C]=L;}else{if(K&&!K.id){if("undefined"===typeof F[K.tag]){F[K.tag]={};}else{if(F[K.tag][K.css]){throw new Error("A binding for "+N+" has already been registered.");}}F[K.tag][K.css]={};F[K.tag][K.css][I]=M;F[K.tag][K.css][C]=L;}else{if("undefined"===typeof jQuery){throw new Error('JsonFx.Bindings requires jQuery to support more than simple tag, class, and id selectors.\nSelector: "'+N+'"');}if("undefined"===typeof F.$){F.$={};}F.$[N]={};F.$[N][I]=M;F.$[N][C]=L;}}};E.register=function(K,L,M,N){E.add(K+"."+L,M,N);};var H=function(R,M){function S(T,U){if(T&&T[U]&&T[U][M]){try{R=T[U][M](R)||R;}catch(W){var V=R.tagName+"."+U;if(R.id){V+="#"+R.id;}alert("Error binding "+V+" (line "+(W.lineNumber||W.line||1)+'):\n"'+(W&&W.message||String(W))+'"');;}}}if(R&&R.tagName){var N=R.tagName.toLowerCase();var P=F["*"];var O=F[N];if(O||P){S(O,"*");S(P,"*");if(R.className){var Q=R.className.split(/\s+/);for(var K=0;K<Q.length;K++){var L=Q[K];S(O,L);S(P,L);}}}}return R;};var G=function(M,K){var L=F["#"][M.id];L=L&&L[K];return(L&&L(M))||M;};var J=function(O,M){function L(T,U){setTimeout(function(){if(U&&U.parentNode){U.parentNode.replaceChild(T,U);}T=U=null;},0);}function R(U){var W=O.getElementsByTagName(U);for(var V=0;V<W.length;V++){var T=H(W[V],M);if(T!==W[V]&&W[V].parentNode){L(T,W[V]);}}}O=O||document.body;if(F.$&&"undefined"!==typeof jQuery){for(var P in F.$){if(F.$.hasOwnProperty(P)){jQuery(P,O).each(function(V){var U=F.$[P];U=U&&U[M];var T=(U&&U(this))||this;if(T!==this){L(T,this);}});}}}if(F["#"]){for(var K in F["#"]){if(F["#"].hasOwnProperty(K)){var Q=document.getElementById(K);if(!Q){continue;}var S=G(Q,M);if(S!==Q){L(S,Q);}}}}if(O.getElementsByTagName){if(F["*"]){R("*");}else{for(var N in F){if(F.hasOwnProperty(N)&&N!=="*"&&N!=="#"){R(N);}}}}};E.bind=function(K){if(!isFinite(K.nodeType)){K=null;}J(K,I);};E.unbind=function(K){if(!isFinite(K.nodeType)){K=null;}J(K,C);};if("undefined"!==typeof JsonML&&JsonML.BST){var A=function(L){if(F.$&&"undefined"!==typeof jQuery){for(var M in F.$){if(F.$.hasOwnProperty(M)&&jQuery(L).is(M)){var K=F.$[M];K=K&&K[I];L=(K&&K(L))||L;}}}if(G&&F["#"]){L=G(L,I);}L=H(L,I);return L;};if("function"!==typeof JsonML.BST.filter){JsonML.BST.filter=A;}else{JsonML.BST.filter=(function(){var K=JsonML.BST.filter;return function(L){L=K(L);return L&&A(L);};})();}}E.replace=function(L,M,O,N,K){if("undefined"!==typeof jQuery){jQuery(function(){var P=jQuery(L);if(P.length){P.replaceWith(JsonML.BST(M).bind(O,N,K));}});}else{JsonFx.Bindings.add(L,function(P){return JsonML.BST(M).bind(O,N,K)||P;});}};function D(N,K,L){if(typeof jQuery!=="undefined"){jQuery(N).bind(K,L);}else{if(N.addEventListener){N.addEventListener(K,L,false);}else{if(N.attachEvent){N.attachEvent("on"+K,L);}else{var M=N["on"+K];N["on"+K]=("function"===typeof M)?function(O){L(O);return M(O);}:L;}}}}if("undefined"!==typeof jQuery){jQuery(E.bind);}else{D(window,"load",E.bind);}D(window,"unload",E.unbind);};JsonFx.Bindings=new JsonFx.Bindings();}catch(ex){}try{var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}if("undefined"===typeof JsonFx.UI){JsonFx.UI={};}if("undefined"===typeof JsonML){throw new Error("JsonFx.UI requires JsonML");}JsonFx.UI.cancelEvent=function(A){A=A||window.event;if(A){if(A.stopPropagation){A.stopPropagation();A.preventDefault();}else{try{A.cancelBubble=true;A.returnValue=false;}catch(B){}}}return false;};JsonFx.UI.addHandler=function(D,A,B){if("string"===typeof B){B=new Function(B);}if("function"!==typeof B){return;}if("undefined"!==typeof jQuery){jQuery(D).bind(A,B);}else{if(D.addEventListener){D.addEventListener(A,B,false);}else{if(D.attachEvent){D.attachEvent("on"+A,B);}else{var C=D["on"+A];D["on"+A]=("function"!==typeof C)?B:function(E){return(C.call(this,E)!==false)&&(B.call(this,E)!==false);};}}}};JsonFx.UI.removeHandler=function(C,A,B){if("function"!==typeof B){C["on"+A]=null;return;}if("undefined"!==typeof jQuery){jQuery(C).unbind(A,B);}else{if(C.addEventListener){C.removeEventListener(A,B,false);}else{if(C.attachEvent){C.detachEvent("on"+A,B);}else{C["on"+A]=null;}}}};JsonFx.UI.clear=function(A){if(!A){return;}if("undefined"!==typeof JsonFx.Bindings){JsonFx.Bindings.unbind(A);}while(A.lastChild){A.removeChild(A.lastChild);}};JsonFx.UI.hasClass=function(C,A){if(!C||!C.className||!A){return false;}var B=C.className.split(" ");for(var D=0;D<B.length;D++){if(B[D]===A){return true;}}return false;};JsonFx.UI.addClass=function(B,A){if(!B||!A){return;}B.className+=" "+A;};JsonFx.UI.removeClass=function(C,A){if(!C||!A){return;}var B=C.className.split(" ");for(var D=0;D<B.length;D++){if(!B[D]||B[D]===A){B.splice(D,1);D--;}}C.className=B.join(" ");};JsonFx.UI.findParent=function(B,A,C){if(!A){return null;}if(C){B=B.parentNode;}while(B){if(JsonFx.UI.hasClass(B,A)){return B;}B=B.parentNode;}return null;};JsonFx.UI.findChild=function(C,B,D){if(!B){return null;}var E,A=[];if(D){if(C&&C.childNodes){for(E=0;E<C.childNodes.length;E++){A.push(C.childNodes[E]);}}}else{A.push(C);}while(A.length){C=A.shift();if(JsonFx.UI.hasClass(C,B)){return C;}if(C&&C.childNodes){for(E=0;E<C.childNodes.length;E++){A.push(C.childNodes[E]);}}}return null;};JsonFx.UI.findPrev=function(B,A,C){if(!A){return null;}if(C){B=B.previousSibling;}while(B){if(JsonFx.UI.hasClass(B,A)){return B;}B=B.previousSibling;}return null;};JsonFx.UI.findNext=function(B,A,C){if(!A){return null;}if(C){B=B.nextSibling;}while(B){if(JsonFx.UI.hasClass(B,A)){return B;}B=B.nextSibling;}return null;};JsonFx.UI.bind=function(B,D,C,A){return JsonML.BST(B).bind(D,C,A);};}catch(ex){}try{if("undefined"===typeof JSON){throw new Error("JsonFx.History requires JSON");}var JsonFx;if("undefined"===typeof JsonFx){JsonFx={};}if("undefined"===typeof JsonFx.jsonReviver){JsonFx.jsonReviver=function(B,A){var C;if("string"===typeof A){C=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z)?$/.exec(A);if(C){if(C[7]){return new Date(Date.UTC(+C[1],+C[2]-1,+C[3],+C[4],+C[5],+C[6]));}else{return new Date(+C[1],+C[2]-1,+C[3],+C[4],+C[5],+C[6]);}}}return A;};}if("undefined"===typeof JsonFx.UI){JsonFx.UI={};}JsonFx.UI.getIFrameDocument=function(A){if(!A){return null;}if("undefined"!==typeof A.contentDocument){return A.contentDocument;}else{if("undefined"!==typeof A.contentWindow){return A.contentWindow.document;}else{if("undefined"!==typeof A.document){return A.document;}}}return A;};JsonFx.History={h:null,load:function(B,E,A,C){if(!B||"function"!==typeof E){return;}var D;if(!JsonFx.History.h){JsonFx.History.h={elem:B,callback:E,url:C};D=JsonFx.History.getState(JsonFx.History.h);if(D){E(D);}else{if(!B.onload&&A){JsonFx.History.h.callback=null;JsonFx.History.save(A);JsonFx.History.h.callback=E;}else{if(window.opera){JsonFx.History.h.elem=null;E(A);}}}}else{D=JsonFx.History.getState(JsonFx.History.h)||A;if(D&&JsonFx.History.h.callback){JsonFx.History.h.callback(D);}}},getState:function(C){if(!C){return null;}var A=JsonFx.UI.getIFrameDocument(C.elem);if(!A||!A.location||!A.body){return null;}var B=C.url?A.location.search:A.body.innerHTML;if(B&&C.url){B=B.substr(1);B=decodeURIComponent(B);}if(!B){return null;}try{return JSON.parse(B,JsonFx.jsonReviver);}catch(D){C.elem=null;return null;}},save:function(C){var B=JsonFx.History.h;if(!B){return false;}var A=JsonFx.UI.getIFrameDocument(B.elem);if(!A||!A.location||!A.write){if("function"===typeof B.callback){B.callback(C);}return true;}C=JSON.stringify(C,function(E,D){return D===""?"":D;});if(B.url){A.location.href=B.url+"?"+encodeURIComponent(C);}else{A.open();try{A.write(C);}finally{A.close();}}return true;}};}catch(ex){}try{var _gat,App;if("undefined"===typeof App){App={};}App.initGA=function(A){if("undefined"!==typeof _gat&&!window.location.port||window.location.port===80){App.gat=_gat._getTracker(A);App.gat._trackPageview();}};App.track=function(B){if(B&&"undefined"!==typeof App.gat){var A=window.location.protocol+"//"+window.location.host;B=B.replace(A,"");App.gat._trackPageview(B);}};if(document.location.hostname.toLowerCase().indexOf("jsonfx.net")>=0){jQuery(function(){App.initGA("UA-1294169-4");});}}catch(ex){}try{JsonFx.UA.setCssUserAgent();if("undefined"===typeof window.App){window.App={};}App.navItems=[{label:"Download",url:"/download/"},{label:"Features",url:"/features/"},{label:"CssUserAgent",url:"http://cssuseragent.org"},{label:"StarterKit",url:"http://starterkit.jsonfx.net"},{label:"BuildTools\u2122",url:"/buildtools/"},{label:"Examples",url:"http://code.google.com/p/jsonfx-examples/"}];JsonFx.Bindings.add("a.ExtLink",function(A){A.onclick=function(B){window.open(this.href);return false;};},function(A){A.onclick=null;});jQuery(function(){jQuery(".expando").click(function(){this.target.slideToggle("fast");var A=jQuery(this);if(A.hasClass("collapsed")){A.removeClass("collapsed").addClass("expanded");}else{A.removeClass("expanded").addClass("collapsed");}return false;}).dblclick(function(){jQuery(this).click();window.setTimeout(function(){JsonFx.UI.clearTextSelection();},1);return false;}).each(function(){this.target=this.nextSibling;while(this.target&&!this.target.tagName){this.target=this.target.nextSibling;}this.target=jQuery(this.target);var A=document.location.hash;if(!A||!this.id||A.substr(1)!==this.id){this.target.hide();jQuery(this).addClass("collapsed");}else{jQuery(this).addClass("expanded");}});});}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.NavItem=JsonML.BST(["li",{"class":"ButtonItem"}," ",["a",{href:function(){return this.data.url;},target:function(){return(this.data.url||"").indexOf("http")>=0?"_blank":"";},"class":function(){return this.getClasses(this.data);}},function(){return this.data.label;}]," "]);(function(){this.docPath=(document.location.pathname||"").toLowerCase();this.getClasses=function(A){return(this.docPath.indexOf(A.url)>=0)?"LinkButton LinkButton-Active":"LinkButton";};}).call(App.NavItem);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.Header=JsonML.BST(["div",{"class":"Banner"}," ",["a",{href:"/",style:"float:left"}," ",["img",{src:"/Images/JsonFxLogo_64.png",alt:"JsonFx.NET"}]," "]," ",["h1",{"class":"PageTitle"},function(){return this.getTitle();}]," ",["ul",{"class":"ButtonList NavBar"}," ",function(){return JsonML.BST(App.NavItem).dataBind(App.navItems,this.index,this.count);}," "]," "]);(function(){App.Header.getTitle=function(){var A=document.title;if(A&&A.indexOf("JsonFx ")>=0){A=A.substr(A.indexOf("JsonFx ")+7);}return A;};}).call(App.Header);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.zebraItem=JsonML.BST(["li",{"class":function(){return(this.index%2)?"ZebraItem ZebraItemAlt":"ZebraItem";}}," ",function(){return this.data;}," "]);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.jsonfxInfo=JsonML.BST(["div",{"class":"SideBar JsonFxInfo"}," ",["p","The latest version:"]," ",["ul",{"class":"ZebraList"}," ",function(){return App.zebraItem.dataBind("JsonFx "+App.JsonFxVersion);}," "]," ",["div",{"class":"DownloadButtons",style:"margin-top:1em"}," ",["a",{href:"/download/#ajax","class":"LinkButton"},"Download \u00BB"]," "]," "]);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.validation=JsonML.BST([""," ",["p",{style:"margin-top:1em"},"Avoid CSS hacks:"]," ",["ul",{"class":"BadgeList"}," ",["li",["a",{href:"http://validator.w3.org/","class":"BadgeLink XhtmlBadge",title:"W3C XHTML 1.0 Validation",onclick:"window.open(this.href+'check?uri='+window.location);return false;"}]," "]," ",["li",["a",{href:"http://jigsaw.w3.org/css-validator/","class":"BadgeLink CssBadge",title:"W3C CSS 2.1 Validation",onclick:"window.open(this.href+'validator?uri='+window.location);return false;"}]," "]," "]," "]);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.BrowserInfo=JsonML.BST(["div",{"class":"SideBar BrowserInfo"}," ",["p","Looks like you're using:"]," ",["ul",{"class":"ZebraList"}," ",function(){return JsonML.BST(App.zebraItem).dataBind(this.obj2Array(JsonFx.userAgent),this.index,this.count);}," "]," "]);(function(){this.obj2Array=function(C){var B=[];for(var A in C){if(C.hasOwnProperty(A)){B.push(A+" "+C[A]);}}return B;};}).call(App.BrowserInfo);}catch(ex){}try{var App;if("undefined"===typeof App){App={};}App.cultureInfo=JsonML.BST(["div",{"class":"SideBar BrowserInfo"}," ",["p","Your browser culture is:"]," ",["ul",{"class":"ZebraList"}," ",function(){return App.zebraItem.dataBind(JsonFx.Lang.getLang());}," "]," ",["p","Supported cultures:"]," ",["ul",{"class":"ZebraList"}," ",function(){return App.zebraItem.dataBind(["en (default)","en-GB","es","de","ja"]);}," "]," ",["p","Try changing your browser settings and notice how it affects the headings and examples."]," "]);}catch(ex){}