Merge branch 'develop' of https://source.jalview.org/git/jalview into develop
[jalview.git] / examples / jmol / Jmol2.js
1 /* 
2
3 Jmol2.js   (JSmol version)
4 author: Bob Hanson hansonr@stolaf.edu 5/24/2013 12:06:25 PM
5
6 Script replacement for legacy Jmol.js that uses JSmol instead.
7 Can be used to turn most legacy Jmol.js-based sites to JSmol.
8
9 BH 1/16/2014 10:33:46 PM adding serverURL indication, more notes
10 BH 1/13/2014 11:14:12 AM incorrect default for missing jmolInitialize() (should be ".")
11 BH 1/8/2014 5:56:15 AM simplified instructions; removed option for self.Info
12 BH 11/12/2013 6:34:22 AM adds jmolAppletInline()
13 BH 9/23/2013 10:07:16 PM adds set of loadInline functions
14 BH 9/19/2013 7:09:41 AM  fixed jmolSetTarget() to accept "0" as a suffix; use of undefined --> null
15
16 Summary:
17
18 You should not have to change any of your HTML pages.
19 You are going to replace Jmol.js, wherever that is, with this file.
20 You are going to replace all your JAR file with the ones in this distribution.
21 You are going to add about 1000 files in the jsmol/j2s directory to your website. 
22         Don't worry; only a few will be called. But you won't know which ones.
23 You will be able to switch from HTML5 to JAVA using ?_USE=SIGNED in the URL
24
25 Procedure:
26
27 1a) If you want to use HTML5, copy all jsmol/j2s/* files into a j2s subdirectory 
28                 in the directory that contains Jmol.js and your old Jmol jar files.
29
30 1b) If you are not using HTML5, change the "use" parameter below from "HTML5" to "JAVA" and save this file.
31                 Copy all the jsmol/java/* files into the directory containing your current JAR files. This adds
32                 four JNLP files as well and will replace all your JAR files.
33
34 2) Rename your current Jmol.js file Jmol_old.js in case you want to undo this.
35
36 3) Concatenate Jmol.min.js if you are not using jQuery (or Jmol.min.nojq.js if you are)
37          with this file to form a new file (Jmol.min.js first, then Jmol2.js) and replace your
38          current Jmol.js with it. Note that if you are using your own version of jQuery, it
39          must be version 1.9 or higher, and note that 2.0 or higher will not work with MSIE
40          used locally but accessing remote resources. See http://bugs.jquery.com/ticket/14876
41          
42 4) Try your page and see how it goes. You may still have some problems, because not all of the 
43          methods in the original Jmol.js are included here. Let me know if that's the case.
44
45 If you wish to change the directories your j2s or JAR files and override the default settings
46 (old JAR file location; j2s directory in the directory of those JAR files) and thus override
47 your current settings in your HTML files, then you can to that three ways:
48
49 a) You can change the parameters below to override what your pages already use by uncommenting
50          one or the other of the jarPath and j2sPath definitions. This will override jmolInitialize
51          in ALL your HTML files. 
52          
53 b) You can change your jmolInitialization call in an individual HTML file. This sets both 
54          the JAR path and the j2s path (as [jarPath]/j2s) together.
55
56 c) You can add lines to an individual HTML file along the lines of:
57
58                 Jmol.Info.jarPath = "../../Jmol"
59                 Jmol.Info.j2sPath = "../../JSmol"
60
61          or whatever. This will override jmolInitialize in that specific HTML file only. 
62  
63 Note that: 
64
65  -- FireFox works great. You will be able to read binary files from your local machine
66  -- Chrome can only read local files if started with the  --allow-file-access-from-files  flag
67                 and even then the files must be ASCII, not binary.
68  -- MSIE and Safari cannot work with local pages
69
70 */
71 (function(a,l){"object"===typeof module&&"object"===typeof module.exports?module.exports=a.document?l(a,!0):function(a){if(!a.document)throw Error("jQuery requires a window with a document");return l(a)}:l(a)})("undefined"!==typeof window?window:this,function(a,l){function k(f){var w=f.length,a=g.type(f);return"function"===a||g.isWindow(f)?!1:1===f.nodeType&&w?!0:"array"===a||0===w||"number"===typeof w&&0<w&&w-1 in f}function h(f,w,a){if(g.isFunction(w))return g.grep(f,function(f,g){return!!w.call(f,
72 g,f)!==a});if(w.nodeType)return g.grep(f,function(f){return f===w!==a});if("string"===typeof w){if(Vc.test(w))return g.filter(w,f,a);w=g.filter(w,f)}return g.grep(f,function(f){return 0<=g.inArray(f,w)!==a})}function d(f,w){do f=f[w];while(f&&1!==f.nodeType);return f}function n(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",s,!1),a.removeEventListener("load",s,!1)):(z.detachEvent("onreadystatechange",s),a.detachEvent("onload",s))}function s(){if(z.addEventListener||"load"===event.type||
73 "complete"===z.readyState)n(),g.ready()}function r(f,w,a){if(void 0===a&&1===f.nodeType)if(a="data-"+w.replace(Wc,"-$1").toLowerCase(),a=f.getAttribute(a),"string"===typeof a){try{a="true"===a?!0:"false"===a?!1:"null"===a?null:+a+""===a?+a:Xc.test(a)?g.parseJSON(a):a}catch(x){}g.data(f,w,a)}else a=void 0;return a}function b(f){for(var a in f)if(!("data"===a&&g.isEmptyObject(f[a]))&&"toJSON"!==a)return!1;return!0}function e(f,a,p,x){if(g.acceptData(f)){var b=g.expando,j=f.nodeType,c=j?g.cache:f,e=
74 j?f[b]:f[b]&&b;if(e&&c[e]&&(x||c[e].data)||!(void 0===p&&"string"===typeof a)){e||(e=j?f[b]=m.pop()||g.guid++:b);c[e]||(c[e]=j?{}:{toJSON:g.noop});if("object"===typeof a||"function"===typeof a)x?c[e]=g.extend(c[e],a):c[e].data=g.extend(c[e].data,a);f=c[e];x||(f.data||(f.data={}),f=f.data);void 0!==p&&(f[g.camelCase(a)]=p);"string"===typeof a?(p=f[a],null==p&&(p=f[g.camelCase(a)])):p=f;return p}}}function c(f,a,p){if(g.acceptData(f)){var x,j,c=f.nodeType,e=c?g.cache:f,d=c?f[g.expando]:g.expando;if(e[d]){if(a&&
75 (x=p?e[d]:e[d].data)){g.isArray(a)?a=a.concat(g.map(a,g.camelCase)):a in x?a=[a]:(a=g.camelCase(a),a=a in x?[a]:a.split(" "));for(j=a.length;j--;)delete x[a[j]];if(p?!b(x):!g.isEmptyObject(x))return}if(!p&&(delete e[d].data,!b(e[d])))return;c?g.cleanData([f],!0):v.deleteExpando||e!=e.window?delete e[d]:e[d]=null}}}function q(){return!0}function B(){return!1}function O(){try{return z.activeElement}catch(f){}}function T(f){var a=mc.split("|");f=f.createDocumentFragment();if(f.createElement)for(;a.length;)f.createElement(a.pop());
76 return f}function M(f,a){var p,x,b=0,j=typeof f.getElementsByTagName!==ja?f.getElementsByTagName(a||"*"):typeof f.querySelectorAll!==ja?f.querySelectorAll(a||"*"):void 0;if(!j){j=[];for(p=f.childNodes||f;null!=(x=p[b]);b++)!a||g.nodeName(x,a)?j.push(x):g.merge(j,M(x,a))}return void 0===a||a&&g.nodeName(f,a)?g.merge([f],j):j}function rb(f){Nb.test(f.type)&&(f.defaultChecked=f.checked)}function Ka(f,a){return g.nodeName(f,"table")&&g.nodeName(11!==a.nodeType?a:a.firstChild,"tr")?f.getElementsByTagName("tbody")[0]||
77 f.appendChild(f.ownerDocument.createElement("tbody")):f}function K(f){f.type=(null!==g.find.attr(f,"type"))+"/"+f.type;return f}function da(f){var a=Yc.exec(f.type);a?f.type=a[1]:f.removeAttribute("type");return f}function Wa(f,a){for(var p,x=0;null!=(p=f[x]);x++)g._data(p,"globalEval",!a||g._data(a[x],"globalEval"))}function ya(f,a){if(1===a.nodeType&&g.hasData(f)){var p,x,b;x=g._data(f);var j=g._data(a,x),c=x.events;if(c)for(p in delete j.handle,j.events={},c){x=0;for(b=c[p].length;x<b;x++)g.event.add(a,
78 p,c[p][x])}j.data&&(j.data=g.extend({},j.data))}}function za(f,w){var p=g(w.createElement(f)).appendTo(w.body),x=a.getDefaultComputedStyle?a.getDefaultComputedStyle(p[0]).display:g.css(p[0],"display");p.detach();return x}function La(f){var a=z,p=nc[f];if(!p){p=za(f,a);if("none"===p||!p)fb=(fb||g("<iframe frameborder='0' width='0' height='0'/>")).appendTo(a.documentElement),a=(fb[0].contentWindow||fb[0].contentDocument).document,a.write(),a.close(),p=za(f,a),fb.detach();nc[f]=p}return p}function pa(f,
79 a){return{get:function(){var p=f();if(null!=p)if(p)delete this.get;else return(this.get=a).apply(this,arguments)}}}function gb(f,a){if(a in f)return a;for(var p=a.charAt(0).toUpperCase()+a.slice(1),x=a,g=oc.length;g--;)if(a=oc[g]+p,a in f)return a;return x}function A(f,a){for(var p,x,b,j=[],c=0,e=f.length;c<e;c++)if(x=f[c],x.style)if(j[c]=g._data(x,"olddisplay"),p=x.style.display,a)!j[c]&&"none"===p&&(x.style.display=""),""===x.style.display&&hb(x)&&(j[c]=g._data(x,"olddisplay",La(x.nodeName)));else if(!j[c]&&
80 (b=hb(x),p&&"none"!==p||!b))g._data(x,"olddisplay",b?p:g.css(x,"display"));for(c=0;c<e;c++)if(x=f[c],x.style&&(!a||"none"===x.style.display||""===x.style.display))x.style.display=a?j[c]||"":"none";return f}function V(f,a,p){return(f=Zc.exec(a))?Math.max(0,f[1]-(p||0))+(f[2]||"px"):a}function aa(f,a,p,x,b){a=p===(x?"border":"content")?4:"width"===a?1:0;for(var j=0;4>a;a+=2)"margin"===p&&(j+=g.css(f,p+Ma[a],!0,b)),x?("content"===p&&(j-=g.css(f,"padding"+Ma[a],!0,b)),"margin"!==p&&(j-=g.css(f,"border"+
81 Ma[a]+"Width",!0,b))):(j+=g.css(f,"padding"+Ma[a],!0,b),"padding"!==p&&(j+=g.css(f,"border"+Ma[a]+"Width",!0,b)));return j}function fa(f,a,p){var x=!0,b="width"===a?f.offsetWidth:f.offsetHeight,j=Na(f),c=v.boxSizing()&&"border-box"===g.css(f,"boxSizing",!1,j);if(0>=b||null==b){b=Oa(f,a,j);if(0>b||null==b)b=f.style[a];if(sb.test(b))return b;x=c&&(v.boxSizingReliable()||b===f.style[a]);b=parseFloat(b)||0}return b+aa(f,a,p||(c?"border":"content"),x,j)+"px"}function C(f,a,p,x,b){return new C.prototype.init(f,
82 a,p,x,b)}function ua(){setTimeout(function(){Xa=void 0});return Xa=g.now()}function qa(f,a){var p,x={height:f},b=0;for(a=a?1:0;4>b;b+=2-a)p=Ma[b],x["margin"+p]=x["padding"+p]=f;a&&(x.opacity=x.width=f);return x}function ib(f,a,p){for(var b,g=(jb[a]||[]).concat(jb["*"]),j=0,c=g.length;j<c;j++)if(b=g[j].call(p,a,f))return b}function tb(f,a,p){var b,j,c=0,e=ub.length,d=g.Deferred().always(function(){delete t.elem}),t=function(){if(j)return!1;for(var a=Xa||ua(),a=Math.max(0,m.startTime+m.duration-a),
83 w=1-(a/m.duration||0),p=0,b=m.tweens.length;p<b;p++)m.tweens[p].run(w);d.notifyWith(f,[m,w,a]);if(1>w&&b)return a;d.resolveWith(f,[m]);return!1},m=d.promise({elem:f,props:g.extend({},a),opts:g.extend(!0,{specialEasing:{}},p),originalProperties:a,originalOptions:p,startTime:Xa||ua(),duration:p.duration,tweens:[],createTween:function(a,w){var p=g.Tween(f,m.opts,a,w,m.opts.specialEasing[a]||m.opts.easing);m.tweens.push(p);return p},stop:function(a){var w=0,p=a?m.tweens.length:0;if(j)return this;for(j=
84 !0;w<p;w++)m.tweens[w].run(1);a?d.resolveWith(f,[m,a]):d.rejectWith(f,[m,a]);return this}});a=m.props;p=m.opts.specialEasing;var q,h,k,u;for(b in a)if(q=g.camelCase(b),h=p[q],k=a[b],g.isArray(k)&&(h=k[1],k=a[b]=k[0]),b!==q&&(a[q]=k,delete a[b]),(u=g.cssHooks[q])&&"expand"in u)for(b in k=u.expand(k),delete a[q],k)b in a||(a[b]=k[b],p[b]=h);else p[q]=h;for(;c<e;c++)if(b=ub[c].call(m,f,a,m.opts))return b;g.map(a,ib,m);g.isFunction(m.opts.start)&&m.opts.start.call(f,m);g.fx.timer(g.extend(t,{elem:f,anim:m,
85 queue:m.opts.queue}));return m.progress(m.opts.progress).done(m.opts.done,m.opts.complete).fail(m.opts.fail).always(m.opts.always)}function kb(f){return function(a,p){"string"!==typeof a&&(p=a,a="*");var b,j=0,c=a.toLowerCase().match(va)||[];if(g.isFunction(p))for(;b=c[j++];)"+"===b.charAt(0)?(b=b.slice(1)||"*",(f[b]=f[b]||[]).unshift(p)):(f[b]=f[b]||[]).push(p)}}function ra(f,a,p,b){function j(d){var m;c[d]=!0;g.each(f[d]||[],function(f,g){var d=g(a,p,b);if("string"===typeof d&&!e&&!c[d])return a.dataTypes.unshift(d),
86 j(d),!1;if(e)return!(m=d)});return m}var c={},e=f===Ob;return j(a.dataTypes[0])||!c["*"]&&j("*")}function D(f,a){var p,b,j=g.ajaxSettings.flatOptions||{};for(b in a)void 0!==a[b]&&((j[b]?f:p||(p={}))[b]=a[b]);p&&g.extend(!0,f,p);return f}function W(f,a,p,b){var j;if(g.isArray(a))g.each(a,function(a,w){p||ad.test(f)?b(f,w):W(f+"["+("object"===typeof w?a:"")+"]",w,p,b)});else if(!p&&"object"===g.type(a))for(j in a)W(f+"["+j+"]",a[j],p,b);else b(f,a)}function X(f){try{return f?new a.ActiveXObject("Microsoft.XMLHTTP"):
87 new a.XMLHttpRequest}catch(w){}}function j(){try{return new a.XMLHttpRequest}catch(f){}}function t(f){return g.isWindow(f)?f:9===f.nodeType?f.defaultView||f.parentWindow:!1}var m=[],y=m.slice,E=m.concat,F=m.push,sa=m.indexOf,Ya={},bd=Ya.toString,Za=Ya.hasOwnProperty,Pb="".trim,v={},g=function(f,a){return new g.fn.init(f,a)},cd=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,dd=/^-ms-/,ed=/-([\da-z])/gi,P=function(f,a){return a.toUpperCase()};g.fn=g.prototype={jquery:"1.11.0",constructor:g,selector:"",length:0,
88 toArray:function(){return y.call(this)},get:function(f){return null!=f?0>f?this[f+this.length]:this[f]:y.call(this)},pushStack:function(f){f=g.merge(this.constructor(),f);f.prevObject=this;f.context=this.context;return f},each:function(f,a){return g.each(this,f,a)},map:function(f){return this.pushStack(g.map(this,function(a,p){return f.call(a,p,a)}))},slice:function(){return this.pushStack(y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(f){var a=
89 this.length;f=+f+(0>f?a:0);return this.pushStack(0<=f&&f<a?[this[f]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:m.sort,splice:m.splice};g.extend=g.fn.extend=function(){var f,a,p,b,j,c=arguments[0]||{},e=1,d=arguments.length,m=!1;"boolean"===typeof c&&(m=c,c=arguments[e]||{},e++);"object"!==typeof c&&!g.isFunction(c)&&(c={});e===d&&(c=this,e--);for(;e<d;e++)if(null!=(j=arguments[e]))for(b in j)f=c[b],p=j[b],c!==p&&(m&&p&&(g.isPlainObject(p)||(a=g.isArray(p)))?(a?
90 (a=!1,f=f&&g.isArray(f)?f:[]):f=f&&g.isPlainObject(f)?f:{},c[b]=g.extend(m,f,p)):void 0!==p&&(c[b]=p));return c};g.extend({expando:"jQuery"+("1.11.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(f){throw Error(f);},noop:function(){},isFunction:function(f){return"function"===g.type(f)},isArray:Array.isArray||function(f){return"array"===g.type(f)},isWindow:function(f){return null!=f&&f==f.window},isNumeric:function(f){return 0<=f-parseFloat(f)},isEmptyObject:function(f){for(var a in f)return!1;
91 return!0},isPlainObject:function(f){var a;if(!f||"object"!==g.type(f)||f.nodeType||g.isWindow(f))return!1;try{if(f.constructor&&!Za.call(f,"constructor")&&!Za.call(f.constructor.prototype,"isPrototypeOf"))return!1}catch(p){return!1}if(v.ownLast)for(a in f)return Za.call(f,a);for(a in f);return void 0===a||Za.call(f,a)},type:function(f){return null==f?f+"":"object"===typeof f||"function"===typeof f?Ya[bd.call(f)]||"object":typeof f},globalEval:function(f){f&&g.trim(f)&&(a.execScript||function(f){a.eval.call(a,
92 f)})(f)},camelCase:function(f){return f.replace(dd,"ms-").replace(ed,P)},nodeName:function(f,a){return f.nodeName&&f.nodeName.toLowerCase()===a.toLowerCase()},each:function(f,a,p){var b,g=0,j=f.length;b=k(f);if(p)if(b)for(;g<j&&!(b=a.apply(f[g],p),!1===b);g++);else for(g in f){if(b=a.apply(f[g],p),!1===b)break}else if(b)for(;g<j&&!(b=a.call(f[g],g,f[g]),!1===b);g++);else for(g in f)if(b=a.call(f[g],g,f[g]),!1===b)break;return f},trim:Pb&&!Pb.call("\ufeff\u00a0")?function(f){return null==f?"":Pb.call(f)}:
93 function(f){return null==f?"":(f+"").replace(cd,"")},makeArray:function(f,a){var p=a||[];null!=f&&(k(Object(f))?g.merge(p,"string"===typeof f?[f]:f):F.call(p,f));return p},inArray:function(f,a,p){var b;if(a){if(sa)return sa.call(a,f,p);b=a.length;for(p=p?0>p?Math.max(0,b+p):p:0;p<b;p++)if(p in a&&a[p]===f)return p}return-1},merge:function(f,a){for(var p=+a.length,b=0,g=f.length;b<p;)f[g++]=a[b++];if(p!==p)for(;void 0!==a[b];)f[g++]=a[b++];f.length=g;return f},grep:function(f,a,p){for(var b=[],g=0,
94 j=f.length,c=!p;g<j;g++)p=!a(f[g],g),p!==c&&b.push(f[g]);return b},map:function(f,a,p){var b,g=0,j=f.length,c=[];if(k(f))for(;g<j;g++)b=a(f[g],g,p),null!=b&&c.push(b);else for(g in f)b=a(f[g],g,p),null!=b&&c.push(b);return E.apply([],c)},guid:1,proxy:function(f,a){var p,b;"string"===typeof a&&(b=f[a],a=f,f=b);if(g.isFunction(f))return p=y.call(arguments,2),b=function(){return f.apply(a||this,p.concat(y.call(arguments)))},b.guid=f.guid=f.guid||g.guid++,b},now:function(){return+new Date},support:v});
95 g.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(f,a){Ya["[object "+a+"]"]=a.toLowerCase()});var Qb=a,H=function(f,a,p,b){var g,j,c,e,d;(a?a.ownerDocument||a:Y)!==R&&ka(a);a=a||R;p=p||[];if(!f||"string"!==typeof f)return p;if(1!==(e=a.nodeType)&&9!==e)return[];if(Z&&!b){if(g=fd.exec(f))if(c=g[1])if(9===e)if((j=a.getElementById(c))&&j.parentNode){if(j.id===c)return p.push(j),p}else return p;else{if(a.ownerDocument&&(j=a.ownerDocument.getElementById(c))&&ta(a,
96 j)&&j.id===c)return p.push(j),p}else{if(g[2])return Aa.apply(p,a.getElementsByTagName(f)),p;if((c=g[3])&&I.getElementsByClassName&&a.getElementsByClassName)return Aa.apply(p,a.getElementsByClassName(c)),p}if(I.qsa&&(!S||!S.test(f))){j=g=L;c=a;d=9===e&&f;if(1===e&&"object"!==a.nodeName.toLowerCase()){e=vb(f);(g=a.getAttribute("id"))?j=g.replace(gd,"\\$&"):a.setAttribute("id",j);j="[id='"+j+"'] ";for(c=e.length;c--;)e[c]=j+wb(e[c]);c=Rb.test(f)&&Sb(a.parentNode)||a;d=e.join(",")}if(d)try{return Aa.apply(p,
97 c.querySelectorAll(d)),p}catch(m){}finally{g||a.removeAttribute("id")}}}var t;a:{f=f.replace(xb,"$1");j=vb(f);if(!b&&1===j.length){g=j[0]=j[0].slice(0);if(2<g.length&&"ID"===(t=g[0]).type&&I.getById&&9===a.nodeType&&Z&&G.relative[g[1].type]){a=(G.find.ID(t.matches[0].replace(Ba,Ca),a)||[])[0];if(!a){t=p;break a}f=f.slice(g.shift().value.length)}for(e=yb.needsContext.test(f)?0:g.length;e--;){t=g[e];if(G.relative[c=t.type])break;if(c=G.find[c])if(b=c(t.matches[0].replace(Ba,Ca),Rb.test(g[0].type)&&
98 Sb(a.parentNode)||a)){g.splice(e,1);f=b.length&&wb(g);if(!f){Aa.apply(p,b);t=p;break a}break}}}Da(f,j)(b,a,!Z,p,Rb.test(f)&&Sb(a.parentNode)||a);t=p}return t},Tb=function(){function f(p,b){a.push(p+" ")>G.cacheLength&&delete f[a.shift()];return f[p+" "]=b}var a=[];return f},la=function(f){f[L]=!0;return f},ma=function(f){var a=R.createElement("div");try{return!!f(a)}catch(p){return!1}finally{a.parentNode&&a.parentNode.removeChild(a)}},Ub=function(f,a){for(var p=f.split("|"),b=f.length;b--;)G.attrHandle[p[b]]=
99 a},pc=function(f,a){var p=a&&f,b=p&&1===f.nodeType&&1===a.nodeType&&(~a.sourceIndex||ba)-(~f.sourceIndex||ba);if(b)return b;if(p)for(;p=p.nextSibling;)if(p===a)return-1;return f?1:-1},hd=function(f){return function(a){return"input"===a.nodeName.toLowerCase()&&a.type===f}},id=function(f){return function(a){var p=a.nodeName.toLowerCase();return("input"===p||"button"===p)&&a.type===f}},U=function(f){return la(function(a){a=+a;return la(function(p,b){for(var g,j=f([],p.length,a),c=j.length;c--;)if(p[g=
100 j[c]])p[g]=!(b[g]=p[g])})})},Sb=function(f){return f&&typeof f.getElementsByTagName!==ga&&f},qc=function(){},vb=function(f,a){var p,b,g,j,c,e,d;if(c=Ea[f+" "])return a?0:c.slice(0);c=f;e=[];for(d=G.preFilter;c;){if(!p||(b=jd.exec(c)))b&&(c=c.slice(b[0].length)||c),e.push(g=[]);p=!1;if(b=kd.exec(c))p=b.shift(),g.push({value:p,type:b[0].replace(xb," ")}),c=c.slice(p.length);for(j in G.filter)if((b=yb[j].exec(c))&&(!d[j]||(b=d[j](b))))p=b.shift(),g.push({value:p,type:j,matches:b}),c=c.slice(p.length);
101 if(!p)break}return a?c.length:c?H.error(f):Ea(f,e).slice(0)},wb=function(f){for(var a=0,p=f.length,b="";a<p;a++)b+=f[a].value;return b},Vb=function(f,a,p){var b=a.dir,g=p&&"parentNode"===b,j=ld++;return a.first?function(a,p,w){for(;a=a[b];)if(1===a.nodeType||g)return f(a,p,w)}:function(a,p,w){var c,e,d=[ca,j];if(w)for(;a=a[b];){if((1===a.nodeType||g)&&f(a,p,w))return!0}else for(;a=a[b];)if(1===a.nodeType||g){e=a[L]||(a[L]={});if((c=e[b])&&c[0]===ca&&c[1]===j)return d[2]=c[2];e[b]=d;if(d[2]=f(a,p,
102 w))return!0}}},Wb=function(f){return 1<f.length?function(a,p,b){for(var g=f.length;g--;)if(!f[g](a,p,b))return!1;return!0}:f[0]},Pa=function(f,a,p,b,g){for(var j,c=[],e=0,d=f.length,m=null!=a;e<d;e++)if(j=f[e])if(!p||p(j,b,g))c.push(j),m&&a.push(e);return c},$a=function(f,a,p,b,g,j){b&&!b[L]&&(b=$a(b));g&&!g[L]&&(g=$a(g,j));return la(function(j,c,e,d){var m,t,Ja=[],q=[],k=c.length,h;if(!(h=j)){h=a||"*";for(var u=e.nodeType?[e]:e,n=[],y=0,B=u.length;y<B;y++)H(h,u[y],n);h=n}h=f&&(j||!a)?Pa(h,Ja,f,e,
103 d):h;u=p?g||(j?f:k||b)?[]:c:h;p&&p(h,u,e,d);if(b){m=Pa(u,q);b(m,[],e,d);for(e=m.length;e--;)if(t=m[e])u[q[e]]=!(h[q[e]]=t)}if(j){if(g||f){if(g){m=[];for(e=u.length;e--;)if(t=u[e])m.push(h[e]=t);g(null,u=[],m,d)}for(e=u.length;e--;)if((t=u[e])&&-1<(m=g?Qa.call(j,t):Ja[e]))j[m]=!(c[m]=t)}}else u=Pa(u===c?u.splice(k,u.length):u),g?g(null,c,u,d):Aa.apply(c,u)})},ab=function(f){var a,p,b,g=f.length,j=G.relative[f[0].type];p=j||G.relative[" "];for(var c=j?1:0,e=Vb(function(f){return f===a},p,!0),d=Vb(function(f){return-1<
104 Qa.call(a,f)},p,!0),m=[function(f,p,b){return!j&&(b||p!==Ra)||((a=p).nodeType?e(f,p,b):d(f,p,b))}];c<g;c++)if(p=G.relative[f[c].type])m=[Vb(Wb(m),p)];else{p=G.filter[f[c].type].apply(null,f[c].matches);if(p[L]){for(b=++c;b<g&&!G.relative[f[b].type];b++);return $a(1<c&&Wb(m),1<c&&wb(f.slice(0,c-1).concat({value:" "===f[c-2].type?"*":""})).replace(xb,"$1"),p,c<b&&ab(f.slice(c,b)),b<g&&ab(f=f.slice(b)),b<g&&wb(f))}m.push(p)}return Wb(m)},Q,I,G,Sa,rc,Da,Ra,na,wa,ka,R,ha,Z,S,ea,Fa,ta,L="sizzle"+-new Date,
105 Y=Qb.document,ca=0,ld=0,sc=Tb(),Ea=Tb(),xa=Tb(),u=function(f,a){f===a&&(wa=!0);return 0},ga="undefined",ba=-2147483648,oa={}.hasOwnProperty,N=[],bb=N.pop,md=N.push,Aa=N.push,tc=N.slice,Qa=N.indexOf||function(f){for(var a=0,p=this.length;a<p;a++)if(this[a]===f)return a;return-1},uc="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),vc="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+uc+")|)|)[\\x20\\t\\r\\n\\f]*\\]",
106 Xb=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+vc.replace(3,8)+")*)|.*)\\)|)",xb=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),jd=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,kd=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,nd=RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),od=RegExp(Xb),pd=RegExp("^"+uc+"$"),yb={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,
107 TAG:RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+vc),PSEUDO:RegExp("^"+Xb),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)",
108 "i")},qd=/^(?:input|select|textarea|button)$/i,rd=/^h\d$/i,lb=/^[^{]+\{\s*\[native \w/,fd=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Rb=/[+~]/,gd=/'|\\/g,Ba=RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),Ca=function(f,a,p){f="0x"+a-65536;return f!==f||p?a:0>f?String.fromCharCode(f+65536):String.fromCharCode(f>>10|55296,f&1023|56320)};try{Aa.apply(N=tc.call(Y.childNodes),Y.childNodes),N[Y.childNodes.length].nodeType}catch(Yd){Aa={apply:N.length?function(f,a){md.apply(f,tc.call(a))}:
109 function(f,a){for(var p=f.length,b=0;f[p++]=a[b++];);f.length=p-1}}}I=H.support={};rc=H.isXML=function(f){return(f=f&&(f.ownerDocument||f).documentElement)?"HTML"!==f.nodeName:!1};ka=H.setDocument=function(f){var a=f?f.ownerDocument||f:Y;f=a.defaultView;if(a===R||9!==a.nodeType||!a.documentElement)return R;R=a;ha=a.documentElement;Z=!rc(a);f&&f!==f.top&&(f.addEventListener?f.addEventListener("unload",function(){ka()},!1):f.attachEvent&&f.attachEvent("onunload",function(){ka()}));I.attributes=ma(function(f){f.className=
110 "i";return!f.getAttribute("className")});I.getElementsByTagName=ma(function(f){f.appendChild(a.createComment(""));return!f.getElementsByTagName("*").length});I.getElementsByClassName=lb.test(a.getElementsByClassName)&&ma(function(f){f.innerHTML="<div class='a'></div><div class='a i'></div>";f.firstChild.className="i";return 2===f.getElementsByClassName("i").length});I.getById=ma(function(f){ha.appendChild(f).id=L;return!a.getElementsByName||!a.getElementsByName(L).length});I.getById?(G.find.ID=function(f,
111 a){if(typeof a.getElementById!==ga&&Z){var b=a.getElementById(f);return b&&b.parentNode?[b]:[]}},G.filter.ID=function(f){var a=f.replace(Ba,Ca);return function(f){return f.getAttribute("id")===a}}):(delete G.find.ID,G.filter.ID=function(f){var a=f.replace(Ba,Ca);return function(f){return(f=typeof f.getAttributeNode!==ga&&f.getAttributeNode("id"))&&f.value===a}});G.find.TAG=I.getElementsByTagName?function(f,a){if(typeof a.getElementsByTagName!==ga)return a.getElementsByTagName(f)}:function(f,a){var b,
112 w=[],g=0,j=a.getElementsByTagName(f);if("*"===f){for(;b=j[g++];)1===b.nodeType&&w.push(b);return w}return j};G.find.CLASS=I.getElementsByClassName&&function(f,a){if(typeof a.getElementsByClassName!==ga&&Z)return a.getElementsByClassName(f)};ea=[];S=[];if(I.qsa=lb.test(a.querySelectorAll))ma(function(f){f.innerHTML="<select t=''><option selected=''></option></select>";f.querySelectorAll("[t^='']").length&&S.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");f.querySelectorAll("[selected]").length||S.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
113 f.querySelectorAll(":checked").length||S.push(":checked")}),ma(function(f){var b=a.createElement("input");b.setAttribute("type","hidden");f.appendChild(b).setAttribute("name","D");f.querySelectorAll("[name=d]").length&&S.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");f.querySelectorAll(":enabled").length||S.push(":enabled",":disabled");f.querySelectorAll("*,:x");S.push(",.*:")});(I.matchesSelector=lb.test(Fa=ha.webkitMatchesSelector||ha.mozMatchesSelector||ha.oMatchesSelector||ha.msMatchesSelector))&&
114 ma(function(f){I.disconnectedMatch=Fa.call(f,"div");Fa.call(f,"[s!='']:x");ea.push("!=",Xb)});S=S.length&&RegExp(S.join("|"));ea=ea.length&&RegExp(ea.join("|"));ta=(f=lb.test(ha.compareDocumentPosition))||lb.test(ha.contains)?function(f,a){var b=9===f.nodeType?f.documentElement:f,w=a&&a.parentNode;return f===w||!(!w||!(1===w.nodeType&&(b.contains?b.contains(w):f.compareDocumentPosition&&f.compareDocumentPosition(w)&16)))}:function(f,a){if(a)for(;a=a.parentNode;)if(a===f)return!0;return!1};u=f?function(f,
115 b){if(f===b)return wa=!0,0;var g=!f.compareDocumentPosition-!b.compareDocumentPosition;if(g)return g;g=(f.ownerDocument||f)===(b.ownerDocument||b)?f.compareDocumentPosition(b):1;return g&1||!I.sortDetached&&b.compareDocumentPosition(f)===g?f===a||f.ownerDocument===Y&&ta(Y,f)?-1:b===a||b.ownerDocument===Y&&ta(Y,b)?1:na?Qa.call(na,f)-Qa.call(na,b):0:g&4?-1:1}:function(f,b){if(f===b)return wa=!0,0;var g,j=0;g=f.parentNode;var c=b.parentNode,e=[f],d=[b];if(!g||!c)return f===a?-1:b===a?1:g?-1:c?1:na?Qa.call(na,
116 f)-Qa.call(na,b):0;if(g===c)return pc(f,b);for(g=f;g=g.parentNode;)e.unshift(g);for(g=b;g=g.parentNode;)d.unshift(g);for(;e[j]===d[j];)j++;return j?pc(e[j],d[j]):e[j]===Y?-1:d[j]===Y?1:0};return a};H.matches=function(f,a){return H(f,null,null,a)};H.matchesSelector=function(f,a){(f.ownerDocument||f)!==R&&ka(f);a=a.replace(nd,"='$1']");if(I.matchesSelector&&Z&&(!ea||!ea.test(a))&&(!S||!S.test(a)))try{var p=Fa.call(f,a);if(p||I.disconnectedMatch||f.document&&11!==f.document.nodeType)return p}catch(b){}return 0<
117 H(a,R,null,[f]).length};H.contains=function(f,a){(f.ownerDocument||f)!==R&&ka(f);return ta(f,a)};H.attr=function(f,a){(f.ownerDocument||f)!==R&&ka(f);var p=G.attrHandle[a.toLowerCase()],p=p&&oa.call(G.attrHandle,a.toLowerCase())?p(f,a,!Z):void 0;return void 0!==p?p:I.attributes||!Z?f.getAttribute(a):(p=f.getAttributeNode(a))&&p.specified?p.value:null};H.error=function(f){throw Error("Syntax error, unrecognized expression: "+f);};H.uniqueSort=function(f){var a,p=[],b=0,g=0;wa=!I.detectDuplicates;na=
118 !I.sortStable&&f.slice(0);f.sort(u);if(wa){for(;a=f[g++];)a===f[g]&&(b=p.push(g));for(;b--;)f.splice(p[b],1)}na=null;return f};Sa=H.getText=function(f){var a,b="",g=0;if(a=f.nodeType)if(1===a||9===a||11===a){if("string"===typeof f.textContent)return f.textContent;for(f=f.firstChild;f;f=f.nextSibling)b+=Sa(f)}else{if(3===a||4===a)return f.nodeValue}else for(;a=f[g++];)b+=Sa(a);return b};G=H.selectors={cacheLength:50,createPseudo:la,match:yb,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0},
119 " ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(f){f[1]=f[1].replace(Ba,Ca);f[3]=(f[4]||f[5]||"").replace(Ba,Ca);"~="===f[2]&&(f[3]=" "+f[3]+" ");return f.slice(0,4)},CHILD:function(f){f[1]=f[1].toLowerCase();"nth"===f[1].slice(0,3)?(f[3]||H.error(f[0]),f[4]=+(f[4]?f[5]+(f[6]||1):2*("even"===f[3]||"odd"===f[3])),f[5]=+(f[7]+f[8]||"odd"===f[3])):f[3]&&H.error(f[0]);return f},PSEUDO:function(f){var a,b=!f[5]&&f[2];if(yb.CHILD.test(f[0]))return null;
120 if(f[3]&&void 0!==f[4])f[2]=f[4];else if(b&&od.test(b)&&(a=vb(b,!0))&&(a=b.indexOf(")",b.length-a)-b.length))f[0]=f[0].slice(0,a),f[2]=b.slice(0,a);return f.slice(0,3)}},filter:{TAG:function(f){var a=f.replace(Ba,Ca).toLowerCase();return"*"===f?function(){return!0}:function(f){return f.nodeName&&f.nodeName.toLowerCase()===a}},CLASS:function(f){var a=sc[f+" "];return a||(a=RegExp("(^|[\\x20\\t\\r\\n\\f])"+f+"([\\x20\\t\\r\\n\\f]|$)"))&&sc(f,function(f){return a.test("string"===typeof f.className&&
121 f.className||typeof f.getAttribute!==ga&&f.getAttribute("class")||"")})},ATTR:function(f,a,b){return function(g){g=H.attr(g,f);if(null==g)return"!="===a;if(!a)return!0;g+="";return"="===a?g===b:"!="===a?g!==b:"^="===a?b&&0===g.indexOf(b):"*="===a?b&&-1<g.indexOf(b):"$="===a?b&&g.slice(-b.length)===b:"~="===a?-1<(" "+g+" ").indexOf(b):"|="===a?g===b||g.slice(0,b.length+1)===b+"-":!1}},CHILD:function(f,a,b,g,j){var c="nth"!==f.slice(0,3),e="last"!==f.slice(-4),d="of-type"===a;return 1===g&&0===j?function(f){return!!f.parentNode}:
122 function(a,b,p){var w,m,t,q,h;b=c!==e?"nextSibling":"previousSibling";var k=a.parentNode,u=d&&a.nodeName.toLowerCase();p=!p&&!d;if(k){if(c){for(;b;){for(m=a;m=m[b];)if(d?m.nodeName.toLowerCase()===u:1===m.nodeType)return!1;h=b="only"===f&&!h&&"nextSibling"}return!0}h=[e?k.firstChild:k.lastChild];if(e&&p){p=k[L]||(k[L]={});w=p[f]||[];q=w[0]===ca&&w[1];t=w[0]===ca&&w[2];for(m=q&&k.childNodes[q];m=++q&&m&&m[b]||(t=q=0)||h.pop();)if(1===m.nodeType&&++t&&m===a){p[f]=[ca,q,t];break}}else if(p&&(w=(a[L]||
123 (a[L]={}))[f])&&w[0]===ca)t=w[1];else for(;m=++q&&m&&m[b]||(t=q=0)||h.pop();)if((d?m.nodeName.toLowerCase()===u:1===m.nodeType)&&++t)if(p&&((m[L]||(m[L]={}))[f]=[ca,t]),m===a)break;t-=j;return t===g||0===t%g&&0<=t/g}}},PSEUDO:function(f,a){var b,g=G.pseudos[f]||G.setFilters[f.toLowerCase()]||H.error("unsupported pseudo: "+f);return g[L]?g(a):1<g.length?(b=[f,f,"",a],G.setFilters.hasOwnProperty(f.toLowerCase())?la(function(f,b){for(var p,j=g(f,a),c=j.length;c--;)p=Qa.call(f,j[c]),f[p]=!(b[p]=j[c])}):
124 function(f){return g(f,0,b)}):g}},pseudos:{not:la(function(f){var a=[],b=[],g=Da(f.replace(xb,"$1"));return g[L]?la(function(f,a,b,p){p=g(f,null,p,[]);for(var w=f.length;w--;)if(b=p[w])f[w]=!(a[w]=b)}):function(f,j,c){a[0]=f;g(a,null,c,b);return!b.pop()}}),has:la(function(f){return function(a){return 0<H(f,a).length}}),contains:la(function(f){return function(a){return-1<(a.textContent||a.innerText||Sa(a)).indexOf(f)}}),lang:la(function(f){pd.test(f||"")||H.error("unsupported lang: "+f);f=f.replace(Ba,
125 Ca).toLowerCase();return function(a){var b;do if(b=Z?a.lang:a.getAttribute("xml:lang")||a.getAttribute("lang"))return b=b.toLowerCase(),b===f||0===b.indexOf(f+"-");while((a=a.parentNode)&&1===a.nodeType);return!1}}),target:function(f){var a=Qb.location&&Qb.location.hash;return a&&a.slice(1)===f.id},root:function(f){return f===ha},focus:function(f){return f===R.activeElement&&(!R.hasFocus||R.hasFocus())&&!(!f.type&&!f.href&&!~f.tabIndex)},enabled:function(f){return!1===f.disabled},disabled:function(f){return!0===
126 f.disabled},checked:function(f){var a=f.nodeName.toLowerCase();return"input"===a&&!!f.checked||"option"===a&&!!f.selected},selected:function(f){f.parentNode&&f.parentNode.selectedIndex;return!0===f.selected},empty:function(f){for(f=f.firstChild;f;f=f.nextSibling)if(6>f.nodeType)return!1;return!0},parent:function(f){return!G.pseudos.empty(f)},header:function(f){return rd.test(f.nodeName)},input:function(f){return qd.test(f.nodeName)},button:function(f){var a=f.nodeName.toLowerCase();return"input"===
127 a&&"button"===f.type||"button"===a},text:function(f){var a;return"input"===f.nodeName.toLowerCase()&&"text"===f.type&&(null==(a=f.getAttribute("type"))||"text"===a.toLowerCase())},first:U(function(){return[0]}),last:U(function(f,a){return[a-1]}),eq:U(function(f,a,b){return[0>b?b+a:b]}),even:U(function(f,a){for(var b=0;b<a;b+=2)f.push(b);return f}),odd:U(function(f,a){for(var b=1;b<a;b+=2)f.push(b);return f}),lt:U(function(f,a,b){for(a=0>b?b+a:b;0<=--a;)f.push(a);return f}),gt:U(function(f,a,b){for(b=
128 0>b?b+a:b;++b<a;)f.push(b);return f})}};G.pseudos.nth=G.pseudos.eq;for(Q in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})G.pseudos[Q]=hd(Q);for(Q in{submit:!0,reset:!0})G.pseudos[Q]=id(Q);qc.prototype=G.filters=G.pseudos;G.setFilters=new qc;Da=H.compile=function(f,a){var b,g=[],j=[],c=xa[f+" "];if(!c){a||(a=vb(f));for(b=a.length;b--;)c=ab(a[b]),c[L]?g.push(c):j.push(c);var e=0<g.length,d=0<j.length;b=function(f,a,b,p,w){var c,m,t,q=0,h="0",Ja=f&&[],k=[],u=Ra,n=f||d&&G.find.TAG("*",w),y=ca+=
129 null==u?1:Math.random()||0.1,B=n.length;for(w&&(Ra=a!==R&&a);h!==B&&null!=(c=n[h]);h++){if(d&&c){for(m=0;t=j[m++];)if(t(c,a,b)){p.push(c);break}w&&(ca=y)}e&&((c=!t&&c)&&q--,f&&Ja.push(c))}q+=h;if(e&&h!==q){for(m=0;t=g[m++];)t(Ja,k,a,b);if(f){if(0<q)for(;h--;)!Ja[h]&&!k[h]&&(k[h]=bb.call(p));k=Pa(k)}Aa.apply(p,k);w&&(!f&&0<k.length&&1<q+g.length)&&H.uniqueSort(p)}w&&(ca=y,Ra=u);return Ja};b=e?la(b):b;c=xa(f,b)}return c};I.sortStable=L.split("").sort(u).join("")===L;I.detectDuplicates=!!wa;ka();I.sortDetached=
130 ma(function(f){return f.compareDocumentPosition(R.createElement("div"))&1});ma(function(f){f.innerHTML="<a href='#'></a>";return"#"===f.firstChild.getAttribute("href")})||Ub("type|href|height|width",function(f,a,b){if(!b)return f.getAttribute(a,"type"===a.toLowerCase()?1:2)});(!I.attributes||!ma(function(f){f.innerHTML="<input/>";f.firstChild.setAttribute("value","");return""===f.firstChild.getAttribute("value")}))&&Ub("value",function(f,a,b){if(!b&&"input"===f.nodeName.toLowerCase())return f.defaultValue});
131 ma(function(f){return null==f.getAttribute("disabled")})||Ub("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(f,a,b){var g;if(!b)return!0===f[a]?a.toLowerCase():(g=f.getAttributeNode(a))&&g.specified?g.value:null});g.find=H;g.expr=H.selectors;g.expr[":"]=g.expr.pseudos;g.unique=H.uniqueSort;g.text=H.getText;g.isXMLDoc=H.isXML;g.contains=H.contains;var wc=g.expr.match.needsContext,xc=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Vc=
132 /^.[^:#\[\.,]*$/;g.filter=function(f,a,b){var j=a[0];b&&(f=":not("+f+")");return 1===a.length&&1===j.nodeType?g.find.matchesSelector(j,f)?[j]:[]:g.find.matches(f,g.grep(a,function(f){return 1===f.nodeType}))};g.fn.extend({find:function(f){var a,b=[],j=this,c=j.length;if("string"!==typeof f)return this.pushStack(g(f).filter(function(){for(a=0;a<c;a++)if(g.contains(j[a],this))return!0}));for(a=0;a<c;a++)g.find(f,j[a],b);b=this.pushStack(1<c?g.unique(b):b);b.selector=this.selector?this.selector+" "+
133 f:f;return b},filter:function(f){return this.pushStack(h(this,f||[],!1))},not:function(f){return this.pushStack(h(this,f||[],!0))},is:function(f){return!!h(this,"string"===typeof f&&wc.test(f)?g(f):f||[],!1).length}});var mb,z=a.document,sd=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(g.fn.init=function(f,a){var b,j;if(!f)return this;if("string"===typeof f){if((b="<"===f.charAt(0)&&">"===f.charAt(f.length-1)&&3<=f.length?[null,f,null]:sd.exec(f))&&(b[1]||!a)){if(b[1]){if(a=a instanceof g?a[0]:a,g.merge(this,
134 g.parseHTML(b[1],a&&a.nodeType?a.ownerDocument||a:z,!0)),xc.test(b[1])&&g.isPlainObject(a))for(b in a)if(g.isFunction(this[b]))this[b](a[b]);else this.attr(b,a[b])}else{if((j=z.getElementById(b[2]))&&j.parentNode){if(j.id!==b[2])return mb.find(f);this.length=1;this[0]=j}this.context=z;this.selector=f}return this}return!a||a.jquery?(a||mb).find(f):this.constructor(a).find(f)}if(f.nodeType)return this.context=this[0]=f,this.length=1,this;if(g.isFunction(f))return"undefined"!==typeof mb.ready?mb.ready(f):
135 f(g);void 0!==f.selector&&(this.selector=f.selector,this.context=f.context);return g.makeArray(f,this)}).prototype=g.fn;mb=g(z);var td=/^(?:parents|prev(?:Until|All))/,ud={children:!0,contents:!0,next:!0,prev:!0};g.extend({dir:function(f,a,b){var j=[];for(f=f[a];f&&9!==f.nodeType&&(void 0===b||1!==f.nodeType||!g(f).is(b));)1===f.nodeType&&j.push(f),f=f[a];return j},sibling:function(f,a){for(var b=[];f;f=f.nextSibling)1===f.nodeType&&f!==a&&b.push(f);return b}});g.fn.extend({has:function(f){var a,
136 b=g(f,this),j=b.length;return this.filter(function(){for(a=0;a<j;a++)if(g.contains(this,b[a]))return!0})},closest:function(f,a){for(var b,j=0,c=this.length,e=[],d=wc.test(f)||"string"!==typeof f?g(f,a||this.context):0;j<c;j++)for(b=this[j];b&&b!==a;b=b.parentNode)if(11>b.nodeType&&(d?-1<d.index(b):1===b.nodeType&&g.find.matchesSelector(b,f))){e.push(b);break}return this.pushStack(1<e.length?g.unique(e):e)},index:function(f){return!f?this[0]&&this[0].parentNode?this.first().prevAll().length:-1:"string"===
137 typeof f?g.inArray(this[0],g(f)):g.inArray(f.jquery?f[0]:f,this)},add:function(f,a){return this.pushStack(g.unique(g.merge(this.get(),g(f,a))))},addBack:function(f){return this.add(null==f?this.prevObject:this.prevObject.filter(f))}});g.each({parent:function(f){return(f=f.parentNode)&&11!==f.nodeType?f:null},parents:function(f){return g.dir(f,"parentNode")},parentsUntil:function(f,a,b){return g.dir(f,"parentNode",b)},next:function(f){return d(f,"nextSibling")},prev:function(f){return d(f,"previousSibling")},
138 nextAll:function(f){return g.dir(f,"nextSibling")},prevAll:function(f){return g.dir(f,"previousSibling")},nextUntil:function(f,a,b){return g.dir(f,"nextSibling",b)},prevUntil:function(f,a,b){return g.dir(f,"previousSibling",b)},siblings:function(f){return g.sibling((f.parentNode||{}).firstChild,f)},children:function(f){return g.sibling(f.firstChild)},contents:function(f){return g.nodeName(f,"iframe")?f.contentDocument||f.contentWindow.document:g.merge([],f.childNodes)}},function(f,a){g.fn[f]=function(b,
139 j){var c=g.map(this,a,b);"Until"!==f.slice(-5)&&(j=b);j&&"string"===typeof j&&(c=g.filter(j,c));1<this.length&&(ud[f]||(c=g.unique(c)),td.test(f)&&(c=c.reverse()));return this.pushStack(c)}});var va=/\S+/g,yc={};g.Callbacks=function(f){var a;if("string"===typeof f){if(!(a=yc[f])){a=f;var b=yc[a]={};g.each(a.match(va)||[],function(f,a){b[a]=!0});a=b}}else a=g.extend({},f);f=a;var j,c,e,d,m,t,q=[],h=!f.once&&[],k=function(a){c=f.memory&&a;e=!0;m=t||0;t=0;d=q.length;for(j=!0;q&&m<d;m++)if(!1===q[m].apply(a[0],
140 a[1])&&f.stopOnFalse){c=!1;break}j=!1;q&&(h?h.length&&k(h.shift()):c?q=[]:u.disable())},u={add:function(){if(q){var a=q.length;(function $c(a){g.each(a,function(a,b){var p=g.type(b);"function"===p?(!f.unique||!u.has(b))&&q.push(b):b&&(b.length&&"string"!==p)&&$c(b)})})(arguments);j?d=q.length:c&&(t=a,k(c))}return this},remove:function(){q&&g.each(arguments,function(f,a){for(var b;-1<(b=g.inArray(a,q,b));)q.splice(b,1),j&&(b<=d&&d--,b<=m&&m--)});return this},has:function(f){return f?-1<g.inArray(f,
141 q):!(!q||!q.length)},empty:function(){q=[];d=0;return this},disable:function(){q=h=c=void 0;return this},disabled:function(){return!q},lock:function(){h=void 0;c||u.disable();return this},locked:function(){return!h},fireWith:function(f,a){if(q&&(!e||h))a=a||[],a=[f,a.slice?a.slice():a],j?h.push(a):k(a);return this},fire:function(){u.fireWith(this,arguments);return this},fired:function(){return!!e}};return u};g.extend({Deferred:function(f){var a=[["resolve","done",g.Callbacks("once memory"),"resolved"],
142 ["reject","fail",g.Callbacks("once memory"),"rejected"],["notify","progress",g.Callbacks("memory")]],b="pending",j={state:function(){return b},always:function(){c.done(arguments).fail(arguments);return this},then:function(){var f=arguments;return g.Deferred(function(b){g.each(a,function(a,p){var w=g.isFunction(f[a])&&f[a];c[p[1]](function(){var f=w&&w.apply(this,arguments);if(f&&g.isFunction(f.promise))f.promise().done(b.resolve).fail(b.reject).progress(b.notify);else b[p[0]+"With"](this===j?b.promise():
143 this,w?[f]:arguments)})});f=null}).promise()},promise:function(f){return null!=f?g.extend(f,j):j}},c={};j.pipe=j.then;g.each(a,function(f,g){var e=g[2],d=g[3];j[g[1]]=e.add;d&&e.add(function(){b=d},a[f^1][2].disable,a[2][2].lock);c[g[0]]=function(){c[g[0]+"With"](this===c?j:this,arguments);return this};c[g[0]+"With"]=e.fireWith});j.promise(c);f&&f.call(c,c);return c},when:function(f){var a=0,b=y.call(arguments),j=b.length,c=1!==j||f&&g.isFunction(f.promise)?j:0,e=1===c?f:g.Deferred(),d=function(f,
144 a,b){return function(g){a[f]=this;b[f]=1<arguments.length?y.call(arguments):g;b===m?e.notifyWith(a,b):--c||e.resolveWith(a,b)}},m,t,q;if(1<j){m=Array(j);t=Array(j);for(q=Array(j);a<j;a++)b[a]&&g.isFunction(b[a].promise)?b[a].promise().done(d(a,q,b)).fail(e.reject).progress(d(a,t,m)):--c}c||e.resolveWith(q,b);return e.promise()}});var zb;g.fn.ready=function(f){g.ready.promise().done(f);return this};g.extend({isReady:!1,readyWait:1,holdReady:function(f){f?g.readyWait++:g.ready(!0)},ready:function(f){if(!(!0===
145 f?--g.readyWait:g.isReady)){if(!z.body)return setTimeout(g.ready);g.isReady=!0;!0!==f&&0<--g.readyWait||(zb.resolveWith(z,[g]),g.fn.trigger&&g(z).trigger("ready").off("ready"))}}});g.ready.promise=function(f){if(!zb)if(zb=g.Deferred(),"complete"===z.readyState)setTimeout(g.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",s,!1),a.addEventListener("load",s,!1);else{z.attachEvent("onreadystatechange",s);a.attachEvent("onload",s);var b=!1;try{b=null==a.frameElement&&z.documentElement}catch(p){}b&&
146 b.doScroll&&function Uc(){if(!g.isReady){try{b.doScroll("left")}catch(f){return setTimeout(Uc,50)}n();g.ready()}}()}return zb.promise(f)};var ja="undefined",zc;for(zc in g(v))break;v.ownLast="0"!==zc;v.inlineBlockNeedsLayout=!1;g(function(){var f,a,b=z.getElementsByTagName("body")[0];if(b){f=z.createElement("div");f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";a=z.createElement("div");b.appendChild(f).appendChild(a);if(typeof a.style.zoom!==ja&&(a.style.cssText=
147 "border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",v.inlineBlockNeedsLayout=3===a.offsetWidth))b.style.zoom=1;b.removeChild(f)}});var vd=z.createElement("div");if(null==v.deleteExpando){v.deleteExpando=!0;try{delete vd.test}catch(Zd){v.deleteExpando=!1}}g.acceptData=function(f){var a=g.noData[(f.nodeName+" ").toLowerCase()],b=+f.nodeType||1;return 1!==b&&9!==b?!1:!a||!0!==a&&f.getAttribute("classid")===a};var Xc=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Wc=/([A-Z])/g;g.extend({cache:{},noData:{"applet ":!0,
148 "embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(f){f=f.nodeType?g.cache[f[g.expando]]:f[g.expando];return!!f&&!b(f)},data:function(f,a,b){return e(f,a,b)},removeData:function(f,a){return c(f,a)},_data:function(f,a,b){return e(f,a,b,!0)},_removeData:function(f,a){return c(f,a,!0)}});g.fn.extend({data:function(f,a){var b,j,c,e=this[0],d=e&&e.attributes;if(void 0===f){if(this.length&&(c=g.data(e),1===e.nodeType&&!g._data(e,"parsedAttrs"))){for(b=d.length;b--;)j=d[b].name,
149 0===j.indexOf("data-")&&(j=g.camelCase(j.slice(5)),r(e,j,c[j]));g._data(e,"parsedAttrs",!0)}return c}return"object"===typeof f?this.each(function(){g.data(this,f)}):1<arguments.length?this.each(function(){g.data(this,f,a)}):e?r(e,f,g.data(e,f)):void 0},removeData:function(f){return this.each(function(){g.removeData(this,f)})}});g.extend({queue:function(f,a,b){var j;if(f)return a=(a||"fx")+"queue",j=g._data(f,a),b&&(!j||g.isArray(b)?j=g._data(f,a,g.makeArray(b)):j.push(b)),j||[]},dequeue:function(f,
150 a){a=a||"fx";var b=g.queue(f,a),j=b.length,c=b.shift(),e=g._queueHooks(f,a),d=function(){g.dequeue(f,a)};"inprogress"===c&&(c=b.shift(),j--);c&&("fx"===a&&b.unshift("inprogress"),delete e.stop,c.call(f,d,e));!j&&e&&e.empty.fire()},_queueHooks:function(f,a){var b=a+"queueHooks";return g._data(f,b)||g._data(f,b,{empty:g.Callbacks("once memory").add(function(){g._removeData(f,a+"queue");g._removeData(f,b)})})}});g.fn.extend({queue:function(f,a){var b=2;"string"!==typeof f&&(a=f,f="fx",b--);return arguments.length<
151 b?g.queue(this[0],f):void 0===a?this:this.each(function(){var b=g.queue(this,f,a);g._queueHooks(this,f);"fx"===f&&"inprogress"!==b[0]&&g.dequeue(this,f)})},dequeue:function(f){return this.each(function(){g.dequeue(this,f)})},clearQueue:function(f){return this.queue(f||"fx",[])},promise:function(f,a){var b,j=1,c=g.Deferred(),e=this,d=this.length,m=function(){--j||c.resolveWith(e,[e])};"string"!==typeof f&&(a=f,f=void 0);for(f=f||"fx";d--;)if((b=g._data(e[d],f+"queueHooks"))&&b.empty)j++,b.empty.add(m);
152 m();return c.promise(a)}});var Ab=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ma=["Top","Right","Bottom","Left"],hb=function(f,a){f=a||f;return"none"===g.css(f,"display")||!g.contains(f.ownerDocument,f)},Ta=g.access=function(f,a,b,j,c,e,d){var m=0,t=f.length,q=null==b;if("object"===g.type(b))for(m in c=!0,b)g.access(f,a,m,b[m],!0,e,d);else if(void 0!==j&&(c=!0,g.isFunction(j)||(d=!0),q&&(d?(a.call(f,j),a=null):(q=a,a=function(a,f,b){return q.call(g(a),b)})),a))for(;m<t;m++)a(f[m],b,d?j:j.call(f[m],
153 m,a(f[m],b)));return c?f:q?a.call(f):t?a(f[0],b):e},Nb=/^(?:checkbox|radio)$/i,Yb=z.createDocumentFragment(),$=z.createElement("div"),nb=z.createElement("input");$.setAttribute("className","t");$.innerHTML="  <link/><table></table><a href='/a'>a</a>";v.leadingWhitespace=3===$.firstChild.nodeType;v.tbody=!$.getElementsByTagName("tbody").length;v.htmlSerialize=!!$.getElementsByTagName("link").length;v.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML;nb.type="checkbox";nb.checked=
154 !0;Yb.appendChild(nb);v.appendChecked=nb.checked;$.innerHTML="<textarea>x</textarea>";v.noCloneChecked=!!$.cloneNode(!0).lastChild.defaultValue;Yb.appendChild($);$.innerHTML="<input type='radio' checked='checked' name='t'/>";v.checkClone=$.cloneNode(!0).cloneNode(!0).lastChild.checked;v.noCloneEvent=!0;$.attachEvent&&($.attachEvent("onclick",function(){v.noCloneEvent=!1}),$.cloneNode(!0).click());if(null==v.deleteExpando){v.deleteExpando=!0;try{delete $.test}catch($d){v.deleteExpando=!1}}var Yb=$=
155 nb=null,Bb,Cb,Ac=z.createElement("div");for(Bb in{submit:!0,change:!0,focusin:!0})if(Cb="on"+Bb,!(v[Bb+"Bubbles"]=Cb in a))Ac.setAttribute(Cb,"t"),v[Bb+"Bubbles"]=!1===Ac.attributes[Cb].expando;var Zb=/^(?:input|select|textarea)$/i,wd=/^key/,xd=/^(?:mouse|contextmenu)|click/,Bc=/^(?:focusinfocus|focusoutblur)$/,Cc=/^([^.]*)(?:\.(.+)|)$/;g.event={global:{},add:function(a,b,j,c,e){var d,m,t,q,h,k,u,n,y;if(t=g._data(a)){j.handler&&(q=j,j=q.handler,e=q.selector);j.guid||(j.guid=g.guid++);if(!(m=t.events))m=
156 t.events={};if(!(h=t.handle))h=t.handle=function(a){return typeof g!==ja&&(!a||g.event.triggered!==a.type)?g.event.dispatch.apply(h.elem,arguments):void 0},h.elem=a;b=(b||"").match(va)||[""];for(t=b.length;t--;)if(d=Cc.exec(b[t])||[],n=k=d[1],y=(d[2]||"").split(".").sort(),n){d=g.event.special[n]||{};n=(e?d.delegateType:d.bindType)||n;d=g.event.special[n]||{};k=g.extend({type:n,origType:k,data:c,handler:j,guid:j.guid,selector:e,needsContext:e&&g.expr.match.needsContext.test(e),namespace:y.join(".")},
157 q);if(!(u=m[n]))if(u=m[n]=[],u.delegateCount=0,!d.setup||!1===d.setup.call(a,c,y,h))a.addEventListener?a.addEventListener(n,h,!1):a.attachEvent&&a.attachEvent("on"+n,h);d.add&&(d.add.call(a,k),k.handler.guid||(k.handler.guid=j.guid));e?u.splice(u.delegateCount++,0,k):u.push(k);g.event.global[n]=!0}a=null}},remove:function(a,b,j,c,e){var d,m,t,q,h,k,u,n,y,B,ga,s=g.hasData(a)&&g._data(a);if(s&&(k=s.events)){b=(b||"").match(va)||[""];for(h=b.length;h--;)if(t=Cc.exec(b[h])||[],y=ga=t[1],B=(t[2]||"").split(".").sort(),
158 y){u=g.event.special[y]||{};y=(c?u.delegateType:u.bindType)||y;n=k[y]||[];t=t[2]&&RegExp("(^|\\.)"+B.join("\\.(?:.*\\.|)")+"(\\.|$)");for(q=d=n.length;d--;)if(m=n[d],(e||ga===m.origType)&&(!j||j.guid===m.guid)&&(!t||t.test(m.namespace))&&(!c||c===m.selector||"**"===c&&m.selector))n.splice(d,1),m.selector&&n.delegateCount--,u.remove&&u.remove.call(a,m);q&&!n.length&&((!u.teardown||!1===u.teardown.call(a,B,s.handle))&&g.removeEvent(a,y,s.handle),delete k[y])}else for(y in k)g.event.remove(a,y+b[h],
159 j,c,!0);g.isEmptyObject(k)&&(delete s.handle,g._removeData(a,"events"))}},trigger:function(f,b,j,c){var e,d,m,t,q,h,k=[j||z],u=Za.call(f,"type")?f.type:f;q=Za.call(f,"namespace")?f.namespace.split("."):[];m=e=j=j||z;if(!(3===j.nodeType||8===j.nodeType)&&!Bc.test(u+g.event.triggered))if(0<=u.indexOf(".")&&(q=u.split("."),u=q.shift(),q.sort()),d=0>u.indexOf(":")&&"on"+u,f=f[g.expando]?f:new g.Event(u,"object"===typeof f&&f),f.isTrigger=c?2:3,f.namespace=q.join("."),f.namespace_re=f.namespace?RegExp("(^|\\.)"+
160 q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,f.result=void 0,f.target||(f.target=j),b=null==b?[f]:g.makeArray(b,[f]),q=g.event.special[u]||{},c||!(q.trigger&&!1===q.trigger.apply(j,b))){if(!c&&!q.noBubble&&!g.isWindow(j)){t=q.delegateType||u;Bc.test(t+u)||(m=m.parentNode);for(;m;m=m.parentNode)k.push(m),e=m;if(e===(j.ownerDocument||z))k.push(e.defaultView||e.parentWindow||a)}for(h=0;(m=k[h++])&&!f.isPropagationStopped();)if(f.type=1<h?t:q.bindType||u,(e=(g._data(m,"events")||{})[f.type]&&g._data(m,"handle"))&&
161 e.apply(m,b),(e=d&&m[d])&&e.apply&&g.acceptData(m))f.result=e.apply(m,b),!1===f.result&&f.preventDefault();f.type=u;if(!c&&!f.isDefaultPrevented()&&(!q._default||!1===q._default.apply(k.pop(),b))&&g.acceptData(j)&&d&&j[u]&&!g.isWindow(j)){(e=j[d])&&(j[d]=null);g.event.triggered=u;try{j[u]()}catch(n){}g.event.triggered=void 0;e&&(j[d]=e)}return f.result}},dispatch:function(a){a=g.event.fix(a);var b,j,c,e,d=[],m=y.call(arguments);b=(g._data(this,"events")||{})[a.type]||[];var t=g.event.special[a.type]||
162 {};m[0]=a;a.delegateTarget=this;if(!(t.preDispatch&&!1===t.preDispatch.call(this,a))){d=g.event.handlers.call(this,a,b);for(b=0;(c=d[b++])&&!a.isPropagationStopped();){a.currentTarget=c.elem;for(e=0;(j=c.handlers[e++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(j.namespace))if(a.handleObj=j,a.data=j.data,j=((g.event.special[j.origType]||{}).handle||j.handler).apply(c.elem,m),void 0!==j&&!1===(a.result=j))a.preventDefault(),a.stopPropagation()}t.postDispatch&&t.postDispatch.call(this,
163 a);return a.result}},handlers:function(a,b){var j,c,e,d,m=[],t=b.delegateCount,q=a.target;if(t&&q.nodeType&&(!a.button||"click"!==a.type))for(;q!=this;q=q.parentNode||this)if(1===q.nodeType&&(!0!==q.disabled||"click"!==a.type)){e=[];for(d=0;d<t;d++)c=b[d],j=c.selector+" ",void 0===e[j]&&(e[j]=c.needsContext?0<=g(j,this).index(q):g.find(j,this,null,[q]).length),e[j]&&e.push(c);e.length&&m.push({elem:q,handlers:e})}t<b.length&&m.push({elem:this,handlers:b.slice(t)});return m},fix:function(a){if(a[g.expando])return a;
164 var b,j,c;b=a.type;var e=a,d=this.fixHooks[b];d||(this.fixHooks[b]=d=xd.test(b)?this.mouseHooks:wd.test(b)?this.keyHooks:{});c=d.props?this.props.concat(d.props):this.props;a=new g.Event(e);for(b=c.length;b--;)j=c[b],a[j]=e[j];a.target||(a.target=e.srcElement||z);3===a.target.nodeType&&(a.target=a.target.parentNode);a.metaKey=!!a.metaKey;return d.filter?d.filter(a,e):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
165 fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var g,j,c=b.button,e=b.fromElement;null==a.pageX&&null!=b.clientX&&(g=a.target.ownerDocument||z,j=g.documentElement,g=g.body,a.pageX=b.clientX+(j&&j.scrollLeft||g&&g.scrollLeft||0)-(j&&j.clientLeft||
166 g&&g.clientLeft||0),a.pageY=b.clientY+(j&&j.scrollTop||g&&g.scrollTop||0)-(j&&j.clientTop||g&&g.clientTop||0));!a.relatedTarget&&e&&(a.relatedTarget=e===a.target?b.toElement:e);!a.which&&void 0!==c&&(a.which=c&1?1:c&2?3:c&4?2:0);return a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==O()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){if(this===O()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(g.nodeName(this,
167 "input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(a){return g.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,j,c){a=g.extend(new g.Event,j,{type:a,isSimulated:!0,originalEvent:{}});c?g.event.trigger(a,null,b):g.event.dispatch.call(b,a);a.isDefaultPrevented()&&j.preventDefault()}};g.removeEvent=z.removeEventListener?function(a,b,g){a.removeEventListener&&a.removeEventListener(b,
168 g,!1)}:function(a,b,g){b="on"+b;a.detachEvent&&(typeof a[b]===ja&&(a[b]=null),a.detachEvent(b,g))};g.Event=function(a,b){if(!(this instanceof g.Event))return new g.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault())?q:B):this.type=a;b&&g.extend(this,b);this.timeStamp=a&&a.timeStamp||g.now();this[g.expando]=!0};g.Event.prototype={isDefaultPrevented:B,isPropagationStopped:B,
169 isImmediatePropagationStopped:B,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=q;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=q;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=q;this.stopPropagation()}};g.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){g.event.special[a]={delegateType:b,
170 bindType:b,handle:function(a){var f,j=a.relatedTarget,c=a.handleObj;if(!j||j!==this&&!g.contains(this,j))a.type=c.origType,f=c.handler.apply(this,arguments),a.type=b;return f}}});v.submitBubbles||(g.event.special.submit={setup:function(){if(g.nodeName(this,"form"))return!1;g.event.add(this,"click._submit keypress._submit",function(a){a=a.target;if((a=g.nodeName(a,"input")||g.nodeName(a,"button")?a.form:void 0)&&!g._data(a,"submitBubbles"))g.event.add(a,"submit._submit",function(a){a._submit_bubble=
171 !0}),g._data(a,"submitBubbles",!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&g.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(g.nodeName(this,"form"))return!1;g.event.remove(this,"._submit")}});v.changeBubbles||(g.event.special.change={setup:function(){if(Zb.test(this.nodeName)){if("checkbox"===this.type||"radio"===this.type)g.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&
172 (this._just_changed=!0)}),g.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);g.event.simulate("change",this,a,!0)});return!1}g.event.add(this,"beforeactivate._change",function(a){a=a.target;Zb.test(a.nodeName)&&!g._data(a,"changeBubbles")&&(g.event.add(a,"change._change",function(a){this.parentNode&&(!a.isSimulated&&!a.isTrigger)&&g.event.simulate("change",this.parentNode,a,!0)}),g._data(a,"changeBubbles",!0))})},handle:function(a){var b=a.target;
173 if(this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type)return a.handleObj.handler.apply(this,arguments)},teardown:function(){g.event.remove(this,"._change");return!Zb.test(this.nodeName)}});v.focusinBubbles||g.each({focus:"focusin",blur:"focusout"},function(a,b){var j=function(a){g.event.simulate(b,a.target,g.event.fix(a),!0)};g.event.special[b]={setup:function(){var c=this.ownerDocument||this,e=g._data(c,b);e||c.addEventListener(a,j,!0);g._data(c,b,(e||0)+1)},teardown:function(){var c=
174 this.ownerDocument||this,e=g._data(c,b)-1;e?g._data(c,b,e):(c.removeEventListener(a,j,!0),g._removeData(c,b))}}});g.fn.extend({on:function(a,b,j,c,e){var d,m;if("object"===typeof a){"string"!==typeof b&&(j=j||b,b=void 0);for(d in a)this.on(d,b,j,a[d],e);return this}null==j&&null==c?(c=b,j=b=void 0):null==c&&("string"===typeof b?(c=j,j=void 0):(c=j,j=b,b=void 0));if(!1===c)c=B;else if(!c)return this;1===e&&(m=c,c=function(a){g().off(a);return m.apply(this,arguments)},c.guid=m.guid||(m.guid=g.guid++));
175 return this.each(function(){g.event.add(this,a,c,j,b)})},one:function(a,b,g,j){return this.on(a,b,g,j,1)},off:function(a,b,j){var c;if(a&&a.preventDefault&&a.handleObj)return c=a.handleObj,g(a.delegateTarget).off(c.namespace?c.origType+"."+c.namespace:c.origType,c.selector,c.handler),this;if("object"===typeof a){for(c in a)this.off(c,b,a[c]);return this}if(!1===b||"function"===typeof b)j=b,b=void 0;!1===j&&(j=B);return this.each(function(){g.event.remove(this,a,j,b)})},trigger:function(a,b){return this.each(function(){g.event.trigger(a,
176 b,this)})},triggerHandler:function(a,b){var j=this[0];if(j)return g.event.trigger(a,b,j,!0)}});var mc="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",yd=/ jQuery\d+="(?:null|\d+)"/g,Dc=RegExp("<(?:"+mc+")[\\s/>]","i"),$b=/^\s+/,Ec=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fc=/<([\w:]+)/,Gc=/<tbody/i,zd=/<|&#?\w+;/,Ad=/<(?:script|style|link)/i,Bd=/checked\s*(?:[^=]|=\s*.checked.)/i,
177 Hc=/^$|\/(?:java|ecma)script/i,Yc=/^true\/(.*)/,Cd=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:v.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ac=
178 T(z).appendChild(z.createElement("div"));ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;g.extend({clone:function(a,b,j){var c,e,d,m,t,q=g.contains(a.ownerDocument,a);v.html5Clone||g.isXMLDoc(a)||!Dc.test("<"+a.nodeName+">")?d=a.cloneNode(!0):(ac.innerHTML=a.outerHTML,ac.removeChild(d=ac.firstChild));if((!v.noCloneEvent||!v.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!g.isXMLDoc(a)){c=M(d);t=M(a);for(m=0;null!=(e=t[m]);++m)if(c[m]){var h=c[m],u=void 0,k=
179 void 0,n=void 0;if(1===h.nodeType){u=h.nodeName.toLowerCase();if(!v.noCloneEvent&&h[g.expando]){n=g._data(h);for(k in n.events)g.removeEvent(h,k,n.handle);h.removeAttribute(g.expando)}if("script"===u&&h.text!==e.text)K(h).text=e.text,da(h);else if("object"===u)h.parentNode&&(h.outerHTML=e.outerHTML),v.html5Clone&&(e.innerHTML&&!g.trim(h.innerHTML))&&(h.innerHTML=e.innerHTML);else if("input"===u&&Nb.test(e.type))h.defaultChecked=h.checked=e.checked,h.value!==e.value&&(h.value=e.value);else if("option"===
180 u)h.defaultSelected=h.selected=e.defaultSelected;else if("input"===u||"textarea"===u)h.defaultValue=e.defaultValue}}}if(b)if(j){t=t||M(a);c=c||M(d);for(m=0;null!=(e=t[m]);m++)ya(e,c[m])}else ya(a,d);c=M(d,"script");0<c.length&&Wa(c,!q&&M(a,"script"));return d},buildFragment:function(a,b,j,c){for(var e,d,m,t,q,h,u=a.length,k=T(b),n=[],y=0;y<u;y++)if((d=a[y])||0===d)if("object"===g.type(d))g.merge(n,d.nodeType?[d]:d);else if(zd.test(d)){m=m||k.appendChild(b.createElement("div"));t=(Fc.exec(d)||["",
181 ""])[1].toLowerCase();h=ia[t]||ia._default;m.innerHTML=h[1]+d.replace(Ec,"<$1></$2>")+h[2];for(e=h[0];e--;)m=m.lastChild;!v.leadingWhitespace&&$b.test(d)&&n.push(b.createTextNode($b.exec(d)[0]));if(!v.tbody)for(e=(d="table"===t&&!Gc.test(d)?m.firstChild:"<table>"===h[1]&&!Gc.test(d)?m:0)&&d.childNodes.length;e--;)g.nodeName(q=d.childNodes[e],"tbody")&&!q.childNodes.length&&d.removeChild(q);g.merge(n,m.childNodes);for(m.textContent="";m.firstChild;)m.removeChild(m.firstChild);m=k.lastChild}else n.push(b.createTextNode(d));
182 m&&k.removeChild(m);v.appendChecked||g.grep(M(n,"input"),rb);for(y=0;d=n[y++];)if(!(c&&-1!==g.inArray(d,c))&&(a=g.contains(d.ownerDocument,d),m=M(k.appendChild(d),"script"),a&&Wa(m),j))for(e=0;d=m[e++];)Hc.test(d.type||"")&&j.push(d);return k},cleanData:function(a,b){for(var j,c,e,d,t=0,q=g.expando,h=g.cache,u=v.deleteExpando,k=g.event.special;null!=(j=a[t]);t++)if(b||g.acceptData(j))if(d=(e=j[q])&&h[e]){if(d.events)for(c in d.events)k[c]?g.event.remove(j,c):g.removeEvent(j,c,d.handle);h[e]&&(delete h[e],
183 u?delete j[q]:typeof j.removeAttribute!==ja?j.removeAttribute(q):j[q]=null,m.push(e))}}});g.fn.extend({text:function(a){return Ta(this,function(a){return void 0===a?g.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&Ka(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||
184 11===this.nodeType||9===this.nodeType){var b=Ka(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var j,c=a?g.filter(a,this):this,e=0;null!=(j=c[e]);e++)!b&&1===j.nodeType&&g.cleanData(M(j)),j.parentNode&&(b&&g.contains(j.ownerDocument,
185 j)&&Wa(M(j,"script")),j.parentNode.removeChild(j));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&g.cleanData(M(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&g.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return g.clone(this,a,b)})},html:function(a){return Ta(this,function(a){var f=this[0]||{},b=0,j=this.length;if(void 0===a)return 1===f.nodeType?f.innerHTML.replace(yd,
186 ""):void 0;if("string"===typeof a&&!Ad.test(a)&&(v.htmlSerialize||!Dc.test(a))&&(v.leadingWhitespace||!$b.test(a))&&!ia[(Fc.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ec,"<$1></$2>");try{for(;b<j;b++)f=this[b]||{},1===f.nodeType&&(g.cleanData(M(f,!1)),f.innerHTML=a);f=0}catch(c){}}f&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];this.domManip(arguments,function(b){a=this.parentNode;g.cleanData(M(this));a&&a.replaceChild(b,this)});return a&&(a.length||
187 a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=E.apply([],a);var j,c,e,d,m=0,t=this.length,q=this,h=t-1,u=a[0],k=g.isFunction(u);if(k||1<t&&"string"===typeof u&&!v.checkClone&&Bd.test(u))return this.each(function(j){var g=q.eq(j);k&&(a[0]=u.call(this,j,g.html()));g.domManip(a,b)});if(t&&(d=g.buildFragment(a,this[0].ownerDocument,!1,this),j=d.firstChild,1===d.childNodes.length&&(d=j),j)){e=g.map(M(d,"script"),K);for(c=e.length;m<t;m++)j=d,m!==
188 h&&(j=g.clone(j,!0,!0),c&&g.merge(e,M(j,"script"))),b.call(this[m],j,m);if(c){d=e[e.length-1].ownerDocument;g.map(e,da);for(m=0;m<c;m++)if(j=e[m],Hc.test(j.type||"")&&!g._data(j,"globalEval")&&g.contains(d,j))j.src?g._evalUrl&&g._evalUrl(j.src):g.globalEval((j.text||j.textContent||j.innerHTML||"").replace(Cd,""))}d=j=null}return this}});g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){g.fn[a]=function(a){for(var f=0,j=
189 [],c=g(a),e=c.length-1;f<=e;f++)a=f===e?this:this.clone(!0),g(c[f])[b](a),F.apply(j,a.get());return this.pushStack(j)}});var fb,nc={},ob,Db,cb=z.createElement("div");cb.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";ob=cb.getElementsByTagName("a")[0];ob.style.cssText="float:left;opacity:.5";v.opacity=/^0.5/.test(ob.style.opacity);v.cssFloat=!!ob.style.cssFloat;cb.style.backgroundClip="content-box";cb.cloneNode(!0).style.backgroundClip="";v.clearCloneStyle="content-box"===
190 cb.style.backgroundClip;ob=cb=null;v.shrinkWrapBlocks=function(){var a,b,j;if(null==Db){a=z.getElementsByTagName("body")[0];if(!a)return;b=z.createElement("div");j=z.createElement("div");a.appendChild(b).appendChild(j);Db=!1;typeof j.style.zoom!==ja&&(j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0;width:1px;padding:1px;zoom:1",j.innerHTML="<div></div>",j.firstChild.style.width="5px",Db=3!==j.offsetWidth);
191 a.removeChild(b)}return Db};var Ic=/^margin/,sb=RegExp("^("+Ab+")(?!px)[a-z%]+$","i"),Na,Oa,Dd=/^(top|right|bottom|left)$/;a.getComputedStyle?(Na=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Oa=function(a,b,j){var c,e,d=a.style;e=(j=j||Na(a))?j.getPropertyValue(b)||j[b]:void 0;j&&(""===e&&!g.contains(a.ownerDocument,a)&&(e=g.style(a,b)),sb.test(e)&&Ic.test(b)&&(a=d.width,b=d.minWidth,c=d.maxWidth,d.minWidth=d.maxWidth=d.width=e,e=j.width,d.width=a,d.minWidth=b,d.maxWidth=
192 c));return void 0===e?e:e+""}):z.documentElement.currentStyle&&(Na=function(a){return a.currentStyle},Oa=function(a,b,j){var g,c,e,d=a.style;e=(j=j||Na(a))?j[b]:void 0;null==e&&(d&&d[b])&&(e=d[b]);if(sb.test(e)&&!Dd.test(b)){j=d.left;if(c=(g=a.runtimeStyle)&&g.left)g.left=a.currentStyle.left;d.left="fontSize"===b?"1em":e;e=d.pixelLeft+"px";d.left=j;c&&(g.left=c)}return void 0===e?e:e+""||"auto"});var dc=function(){var f,b,j=z.getElementsByTagName("body")[0];j&&(f=z.createElement("div"),b=z.createElement("div"),
193 f.style.cssText=bc,j.appendChild(f).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",g.swap(j,null!=j.style.zoom?{zoom:1}:{},function(){cc=4===b.offsetWidth}),Eb=!0,Fb=!1,Gb=!0,a.getComputedStyle&&(Fb="1%"!==(a.getComputedStyle(b,null)||{}).top,Eb="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width),j.removeChild(f),b=j=null)},pb,Hb,cc,Eb,Fb,Gb,
194 db=z.createElement("div"),bc="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";db.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";pb=db.getElementsByTagName("a")[0];pb.style.cssText="float:left;opacity:.5";v.opacity=/^0.5/.test(pb.style.opacity);v.cssFloat=!!pb.style.cssFloat;db.style.backgroundClip="content-box";db.cloneNode(!0).style.backgroundClip="";v.clearCloneStyle="content-box"===db.style.backgroundClip;pb=db=null;g.extend(v,{reliableHiddenOffsets:function(){if(null!=
195 Hb)return Hb;var a,b,j;b=z.createElement("div");var g=z.getElementsByTagName("body")[0];if(g)return b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=bc,g.appendChild(a).appendChild(b),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=b.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display=
196 "none",Hb=j&&0===b[0].offsetHeight,g.removeChild(a),Hb},boxSizing:function(){null==cc&&dc();return cc},boxSizingReliable:function(){null==Eb&&dc();return Eb},pixelPosition:function(){null==Fb&&dc();return Fb},reliableMarginRight:function(){var f,b,j,g;if(null==Gb&&a.getComputedStyle){f=z.getElementsByTagName("body")[0];if(!f)return;b=z.createElement("div");j=z.createElement("div");b.style.cssText=bc;f.appendChild(b).appendChild(j);g=j.appendChild(z.createElement("div"));g.style.cssText=j.style.cssText=
197 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";g.style.marginRight=g.style.width="0";j.style.width="1px";Gb=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight);f.removeChild(b)}return Gb}});g.swap=function(a,b,j,g){var c,e={};for(c in b)e[c]=a.style[c],a.style[c]=b[c];j=j.apply(a,g||[]);for(c in b)a.style[c]=e[c];return j};var ec=/alpha\([^)]*\)/i,Ed=/opacity\s*=\s*([^)]*)/,Fd=/^(none|table(?!-c[ea]).+)/,Zc=RegExp("^("+
198 Ab+")(.*)$","i"),Gd=RegExp("^([+-])=("+Ab+")","i"),Hd={position:"absolute",visibility:"hidden",display:"block"},Jc={letterSpacing:0,fontWeight:400},oc=["Webkit","O","Moz","ms"];g.extend({cssHooks:{opacity:{get:function(a,b){if(b){var j=Oa(a,"opacity");return""===j?"1":j}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,j,c){if(a&&!(3===a.nodeType||
199 8===a.nodeType||!a.style)){var e,d,m,t=g.camelCase(b),q=a.style;b=g.cssProps[t]||(g.cssProps[t]=gb(q,t));m=g.cssHooks[b]||g.cssHooks[t];if(void 0!==j){d=typeof j;if("string"===d&&(e=Gd.exec(j)))j=(e[1]+1)*e[2]+parseFloat(g.css(a,b)),d="number";if(!(null==j||j!==j))if("number"===d&&!g.cssNumber[t]&&(j+="px"),!v.clearCloneStyle&&(""===j&&0===b.indexOf("background"))&&(q[b]="inherit"),!m||!("set"in m)||void 0!==(j=m.set(a,j,c)))try{q[b]="",q[b]=j}catch(h){}}else return m&&"get"in m&&void 0!==(e=m.get(a,
200 !1,c))?e:q[b]}},css:function(a,b,j,c){var e,d;d=g.camelCase(b);b=g.cssProps[d]||(g.cssProps[d]=gb(a.style,d));(d=g.cssHooks[b]||g.cssHooks[d])&&"get"in d&&(e=d.get(a,!0,j));void 0===e&&(e=Oa(a,b,c));"normal"===e&&b in Jc&&(e=Jc[b]);return""===j||j?(a=parseFloat(e),!0===j||g.isNumeric(a)?a||0:e):e}});g.each(["height","width"],function(a,b){g.cssHooks[b]={get:function(a,f,j){if(f)return 0===a.offsetWidth&&Fd.test(g.css(a,"display"))?g.swap(a,Hd,function(){return fa(a,b,j)}):fa(a,b,j)},set:function(a,
201 f,j){var c=j&&Na(a);return V(a,f,j?aa(a,b,j,v.boxSizing()&&"border-box"===g.css(a,"boxSizing",!1,c),c):0)}}});v.opacity||(g.cssHooks.opacity={get:function(a,b){return Ed.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var j=a.style,c=a.currentStyle,e=g.isNumeric(b)?"alpha(opacity="+100*b+")":"",d=c&&c.filter||j.filter||"";j.zoom=1;if((1<=b||""===b)&&""===g.trim(d.replace(ec,""))&&j.removeAttribute)if(j.removeAttribute("filter"),
202 ""===b||c&&!c.filter)return;j.filter=ec.test(d)?d.replace(ec,e):d+" "+e}});g.cssHooks.marginRight=pa(v.reliableMarginRight,function(a,b){if(b)return g.swap(a,{display:"inline-block"},Oa,[a,"marginRight"])});g.each({margin:"",padding:"",border:"Width"},function(a,b){g.cssHooks[a+b]={expand:function(j){var g=0,c={};for(j="string"===typeof j?j.split(" "):[j];4>g;g++)c[a+Ma[g]+b]=j[g]||j[g-2]||j[0];return c}};Ic.test(a)||(g.cssHooks[a+b].set=V)});g.fn.extend({css:function(a,b){return Ta(this,function(a,
203 f,b){var j,c={},e=0;if(g.isArray(f)){b=Na(a);for(j=f.length;e<j;e++)c[f[e]]=g.css(a,f[e],!1,b);return c}return void 0!==b?g.style(a,f,b):g.css(a,f)},a,b,1<arguments.length)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(a){return"boolean"===typeof a?a?this.show():this.hide():this.each(function(){hb(this)?g(this).show():g(this).hide()})}});g.Tween=C;C.prototype={constructor:C,init:function(a,b,j,c,e,d){this.elem=a;this.prop=j;this.easing=e||"swing";this.options=
204 b;this.start=this.now=this.cur();this.end=c;this.unit=d||(g.cssNumber[j]?"":"px")},cur:function(){var a=C.propHooks[this.prop];return a&&a.get?a.get(this):C.propHooks._default.get(this)},run:function(a){var b,j=C.propHooks[this.prop];this.pos=this.options.duration?b=g.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):b=a;this.now=(this.end-this.start)*b+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);j&&j.set?j.set(this):C.propHooks._default.set(this);
205 return this}};C.prototype.init.prototype=C.prototype;C.propHooks={_default:{get:function(a){if(null!=a.elem[a.prop]&&(!a.elem.style||null==a.elem.style[a.prop]))return a.elem[a.prop];a=g.css(a.elem,a.prop,"");return!a||"auto"===a?0:a},set:function(a){if(g.fx.step[a.prop])g.fx.step[a.prop](a);else a.elem.style&&(null!=a.elem.style[g.cssProps[a.prop]]||g.cssHooks[a.prop])?g.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&
206 a.elem.parentNode&&(a.elem[a.prop]=a.now)}};g.easing={linear:function(a){return a},swing:function(a){return 0.5-Math.cos(a*Math.PI)/2}};g.fx=C.prototype.init;g.fx.step={};var Xa,Ib,Id=/^(?:toggle|show|hide)$/,Kc=RegExp("^(?:([+-])=|)("+Ab+")([a-z%]*)$","i"),Jd=/queueHooks$/,ub=[function(a,b,j){var c,e,d,m,t,q,h=this,u={},k=a.style,n=a.nodeType&&hb(a),y=g._data(a,"fxshow");j.queue||(m=g._queueHooks(a,"fx"),null==m.unqueued&&(m.unqueued=0,t=m.empty.fire,m.empty.fire=function(){m.unqueued||t()}),m.unqueued++,
207 h.always(function(){h.always(function(){m.unqueued--;g.queue(a,"fx").length||m.empty.fire()})}));if(1===a.nodeType&&("height"in b||"width"in b))j.overflow=[k.overflow,k.overflowX,k.overflowY],e=g.css(a,"display"),q=La(a.nodeName),"none"===e&&(e=q),"inline"===e&&"none"===g.css(a,"float")&&(!v.inlineBlockNeedsLayout||"inline"===q?k.display="inline-block":k.zoom=1);j.overflow&&(k.overflow="hidden",v.shrinkWrapBlocks()||h.always(function(){k.overflow=j.overflow[0];k.overflowX=j.overflow[1];k.overflowY=
208 j.overflow[2]}));for(c in b)if(e=b[c],Id.exec(e)){delete b[c];d=d||"toggle"===e;if(e===(n?"hide":"show"))if("show"===e&&y&&void 0!==y[c])n=!0;else continue;u[c]=y&&y[c]||g.style(a,c)}if(!g.isEmptyObject(u))for(c in y?"hidden"in y&&(n=y.hidden):y=g._data(a,"fxshow",{}),d&&(y.hidden=!n),n?g(a).show():h.done(function(){g(a).hide()}),h.done(function(){var b;g._removeData(a,"fxshow");for(b in u)g.style(a,b,u[b])}),u)b=ib(n?y[c]:0,c,h),c in y||(y[c]=b.start,n&&(b.end=b.start,b.start="width"===c||"height"===
209 c?1:0))}],jb={"*":[function(a,b){var j=this.createTween(a,b),c=j.cur(),e=Kc.exec(b),d=e&&e[3]||(g.cssNumber[a]?"":"px"),m=(g.cssNumber[a]||"px"!==d&&+c)&&Kc.exec(g.css(j.elem,a)),t=1,q=20;if(m&&m[3]!==d){d=d||m[3];e=e||[];m=+c||1;do t=t||".5",m/=t,g.style(j.elem,a,m+d);while(t!==(t=j.cur()/c)&&1!==t&&--q)}e&&(m=j.start=+m||+c||0,j.unit=d,j.end=e[1]?m+(e[1]+1)*e[2]:+e[2]);return j}]};g.Animation=g.extend(tb,{tweener:function(a,b){g.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var j,c=0,e=a.length;c<
210 e;c++)j=a[c],jb[j]=jb[j]||[],jb[j].unshift(b)},prefilter:function(a,b){b?ub.unshift(a):ub.push(a)}});g.speed=function(a,b,j){var c=a&&"object"===typeof a?g.extend({},a):{complete:j||!j&&b||g.isFunction(a)&&a,duration:a,easing:j&&b||b&&!g.isFunction(b)&&b};c.duration=g.fx.off?0:"number"===typeof c.duration?c.duration:c.duration in g.fx.speeds?g.fx.speeds[c.duration]:g.fx.speeds._default;if(null==c.queue||!0===c.queue)c.queue="fx";c.old=c.complete;c.complete=function(){g.isFunction(c.old)&&c.old.call(this);
211 c.queue&&g.dequeue(this,c.queue)};return c};g.fn.extend({fadeTo:function(a,b,j,g){return this.filter(hb).css("opacity",0).show().end().animate({opacity:b},a,j,g)},animate:function(a,b,j,c){var e=g.isEmptyObject(a),d=g.speed(b,j,c);b=function(){var b=tb(this,g.extend({},a),d);(e||g._data(this,"finish"))&&b.stop(!0)};b.finish=b;return e||!1===d.queue?this.each(b):this.queue(d.queue,b)},stop:function(a,b,j){var c=function(a){var b=a.stop;delete a.stop;b(j)};"string"!==typeof a&&(j=b,b=a,a=void 0);b&&
212 !1!==a&&this.queue(a||"fx",[]);return this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",d=g.timers,m=g._data(this);if(e)m[e]&&m[e].stop&&c(m[e]);else for(e in m)m[e]&&(m[e].stop&&Jd.test(e))&&c(m[e]);for(e=d.length;e--;)if(d[e].elem===this&&(null==a||d[e].queue===a))d[e].anim.stop(j),b=!1,d.splice(e,1);(b||!j)&&g.dequeue(this,a)})},finish:function(a){!1!==a&&(a=a||"fx");return this.each(function(){var b,j=g._data(this),c=j[a+"queue"];b=j[a+"queueHooks"];var e=g.timers,d=c?c.length:0;j.finish=
213 !0;g.queue(this,a,[]);b&&b.stop&&b.stop.call(this,!0);for(b=e.length;b--;)e[b].elem===this&&e[b].queue===a&&(e[b].anim.stop(!0),e.splice(b,1));for(b=0;b<d;b++)c[b]&&c[b].finish&&c[b].finish.call(this);delete j.finish})}});g.each(["toggle","show","hide"],function(a,b){var j=g.fn[b];g.fn[b]=function(a,f,c){return null==a||"boolean"===typeof a?j.apply(this,arguments):this.animate(qa(b,!0),a,f,c)}});g.each({slideDown:qa("show"),slideUp:qa("hide"),slideToggle:qa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},
214 fadeToggle:{opacity:"toggle"}},function(a,b){g.fn[a]=function(a,f,j){return this.animate(b,a,f,j)}});g.timers=[];g.fx.tick=function(){var a,b=g.timers,j=0;for(Xa=g.now();j<b.length;j++)a=b[j],!a()&&b[j]===a&&b.splice(j--,1);b.length||g.fx.stop();Xa=void 0};g.fx.timer=function(a){g.timers.push(a);a()?g.fx.start():g.timers.pop()};g.fx.interval=13;g.fx.start=function(){Ib||(Ib=setInterval(g.fx.tick,g.fx.interval))};g.fx.stop=function(){clearInterval(Ib);Ib=null};g.fx.speeds={slow:600,fast:200,_default:400};
215 g.fn.delay=function(a,b){a=g.fx?g.fx.speeds[a]||a:a;return this.queue(b||"fx",function(b,j){var c=setTimeout(b,a);j.stop=function(){clearTimeout(c)}})};var Jb,Ga,fc,gc,qb=z.createElement("div");qb.setAttribute("className","t");qb.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";Jb=qb.getElementsByTagName("a")[0];fc=z.createElement("select");gc=fc.appendChild(z.createElement("option"));Ga=qb.getElementsByTagName("input")[0];Jb.style.cssText="top:1px";v.getSetAttribute=
216 "t"!==qb.className;v.style=/top/.test(Jb.getAttribute("style"));v.hrefNormalized="/a"===Jb.getAttribute("href");v.checkOn=!!Ga.value;v.optSelected=gc.selected;v.enctype=!!z.createElement("form").enctype;fc.disabled=!0;v.optDisabled=!gc.disabled;Ga=z.createElement("input");Ga.setAttribute("value","");v.input=""===Ga.getAttribute("value");Ga.value="t";Ga.setAttribute("type","radio");v.radioValue="t"===Ga.value;var Kd=/\r/g;g.fn.extend({val:function(a){var b,j,c,e=this[0];if(arguments.length)return c=
217 g.isFunction(a),this.each(function(j){if(1===this.nodeType&&(j=c?a.call(this,j,g(this).val()):a,null==j?j="":"number"===typeof j?j+="":g.isArray(j)&&(j=g.map(j,function(a){return null==a?"":a+""})),b=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()],!b||!("set"in b)||void 0===b.set(this,j,"value")))this.value=j});if(e){if((b=g.valHooks[e.type]||g.valHooks[e.nodeName.toLowerCase()])&&"get"in b&&void 0!==(j=b.get(e,"value")))return j;j=e.value;return"string"===typeof j?j.replace(Kd,""):
218 null==j?"":j}}});g.extend({valHooks:{option:{get:function(a){var b=g.find.attr(a,"value");return null!=b?b:g.text(a)}},select:{get:function(a){for(var b,j=a.options,c=a.selectedIndex,e=(a="select-one"===a.type||0>c)?null:[],d=a?c+1:j.length,m=0>c?d:a?c:0;m<d;m++)if(b=j[m],(b.selected||m===c)&&(v.optDisabled?!b.disabled:null===b.getAttribute("disabled"))&&(!b.parentNode.disabled||!g.nodeName(b.parentNode,"optgroup"))){b=g(b).val();if(a)return b;e.push(b)}return e},set:function(a,b){for(var j,c,e=a.options,
219 d=g.makeArray(b),m=e.length;m--;)if(c=e[m],0<=g.inArray(g.valHooks.option.get(c),d))try{c.selected=j=!0}catch(t){c.scrollHeight}else c.selected=!1;j||(a.selectedIndex=-1);return e}}}});g.each(["radio","checkbox"],function(){g.valHooks[this]={set:function(a,b){if(g.isArray(b))return a.checked=0<=g.inArray(g(a).val(),b)}};v.checkOn||(g.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var eb,Lc,Ha=g.expr.attrHandle,hc=/^(?:checked|selected)$/i,Ua=v.getSetAttribute,
220 Kb=v.input;g.fn.extend({attr:function(a,b){return Ta(this,g.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){g.removeAttr(this,a)})}});g.extend({attr:function(a,b,j){var c,e,d=a.nodeType;if(a&&!(3===d||8===d||2===d)){if(typeof a.getAttribute===ja)return g.prop(a,b,j);if(1!==d||!g.isXMLDoc(a))b=b.toLowerCase(),c=g.attrHooks[b]||(g.expr.match.bool.test(b)?Lc:eb);if(void 0!==j)if(null===j)g.removeAttr(a,b);else{if(c&&"set"in c&&void 0!==(e=c.set(a,j,b)))return e;a.setAttribute(b,
221 j+"");return j}else{if(c&&"get"in c&&null!==(e=c.get(a,b)))return e;e=g.find.attr(a,b);return null==e?void 0:e}}},removeAttr:function(a,b){var j,c,e=0,d=b&&b.match(va);if(d&&1===a.nodeType)for(;j=d[e++];)c=g.propFix[j]||j,g.expr.match.bool.test(j)?Kb&&Ua||!hc.test(j)?a[c]=!1:a[g.camelCase("default-"+j)]=a[c]=!1:g.attr(a,j,""),a.removeAttribute(Ua?j:c)},attrHooks:{type:{set:function(a,b){if(!v.radioValue&&"radio"===b&&g.nodeName(a,"input")){var j=a.value;a.setAttribute("type",b);j&&(a.value=j);return b}}}}});
222 Lc={set:function(a,b,j){!1===b?g.removeAttr(a,j):Kb&&Ua||!hc.test(j)?a.setAttribute(!Ua&&g.propFix[j]||j,j):a[g.camelCase("default-"+j)]=a[j]=!0;return j}};g.each(g.expr.match.bool.source.match(/\w+/g),function(a,b){var j=Ha[b]||g.find.attr;Ha[b]=Kb&&Ua||!hc.test(b)?function(a,b,f){var c,g;f||(g=Ha[b],Ha[b]=c,c=null!=j(a,b,f)?b.toLowerCase():null,Ha[b]=g);return c}:function(a,b,f){if(!f)return a[g.camelCase("default-"+b)]?b.toLowerCase():null}});if(!Kb||!Ua)g.attrHooks.value={set:function(a,b,j){if(g.nodeName(a,
223 "input"))a.defaultValue=b;else return eb&&eb.set(a,b,j)}};Ua||(eb={set:function(a,b,j){var c=a.getAttributeNode(j);c||a.setAttributeNode(c=a.ownerDocument.createAttribute(j));c.value=b+="";if("value"===j||b===a.getAttribute(j))return b}},Ha.id=Ha.name=Ha.coords=function(a,b,j){var c;if(!j)return(c=a.getAttributeNode(b))&&""!==c.value?c.value:null},g.valHooks.button={get:function(a,b){var j=a.getAttributeNode(b);if(j&&j.specified)return j.value},set:eb.set},g.attrHooks.contenteditable={set:function(a,
224 b,j){eb.set(a,""===b?!1:b,j)}},g.each(["width","height"],function(a,b){g.attrHooks[b]={set:function(a,f){if(""===f)return a.setAttribute(b,"auto"),f}}}));v.style||(g.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var Ld=/^(?:input|select|textarea|button|object)$/i,Md=/^(?:a|area)$/i;g.fn.extend({prop:function(a,b){return Ta(this,g.prop,a,b,1<arguments.length)},removeProp:function(a){a=g.propFix[a]||a;return this.each(function(){try{this[a]=
225 void 0,delete this[a]}catch(b){}})}});g.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,j){var c,e,d;d=a.nodeType;if(a&&!(3===d||8===d||2===d)){if(d=1!==d||!g.isXMLDoc(a))b=g.propFix[b]||b,e=g.propHooks[b];return void 0!==j?e&&"set"in e&&void 0!==(c=e.set(a,j,b))?c:a[b]=j:e&&"get"in e&&null!==(c=e.get(a,b))?c:a[b]}},propHooks:{tabIndex:{get:function(a){var b=g.find.attr(a,"tabindex");return b?parseInt(b,10):Ld.test(a.nodeName)||Md.test(a.nodeName)&&a.href?0:-1}}}});v.hrefNormalized||
226 g.each(["href","src"],function(a,b){g.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}});v.optSelected||(g.propHooks.selected={get:function(a){if(a=a.parentNode)a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex;return null}});g.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "),function(){g.propFix[this.toLowerCase()]=this});v.enctype||(g.propFix.enctype="encoding");var ic=/[\t\r\n\f]/g;g.fn.extend({addClass:function(a){var b,
227 j,c,e,d,m=0,t=this.length;b="string"===typeof a&&a;if(g.isFunction(a))return this.each(function(b){g(this).addClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(va)||[];m<t;m++)if(j=this[m],c=1===j.nodeType&&(j.className?(" "+j.className+" ").replace(ic," "):" ")){for(d=0;e=b[d++];)0>c.indexOf(" "+e+" ")&&(c+=e+" ");c=g.trim(c);j.className!==c&&(j.className=c)}return this},removeClass:function(a){var b,j,c,e,d,m=0,t=this.length;b=0===arguments.length||"string"===typeof a&&a;if(g.isFunction(a))return this.each(function(b){g(this).removeClass(a.call(this,
228 b,this.className))});if(b)for(b=(a||"").match(va)||[];m<t;m++)if(j=this[m],c=1===j.nodeType&&(j.className?(" "+j.className+" ").replace(ic," "):"")){for(d=0;e=b[d++];)for(;0<=c.indexOf(" "+e+" ");)c=c.replace(" "+e+" "," ");c=a?g.trim(c):"";j.className!==c&&(j.className=c)}return this},toggleClass:function(a,b){var j=typeof a;return"boolean"===typeof b&&"string"===j?b?this.addClass(a):this.removeClass(a):g.isFunction(a)?this.each(function(j){g(this).toggleClass(a.call(this,j,this.className,b),b)}):
229 this.each(function(){if("string"===j)for(var b,c=0,e=g(this),d=a.match(va)||[];b=d[c++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else if(j===ja||"boolean"===j)this.className&&g._data(this,"__className__",this.className),this.className=this.className||!1===a?"":g._data(this,"__className__")||""})},hasClass:function(a){a=" "+a+" ";for(var b=0,j=this.length;b<j;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(ic," ").indexOf(a))return!0;return!1}});g.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
230 function(a,b){g.fn[b]=function(a,f){return 0<arguments.length?this.on(b,null,a,f):this.trigger(b)}});g.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,j){return this.on(a,null,b,j)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,j,c){return this.on(b,a,j,c)},undelegate:function(a,b,j){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",j)}});var jc=g.now(),kc=/\?/,Nd=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
231 g.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var j,c=null,e=g.trim(b+"");return e&&!g.trim(e.replace(Nd,function(a,b,f,g){j&&b&&(c=0);if(0===c)return a;j=f||b;c+=!g-!f;return""}))?Function("return "+e)():g.error("Invalid JSON: "+b)};g.parseXML=function(b){var j,c;if(!b||"string"!==typeof b)return null;try{a.DOMParser?(c=new DOMParser,j=c.parseFromString(b,"text/xml")):(j=new ActiveXObject("Microsoft.XMLDOM"),j.async="false",j.loadXML(b))}catch(e){j=void 0}(!j||!j.documentElement||
232 j.getElementsByTagName("parsererror").length)&&g.error("Invalid XML: "+b);return j};var Va,Ia,Od=/#.*$/,Mc=/([?&])_=[^&]*/,Pd=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Qd=/^(?:GET|HEAD)$/,Rd=/^\/\//,Nc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Oc={},Ob={},Pc="*/".concat("*");try{Ia=location.href}catch(ae){Ia=z.createElement("a"),Ia.href="",Ia=Ia.href}Va=Nc.exec(Ia.toLowerCase())||[];g.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ia,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Va[1]),
233 global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":g.parseJSON,"text xml":g.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?D(D(a,
234 g.ajaxSettings),b):D(g.ajaxSettings,a)},ajaxPrefilter:kb(Oc),ajaxTransport:kb(Ob),ajax:function(a,b){function j(a,b,f,c){var e,u,p,l;l=b;if(2!==ba){ba=2;t&&clearTimeout(t);h=void 0;m=c||"";E.readyState=0<a?4:0;c=200<=a&&300>a||304===a;if(f){p=k;for(var w=E,N,oa,r,F,O=p.contents,x=p.dataTypes;"*"===x[0];)x.shift(),void 0===oa&&(oa=p.mimeType||w.getResponseHeader("Content-Type"));if(oa)for(F in O)if(O[F]&&O[F].test(oa)){x.unshift(F);break}if(x[0]in f)r=x[0];else{for(F in f){if(!x[0]||p.converters[F+
235 " "+x[0]]){r=F;break}N||(N=F)}r=r||N}r?(r!==x[0]&&x.unshift(r),p=f[r]):p=void 0}a:{f=k;N=p;oa=E;r=c;var bb,v,T,w={},O=f.dataTypes.slice();if(O[1])for(v in f.converters)w[v.toLowerCase()]=f.converters[v];for(F=O.shift();F;)if(f.responseFields[F]&&(oa[f.responseFields[F]]=N),!T&&(r&&f.dataFilter)&&(N=f.dataFilter(N,f.dataType)),T=F,F=O.shift())if("*"===F)F=T;else if("*"!==T&&T!==F){v=w[T+" "+F]||w["* "+F];if(!v)for(bb in w)if(p=bb.split(" "),p[1]===F&&(v=w[T+" "+p[0]]||w["* "+p[0]])){!0===v?v=w[bb]:
236 !0!==w[bb]&&(F=p[0],O.unshift(p[1]));break}if(!0!==v)if(v&&f["throws"])N=v(N);else try{N=v(N)}catch(sa){p={state:"parsererror",error:v?sa:"No conversion from "+T+" to "+F};break a}}p={state:"success",data:N}}if(c)k.ifModified&&((l=E.getResponseHeader("Last-Modified"))&&(g.lastModified[d]=l),(l=E.getResponseHeader("etag"))&&(g.etag[d]=l)),204===a||"HEAD"===k.type?l="nocontent":304===a?l="notmodified":(l=p.state,e=p.data,u=p.error,c=!u);else if(u=l,a||!l)l="error",0>a&&(a=0);E.status=a;E.statusText=
237 (b||l)+"";c?B.resolveWith(n,[e,l,E]):B.rejectWith(n,[E,l,u]);E.statusCode(s);s=void 0;q&&y.trigger(c?"ajaxSuccess":"ajaxError",[E,k,c?e:u]);ga.fireWith(n,[E,l]);q&&(y.trigger("ajaxComplete",[E,k]),--g.active||g.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=void 0);b=b||{};var c,e,d,m,t,q,h,u,k=g.ajaxSetup({},b),n=k.context||k,y=k.context&&(n.nodeType||n.jquery)?g(n):g.event,B=g.Deferred(),ga=g.Callbacks("once memory"),s=k.statusCode||{},l={},N={},ba=0,oa="canceled",E={readyState:0,getResponseHeader:function(a){var b;
238 if(2===ba){if(!u)for(u={};b=Pd.exec(m);)u[b[1].toLowerCase()]=b[2];b=u[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===ba?m:null},setRequestHeader:function(a,b){var f=a.toLowerCase();ba||(a=N[f]=N[f]||a,l[a]=b);return this},overrideMimeType:function(a){ba||(k.mimeType=a);return this},statusCode:function(a){var b;if(a)if(2>ba)for(b in a)s[b]=[s[b],a[b]];else E.always(a[E.status]);return this},abort:function(a){a=a||oa;h&&h.abort(a);j(0,a);return this}};B.promise(E).complete=
239 ga.add;E.success=E.done;E.error=E.fail;k.url=((a||k.url||Ia)+"").replace(Od,"").replace(Rd,Va[1]+"//");k.type=b.method||b.type||k.method||k.type;k.dataTypes=g.trim(k.dataType||"*").toLowerCase().match(va)||[""];null==k.crossDomain&&(c=Nc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||!(c[1]!==Va[1]||c[2]!==Va[2]||(c[3]||("http:"===c[1]?"80":"443"))!==(Va[3]||("http:"===Va[1]?"80":"443")))));k.data&&(k.processData&&"string"!==typeof k.data)&&(k.data=g.param(k.data,k.traditional));ra(Oc,k,b,E);if(2===
240 ba)return E;(q=k.global)&&0===g.active++&&g.event.trigger("ajaxStart");k.type=k.type.toUpperCase();k.hasContent=!Qd.test(k.type);d=k.url;k.hasContent||(k.data&&(d=k.url+=(kc.test(d)?"&":"?")+k.data,delete k.data),!1===k.cache&&(k.url=Mc.test(d)?d.replace(Mc,"$1_="+jc++):d+(kc.test(d)?"&":"?")+"_="+jc++));k.ifModified&&(g.lastModified[d]&&E.setRequestHeader("If-Modified-Since",g.lastModified[d]),g.etag[d]&&E.setRequestHeader("If-None-Match",g.etag[d]));(k.data&&k.hasContent&&!1!==k.contentType||b.contentType)&&
241 E.setRequestHeader("Content-Type",k.contentType);E.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Pc+"; q=0.01":""):k.accepts["*"]);for(e in k.headers)E.setRequestHeader(e,k.headers[e]);if(k.beforeSend&&(!1===k.beforeSend.call(n,E,k)||2===ba))return E.abort();oa="abort";for(e in{success:1,error:1,complete:1})E[e](k[e]);if(h=ra(Ob,k,b,E)){E.readyState=1;q&&y.trigger("ajaxSend",[E,k]);k.async&&0<k.timeout&&(t=setTimeout(function(){E.abort("timeout")},
242 k.timeout));try{ba=1,h.send(l,j)}catch(r){if(2>ba)j(-1,r);else throw r;}}else j(-1,"No Transport");return E},getJSON:function(a,b,j){return g.get(a,b,j,"json")},getScript:function(a,b){return g.get(a,void 0,b,"script")}});g.each(["get","post"],function(a,b){g[b]=function(a,f,j,c){g.isFunction(f)&&(c=c||j,j=f,f=void 0);return g.ajax({url:a,type:b,dataType:c,data:f,success:j})}});g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){g.fn[b]=function(a){return this.on(b,
243 a)}});g._evalUrl=function(a){return g.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};g.fn.extend({wrapAll:function(a){if(g.isFunction(a))return this.each(function(b){g(this).wrapAll(a.call(this,b))});if(this[0]){var b=g(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return g.isFunction(a)?
244 this.each(function(b){g(this).wrapInner(a.call(this,b))}):this.each(function(){var b=g(this),j=b.contents();j.length?j.wrapAll(a):b.append(a)})},wrap:function(a){var b=g.isFunction(a);return this.each(function(j){g(this).wrapAll(b?a.call(this,j):a)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()}});g.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight||!v.reliableHiddenOffsets()&&"none"===(a.style&&
245 a.style.display||g.css(a,"display"))};g.expr.filters.visible=function(a){return!g.expr.filters.hidden(a)};var Sd=/%20/g,ad=/\[\]$/,Qc=/\r?\n/g,Td=/^(?:submit|button|image|reset|file)$/i,Ud=/^(?:input|select|textarea|keygen)/i;g.param=function(a,b){var j,c=[],e=function(a,b){b=g.isFunction(b)?b():null==b?"":b;c[c.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};void 0===b&&(b=g.ajaxSettings&&g.ajaxSettings.traditional);if(g.isArray(a)||a.jquery&&!g.isPlainObject(a))g.each(a,function(){e(this.name,
246 this.value)});else for(j in a)W(j,a[j],b,e);return c.join("&").replace(Sd,"+")};g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=g.prop(this,"elements");return a?g.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!g(this).is(":disabled")&&Ud.test(this.nodeName)&&!Td.test(a)&&(this.checked||!Nb.test(a))}).map(function(a,b){var j=g(this).val();return null==j?null:g.isArray(j)?g.map(j,function(a){return{name:b.name,
247 value:a.replace(Qc,"\r\n")}}):{name:b.name,value:j.replace(Qc,"\r\n")}}).get()}});g.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&j()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}b=void 0}return b}:j;g.ajaxSettings.xhr=void 0===a.ActiveXObject?X:function(){return(this.url==z.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&
248 X()||X(1)};var Vd=0,Lb={},Mb=g.ajaxSettings.xhr();if(a.ActiveXObject)g(a).on("unload",function(){for(var a in Lb)Lb[a](void 0,!0)});v.cors=!!Mb&&"withCredentials"in Mb;(Mb=v.ajax=!!Mb)&&g.ajaxTransport(function(a){if(!a.crossDomain||v.cors){var b;return{send:function(j,c){var e,d=a.xhr(),m=++Vd;console.log("xhr.open async="+a.async+" url="+a.url);d.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields)for(e in a.xhrFields)d[e]=a.xhrFields[e];a.mimeType&&d.overrideMimeType&&d.overrideMimeType(a.mimeType);
249 !a.crossDomain&&!j["X-Requested-With"]&&(j["X-Requested-With"]="XMLHttpRequest");for(e in j)void 0!==j[e]&&d.setRequestHeader(e,j[e]+"");d.send(a.hasContent&&a.data||null);b=function(j,e){var t,k,q;if(b&&(e||4===d.readyState))if(delete Lb[m],b=void 0,d.onreadystatechange=g.noop,e)4!==d.readyState&&d.abort();else{q={};t=d.status;"string"===typeof d.responseText&&(q.text=d.responseText);try{k=d.statusText}catch(h){k=""}!t&&a.isLocal&&!a.crossDomain?t=q.text?200:404:1223===t&&(t=204)}q&&c(t,k,q,d.getAllResponseHeaders())};
250 a.async?4===d.readyState?setTimeout(b):d.onreadystatechange=Lb[m]=b:b()},abort:function(){b&&b(void 0,!0)}}}});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){g.globalEval(a);return a}}});g.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});g.ajaxTransport("script",function(a){if(a.crossDomain){var b,
251 j=z.head||g("head")[0]||z.documentElement;return{send:function(c,g){b=z.createElement("script");b.async=!0;a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,j){if(j||!b.readyState||/loaded|complete/.test(b.readyState))b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,j||g(200,"success")};j.insertBefore(b,j.firstChild)},abort:function(){if(b)b.onload(void 0,!0)}}}});var Rc=[],lc=/(=)\?(?=&|$)|\?\?/;g.ajaxSetup({jsonp:"callback",
252 jsonpCallback:function(){var a=Rc.pop()||g.expando+"_"+jc++;this[a]=!0;return a}});g.ajaxPrefilter("json jsonp",function(b,j,c){var e,d,m,t=!1!==b.jsonp&&(lc.test(b.url)?"url":"string"===typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&lc.test(b.data)&&"data");if(t||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=g.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,t?b[t]=b[t].replace(lc,"$1"+e):!1!==b.jsonp&&(b.url+=(kc.test(b.url)?"&":"?")+b.jsonp+"="+
253 e),b.converters["script json"]=function(){m||g.error(e+" was not called");return m[0]},b.dataTypes[0]="json",d=a[e],a[e]=function(){m=arguments},c.always(function(){a[e]=d;b[e]&&(b.jsonpCallback=j.jsonpCallback,Rc.push(e));m&&g.isFunction(d)&&d(m[0]);m=d=void 0}),"script"});g.parseHTML=function(a,b,j){if(!a||"string"!==typeof a)return null;"boolean"===typeof b&&(j=b,b=!1);b=b||z;var c=xc.exec(a);j=!j&&[];if(c)return[b.createElement(c[1])];c=g.buildFragment([a],b,j);j&&j.length&&g(j).remove();return g.merge([],
254 c.childNodes)};var Sc=g.fn.load;g.fn.load=function(a,b,j){if("string"!==typeof a&&Sc)return Sc.apply(this,arguments);var c,e,d,m=this,t=a.indexOf(" ");0<=t&&(c=a.slice(t,a.length),a=a.slice(0,t));g.isFunction(b)?(j=b,b=void 0):b&&"object"===typeof b&&(d="POST");0<m.length&&g.ajax({url:a,type:d,dataType:"html",data:b}).done(function(a){e=arguments;m.html(c?g("<div>").append(g.parseHTML(a)).find(c):a)}).complete(j&&function(a,b){m.each(j,e||[a.responseText,b,a])});return this};g.expr.filters.animated=
255 function(a){return g.grep(g.timers,function(b){return a===b.elem}).length};var Tc=a.document.documentElement;g.offset={setOffset:function(a,b,j){var c,e,d,m=g.css(a,"position"),t=g(a),k={};"static"===m&&(a.style.position="relative");d=t.offset();e=g.css(a,"top");c=g.css(a,"left");("absolute"===m||"fixed"===m)&&-1<g.inArray("auto",[e,c])?(c=t.position(),e=c.top,c=c.left):(e=parseFloat(e)||0,c=parseFloat(c)||0);g.isFunction(b)&&(b=b.call(a,j,d));null!=b.top&&(k.top=b.top-d.top+e);null!=b.left&&(k.left=
256 b.left-d.left+c);"using"in b?b.using.call(a,k):t.css(k)}};g.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){g.offset.setOffset(this,a,b)});var b,j,c={top:0,left:0},e=(j=this[0])&&j.ownerDocument;if(e){b=e.documentElement;if(!g.contains(b,j))return c;typeof j.getBoundingClientRect!==ja&&(c=j.getBoundingClientRect());j=t(e);return{top:c.top+(j.pageYOffset||b.scrollTop)-(b.clientTop||0),left:c.left+(j.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}}},position:function(){if(this[0]){var a,
257 b,j={top:0,left:0},c=this[0];"fixed"===g.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),g.nodeName(a[0],"html")||(j=a.offset()),j.top+=g.css(a[0],"borderTopWidth",!0),j.left+=g.css(a[0],"borderLeftWidth",!0));return{top:b.top-j.top-g.css(c,"marginTop",!0),left:b.left-j.left-g.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Tc;a&&!g.nodeName(a,"html")&&"static"===g.css(a,"position");)a=a.offsetParent;return a||
258 Tc})}});g.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var j=/Y/.test(b);g.fn[a]=function(c){return Ta(this,function(a,f,c){var e=t(a);if(void 0===c)return e?b in e?e[b]:e.document.documentElement[f]:a[f];e?e.scrollTo(!j?c:g(e).scrollLeft(),j?c:g(e).scrollTop()):a[f]=c},a,c,arguments.length,null)}});g.each(["top","left"],function(a,b){g.cssHooks[b]=pa(v.pixelPosition,function(a,j){if(j)return j=Oa(a,b),sb.test(j)?g(a).position()[b]+"px":j})});g.each({Height:"height",Width:"width"},
259 function(a,b){g.each({padding:"inner"+a,content:b,"":"outer"+a},function(j,c){g.fn[c]=function(c,e){var d=arguments.length&&(j||"boolean"!==typeof c),m=j||(!0===c||!0===e?"margin":"border");return Ta(this,function(b,j,c){return g.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(j=b.documentElement,Math.max(b.body["scroll"+a],j["scroll"+a],b.body["offset"+a],j["offset"+a],j["client"+a])):void 0===c?g.css(b,j,m):g.style(b,j,c,m)},b,d?c:void 0,d,null)}})});g.fn.size=function(){return this.length};
260 g.fn.andSelf=g.fn.addBack;"function"===typeof define&&define.amd&&define("jquery",[],function(){return g});var Wd=a.jQuery,Xd=a.$;g.noConflict=function(b){a.$===g&&(a.$=Xd);b&&a.jQuery===g&&(a.jQuery=Wd);return g};typeof l===ja&&(a.jQuery=a.$=g);return g});
261 (function(a){function l(a){try{return a?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest}catch(h){}}a.ajaxSettings.xhr=void 0===window.ActiveXObject?l:function(){return(this.url==document.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&l()||l(1)};a.ajaxTransport("+script",function(a){var h,d=document.head||jQuery("head")[0]||document.documentElement;return{send:function(n,s){h=document.createElement("script");a.scriptCharset&&
262 (h.charset=a.scriptCharset);h.src=a.url;h.onload=h.onreadystatechange=function(a,b){if(b||!h.readyState||/loaded|complete/.test(h.readyState))h.onload=h.onreadystatechange=null,h.parentNode&&h.parentNode.removeChild(h),h=null,b||s(200,"success")};d.insertBefore(h,d.firstChild)},abort:function(){if(h)h.onload(void 0,!0)}}});a.extend(a.support,{iecors:!!window.XDomainRequest});a.support.iecors?a.ajaxTransport(function(a){return{send:function(h,d){var n=new window.XDomainRequest;n.onload=function(){d(200,
263 "OK",{text:n.responseText},{"Content-Type":n.contentType})};a.xhrFields&&(n.onerror=a.xhrFields.error,n.ontimeout=a.xhrFields.timeout);n.open(a.type,a.url);n.send(a.hasContent&&a.data||null)},abort:function(){xdr.abort()}}}):(a.ajaxSetup({accepts:{binary:"text/plain; charset=x-user-defined"},responseFields:{binary:"response"}}),a.ajaxTransport("binary",function(a){var h;return{send:function(d,n){var s=a.xhr();console.log("xhr.open binary async="+a.async+" url="+a.url);s.open(a.type,a.url,a.async);
264 var l=!1;try{s.hasOwnProperty("responseType")&&(s.responseType="arraybuffer",l=!0)}catch(b){}try{!l&&s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined")}catch(e){}!a.crossDomain&&!d["X-Requested-With"]&&(d["X-Requested-With"]="XMLHttpRequest");try{for(var c in d)s.setRequestHeader(c,d[c])}catch(q){}s.send(a.hasContent&&a.data||null);h=function(){var b=s.status,c="",e=s.getAllResponseHeaders(),d={};try{if(h&&4===s.readyState){h=void 0;try{d.text="string"===typeof s.responseText?
265 s.responseText:null}catch(q){}try{d.binary=s.response}catch(l){}try{c=s.statusText}catch(r){c=""}!b&&a.isLocal&&!a.crossDomain?b=d.text?200:404:1223===b&&(b=204);n(b,c,d,e)}}catch(da){alert(da),n(-1,da)}};a.async?4===s.readyState?setTimeout(h):s.onreadystatechange=h:h()},abort:function(){}}}))})(jQuery);
266 (function(a,l,k,h){function d(d,k){function r(c){a(b).each(function(){self.Jmol&&(0<=k.indexOf("mouseup")||0<=k.indexOf("touchend"))&&Jmol._setMouseOwner(null);var b=a(this);this!==c.target&&!b.has(c.target).length&&b.triggerHandler(k,[c.target,c])})}k=k||d+h;var b=a(),e=d+"."+k+"-special-event";a.event.special[k]={setup:function(){b=b.add(this);1===b.length&&a(l).bind(e,r)},teardown:function(){self.Jmol&&Jmol._setMouseOwner(null);b=b.not(this);0===b.length&&a(l).unbind(e)},add:function(a){var b=
267 a.handler;a.handler=function(a,c){a.target=c;b.apply(this,arguments)}}}}a.map(k.split(" "),function(a){d(a)});d("focusin","focus"+h);d("focusout","blur"+h)})(jQuery,document,"click mousemove mouseup touchmove touchend","outjsmol");"undefined"==typeof jQuery&&alert("Note -- JSmoljQuery is required for JSmol, but it's not defined.");self.Jmol||(Jmol={});
268 Jmol._version||(Jmol=function(a){var l=function(a){return{rear:a++,header:a++,main:a++,image:a++,front:a++,fileOpener:a++,coverImage:a++,dialog:a++,menu:a+9E4,console:a+91E3,consoleImage:a+91001,monitorZIndex:a+99999}},l={_version:"$Date: 2015-06-01 17:35:46 -0500 (Mon, 01 Jun 2015) $",_alertNoBinary:!0,_allowedJmolSize:[25,2048,300],_appletCssClass:"",_appletCssText:"",_fileCache:null,_jarFile:null,_j2sPath:null,_use:null,_j2sLoadMonitorOpacity:90,_applets:{},_asynchronous:!0,_ajaxQueue:[],_getZOrders:l,
269 _z:l(Jmol.z||9E3),_debugCode:!0,db:{_databasePrefixes:"$=:",_fileLoadScript:";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * };",_nciLoadScript:";n = ({molecule=1}.length < {molecule=2}.length ? 2 : 1); select molecule=n;display selected;center selected;",_pubChemLoadScript:"",_DirectDatabaseCalls:{"cactus.nci.nih.gov":"%URL","www.rcsb.org":"%URL","pdbe.org":"%URL","www.ebi.ac.uk":"%URL","wwwdev.ebi.ac.uk":"%URL",
270 "pubchem.ncbi.nlm.nih.gov":"%URL","http://www.nmrdb.org/tools/jmol/predict.php":"%URL",$:"http://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf&get3d=True",$$:"http://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf","=":"http://www.rcsb.org/pdb/files/%FILE.pdb","*":"http://www.ebi.ac.uk/pdbe/entry-files/download/%FILE.cif","==":"http://www.rcsb.org/pdb/files/ligand/%FILE.cif",":":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d"},_restQueryUrl:"http://www.rcsb.org/pdb/rest/search",
271 _restQueryXml:"<orgPdbQuery><queryType>org.pdb.query.simple.AdvancedKeywordQuery</queryType><description>Text Search</description><keywords>QUERY</keywords></orgPdbQuery>",_restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:a,_isXHTML:!1,_lastAppletID:null,_mousePageX:null,_mouseOwner:null,_serverUrl:"http://your.server.here/jsmol.php",_syncId:(""+Math.random()).substring(3),_touching:!1,_XhtmlElement:null,
272 _XhtmlAppendChild:!1};a=a.location.href.toLowerCase();l._httpProto=0==a.indexOf("https")?"https://":"http://";l._isFile=0==a.indexOf("file:");l._ajaxTestSite=l._httpProto+"google.com";a=l._isFile||0==a.indexOf("http://localhost")||0==a.indexOf("http://127.");l._tracker="http://"==l._httpProto&&!a&&"http://chemapps.stolaf.edu/jmol/JmolTracker.htm?id=UA-45940799-1";l._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");l._isSafari=!l._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari");
273 l._isMsie=void 0!==window.ActiveXObject;l._useDataURI=!l._isSafari&&!l._isMsie;for(var k in Jmol)l[k]=Jmol[k];return l}(document,Jmol));
274 (function(a,l){l(document).ready(function(){a._document=null});a.$=function(a,e){null==a&&alert(e+arguments.callee.caller.toString());return l(e?"#"+a._id+"_"+e:a)};a._$=function(a){return"string"==typeof a?l("#"+a):a};a.$ajax=function(b){a._ajaxCall=b.url;b.cache="NO"!=b.cache;0==b.url.indexOf("http://pubchem.ncbi.nlm.nih")&&(b.url="https://"+b.url.substring(7));return l.ajax(b)};a._getNCIInfo=function(b,e){return a._getFileData("http://cactus.nci.nih.gov/chemical/structure/"+b+"/"+("name"==e?"names":
275 e))};a.$appEvent=function(b,e,c,d){b=a.$(b,e);b.off(c)&&d&&b.on(c,d)};a.$resize=function(a){return l(window).resize(a)};a.$after=function(a,e){return l(a).after(e)};a.$append=function(a,e){return l(a).append(e)};a.$bind=function(a,e,c){return c?l(a).bind(e,c):l(a).unbind(e)};a.$closest=function(a,e){return l(a).closest(e)};a.$get=function(a,e){return l(a).get(e)};a.$documentOff=function(a,e){return l(document).off(a,"#"+e)};a.$documentOn=function(a,e,c){return l(document).on(a,"#"+e,c)};a.$getAncestorDiv=
276 function(a,e){return l("div."+e+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return l.support.iecors};a.$attr=function(b,e,c){return a._$(b).attr(e,c)};a.$css=function(b,e){return a._$(b).css(e)};a.$find=function(b,e){return a._$(b).find(e)};a.$focus=function(b){return a._$(b).focus()};a.$html=function(b,e){return a._$(b).html(e)};a.$offset=function(b){return a._$(b).offset()};a.$windowOn=function(a,e){return l(window).on(a,e)};a.$prop=function(b,e,c){var d=a._$(b);return 3==arguments.length?
277 d.prop(e,c):d.prop(e)};a.$remove=function(b){return a._$(b).remove()};a.$scrollTo=function(b,e){var c=a._$(b);return c.scrollTop(0>e?c[0].scrollHeight:e)};a.$setEnabled=function(b,e){return a._$(b).attr("disabled",e?null:"disabled")};a.$setSize=function(b,e,c){return a._$(b).width(e).height(c)};a.$setVisible=function(b,e){var c=a._$(b);return e?c.show():c.hide()};a.$submit=function(b){return a._$(b).submit()};a.$val=function(b,e){var c=a._$(b);return 1==arguments.length?c.val():c.val(e)};a._clearVars=
278 function(){delete jQuery;delete l;delete a;delete SwingController;delete J;delete JM;delete JS;delete JSV;delete JU;delete JV;delete java;delete javajs;delete Clazz;delete c$};var k=document,h=window,d={};d.ua=navigator.userAgent.toLowerCase();var n;a:{n=["linux","unix","mac","win"];for(var s=n.length;s--;)if(-1!=d.ua.indexOf(n[s])){n=n[s];break a}n="unknown"}d.os=n;d.browser=function(){for(var a=d.ua,e="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),c=0;c<e.length;c++)if(0<=a.indexOf(e[c]))return e[c];
279 return"unknown"};d.browserName=d.browser();d.browserVersion=parseFloat(d.ua.substring(d.ua.indexOf(d.browserName)+d.browserName.length+1));d.supportsXhr2=function(){return l.support.cors||l.support.iecors};d.allowDestroy="msie"!=d.browserName;d.allowHTML5="msie"!=d.browserName||0>navigator.appVersion.indexOf("MSIE 8");d.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};d._webGLtest=0;d.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var b;a.featureDetection._webGLtest=
280 h.WebGLRenderingContext&&((b=k.createElement("canvas")).getContext("webgl")||b.getContext("experimental-webgl"))?1:-1}return 0<a.featureDetection._webGLtest};d.supportsLocalization=function(){for(var a=k.getElementsByTagName("meta"),e=a.length;0<=--e;)if(0<=a[e].outerHTML.toLowerCase().indexOf("utf-8"))return!0;return!1};d.supportsJava=function(){a.featureDetection._javaEnabled||(a.featureDetection._javaEnabled=a._isMsie?navigator.javaEnabled()?1:-1:navigator.javaEnabled()&&(!navigator.mimeTypes||
281 navigator.mimeTypes["application/x-java-applet"])?1:-1);return 0<a.featureDetection._javaEnabled};d.compliantBrowser=function(){var a=!!k.getElementById,e=d.os;if("opera"==d.browserName&&7.54>=d.browserVersion&&"mac"==e||"webkit"==d.browserName&&125.12>d.browserVersion||"msie"==d.browserName&&"mac"==e||"konqueror"==d.browserName&&3.3>=d.browserVersion)a=!1;return a};d.isFullyCompliant=function(){return d.compliantBrowser()&&d.supportsJava()};d.useIEObject="win"==d.os&&"msie"==d.browserName&&5.5<=
282 d.browserVersion;d.useHtml4Object="mozilla"==d.browserName&&5<=d.browserVersion||"opera"==d.browserName&&8<=d.browserVersion||"webkit"==d.browserName;d.hasFileReader=h.File&&h.FileReader;a.featureDetection=d;a._ajax=function(b){if(!b.async)return a.$ajax(b).responseText;a._ajaxQueue.push(b);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var b=a._ajaxQueue.shift();b&&a.$ajax(b)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"],
283 ["*","PDBe(macromolecules)"]];a._getGrabberOptions=function(b){if(0==a._grabberOptions.length)return"";var e='<input type="text" id="ID_query" onfocus="jQuery(this).select()" onkeypress="if(13==event.which){Jmol._applets[\'ID\']._search();return false}" size="32" value="" />',c='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(e="<nobr>"+e+'<span style="display:none">',c="</span>"+c):e+="<br /><nobr>";for(var e=e+'<select id="ID_select">',
284 d=0;d<a._grabberOptions.length;d++)var k=a._grabberOptions[d],e=e+('<option value="'+k[0]+'" '+(0==d?"selected":"")+">"+k[1]+"</option>");e=(e+"</select>"+c).replace(/ID/g,b._id);return"<br />"+e};a._getScriptForDatabase=function(b){return"$"==b?a.db._nciLoadScript:":"==b?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,e,c){var d=[],k="";if(0==c.indexOf("ERROR"))k=c;else switch(e){case "=":e=c.split("<dimStructure.structureId>");d=["<table>"];for(c=1;c<e.length;c++)d.push('<tr><td valign=top><a href="javascript:Jmol.search('+
285 a._id+",'="+e[c].substring(0,4)+"')\">"+e[c].substring(0,4)+"</a></td>"),d.push("<td>"+e[c].split("Title>")[1].split("</")[0]+"</td></tr>");d.push("</table>");k=e.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=k;a._info=d.join("");a._showInfo(!0)};a._loadSuccess=function(b,e){e&&(a._ajaxDone(),e(b))};a._loadError=function(b){a._ajaxDone();a.say("Error connecting to server: "+a._ajaxCall);null!=b&&b()};a._isDatabaseCall=function(b){return 0<=a.db._databasePrefixes.indexOf(b.substring(0,
286 1))};a._getDirectDatabaseCall=function(b,e){if(e&&!a.featureDetection.supportsXhr2())return b;var c=2,d,k=a.db._DirectDatabaseCalls[b.substring(0,c)];k||(k=a.db._DirectDatabaseCalls[d=b.substring(0,--c)]);k&&(":"==d?(d=b.toLowerCase(),isNaN(parseInt(b.substring(1)))?0==d.indexOf(":smiles:")?(k+="?POST?smiles="+b.substring(8),b="smiles"):0==d.indexOf(":cid:")?b="cid/"+b.substring(5):(0==d.indexOf(":name:")?b=b.substring(5):0==d.indexOf(":cas:")&&(b=b.substring(4)),b="name/"+encodeURIComponent(b.substring(c))):
287 b="cid/"+b.substring(1)):b=encodeURIComponent(b.substring(c)),0<=k.indexOf("FILENCI")?(b=b.replace(/\%2F/g,"/"),b=k.replace(/\%FILENCI/,b)):b=k.replace(/\%FILE/,b));return b};a._getRawDataFromServer=function(b,e,c,d,k,h){b="?call=getRawDataFromDatabase&database="+b+(0<=e.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(e)+(k?"&encoding=base64":"")+(h?"":"&script="+encodeURIComponent(a._getScriptForDatabase(b)));return a._contactServer(b,c,d)};a._checkFileName=function(b,e,c){a._isDatabaseCall(e)&&
288 (c&&a._setQueryTerm(b,e),e=a._getDirectDatabaseCall(e,!0),a._isDatabaseCall(e)&&(e=a._getDirectDatabaseCall(e,!1),c&&(c[0]=!0)));return e};a._checkCache=function(b,e,c){if(b._cacheFiles&&a._fileCache&&!e.endsWith(".js")){if(b=a._fileCache[e])return System.out.println("using "+b.length+" bytes of cached data for "+e),c(b),null;c=function(b,e){c(a._fileCache[b]=e)}}return c};a._loadFileData=function(b,e,c,d){var k=[];e=a._checkFileName(b,e,k);c=a._checkCache(b,e,c);k[0]?a._getRawDataFromServer("_",
289 e,c,d):(b={type:"GET",dataType:"text",url:e,async:a._asynchronous,success:function(b){a._loadSuccess(b,c)},error:function(){a._loadError(d)}},a._checkAjaxPost(b),a._ajax(b))};a._getInfoFromDatabase=function(b,e,c){if("===="==e){var d=a.db._restQueryXml.replace(/QUERY/,c),d={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(d)+"&req=browser",success:function(d){a._ajaxDone();a._extractInfoFromRCSB(b,e,c,d)},error:function(){a._loadError(null)},
290 async:a._asynchronous};return a._ajax(d)}c="?call=getInfoFromDatabase&database="+e+"&query="+encodeURIComponent(c);return a._contactServer(c,function(c){a._setInfo(b,e,c)})};a._extractInfoFromRCSB=function(b,e,c,d){var k=d.length/5;if(0!=k&&4==c.length&&1!=k){c=c.toUpperCase();var h=d.indexOf(c);0<h&&0<="123456789".indexOf(c.substring(0,1))&&(d=c+","+d.substring(0,h)+d.substring(h+5));50<k&&(d=d.substring(0,250));d=d.replace(/\n/g,",");d=a._restReportUrl.replace(/IDLIST/,d);a._loadFileData(b,d,function(c){a._setInfo(b,
291 e,c)})}};a._checkAjaxPost=function(a){var e=a.url.indexOf("?POST?");0<e&&(a.data=a.url.substring(e+6),a.url=a.url.substring(0,e),a.type="POST",a.contentType="application/x-www-form-urlencoded")};a._contactServer=function(b,e,c){b={dataType:"text",type:"GET",url:a._serverUrl+b,success:function(b){a._loadSuccess(b,e)},error:function(){a._loadError(c)},async:e?a._asynchronous:!1};a._checkAjaxPost(b);return a._ajax(b)};a._setQueryTerm=function(b,e){if(e&&b._hasOptions&&"http://"!=e.substring(0,7)){if(a._isDatabaseCall(e)){var c=
292 e.substring(0,1);e=e.substring(1);e.substring(0,1)==c&&0<="=$".indexOf(c)&&(e=e.substring(1));var d=a._getElement(b,"select");if(d&&d.options)for(var k=0;k<d.options.length;k++)d[k].value==c&&(d[k].selected=!0)}a.$val(a.$(b,"query"),e)}};a._search=function(b,e,c){1<arguments.length||(e=null);a._setQueryTerm(b,e);e||(e=a.$val(a.$(b,"query")));0==e.indexOf("!")?b._script(e.substring(1)):(e&&(e=e.replace(/\"/g,"")),b._showInfo(!1),a._searchMol(b,e,c,!0))};a._searchMol=function(b,e,c,d){var k;a._isDatabaseCall(e)?
293 (k=e.substring(0,1),e=e.substring(1)):k=b._hasOptions?a.$val(a.$(b,"select")):"$";"="==k&&3==e.length&&(e="="+e);var h=k+e;if(e&&!(0>h.indexOf("?")&&h==b._thisJmolModel)){b._thisJmolModel=h;var n;d&&null!=b._viewSet&&null!=(n=a.View.__findView(b._viewSet,{chemID:h}))?a.View.__setView(n,b,!1):("$"==k||":"==k?b._jmolFileType="MOL":"="==k&&(b._jmolFileType="PDB"),b._searchDatabase(e,k,c))}};a._searchDatabase=function(b,e,c,d){b._showInfo(!1);return 0<=e.indexOf("?")?(a._getInfoFromDatabase(b,c,e.split("?")[0]),
294 !0):a.db._DirectDatabaseCalls[c]?(b._loadFile(c+e,d),!0):!1};a._syncBinaryOK="?";a._canSyncBinary=function(b){if(a._isAsync)return!0;if(self.VBArray)return a._syncBinaryOK=!1;if("?"!=a._syncBinaryOK)return a._syncBinaryOK;a._syncBinaryOK=!0;try{var e=new window.XMLHttpRequest;e.open("text",a._ajaxTestSite,!1);e.hasOwnProperty("responseType")?e.responseType="arraybuffer":e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined")}catch(c){return System.out.println("JSmolCore.js: synchronous binary file transfer is requested but not available"),
295 a._alertNoBinary&&!b&&alert("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._syncBinaryOK=!1}return!0};a._binaryTypes=".gz .jpg .gif .png .zip .jmol .bin .smol .spartan .mrc .pse .map .omap".split(" ");a._isBinaryUrl=function(b){for(var e=a._binaryTypes.length;0<=--e;)if(0<=b.indexOf(a._binaryTypes[e]))return!0;return!1};a._getFileData=function(b,e,c){var d=a._isBinaryUrl(b),k=0<=b.indexOf("pdb.gz")&&0==b.indexOf("http://www.rcsb.org/pdb/files/"),h=d&&!a._canSyncBinary(k);
296 h&&k&&(b=b.replace(/pdb\.gz/,"pdb"),h=d=!1);k=0<=b.indexOf("?POST?");0==b.indexOf("file:/")&&0!=b.indexOf("file:///")&&(b="file://"+b.substring(5));var n=0>b.indexOf("://")||0==b.indexOf(document.location.protocol)&&0<=b.indexOf(document.location.host),s=a._isDirectCall(b),l=!n&&a.$supportsIECrossDomainScripting(),r=null;if((!e||h)&&(l||h||!n&&!s))r=a._getRawDataFromServer("_",b,e,e,h,!0);else{b=b.replace(/file:\/\/\/\//,"file://");var K={dataType:d?"binary":"text",async:!!e};k?(K.type="POST",K.url=
297 b.split("?POST?")[0],K.data=b.split("?POST?")[1]):(K.type="GET",K.url=b);e&&(K.success=function(){e(a._xhrReturn(K.xhr))},K.error=function(){e(K.xhr.statusText)});K.xhr=a.$ajax(K);e||(r=a._xhrReturn(K.xhr))}if(!c)return r;null==r&&(r="",d=!1);d&&(d=a._canSyncBinary(!0));return d?a._strToBytes(r):JU.SB.newS(r)};a._xhrReturn=function(a){return!a.responseText||self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response||a.statusText:a.responseText};a._isDirectCall=function(b){for(var e in a.db._DirectDatabaseCalls)if(0<=
298 e.indexOf(".")&&0<=b.indexOf(e))return!0;return!1};a._cleanFileData=function(a){return 0<=a.indexOf("\r")&&0<=a.indexOf("\n")?a.replace(/\r\n/g,"\n"):0<=a.indexOf("\r")?a.replace(/\r/g,"\n"):a};a._getFileType=function(a){var e=a.substring(0,1);if("$"==e||":"==e)return"MOL";if("="==e)return"="==a.substring(1,2)?"LCIF":"PDB";a=a.split(".").pop().toUpperCase();return a.substring(0,Math.min(a.length,3))};a._getZ=function(b,e){return b&&b._z&&b._z[e]||a._z[e]};a._incrZ=function(b,e){return b&&b._z&&++b._z[e]||
299 ++a._z[e]};a._loadFileAsynchronously=function(b,e,c,d){if(0!=c.indexOf("?")){var k=c;c=a._checkFileName(e,c);var h=function(e){a._setData(b,c,k,e,d)},h=a._checkCache(e,c,h);0<=c.indexOf("|")&&(c=c.split("|")[0]);return null==h?null:a._getFileData(c,h)}if(!a.featureDetection.hasFileReader)return b.setData("Local file reading is not enabled in your browser",null,null,d);e._localReader||(h='<div id="ID" style="z-index:'+a._getZ(e,"fileOpener")+';position:absolute;background:#E0E0E0;left:10px;top:10px"><div style="margin:5px 5px 5px 5px;"><input type="file" id="ID_files" /><button id="ID_loadfile">load</button><button id="ID_cancel">cancel</button></div><div>',
300 a.$after("#"+e._id+"_appletdiv",h.replace(/ID/g,e._id+"_localReader")),e._localReader=a.$(e,"localReader"));a.$appEvent(e,"localReader_loadfile","click");a.$appEvent(e,"localReader_loadfile","click",function(){var c=a.$(e,"localReader_files")[0].files[0],k=new FileReader;k.onloadend=function(k){k.target.readyState==FileReader.DONE&&(a.$css(a.$(e,"localReader"),{display:"none"}),a._setData(b,c.name,c.name,k.target.result,d))};k.readAsArrayBuffer(c)});a.$appEvent(e,"localReader_cancel","click");a.$appEvent(e,
301 "localReader_cancel","click",function(){a.$css(a.$(e,"localReader"),{display:"none"});b.setData(null,null,null,d)});a.$css(a.$(e,"localReader"),{display:"block"})};a._setData=function(b,e,c,d,k){d=a._strToBytes(d);0<=e.indexOf(".jdx")&&a.Cache.put("cache://"+e,d);b.setData(e,c,d,k)};a._toBytes=function(a){if("string"==typeof a)return a.getBytes();a=new Uint8Array(a);for(var e=Clazz.newByteArray(a.length,0),c=a.length;0<=--c;)e[c]=a[c];return e};a._doAjax=function(b,e,c){b=b.toString();if(null!=c)return a._saveFile(b,
302 c);e&&(b+="?POST?"+e);return a._getFileData(b,null,!0)};a._saveFile=function(b,e,c,d){if(a._localFileSaveFunction&&a._localFileSaveFunction(b,e))return"OK";b=b.substring(b.lastIndexOf("/")+1);c||(c=0<=b.indexOf(".pdf")?"application/pdf":0<=b.indexOf(".png")?"image/png":0<=b.indexOf(".gif")?"image/gif":0<=b.indexOf(".jpg")?"image/jpg":"");var k="string"==typeof e;k||(e=(JU?JU:J.util).Base64.getBase64(e).toString());d||(d=k?"":"base64");(k=a._serverUrl)&&0<=k.indexOf("your.server")&&(k="");a._useDataURI||
303 !k?(d||(e=btoa(e)),d=document.createElement("a"),d.href="data:"+c+";base64,"+e,d.type=c||"text/plain",d.download=b,d.target="_blank",l("body").append(d),d.click(),d.remove()):(a._formdiv||(a.$after("body",'<div id="__jsmolformdiv__" style="display:none">\t\t\t\t\t\t<form id="__jsmolform__" method="post" target="_blank" action="">\t\t\t\t\t\t<input name="call" value="saveFile"/>\t\t\t\t\t\t<input id="__jsmolmimetype__" name="mimetype" value=""/>\t\t\t\t\t\t<input id="__jsmolencoding__" name="encoding" value=""/>\t\t\t\t\t\t<input id="__jsmolfilename__" name="filename" value=""/>\t\t\t\t\t\t<textarea id="__jsmoldata__" name="data"></textarea>\t\t\t\t\t\t</form>\t\t\t\t\t\t</div>'),
304 a._formdiv="__jsmolform__"),a.$attr(a._formdiv,"action",k+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",e),a.$val("__jsmolfilename__",b),a.$val("__jsmolmimetype__",c),a.$val("__jsmolencoding__",d),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(b){if(Clazz.instanceOf(b,self.ArrayBuffer))return a._toBytes(b);for(var e=Clazz.newByteArray(b.length,0),c=b.length;0<=--c;)e[c]=b.charCodeAt(c)&255;return e};a._setConsoleDiv=
305 function(a){self.Clazz&&Clazz.setConsoleDiv(a)};a._registerApplet=function(b,e){return window[b]=a._applets[b]=a._applets[e]=a._applets[b+"__"+a._syncId+"__"]=e};a._readyCallback=function(b,e,c,d,k){b=b.split("_object")[0];k||(k=d);c=c.booleanValue?c.booleanValue():c;var h=a._applets[b];h._appletPanel=k;h._applet=d;a._track(h._readyCallback(b,e,c))};a._getWrapper=function(b,e){var c;if(e){var d="";b._coverImage&&(d=' onclick="Jmol.coverApplet(ID, false)" title="'+b._coverTitle+'"',c='<image id="ID_coverclickgo" src="'+
306 b._j2sPath+'/img/play_make_live.jpg" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:'+a._getZ(b,"coverImage")+';opacity:0.5;"'+d+" />",d='<div id="ID_coverdiv" style="background-color:red;z-index:'+a._getZ(b,"coverImage")+';width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+b._coverImage+'" style="width:100%;height:100%"'+d+"/>"+c+"</div>");c=a._appletCssText.replace(/\'/g,'"');c=0<=c.indexOf('style="')?c.split('style="')[1]:
307 '" '+c;c='...<div id="ID_appletinfotablediv" style="width:Wpx;height:Hpx;position:relative;font-size:14px;text-align:left">IMG......<div id="ID_appletdiv" style="z-index:'+a._getZ(b,"header")+";width:100%;height:100%;position:absolute;top:0px;left:0px;"+c+">";var k=b._height,h=b._width;if("string"!==typeof k||0>k.indexOf("%"))k+="px";if("string"!==typeof h||0>h.indexOf("%"))h+="px";c=c.replace(/IMG/,d).replace(/Hpx/g,k).replace(/Wpx/g,h)}else c='......</div>......<div id="ID_2dappletdiv" style="position:absolute;width:100%;height:100%;overflow:hidden;display:none"></div>......<div id="ID_infotablediv" style="width:100%;height:100%;position:absolute;top:0px;left:0px">.........<div id="ID_infoheaderdiv" style="height:20px;width:100%;background:yellow;display:none"><span id="ID_infoheaderspan"></span><span id="ID_infocheckboxspan" style="position:absolute;text-align:right;right:1px;"><a href="javascript:Jmol.showInfo(ID,false)">[x]</a></span></div>.........<div id="ID_infodiv" style="position:absolute;top:20px;bottom:0px;width:100%;height:100%;overflow:auto"></div>......</div>...</div>';
308 return c.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,b._id)};a._documentWrite=function(b){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var e=document.getElementsByTagName("script");a._XhtmlElement=e.item(e.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(b):a._document.write(b)}return b};a._domWrite=function(b){for(var e=[0];e[0]<b.length;){var c=a._getDomElement(b,e);if(!c)break;a._XhtmlAppendChild?a._XhtmlElement.appendChild(c):a._XhtmlElement.parentNode.insertBefore(c,
309 _jmol.XhtmlElement)}};a._getDomElement=function(a,e){var c=document.createElement("span");c.innerHTML=a;e[0]=a.length;return c};a._setObject=function(b,e,c){b._id=e;b.__Info={};c.z&&c.zIndexBase&&(a._z=a._getZOrders(c.zIndexBase));for(var d in c)b.__Info[d]=c[d];(b._z=c.z)||c.zIndexBase&&(b._z=b.__Info.z=a._getZOrders(c.zIndexBase));b._width=c.width;b._height=c.height;b._noscript=!b._isJava&&c.noscript;b._console=c.console;b._cacheFiles=!!c.cacheFiles;b._viewSet=null==c.viewSet||b._isJava?null:"Set"+
310 c.viewSet;null!=b._viewSet&&(a.View.__init(b),b._currentView=null);!a._fileCache&&b._cacheFiles&&(a._fileCache={});b._console||(b._console=b._id+"_infodiv");"none"==b._console&&(b._console=null);b._color=c.color?c.color.replace(/0x/,"#"):"#FFFFFF";b._disableInitialConsole=c.disableInitialConsole;b._noMonitor=c.disableJ2SLoadMonitor;a._j2sPath&&(c.j2sPath=a._j2sPath);b._j2sPath=c.j2sPath;b._coverImage=c.coverImage;b._isCovered=!!b._coverImage;b._deferApplet=c.deferApplet||b._isCovered&&b._isJava;b._deferUncover=
311 c.deferUncover&&!b._isJava;b._coverScript=c.coverScript;b._coverTitle=c.coverTitle;b._coverTitle||(b._coverTitle=b._deferApplet?"activate 3D model":"3D model is loading...");b._containerWidth=b._width+(b._width==parseFloat(b._width)?"px":"");b._containerHeight=b._height+(b._height==parseFloat(b._height)?"px":"");b._info="";b._infoHeader=b._jmolType+' "'+b._id+'"';b._hasOptions=c.addSelectionOptions;b._defaultModel=c.defaultModel;b._readyScript=c.script?c.script:"";b._readyFunction=c.readyFunction;
312 b._coverImage&&!b._deferApplet&&(b._readyScript+=";javascript "+e+"._displayCoverImage(false)");b._src=c.src};a._addDefaultInfo=function(b,e){for(var c in e)"undefined"==typeof b[c]&&(b[c]=e[c]);a._use&&(b.use=a._use);0<=b.use.indexOf("SIGNED")&&(0>b.jarFile.indexOf("Signed")&&(b.jarFile=b.jarFile.replace(/Applet/,"AppletSigned")),b.use=b.use.replace(/SIGNED/,"JAVA"),b.isSigned=!0)};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(b){a._syncedReady[b]=
313 1;for(var e=0,c=0;c<a._syncedApplets.length;c++){if(a._syncedApplets[c]==b._id)a._syncedApplets[c]=b,a._syncedReady[c]=1;else if(!a._syncedReady[c])continue;e++}e==a._syncedApplets.length&&a._setSyncReady()};a._setDestroy=function(b){a.featureDetection.allowDestroy&&a.$windowOn("beforeunload",function(){a._destroy(b)})};a._destroy=function(b){try{b._appletPanel&&b._appletPanel.destroy();b._applet=null;a._unsetMouse(b._canvas);b._canvas=null;for(var e=0,c=0;c<a._syncedApplets.length;c++)a._syncedApplets[c]==
314 b&&(a._syncedApplets[c]=null),a._syncedApplets[c]&&e++;0<e||a._clearVars()}catch(d){}};a._setSyncReady=function(){a._syncReady=!0;for(var b="",e=0;e<a._syncedApplets.length;e++)a._syncedCommands[e]&&(b+="Jmol.script(Jmol._syncedApplets["+e+"], Jmol._syncedCommands["+e+"]);");setTimeout(b,50)};a._mySyncCallback=function(b,e){app=a._applets[b];if(app._viewSet)a.View.updateFromSync(app,e);else{if(!a._syncReady||!a._isJmolJSVSync)return 1;for(var c=0;c<a._syncedApplets.length;c++)0<=e.indexOf(a._syncedApplets[c]._syncKeyword)&&
315 a._syncedApplets[c]._syncScript(e);return 0}};a._getElement=function(a,e){return document.getElementById(a._id+"_"+e)||{}};a._evalJSON=function(a,e){a+="";if(!a)return[];if("{"!=a.charAt(0))return 0<=a.indexOf(" | ")&&(a=a.replace(/\ \|\ /g,"\n")),a;var c=(new Function("return "+a))();return!c?null:e&&void 0!=c[e]?c[e]:c};a._sortMessages=function(a){function e(a,b){return a[0]<b[0]?1:a[0]>b[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var c=[],d=a.length-1;0<=d;d--)for(var k=0,h=a[d].length;k<h;k++)c[c.length]=
316 a[d][k];if(0!=c.length)return c=c.sort(e)};a._setMouseOwner=function(b,e){null==b||e?a._mouseOwner=b:a._mouseOwner==b&&(a._mouseOwner=null)};a._jsGetMouseModifiers=function(a){var e=0;switch(a.button){case 0:e=16;break;case 1:e=8;break;case 2:e=4}a.shiftKey&&(e+=1);a.altKey&&(e+=8);a.ctrlKey&&(e+=2);return e};a._jsGetXY=function(b,e){if(!b.applet._ready||a._touching&&0>e.type.indexOf("touch"))return!1;var c=a.$offset(b.id),d,k=e.originalEvent;e.pageX||(e.pageX=k.pageX);e.pageY||(e.pageY=k.pageY);
317 a._mousePageX=e.pageX;a._mousePageY=e.pageY;k.targetTouches&&k.targetTouches[0]?(d=k.targetTouches[0].pageX-c.left,c=k.targetTouches[0].pageY-c.top):k.changedTouches?(d=k.changedTouches[0].pageX-c.left,c=k.changedTouches[0].pageY-c.top):(d=e.pageX-c.left,c=e.pageY-c.top);return void 0==d?null:[Math.round(d),Math.round(c),a._jsGetMouseModifiers(e)]};a._gestureUpdate=function(b,e){e.stopPropagation();e.preventDefault();var c=e.originalEvent;switch(e.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=
318 !1}if(!c.touches||2!=c.touches.length)return!1;switch(e.type){case "touchstart":b._touches=[[],[]];break;case "touchmove":var d=a.$offset(b.id),k=b._touches[0],h=b._touches[1];k.push([c.touches[0].pageX-d.left,c.touches[0].pageY-d.top]);h.push([c.touches[1].pageX-d.left,c.touches[1].pageY-d.top]);c=k.length;3<c&&(k.shift(),h.shift());2<=c&&b.applet._processGesture(b._touches)}return!0};a._jsSetMouse=function(b){var e=function(a){return 0<=a.target.className.indexOf("swingjs-ui")};a.$bind(b,"mousedown touchstart",
319 function(c){if(e(c))return!0;a._setMouseOwner(b,!0);c.stopPropagation();var d=c.target["data-UI"];(!d||!d.handleJSEvent(b,501,c))&&c.preventDefault();b.isDragging=!0;if("touchstart"==c.type&&a._gestureUpdate(b,c))return!!d;a._setConsoleDiv(b.applet._console);var k=a._jsGetXY(b,c);k&&(2!=c.button&&a.Swing.hideMenus(b.applet),b.applet._processEvent(501,k));return!!d});a.$bind(b,"mouseup touchend",function(c){if(e(c))return!0;a._setMouseOwner(null);c.stopPropagation();var d=c.target["data-UI"];(!d||
320 !d.handleJSEvent(b,502,c))&&c.preventDefault();b.isDragging=!1;if("touchend"==c.type&&a._gestureUpdate(b,c))return!!d;(c=a._jsGetXY(b,c))&&b.applet._processEvent(502,c);return!!d});a.$bind(b,"mousemove touchmove",function(c){if(e(c))return!0;if(a._mouseOwner&&a._mouseOwner!=b&&a._mouseOwner.isDragging){if(!a._mouseOwner.mouseMove)return!0;a._mouseOwner.mouseMove(c);return!1}return a._drag(b,c)});a._drag=function(b,e){e.stopPropagation();e.preventDefault();if("touchmove"==e.type&&a._gestureUpdate(b,
321 e))return!1;var d=a._jsGetXY(b,e);if(!d)return!1;b.isDragging||(d[2]=0);var k=e.target["data-UI"];b.isdragging&&(!k||k.handleJSEvent(b,506,e));b.applet._processEvent(b.isDragging?506:503,d);return!!k};a.$bind(b,"DOMMouseScroll mousewheel",function(c){if(e(c))return!0;c.stopPropagation();c.preventDefault();b.isDragging=!1;var d=c.originalEvent,d=d.detail?d.detail:("mac"==a.featureDetection.os?1:-1)*d.wheelDelta;c=a._jsGetMouseModifiers(c);b.applet._processEvent(-1,[0>d?-1:1,0,c]);return!1});a.$bind(b,
322 "contextmenu",function(){return!1});a.$bind(b,"mouseout",function(c){if(e(c))return!0;a._mouseOwner&&!a._mouseOwner.mouseMove&&a._setMouseOwner(null);b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(b,c);return!1});a.$bind(b,"mouseenter",function(c){if(e(c))return!0;b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!0);if(0===c.buttons||0===c.which){b.isDragging=!1;c=a._jsGetXY(b,c);if(!c)return!1;b.applet._processEvent(504,c);b.applet._processEvent(502,c);
323 return!1}});a.$bind(b,"mousemoveoutjsmol",function(c,d,k){if(e(k))return!0;if(b==a._mouseOwner&&b.isDragging)return a._drag(b,k)});b.applet._is2D&&a.$resize(function(){b.applet&&b.applet._resize()});a.$bind("body","mouseup touchend",function(c){if(e(c))return!0;b.applet&&(b.isDragging=!1);a._setMouseOwner(null)})};a._jsUnsetMouse=function(b){b.applet=null;a.$bind(b,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null);a._setMouseOwner(null)};
324 a.Swing={count:0,menuInitialized:0,menuCounter:0,htDialogs:{}};var r=a.Swing;SwingController=r;r.setDraggable=function(b){b=b.prototype;b.setContainer||(b.setContainer=function(b){this.container=b;b.obj=this;this.ignoreMouse=this.isDragging=!1;var c=this;b.bind("mousedown touchstart",function(b){if(c.ignoreMouse)return c.ignoreMouse=!1,!0;a._setMouseOwner(c,!0);c.isDragging=!0;c.pageX=b.pageX;c.pageY=b.pageY;return!1});b.bind("mousemove touchmove",function(b){if(c.isDragging&&a._mouseOwner==c)return c.mouseMove(b),
325 !1});b.bind("mouseup touchend",function(b){c.mouseUp(b);a._setMouseOwner(null)})},b.mouseUp=function(b){if(this.isDragging&&a._mouseOwner==this)return this.pageX0+=b.pageX-this.pageX,this.pageY0+=b.pageY-this.pageY,this.isDragging=!1;a._setMouseOwner(null)},b.setPosition=function(){if(null===a._mousePageX){var b=a.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));a._mousePageX=b.left;a._mousePageY=b.top}this.pageX0=a._mousePageX;this.pageY0=a._mousePageY;this.container.css({top:a._mousePageY+
326 "px",left:a._mousePageX+"px"})},b.mouseMove=function(b){if(this.isDragging&&a._mouseOwner==this){this.timestamp=System.currentTimeMillis();var c=this.pageX0+(b.pageX-this.pageX);b=this.pageY0+(b.pageY-this.pageY);a._mousePageX=c;a._mousePageY=b;this.container.css({top:b+"px",left:c+"px"})}},b.dragBind=function(b){this.applet._ignoreMouse=!b;this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");
327 a._setMouseOwner(null);if(b){var c=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a,b,d){c.mouseMove(d)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,b,d){c.mouseUp(d)})}})};r.JSDialog=function(){};r.setDraggable(r.JSDialog);r.getScreenDimensions=function(a){a.width=l(window).width();a.height=l(window).height()};r.dispose=function(b){a.$remove(b.id+"_mover");delete r.htDialogs[b.id];b.container.obj.dragBind(!1)};r.register=function(a,d){a.id=d+ ++r.count;
328 r.htDialogs[a.id]=a};r.setDialog=function(b){a._setMouseOwner(null);a.$remove(b.id);var d=b.id+"_mover",c=a._$(d),k;c[0]?(c.html(b.html),k=c[0].jd):(a.$after("body","<div id='"+d+"' style='position:absolute;left:0px;top:0px;'>"+b.html+"</div>"),k=new r.JSDialog,c=a._$(d),b.container=c,k.applet=b.manager.vwr.html5Applet,k.setContainer(c),k.dialog=b,k.setPosition(),k.dragBind(!0),c[0].jd=k);a.$bind("#"+b.id+" .JButton","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JComboBox",
329 "mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JCheckBox","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JTextField","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JTable","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JScrollPane","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JEditorPane","mousedown touchstart",function(){k.ignoreMouse=!0})};r.setSelected=function(b){a.$prop(b.id,
330 "checked",!!b.selected)};r.setSelectedIndex=function(b){a.$prop(b.id,"selectedIndex",b.selectedIndex)};r.setText=function(b){a.$prop(b.id,"value",b.text)};r.setVisible=function(b){a.$setVisible(b.id,b.visible)};r.setEnabled=function(b){a.$setEnabled(b.id,b.enabled)};r.click=function(b,d){var c=r.htDialogs[b.id];if(c){var k=c.toString();if(0<=k.indexOf("JCheck"))c.selected=b.checked;else if(0<=k.indexOf("JCombo"))c.selectedIndex=b.selectedIndex;else if(null!=c.text&&(c.text=b.value,d&&13!=(d.charCode||
331 d.keyCode)))return}k=r.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];k.manager.actionPerformed(c?c.name:k.registryKey+"/"+b.id)};r.setFront=function(b){var d=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(d,"dialog")&&(b.zIndex=a._incrZ(d,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};r.hideMenus=function(a){if(a=a._menus)for(var d in a)a[d].visible&&r.hideMenu(a[d])};r.windowClosing=function(b){b=r.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];b.registryKey?b.manager.processWindowClosing(b.registryKey):
332 b.dispose()};a._track=function(b){if(a._tracker){try{var d='<iframe style="display:none" width="0" height="0" frameborder="0" tabindex="-1" src="'+(a._tracker+"&applet="+b._jmolType+"&version="+a._version+"&appver="+a.___JmolVersion+"&url="+encodeURIComponent(document.location.href))+'"></iframe>';a.$after("body",d)}catch(c){}delete a._tracker}return b};a.getProfile=function(){window["j2s.doProfile"]=!0;if(self.Clazz&&self.JSON)return Clazz._profile||(Clazz._profile={}),Clazz.getProfile()};a._getInChIKey=
333 function(a,d){0<=d.indexOf("MOL=")&&d.split("MOL=")[1].split('"')};a._getAttr=function(a,d){var c=a.indexOf(d+"=");return 0<=c&&0<=(c=a.indexOf('"',c))?a.substring(c+1,a.indexOf('"',c+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.updateView=function(d,c){if(null!=d._viewSet){c.chemID||(d._searchQuery=null);c.data||(c.data="N/A");c.type=d._viewType;if(null==(d._currentView=b.__findView(d._viewSet,c)))d._currentView=b.__createViewSet(d._viewSet,c.chemID,
334 c.viewID||c.chemID);d._currentView[c.type].data=c.data;d._currentView[c.type].smiles=d._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateView");b.__setView(d._currentView,d,!1)}};b.updateFromSync=function(d,c){d._updateMsg=c;var k=a._getAttr(c,"sourceID")||a._getAttr(c,"file");if(k){var h=b.__findView(d._viewSet,{viewID:k});if(null==h)return a.updateView(d,c);h!=d._currentView&&b.__setView(h,d,!0);var n=(k=a._getAttr(c,"atoms"))&&0<=c.indexOf("selectionhalos ON")?eval("["+
335 k+"]"):[];setTimeout(function(){d._currentView==h&&b.updateAtomPick(d,n)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateFromSync")}};b.updateAtomPick=function(b,c){var d=b._currentView;if(null!=d){for(var k in d)"info"!=k&&d[k].applet!=b&&d[k].applet._updateAtomPick(c);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var c=b.sets[a];if(c){var d="View set "+a+":\n";a=b.applets[a];for(var k in a)d+="\napplet "+a[k]._id+" currentView="+
336 (a[k]._currentView?a[k]._currentView.info.viewID:null);for(k=c.length;0<=--k;){a=c[k];var d=d+("\n\n<b>view="+k+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"</b>\n"),h,n;for(n in a)"info"!=n&&(d+="\nview="+k+" type="+n+" applet="+((h=a[n]).applet?h.applet._id:null)+" SMILES="+h.smiles+"\n atomMap="+JSON.stringify(h.atomMap)+"\n data=\n"+h.data+"\n")}return d}};b.__init=function(a){var c=a._viewSet,d=b.applets;d[c]||(d[c]={});d[c][a._viewType]=a};b.__findView=function(a,c){var d=b.sets[a];null==
337 d&&(d=b.sets[a]=[]);for(var k=d.length;0<=--k;){var h=d[k];if(c.viewID){if(h.info.viewID==c.viewID)return h}else{if(null!=c.chemID&&c.chemID==h.info.chemID)return h;for(var n in h)if("info"!=n&&(null!=c.data&&null!=h[n].data?c.data==h[n].data:c.type==n))return h}}return null};b.__createViewSet=function(d,c,k){b.count++;c={info:{chemID:c,viewID:k||"model_"+b.count}};for(var h in a._applets)k=a._applets[h],k._viewSet==d&&(c[k._viewType]={applet:k,data:null});b.sets[d].push(c);return c};b.__setView=
338 function(a,b,d){for(var k in a)if("info"!=k){var h=a[k],n=h.applet,s=d||null!=n&&"<modified>"==n._molData;if(!(null==n||n==b&&!s)){var l=null==h.data,r=null!=n._currentView;n._currentView=a;if(!r||!(a[k].data==h.data&&!l&!s))if(n._loadModelFromView(a),l)break}}}})(a.View);a.Cache={fileCache:{}};a.Cache.get=function(b){return a.Cache.fileCache[b]};a.Cache.put=function(b,d){a.Cache.fileCache[b]=d};a.Cache.setDragDrop=function(b){a.$appEvent(b,"appletdiv","dragover",function(a){a=a.originalEvent;a.stopPropagation();
339 a.preventDefault();a.dataTransfer.dropEffect="copy"});a.$appEvent(b,"appletdiv","drop",function(d){var c=d.originalEvent;c.stopPropagation();c.preventDefault();var k=c.dataTransfer.files[0];if(null==k)try{k=""+c.dataTransfer.getData("text"),(0==k.indexOf("file:/")||0==k.indexOf("http:/"))&&b._scriptLoad(k)}catch(h){}else c=new FileReader,c.onloadend=function(c){if(c.target.readyState==FileReader.DONE){var h="cache://DROP_"+k.name;c=a._toBytes(c.target.result);h.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",
340 !1);"JSV"==b._viewType||h.endsWith(".jdx")?a.Cache.put(h,c):b._appletPanel.cachePut(h,c);(c=a._jsGetXY(b._canvas,d))&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,c[0],c[1],h))&&b._appletPanel.openFileAsyncSpecial(h,1)}},c.readAsArrayBuffer(k)})}})(Jmol,jQuery);Jmol._debugCode=!1;
341 (function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var l=!1,k=[],h=[],d=0,n=[],s=[],r=function(b){arguments.length||(b=!0);delete d;for(var e;0<h.length&&"done"==(e=h[0])[4];)h.shift();if(0!=h.length)if(!a._isAsync&&!b)setTimeout(r,10);else{e.push("done");var n="JSmol exec "+e[0]._id+" "+e[3]+" "+e[2];self.System&&System.out.println(n);self.console&&console.log(n+" -- OK");k.push(n);e[1](e[0],e[2])}},b=function(b){l?r():(l=!0,LoadClazz(),b._noMonitor&&(Clazz._LoaderProgressMonitor.showStatus=
342 function(){}),LoadClazz=null,b.__Info.uncompressed&&Clazz.loadClass(),Clazz._Loader.onGlobalLoaded=function(){Clazz._LoaderProgressMonitor.showStatus("Application loaded.",!0);if(!a._debugCode||!a.haveCore)a.haveCore=!0,r()},Clazz._Loader.loadPackageClasspath("java",null,!0,r))},e=function(a,b){Clazz._Loader.loadClass(b,function(){r()})};a.showExecLog=function(){return k.join("\n")};a._addExec=function(a){a[1]||(a[1]=e);var b="JSmol load "+a[0]._id+" "+a[3];self.console&&console.log(b+"...");k.push(b);
343 h.push(a)};a._addCoreFile=function(b,d,e){b=b.toLowerCase().split(".")[0];if(!(0<=n.join("").indexOf(b))){n.push(b);n.sort();a._coreFiles=[d+"/core/core"+n.join("")+".z.js"];if(e&&(e=e.split(" ")))for(b=0;b<e.length;b++)0>s.join("").indexOf(e[b])&&s.push(d+"/core/core"+e[b]+".z.js");for(b=0;b<s.length;b++)a._coreFiles.push(s[b])}};a._Canvas2D=function(b,d,e,k){this._uniqueId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._jmolType="Jmol._Canvas2D ("+e+")";this._isLayered=
344 d._isLayered||!1;this._isSwing=d._isSwing||!1;this._isJSV=d._isJSV||!1;this._isAstex=d._isAstex||!1;this._platform=d._platform||"";if(k)return this;window[b]=this;this._createCanvas(b,d);if(!a._document||this._deferApplet)return this;this._init();return this};a._setAppletParams=function(b,d,e,k){for(var h in e)if(!b||0<=b.indexOf(";"+h.toLowerCase()+";"))null==e[h]||"language"==h&&!a.featureDetection.supportsLocalization()||(k?d.put(h,!0===e[h]?Boolean.TRUE:!1===e[h]?Boolean.FALSE:e[h]):d[h]=e[h])};
345 a._jsSetPrototype=function(c){c._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};c._createCanvas=function(b,c,d){a._setObject(this,b,c);d&&(this._GLmol=d,this._GLmol.applet=this,this._GLmol.id=this._id);d=a._getWrapper(this,!0);this._deferApplet||(a._document?(a._documentWrite(d),this._newCanvas(!1),d=""):(this._deferApplet=!0,d+='<script type="text/javascript">'+b+"._cover(false)\x3c/script>"));d+=a._getWrapper(this,!1);c.addSelectionOptions&&(d+=
346 a._getGrabberOptions(this));a._debugAlert&&!a._document&&alert(d);this._code=a._documentWrite(d)};c._newCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};c._getHtml5Canvas=function(){return this._canvas};c._getWidth=function(){return this._canvas.width};c._getHeight=function(){return this._canvas.height};c._getContentLayer=function(){return a.$(this,"contentLayer")[0]};c._repaintNow=function(){a._repaint(this,!1)};c._createCanvas2d=function(){var b=a.$(this,"appletdiv");
347 try{b[0].removeChild(this._canvas),this._canvas.frontLayer&&b[0].removeChild(this._canvas.frontLayer),this._canvas.rearLayer&&b[0].removeChild(this._canvas.rearLayer),this._canvas.contentLayer&&b[0].removeChild(this._canvas.contentLayer),a._jsUnsetMouse(this._mouseInterface)}catch(c){}var d=Math.round(b.width()),e=Math.round(b.height()),k=document.createElement("canvas");k.applet=this;this._canvas=k;k.style.width="100%";k.style.height="100%";k.width=d;k.height=e;k.id=this._id+"_canvas2d";b.append(k);
348 a._$(k.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var h=document.createElement("div");k.contentLayer=h;h.id=this._id+"_contentLayer";b.append(h);a._$(h.id).css({zIndex:a._getZ(this,"image"),position:"absolute",left:"0px",top:"0px",width:(this._isSwing?d:0)+"px",height:(this._isSwing?e:0)+"px",overflow:"hidden"});this._isSwing?(b=document.createElement("div"),b.id=this._id+"_swingdiv",a._$(this._id+"_appletinfotablediv").append(b),a._$(b.id).css({zIndex:a._getZ(this,"rear"),position:"absolute",
349 left:"0px",top:"0px",width:d+"px",height:e+"px",overflow:"hidden"}),this._mouseInterface=k.contentLayer,k.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,d,e,!1)}else this._mouseInterface=k;a._jsSetMouse(this._mouseInterface)};c._getLayer=function(b,c,d,e,k){var h=document.createElement("canvas");this._canvas[b+"Layer"]=h;h.style.width="100%";h.style.height="100%";h.id=this._id+"_"+b+"Layer";h.width=d;h.height=e;c.append(h);h.applet=this;a._$(h.id).css({background:k?"rgb(0,0,0,1)":
350 "rgb(0,0,0,0.001)","z-index":a._getZ(this,b),position:"absolute",left:"0px",top:"0px",overflow:"hidden"});return h};c._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==h.length&&a._addExec([this,b,null,"loadClazz"]);this._addCoreFiles();a._addExec([this,this.__startAppletJS,null,"start applet"]);this._isSigned=!0;this._ready=!1;this._applet=null;this._canScript=function(){return!0};this._savedOrientations=
351 [];d&&clearTimeout(d);d=setTimeout(r,100)};c.__startAppletJS=function(b){0==a._version.indexOf("$Date: ")&&(a._version=(a._version.substring(7)+" -").split(" -")[0]+" (JSmol/j2s)");var c=Clazz._4Name("java.util.Hashtable").newInstance();a._setAppletParams(b._availableParams,c,b.__Info,!0);c.put("appletReadyCallback","Jmol._readyCallback");c.put("applet",!0);c.put("name",b._id);c.put("syncId",a._syncId);a._isAsync&&c.put("async",!0);b._color&&c.put("bgcolor",b._color);b._startupScript&&c.put("script",
352 b._startupScript);a._syncedApplets.length&&c.put("synccallback","Jmol._mySyncCallback");c.put("signedApplet","true");c.put("platform",b._platform);b._is2D&&c.put("display",b._id+"_canvas2d");c.put("documentBase",document.location.href);var d=b._j2sPath+"/";if(0>d.indexOf("://")){var e=document.location.href.split("#")[0].split("?")[0].split("/");0==d.indexOf("/")?e=[e[0],d.substring(1)]:e[e.length-1]=d;d=e.join("/")}c.put("codePath",d);a._registerApplet(b._id,b);try{b._newApplet(c)}catch(k){System.out.println((a._isAsync?
353 "normal async abort from ":"")+k);return}b._jsSetScreenDimensions();r()};c._restoreState||(c._restoreState=function(){});c._jsSetScreenDimensions=function(){if(this._appletPanel){var b=a._getElement(this,this._is2D?"canvas2d":"canvas");this._appletPanel.setScreenDimension(b.width,b.height)}};c._show=function(b){a.$setVisible(a.$(this,"appletdiv"),b);b&&a._repaint(this,!0)};c._canScript=function(){return!0};c.equals=function(a){return this==a};c.clone=function(){return this};c.hashCode=function(){return parseInt(this._uniqueId)};
354 c._processGesture=function(a){return this._appletPanel.processTwoPointGesture(a)};c._processEvent=function(a,b){this._appletPanel.processMouseEvent(a,b[0],b[1],b[2],System.currentTimeMillis())};c._resize=function(){var b="__resizeTimeout_"+this._id;a[b]&&clearTimeout(a[b]);var c=this;a[b]=setTimeout(function(){a._repaint(c,!0);a[b]=null},100)};return c};a._repaint=function(b,d){if(b&&b._appletPanel){var e=a.$(b,"appletdiv"),k=Math.round(e.width()),e=Math.round(e.height());if(b._is2D&&(b._canvas.width!=
355 k||b._canvas.height!=e))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(k,e);k=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};d?setTimeout(k):k()}};a._getHiddenCanvas=function(a,b,d,e){b=a._id+"_"+b;a=document.createElement("canvas");a.width=a.style.width=d;a.height=a.style.height=e;a.id=b;return a};a._loadImage=function(b,d,e,k,h){var n=d[1];if(null==h&&(h=new Image,null==e?h.onload=function(){a._loadImage(b,d,null,
356 k,h)}:(e=JU.Base64.getBase64(e).toString(),n=n.substring(n.lastIndexOf("/")+1),n="data:"+(0<=n.indexOf(".png")?"image/png":0<=n.indexOf(".jpg")?"image/jpg":"")+";base64,"+e),h.src=n,null==e))return;e=h.width;var s=h.height,l="echo_"+d[0],r=a._getHiddenCanvas(b.vwr.html5Applet,l,e,s,!0);r.imageWidth=e;r.imageHeight=s;r.id=l;r.image=h;a._setCanvasImage(r,e,s);k(r,n)};a._setCanvasImage=function(a,b,d){a.buf32=null;a.width=b;a.height=d;a.getContext("2d").drawImage(a.image,0,0,b,d)}})(Jmol);
357 (function(a,l){a._Applet=function(d,k,h){window[d]=this;this._jmolType="Jmol._Applet"+(k.isSigned?" (signed)":"");this._viewType="Jmol";this._isJava=!0;this._syncKeyword="Select:";this._availableParams=";progressbar;progresscolor;boxbgcolor;boxfgcolor;allowjavascript;boxmessage;\t\t\t\t\t\t\t\t\t;messagecallback;pickcallback;animframecallback;appletreadycallback;atommovedcallback;\t\t\t\t\t\t\t\t\t;echocallback;evalcallback;hovercallback;language;loadstructcallback;measurecallback;\t\t\t\t\t\t\t\t\t;minimizationcallback;resizecallback;scriptcallback;statusform;statustext;statustextarea;\t\t\t\t\t\t\t\t\t;synccallback;usecommandthread;syncid;appletid;startupscript;menufile;";
358 if(h)return this;this._isSigned=k.isSigned;this._readyFunction=k.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=k.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(d,b){var e=!1;a._jarFile&&(b=a._jarFile);if(this._jarFile){var c=this._jarFile;0<=c.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+c+". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network."),
359 "yes"==prompt("Do you want to use applet "+c+"? ","yes or no")?(d=c.substring(0,c.lastIndexOf("/")),b=c.substring(c.lastIndexOf("/")+1)):e=!0):b=c;this_isSigned=k.isSigned=0<=b.indexOf("Signed")}this._jarPath=k.jarPath=d||".";this._jarFile=k.jarFile="string"==typeof b?b:(b?"JmolAppletSigned":"JmolApplet")+"0.jar";e&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(d,k);return this};
360 var k=a._Applet,h=a._Applet.prototype;k._get=function(d,h,l){l||(l=!1);h||(h={});a._addDefaultInfo(h,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://your.server.here/jsmol.php",defaultModel:"",script:null,src:null,readyFunction:null,use:"HTML5",jarPath:"java",jarFile:"JmolApplet0.jar",isSigned:!1,j2sPath:"j2s",coverImage:null,coverTitle:"",coverCommand:"",deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!1,debug:!1});a._debugAlert=h.debug;
361 h.serverURL&&(a._serverUrl=h.serverURL);for(var r=!1,b=null,e=h.use.toUpperCase().split("#")[0].split(" "),c=0;c<e.length;c++){switch(e[c]){case "JAVA":r=!0;a.featureDetection.supportsJava()&&(b=new k(d,h,l));break;case "WEBGL":b=k._getCanvas(d,h,l,!0);break;case "HTML5":a.featureDetection.allowHTML5?b=k._getCanvas(d,h,l,!1):e.push("JAVA");break;case "IMAGE":b=new a._Image(d,h,l)}if(null!=b)break}null==b&&(l||!r?b={_jmolType:"none"}:r&&(b=new k(d,h)));return l?b:a._registerApplet(d,b)};k._getCanvas=
362 function(d,h,l,r){h._isLayered=!1;h._platform="J.awtjs2d.Platform";return r&&a.featureDetection.supportsWebGL()?(a._Canvas3D.prototype=a.GLmol.extendApplet(a._jsSetPrototype(new k(d,h,!0))),new a._Canvas3D(d,h,"Jmol",l)):!r?(a._Canvas2D.prototype=a._jsSetPrototype(new k(d,h,!0)),new a._Canvas2D(d,h,"Jmol",l)):null};k._noJavaMsg="Either you do not have Java applets enabled in your web<br />browser or your browser is blocking this applet.<br />\t\t\tCheck the warning message from your browser and/or enable Java applets in<br />\t\t\tyour web browser preferences, or install the Java Runtime Environment from <a href='http://www.java.com'>www.java.com</a>";
363 k._setCommonMethods=function(a){a._showInfo=h._showInfo;a._search=h._search;a._getName=h._getName;a._readyCallback=h._readyCallback};k._createApplet=function(d,h,s){d._initialize(h.jarPath,h.jarFile);var r=d._jarFile;a._isFile&&(r=r.replace(/0\.jar/,".jar"));var b=0<=d._containerWidth.indexOf("px")?d._containerWidth:"100%",e=0<=d._containerHeight.indexOf("px")?d._containerHeight:"100%",b=' style="width:'+b+";height:"+e+'" ',e="name='"+d._id+"_object' id='"+d._id+"_object' \n"+b+"\n";s.codebase=d._jarPath;
364 s.codePath=s.codebase+"/";if(0>s.codePath.indexOf("://")){var c=l.location.href.split("#")[0].split("?")[0].split("/");c[c.length-1]=s.codePath;s.codePath=c.join("/")}s.archive=r;s.mayscript="true";s.java_arguments="-Xmx"+Math.round(h.memoryLimit||d._memoryLimit)+"m";s.permissions=d._isSigned?"all-permissions":"sandbox";s.documentLocation=l.location.href;s.documentBase=l.location.href.split("#")[0].split("?")[0];s.jarPath=h.jarPath;a._syncedApplets.length&&(s.synccallback="Jmol._mySyncCallback");
365 d._startupScript&&(s.script=d._startupScript);var c="\n",q;for(q in s)s[q]&&(c+="  <param name='"+q+"' value='"+s[q]+"' />\n");c=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"<object "+e+(a.featureDetection.useIEObject?" classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93' codebase='http://java.sun.com/update/1.6.0/jinstall-6u22-windows-i586.cab'>":" type='application/x-java-applet'>")+c+"<p style='background-color:yellow;"+b.split('"')[1]+";text-align:center;vertical-align:middle;'>\n"+
366 k._noJavaMsg+"</p></object>\n":"<applet "+e+" code='"+s.code+"' codebase='"+d._jarPath+"' archive='"+r+"' mayscript='true'>\n"+c+"<table bgcolor='yellow'><tr><td align='center' valign='middle' "+b+">\n"+k._noJavaMsg+"</td></tr></table></applet>\n";d._deferApplet&&(d._javaCode=c,c="");c=a._getWrapper(d,!0)+c+a._getWrapper(d,!1)+(h.addSelectionOptions?a._getGrabberOptions(d):"");a._debugAlert&&alert(c);d._code=a._documentWrite(c)};h._newApplet=function(a){this._is2D||a.put("script",(a.get("script")||
367 "")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};h._addCoreFiles=function(){a._addCoreFile("jmol",this._j2sPath,this.__Info.preloadCore);this._is2D||a._addExec([this,null,"J.export.JSExporter","load JSExporter"]);a._debugCode&&a._addExec([this,null,"J.appletjs.Jmol","load Jmol"])};h._create=function(d,h){a._setObject(this,d,h);var l={syncId:a._syncId,progressbar:"true",progresscolor:"blue",boxbgcolor:this._color||"black",boxfgcolor:"white",boxmessage:"Downloading JmolApplet ...",
368 script:this._color?'background "'+this._color+'"':"",code:"JmolApplet.class"};a._setAppletParams(this._availableParams,l,h);var r;h.inlineModel?(r=h.inlineModel,r=r.replace(/\r|\n|\r\n/g,0<=r.indexOf("|")?"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+r)):r="";l.loadInline=r;l.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&(l.synccallback="Jmol._mySyncCallback");l.java_arguments="-Xmx"+Math.round(h.memoryLimit||this._memoryLimit)+"m";this._initialize(h.jarPath,
369 h.jarFile);k._createApplet(this,h,l)};h._restoreState=function(d,k){System.out.println("\n\nasynchronous restore state for "+d+" "+k);var h=this,l=h._applet&&h._applet.viewer;switch(k){case "setOptions":return function(){h.__startAppletJS(h)};case "render":return function(){setTimeout(function(){l.refresh(2)},10)};default:switch(d){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(l&&l.isScriptExecuting&&l.isScriptExecuting()){if(a._asyncCallbacks[d])return System.out.println("...ignored"),
370 1;var b=l.getEvalContextAndHoldQueue(l.eval),e=b.pc-1;b.asyncID=d;a._asyncCallbacks[d]=function(a){b.pc=a;System.out.println("sc.asyncID="+b.asyncID+" sc.pc = "+b.pc);l.eval.resumeEval(b)};l.eval.pc=l.eval.pcEnd;System.out.println("setting resume for pc="+b.pc+" "+d+" to "+a._asyncCallbacks[d]+"//");return function(){System.out.println("resuming "+d+" "+a._asyncCallbacks[d]);a._asyncCallbacks[d](e)}}System.out.println(d+"?????????????????????"+k);return function(){setTimeout(function(){l.refresh(2)},
371 10)}}};h._readyCallback=function(d,k,h){h&&(a._setDestroy(this),this._ready=!0,d=this._readyScript,this._defaultModel?a._search(this,this._defaultModel,d?";"+d:""):d?this._script(d):this._src&&this._script('load "'+this._src+'"'),this._showInfo(!0),this._showInfo(!1),a.Cache.setDragDrop(this),this._readyFunction&&this._readyFunction(this),a._setReady(this),(d=this._2dapplet)&&(d._isEmbedded&&d._ready&&d.__Info.visible)&&this._show2d(!0))};h._showInfo=function(d){d&&this._2dapplet&&this._2dapplet._show(!1);
372 a.$html(a.$(this,"infoheaderspan"),this._infoHeader);this._info&&a.$html(a.$(this,"infodiv"),this._info);if(!this._isInfoVisible!=!d){this._isInfoVisible=d;if(this._isJava){var k=d?2:"100%";a.$setSize(a.$(this,"appletdiv"),k,k)}a.$setVisible(a.$(this,"infotablediv"),d);a.$setVisible(a.$(this,"infoheaderdiv"),d);this._show(!d)}};h._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),this._2dapplet.__showContainer(!0,!0))};h._getAtomCorrelation=
373 function(a){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' 'H'); zap 2.1",!0);a=jmol._evaluate("atommap");for(var k=jmol._evaluate("{*}.count"),h=[],l=[],b=0;b<a.length;b++){var e=a[b];h[e[0]+1]=e[1]-k+1;l[e[1]-k+1]=e[0]+1}return{fromJmol:h,toJmol:l}};h._show=function(d){var k=!d?2:"100%";a.$setSize(a.$(this,"object"),k,k);this._isJava||a.$setVisible(a.$(this,"appletdiv"),d)};h._clearConsole=function(){this._console==this._id+"_infodiv"&&(this.info="");self.Clazz&&(a._setConsoleDiv(this._console),
374 Clazz.Console.clear())};h._addScript=function(a){this._readyScript||(this.readyScript="");this._readyScript&&(this._readyScript+=";");this._readyScript+=a;return!0};h._script=function(d){if(!this._ready)return this._addScript(d);a._setConsoleDiv(this._console);this._applet.script(d)};h._syncScript=function(a){this._applet.syncScript(a)};h._scriptCheck=function(a){return this._ready&&this._applet.scriptCheck(a)};h._scriptWait=function(a,k){var h=this._scriptWaitAsArray(a),l="";if(!k)for(var b=h.length;0<=
375 --b;)for(var e=0,c=h[b].length;e<c;e++)l+=h[b][e]+"\n";return l};h._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var k="",h=a.length;0<=--h;)for(var l=a[h].length;0<=--l;)"scriptEcho"==a[h][l][1]&&(k+=a[h][l][3]+"\n");return k.replace(/ \| /g,"\n")};h._scriptMessage=function(a){a=this._scriptWaitAsArray(a);for(var k="",h=a.length;0<=--h;)for(var l=a[h].length;0<=--l;)"scriptStatus"==a[h][l][1]&&(k+=a[h][l][3]+"\n");return k.replace(/ \| /g,"\n")};h._scriptWaitOutput=function(a){var k="";
376 try{a&&(k+=this._applet.scriptWaitOutput(a))}catch(h){}return k};h._scriptWaitAsArray=function(d){var k="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),d&&(k+=this._applet.scriptWait(d),k=a._evalJSON(k,"jmolStatus"),"object"==typeof k))return k}catch(h){}return[[k]]};h._getStatus=function(d){return a._sortMessages(this._getPropertyAsArray("jmolStatus",d))};h._getPropertyAsArray=function(d,k){return a._evalJSON(this._getPropertyAsJSON(d,k),d)};h._getPropertyAsString=
377 function(a,k){void 0==k&&(k="");return this._applet.getPropertyAsString(a,k)+""};h._getPropertyAsJSON=function(a,k){void 0==k&&(k="");try{return this._applet.getPropertyAsJSON(a,k)+""}catch(h){return""}};h._getPropertyAsJavaObject=function(a,k){void 0==k&&(k="");return this._applet.getProperty(a,k)};h._evaluate=function(a){null!=a||(a="");return this._getPropertyAsArray("variableInfo",a)};h._evaluateDEPRECATED=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var k=a.replace(/\-*\d+/,"");
378 if(""==k&&!isNaN(parseInt(a)))return parseInt(a);k=a.replace(/\-*\d*\.\d*/,"");return""==k&&!isNaN(parseFloat(a))?parseFloat(a):a};h._saveOrientation=function(a){return this._savedOrientations[a]=this._getPropertyAsArray("orientationInfo","info").moveTo};h._restoreOrientation=function(a){a=this._savedOrientations[a];return!a||""==a?a.replace(/1\.0/,"0"):this._scriptWait(a)};h._restoreOrientationDelayed=function(a,k){1>arguments.length&&(k=1);var h=this._savedOrientations[a];return!h||""==h?h.replace(/1\.0/,
379 k):this._scriptWait(h)};h._resizeApplet=function(d){function k(d,b){var e=""+d;return 0==e.length?b?"":a._allowedJmolSize[2]:e.indexOf("%")==e.length-1?e:1>=(d=parseFloat(d))&&0<d?100*d+"%":(isNaN(d=Math.floor(d))?a._allowedJmolSize[2]:d<a._allowedJmolSize[0]?a._allowedJmolSize[0]:d>a._allowedJmolSize[1]?a._allowedJmolSize[1]:d)+(b?b:"")}var h;"object"==typeof d&&null!=d?(h=d[0]||d.width,d=d[1]||d.height):h=d;h=[k(h,"px"),k(d,"px")];d=a._getElement(this,"appletinfotablediv");d.style.width=h[0];d.style.height=
380 h[1];this._containerWidth=h[0];this._containerHeight=h[1];this._is2D&&a._repaint(this,!0)};h._search=function(d,k){a._search(this,d,k)};h._searchDatabase=function(d,k,h){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(d,k,h);this._showInfo(!1);0<=d.indexOf("?")?a._getInfoFromDatabase(this,k,d.split("?")[0]):(h||(h=a._getScriptForDatabase(k)),d=k+d,this._currentView=null,this._searchQuery=d,this._loadFile(d,h,d))};h._loadFile=function(d,
381 k,h){this._showInfo(!1);k||(k="");this._thisJmolModel=""+Math.random();this._fileName=d;if(!this._scriptLoad(d,k)){var l=this;a._loadFileData(this,d,function(a){l.__loadModel(a,k,h)},function(){l.__loadModel(null)})}};h._scriptLoad=function(a,k){k||(k="");var h=this._isJava||!this._noscript;h&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;h?this._script('load async "'+a+'";'+k):this._applet.openFile(a);this._checkDeferred("");return!0};
382 h.__loadModel=function(d,k,h){null!=d&&(null!=this._viewSet&&(k||(k=""),k+=";if ({*}.molecule.max > 1 || {*}.modelindex.max > 0){ delete molecule > 1 or modelindex > 0;x = getProperty('extractModel',{*});load inline @x};"),!k&&this._noscript?this._applet.loadInlineString(d,"",!1):this._loadMolData(d,k,!1),null!=this._viewSet&&a.View.updateView(this,{chemID:h,data:d}))};h._loadMolData=function(a,k,h){k||(k="");h=h?"append":"model";this._applet.scriptWait('load DATA "'+h+'"'+a+'\nEND "'+h+'" ;'+k)};
383 h._loadModelFromView=function(d){this._currentView=d;var k=d.Jmol;null!=k.data?this.__loadModel(k.data,null,d.info.chemID):null!=d.info.chemID?a._searchMol(this,d.info.chemID,null,!1):(k=d.JME)&&k.applet._show2d(!1,this)};h._updateView=function(){null!=this._viewSet&&this._applet&&(chemID=""+this._getPropertyAsJavaObject("variableInfo","script('show chemical inchiKey')"),chemID=36>chemID.length()?null:chemID.substring(36).split("\n")[0],a.View.updateView(this,{chemID:chemID,data:""+this._getPropertyAsJavaObject("evaluate",
384 "extractModel","{visible}")}))};h._atomPickedCallback=function(d,k){if(!(0>k)){var h=[k+1];a.View.updateAtomPick(this,h);this._updateAtomPick(h)}};h._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};h._isDeferred=function(){return!this._canvas&&this._cover&&this._isCovered&&this._deferApplet};h._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};h._cover=function(d){d||!this._deferApplet?this._displayCoverImage(d):
385 (d=this._coverScript?this._coverScript:"",this._coverScript="",this._deferUncover&&(d+=";refresh;javascript "+this._id+"._displayCoverImage(false)"),this._script(d,!0),this._deferUncover&&"activate 3D model"==this._coverTitle&&(a._getElement(this,"coverimage").title="3D model is loading..."),this._isJava||this._newCanvas(!1),this._defaultModel&&a._search(this,this._defaultModel),this._showInfo(!1),this._deferUncover||this._displayCoverImage(!1),this._isJava&&a.$html(a.$(this,"appletdiv"),this._javaCode),
386 this._init&&this._init())};h._displayCoverImage=function(d){this._coverImage&&this._isCovered!=d&&(this._isCovered=d,a._getElement(this,"coverdiv").style.display=d?"block":"none")};h._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};h._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};h._getMol2D=function(){return jmol._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document);
387 (function(a){var l=a.controls={_hasResetForms:!1,_scripts:[""],_checkboxMasters:{},_checkboxItems:{},_actions:{},_buttonCount:0,_checkboxCount:0,_radioGroupCount:0,_radioCount:0,_linkCount:0,_cmdCount:0,_menuCount:0,_previousOnloadHandler:null,_control:null,_element:null,_appletCssClass:null,_appletCssText:"",_buttonCssClass:null,_buttonCssText:"",_checkboxCssClass:null,_checkboxCssText:"",_radioCssClass:null,_radioCssText:"",_linkCssClass:null,_linkCssText:"",_menuCssClass:null,_menuCssText:""};
388 l._addScript=function(a,h){var d=l._scripts.length;l._scripts[d]=[a,h];return d};l._getIdForControl=function(a,h){return"string"==typeof a?a:!h||!a._canScript||a._canScript(h)?a._id:null};l._radio=function(a,h,d,n,s,r,b,e){var c=l._getIdForControl(a,h);if(null==c)return null;++l._radioCount;void 0!=r&&null!=r||(r="jmolRadioGroup"+(l._radioGroupCount-1));if(!h)return"";void 0!=b&&null!=b||(b="jmolRadio"+(l._radioCount-1));void 0!=d&&null!=d||(d=h.substring(0,32));s||(s="");a="</span>";l._actions[b]=
389 l._addScript(c,h);h='<span id="span_'+b+'"'+(e?' title="'+e+'"':"")+"><input name='"+r+"' id='"+b+"' type='radio' onclick='Jmol.controls._click(this);return true;' onmouseover='Jmol.controls._mouseOver(this);return true;' onmouseout='Jmol.controls._mouseOut()' "+(n?"checked='true' ":"")+l._radioCssText+" />";0<=d.toLowerCase().indexOf("<td>")&&(h+=a,a="");return h+('<label for="'+b+'">'+d+"</label>"+a+s)};l._scriptExecute=function(k,h){var d=a._applets[h[0]],l=h[1];if("object"==typeof l)l[0](k,l,
390 d);else"function"==typeof l?l(d):a.script(d,l)};l.__checkScript=function(a,h){var d=0<=h.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(h.value);h.style.color=d?"black":"red";return d};l.__getCmd=function(a,h){if(h._cmds&&h._cmds.length){var d=h._cmds[h._cmdpt=(h._cmdpt+h._cmds.length+a)%h._cmds.length];setTimeout(function(){h.value=d},10);h._cmdadd=1;h._cmddir=a}};l._commandKeyPress=function(k,h,d){k=13==k?13:window.event?window.event.keyCode:k?k.keyCode||k.which:0;var n=document.getElementById(h),
391 s=a._applets[d];switch(k){case 13:return h=n.value,l._scriptExecute(n,[d,h]),n._cmds||(n._cmds=[],n._cmddir=0,n._cmdpt=-1,n._cmdadd=0),h&&0==n._cmdadd?(++n._cmdpt,n._cmds.splice(n._cmdpt,0,h),n._cmdadd=0,n._cmddir=0):n._cmdadd=0,n.value="",!1;case 27:return setTimeout(function(){n.value=""},20),!1;case 38:l.__getCmd(-1,n);break;case 40:l.__getCmd(1,n);break;default:n._cmdadd=0}setTimeout(function(){l.__checkScript(s,n)},20);return!0};l._click=function(a,h){l._element=a;1==arguments.length&&(h=l._actions[a.id]);
392 l._scriptExecute(a,l._scripts[h])};l._menuSelected=function(a){var h=a.value;if(void 0!=h)l._scriptExecute(a,l._scripts[h]);else{h=a.length;if("number"==typeof h)for(var d=0;d<h;++d)if(a[d].selected){l._click(a[d],a[d].value);return}alert("?Que? menu selected bug #8734")}};l._cbNotifyMaster=function(a){var h=!0,d=!0,n;for(n in a.chkGroup)a.chkGroup[n].checked?d=!1:h=!1;h&&(a.chkMaster.checked=!0);d&&(a.chkMaster.checked=!1);(h||d)&&l._checkboxItems[a.chkMaster.id]&&l._cbNotifyMaster(l._checkboxItems[a.chkMaster.id])};
393 l._cbNotifyGroup=function(a,h){for(var d in a.chkGroup){var n=a.chkGroup[d];n.checked!=h&&(n.checked=h,l._cbClick(n));l._checkboxMasters[n.id]&&l._cbNotifyGroup(l._checkboxMasters[n.id],h)}};l._cbSetCheckboxGroup=function(a,h,d){var n=a;"number"==typeof n&&(n="jmolCheckbox"+n);(a=document.getElementById(n))||alert("jmolSetCheckboxGroup: master checkbox not found: "+n);var s=l._checkboxMasters[n]={};s.chkMaster=a;s.chkGroup={};"string"==typeof h?(h=d,n=1):n=0;for(a=n;a<h.length;a++)n=h[a],"number"==
394 typeof n&&(n="jmolCheckbox"+n),(checkboxItem=document.getElementById(n))||alert("jmolSetCheckboxGroup: group checkbox not found: "+n),s.chkGroup[n]=checkboxItem,l._checkboxItems[n]=s};l._cbClick=function(a){l._control=a;var h=l._actions[a.id][0],d=l._actions[a.id][1];l._click(a,a.checked?h:d);l._checkboxMasters[a.id]&&l._cbNotifyGroup(l._checkboxMasters[a.id],a.checked);l._checkboxItems[a.id]&&l._cbNotifyMaster(l._checkboxItems[a.id])};l._cbOver=function(a){var h=l._actions[a.id][0],d=l._actions[a.id][1];
395 window.status=l._scripts[a.checked?d:h]};l._mouseOver=function(a,h){1==arguments.length&&(h=l._actions[a.id]);window.status=l._scripts[h]};l._mouseOut=function(){window.status=" ";return!0};l._onloadResetForms=function(){l._hasResetForms||(l._hasResetForms=!0,l._previousOnloadHandler=window.onload,window.onload=function(){if(0<l._buttonCount+l._checkboxCount+l._menuCount+l._radioCount+l._radioGroupCount)for(var a=document.forms,h=a.length;0<=--h;)a[h].reset();l._previousOnloadHandler&&l._previousOnloadHandler()})};
396 l._getButton=function(k,h,d,n,s){k=l._getIdForControl(k,h);if(null==k)return"";void 0!=n&&null!=n||(n="jmolButton"+l._buttonCount);void 0!=d&&null!=d||(d=h.substring(0,32));++l._buttonCount;l._actions[n]=l._addScript(k,h);h='<span id="span_'+n+'"'+(s?' title="'+s+'"':"")+"><input type='button' name='"+n+"' id='"+n+"' value='"+d+"' onclick='Jmol.controls._click(this)' onmouseover='Jmol.controls._mouseOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+l._buttonCssText+" /></span>";a._debugAlert&&
397 alert(h);return a._documentWrite(h)};l._getCheckbox=function(k,h,d,n,s,r,b){var e=l._getIdForControl(k,h);null!=e&&(e=l._getIdForControl(k,d));if(null==e)return"";void 0!=r&&null!=r||(r="jmolCheckbox"+l._checkboxCount);++l._checkboxCount;if(void 0==h||null==h||void 0==d||null==d)alert("jmolCheckbox requires two scripts");else if(void 0==n||null==n)alert("jmolCheckbox requires a label");else return l._actions[r]=[l._addScript(e,h),l._addScript(e,d)],k="</span>",s='<span id="span_'+r+'"'+(b?' title="'+
398 b+'"':"")+"><input type='checkbox' name='"+r+"' id='"+r+"' onclick='Jmol.controls._cbClick(this)' onmouseover='Jmol.controls._cbOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+(s?"checked='true' ":"")+l._checkboxCssText+" />",0<=n.toLowerCase().indexOf("<td>")&&(s+=k,k=""),s+='<label for="'+r+'">'+n+"</label>"+k,a._debugAlert&&alert(s),a._documentWrite(s)};l._getCommandInput=function(k,h,d,n,s,r){k=l._getIdForControl(k,"x");if(null==k)return"";void 0!=n&&null!=n||(n="jmolCmd"+l._cmdCount);
399 void 0!=h&&null!=h||(h="Execute");void 0!=d&&!isNaN(d)||(d=60);void 0!=r||(r="help");++l._cmdCount;h='<span id="span_'+n+'"'+(s?' title="'+s+'"':"")+"><input name='"+n+"' id='"+n+"' size='"+d+"' onkeydown='return Jmol.controls._commandKeyPress(event,\""+n+'","'+k+"\")' value='"+r+"'/><input  type='button' name='"+n+"Btn' id='"+n+"Btn' value = '"+h+"' onclick='Jmol.controls._commandKeyPress(13,\""+n+'","'+k+"\")' /></span>";a._debugAlert&&alert(h);return a._documentWrite(h)};l._getLink=function(k,
400 h,d,n,s){k=l._getIdForControl(k,h);if(null==k)return"";void 0!=n&&null!=n||(n="jmolLink"+l._linkCount);void 0!=d&&null!=d||(d=h.substring(0,32));++l._linkCount;h=l._addScript(k,h);d='<span id="span_'+n+'"'+(s?' title="'+s+'"':"")+"><a name='"+n+"' id='"+n+"' href='javascript:Jmol.controls._click(null,"+h+");' onmouseover='Jmol.controls._mouseOver(null,"+h+");return true;' onmouseout='Jmol.controls._mouseOut()' "+l._linkCssText+">"+d+"</a></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};
401 l._getMenu=function(k,h,d,n,s){var r=l._getIdForControl(k,null);void 0!=n&&null!=n||(n="jmolMenu"+l._menuCount);++l._menuCount;r=typeof h;if(null!=r&&"object"==r&&h.length){var b=h.length;"number"!=typeof d||1==d?d=null:0>d&&(d=b);d='<span id="span_'+n+'"'+(s?' title="'+s+'"':"")+"><select name='"+n+"' id='"+n+"' onChange='Jmol.controls._menuSelected(this)'"+(d?" size='"+d+"' ":"")+l._menuCssText+">";for(n=0;n<b;++n){var e=h[n],r=typeof e,c=null,q=s=null;"object"==r&&null!=e?(c=e[0],s=e[1],q=e[2]):
402 c=s=e;r=l._getIdForControl(k,c);if(null==r)return"";null==s&&(s=c);"#optgroup"==c?d+="<optgroup label='"+s+"'>":"#optgroupEnd"==c?d+="</optgroup>":(r=l._addScript(r,c),d+="<option value='"+r+(q?"' selected='true'>":"'>")+s+"</option>")}d+="</select></span>";a._debugAlert&&alert(d);return a._documentWrite(d)}};l._getRadio=function(k,h,d,n,s,r,b,e){0==l._radioGroupCount&&++l._radioGroupCount;r||(r="jmolRadioGroup"+(l._radioGroupCount-1));k=l._radio(k,h,d,n,s,r,b?b:r+"_"+l._radioCount,e?e:0);if(null==
403 k)return"";a._debugAlert&&alert(k);return a._documentWrite(k)};l._getRadioGroup=function(k,h,d,n,s,r){var b=typeof h;if("object"!=b||null==b||!h.length)alert("invalid arrayOfRadioButtons");else{void 0!=d&&null!=d||(d="&#xa0; ");var e=h.length;++l._radioGroupCount;n||(n="jmolRadioGroup"+(l._radioGroupCount-1));for(var c="<span id='"+(s?s:n)+"'>",q=0;q<e;++q){q==e-1&&(d="");var B=h[q],b=typeof B,O=null,c="object"==b?c+(O=l._radio(k,B[0],B[1],B[2],d,n,3<B.length?B[3]:(s?s:n)+"_"+q,4<B.length?B[4]:0,
404 r)):c+(O=l._radio(k,B,null,null,d,n,(s?s:n)+"_"+q,r));if(null==O)return""}c+="</span>";a._debugAlert&&alert(c);return a._documentWrite(c)}}})(Jmol);
405 (function(a){var l=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=l("_J2S");a._jarFile=l("_JAR");a._use=l("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(k,h,d){return a._Applet._get(k,h,d)};a.getJMEApplet=function(k,h,d,l){return a._JMEApplet._get(k,h,d,l)};a.getJSVApplet=function(k,h,d){return a._JSVApplet._get(k,h,d)};a.loadFile=function(a,h,d){a._loadFile(h,d)};a.script=function(a,h){a._checkDeferred(h)||
406 a._script(h)};a.scriptCheck=function(a,h){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(h)};a.scriptWait=function(a,h){return a._scriptWait(h)};a.scriptEcho=function(a,h){return a._scriptEcho(h)};a.scriptMessage=function(a,h){return a._scriptMessage(h)};a.scriptWaitOutput=function(a,h){return a._scriptWait(h)};a.scriptWaitAsArray=function(a,h){return a._scriptWaitAsArray(h)};a.search=function(a,h,d){a._search(h,d)};a.evaluateVar=function(a,h){return a._evaluate(h)};a.evaluate=function(a,h){return a._evaluateDEPRECATED(h)};
407 a.getAppletHtml=function(k,h){if(h){var d=a._document;a._document=null;k=a.getApplet(k,h);a._document=d}return k._code};a.getPropertyAsArray=function(a,h,d){return a._getPropertyAsArray(h,d)};a.getPropertyAsJavaObject=function(a,h,d){return a._getPropertyAsJavaObject(h,d)};a.getPropertyAsJSON=function(a,h,d){return a._getPropertyAsJSON(h,d)};a.getPropertyAsString=function(a,h,d){return a._getPropertyAsString(h,d)};a.getStatus=function(a,h){return a._getStatus(h)};a.resizeApplet=function(a,h){return a._resizeApplet(h)};
408 a.restoreOrientation=function(a,h){return a._restoreOrientation(h)};a.restoreOrientationDelayed=function(a,h,d){return a._restoreOrientationDelayed(h,d)};a.saveOrientation=function(a,h){return a._saveOrientation(h)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,h,d){a._info=h;2<arguments.length&&a._showInfo(d)};a.showInfo=function(a,h){a._showInfo(h)};a.show2d=function(a,h){a._show2d(h)};a.jmolBr=function(){return a._documentWrite("<br />")};
409 a.jmolButton=function(k,h,d,l,s){return a.controls._getButton(k,h,d,l,s)};a.jmolCheckbox=function(k,h,d,l,s,r,b){return a.controls._getCheckbox(k,h,d,l,s,r,b)};a.jmolCommandInput=function(k,h,d,l,s,r){return a.controls._getCommandInput(k,h,d,l,s,r)};a.jmolHtml=function(k){return a._documentWrite(k)};a.jmolLink=function(k,h,d,l,s){return a.controls._getLink(k,h,d,l,s)};a.jmolMenu=function(k,h,d,l,s){return a.controls._getMenu(k,h,d,l,s)};a.jmolRadio=function(k,h,d,l,s,r,b,e){return a.controls._getRadio(k,
410 h,d,l,s,r,b,e)};a.jmolRadioGroup=function(k,h,d,l,s,r){return a.controls._getRadioGroup(k,h,d,l,s,r)};a.setCheckboxGroup=function(k,h){a.controls._cbSetCheckboxGroup(k,h,arguments)};a.setDocument=function(k){a._document=k};a.setXHTML=function(k){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;k&&(a._XhtmlElement=document.getElementById(k),a._XhtmlAppendChild=!0)};a.setAppletCss=function(k,h){null!=k&&(a._appletCssClass=k);a._appletCssText=h?h+" ":k?'class="'+k+'" ':""};a.setButtonCss=function(k,
411 h){null!=k&&(a.controls._buttonCssClass=k);a.controls._buttonCssText=h?h+" ":k?'class="'+k+'" ':""};a.setCheckboxCss=function(k,h){null!=k&&(a.controls._checkboxCssClass=k);a.controls._checkboxCssText=h?h+" ":k?'class="'+k+'" ':""};a.setRadioCss=function(k,h){null!=k&&(a.controls._radioCssClass=k);a.controls._radioCssText=h?h+" ":k?'class="'+k+'" ':""};a.setLinkCss=function(k,h){null!=k&&(a.controls._linkCssClass=k);a.controls._linkCssText=h?h+" ":k?'class="'+k+'" ':""};a.setMenuCss=function(k,h){null!=
412 k&&(a.controls._menuCssClass=k);a.controls._menuCssText=h?h+" ":k?'class="'+k+'" ':""};a.setAppletSync=function(k,h,d){a._syncedApplets=k;a._syncedCommands=h;a._syncedReady={};a._isJmolJSVSync=d};a.setGrabberOptions=function(k){a._grabberOptions=k};a.setAppletHtml=function(k,h){k._code&&(a.$html(h,k._code),k._init&&!k._deferApplet&&k._init())};a.coverApplet=function(a,h){a._cover&&a._cover(h)};a.setFileCaching=function(k,h){k?k._cacheFiles=h:a.fileCache=h?{}:null};a.updateView=function(a,h,d){a._updateView(h,
413 d)};a.getChemicalInfo=function(k,h,d){h||(h="name");"string"!=typeof applet_or_Identifier&&(k=k._getSmiles());return a._getNCIInfo(k,h,d)};a.saveImage=function(a){switch(a._viewType){case "Jmol":a._script('write PNGJ "'+a._id+'.png"');break;case "JSV":a._script("write PDF");break;case "JME":a._script("print")}}})(Jmol);
414 LoadClazz=function(){c$=null;window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!1);window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!0,window["j2s.object.native"]=!0,Clazz={_isQuiet:!1},function(a,l){var k=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){k.push(a);window[a]=b};a.getGlobals=function(){return k.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=a)};var h=window["j2s.doProfile"]&&self.JSON?{}:null;NullObject=function(){};
415 a._supportsNativeObject=window["j2s.object.native"];a._supportsNativeObject?(a._O=function(){},a._O.__CLASS_NAME__="Object",a._O.getClass=function(){return a._O}):a._O=Object;a.Console={};a.dateToString=Date.prototype.toString;a._hashCode=0;var d=a._O.prototype;d.equals=function(a){return this==a};d.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};d.getClass=function(){return a.getClass(this)};d.clone=function(){return a.clone(this)};a.clone=function(a){var b=new a.constructor,
416 c;for(c in a)b[c]=a[c];return b};d.finalize=function(){};d.notify=function(){};d.notifyAll=function(){};d.wait=function(){};d.to$tring=Object.prototype.toString;d.toString=function(){return this.__CLASS_NAME__?"["+this.__CLASS_NAME__+" object]":this.to$tring.apply(this,arguments)};a._extendedObjectMethods="equals hashCode getClass clone finalize notify notifyAll wait to$tring toString".split(" ");a.extendJO=function(b,c){c&&(b.__CLASS_NAME__=b.prototype.__CLASS_NAME__=c);if(a._supportsNativeObject)for(var d=
417 0;d<a._extendedObjectMethods.length;d++){var e=a._extendedObjectMethods[d];b.prototype[e]=a._O.prototype[e]}};a.extractClassName=function(a){a=a.substring(1,a.length-1);return 0<=a.indexOf("Array")?"Array":0<=a.indexOf("object ")?a.substring(7):a};a.getClassName=function(b,c){if(null==b)return"NullObject";if(b instanceof a.CastedNull)return b.clazzName;switch(typeof b){case "number":return"n";case "boolean":return"b";case "string":return"String";case "function":if(b.__CLASS_NAME__)return c?b.__CLASS_NAME__:
418 "Class";var d=b.toString(),e=d.indexOf("function");if(0>e)return"["==d.charAt(0)?a.extractClassName(d):d.replace(/[^a-zA-Z0-9]/g,"");var e=e+8,h=d.indexOf("(",e);if(0>h)break;d=d.substring(e,h);if(0<=d.indexOf("Array"))return"Array";d=d.replace(/^\s+/,"").replace(/\s+$/,"");return"anonymous"==d||""==d?"Function":d;case "object":if(b.__CLASS_NAME__)return b.__CLASS_NAME__;if(!b.constructor)break;if(!b.constructor.__CLASS_NAME__){if(b instanceof Number)return"Number";if(b instanceof Boolean)return"Boolean";
419 if(b instanceof Array)return"Array";d=b.toString();if("["==d.charAt(0))return a.extractClassName(d)}return a.getClassName(b.constructor,!0)}return"Object"};a.getClass=function(b){if(!b)return a._O;if("function"==typeof b)return b;if(b instanceof a.CastedNull)b=b.clazzName;else switch(typeof b){case "string":return String;case "object":if(!b.__CLASS_NAME__)return b.constructor||a._O;b=b.__CLASS_NAME__;break;default:return b.constructor}return a.evalType(b,!0)};var n=function(b,c){for(var d=0;d<a.innerFunctionNames.length;d++)if(c==
420 a.innerFunctionNames[d]&&a._innerFunctions[c]===b[c])return!0;return!1},s=function(){};a.inheritArgs=new s;a.inheritClass=function(b,c,d){for(var e in c)"b$"!=e&&("prototype"!=e&&"superClazz"!=e&&"__CLASS_NAME__"!=e&&"implementz"!=e&&!n(c,e))&&(b[e]=c[e]);a.unloadedClasses[a.getClassName(b,!0)]||(b.prototype=d?d:c!==Number?new c(a.inheritArgs):new Number);b.superClazz=c;b.prototype.__CLASS_NAME__=b.__CLASS_NAME__};a.implementOf=function(a,b){if(2<=arguments.length){a.implementz||(a.implementz=[]);
421 var c=a.implementz;if(2==arguments.length)if("function"==typeof b)c.push(b),r(a,b);else{if(b instanceof Array)for(var d=0;d<b.length;d++)c.push(b[d]),r(a,b[d])}else for(d=1;d<arguments.length;d++)c.push(arguments[d]),r(a,arguments[d])}};var r=function(a,b){for(var c in b)if("b$"!=c&&"prototype"!=c&&"superClazz"!=c&&"__CLASS_NAME__"!=c&&"implementz"!=c&&("function"!=typeof b[c]||!n(b,c)))a[c]=a.prototype[c]=b[c]};a.extendInterface=a.implementOf;a.equalsOrExtendsLevel=function(b,c){if(b===c)return 0;
422 if(b.implementz)for(var d=b.implementz,e=0;e<d.length;e++){var h=a.equalsOrExtendsLevel(d[e],c);if(0<=h)return h+1}return-1};a.getInheritedLevel=function(b,c){if(b===c)return 0;var d="string"==typeof b;if(d&&("void"==b||"unknown"==b))return-1;var e="string"==typeof c;if(e&&("void"==c||"unknown"==c))return-1;if(b===(d?"NullObject":NullObject))switch(c){case Number:case Boolean:case NullObject:break;default:return 0}d&&(b=a.evalType(b));e&&(c=a.evalType(c));if(!c||!b)return-1;d=0;for(e=b;e!==c&&10>
423 d;){if(e.implementz)for(var h=e.implementz,k=0;k<h.length;k++){var l=a.equalsOrExtendsLevel(h[k],c);if(0<=l)return d+l+1}e=e.superClazz;if(!e)return c===Object||c===a._O?d+1.5:-1;d++}return d};a.instanceOf=function(b,c){return null!=b&&c&&(b==c||b instanceof c||0<=a.getInheritedLevel(a.getClassName(b),c))};a.superCall=function(b,c,d,h){var k=null,l=-1,n=b[d];if(n)if(n.claxxOwner)n.claxxOwner!==c&&(k=n);else if(!n.stacks&&(!n.lastClaxxRef||!n.lastClaxxRef.prototype[d]||!n.lastClaxxRef.prototype[d].stacks))k=
424 n;else{var q=n.stacks;q||(q=n.lastClaxxRef.prototype[d].stacks);for(l=q.length;0<=--l;)if(c===q[l]){0<l?(l--,k=q[l].prototype[d]):k=q[0].prototype[d]["\\unknown"];break}else if(0<a.getInheritedLevel(c,q[l])){k=q[l].prototype[d];break}}if(k)return 0==l&&"construct"==d&&(c=n.stacks)&&(!c[0].superClazz&&c[0].con$truct)&&c[0].con$truct.apply(b,[]),k.apply(b,h||[]);if("construct"!=d)throw a.alert(["j2slib","no class found",h.typeString]),new e(b,c,d,a.getParamsType(h).typeString);};a.superConstructor=
425 function(b,c,d){a.superCall(b,c,"construct",d);c.con$truct&&c.con$truct.apply(b,[])};a.CastedNull=function(b){this.clazzName=b?b instanceof String?b:b instanceof Function?a.getClassName(b,!0):""+b:"Object";this.toString=function(){return null};this.valueOf=function(){return null}};a.castNullAs=function(b){return new a.CastedNull(b)};a._initializingException=!1;a._callingStackTraces=[];var b=function(){this.toString=function(){return"J2S MethodException"}},e=function(){this.toString=function(){return"J2S MethodNotFoundException"}},
426 c;try{null.hello()}catch(q){if(d=function(a,b,c){c||(c="[^\\s]+");var d=a.indexOf(b);a=a.substring(0,d)+c+a.substring(d+b.length);return RegExp("^"+a+"$")},/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var d=q.message.indexOf(":"),B=q.message.indexOf(":",d+2),O=q.message.substr(d+1,B-d-20);c=function(a){return-1!=a.message.indexOf(O)}}else if(-1!=navigator.userAgent.toLowerCase().indexOf("webkit")){var T=d(q.message,"hello");c=function(a){return T.test(a.message)}}else T=d(q.message,"$$o$$"),
427 c=function(a){return T.test(a.message)}}a.exceptionOf=function(b,d){return b.__CLASS_NAME__?a.instanceOf(b,d):d==Error?(0<=(""+b).indexOf("Error")&&System.out.println(a.getStackTrace()),0<=(""+b).indexOf("Error")):d==Exception||d==Throwable||d==NullPointerException&&c(b)};a.getStackTrace=function(a){a||(a=25);var b="\n",c=arguments.callee,d=0>a;d&&(a=-a);for(var e=0;e<a&&(c=c.caller);e++){var h=c.toString?c.toString().substring(0,c.toString().indexOf("{")):"<native method>",b=b+(e+" "+(c.exName?(c.claxxOwner?
428 c.claxxOwner.__CLASS_NAME__+".":"")+c.exName+h.replace(/function /,""):h)+"\n");if(c==c.caller){b+="<recursing>\n";break}if(d)for(var h=c.arguments,k=0;k<h.length;k++){var l=""+h[k];60<l.length&&(l=l.substring(0,60)+"...");b+=" args["+k+"]="+l.replace(/\s+/g," ")+"\n"}}return b};a.makeConstructor=function(b,c,d){a.defineMethod(b,"construct",c,d);b.con$truct&&(b.con$truct.index=b.con$truct.stacks.length)};a.overrideConstructor=function(b,c,d){a.overrideMethod(b,"construct",c,d);b.con$truct&&(b.con$truct.index=
429 b.con$truct.stacks.length)};a.defineMethod=function(c,d,k,l){a.assureInnerClass&&a.assureInnerClass(c,k);k.exName=d;l=K(l);var n=c.prototype,q=n[d];a._Loader._checkLoad&&M(c,d,l);if(!q||q.claxxOwner===c&&q.funParams==l)return k.funParams=l,k.claxxOwner=c,k.exClazz=c,n[d]=k;var s=null,r=q.stacks;r||(r=[],s=q,q.claxxOwner&&(r[0]=s.claxxOwner));if(!q.stacks||q.claxxReference!==c){var A=++Wa,q=function(){var c;a:{var j=arguments.callee.claxxReference,d=arguments.callee.methodName;c=arguments;fx=this[d];
430 var g=a.getParamsType(c);if(!fx)try{System.out.println(a.getStackTrace(5))}catch(k){}if(h){var m=A+" "+j.__CLASS_NAME__+" "+d+" "+JSON.stringify(g);0>da.indexOf(m)&&(da+=m+"\n");h[m]||(h[m]=0);h[m]++}if(fx.lastParams==g.typeString&&fx.lastClaxxRef===j){if(g.hasCastedNull){j=[];for(d=0;d<c.length;d++)j[d]=c[d]instanceof a.CastedNull?null:c[d]}else j=c;c=fx.lastMethod?fx.lastMethod.apply(this,j):null}else{fx.lastParams=g.typeString;fx.lastClaxxRef=j;m=fx.stacks;m||(m=j.prototype[d].stacks);for(var t=
431 !1,l=m.length;0<=--l;)if(t||m[l]===j){var n=m[l].prototype[d],y=g,t=c,q=fx,E=[],s=!0,r=void 0;for(r in n)if(92==r.charCodeAt(0)){var F=r.substring(1).split("\\");F.length==y.length&&E.push(F);s=!1}else if(s&&"funParams"==r&&n.funParams){r=n.funParams;F=r.substring(1).split("\\");F.length==y.length&&(E[0]=F);break}r=void 0;if(!(r=0==E.length)){r=void 0;for(var r=[],sa=E.length,F=0;F<sa;F++){for(var B=[],D=!0,Ya=E[F].length,C=0;C<Ya;C++)if(B[C]=a.getInheritedLevel(y[C],E[F][C]),0>B[C]){D=!1;break}D&&
432 (B[y.length]=F,r.push(B))}if(0==r.length)r=null;else{sa=r[0];for(F=1;F<r.length;F++){B=!0;for(C=0;C<y.length;C++)if(sa[C]<r[F][C]){B=!1;break}B&&(sa=r[F])}r=E[sa[y.length]].join("\\")}r=!(E=r)}if(r)t=new b;else{n=s?n:n["\\"+E];s=null;if(y.hasCastedNull){s=[];for(y=0;y<t.length;y++)s[y]=t[y]instanceof a.CastedNull?null:t[y]}else s=t;q.lastMethod=n;t=n.apply(this,s)}if(!(t instanceof b)){c=t;break a}t=!0}if("construct"==d)c=void 0;else throw new e(this,j,d,g.typeString);}}return c};q.methodName=d;q.claxxReference=
433 c;q=n[d]=q;d=[];for(n=0;n<r.length;n++)d[n]=r[n];q.stacks=d}r=q.stacks;0>rb(r,c)&&r.push(c);s&&(s.claxxOwner===c?(q[s.funParams]=s,s.claxxOwner=null,s.funParams=null):s.claxxOwner||(q["\\unknown"]=s));k.exClazz=c;q[l]=k;return q};duplicatedMethods={};var M=function(b,c,d){var e=b.prototype[c];if(e&&(e.claxxOwner||e.claxxReference)===b)key=b.__CLASS_NAME__+"."+c+d,(b=duplicatedMethods[key])?(c="Warning! Duplicate method found for "+key,System.out.println(c),a.alert(c),duplicatedMethods[key]=b+1):duplicatedMethods[key]=
434 1};a.showDuplicates=function(a){var b="",c=duplicatedMethods,d=0,e;for(e in c)1<c[e]&&(b+=c[e]+"\t"+e+"\n",d++);b="Duplicates: "+d+"\n\n"+b;System.out.println(b);a||alert(b)};var rb=function(a,b){if(a&&b)for(var c=a.length;0<=--c;)if(a[c]===b)return c;return-1},Ka=function(a,b){var c=rb(a,b);if(0<=c){for(var d=a.length-1;c<d;c++)a[c]=a[c+1];a.length--;return!0}},K=function(a){return a?a.replace(/~([NABSO])/g,function(a,b){switch(b){case "N":return"n";case "B":return"b";case "S":return"String";case "O":return"Object";
435 case "A":return"Array"}return"Unknown"}).replace(/\s+/g,"").replace(/^|,/g,"\\").replace(/\$/g,"org.eclipse.s"):"\\void"};a.overrideMethod=function(b,c,d,e){a.assureInnerClass&&a.assureInnerClass(b,d);d.exName=c;e=K(e);a._Loader._checkLoad&&M(b,c,e);d.funParams=e;d.claxxOwner=b;return b.prototype[c]=d};var da="";a.getProfile=function(){var a="";if(h){var a=[],b;for(b in h){var c=""+h[b];a.push("        ".substring(c.length)+c+"\t"+b)}a=a.sort().reverse().join("\r\n");h={}}return a+da};a.getParamsType=
436 function(b){var c=b.length;switch(c){case 0:var d=["void"];d.typeString="\\void";return d;case 1:switch(typeof obj){case "number":return d=["n"],d.typeString="\\n",d;case "boolean":return d=["b"],d.typeString="\\b",d}}d=[];d.hasCastedNull=!1;if(b)for(var e=0;e<c;e++)d[e]=a.getClassName(b[e]),b[e]instanceof a.CastedNull&&(d.hasCastedNull=!0);d.typeString="\\"+d.join("\\");return d};var Wa=0;a.allPackage={};a.allClasses={};a.lastPackageName=null;a.lastPackage=null;a.unloadedClasses=[];a.declarePackage=
437 function(b){if(a.lastPackageName==b)return a.lastPackage;if(b&&b.length){for(var c=b.split(/\./),d=a.allPackage,e=0;e<c.length;e++)d[c[e]]||(d[c[e]]={__PKG_NAME__:d.__PKG_NAME__?d.__PKG_NAME__+"."+c[e]:c[e]},0==e&&a.setGlobal(c[e],d[c[e]])),d=d[c[e]];a.lastPackageName=b;return a.lastPackage=d}};a.evalType=function(b,c){var d=b.lastIndexOf(".");if(-1!=d){var e=b.substring(0,d),e=a.declarePackage(e),d=b.substring(d+1);return e[d]}if(c)return window[b];switch(b){case "string":return String;case "number":return Number;
438 case "object":return a._O;case "boolean":return Boolean;case "function":return Function;case "void":case "undefined":case "unknown":return b;case "NullObject":return NullObject;default:return window[b]}};a.defineType=function(b,c,d,e){var h=a.unloadedClasses[b];h&&(c=h);h=b.lastIndexOf(".");if(-1!=h){var k=b.substring(0,h),k=a.declarePackage(k),h=b.substring(h+1);if(k[h])return k[h];k[h]=c}else{if(window[b])return window[b];a.setGlobal(b,c)}a.decorateAsType(c,b,d,e);b=a._innerFunctions;c.defineMethod=
439 b.defineMethod;c.defineStaticMethod=b.defineStaticMethod;c.makeConstructor=b.makeConstructor;return c};var ya=!1;-1!=navigator.userAgent.indexOf("Safari")&&(d=navigator.userAgent,B=d.indexOf("Version/"),-1!=B&&(d=d.substring(B+8),ya=4<=parseFloat(d)));a.instantialize=function(a,b){if(!b||!(1==b.length&&b[0]&&b[0]instanceof s)){a instanceof Number&&(a.valueOf=function(){return this});if(ya){for(var c=[],d=0;d<b.length;d++)c[d]=b[d];b=c}(c=a.construct)?a.con$truct?a.getClass().superClazz?c.claxxOwner&&
440 c.claxxOwner===a.getClass()||c.stacks&&c.stacks[c.stacks.length-1]==a.getClass()?c.apply(a,b):(c.claxxOwner&&!c.claxxOwner.superClazz&&c.claxxOwner.con$truct?c.claxxOwner.con$truct.apply(a,[]):c.stacks&&(1==c.stacks.length&&!c.stacks[0].superClazz)&&c.stacks[0].con$truct.apply(a,[]),c.apply(a,b),a.con$truct.apply(a,[])):(a.con$truct.apply(a,[]),c.apply(a,b)):c.apply(a,b):a.con$truct&&a.con$truct.apply(a,[])}};a.innerFunctionNames="isInstance equals hashCode getName getClassLoader getResource getResourceAsStream defineMethod defineStaticMethod makeConstructor".split(" ");
441 a._innerFunctions={isInstance:function(b){return a.instanceOf(b,this)},equals:function(a){return this===a},hashCode:function(){return this.getName().hashCode()},toString:function(){return"class "+this.getName()},getName:function(){return a.getClassName(this,!0)},getClassLoader:function(){var b=this.__CLASS_NAME__,c=a._Loader.getClasspathFor(b),d=c.lastIndexOf(b.replace(/\./g,"/")),c=-1!=d?c.substring(0,d):a._Loader.getClasspathFor(b,!0),b=a._Loader.requireLoaderByBase(c);b.getResourceAsStream=a._innerFunctions.getResourceAsStream;
442 b.getResource=a._innerFunctions.getResource;return b},getResource:function(a){return this.getResourceAsStream(a).url},getResourceAsStream:function(b){if(!b)return null;var c=null;java.io.InputStream?c=new java.io.InputStream:(c=new a._O,c.__CLASS_NAME__="java.io.InputStream",c.close=NullObject);c.read=function(){return 0};b=b.replace(/\\/g,"/");var d=null,e=this.__CLASS_NAME__;2==arguments.length&&0!=b.indexOf("/")&&(b="/"+b);if(0==b.indexOf("/"))if(2==arguments.length?(d=arguments[1])||(d=a.binaryFolders[0]):
443 a._Loader&&(d=a._Loader.getClasspathFor(e,!0)),d){var d=d.replace(/\\/g,"/"),h=d.length,h=d.charAt(h-1);"/"!=h&&(d+="/");c.url=d+b.substring(1)}else c.url=b.substring(1);else{if(this.base)d=this.base;else if(a._Loader)if(d=a._Loader.getClasspathFor(e),h=d.lastIndexOf(e.replace(/\./g,"/")),-1!=h)d=d.substring(0,h);else if(h=-1,d.indexOf(".z.js")==d.length-5&&-1!=(h=d.lastIndexOf("/")))for(var d=d.substring(0,h+1),h=e.split(/\./),k=1;k<h.length;k++){for(var l="/",n=0;n<k;n++)l+=h[n]+"/";if(l.length>
444 d.length)break;if(d.indexOf(l)==d.length-l.length){d=d.substring(0,d.length-l.length+1);break}}else d=a._Loader.getClasspathFor(e,!0);else(h=a.binaryFolders)&&h.length&&(d=h[0]);d||(d="j2s/");d=d.replace(/\\/g,"/");h=d.length;h=d.charAt(h-1);"/"!=h&&(d+="/");this.base?c.url=d+b:(h=e.lastIndexOf("."),c.url=-1==h||this.base?d+b:d+e.substring(0,h).replace(/\./g,"/")+"/"+b)}return c},defineMethod:function(b,c,d){a.defineMethod(this,b,c,d)},defineStaticMethod:function(b,c,d){a.defineMethod(this,b,c,d);
445 this[b]=this.prototype[b]},makeConstructor:function(b,c){a.makeConstructor(this,b,c)}};var za=[];a.pu$h=function(a){a||(a=self.c$);a&&za.push(a)};a.p0p=function(){return za.pop()};a.decorateAsClass=function(b,c,d,e,h,k){var l=null;c&&(l=c.__PKG_NAME__,l||(l=c.__CLASS_NAME__));var n=(l?l+".":"")+d;a._Loader._classPending[n]&&(delete a._Loader._classPending[n],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+l+"."+d);(l=
446 a.unloadedClasses[n])&&(b=l);La(b,c,d);k?a.inheritClass(b,e,k):e&&a.inheritClass(b,e);h&&a.implementOf(b,h);return b};var La=function(b,c,d){var e;c?c.__PKG_NAME__?(e=c.__PKG_NAME__+"."+d,c[d]=b,c===java.lang&&a.setGlobal(d,b)):(e=c.__CLASS_NAME__+"."+d,c[d]=b):(e=d,a.setGlobal(d,b));a.extendJO(b,e);c=a.innerFunctionNames;for(d=0;d<c.length;d++)b[c[d]]=a._innerFunctions[c[d]];a._Loader&&a._Loader.updateNodeForFunctionDecoration(e)};a.declareInterface=function(b,c,d){var e=function(){};La(e,b,c);d&&
447 a.implementOf(e,d);return e};a.declareType=function(b,c,d,e,h){return a.decorateAsClass(function(){a.instantialize(this,arguments)},b,c,d,e,h)};a.declareAnonymous=function(b,c,d,e,h){return a.decorateAsClass(function(){a.prepareCallback(this,arguments);a.instantialize(this,arguments)},b,c,d,e,h)};a.decorateAsType=function(b,c,d,e,h,k){a.extendJO(b,c);b.equals=a._innerFunctions.equals;b.getName=a._innerFunctions.getName;if(k)for(c=0;c<a.innerFunctionNames.length;c++)k=a.innerFunctionNames[c],b[k]=
448 a._innerFunctions[k];h?a.inheritClass(b,d,h):d&&a.inheritClass(b,d);e&&a.implementOf(b,e);return b};Number.prototype._numberToString=Number.prototype.toString;a.declarePackage("java.io");a.declarePackage("java.lang.annotation");a.declarePackage("java.lang.instrument");a.declarePackage("java.lang.management");a.declarePackage("java.lang.reflect");a.declarePackage("java.lang.ref");java.lang.ref.reflect=java.lang.reflect;a.declarePackage("java.util");a.declarePackage("java.security");a.declareInterface(java.io,
449 "Closeable");a.declareInterface(java.io,"DataInput");a.declareInterface(java.io,"DataOutput");a.declareInterface(java.io,"Externalizable");a.declareInterface(java.io,"Flushable");a.declareInterface(java.io,"Serializable");a.declareInterface(java.lang,"Iterable");a.declareInterface(java.lang,"CharSequence");a.declareInterface(java.lang,"Cloneable");a.declareInterface(java.lang,"Appendable");a.declareInterface(java.lang,"Comparable");a.declareInterface(java.lang,"Runnable");a.declareInterface(java.util,
450 "Comparator");java.lang.ClassLoader={__CLASS_NAME__:"ClassLoader"};e=function(b,c,d,e){b="";e&&(b=e.substring(1).replace(/\\/g,","));this.message=(d&&"construct"!=d?"Method":"Constructor")+" "+a.getClassName(c,!0)+"."+d+"("+b+") is not found!";this.toString=function(){return"MethodNotFoundException:"+this.message}};a.prepareCallback=function(b,c){var d=c[0];if(b&&d&&d!==window){var e=a.getClassName(d,!0),h={};if(b.b$)for(var k in b.b$)h[k]=b.b$[k];b.b$=h;h[e]=d;for(e=a.getClass(d);e.superClazz;)e=
451 e.superClazz,h[a.getClassName(e,!0)]=d;if(d=d.b$)for(k in d)h[k]=d[k]}for(h=0;h<c.length-1;h++)c[h]=c[h+1];c.length--};a.innerTypeInstance=function(b,c,d){b||(b=arguments.callee.caller);var e;if(d||c.$finals)if(e=new b(c,a.inheritArgs),d)if(c.f$){var h={},k;for(k in c.f$)h[k]=c.f$[k];for(k in d)h[k]=d[k];e.f$=h}else e.f$=d;else c.f$&&(e.f$=c.f$);else switch(arguments.length){case 3:return new b(c);case 4:return c.__CLASS_NAME__==b.__CLASS_NAME__&&arguments[3]===a.inheritArgs?c:new b(c,arguments[3]);
452 case 5:return new b(c,arguments[3],arguments[4]);case 6:return new b(c,arguments[3],arguments[4],arguments[5]);case 7:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6]);case 8:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 9:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 10:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);default:e=new b(c,
453 a.inheritArgs)}k=arguments.length-3;for(h=Array(k);0<=--k;)h[k]=arguments[k+3];a.instantialize(e,h);return e};a.cloneFinals=function(){for(var a={},b=arguments.length/2;0<=--b;)a[arguments[b+b]]=arguments[b+b+1];return a};a.isClassDefined=a.isDefinedClass=function(b){if(!b)return!1;if(a.allClasses[b])return!0;for(var c=b.split(/\./),d=null,e=0;e<c.length;e++)if(!(d=d?d[c[e]]:a.allPackage[c[0]]))return!1;return d&&(a.allClasses[b]=!0)};a.defineEnumConstant=function(a,b,c,d,e){e=e?new e:new a;e.$name=
454 b;e.$ordinal=c;d&&d.length&&e.construct.apply(e,d);a[b]=e;a.prototype[b]=e;a["$ values"]||(a["$ values"]=[],a.values=function(){return this["$ values"]});a["$ values"].push(e);return e};a.floatToInt=function(a){return 0>a?Math.ceil(a):Math.floor(a)};a.floatToByte=a.floatToShort=a.floatToLong=a.floatToInt;a.doubleToByte=a.doubleToShort=a.doubleToLong=a.doubleToInt=a.floatToInt;a.floatToChar=function(a){return String.fromCharCode(0>a?Math.ceil(a):Math.floor(a))};a.doubleToChar=a.floatToChar;d=function(a){return function(){for(var b=
455 this.length,c=32==a?new Int32Array(b):new Float64Array(b);0<=--b;)c[b]=this[b];return c}};self.Int32Array&&self.Int32Array!=Array?(a.haveInt32=!0,Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort),Int32Array.prototype.clone||(Int32Array.prototype.clone=d(32))):(Int32Array=function(a){a||(a=0);var b=Array(a);b.toString=function(){return"[object Int32Array]"};for(var c=0;c<a;c++)b[c]=0;return b},a.haveInt32=!1,Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.clone=
456 d(32),Int32Array.prototype.int32Fake=function(){});self.Float64Array&&self.Float64Array!=Array?(a.haveFloat64=!0,Float64Array.prototype.sort||(Float64Array.prototype.sort=Array.prototype.sort),Float64Array.prototype.clone||(Float64Array.prototype.clone=d(64))):(a.haveFloat64=!1,Float64Array=function(a){a||(a=0);for(var b=Array(a),c=0;c<a;c++)b[c]=0;return b},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.clone=d(64),Float64Array.prototype.float64Fake=function(){},Float64Array.prototype.toString=
457 function(){return"[object Float64Array]"});a.newArray=function(){if(arguments[0]instanceof Array)var b=arguments[0],c=arguments[1];else b=arguments,c=Array;var d=b[0];"string"==typeof d&&(d=d.charCodeAt(0));var e=b.length-1,h=b[e];switch(b.length){case 0:case 1:return[];case 2:if(null==h)return Array(d);if(!0===c&&a.haveInt32)return new Int32Array(d);if(!1===c&&a.haveFloat64)return new Float64Array(d);for(var b=!0===c?new Int32Array:!1===c?new Float64Array:0>d?h:Array(d),k=d;0<=--k;)b[k]=h;return b;
458 default:for(var l=Array(e),k=0;k<e;k++)l[k]=b[k+1];b=Array(d);if(null==h||0<=h||2<e)for(k=0;k<d;k++)b[k]=a.newArray(l,c);return b}};a.newArray32=function(b,c){var d=b[0];"string"==typeof d&&(d=d.charCodeAt(0));var e=b.length-1,h=b[e];switch(b.length){case 0:case 1:return alert("ERROR IN newArray32 -- args.length < 2"),[];case 2:if(e=0>d)d=h.length;var k=0>h?Array(d):c?new Int32Array(d):new Float64Array(d);if(e)for(e=d;0<=--e;)k[e]=h[e];return k}for(h=Array(e);0<=--e;)h[e]=b[e+1];k=Array(d);for(e=
459 0;e<d;e++)k[e]=a.newArray(h,c);return k};a.newInt32Array=function(){return a.newArray32(arguments,!0)};a.newFloat64Array=function(){return a.newArray32(arguments,!1)};a.newFloatArray=a.newDoubleArray=a.newFloat64Array;a.newIntArray=a.newLongArray=a.newShortArray=a.newByteArray=a.newInt32Array;a.newCharArray=a.newBooleanArray=a.newArray;var pa=function(a,b){return a.constructor&&a.constructor!=Number&&0<=a.constructor.toString().indexOf(b)};a.isAS=function(a){return a&&"object"==typeof a&&pa(a," Array")&&
460 ("string"==typeof a[0]||"undefined"==typeof a[0])};a.isASS=function(b){return b&&"object"==typeof b&&a.isAS(b[0])};a.isAP=function(b){return b&&"JU.P3"==a.getClassName(b[0])};a.isAI=function(b){return b&&"object"==typeof b&&(a.haveInt32?pa(b,"Int32Array"):b.int32Fake?!0:!1)};a.isAII=function(b){return b&&"object"==typeof b&&a.isAI(b[0])};a.isAF=function(b){return b&&"object"==typeof b&&(a.haveFloat64?pa(b,"Float64Array"):b.float64Fake?!0:!1)};a.isAFF=function(b){return b&&"object"==typeof b&&a.isAF(b[0])};
461 a.isAFFF=function(b){return b&&"object"==typeof b&&a.isAFF(b[0])};a.isAFloat=function(b){return b&&"object"==typeof b&&pa(b," Array")&&a.instanceOf(b[0],Float)};a.defineStatics=function(a){for(var b=arguments.length,c=(b-1)/2;0<=--c;){var d=arguments[--b],e=arguments[--b];a[e]=a.prototype[e]=d}};a.prepareFields=function(a,b){var c=[];if(a.con$truct)for(var d=a.con$truct.stacks,e=0;e<d.length;e++)c[e]=d[e];d=a.con$truct=function(){var a=arguments.callee.stacks;if(a)for(var b=0;b<a.length;b++)a[b].apply(this,
462 [])};a.prototype.con$truct=d;c.push(b);a.con$truct.stacks=c;a.con$truct.index=0};java.lang.Object=a._O;a._O.getName=a._innerFunctions.getName;System={props:null,$props:{},arraycopy:function(a,b,c,d,e){if(a!==c)for(var h=0;h<e;h++)c[d+h]=a[b+h];else{for(var k=[],h=0;h<e;h++)k[h]=a[b+h];for(h=0;h<e;h++)c[d+h]=k[h]}},currentTimeMillis:function(){return(new Date).getTime()},gc:function(){},getProperties:function(){return System.props},getProperty:function(a,b){if(System.props)return System.props.getProperty(a,
463 b);var c=System.$props[a];return"undefined"!=typeof c?c:1==arguments.length?null:null==b?a:b},getSecurityManager:function(){return null},setProperties:function(a){System.props=a},setProperty:function(a,b){if(!System.props)return System.$props[a]=b;System.props.setProperty(a,b)}};System.setProperty("line.separator",0<=navigator.userAgent.indexOf("Windows")?"\r\n":"\n");System.setProperty("os.name",navigator.userAgent);System.identityHashCode=function(b){return null==b?0:b._$hashcode||(b._$hashcode=
464 ++a._hashCode)};System.out=new a._O;System.out.__CLASS_NAME__="java.io.PrintStream";System.out.print=function(){};System.out.printf=function(){};System.out.println=function(){};System.out.write=function(){};System.err=new a._O;System.err.__CLASS_NAME__="java.io.PrintStream";System.err.print=function(){};System.err.printf=function(){};System.err.println=function(){};System.err.write=function(){};a.popup=a.assert=a.log=a.error=window.alert;Thread=function(){};Thread.J2S_THREAD=Thread.prototype.J2S_THREAD=
465 new Thread;Thread.currentThread=Thread.prototype.currentThread=function(){return this.J2S_THREAD};a.innerFunctionNames=a.innerFunctionNames.concat("getSuperclass isAssignableFrom getConstructor getDeclaredMethod getDeclaredMethods getMethod getMethods getModifiers newInstance".split(" "));a._innerFunctions.getSuperclass=function(){return this.superClazz};a._innerFunctions.isAssignableFrom=function(b){return 0<=a.getInheritedLevel(b,this)};a._innerFunctions.getConstructor=function(){return new java.lang.reflect.Constructor(this,
466 [],[],java.lang.reflect.Modifier.PUBLIC)};a._innerFunctions.getDeclaredMethods=a._innerFunctions.getMethods=function(){var a=[],b=this.prototype,c;for(c in b)"function"==typeof b[c]&&!b[c].__CLASS_NAME__&&a.push(new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC));b=this;for(c in b)"function"==typeof b[c]&&!b[c].__CLASS_NAME__&&a.push(new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC|java.lang.reflect.Modifier.STATIC));
467 return a};a._innerFunctions.getDeclaredMethod=a._innerFunctions.getMethod=function(a){var b=this.prototype,c;for(c in b)if(a==c&&"function"==typeof b[c]&&!b[c].__CLASS_NAME__)return new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC);b=this;for(c in b)if(a==c&&"function"==typeof b[c]&&!b[c].__CLASS_NAME__)return new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC|java.lang.reflect.Modifier.STATIC);return null};a._innerFunctions.getModifiers=
468 function(){return java.lang.reflect.Modifier.PUBLIC};a._innerFunctions.newInstance=function(){return new this};d=a.innerFunctionNames;for(B=0;B<d.length;B++)a._O[d[B]]=a._innerFunctions[d[B]],Array[d[B]]=a._innerFunctions[d[B]];if(window.Clazz&&!window.Clazz.unloadClass){a.unloadClass=function(b){var c=a.evalType(b);if(c){a.unloadedClasses[b]=c;for(var d=b.split(/\./),e=null,h=0;h<d.length-1;h++)e=e?e[d[h]]:a.allPackage[d[0]];if(e)for(k in e[d[d.length-1]]=null,e)0==k.indexOf(d[d.length-1]+"$")&&
469 (a.unloadClass(e.__PKG_NAME__+"."+k),e[k]=null);else{a.allPackage[d[0]]=null;window[d[0]]=null;for(var k in window)0==k.indexOf(b+"$")&&(a.unloadClass(k),window[k]=null)}if(a.allClasses[b])for(k in a.allClasses[b]=!1,a.allClasses)0==k.indexOf(b+"$")&&(a.allClasses[k]=!1);for(var l in c)gb(c[l]);for(l in c.prototype)gb(c.prototype[l]);a._Loader&&a._Loader.unloadClassExt(b);return!0}return!1};var gb=function(a){a&&("function"==typeof a&&a.lastMethod&&a.lastParams&&a.lastClaxxRef)&&(a.lastMethod=null,
470 a.lastParams=null,a.lastClaxxRef=null)}}a._Loader=a.ClazzLoader=function(){};var A=function(){this.parents=[];this.musts=[];this.optionals=[];this.onLoaded=this.path=this.name=this.declaration=null;this.status=0;this.random=0.13412};(function(a,b){b._checkLoad=l._checkLoad;b.updateNodeForFunctionDecoration=function(a){(a=Q(a))&&a.status==A.STATUS_KNOWN&&window.setTimeout(function(a){return function(){updateNode(a)}}(a),1)};A.prototype.toString=function(){return this.name||this.path||"ClazzNode"};
471 A.STATUS_UNKNOWN=0;A.STATUS_KNOWN=1;A.STATUS_CONTENT_LOADED=2;A.STATUS_MUSTS_LOADED=3;A.STATUS_DECLARED=4;A.STATUS_LOAD_COMPLETE=5;var c=[];b.requireLoaderByBase=function(a){for(var d=0;d<c.length;d++)if(c[d].base==a)return c[d];d=new b;d.base=a;c.push(d);return d};var d=new A,e={},h=0,k=6,n=navigator.userAgent.toLowerCase(),q=-1!=n.indexOf("opera"),r=-1!=n.indexOf("msie")&&!q,s=-1!=n.indexOf("gecko");if(q&&(k=1,q=n.indexOf("opera/"),-1!=q)){var v=9;try{v=parseFloat(n.subString(q+6))}catch(g){}9.6<=
472 v&&(k=6)}var B;self.Clazz&&a.isClassDefined?isClassDefined=a.isClassDefined:(B={},isClassDefined=function(a){return!0==B[a]});var D=function(a){if(!a||0==a.length)return[];for(var b=null,c=0;c<a.length;c++)if(a[c]){if("$"==a[c].charAt(0))if("."==a[c].charAt(1)){if(!b)continue;var d=b.lastIndexOf(".");-1!=d&&(b=b.substring(0,d),a[c]=b+a[c].substring(1))}else a[c]="org.eclipse.s"+a[c].substring(1);b=a[c]}return a},C=[],P={},M=0;b.loadPackageClasspath=function(a,c,d,e,g,j){g||(g=0);e||(e=null);j||(j=
473 0);var h=d&&P["@"+a];if(0==g&&(d&&!P["@java"]&&0!=a.indexOf("java")&&H("java"))&&(b.loadPackage("java",e?function(){b.loadPackageClasspath(a,c,d,e,1)}:null),e))return;if(a instanceof Array)if(D(a),e)j<a.length?b.loadPackageClasspath(a[j],c,d,function(){b.loadPackageClasspath(a,c,d,e,1,j+1)},1):e();else for(h=0;h<a.length;h++)b.loadPackageClasspath(a[h],c,d,null);else{switch(a){case "java.*":a="java";case "java":c&&(g="@net.sf.j2s.ajax",P[g]||(P[g]=c),g="@net.sf.j2s",P[g]||(P[g]=c));break;case "swt":a=
474 "org.eclipse.swt";break;case "ajax":a="net.sf.j2s.ajax";break;case "j2s":a="net.sf.j2s";break;default:a.lastIndexOf(".*")==a.length-2&&(a=a.substring(0,a.length-2))}c&&(P["@"+a]=c);d&&!h&&!window[a+".registered"]?(M++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){0==--M&&ca()},!0,!0,1)):e&&e()}};a.loadClass=function(c,d,e){self.Class||(Class=a,Class.forName=a._4Name,JavaObject=a._O);return c&&b.loadClass(c,d,!0,e,1)};b.loadClass=function(c,g,h,k,l){l||(l=0);null==k&&(k=!1);if("boolean"==
475 typeof g)return a.evalType(c);System.out.println("loadClass "+c);H("java")&&b.loadPackage("java");H("core")&&b.loadPackage("core");b.keepOnLoading=!0;if(!h&&(M&&c.lastIndexOf(".package")!=c.length-8||0!=c.indexOf("java.")&&!isClassDefined(ea)))Fa.push([c,g]),System.out.println("loadclass-queuing"+c+ea+" "+isClassDefined(ea));else if((l=isClassDefined(c))||O["@"+c]){if(l&&g&&(h=Q(c),!h||h.status>=A.STATUS_LOAD_COMPLETE))k?window.setTimeout(g,25):g()}else{var m=b.getClasspathFor(c);l=e[m];if(!l)for(k=
476 C.length;0<=--k;)if(C[k].path==m||C[k].name==c){l=!0;break}if(l){if(g&&(l=Q(c)))if(l.onLoaded){if(g!=l.onLoaded){var n=l.onLoaded,q=g;l.onLoaded=function(){n();q()}}}else l.onLoaded=g}else{l=a.unloadedClasses[c]&&Q(c)||new A;l.name=c;l.path=m;l.isPackage=m.lastIndexOf("package.js")==m.length-10;Z(m,c,l);l.onLoaded=g;l.status=A.STATUS_KNOWN;c=!1;for(k=C.length;0<=--k;)if(C[k].status!=A.STATUS_LOAD_COMPLETE){c=!0;break}if(l.isPackage){for(k=C.length;0<=--k&&!C[k].isPackage;)C[k+1]=C[k];C[++k]=l}else c&&
477 C.push(l);if(!c){var r=!1;g&&(r=U,U=!0);h&&(g=null);Ea(d,l,!0);V(l,l.path,l.requiredBy,!1,g?function(){U=r;g()}:null)}}}};var H=function(a){return null!=window[a+".registered"]&&!P["@"+a]};b.loadPackage=function(a,c){c||(c=null);window[a+".registered"]=!1;b.loadPackageClasspath(a,b.J2SLibBase||(b.J2SLibBase=b.getJ2SLibBase()||"j2s/"),!0,c)};b.jarClasspath=function(a,b){b instanceof Array||(b=[classes]);D(b);for(var c=b.length;0<=--c;)P["#"+b[c]]=a;P["$"+a]=b};b.registerPackages=function(c,d){for(var e=
478 b.getClasspathFor(c+".*",!0),g=0;g<d.length;g++)window.Clazz&&a.declarePackage(c+"."+d[g]),b.loadPackageClasspath(c+"."+d[g],e)};b.getClasspathFor=function(c,d,e){var g=P["#"+c];if(!g||d||e){var h,k;if(g){if(c=c.replace(/\./g,"/"),0<=(k=g.lastIndexOf(c))||0<=(k=c.lastIndexOf("/"))&&0<=(k=g.lastIndexOf(c.substring(0,k))))h=g.substring(0,k)}else{for(k=c.length+2;0<=(k=c.lastIndexOf(".",k-2))&&!(h=P["@"+c.substring(0,k)]););d||(c=c.replace(/\./g,"/"))}null==h&&(h=window.Clazz&&a.binaryFolders&&a.binaryFolders.length?
479 a.binaryFolders[0]:b.binaryFolders&&b.binaryFolders.length?b.binaryFolders[0]:"j2s");g=(h.lastIndexOf("/")==h.length-1?h:h+"/")+(d?"":c.lastIndexOf("/*")==c.length-2?c.substring(0,k+1):c+(!e?".js":"."!=e.charAt(0)?"."+e:e))}return g};b.ignore=function(){var a=1==arguments.length&&arguments[0]instanceof Array?a=arguments[0]:null,b=a?a.length:arguments.length;if(!a)for(var a=Array(b),c=0;c<b;c++)a[c]=arguments[c];D(a);for(c=0;c<b;c++)O["@"+a[c]]=1};b.onScriptLoading=function(){};b.onScriptLoaded=function(){};
480 b.onScriptInitialized=function(){};b.onScriptCompleted=function(){};b.onClassUnloaded=function(){};b.onGlobalLoaded=function(){};b.keepOnLoading=!0;var K={},O={},T=function(c,d){try{eval(d)}catch(e){if(a._isQuiet)return;var g="[Java2Script] The required class file \n\n"+c+(0==d.indexOf("[Exception")&&d.indexOf("data: no")?"\nwas not found.\n":"\ncould not be loaded. Script error: "+e.message+" \n\ndata:\n\n"+d)+"\n\n"+a.getStackTrace();alert(g);a.alert(g);throw e;}b.onScriptLoaded(c,!1);aa(c)},W=
481 function(a){return function(){if("interactive"!=a.readyState){try{a.parentNode&&a.parentNode.removeChild(a)}catch(b){}a=null}}},X=function(a){window["j2s.script.debugging"]||window.setTimeout(W(a),1)};a._4Name=function(c,d,e){if(a.isClassDefined(c))return a.evalType(c);d=l._isAsync&&d?d._restoreState(c,e):null;if(1==d)return null;if(b.setLoadingMode(d?b.MODE_SCRIPT:"xhr.sync"))return b.loadClass(c,d,!1,!0,1),null;b.loadClass(c);return a.evalType(c)};a.currentPath="";var V=function(c,d,g,k,m){a.currentPath=
482 d;k&&alert("WHY>>");e[d]=!0;Ka(C,d);L=!0;ta=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+"  ajax="+L+" async="+ta);b.onScriptLoading(d);if(L&&!ta){g=l._getFileData(d);try{T(d,g)}catch(n){alert(n+" loading file "+d+" "+c.name+" "+a.getStackTrace())}m&&m()}else System.out.println("for file "+d+" fSuccess = "+(m?m.toString():"")),c={dataType:"script",async:!0,type:"GET",url:d,success:da(d,!1,m),error:da(d,!0,m)},h++,l.$ajax(c)},da=function(c,d,e){a.getStackTrace();return function(){s&&
483 this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null);0<h&&h--;this.onerror=this.onload=null;d&&alert("There was a problem loading "+c);b.onScriptLoaded(c,!0);var a=this,g;g=e?function(){X(a);aa(c,e)}:function(){X(a);aa(c)};0<=Y?window.setTimeout(function(){aa(c,g)},Y):aa(c,g)}},U=!0,fa=!1,aa=function(c,g){var l=K["@"+c];if(l){var m,n=P["$"+c];if(n)for(var q=0;q<n.length;q++){var s=n[q];if(s!=l.name&&(m=Q(s)))m.status<A.STATUS_CONTENT_LOADED&&(m.status=A.STATUS_CONTENT_LOADED,
484 updateNode(m));else{m=new A;m.name=s;var v=P["#"+s];v||(alert(s+" J2S error in tryToLoadNext"),error("Java2Script implementation error! Please report this bug!"));m.path=v;Z(m.path,s,m);m.status=A.STATUS_CONTENT_LOADED;Ea(d,m,!1);updateNode(m)}}if(l instanceof Array)for(q=0;q<l.length;q++)l[q].status<A.STATUS_CONTENT_LOADED&&(l[q].status=A.STATUS_CONTENT_LOADED,updateNode(l[q]));else if(l.status<A.STATUS_CONTENT_LOADED){m=!1;n=document.getElementsByTagName("SCRIPT");for(q=0;q<n.length;q++)if(r){if(n[q].onreadystatechange&&
485 n[q].onreadystatechange.path==l.path&&"interactive"==n[q].readyState){m=!0;break}}else if(n[q].onload&&n[q].onload.path==l.path){m=!0;break}m||(l.status=A.STATUS_CONTENT_LOADED,updateNode(l))}if(b.keepOnLoading){q=!0;if(m=G(A.STATUS_KNOWN))for(S(m);h<k&&(m=G(A.STATUS_KNOWN));)S(m);else if(0!=C.length)m=C.shift(),!e[m.path]||0!=C.length||!U||m.musts.length||m.optionals.length?(Ea(d,m,!0),V(m,m.path,m.requiredBy,!1)):U&&(U=!1);else if(m=I(A.STATUS_KNOWN))for(S(m);h<k&&(m=I(A.STATUS_KNOWN));)S(m);else q=
486 !1;if(!(q||0<h)){l=[G,I];n=null;for(q=0;2>q;q++)for(;m=l[q](A.STATUS_CONTENT_LOADED);)1==q&&n===m&&(m.status=A.STATUS_LOAD_COMPLETE),updateNode(m),n=m;for(;!(pa=[],!qa(d,c)););for(q=0;2>q;q++)for(n=null;(m=l[q](A.STATUS_DECLARED))&&n!==m;)updateNode(n=m);n=[];for(q=0;2>q;q++)for(;m=l[q](A.STATUS_DECLARED);)n.push(m),m.status=A.STATUS_LOAD_COMPLETE;if(n.length){for(q=0;q<n.length;q++)xa(n[q]);for(q=0;q<n.length;q++)if(l=n[q].onLoaded)n[q].onLoaded=null,l()}if(g)g();else if(b._classCountPending)for(s in b._classPending){if(m=
487 Q(s),System.out.println("class left pending "+s+" "+m),m){updateNode(m);break}}else b._checkLoad&&(System.out.println("I think I'm done: SAEM call count: "+Wa),a.showDuplicates(!0));b.onGlobalLoaded()}}}},pa=[],qa=function(a,c){var d=pa,e=d.length;d.push(a);for(var g=e;0<=--g&&!(d[g]===a&&d[g].status>=A.STATUS_DECLARED););if(0<=g){if(b._checkLoad){var j;System.out.println("cycle found loading "+c+" for "+a)}for(;g<e;g++){var h=d[g];h.status=A.STATUS_LOAD_COMPLETE;xa(h);for(j=0;j<h.parents.length;j++)updateNode(h.parents[j]);
488 h.parents=[];var k=h.onLoaded;b._checkLoad&&(j="cycle setting status to LOAD_COMPLETE for "+h.name+(k?" firing "+k.toString():""),System.out.println(j));k&&(h.onLoaded=null,k())}d.length=0;return!0}h=[a.musts,a.optionals];for(j=0;2>j;j++){k=h[j];for(g=k.length;0<=--g;)if(k[g].status==A.STATUS_DECLARED&&qa(k[g],c))return!0}d.length=e;return!1};b._classCountPending=0;b._classCountOK=0;b._classPending={};b.showPending=function(){var a=[],c;for(c in b._classPending){var d=Q(c);d?(a.push(d),System.out.println(ra("",
489 "",d,"",0))):alert("No node for "+c)}return a};var ra=function(a,b,c,d,e){b+="--"+c.name;a+=b+"\n";if(5<e)return a+(d+" ...\n");d+="\t";a+=d+"status: "+c.status+"\n";if(c.parents&&c.parents.length&&c.parents[0]&&c.parents[0].name){a+=d+"parents: "+c.parents.length+"\n";for(var g=0;g<c.parents.length;g++)a=ra(a,b,c.parents[g],d+"\t",e+1);a+="\n"}return a};updateNode=function(a){if(!a.name||a.status>=A.STATUS_LOAD_COMPLETE)xa(a);else{var c=!0;if(a.musts.length&&a.declaration)for(var d=a.musts.length,
490 e=d;0<=--e;){var g=a.musts[e];g.requiredBy=a;if(g.status<A.STATUS_DECLARED&&isClassDefined(g.name)){var j=[];g.status=A.STATUS_LOAD_COMPLETE;xa(g);if(g.declaration&&g.declaration.clazzList){for(var h=0,k=g.declaration.clazzList,m=k.length;h<m;h++){var l=Q(k[h]);l&&(l.status!=A.STATUS_LOAD_COMPLETE&&l!==g)&&(l.status=g.status,l.declaration=null,xa(l),l.onLoaded&&j.push(l))}g.declaration=null}g.onLoaded&&j.push(g);for(h=0;h<j.length;h++)if(k=j[h].onLoaded)j[h].onLoaded=null,k()}else g.status==A.STATUS_CONTENT_LOADED&&
491 updateNode(g),g.status<A.STATUS_DECLARED&&(c=!1);a.musts.length!=d&&(e=d=a.musts.length,c=!0)}if(c){if(a.status<A.STATUS_DECLARED){if(e=a.declaration)e(),e.executed=!0;b._checkLoad&&b._classPending[a.name]&&(delete b._classPending[a.name],b._classCountOK,b._classCountPending--);a.status=A.STATUS_DECLARED;B&&(B[a.name]=!0);b.onScriptInitialized(a.path);if(a.declaration&&a.declaration.clazzList){h=0;k=a.declaration.clazzList;for(m=k.length;h<m;h++)if((l=Q(k[h]))&&l.status!=A.STATUS_DECLARED&&l!==a)l.status=
492 A.STATUS_DECLARED,B&&(B[l.name]=!0),b.onScriptInitialized(l.path)}}c=A.STATUS_DECLARED;if(0==a.optionals.length&&0==a.musts.length||a.status>A.STATUS_KNOWN&&!a.declaration||ua(a.musts,A.STATUS_LOAD_COMPLETE)&&ua(a.optionals,A.STATUS_LOAD_COMPLETE)){c=A.STATUS_LOAD_COMPLETE;if(!Pa(a,c))return!1;if(a.declaration&&a.declaration.clazzList){h=0;k=a.declaration.clazzList;for(m=k.length;h<m;h++)if((l=Q(k[h]))&&l.status!=c&&l!==a)if(l.declaration=null,!Pa(l,c))return!1}}if(a.parents&&a.parents.length){for(e=
493 0;e<a.parents.length;e++)h=a.parents[e],h.status<c&&updateNode(h,h.name);c==A.STATUS_LOAD_COMPLETE&&(a.parents=[])}}}};var ua=function(a,b){for(var c=a.length;0<=--c;)if(a[c].status<b)return!1;return!0},Pa=function(a,c){a.status=c;b.onScriptCompleted(a.path);var d=a.onLoaded;if(d&&(a.onLoaded=null,d(),!b.keepOnLoading))return!1;xa(a);return!0},$a={"r0.13412":1},ab=function(){for(;;){var a=Math.random(),b="r"+a;if(!$a[b])return $a[b]=1,d.random=a}},Q=function(a){ab();return Sa(a,d)},I=function(a){ab();
494 return na(d,a)},G=function(a){return Ra(d,a)},Sa=function(a,b){var c;return b.name==a?b:(c=ya(a,b.musts))||(c=ya(a,b.optionals))?c:null},ya=function(a,b){for(var c=d.random,e=b.length;0<=--e;){var g=b[e];if(g.name==a||g.random!=c&&(g.random=c,g=Sa(a,g)))return g}return null},Da=function(a,b){return a.status==b&&(b!=A.STATUS_KNOWN||!e[a.path])&&(b==A.STATUS_DECLARED||!isClassDefined(a.name))},Ra=function(a,b){for(var c=a.musts.length;0<=--c;){var d=a.musts[c];if(Da(d,b)||(d=Ra(d,b)))return d}return Da(a,
495 b)?a:null},na=function(a,b){var c;return(c=wa(a.musts,b))||(c=wa(a.optionals,b))||Da(c=a,b)?c:null},wa=function(a,b){if(a)for(var c=d.random,e=0;e<a.length;e++){var g=a[e];if(Da(g,b)||g.random!=c&&(g.random=c,g=na(g,b)))return g}return null},ka={},R=function(a,c,e,g){if(c instanceof Array){D(c);for(var j=0;j<c.length;j++)R(a,c[j],e,g,c)}else{b._checkLoad&&!b._classPending[c]&&(b._classPending[c]=1,0==b._classCountPending++&&(b._classCountOK=0),System.out.println("Loading class "+c));j=K["#"+c];j||
496 (j=(j=Q(c))?j:new A,j.name=c,j.path=P["#"+c]||"unknown",Z(j.path,c,j),j.status=A.STATUS_KNOWN,Ea(d,j,!1));ha(j,a,!0);5==arguments.length&&g&&(g.status=j.status,g.clazzList=arguments[4]);if(j.declaration=g)j.status=A.STATUS_CONTENT_LOADED;ha(j,e,!1)}},ha=function(a,b,c){if(b&&b.length){D(b);for(var d=0;d<b.length;d++){var e=b[d];if(e&&!isClassDefined(e)&&!O["@"+e]){var g=Q(e);g||(g=new A,g.name=e,g.status=A.STATUS_KNOWN);g.requiredBy=a;Ea(a,g,c)}}}};window.Clazz?a.load=R:b.load=R;var Z=function(a,
497 b,c){var d="@"+a;if(a=K[d])if(a instanceof Array){for(var d=!1,e=0;e<a.length;e++)if(a[e].name==b){d=!0;break}d||a.push(c)}else K[d]=[a,c];else K[d]=c;K["#"+b]=c},S=function(a){var c=a.name;if(!isClassDefined(c)&&!O["@"+c]){var d=b.getClasspathFor(c);a.path=d;Z(d,c,a);if(!e[d])return V(a,d,a.requiredBy,!1),!0}return!1},ea=b.runtimeKeyClass="java.lang.String",Fa=[];b.getJ2SLibBase=function(){var a=window["j2s.lib"];return a?a.base+("."==a.alias?"":(a.alias?a.alias:a.version?a.version:"1.0.0")+"/"):
498 null};var ta=!0,L=!1,Y=-1;b.MODE_SCRIPT=4;b.MODE_XHR=2;b.MODE_SYNC=1;b.setLoadingMode=function(a,c){var d=!0,e=!0;"string"==typeof a?(a=a.toLowerCase(),0<=a.indexOf("script")?e=!1:a.indexOf("async"),d=!1):a&b.MODE_SCRIPT?e=!1:d=!(a&b.MODE_SYNC);L=e;Y=(ta=d)&&0<=c?c:-1;return d};var ca=function(){if(!M&&isClassDefined(ea)){for(var a=Fa,c=0;c<a.length;c++)b.loadClass(a[c][0],a[c][1]);Fa=[]}};b.loadZJar=function(a,c){var d=null,e=c instanceof Array;e?c=c[c.length-1]:d=c==ea?ca:null;b.jarClasspath(a,
499 e?c:[c]);b.loadClass(c,d,!0)};var za={},La=[],Ea=function(a,b,c){var e=!1;c?(c=a.musts,b.requiredBy||(b.requiredBy=a)):c=a.optionals;za[b.name]||(La.push(b),za[b.name]=b);for(var g=0;g<c.length;g++)if(c[g].name==b.name){e=!0;break}e||(c.push(b),U&&(0!=b.name.indexOf("java")&&0!=b.name.indexOf("net.sf.j2s.ajax"))&&(fa&&(U=!1),fa=!0));a:{if(a.name&&a!=d&&a!=b)for(e=0;e<b.parents.length;e++)if(b.parents[e].name==a.name)break a;b.parents.push(a)}},xa=function(a){var b=a.parents;if(b)for(var c=b.length;0<=
500 --c;)Ka(b[c].musts,a)||Ka(b[c].optionals,a)};b.unloadClassExt=function(a){B&&(B[a]=!1);if(P["#"+a]){var c=P["#"+a];P["#"+a]=null;var d=P["$"+c];Ka(d,a)&&(P["$"+c]=d)}if(c=Q(a))c.status=A.STATUS_KNOWN,e[c.path]=!1;c=b.getClasspathFor(a);e[c]=!1;ka[c]&&(ka[c]=!1);b.onClassUnloaded(a)};a.binaryFolders=b.binaryFolders=[b.getJ2SLibBase()]})(a,a._Loader);a._LoaderProgressMonitor={};var V=a._LoaderProgressMonitor,aa=null,fa=0,C=null,ua=0;V.DEFAULT_OPACITY=l&&l._j2sLoadMonitorOpacity?l._j2sLoadMonitorOpacity:
501 55;V.hideMonitor=function(){C.style.display="none"};V.showStatus=function(a,b){if(!C){var c=document.createElement("DIV");c.id="_Loader-status";c.style.cssText="position:absolute;bottom:4px;left:4px;padding:2px 8px;z-index:"+(window["j2s.lib"].monitorZIndex||1E4)+";background-color:#8e0000;color:yellow;font-family:Arial, sans-serif;font-size:10pt;white-space:nowrap;";c.onmouseover=tb;C=c;document.body.appendChild(c);kb||(kb=!0)}qa(C);if(null==a)b?ra():V.hideMonitor();else{C.appendChild(document.createTextNode(""+
502 a));"none"==C.style.display&&(C.style.display="");ib(V.DEFAULT_OPACITY);var d,c=navigator.userAgent;d=document.body;var e=d.parentNode,h=e.clientHeight;d=d.scrollTop+d.offsetTop;var k=e.scrollTop+e.offsetTop,c=0>c.indexOf("Opera")&&document.all?0==h?d:k:0>c.indexOf("Gecko")?h==e.offsetHeight&&h==e.scrollHeight?d:k:d;ua!=c&&(ua=c,C.style.bottom=ua+4+"px");b&&ra()}};var qa=function(a){if(a)for(var b=a.childNodes.length;0<=--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&qa(c);try{a.removeChild(c)}catch(d){}}}},
503 ib=function(a){aa&&a==V.DEFAULT_OPACITY&&(window.clearTimeout(aa),aa=null);fa=a;navigator.userAgent.toLowerCase();C.style.filter="Alpha(Opacity="+a+")";C.style.opacity=a/100},tb=function(){V.hideMonitor()},kb=!1,ra=function(){"none"!=C.style.display&&(fa==V.DEFAULT_OPACITY?(aa=window.setTimeout(function(){ra()},750),fa-=5):0<=fa-10?(ib(fa-10),aa=window.setTimeout(function(){ra()},40)):C.style.display="none")},D=a.Console,W=System;D.maxTotalLines=1E4;D.setMaxTotalLines=function(a){D.maxTotalLines=
504 0<a?a:999999};D.maxLatency=40;D.setMaxLatency=function(a){D.maxLatency=0<a?a:40};D.pinning=!1;D.enablePinning=function(a){D.pinning=a};D.linesCount=0;D.metLineBreak=!1;D.createConsoleWindow=function(){var a=document.createElement("DIV");a.style.cssText="font-family:monospace, Arial, sans-serif;";document.body.appendChild(a);return a};var X=String.fromCharCode(160),X=X+(X+X+X);D.consoleOutput=function(a,b){var c=window["j2s.lib"];(c=c&&c.console)&&"string"==typeof c&&(c=document.getElementById(c));
505 if(!c)return!1;if(D.linesCount>D.maxTotalLines){for(var d=0;d<D.linesCount-D.maxTotalLines;d++)c&&0<c.childNodes.length&&c.removeChild(c.childNodes[0]);D.linesCount=D.maxTotalLines}var e=!1;a=("undefined"==typeof a?"":null==a?"null":""+a).replace(/\t/g,X);if(0<a.length)switch(a.charAt(a.length-1)){case "\n":case "\r":a=1<a.length?a.substring(0,a.length-("\r"==a.charAt(a.length-2)?2:1)):"",e=!0}var h=null;a=a.replace(/\t/g,X);for(var h=a.split(/\r\n|\r|\n/g),d=0,k=h.length-1;d<=k;d++){var l=null;if(D.metLineBreak||
506 0==D.linesCount||1>c.childNodes.length)l=document.createElement("DIV"),c.appendChild(l),l.style.whiteSpace="nowrap",D.linesCount++;else try{l=c.childNodes[c.childNodes.length-1]}catch(n){l=document.createElement("DIV"),c.appendChild(l),l.style.whiteSpace="nowrap",D.linesCount++}var q=document.createElement("SPAN");l.appendChild(q);q.style.whiteSpace="nowrap";b&&(q.style.color=b);l=h[d];0==l.length&&(l=X);q.appendChild(document.createTextNode(l));D.pinning||(c.scrollTop+=100);D.metLineBreak=d!=k||
507 e}d=c.parentNode.className;!D.pinning&&(d&&-1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);D.lastOutputTime=(new Date).getTime()};D.clear=function(){try{D.metLineBreak=!0;var a=window["j2s.lib"],b=a&&a.console;if(b&&(b=document.getElementById(b))){for(var c=b.childNodes,d=c.length;0<=--d;)b.removeChild(c[d]);D.linesCount=0}}catch(e){}};a.alert=function(a){D.consoleOutput(a+"\r\n")};W.out.print=function(a){D.consoleOutput(a)};W.out.println=function(a){D.consoleOutput("undefined"==
508 typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};W.out.write=function(a,b,c){W.out.print(String.instantialize(a).substring(b,b+c))};W.err.__CLASS_NAME__="java.io.PrintStream";W.err.print=function(a){D.consoleOutput(a,"red")};W.err.println=function(a){D.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};W.err.write=function(a,b,c){W.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2015-06-10 23:34:03 -0500 (Wed, 10 Jun 2015) $";
509 Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.2.14_2015.06.11";
510
511 Jmol.Info = {      
512                         // uncomment one or more of these next lines only if you want to override jmolInitialize()
513                         //jarPath: "java", 
514                         //jarFile: "JmolAppletSigned0.jar", 
515                         //j2sPath: "j2s", 
516                         use: "JAVA", // could be JAVA or HTML5
517                         // the serverURL path is only used to load binary files in Safari, Chrome, and MSIE
518                         serverURL: "http://www.jalview.org/jsmol.php", // required for binary file loading (Spartan, .gz, .map, etc.)
519         disableJ2SLoadMonitor: false,
520         disableInitialConsole: true
521
522 }
523
524 ////////// private functions /////////////
525
526 var _jmol = {
527         appletCount: 0,
528         applets: {},
529         allowedJmolSize: [25, 2048, 300],   // min, max, default (pixels)
530         codebase: ".",
531         targetSuffix: 0,
532         target: "jmolApplet0",
533         buttonCount: 0,
534         checkboxCount: 0,
535         linkCount: 0,
536         cmdCount: 0,
537         menuCount: 0,
538         radioCount: 0,
539         radioGroupCount: 0,
540         initialized: false,
541         initChecked: false,
542         archivePath: "JmolAppletSigned0.jar"
543 }
544
545 function _jmolApplet(size, inlineModel, script, nameSuffix) {
546                 nameSuffix == null && (nameSuffix = _jmol.appletCount);
547                 var id = "jmolApplet" + nameSuffix;
548                 jmolSetTarget(nameSuffix);
549                 ++_jmol.appletCount;
550                 script || (script = "select *");
551                 inlineModel && (script = 'load DATA "inline"\n' + inlineModel + '\nEND "inline";' + script); 
552                 var Info = {}
553                 for (var i in Jmol.Info)
554                         Info[i] = Jmol.Info[i]
555                 Info.jarFile || (Info.jarFile = _jmol.archivePath);
556                 Info.jarPath || (Info.jarPath = _jmol.codebase);
557                 Info.j2sPath || (Info.j2sPath = Info.jarPath + "/j2s");    
558                 var sz = _jmolGetAppletSize(size);
559                 Info.width || (Info.width = sz[0]);
560                 Info.height || (Info.height = sz[1]);  
561                 Info.script || (Info.script = script);
562                 Info.isSigned == null && (Info.isSigned = (Info.jarFile.indexOf("Signed") >= 0));
563                 for (var i in _jmol.params)
564                         if(_jmol.params[i]!="")
565                                 Info[i] || (Info[i] = _jmol.params[i]);
566 //  alert(JSON.stringify(Info).replace(/\,/g,"\n\n\n\n"))
567                 return _jmol.applets[id] = Jmol.getApplet(id, Info)
568 }
569
570 function _jmolGetJarFilename(fileNameOrFlag) {
571         _jmol.archivePath =
572                 (typeof(fileNameOrFlag) == "string"  ? fileNameOrFlag : (fileNameOrFlag ?  "JmolAppletSigned" : "JmolApplet") + "0.jar");
573 }
574
575 ////////////////////////////////////////////////////////////////
576 // Legacy Scripting API
577 ////////////////////////////////////////////////////////////////
578
579 function jmolSetParameter(key,value) {
580         Jmol.Info[key] = value;
581 }
582
583 function jmolSetXHTML(id) {
584         Jmol.setXHTML(id);
585 }
586
587 function jmolSetTranslation(TF) {
588         // n/a
589 }
590
591 function jmolInitialize(codebaseDirectory, fileNameOrUseSignedApplet) {
592         if (_jmol.initialized)
593                 return;
594         _jmol.initialized = true;
595         if(_jmol.jmoljar) {
596                 var f = _jmol.jmoljar;
597                 if (f.indexOf("/") >= 0) {
598                         alert ("This web page URL is requesting that the applet used be " + f + ". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network.")
599                         var ok = prompt("Do you want to use applet " + f + "? ","yes or no")
600                         if (ok == "yes") {
601                                 codebaseDirectory = f.substring(0, f.lastIndexOf("/"));
602                                 fileNameOrUseSignedApplet = f.substring(f.lastIndexOf("/") + 1);
603                         } else {
604         _jmolGetJarFilename(fileNameOrUseSignedApplet);
605                                 alert("The web page URL was ignored. Continuing using " + _jmol.archivePath + ' in directory "' + codebaseDirectory + '"');
606                         }
607                 } else {
608                         fileNameOrUseSignedApplet = f;
609                 }
610         }
611         _jmol.codebase = codebaseDirectory;
612         _jmolGetJarFilename(fileNameOrUseSignedApplet);
613 }
614
615 function jmolSetDocument(doc) {
616         _jmol.currentDocument = doc;
617 }
618
619 function jmolSetAppletColor(boxbgcolor, boxfgcolor, progresscolor) {
620         Jmol.Info.color = boxbgcolor ? boxbgcolor : "black";
621 }
622
623 function jmolSetAppletWindow(w) {
624         _jmol.appletWindow = w;
625 }
626
627 function jmolApplet(size, script, nameSuffix) {
628         return _jmolApplet(size, null, script, nameSuffix);
629 }
630
631 function jmolAppletInline(size, inlineModel, script, nameSuffix) {
632         return _jmolApplet(size, inlineModel, script, nameSuffix);
633 }
634
635
636
637 ////////////////////////////////////////////////////////////////
638 // Basic controls
639 ////////////////////////////////////////////////////////////////
640
641 function jmolButton(script, label, id, title) {
642         return Jmol.jmolButton(_jmol.target, script, label, id, title);
643 }
644
645 function jmolCheckbox(scriptWhenChecked, scriptWhenUnchecked, labelHtml, isChecked, id, title) {
646         return Jmol.jmolCheckbox(_jmol.target, scriptWhenChecked, scriptWhenUnchecked, labelHtml, isChecked, id, title)
647 }
648
649 function jmolRadioGroup(arrayOfRadioButtons, separatorHtml, groupName, id, title) {
650         return Jmol.jmolRadioGroup(_jmol.target, arrayOfRadioButtons, separatorHtml, groupName, id, title)
651 }
652
653
654 function jmolRadio(script, labelHtml, isChecked, separatorHtml, groupName, id, title) {
655         return  Jmol.jmolRadio(_jmol.target, script, labelHtml, isChecked, separatorHtml, groupName, id, title)
656 }
657
658 function jmolLink(script, label, id, title) {
659         return Jmol.jmolLink(_jmol.target, script, label, id, title)
660 }
661
662 function jmolCommandInput(label, size, id, title) {
663         return Jmol.jmolCommandInput(_jmol.target, label, size, id, title);
664 }
665
666 function jmolMenu(arrayOfMenuItems, size, id, title) {
667         return Jmol.jmolMenu(_jmol.target, arrayOfMenuItems, size, id, title);
668 }
669
670 function jmolHtml(html) {
671         return Jmol._documentWrite(html);
672 }
673
674 function jmolBr() {
675         return Jmol._documentWrite("<br />");
676 }
677
678 ////////////////////////////////////////////////////////////////
679 // advanced scripting functions
680 ////////////////////////////////////////////////////////////////
681
682 function jmolDebugAlert(enableAlerts) {
683         // n/a
684 }
685
686
687 function jmolLoadInline(model, targetSuffix) {
688         return jmolLoadInlineScript(model, null, targetSuffix, false)
689 }
690
691 function jmolLoadInlineArray(ModelArray, script, targetSuffix) {
692         return jmolLoadInlineScript(ModelArray.join("\n"), script, targetSuffix, false)
693 }
694
695 function jmolAppendInlineArray(ModelArray, script, targetSuffix) {
696         return jmolLoadInlineScript(ModelArray.join("\n"), script, targetSuffix, true)
697 }
698
699 function jmolAppendInlineScript(model, script, targetSuffix) {
700         return jmolLoadInlineScript(model, script, targetSuffix, true)
701 }
702
703 function jmolLoadInlineScript(model, script, targetSuffix, isAppend) {
704         Jmol.script(jmolFindTarget(targetSuffix),
705                  "load " 
706                  + (isAppend ? "APPEND " : "") 
707                  + "DATA 'mydata'\n" + model.replace(/\"/g,'\\"') + "\nEND 'mydata'\n")
708 }
709
710 function jmolSetTarget(targetSuffix) {
711         targetSuffix == null || (_jmol.targetSuffix = targetSuffix);
712         return _jmol.target = "jmolApplet" + _jmol.targetSuffix;
713 }
714
715 function jmolFindTarget(targetSuffix) {
716         return _jmol.applets[jmolSetTarget(targetSuffix)];
717 }
718
719 function jmolScript(script, targetSuffix) {
720         Jmol.script(jmolFindTarget(targetSuffix), script)
721 }
722
723 function jmolCheckBrowser(action, urlOrMessage, nowOrLater) {
724         // unnecessary
725 }
726
727 ////////////////////////////////////////////////////////////////
728 // Cascading Style Sheet Class support
729 ////////////////////////////////////////////////////////////////
730
731 function jmolSetAppletCssClass(appletCssClass) {
732         Jmol.setAppletCss(appletCssClass)
733 }
734
735 function jmolSetButtonCssClass(s) {
736         Jmol.setButtonCss(s)
737 }
738
739 function jmolSetCheckboxCssClass(s) {
740         Jmol.setCheckboxCss(s)
741 }
742
743 function jmolSetRadioCssClass(s) {
744         Jmol.setRadioCss(s)
745 }
746
747 function jmolSetLinkCssClass(s) {
748         Jmol.setLinkCss(s)
749 }
750
751 function jmolSetMenuCssClass(s) {
752         Jmol.setMenuCss(s)
753 }
754
755 function jmolSetMemoryMb(nMb) {
756         // n/a
757 }
758
759
760 function jmolSetCallback(callbackName,funcName) {
761 //if(!self[funcName])alert(funcName + " is not defined yet in jmolSetCallback")
762         Jmol.Info[callbackName] = funcName
763         //document.title=("jmolSetCallback " + callbackName + "/" + funcName + " must be included in Info definition")
764 }
765
766 function jmolSetSyncId(n) {
767         alert("jmolSetSyncId " + n + " must be included in Info definition")
768 }
769
770 function jmolSetLogLevel(n) {
771         Jmol.script(_jmol.target, "set loglevel " + n)
772 }
773
774 function _jmolGetAppletSize(size, units) {
775         var width, height;
776         if ( (typeof size) == "object" && size != null ) {
777                 width = size[0]; height = size[1];
778         } else {
779                 width = height = size;
780         }
781         return [_jmolFixDim(width, units), _jmolFixDim(height, units)];
782 }
783
784 function _jmolFixDim(x, units) {
785         var sx = "" + x;
786         return (sx.length == 0 ? (units ? "" : _jmol.allowedJmolSize[2])
787         : sx.indexOf("%") == sx.length-1 ? sx
788                 : (x = parseFloat(x)) <= 1 && x > 0 ? x * 100 + "%"
789                 : (isNaN(x = Math.floor(x)) ? _jmol.allowedJmolSize[2]
790                         : x < _jmol.allowedJmolSize[0] ? _jmol.allowedJmolSize[0]
791                                 : x > _jmol.allowedJmolSize[1] ? _jmol.allowedJmolSize[1]
792                                 : x) + (units ? units : ""));
793 }
794
795 //////////user property/status functions/////////
796
797 function jmolGetStatus(strStatus,targetSuffix){
798         return Jmol.getStatus(jmolFindTarget(targetSuffix), strStatus)
799 }
800
801 function jmolGetPropertyAsArray(sKey,sValue,targetSuffix) {
802         return Jmol.getPropertyAsArray(jmolFindTarget(targetSuffix), sKey, sValue)
803 }
804
805 function jmolGetPropertyAsString(sKey,sValue,targetSuffix) {
806         return Jmol.getPropertyAsString(jmolFindTarget(targetSuffix), sKey, sValue)
807 }
808
809 function jmolGetPropertyAsJSON(sKey,sValue,targetSuffix) {
810         return Jmol.getPropertyAsJSON(jmolFindTarget(targetSuffix), sKey, sValue)
811 }
812
813 function jmolGetPropertyAsJavaObject(sKey,sValue,targetSuffix) {
814         return Jmol.getPropertyAsJavaObject(jmolFindTarget(targetSuffix), sKey, sValue)
815 }
816
817 ///////// synchronous scripting ////////
818
819 function jmolScriptWait(script, targetSuffix) {
820         return Jmol.scriptWait(jmolFindTarget(targetSuffix), script)
821 }
822
823 function jmolScriptWaitOutput(script, targetSuffix) {
824         return Jmol.scriptWaitOutput(jmolFindTarget(targetSuffix), script)
825 }
826
827 function jmolEvaluate(molecularMath, targetSuffix) {
828         return Jmol.evaluate(jmolFindTarget(targetSuffix), molecularMath)
829 }
830
831 function jmolScriptEcho(script, targetSuffix) {
832         return Jmol.scriptEcho(jmolFindTarget(targetSuffix), script)
833 }
834
835
836 function jmolScriptMessage(script, targetSuffix) {
837         return Jmol.scriptMessage(jmolFindTarget(targetSuffix), script)
838 }
839
840
841 function jmolScriptWaitAsArray(script, targetSuffix) {
842         return Jmol.scriptWait(jmolFindTarget(targetSuffix), script)
843 }
844
845
846
847 ////////////   save/restore orientation   /////////////
848
849 function jmolSaveOrientation(id, targetSuffix) {
850         return Jmol.saveOrientation(jmolFindTarget(targetSuffix), id)
851 }
852
853 function jmolRestoreOrientation(id, targetSuffix) {
854         return Jmol.restoreOrientation(jmolFindTarget(targetSuffix), id)
855 }
856
857 function jmolRestoreOrientationDelayed(id, delay, targetSuffix) {
858         return Jmol.restoreOrientationDelayed(jmolFindTarget(targetSuffix), id, delay)
859 }
860
861 function jmolResizeApplet(size, targetSuffix) {
862         return Jmol.resizeApplet(jmolFindTarget(targetSuffix), size);
863 }
864
865
866 ////////////  add parameter /////////////
867
868 function jmolAppletAddParam(appletCode,name,value){
869         alert ("use Info to add a parameter: " + name + "/" + value)
870 }
871