(function(a){function h(a){try{return a?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest}catch(c){}}a.ajaxSettings.xhr=void 0===window.ActiveXObject?h:function(){return(this.url==document.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&h()||h(1)};a.ajaxTransport("+script",function(a){var c,b=document.head||jQuery("head")[0]||document.documentElement;return{send:function(g,j){c=document.createElement("script");a.scriptCharset&&
(c.charset=a.scriptCharset);c.src=a.url;c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,e||j(200,"success")};b.insertBefore(c,b.firstChild)},abort:function(){if(c)c.onload(void 0,!0)}}});a.extend(a.support,{iecors:!!window.XDomainRequest});a.support.iecors?a.ajaxTransport(function(a){return{send:function(c,b){var g=new window.XDomainRequest;g.onload=function(){b(200,
"OK",{text:g.responseText},{"Content-Type":g.contentType})};a.xhrFields&&(g.onerror=a.xhrFields.error,g.ontimeout=a.xhrFields.timeout);g.open(a.type,a.url);g.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 c;return{send:function(b,g){var j=a.xhr();console.log("xhr.open binary async="+a.async+" url="+a.url);j.open(a.type,a.url,a.async);
var h=!1;try{j.hasOwnProperty("responseType")&&(j.responseType="arraybuffer",h=!0)}catch(e){}try{!h&&j.overrideMimeType&&j.overrideMimeType("text/plain; charset=x-user-defined")}catch(k){}!a.crossDomain&&!b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");try{for(var d in b)j.setRequestHeader(d,b[d])}catch(q){}j.send(a.hasContent&&a.data||null);c=function(){var e=j.status,d="",k=j.getAllResponseHeaders(),b={};try{if(c&&4===j.readyState){c=void 0;try{b.text="string"===typeof j.responseText?
j.responseText:null}catch(q){}try{b.binary=j.response}catch(h){}try{d=j.statusText}catch(l){d=""}!e&&a.isLocal&&!a.crossDomain?e=b.text?200:404:1223===e&&(e=204);g(e,d,b,k)}}catch(w){alert(w),g(-1,w)}};a.async?4===j.readyState?setTimeout(c):j.onreadystatechange=c:c()},abort:function(){}}}))})(jQuery);
(function(a,h,f,c){function b(b,f){function l(d){a(e).each(function(){self.Jmol&&(0<=f.indexOf("mouseup")||0<=f.indexOf("touchend"))&&Jmol._setMouseOwner(null);var e=a(this);this!==d.target&&!e.has(d.target).length&&e.triggerHandler(f,[d.target,d])})}f=f||b+c;var e=a(),k=b+"."+f+"-special-event";a.event.special[f]={setup:function(){e=e.add(this);1===e.length&&a(h).bind(k,l)},teardown:function(){self.Jmol&&Jmol._setMouseOwner(null);e=e.not(this);0===e.length&&a(h).unbind(k)},add:function(a){var e=
a.handler;a.handler=function(a,d){a.target=d;e.apply(this,arguments)}}}}a.map(f.split(" "),function(a){b(a)});b("focusin","focus"+c);b("focusout","blur"+c)})(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={});
Jmol._version||(Jmol=function(a){var h=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}},h={_version:"$Date: 2015-07-07 14:00:27 -0500 (Tue, 07 Jul 2015) $",_alertNoBinary:!0,_allowedJmolSize:[25,2048,300],_appletCssClass:"",_appletCssText:"",_fileCache:null,_jarFile:null,_j2sPath:null,_use:null,_j2sLoadMonitorOpacity:90,_applets:{},_asynchronous:!0,_ajaxQueue:[],_persistentMenu:!1,
_getZOrders:h,_z:h(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",
"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",
_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,
_XhtmlAppendChild:!1};a=a.location.href.toLowerCase();h._httpProto=0==a.indexOf("https")?"https://":"http://";h._isFile=0==a.indexOf("file:");h._ajaxTestSite=h._httpProto+"google.com";a=h._isFile||0==a.indexOf("http://localhost")||0==a.indexOf("http://127.");h._tracker="http://"==h._httpProto&&!a&&"http://chemapps.stolaf.edu/jmol/JmolTracker.htm?id=UA-45940799-1";h._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");h._isSafari=!h._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari");
h._isMsie=void 0!==window.ActiveXObject;h._useDataURI=!h._isSafari&&!h._isMsie;for(var f in Jmol)h[f]=Jmol[f];return h}(document,Jmol));
(function(a,h){h(document).ready(function(){a._document=null});a.$=function(a,k){null==a&&alert(k+arguments.callee.caller.toString());return h(k?"#"+a._id+"_"+k:a)};a._$=function(a){return"string"==typeof a?h("#"+a):a};a.$ajax=function(e){a._ajaxCall=e.url;e.cache="NO"!=e.cache;0==e.url.indexOf("http://pubchem.ncbi.nlm.nih")&&(e.url="https://"+e.url.substring(7));return h.ajax(e)};a._getNCIInfo=function(e,k){return a._getFileData("http://cactus.nci.nih.gov/chemical/structure/"+e+"/"+("name"==k?"names":
k))};a.$appEvent=function(e,k,d,b){e=a.$(e,k);e.off(d)&&b&&e.on(d,b)};a.$resize=function(a){return h(window).resize(a)};a.$after=function(a,k){return h(a).after(k)};a.$append=function(a,k){return h(a).append(k)};a.$bind=function(a,k,d){return d?h(a).bind(k,d):h(a).unbind(k)};a.$closest=function(a,k){return h(a).closest(k)};a.$get=function(a,k){return h(a).get(k)};a.$documentOff=function(a,k){return h(document).off(a,"#"+k)};a.$documentOn=function(a,k,d){return h(document).on(a,"#"+k,d)};a.$getAncestorDiv=
function(a,k){return h("div."+k+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return h.support.iecors};a.$attr=function(e,k,d){return a._$(e).attr(k,d)};a.$css=function(e,k){return a._$(e).css(k)};a.$find=function(e,k){return a._$(e).find(k)};a.$focus=function(e){return a._$(e).focus()};a.$html=function(e,k){return a._$(e).html(k)};a.$offset=function(e){return a._$(e).offset()};a.$windowOn=function(a,k){return h(window).on(a,k)};a.$prop=function(e,k,d){var b=a._$(e);return 3==arguments.length?
b.prop(k,d):b.prop(k)};a.$remove=function(e){return a._$(e).remove()};a.$scrollTo=function(e,k){var d=a._$(e);return d.scrollTop(0>k?d[0].scrollHeight:k)};a.$setEnabled=function(e,k){return a._$(e).attr("disabled",k?null:"disabled")};a.$getSize=function(e){e=a._$(e);return[e.width(),e.height()]};a.$setSize=function(e,k,d){return a._$(e).width(k).height(d)};a.$setVisible=function(e,k){var d=a._$(e);return k?d.show():d.hide()};a.$submit=function(e){return a._$(e).submit()};a.$val=function(e,k){var d=
a._$(e);return 1==arguments.length?d.val():d.val(k)};a._clearVars=function(){delete jQuery;delete h;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 f=document,c=window,b={};b.ua=navigator.userAgent.toLowerCase();var g;a:{g=["linux","unix","mac","win"];for(var j=g.length;j--;)if(-1!=b.ua.indexOf(g[j])){g=g[j];break a}g="unknown"}b.os=g;b.browser=function(){for(var a=b.ua,k="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),
d=0;d<k.length;d++)if(0<=a.indexOf(k[d]))return k[d];return"unknown"};b.browserName=b.browser();b.browserVersion=parseFloat(b.ua.substring(b.ua.indexOf(b.browserName)+b.browserName.length+1));b.supportsXhr2=function(){return h.support.cors||h.support.iecors};b.allowDestroy="msie"!=b.browserName;b.allowHTML5="msie"!=b.browserName||0>navigator.appVersion.indexOf("MSIE 8");b.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};b._webGLtest=0;b.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var e;
a.featureDetection._webGLtest=c.WebGLRenderingContext&&((e=f.createElement("canvas")).getContext("webgl")||e.getContext("experimental-webgl"))?1:-1}return 0<a.featureDetection._webGLtest};b.supportsLocalization=function(){for(var a=f.getElementsByTagName("meta"),k=a.length;0<=--k;)if(0<=a[k].outerHTML.toLowerCase().indexOf("utf-8"))return!0;return!1};b.supportsJava=function(){a.featureDetection._javaEnabled||(a.featureDetection._javaEnabled=a._isMsie?navigator.javaEnabled()?1:-1:navigator.javaEnabled()&&
(!navigator.mimeTypes||navigator.mimeTypes["application/x-java-applet"])?1:-1);return 0<a.featureDetection._javaEnabled};b.compliantBrowser=function(){var a=!!f.getElementById,k=b.os;if("opera"==b.browserName&&7.54>=b.browserVersion&&"mac"==k||"webkit"==b.browserName&&125.12>b.browserVersion||"msie"==b.browserName&&"mac"==k||"konqueror"==b.browserName&&3.3>=b.browserVersion)a=!1;return a};b.isFullyCompliant=function(){return b.compliantBrowser()&&b.supportsJava()};b.useIEObject="win"==b.os&&"msie"==
b.browserName&&5.5<=b.browserVersion;b.useHtml4Object="mozilla"==b.browserName&&5<=b.browserVersion||"opera"==b.browserName&&8<=b.browserVersion||"webkit"==b.browserName;b.hasFileReader=c.File&&c.FileReader;a.featureDetection=b;a._ajax=function(e){if(!e.async)return a.$ajax(e).responseText;a._ajaxQueue.push(e);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var e=a._ajaxQueue.shift();e&&a.$ajax(e)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=",
"RCSB(macromolecules)"],["*","PDBe(macromolecules)"]];a._getGrabberOptions=function(e){if(0==a._grabberOptions.length)return"";var k='<input type="text" id="ID_query" onfocus="jQuery(this).select()" onkeypress="if(13==event.which){Jmol._applets[\'ID\']._search();return false}" size="32" value="" />',d='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(k="<nobr>"+k+'<span style="display:none">',d="</span>"+d):k+="<br /><nobr>";for(var k=
k+'<select id="ID_select">',b=0;b<a._grabberOptions.length;b++)var c=a._grabberOptions[b],k=k+('<option value="'+c[0]+'" '+(0==b?"selected":"")+">"+c[1]+"</option>");k=(k+"</select>"+d).replace(/ID/g,e._id);return"<br />"+k};a._getScriptForDatabase=function(e){return"$"==e?a.db._nciLoadScript:":"==e?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,k,d){var b=[],c="";if(0==d.indexOf("ERROR"))c=d;else switch(k){case "=":k=d.split("<dimStructure.structureId>");b=["<table>"];for(d=
1;d<k.length;d++)b.push('<tr><td valign=top><a href="javascript:Jmol.search('+a._id+",'="+k[d].substring(0,4)+"')\">"+k[d].substring(0,4)+"</a></td>"),b.push("<td>"+k[d].split("Title>")[1].split("</")[0]+"</td></tr>");b.push("</table>");c=k.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=c;a._info=b.join("");a._showInfo(!0)};a._loadSuccess=function(e,k){k&&(a._ajaxDone(),k(e))};a._loadError=function(e){a._ajaxDone();a.say("Error connecting to server: "+a._ajaxCall);
null!=e&&e()};a._isDatabaseCall=function(e){return 0<=a.db._databasePrefixes.indexOf(e.substring(0,1))};a._getDirectDatabaseCall=function(e,k){if(k&&!a.featureDetection.supportsXhr2())return e;var d=2,b,c=a.db._DirectDatabaseCalls[e.substring(0,d)];c||(c=a.db._DirectDatabaseCalls[b=e.substring(0,--d)]);c&&(":"==b?(b=e.toLowerCase(),isNaN(parseInt(e.substring(1)))?0==b.indexOf(":smiles:")?(c+="?POST?smiles="+e.substring(8),e="smiles"):0==b.indexOf(":cid:")?e="cid/"+e.substring(5):(0==b.indexOf(":name:")?
e=e.substring(5):0==b.indexOf(":cas:")&&(e=e.substring(4)),e="name/"+encodeURIComponent(e.substring(d))):e="cid/"+e.substring(1)):e=encodeURIComponent(e.substring(d)),0<=c.indexOf("FILENCI")?(e=e.replace(/\%2F/g,"/"),e=c.replace(/\%FILENCI/,e)):e=c.replace(/\%FILE/,e));return e};a._getRawDataFromServer=function(e,k,d,b,c,f){e="?call=getRawDataFromDatabase&database="+e+(0<=k.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(k)+(c?"&encoding=base64":"")+(f?"":"&script="+encodeURIComponent(a._getScriptForDatabase(e)));
return a._contactServer(e,d,b)};a._checkFileName=function(e,b,d){a._isDatabaseCall(b)&&(d&&a._setQueryTerm(e,b),b=a._getDirectDatabaseCall(b,!0),a._isDatabaseCall(b)&&(b=a._getDirectDatabaseCall(b,!1),d&&(d[0]=!0)));return b};a._checkCache=function(e,b,d){if(e._cacheFiles&&a._fileCache&&!b.endsWith(".js")){if(e=a._fileCache[b])return System.out.println("using "+e.length+" bytes of cached data for "+b),d(e),null;d=function(e,b){d(a._fileCache[e]=b)}}return d};a._loadFileData=function(e,b,d,c){var f=
[];b=a._checkFileName(e,b,f);d=a._checkCache(e,b,d);f[0]?a._getRawDataFromServer("_",b,d,c):(e={type:"GET",dataType:"text",url:b,async:a._asynchronous,success:function(e){a._loadSuccess(e,d)},error:function(){a._loadError(c)}},a._checkAjaxPost(e),a._ajax(e))};a._getInfoFromDatabase=function(e,b,d){if("===="==b){var c=a.db._restQueryXml.replace(/QUERY/,d),c={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(c)+"&req=browser",
success:function(c){a._ajaxDone();a._extractInfoFromRCSB(e,b,d,c)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(c)}d="?call=getInfoFromDatabase&database="+b+"&query="+encodeURIComponent(d);return a._contactServer(d,function(d){a._setInfo(e,b,d)})};a._extractInfoFromRCSB=function(e,b,d,c){var f=c.length/5;if(0!=f&&4==d.length&&1!=f){d=d.toUpperCase();var g=c.indexOf(d);0<g&&0<="123456789".indexOf(d.substring(0,1))&&(c=d+","+c.substring(0,g)+c.substring(g+5));50<f&&(c=
c.substring(0,250));c=c.replace(/\n/g,",");c=a._restReportUrl.replace(/IDLIST/,c);a._loadFileData(e,c,function(d){a._setInfo(e,b,d)})}};a._checkAjaxPost=function(a){var b=a.url.indexOf("?POST?");0<b&&(a.data=a.url.substring(b+6),a.url=a.url.substring(0,b),a.type="POST",a.contentType="application/x-www-form-urlencoded")};a._contactServer=function(e,b,d){e={dataType:"text",type:"GET",url:a._serverUrl+e,success:function(e){a._loadSuccess(e,b)},error:function(){a._loadError(d)},async:b?a._asynchronous:
!1};a._checkAjaxPost(e);return a._ajax(e)};a._setQueryTerm=function(e,b){if(b&&e._hasOptions&&"http://"!=b.substring(0,7)){if(a._isDatabaseCall(b)){var d=b.substring(0,1);b=b.substring(1);b.substring(0,1)==d&&0<="=$".indexOf(d)&&(b=b.substring(1));var c=a._getElement(e,"select");if(c&&c.options)for(var f=0;f<c.options.length;f++)c[f].value==d&&(c[f].selected=!0)}a.$val(a.$(e,"query"),b)}};a._search=function(e,b,d){1<arguments.length||(b=null);a._setQueryTerm(e,b);b||(b=a.$val(a.$(e,"query")));0==
b.indexOf("!")?e._script(b.substring(1)):(b&&(b=b.replace(/\"/g,"")),e._showInfo(!1),a._searchMol(e,b,d,!0))};a._searchMol=function(e,b,d,c){var f;a._isDatabaseCall(b)?(f=b.substring(0,1),b=b.substring(1)):f=e._hasOptions?a.$val(a.$(e,"select")):"$";"="==f&&3==b.length&&(b="="+b);var g=f+b;if(b&&!(0>g.indexOf("?")&&g==e._thisJmolModel)){e._thisJmolModel=g;var j;c&&null!=e._viewSet&&null!=(j=a.View.__findView(e._viewSet,{chemID:g}))?a.View.__setView(j,e,!1):("$"==f||":"==f?e._jmolFileType="MOL":"="==
f&&(e._jmolFileType="PDB"),e._searchDatabase(b,f,d))}};a._searchDatabase=function(e,b,d,c){e._showInfo(!1);return 0<=b.indexOf("?")?(a._getInfoFromDatabase(e,d,b.split("?")[0]),!0):a.db._DirectDatabaseCalls[d]?(e._loadFile(d+b,c),!0):!1};a._syncBinaryOK="?";a._canSyncBinary=function(e){if(a._isAsync)return!0;if(self.VBArray)return a._syncBinaryOK=!1;if("?"!=a._syncBinaryOK)return a._syncBinaryOK;a._syncBinaryOK=!0;try{var b=new window.XMLHttpRequest;b.open("text",a._ajaxTestSite,!1);b.hasOwnProperty("responseType")?
b.responseType="arraybuffer":b.overrideMimeType&&b.overrideMimeType("text/plain; charset=x-user-defined")}catch(d){return System.out.println("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._alertNoBinary&&!e&&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(e){for(var b=a._binaryTypes.length;0<=
--b;)if(0<=e.indexOf(a._binaryTypes[b]))return!0;return!1};a._getFileData=function(e,b,d){var c=a._isBinaryUrl(e),f=0<=e.indexOf("pdb.gz")&&0==e.indexOf("http://www.rcsb.org/pdb/files/"),g=c&&!a._canSyncBinary(f);g&&f&&(e=e.replace(/pdb\.gz/,"pdb"),g=c=!1);f=0<=e.indexOf("?POST?");0==e.indexOf("file:/")&&0!=e.indexOf("file:///")&&(e="file://"+e.substring(5));var j=0>e.indexOf("://")||0==e.indexOf(document.location.protocol)&&0<=e.indexOf(document.location.host),h=a._isDirectCall(e),l=!j&&a.$supportsIECrossDomainScripting(),
G=null;if((!b||g)&&(l||g||!j&&!h))G=a._getRawDataFromServer("_",e,b,b,g,!0);else{e=e.replace(/file:\/\/\/\//,"file://");var r={dataType:c?"binary":"text",async:!!b};f?(r.type="POST",r.url=e.split("?POST?")[0],r.data=e.split("?POST?")[1]):(r.type="GET",r.url=e);b&&(r.success=function(){b(a._xhrReturn(r.xhr))},r.error=function(){b(r.xhr.statusText)});r.xhr=a.$ajax(r);b||(G=a._xhrReturn(r.xhr))}if(!d)return G;null==G&&(G="",c=!1);c&&(c=a._canSyncBinary(!0));return c?a._strToBytes(G):JU.SB.newS(G)};a._xhrReturn=
function(a){return!a.responseText||self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response||a.statusText:a.responseText};a._isDirectCall=function(e){for(var b in a.db._DirectDatabaseCalls)if(0<=b.indexOf(".")&&0<=e.indexOf(b))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 b=a.substring(0,1);if("$"==b||":"==b)return"MOL";if("="==b)return"="==
a.substring(1,2)?"LCIF":"PDB";a=a.split(".").pop().toUpperCase();return a.substring(0,Math.min(a.length,3))};a._getZ=function(e,b){return e&&e._z&&e._z[b]||a._z[b]};a._incrZ=function(e,b){return e&&e._z&&++e._z[b]||++a._z[b]};a._loadFileAsynchronously=function(e,b,d,c){if(0!=d.indexOf("?")){var f=d;d=a._checkFileName(b,d);var g=function(b){a._setData(e,d,f,b,c)},g=a._checkCache(b,d,g);0<=d.indexOf("|")&&(d=d.split("|")[0]);return null==g?null:a._getFileData(d,g)}if(!a.featureDetection.hasFileReader)return e.setData("Local file reading is not enabled in your browser",
null,null,c);b._localReader||(g='<div id="ID" style="z-index:'+a._getZ(b,"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>',a.$after("#"+b._id+"_appletdiv",g.replace(/ID/g,b._id+"_localReader")),b._localReader=a.$(b,"localReader"));a.$appEvent(b,"localReader_loadfile","click");a.$appEvent(b,"localReader_loadfile","click",
function(){var d=a.$(b,"localReader_files")[0].files[0],f=new FileReader;f.onloadend=function(f){f.target.readyState==FileReader.DONE&&(a.$css(a.$(b,"localReader"),{display:"none"}),a._setData(e,d.name,d.name,f.target.result,c))};f.readAsArrayBuffer(d)});a.$appEvent(b,"localReader_cancel","click");a.$appEvent(b,"localReader_cancel","click",function(){a.$css(a.$(b,"localReader"),{display:"none"});e.setData(null,null,null,c)});a.$css(a.$(b,"localReader"),{display:"block"})};a._setData=function(e,b,
d,c,f){c=a._strToBytes(c);0<=b.indexOf(".jdx")&&a.Cache.put("cache://"+b,c);e.setData(b,d,c,f)};a._toBytes=function(a){if("string"==typeof a)return a.getBytes();a=new Uint8Array(a);for(var b=Clazz.newByteArray(a.length,0),d=a.length;0<=--d;)b[d]=a[d];return b};a._doAjax=function(e,b,d){e=e.toString();if(null!=d)return a._saveFile(e,d);b&&(e+="?POST?"+b);return a._getFileData(e,null,!0)};a._saveFile=function(e,b,d,c){if(a._localFileSaveFunction&&a._localFileSaveFunction(e,b))return"OK";e=e.substring(e.lastIndexOf("/")+
1);d||(d=0<=e.indexOf(".pdf")?"application/pdf":0<=e.indexOf(".png")?"image/png":0<=e.indexOf(".gif")?"image/gif":0<=e.indexOf(".jpg")?"image/jpg":"");var f="string"==typeof b;f||(b=(JU?JU:J.util).Base64.getBase64(b).toString());c||(c=f?"":"base64");(f=a._serverUrl)&&0<=f.indexOf("your.server")&&(f="");a._useDataURI||!f?(c||(b=btoa(b)),c=document.createElement("a"),c.href="data:"+d+";base64,"+b,c.type=d||"text/plain",c.download=e,c.target="_blank",h("body").append(c),c.click(),c.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>'),a._formdiv=
"__jsmolform__"),a.$attr(a._formdiv,"action",f+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",b),a.$val("__jsmolfilename__",e),a.$val("__jsmolmimetype__",d),a.$val("__jsmolencoding__",c),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(e){if(Clazz.instanceOf(e,self.ArrayBuffer))return a._toBytes(e);for(var b=Clazz.newByteArray(e.length,0),d=e.length;0<=--d;)b[d]=e.charCodeAt(d)&255;return b};a._setConsoleDiv=function(a){self.Clazz&&
Clazz.setConsoleDiv(a)};a._registerApplet=function(e,b){return window[e]=a._applets[e]=a._applets[b]=a._applets[e+"__"+a._syncId+"__"]=b};a._readyCallback=function(e,b,d,c,f){e=e.split("_object")[0];f||(f=c);d=d.booleanValue?d.booleanValue():d;var g=a._applets[e];g._appletPanel=f;g._applet=c;a._track(g._readyCallback(e,b,d))};a._getWrapper=function(e,b){var d;if(b){var c="";e._coverImage&&(c=' onclick="Jmol.coverApplet(ID, false)" title="'+e._coverTitle+'"',d='<image id="ID_coverclickgo" src="'+e._j2sPath+
'/img/play_make_live.jpg" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:'+a._getZ(e,"coverImage")+';opacity:0.5;"'+c+" />",c='<div id="ID_coverdiv" style="background-color:red;z-index:'+a._getZ(e,"coverImage")+';width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+e._coverImage+'" style="width:100%;height:100%"'+c+"/>"+d+"</div>");d=a._appletCssText.replace(/\'/g,'"');d=0<=d.indexOf('style="')?d.split('style="')[1]:
'" '+d;d='...<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(e,"header")+";width:100%;height:100%;position:absolute;top:0px;left:0px;"+d+">";var f=e._height,g=e._width;if("string"!==typeof f||0>f.indexOf("%"))f+="px";if("string"!==typeof g||0>g.indexOf("%"))g+="px";d=d.replace(/IMG/,c).replace(/Hpx/g,f).replace(/Wpx/g,g)}else d='......</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>';
return d.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,e._id)};a._documentWrite=function(e){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var b=document.getElementsByTagName("script");a._XhtmlElement=b.item(b.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(e):a._document.write(e)}return e};a._domWrite=function(e){for(var b=[0];b[0]<e.length;){var d=a._getDomElement(e,b);if(!d)break;a._XhtmlAppendChild?a._XhtmlElement.appendChild(d):a._XhtmlElement.parentNode.insertBefore(d,
_jmol.XhtmlElement)}};a._getDomElement=function(a,b){var d=document.createElement("span");d.innerHTML=a;b[0]=a.length;return d};a._setObject=function(e,b,d){e._id=b;e.__Info={};d.z&&d.zIndexBase&&(a._z=a._getZOrders(d.zIndexBase));for(var c in d)e.__Info[c]=d[c];(e._z=d.z)||d.zIndexBase&&(e._z=e.__Info.z=a._getZOrders(d.zIndexBase));e._width=d.width;e._height=d.height;e._noscript=!e._isJava&&d.noscript;e._console=d.console;e._cacheFiles=!!d.cacheFiles;e._viewSet=null==d.viewSet||e._isJava?null:"Set"+
d.viewSet;null!=e._viewSet&&(a.View.__init(e),e._currentView=null);!a._fileCache&&e._cacheFiles&&(a._fileCache={});e._console||(e._console=e._id+"_infodiv");"none"==e._console&&(e._console=null);e._color=d.color?d.color.replace(/0x/,"#"):"#FFFFFF";e._disableInitialConsole=d.disableInitialConsole;e._noMonitor=d.disableJ2SLoadMonitor;a._j2sPath&&(d.j2sPath=a._j2sPath);e._j2sPath=d.j2sPath;e._coverImage=d.coverImage;e._isCovered=!!e._coverImage;e._deferApplet=d.deferApplet||e._isCovered&&e._isJava;e._deferUncover=
d.deferUncover&&!e._isJava;e._coverScript=d.coverScript;e._coverTitle=d.coverTitle;e._coverTitle||(e._coverTitle=e._deferApplet?"activate 3D model":"3D model is loading...");e._containerWidth=e._width+(e._width==parseFloat(e._width)?"px":"");e._containerHeight=e._height+(e._height==parseFloat(e._height)?"px":"");e._info="";e._infoHeader=e._jmolType+' "'+e._id+'"';e._hasOptions=d.addSelectionOptions;e._defaultModel=d.defaultModel;e._readyScript=d.script?d.script:"";e._readyFunction=d.readyFunction;
e._coverImage&&!e._deferApplet&&(e._readyScript+=";javascript "+b+"._displayCoverImage(false)");e._src=d.src};a._addDefaultInfo=function(b,c){for(var d in c)"undefined"==typeof b[d]&&(b[d]=c[d]);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]=
1;for(var c=0,d=0;d<a._syncedApplets.length;d++){if(a._syncedApplets[d]==b._id)a._syncedApplets[d]=b,a._syncedReady[d]=1;else if(!a._syncedReady[d])continue;c++}c==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 c=0,d=0;d<a._syncedApplets.length;d++)a._syncedApplets[d]==
b&&(a._syncedApplets[d]=null),a._syncedApplets[d]&&c++;0<c||a._clearVars()}catch(f){}};a._setSyncReady=function(){a._syncReady=!0;for(var b="",c=0;c<a._syncedApplets.length;c++)a._syncedCommands[c]&&(b+="Jmol.script(Jmol._syncedApplets["+c+"], Jmol._syncedCommands["+c+"]);");setTimeout(b,50)};a._mySyncCallback=function(b,c){app=a._applets[b];if(app._viewSet)a.View.updateFromSync(app,c);else{if(!a._syncReady||!a._isJmolJSVSync)return 1;for(var d=0;d<a._syncedApplets.length;d++)0<=c.indexOf(a._syncedApplets[d]._syncKeyword)&&
a._syncedApplets[d]._syncScript(c);return 0}};a._getElement=function(a,b){return document.getElementById(a._id+"_"+b)||{}};a._evalJSON=function(a,b){a+="";if(!a)return[];if("{"!=a.charAt(0))return 0<=a.indexOf(" | ")&&(a=a.replace(/\ \|\ /g,"\n")),a;var d=(new Function("return "+a))();return!d?null:b&&void 0!=d[b]?d[b]:d};a._sortMessages=function(a){function b(a,e){return a[0]<e[0]?1:a[0]>e[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var d=[],c=a.length-1;0<=c;c--)for(var f=0,g=a[c].length;f<g;f++)d[d.length]=
a[c][f];if(0!=d.length)return d=d.sort(b)};a._setMouseOwner=function(b,c){null==b||c?a._mouseOwner=b:a._mouseOwner==b&&(a._mouseOwner=null)};a._jsGetMouseModifiers=function(a){var b=0;switch(a.button){case 0:b=16;break;case 1:b=8;break;case 2:b=4}a.shiftKey&&(b+=1);a.altKey&&(b+=8);a.ctrlKey&&(b+=2);return b};a._jsGetXY=function(b,c){if(!b.applet._ready||a._touching&&0>c.type.indexOf("touch"))return!1;var d=a.$offset(b.id),f,g=c.originalEvent;c.pageX||(c.pageX=g.pageX);c.pageY||(c.pageY=g.pageY);
a._mousePageX=c.pageX;a._mousePageY=c.pageY;g.targetTouches&&g.targetTouches[0]?(f=g.targetTouches[0].pageX-d.left,d=g.targetTouches[0].pageY-d.top):g.changedTouches?(f=g.changedTouches[0].pageX-d.left,d=g.changedTouches[0].pageY-d.top):(f=c.pageX-d.left,d=c.pageY-d.top);return void 0==f?null:[Math.round(f),Math.round(d),a._jsGetMouseModifiers(c)]};a._gestureUpdate=function(b,c){c.stopPropagation();c.preventDefault();var d=c.originalEvent;switch(c.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=
!1}if(!d.touches||2!=d.touches.length)return!1;switch(c.type){case "touchstart":b._touches=[[],[]];break;case "touchmove":var f=a.$offset(b.id),g=b._touches[0],j=b._touches[1];g.push([d.touches[0].pageX-f.left,d.touches[0].pageY-f.top]);j.push([d.touches[1].pageX-f.left,d.touches[1].pageY-f.top]);d=g.length;3<d&&(g.shift(),j.shift());2<=d&&b.applet._processGesture(b._touches)}return!0};a._jsSetMouse=function(b){var c=function(a){return!a.target||0<=a.target.className.indexOf("swingjs-ui")};a.$bind(b,
"mousedown touchstart",function(d){if(c(d))return!0;a._setMouseOwner(b,!0);d.stopPropagation();var f=d.target["data-UI"];(!f||!f.handleJSEvent(b,501,d))&&d.preventDefault();b.isDragging=!0;if("touchstart"==d.type&&a._gestureUpdate(b,d))return!!f;a._setConsoleDiv(b.applet._console);var g=a._jsGetXY(b,d);g&&(2!=d.button&&a.Swing.hideMenus(b.applet),b.applet._processEvent(501,g));return!!f});a.$bind(b,"mouseup touchend",function(d){if(c(d))return!0;a._setMouseOwner(null);d.stopPropagation();var f=d.target["data-UI"];
(!f||!f.handleJSEvent(b,502,d))&&d.preventDefault();b.isDragging=!1;if("touchend"==d.type&&a._gestureUpdate(b,d))return!!f;(d=a._jsGetXY(b,d))&&b.applet._processEvent(502,d);return!!f});a.$bind(b,"mousemove touchmove",function(d){if(c(d))return!0;if(a._mouseOwner&&a._mouseOwner!=b&&a._mouseOwner.isDragging){if(!a._mouseOwner.mouseMove)return!0;a._mouseOwner.mouseMove(d);return!1}return a._drag(b,d)});a._drag=function(b,e){e.stopPropagation();e.preventDefault();if("touchmove"==e.type&&a._gestureUpdate(b,
e))return!1;var c=a._jsGetXY(b,e);if(!c)return!1;b.isDragging||(c[2]=0);var f=e.target["data-UI"];b.isdragging&&(!f||f.handleJSEvent(b,506,e));b.applet._processEvent(b.isDragging?506:503,c);return!!f};a.$bind(b,"DOMMouseScroll mousewheel",function(d){if(c(d))return!0;d.stopPropagation();d.preventDefault();b.isDragging=!1;var f=d.originalEvent,f=f.detail?f.detail:("mac"==a.featureDetection.os?1:-1)*f.wheelDelta;d=a._jsGetMouseModifiers(d);b.applet._processEvent(-1,[0>f?-1:1,0,d]);return!1});a.$bind(b,
"contextmenu",function(){return!1});a.$bind(b,"mouseout",function(d){if(c(d))return!0;a._mouseOwner&&!a._mouseOwner.mouseMove&&a._setMouseOwner(null);b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(b,d);return!1});a.$bind(b,"mouseenter",function(d){if(c(d))return!0;b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!0);if(0===d.buttons||0===d.which){b.isDragging=!1;d=a._jsGetXY(b,d);if(!d)return!1;b.applet._processEvent(504,d);b.applet._processEvent(502,d);
return!1}});a.$bind(b,"mousemoveoutjsmol",function(d,f,g){if(c(g))return!0;if(b==a._mouseOwner&&b.isDragging)return a._drag(b,g)});b.applet._is2D&&a.$resize(function(){b.applet&&b.applet._resize()});a.$bind("body","mouseup touchend",function(d){if(c(d))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)};
a.Swing={count:0,menuInitialized:0,menuCounter:0,htDialogs:{}};var l=a.Swing;SwingController=l;l.setDraggable=function(b){b=b.prototype;b.setContainer||(b.setContainer=function(b){this.container=b;b.obj=this;this.ignoreMouse=this.isDragging=!1;var d=this;b.bind("mousedown touchstart",function(b){if(d.ignoreMouse)return d.ignoreMouse=!1,!0;a._setMouseOwner(d,!0);d.isDragging=!0;d.pageX=b.pageX;d.pageY=b.pageY;return!1});b.bind("mousemove touchmove",function(b){if(d.isDragging&&a._mouseOwner==d)return d.mouseMove(b),
!1});b.bind("mouseup touchend",function(b){d.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+
"px",left:a._mousePageX+"px"})},b.mouseMove=function(b){if(this.isDragging&&a._mouseOwner==this){this.timestamp=System.currentTimeMillis();var d=this.pageX0+(b.pageX-this.pageX);b=this.pageY0+(b.pageY-this.pageY);a._mousePageX=d;a._mousePageY=b;this.container.css({top:b+"px",left:d+"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");
a._setMouseOwner(null);if(b){var d=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a,b,e){d.mouseMove(e)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,b,e){d.mouseUp(e)})}})};l.JSDialog=function(){};l.setDraggable(l.JSDialog);l.getScreenDimensions=function(a){a.width=h(window).width();a.height=h(window).height()};l.dispose=function(b){a.$remove(b.id+"_mover");delete l.htDialogs[b.id];b.container.obj.dragBind(!1)};l.register=function(a,b){a.id=b+ ++l.count;
l.htDialogs[a.id]=a};l.setDialog=function(b){a._setMouseOwner(null);a.$remove(b.id);var c=b.id+"_mover",d=a._$(c),f;d[0]?(d.html(b.html),f=d[0].jd):(a.$after("body","<div id='"+c+"' style='position:absolute;left:0px;top:0px;'>"+b.html+"</div>"),f=new l.JSDialog,d=a._$(c),b.container=d,f.applet=b.manager.vwr.html5Applet,f.setContainer(d),f.dialog=b,f.setPosition(),f.dragBind(!0),d[0].jd=f);a.$bind("#"+b.id+" .JButton","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JComboBox",
"mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JCheckBox","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JTextField","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JTable","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JScrollPane","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+b.id+" .JEditorPane","mousedown touchstart",function(){f.ignoreMouse=!0})};l.setSelected=function(b){a.$prop(b.id,
"checked",!!b.selected)};l.setSelectedIndex=function(b){a.$prop(b.id,"selectedIndex",b.selectedIndex)};l.setText=function(b){a.$prop(b.id,"value",b.text)};l.setVisible=function(b){a.$setVisible(b.id,b.visible)};l.setEnabled=function(b){a.$setEnabled(b.id,b.enabled)};l.click=function(b,c){var d=l.htDialogs[b.id];if(d){var f=d.toString();if(0<=f.indexOf("JCheck"))d.selected=b.checked;else if(0<=f.indexOf("JCombo"))d.selectedIndex=b.selectedIndex;else if(null!=d.text&&(d.text=b.value,c&&13!=(c.charCode||
c.keyCode)))return}f=l.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];f.manager.actionPerformed(d?d.name:f.registryKey+"/"+b.id)};l.setFront=function(b){var c=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(c,"dialog")&&(b.zIndex=a._incrZ(c,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};l.hideMenus=function(a){if(a=a._menus)for(var b in a)a[b].visible&&l.hideMenu(a[b])};l.windowClosing=function(b){b=l.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];b.registryKey?b.manager.processWindowClosing(b.registryKey):
b.dispose()};a._track=function(b){if(a._tracker){try{var c='<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",c)}catch(d){}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=
function(a,b){0<=b.indexOf("MOL=")&&b.split("MOL=")[1].split('"')};a._getAttr=function(a,b){var d=a.indexOf(b+"=");return 0<=d&&0<=(d=a.indexOf('"',d))?a.substring(d+1,a.indexOf('"',d+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.updateView=function(c,d){if(null!=c._viewSet){d.chemID||(c._searchQuery=null);d.data||(d.data="N/A");d.type=c._viewType;if(null==(c._currentView=b.__findView(c._viewSet,d)))c._currentView=b.__createViewSet(c._viewSet,d.chemID,
d.viewID||d.chemID);c._currentView[d.type].data=d.data;c._currentView[d.type].smiles=c._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(c,"updateView");b.__setView(c._currentView,c,!1)}};b.updateFromSync=function(c,d){c._updateMsg=d;var f=a._getAttr(d,"sourceID")||a._getAttr(d,"file");if(f){var g=b.__findView(c._viewSet,{viewID:f});if(null==g)return a.updateView(c,d);g!=c._currentView&&b.__setView(g,c,!0);var j=(f=a._getAttr(d,"atoms"))&&0<=d.indexOf("selectionhalos ON")?eval("["+
f+"]"):[];setTimeout(function(){c._currentView==g&&b.updateAtomPick(c,j)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(c,"updateFromSync")}};b.updateAtomPick=function(b,d){var c=b._currentView;if(null!=c){for(var e in c)"info"!=e&&c[e].applet!=b&&c[e].applet._updateAtomPick(d);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var d=b.sets[a];if(d){var c="View set "+a+":\n";a=b.applets[a];for(var f in a)c+="\napplet "+a[f]._id+" currentView="+
(a[f]._currentView?a[f]._currentView.info.viewID:null);for(f=d.length;0<=--f;){a=d[f];var c=c+("\n\n<b>view="+f+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"</b>\n"),g,j;for(j in a)"info"!=j&&(c+="\nview="+f+" type="+j+" applet="+((g=a[j]).applet?g.applet._id:null)+" SMILES="+g.smiles+"\n atomMap="+JSON.stringify(g.atomMap)+"\n data=\n"+g.data+"\n")}return c}};b.__init=function(a){var d=a._viewSet,c=b.applets;c[d]||(c[d]={});c[d][a._viewType]=a};b.__findView=function(a,d){var c=b.sets[a];null==
c&&(c=b.sets[a]=[]);for(var f=c.length;0<=--f;){var g=c[f];if(d.viewID){if(g.info.viewID==d.viewID)return g}else{if(null!=d.chemID&&d.chemID==g.info.chemID)return g;for(var j in g)if("info"!=j&&(null!=d.data&&null!=g[j].data?d.data==g[j].data:d.type==j))return g}}return null};b.__createViewSet=function(c,d,f){b.count++;d={info:{chemID:d,viewID:f||"model_"+b.count}};for(var g in a._applets)f=a._applets[g],f._viewSet==c&&(d[f._viewType]={applet:f,data:null});b.sets[c].push(d);return d};b.__setView=
function(a,b,c){for(var e in a)if("info"!=e){var f=a[e],g=f.applet,j=c||null!=g&&"<modified>"==g._molData;if(!(null==g||g==b&&!j)){var h=null==f.data,l=null!=g._currentView;g._currentView=a;if(!l||!(a[e].data==f.data&&!h&!j))if(g._loadModelFromView(a),h)break}}}})(a.View);a.Cache={fileCache:{}};a.Cache.get=function(b){return a.Cache.fileCache[b]};a.Cache.put=function(b,c){a.Cache.fileCache[b]=c};a.Cache.setDragDrop=function(b){a.$appEvent(b,"appletdiv","dragover",function(a){a=a.originalEvent;a.stopPropagation();
a.preventDefault();a.dataTransfer.dropEffect="copy"});a.$appEvent(b,"appletdiv","drop",function(c){var d=c.originalEvent;d.stopPropagation();d.preventDefault();var f=d.dataTransfer.files[0];if(null==f)try{f=""+d.dataTransfer.getData("text"),(0==f.indexOf("file:/")||0==f.indexOf("http:/"))&&b._scriptLoad(f)}catch(g){}else d=new FileReader,d.onloadend=function(d){if(d.target.readyState==FileReader.DONE){var g="cache://DROP_"+f.name;d=a._toBytes(d.target.result);g.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",
!1);"JSV"==b._viewType||g.endsWith(".jdx")?a.Cache.put(g,d):b._appletPanel.cachePut(g,d);(d=a._jsGetXY(b._canvas,c))&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,d[0],d[1],g))&&b._appletPanel.openFileAsyncSpecial(g,1)}},d.readAsArrayBuffer(f)})}})(Jmol,jQuery);Jmol._debugCode=!1;
(function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var h=!1,f=[],c=[],b=0,g=[],j=[],l=function(d){arguments.length||(d=!0);delete b;for(var e;0<c.length&&"done"==(e=c[0])[4];)c.shift();if(0!=c.length)if(!a._isAsync&&!d)setTimeout(l,10);else{e.push("done");var g="JSmol exec "+e[0]._id+" "+e[3]+" "+e[2];self.System&&System.out.println(g);self.console&&console.log(g+" -- OK");f.push(g);e[1](e[0],e[2])}},e=function(b){h?l():(h=!0,LoadClazz(),b._noMonitor&&(Clazz._LoaderProgressMonitor.showStatus=
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,l()},Clazz._Loader.loadPackageClasspath("java",null,!0,l))},k=function(a,b){Clazz._Loader.loadClass(b,function(){l()})};a.showExecLog=function(){return f.join("\n")};a._addExec=function(a){a[1]||(a[1]=k);var b="JSmol load "+a[0]._id+" "+a[3];self.console&&console.log(b+"...");f.push(b);
c.push(a)};a._addCoreFile=function(b,c,f){b=b.toLowerCase().split(".")[0];if(!(0<=g.join("").indexOf(b))){g.push(b);g.sort();a._coreFiles=[c+"/core/core"+g.join("")+".z.js"];if(f&&(f=f.split(" ")))for(b=0;b<f.length;b++)0>j.join("").indexOf(f[b])&&j.push(c+"/core/core"+f[b]+".z.js");for(b=0;b<j.length;b++)a._coreFiles.push(j[b])}};a._Canvas2D=function(b,c,f,e){this._uniqueId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._jmolType="Jmol._Canvas2D ("+f+")";this._isLayered=
c._isLayered||!1;this._isSwing=c._isSwing||!1;this._isJSV=c._isJSV||!1;this._isAstex=c._isAstex||!1;this._platform=c._platform||"";if(e)return this;window[b]=this;this._createCanvas(b,c);if(!a._document||this._deferApplet)return this;this._init();return this};a._setAppletParams=function(b,c,f,e){for(var g in f)if(!b||0<=b.indexOf(";"+g.toLowerCase()+";"))null==f[g]||"language"==g&&!a.featureDetection.supportsLocalization()||(e?c.put(g,!0===f[g]?Boolean.TRUE:!1===f[g]?Boolean.FALSE:f[g]):c[g]=f[g])};
a._jsSetPrototype=function(d){d._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};d._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+=
a._getGrabberOptions(this));a._debugAlert&&!a._document&&alert(d);this._code=a._documentWrite(d)};d._newCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};d._getHtml5Canvas=function(){return this._canvas};d._getWidth=function(){return this._canvas.width};d._getHeight=function(){return this._canvas.height};d._getContentLayer=function(){return a.$(this,"contentLayer")[0]};d._repaintNow=function(){a._repaint(this,!1)};d._createCanvas2d=function(){var b=a.$(this,"appletdiv");
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()),f=Math.round(b.height()),e=document.createElement("canvas");e.applet=this;this._canvas=e;e.style.width="100%";e.style.height="100%";e.width=d;e.height=f;e.id=this._id+"_canvas2d";b.append(e);
a._$(e.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var g=document.createElement("div");e.contentLayer=g;g.id=this._id+"_contentLayer";b.append(g);a._$(g.id).css({zIndex:a._getZ(this,"image"),position:"absolute",left:"0px",top:"0px",width:(this._isSwing?d:0)+"px",height:(this._isSwing?f: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",
left:"0px",top:"0px",width:d+"px",height:f+"px",overflow:"hidden"}),this._mouseInterface=e.contentLayer,e.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,d,f,!1)}else this._mouseInterface=e;a._jsSetMouse(this._mouseInterface)};d._getLayer=function(b,d,c,f,e){var g=document.createElement("canvas");this._canvas[b+"Layer"]=g;g.style.width="100%";g.style.height="100%";g.id=this._id+"_"+b+"Layer";g.width=c;g.height=f;d.append(g);g.applet=this;a._$(g.id).css({background:e?"rgb(0,0,0,1)":
"rgb(0,0,0,0.001)","z-index":a._getZ(this,b),position:"absolute",left:"0px",top:"0px",overflow:"hidden"});return g};d._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==c.length&&a._addExec([this,e,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=
[];b&&clearTimeout(b);b=setTimeout(l,100)};d.__startAppletJS=function(b){0==a._version.indexOf("$Date: ")&&(a._version=(a._version.substring(7)+" -").split(" -")[0]+" (JSmol/j2s)");var d=Clazz._4Name("java.util.Hashtable").newInstance();a._setAppletParams(b._availableParams,d,b.__Info,!0);d.put("appletReadyCallback","Jmol._readyCallback");d.put("applet",!0);d.put("name",b._id);d.put("syncId",a._syncId);a._isAsync&&d.put("async",!0);b._color&&d.put("bgcolor",b._color);b._startupScript&&d.put("script",
b._startupScript);a._syncedApplets.length&&d.put("synccallback","Jmol._mySyncCallback");d.put("signedApplet","true");d.put("platform",b._platform);b._is2D&&d.put("display",b._id+"_canvas2d");d.put("documentBase",document.location.href);var c=b._j2sPath+"/";if(0>c.indexOf("://")){var f=document.location.href.split("#")[0].split("?")[0].split("/");0==c.indexOf("/")?f=[f[0],c.substring(1)]:f[f.length-1]=c;c=f.join("/")}d.put("codePath",c);a._registerApplet(b._id,b);try{b._newApplet(d)}catch(e){System.out.println((a._isAsync?
"normal async abort from ":"")+e);return}b._jsSetScreenDimensions();l()};d._restoreState||(d._restoreState=function(){});d._jsSetScreenDimensions=function(){if(this._appletPanel){var b=a._getElement(this,this._is2D?"canvas2d":"canvas");this._appletPanel.setScreenDimension(b.width,b.height)}};d._show=function(b){a.$setVisible(a.$(this,"appletdiv"),b);b&&a._repaint(this,!0)};d._canScript=function(){return!0};d.equals=function(a){return this==a};d.clone=function(){return this};d.hashCode=function(){return parseInt(this._uniqueId)};
d._processGesture=function(a){return this._appletPanel.processTwoPointGesture(a)};d._processEvent=function(a,b){this._appletPanel.processMouseEvent(a,b[0],b[1],b[2],System.currentTimeMillis())};d._resize=function(){var b="__resizeTimeout_"+this._id;a[b]&&clearTimeout(a[b]);var d=this;a[b]=setTimeout(function(){a._repaint(d,!0);a[b]=null},100)};return d};a._repaint=function(b,c){if(b&&b._appletPanel){var f=a.$(b,"appletdiv"),e=Math.round(f.width()),f=Math.round(f.height());if(b._is2D&&(b._canvas.width!=
e||b._canvas.height!=f))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(e,f);e=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};c?setTimeout(e):e()}};a._loadImage=function(b,c,f,e,g,j){var h="echo_"+c+f+(e?"_"+e.length:""),l=a._getHiddenCanvas(b.vwr.html5Applet,h,0,0,!1,!0);if(null==l){if(null==j){j=new Image;if(null==e)return j.onload=function(){a._loadImage(b,c,f,null,g,j)},j.src=f,null;System.out.println("Jsmol.js Jmol._loadImage using data URI for "+
h);j.src="string"==typeof e?e:"data:"+JU.Rdr.guessMimeTypeForBytes(e)+";base64,"+JU.Base64.getBase64(e)}var k=j.width,w=j.height;"webgl"==c&&(k/=2,w/=2);l=a._getHiddenCanvas(b.vwr.html5Applet,h,k,w,!0,!1);l.imageWidth=k;l.imageHeight=w;l.id=h;l.image=j;a._setCanvasImage(l,k,w,j.width,j.height)}else System.out.println("Jsmol.js Jmol._loadImage reading cached image for "+h);return null==e?g(l,f):l};a._canvasCache={};a._getHiddenCanvas=function(b,c,f,e,g,j){c=b._id+"_"+c;b=a._canvasCache[c];if(j)return b;
if(g||!b||b.width!=f||b.height!=e)b=document.createElement("canvas"),b.width=b.style.width=f,b.height=b.style.height=e,b.id=c,a._canvasCache[c]=b;return b};a._setCanvasImage=function(a,b,c,f,e){a.buf32=null;a.width=b;a.height=c;a.getContext("2d").drawImage(a.image,0,0,f||b,e||c,0,0,b,c)};a._apply=function(a,b){return a(b)}})(Jmol);
(function(a,h){a._Applet=function(b,c,f){window[b]=this;this._jmolType="Jmol._Applet"+(c.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;";
if(f)return this;this._isSigned=c.isSigned;this._readyFunction=c.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=c.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(b,f){var j=!1;a._jarFile&&(f=a._jarFile);if(this._jarFile){var d=this._jarFile;0<=d.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+d+". 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."),
"yes"==prompt("Do you want to use applet "+d+"? ","yes or no")?(b=d.substring(0,d.lastIndexOf("/")),f=d.substring(d.lastIndexOf("/")+1)):j=!0):f=d;this_isSigned=c.isSigned=0<=f.indexOf("Signed")}this._jarPath=c.jarPath=b||".";this._jarFile=c.jarFile="string"==typeof f?f:(f?"JmolAppletSigned":"JmolApplet")+"0.jar";j&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(b,c);return this};
var f=a._Applet,c=a._Applet.prototype;f._get=function(b,c,j){j||(j=!1);c||(c={});a._addDefaultInfo(c,{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=c.debug;
c.serverURL&&(a._serverUrl=c.serverURL);for(var h=!1,e=null,k=c.use.toUpperCase().split("#")[0].split(" "),d=0;d<k.length;d++){switch(k[d]){case "JAVA":h=!0;a.featureDetection.supportsJava()&&(e=new f(b,c,j));break;case "WEBGL":e=f._getCanvas(b,c,j,!0);break;case "HTML5":a.featureDetection.allowHTML5?e=f._getCanvas(b,c,j,!1):k.push("JAVA");break;case "IMAGE":e=new a._Image(b,c,j)}if(null!=e)break}null==e&&(j||!h?e={_jmolType:"none"}:h&&(e=new f(b,c)));return j?e:a._registerApplet(b,e)};f._getCanvas=
function(b,c,j,h){c._isLayered=!1;c._platform="J.awtjs2d.Platform";return h&&a.featureDetection.supportsWebGL()?(a._Canvas3D.prototype=a.GLmol.extendApplet(a._jsSetPrototype(new f(b,c,!0))),new a._Canvas3D(b,c,"Jmol",j)):!h?(a._Canvas2D.prototype=a._jsSetPrototype(new f(b,c,!0)),new a._Canvas2D(b,c,"Jmol",j)):null};f._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>";
f._setCommonMethods=function(a){a._showInfo=c._showInfo;a._search=c._search;a._getName=c._getName;a._readyCallback=c._readyCallback};f._createApplet=function(b,c,j){b._initialize(c.jarPath,c.jarFile);var l=b._jarFile;a._isFile&&(l=l.replace(/0\.jar/,".jar"));var e=0<=b._containerWidth.indexOf("px")?b._containerWidth:"100%",k=0<=b._containerHeight.indexOf("px")?b._containerHeight:"100%",e=' style="width:'+e+";height:"+k+'" ',k="name='"+b._id+"_object' id='"+b._id+"_object' \n"+e+"\n";j.codebase=b._jarPath;
j.codePath=j.codebase+"/";if(0>j.codePath.indexOf("://")){var d=h.location.href.split("#")[0].split("?")[0].split("/");d[d.length-1]=j.codePath;j.codePath=d.join("/")}j.archive=l;j.mayscript="true";j.java_arguments="-Xmx"+Math.round(c.memoryLimit||b._memoryLimit)+"m";j.permissions=b._isSigned?"all-permissions":"sandbox";j.documentLocation=h.location.href;j.documentBase=h.location.href.split("#")[0].split("?")[0];j.jarPath=c.jarPath;a._syncedApplets.length&&(j.synccallback="Jmol._mySyncCallback");
b._startupScript&&(j.script=b._startupScript);var d="\n",q;for(q in j)j[q]&&(d+="  <param name='"+q+"' value='"+j[q]+"' />\n");d=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"<object "+k+(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'>")+d+"<p style='background-color:yellow;"+e.split('"')[1]+";text-align:center;vertical-align:middle;'>\n"+
f._noJavaMsg+"</p></object>\n":"<applet "+k+" code='"+j.code+"' codebase='"+b._jarPath+"' archive='"+l+"' mayscript='true'>\n"+d+"<table bgcolor='yellow'><tr><td align='center' valign='middle' "+e+">\n"+f._noJavaMsg+"</td></tr></table></applet>\n";b._deferApplet&&(b._javaCode=d,d="");d=a._getWrapper(b,!0)+d+a._getWrapper(b,!1)+(c.addSelectionOptions?a._getGrabberOptions(b):"");a._debugAlert&&alert(d);b._code=a._documentWrite(d)};c._newApplet=function(a){this._is2D||a.put("script",(a.get("script")||
"")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};c._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"])};c._create=function(b,c){a._setObject(this,b,c);var j={syncId:a._syncId,progressbar:"true",progresscolor:"blue",boxbgcolor:this._color||"black",boxfgcolor:"white",boxmessage:"Downloading JmolApplet ...",
script:this._color?'background "'+this._color+'"':"",code:"JmolApplet.class"};a._setAppletParams(this._availableParams,j,c);var h;c.inlineModel?(h=c.inlineModel,h=h.replace(/\r|\n|\r\n/g,0<=h.indexOf("|")?"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+h)):h="";j.loadInline=h;j.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&(j.synccallback="Jmol._mySyncCallback");j.java_arguments="-Xmx"+Math.round(c.memoryLimit||this._memoryLimit)+"m";this._initialize(c.jarPath,
c.jarFile);f._createApplet(this,c,j)};c._restoreState=function(b,c){System.out.println("\n\nasynchronous restore state for "+b+" "+c);var f=this,h=f._applet&&f._applet.viewer;switch(c){case "setOptions":return function(){f.__startAppletJS(f)};case "render":return function(){setTimeout(function(){h.refresh(2)},10)};default:switch(b){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(h&&h.isScriptExecuting&&h.isScriptExecuting()){if(a._asyncCallbacks[b])return System.out.println("...ignored"),
1;var e=h.getEvalContextAndHoldQueue(h.eval),k=e.pc-1;e.asyncID=b;a._asyncCallbacks[b]=function(a){e.pc=a;System.out.println("sc.asyncID="+e.asyncID+" sc.pc = "+e.pc);h.eval.resumeEval(e)};h.eval.pc=h.eval.pcEnd;System.out.println("setting resume for pc="+e.pc+" "+b+" to "+a._asyncCallbacks[b]+"//");return function(){System.out.println("resuming "+b+" "+a._asyncCallbacks[b]);a._asyncCallbacks[b](k)}}System.out.println(b+"?????????????????????"+c);return function(){setTimeout(function(){h.refresh(2)},
10)}}};c._readyCallback=function(b,c,f){f&&(a._setDestroy(this),this._ready=!0,b=this._readyScript,this._defaultModel?a._search(this,this._defaultModel,b?";"+b:""):b?this._script(b):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),(b=this._2dapplet)&&(b._isEmbedded&&b._ready&&b.__Info.visible)&&this._show2d(!0))};c._showInfo=function(b){b&&this._2dapplet&&this._2dapplet._show(!1);
a.$html(a.$(this,"infoheaderspan"),this._infoHeader);this._info&&a.$html(a.$(this,"infodiv"),this._info);if(!this._isInfoVisible!=!b){this._isInfoVisible=b;if(this._isJava){var c=b?2:"100%";a.$setSize(a.$(this,"appletdiv"),c,c)}a.$setVisible(a.$(this,"infotablediv"),b);a.$setVisible(a.$(this,"infoheaderdiv"),b);this._show(!b)}};c._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),this._2dapplet.__showContainer(!0,!0))};c._getAtomCorrelation=
function(a){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' 'H'); zap 2.1",!0);a=jmol._evaluate("atommap");for(var c=jmol._evaluate("{*}.count"),f=[],h=[],e=0;e<a.length;e++){var k=a[e];f[k[0]+1]=k[1]-c+1;h[k[1]-c+1]=k[0]+1}return{fromJmol:f,toJmol:h}};c._show=function(b){var c=!b?2:"100%";a.$setSize(a.$(this,"object"),c,c);this._isJava||a.$setVisible(a.$(this,"appletdiv"),b)};c._clearConsole=function(){this._console==this._id+"_infodiv"&&(this.info="");self.Clazz&&(a._setConsoleDiv(this._console),
Clazz.Console.clear())};c._addScript=function(a){this._readyScript||(this.readyScript="");this._readyScript&&(this._readyScript+=";");this._readyScript+=a;return!0};c._script=function(b){if(!this._ready)return this._addScript(b);a._setConsoleDiv(this._console);this._applet.script(b)};c._syncScript=function(a){this._applet.syncScript(a)};c._scriptCheck=function(a){return this._ready&&this._applet.scriptCheck(a)};c._scriptWait=function(a,c){var f=this._scriptWaitAsArray(a),h="";if(!c)for(var e=f.length;0<=
--e;)for(var k=0,d=f[e].length;k<d;k++)h+=f[e][k]+"\n";return h};c._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var c="",f=a.length;0<=--f;)for(var h=a[f].length;0<=--h;)"scriptEcho"==a[f][h][1]&&(c+=a[f][h][3]+"\n");return c.replace(/ \| /g,"\n")};c._scriptMessage=function(a){a=this._scriptWaitAsArray(a);for(var c="",f=a.length;0<=--f;)for(var h=a[f].length;0<=--h;)"scriptStatus"==a[f][h][1]&&(c+=a[f][h][3]+"\n");return c.replace(/ \| /g,"\n")};c._scriptWaitOutput=function(a){var c="";
try{a&&(c+=this._applet.scriptWaitOutput(a))}catch(f){}return c};c._scriptWaitAsArray=function(b){var c="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),b&&(c+=this._applet.scriptWait(b),c=a._evalJSON(c,"jmolStatus"),"object"==typeof c))return c}catch(f){}return[[c]]};c._getStatus=function(b){return a._sortMessages(this._getPropertyAsArray("jmolStatus",b))};c._getPropertyAsArray=function(b,c){return a._evalJSON(this._getPropertyAsJSON(b,c),b)};c._getPropertyAsString=
function(a,c){void 0==c&&(c="");return this._applet.getPropertyAsString(a,c)+""};c._getPropertyAsJSON=function(a,c){void 0==c&&(c="");try{return this._applet.getPropertyAsJSON(a,c)+""}catch(f){return""}};c._getPropertyAsJavaObject=function(a,c){void 0==c&&(c="");return this._applet.getProperty(a,c)};c._evaluate=function(a){null!=a||(a="");return this._getPropertyAsArray("variableInfo",a)};c._evaluateDEPRECATED=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var c=a.replace(/\-*\d+/,"");
if(""==c&&!isNaN(parseInt(a)))return parseInt(a);c=a.replace(/\-*\d*\.\d*/,"");return""==c&&!isNaN(parseFloat(a))?parseFloat(a):a};c._saveOrientation=function(a){return this._savedOrientations[a]=this._getPropertyAsArray("orientationInfo","info").moveTo};c._restoreOrientation=function(a){a=this._savedOrientations[a];return!a||""==a?a.replace(/1\.0/,"0"):this._scriptWait(a)};c._restoreOrientationDelayed=function(a,c){1>arguments.length&&(c=1);var f=this._savedOrientations[a];return!f||""==f?f.replace(/1\.0/,
c):this._scriptWait(f)};c._resizeApplet=function(b){function c(b,f){var g=""+b;return 0==g.length?f?"":a._allowedJmolSize[2]:g.indexOf("%")==g.length-1?g:1>=(b=parseFloat(b))&&0<b?100*b+"%":(isNaN(b=Math.floor(b))?a._allowedJmolSize[2]:b<a._allowedJmolSize[0]?a._allowedJmolSize[0]:b>a._allowedJmolSize[1]?a._allowedJmolSize[1]:b)+(f?f:"")}var f;"object"==typeof b&&null!=b?(f=b[0]||b.width,b=b[1]||b.height):f=b;f=[c(f,"px"),c(b,"px")];b=a._getElement(this,"appletinfotablediv");b.style.width=f[0];b.style.height=
f[1];this._containerWidth=f[0];this._containerHeight=f[1];this._is2D&&a._repaint(this,!0)};c._search=function(b,c){a._search(this,b,c)};c._searchDatabase=function(b,c,f){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(b,c,f);this._showInfo(!1);0<=b.indexOf("?")?a._getInfoFromDatabase(this,c,b.split("?")[0]):(f||(f=a._getScriptForDatabase(c)),b=c+b,this._currentView=null,this._searchQuery=b,this._loadFile(b,f,b))};c._loadFile=function(b,
c,f){this._showInfo(!1);c||(c="");this._thisJmolModel=""+Math.random();this._fileName=b;if(!this._scriptLoad(b,c)){var h=this;a._loadFileData(this,b,function(a){h.__loadModel(a,c,f)},function(){h.__loadModel(null)})}};c._scriptLoad=function(a,c){c||(c="");var f=this._isJava||!this._noscript;f&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;f?this._script('load async "'+a+'";'+c):this._applet.openFile(a);this._checkDeferred("");return!0};
c.__loadModel=function(b,c,f){null!=b&&(null!=this._viewSet&&(c||(c=""),c+=";if ({*}.molecule.max > 1 || {*}.modelindex.max > 0){ delete molecule > 1 or modelindex > 0;x = getProperty('extractModel',{*});load inline @x};"),!c&&this._noscript?this._applet.loadInlineString(b,"",!1):this._loadMolData(b,c,!1),null!=this._viewSet&&a.View.updateView(this,{chemID:f,data:b}))};c._loadMolData=function(a,c,f){c||(c="");f=f?"append":"model";this._applet.scriptWait('load DATA "'+f+'"'+a+'\nEND "'+f+'" ;'+c)};
c._loadModelFromView=function(b){this._currentView=b;var c=b.Jmol;null!=c.data?this.__loadModel(c.data,null,b.info.chemID):null!=b.info.chemID?a._searchMol(this,b.info.chemID,null,!1):(c=b.JME)&&c.applet._show2d(!1,this)};c._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",
"extractModel","{visible}")}))};c._atomPickedCallback=function(b,c){if(!(0>c)){var f=[c+1];a.View.updateAtomPick(this,f);this._updateAtomPick(f)}};c._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};c._isDeferred=function(){return!this._canvas&&this._cover&&this._isCovered&&this._deferApplet};c._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};c._cover=function(b){b||!this._deferApplet?this._displayCoverImage(b):
(b=this._coverScript?this._coverScript:"",this._coverScript="",this._deferUncover&&(b+=";refresh;javascript "+this._id+"._displayCoverImage(false)"),this._script(b,!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),
this._init&&this._init())};c._displayCoverImage=function(b){this._coverImage&&this._isCovered!=b&&(this._isCovered=b,a._getElement(this,"coverdiv").style.display=b?"block":"none")};c._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};c._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};c._getMol2D=function(){return jmol._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document);
(function(a){var h=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:""};
h._addScript=function(a,c){var b=h._scripts.length;h._scripts[b]=[a,c];return b};h._getIdForControl=function(a,c){return"string"==typeof a?a:!c||!a._canScript||a._canScript(c)?a._id:null};h._radio=function(a,c,b,g,j,l,e,k){var d=h._getIdForControl(a,c);if(null==d)return null;++h._radioCount;void 0!=l&&null!=l||(l="jmolRadioGroup"+(h._radioGroupCount-1));if(!c)return"";void 0!=e&&null!=e||(e="jmolRadio"+(h._radioCount-1));void 0!=b&&null!=b||(b=c.substring(0,32));j||(j="");a="</span>";h._actions[e]=
h._addScript(d,c);c='<span id="span_'+e+'"'+(k?' title="'+k+'"':"")+"><input name='"+l+"' id='"+e+"' type='radio' onclick='Jmol.controls._click(this);return true;' onmouseover='Jmol.controls._mouseOver(this);return true;' onmouseout='Jmol.controls._mouseOut()' "+(g?"checked='true' ":"")+h._radioCssText+" />";0<=b.toLowerCase().indexOf("<td>")&&(c+=a,a="");return c+('<label for="'+e+'">'+b+"</label>"+a+j)};h._scriptExecute=function(f,c){var b=a._applets[c[0]],g=c[1];if("object"==typeof g)g[0](f,g,
b);else"function"==typeof g?g(b):a.script(b,g)};h.__checkScript=function(a,c){var b=0<=c.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(c.value);c.style.color=b?"black":"red";return b};h.__getCmd=function(a,c){if(c._cmds&&c._cmds.length){var b=c._cmds[c._cmdpt=(c._cmdpt+c._cmds.length+a)%c._cmds.length];setTimeout(function(){c.value=b},10);c._cmdadd=1;c._cmddir=a}};h._commandKeyPress=function(f,c,b){f=13==f?13:window.event?window.event.keyCode:f?f.keyCode||f.which:0;var g=document.getElementById(c),
j=a._applets[b];switch(f){case 13:return c=g.value,h._scriptExecute(g,[b,c]),g._cmds||(g._cmds=[],g._cmddir=0,g._cmdpt=-1,g._cmdadd=0),c&&0==g._cmdadd?(++g._cmdpt,g._cmds.splice(g._cmdpt,0,c),g._cmdadd=0,g._cmddir=0):g._cmdadd=0,g.value="",!1;case 27:return setTimeout(function(){g.value=""},20),!1;case 38:h.__getCmd(-1,g);break;case 40:h.__getCmd(1,g);break;default:g._cmdadd=0}setTimeout(function(){h.__checkScript(j,g)},20);return!0};h._click=function(a,c){h._element=a;1==arguments.length&&(c=h._actions[a.id]);
h._scriptExecute(a,h._scripts[c])};h._menuSelected=function(a){var c=a.value;if(void 0!=c)h._scriptExecute(a,h._scripts[c]);else{c=a.length;if("number"==typeof c)for(var b=0;b<c;++b)if(a[b].selected){h._click(a[b],a[b].value);return}alert("?Que? menu selected bug #8734")}};h._cbNotifyMaster=function(a){var c=!0,b=!0,g;for(g in a.chkGroup)a.chkGroup[g].checked?b=!1:c=!1;c&&(a.chkMaster.checked=!0);b&&(a.chkMaster.checked=!1);(c||b)&&h._checkboxItems[a.chkMaster.id]&&h._cbNotifyMaster(h._checkboxItems[a.chkMaster.id])};
h._cbNotifyGroup=function(a,c){for(var b in a.chkGroup){var g=a.chkGroup[b];g.checked!=c&&(g.checked=c,h._cbClick(g));h._checkboxMasters[g.id]&&h._cbNotifyGroup(h._checkboxMasters[g.id],c)}};h._cbSetCheckboxGroup=function(a,c,b){var g=a;"number"==typeof g&&(g="jmolCheckbox"+g);(a=document.getElementById(g))||alert("jmolSetCheckboxGroup: master checkbox not found: "+g);var j=h._checkboxMasters[g]={};j.chkMaster=a;j.chkGroup={};"string"==typeof c?(c=b,g=1):g=0;for(a=g;a<c.length;a++)g=c[a],"number"==
typeof g&&(g="jmolCheckbox"+g),(checkboxItem=document.getElementById(g))||alert("jmolSetCheckboxGroup: group checkbox not found: "+g),j.chkGroup[g]=checkboxItem,h._checkboxItems[g]=j};h._cbClick=function(a){h._control=a;var c=h._actions[a.id][0],b=h._actions[a.id][1];h._click(a,a.checked?c:b);h._checkboxMasters[a.id]&&h._cbNotifyGroup(h._checkboxMasters[a.id],a.checked);h._checkboxItems[a.id]&&h._cbNotifyMaster(h._checkboxItems[a.id])};h._cbOver=function(a){var c=h._actions[a.id][0],b=h._actions[a.id][1];
window.status=h._scripts[a.checked?b:c]};h._mouseOver=function(a,c){1==arguments.length&&(c=h._actions[a.id]);window.status=h._scripts[c]};h._mouseOut=function(){window.status=" ";return!0};h._onloadResetForms=function(){h._hasResetForms||(h._hasResetForms=!0,h._previousOnloadHandler=window.onload,window.onload=function(){if(0<h._buttonCount+h._checkboxCount+h._menuCount+h._radioCount+h._radioGroupCount)for(var a=document.forms,c=a.length;0<=--c;)a[c].reset();h._previousOnloadHandler&&h._previousOnloadHandler()})};
h._getButton=function(f,c,b,g,j){f=h._getIdForControl(f,c);if(null==f)return"";void 0!=g&&null!=g||(g="jmolButton"+h._buttonCount);void 0!=b&&null!=b||(b=c.substring(0,32));++h._buttonCount;h._actions[g]=h._addScript(f,c);c='<span id="span_'+g+'"'+(j?' title="'+j+'"':"")+"><input type='button' name='"+g+"' id='"+g+"' value='"+b+"' onclick='Jmol.controls._click(this)' onmouseover='Jmol.controls._mouseOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+h._buttonCssText+" /></span>";a._debugAlert&&
alert(c);return a._documentWrite(c)};h._getCheckbox=function(f,c,b,g,j,l,e){var k=h._getIdForControl(f,c);null!=k&&(k=h._getIdForControl(f,b));if(null==k)return"";void 0!=l&&null!=l||(l="jmolCheckbox"+h._checkboxCount);++h._checkboxCount;if(void 0==c||null==c||void 0==b||null==b)alert("jmolCheckbox requires two scripts");else if(void 0==g||null==g)alert("jmolCheckbox requires a label");else return h._actions[l]=[h._addScript(k,c),h._addScript(k,b)],f="</span>",j='<span id="span_'+l+'"'+(e?' title="'+
e+'"':"")+"><input type='checkbox' name='"+l+"' id='"+l+"' onclick='Jmol.controls._cbClick(this)' onmouseover='Jmol.controls._cbOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+(j?"checked='true' ":"")+h._checkboxCssText+" />",0<=g.toLowerCase().indexOf("<td>")&&(j+=f,f=""),j+='<label for="'+l+'">'+g+"</label>"+f,a._debugAlert&&alert(j),a._documentWrite(j)};h._getCommandInput=function(f,c,b,g,j,l){f=h._getIdForControl(f,"x");if(null==f)return"";void 0!=g&&null!=g||(g="jmolCmd"+h._cmdCount);
void 0!=c&&null!=c||(c="Execute");void 0!=b&&!isNaN(b)||(b=60);void 0!=l||(l="help");++h._cmdCount;c='<span id="span_'+g+'"'+(j?' title="'+j+'"':"")+"><input name='"+g+"' id='"+g+"' size='"+b+"' onkeydown='return Jmol.controls._commandKeyPress(event,\""+g+'","'+f+"\")' value='"+l+"'/><input  type='button' name='"+g+"Btn' id='"+g+"Btn' value = '"+c+"' onclick='Jmol.controls._commandKeyPress(13,\""+g+'","'+f+"\")' /></span>";a._debugAlert&&alert(c);return a._documentWrite(c)};h._getLink=function(f,
c,b,g,j){f=h._getIdForControl(f,c);if(null==f)return"";void 0!=g&&null!=g||(g="jmolLink"+h._linkCount);void 0!=b&&null!=b||(b=c.substring(0,32));++h._linkCount;c=h._addScript(f,c);b='<span id="span_'+g+'"'+(j?' title="'+j+'"':"")+"><a name='"+g+"' id='"+g+"' href='javascript:Jmol.controls._click(null,"+c+");' onmouseover='Jmol.controls._mouseOver(null,"+c+");return true;' onmouseout='Jmol.controls._mouseOut()' "+h._linkCssText+">"+b+"</a></span>";a._debugAlert&&alert(b);return a._documentWrite(b)};
h._getMenu=function(f,c,b,g,j){var l=h._getIdForControl(f,null);void 0!=g&&null!=g||(g="jmolMenu"+h._menuCount);++h._menuCount;l=typeof c;if(null!=l&&"object"==l&&c.length){var e=c.length;"number"!=typeof b||1==b?b=null:0>b&&(b=e);b='<span id="span_'+g+'"'+(j?' title="'+j+'"':"")+"><select name='"+g+"' id='"+g+"' onChange='Jmol.controls._menuSelected(this)'"+(b?" size='"+b+"' ":"")+h._menuCssText+">";for(g=0;g<e;++g){var k=c[g],l=typeof k,d=null,q=j=null;"object"==l&&null!=k?(d=k[0],j=k[1],q=k[2]):
d=j=k;l=h._getIdForControl(f,d);if(null==l)return"";null==j&&(j=d);"#optgroup"==d?b+="<optgroup label='"+j+"'>":"#optgroupEnd"==d?b+="</optgroup>":(l=h._addScript(l,d),b+="<option value='"+l+(q?"' selected='true'>":"'>")+j+"</option>")}b+="</select></span>";a._debugAlert&&alert(b);return a._documentWrite(b)}};h._getRadio=function(f,c,b,g,j,l,e,k){0==h._radioGroupCount&&++h._radioGroupCount;l||(l="jmolRadioGroup"+(h._radioGroupCount-1));f=h._radio(f,c,b,g,j,l,e?e:l+"_"+h._radioCount,k?k:0);if(null==
f)return"";a._debugAlert&&alert(f);return a._documentWrite(f)};h._getRadioGroup=function(f,c,b,g,j,l){var e=typeof c;if("object"!=e||null==e||!c.length)alert("invalid arrayOfRadioButtons");else{void 0!=b&&null!=b||(b="&#xa0; ");var k=c.length;++h._radioGroupCount;g||(g="jmolRadioGroup"+(h._radioGroupCount-1));for(var d="<span id='"+(j?j:g)+"'>",q=0;q<k;++q){q==k-1&&(b="");var s=c[q],e=typeof s,N=null,d="object"==e?d+(N=h._radio(f,s[0],s[1],s[2],b,g,3<s.length?s[3]:(j?j:g)+"_"+q,4<s.length?s[4]:0,
l)):d+(N=h._radio(f,s,null,null,b,g,(j?j:g)+"_"+q,l));if(null==N)return""}d+="</span>";a._debugAlert&&alert(d);return a._documentWrite(d)}}})(Jmol);
(function(a){var h=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=h("_J2S");a._jarFile=h("_JAR");a._use=h("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(f,c,b){return a._Applet._get(f,c,b)};a.getJMEApplet=function(f,c,b,g){return a._JMEApplet._get(f,c,b,g)};a.getJSVApplet=function(f,c,b){return a._JSVApplet._get(f,c,b)};a.loadFile=function(a,c,b){a._loadFile(c,b)};a.script=function(a,c){a._checkDeferred(c)||
a._script(c)};a.scriptCheck=function(a,c){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(c)};a.scriptWait=function(a,c){return a._scriptWait(c)};a.scriptEcho=function(a,c){return a._scriptEcho(c)};a.scriptMessage=function(a,c){return a._scriptMessage(c)};a.scriptWaitOutput=function(a,c){return a._scriptWait(c)};a.scriptWaitAsArray=function(a,c){return a._scriptWaitAsArray(c)};a.search=function(a,c,b){a._search(c,b)};a.evaluateVar=function(a,c){return a._evaluate(c)};a.evaluate=function(a,c){return a._evaluateDEPRECATED(c)};
a.getAppletHtml=function(f,c){if(c){var b=a._document;a._document=null;f=a.getApplet(f,c);a._document=b}return f._code};a.getPropertyAsArray=function(a,c,b){return a._getPropertyAsArray(c,b)};a.getPropertyAsJavaObject=function(a,c,b){return a._getPropertyAsJavaObject(c,b)};a.getPropertyAsJSON=function(a,c,b){return a._getPropertyAsJSON(c,b)};a.getPropertyAsString=function(a,c,b){return a._getPropertyAsString(c,b)};a.getStatus=function(a,c){return a._getStatus(c)};a.resizeApplet=function(a,c){return a._resizeApplet(c)};
a.restoreOrientation=function(a,c){return a._restoreOrientation(c)};a.restoreOrientationDelayed=function(a,c,b){return a._restoreOrientationDelayed(c,b)};a.saveOrientation=function(a,c){return a._saveOrientation(c)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,c,b){a._info=c;2<arguments.length&&a._showInfo(b)};a.showInfo=function(a,c){a._showInfo(c)};a.show2d=function(a,c){a._show2d(c)};a.jmolBr=function(){return a._documentWrite("<br />")};
a.jmolButton=function(f,c,b,g,h){return a.controls._getButton(f,c,b,g,h)};a.jmolCheckbox=function(f,c,b,g,h,l,e){return a.controls._getCheckbox(f,c,b,g,h,l,e)};a.jmolCommandInput=function(f,c,b,g,h,l){return a.controls._getCommandInput(f,c,b,g,h,l)};a.jmolHtml=function(f){return a._documentWrite(f)};a.jmolLink=function(f,c,b,g,h){return a.controls._getLink(f,c,b,g,h)};a.jmolMenu=function(f,c,b,g,h){return a.controls._getMenu(f,c,b,g,h)};a.jmolRadio=function(f,c,b,g,h,l,e,k){return a.controls._getRadio(f,
c,b,g,h,l,e,k)};a.jmolRadioGroup=function(f,c,b,g,h,l){return a.controls._getRadioGroup(f,c,b,g,h,l)};a.setCheckboxGroup=function(f,c){a.controls._cbSetCheckboxGroup(f,c,arguments)};a.setDocument=function(f){a._document=f};a.setXHTML=function(f){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;f&&(a._XhtmlElement=document.getElementById(f),a._XhtmlAppendChild=!0)};a.setAppletCss=function(f,c){null!=f&&(a._appletCssClass=f);a._appletCssText=c?c+" ":f?'class="'+f+'" ':""};a.setButtonCss=function(f,
c){null!=f&&(a.controls._buttonCssClass=f);a.controls._buttonCssText=c?c+" ":f?'class="'+f+'" ':""};a.setCheckboxCss=function(f,c){null!=f&&(a.controls._checkboxCssClass=f);a.controls._checkboxCssText=c?c+" ":f?'class="'+f+'" ':""};a.setRadioCss=function(f,c){null!=f&&(a.controls._radioCssClass=f);a.controls._radioCssText=c?c+" ":f?'class="'+f+'" ':""};a.setLinkCss=function(f,c){null!=f&&(a.controls._linkCssClass=f);a.controls._linkCssText=c?c+" ":f?'class="'+f+'" ':""};a.setMenuCss=function(f,c){null!=
f&&(a.controls._menuCssClass=f);a.controls._menuCssText=c?c+" ":f?'class="'+f+'" ':""};a.setAppletSync=function(f,c,b){a._syncedApplets=f;a._syncedCommands=c;a._syncedReady={};a._isJmolJSVSync=b};a.setGrabberOptions=function(f){a._grabberOptions=f};a.setAppletHtml=function(f,c){f._code&&(a.$html(c,f._code),f._init&&!f._deferApplet&&f._init())};a.coverApplet=function(a,c){a._cover&&a._cover(c)};a.setFileCaching=function(f,c){f?f._cacheFiles=c:a.fileCache=c?{}:null};a.updateView=function(a,c,b){a._updateView(c,
b)};a.getChemicalInfo=function(f,c,b){c||(c="name");"string"!=typeof applet_or_Identifier&&(f=f._getSmiles());return a._getNCIInfo(f,c,b)};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);
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,h){var f=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){f.push(a);window[a]=b};a.getGlobals=function(){return f.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=a)};var c=window["j2s.doProfile"]&&self.JSON?{}:null;NullObject=function(){};
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 b=a._O.prototype;b.equals=function(a){return this==a};b.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};b.getClass=function(){return a.getClass(this)};b.clone=function(){return a.clone(this)};a.clone=function(a){var b=new a.constructor,
c;for(c in a)b[c]=a[c];return b};b.finalize=function(){};b.notify=function(){};b.notifyAll=function(){};b.wait=function(){};b.to$tring=Object.prototype.toString;b.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=
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__:
"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,f=d.indexOf("(",e);if(0>f)break;d=d.substring(e,f);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";
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 g=function(b,c){for(var d=0;d<a.innerFunctionNames.length;d++)if(c==
a.innerFunctionNames[d]&&a._innerFunctions[c]===b[c])return!0;return!1},j=function(){};a.inheritArgs=new j;a.inheritClass=function(b,c,d){for(var e in c)"b$"!=e&&("prototype"!=e&&"superClazz"!=e&&"__CLASS_NAME__"!=e&&"implementz"!=e&&!g(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=[]);
var c=a.implementz;if(2==arguments.length)if("function"==typeof b)c.push(b),l(a,b);else{if(b instanceof Array)for(var d=0;d<b.length;d++)c.push(b[d]),l(a,b[d])}else for(d=1;d<arguments.length;d++)c.push(arguments[d]),l(a,arguments[d])}};var l=function(a,b){for(var c in b)if("b$"!=c&&"prototype"!=c&&"superClazz"!=c&&"__CLASS_NAME__"!=c&&"implementz"!=c&&("function"!=typeof b[c]||!g(b,c)))a[c]=a.prototype[c]=b[c]};a.extendInterface=a.implementOf;a.equalsOrExtendsLevel=function(b,c){if(b===c)return 0;
if(b.implementz)for(var d=b.implementz,e=0;e<d.length;e++){var f=a.equalsOrExtendsLevel(d[e],c);if(0<=f)return f+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>
d;){if(e.implementz)for(var f=e.implementz,g=0;g<f.length;g++){var h=a.equalsOrExtendsLevel(f[g],c);if(0<=h)return d+h+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,e){var f=null,g=-1,h=b[d];if(h)if(h.claxxOwner)h.claxxOwner!==c&&(f=h);else if(!h.stacks&&(!h.lastClaxxRef||!h.lastClaxxRef.prototype[d]||!h.lastClaxxRef.prototype[d].stacks))f=
h;else{var j=h.stacks;j||(j=h.lastClaxxRef.prototype[d].stacks);for(g=j.length;0<=--g;)if(c===j[g]){0<g?(g--,f=j[g].prototype[d]):f=j[0].prototype[d]["\\unknown"];break}else if(0<a.getInheritedLevel(c,j[g])){f=j[g].prototype[d];break}}if(f)return 0==g&&"construct"==d&&(c=h.stacks)&&(!c[0].superClazz&&c[0].con$truct)&&c[0].con$truct.apply(b,[]),f.apply(b,e||[]);if("construct"!=d)throw a.alert(["j2slib","no class found",e.typeString]),new k(b,c,d,a.getParamsType(e).typeString);};a.superConstructor=
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 e=function(){this.toString=function(){return"J2S MethodException"}},k=function(){this.toString=function(){return"J2S MethodNotFoundException"}},
d;try{null.hello()}catch(q){if(b=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 b=q.message.indexOf(":"),s=q.message.indexOf(":",b+2),N=q.message.substr(b+1,s-b-20);d=function(a){return-1!=a.message.indexOf(N)}}else if(-1!=navigator.userAgent.toLowerCase().indexOf("webkit")){var P=b(q.message,"hello");d=function(a){return P.test(a.message)}}else P=b(q.message,"$$o$$"),
d=function(a){return P.test(a.message)}}a.exceptionOf=function(b,c){return b.__CLASS_NAME__?a.instanceOf(b,c):c==Error?(0<=(""+b).indexOf("Error")&&System.out.println(a.getStackTrace()),0<=(""+b).indexOf("Error")):c==Exception||c==Throwable||c==NullPointerException&&d(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 f=c.toString?c.toString().substring(0,c.toString().indexOf("{")):"<native method>",b=b+(e+" "+(c.exName?(c.claxxOwner?
c.claxxOwner.__CLASS_NAME__+".":"")+c.exName+f.replace(/function /,""):f)+"\n");if(c==c.caller){b+="<recursing>\n";break}if(d)for(var f=c.arguments,g=0;g<f.length;g++){var h=""+f[g];60<h.length&&(h=h.substring(0,60)+"...");b+=" args["+g+"]="+h.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=
b.con$truct.stacks.length)};a.defineMethod=function(b,d,f,g){a.assureInnerClass&&a.assureInnerClass(b,f);f.exName=d;g=r(g);var h=b.prototype,j=h[d];a._Loader._checkLoad&&T(b,d,g);if(!j||j.claxxOwner===b&&j.funParams==g)return f.funParams=g,f.claxxOwner=b,f.exClazz=b,h[d]=f;var l=null,m=j.stacks;m||(m=[],l=j,j.claxxOwner&&(m[0]=l.claxxOwner));if(!j.stacks||j.claxxReference!==b){var n=++pa,j=function(){var b;a:{var d=arguments.callee.claxxReference,f=arguments.callee.methodName;b=arguments;fx=this[f];
var Q=a.getParamsType(b);if(!fx)try{System.out.println(a.getStackTrace(5))}catch(xa){}if(c){var u=n+" "+d.__CLASS_NAME__+" "+f+" "+JSON.stringify(Q);0>w.indexOf(u)&&(w+=u+"\n");c[u]||(c[u]=0);c[u]++}if(fx.lastParams==Q.typeString&&fx.lastClaxxRef===d){if(Q.hasCastedNull){d=[];for(f=0;f<b.length;f++)d[f]=b[f]instanceof a.CastedNull?null:b[f]}else d=b;b=fx.lastMethod?fx.lastMethod.apply(this,d):null}else{fx.lastParams=Q.typeString;fx.lastClaxxRef=d;u=fx.stacks;u||(u=d.prototype[f].stacks);for(var g=
!1,h=u.length;0<=--h;)if(g||u[h]===d){var j=u[h].prototype[f],C=Q,g=b,wa=fx,l=[],H=!0,m=void 0;for(m in j)if(92==m.charCodeAt(0)){var z=m.substring(1).split("\\");z.length==C.length&&l.push(z);H=!1}else if(H&&"funParams"==m&&j.funParams){m=j.funParams;z=m.substring(1).split("\\");z.length==C.length&&(l[0]=z);break}m=void 0;if(!(m=0==l.length)){m=void 0;for(var m=[],V=l.length,z=0;z<V;z++){for(var q=[],s=!0,r=l[z].length,x=0;x<r;x++)if(q[x]=a.getInheritedLevel(C[x],l[z][x]),0>q[x]){s=!1;break}s&&(q[C.length]=
z,m.push(q))}if(0==m.length)m=null;else{V=m[0];for(z=1;z<m.length;z++){q=!0;for(x=0;x<C.length;x++)if(V[x]<m[z][x]){q=!1;break}q&&(V=m[z])}m=l[V[C.length]].join("\\")}m=!(l=m)}if(m)g=new e;else{j=H?j:j["\\"+l];H=null;if(C.hasCastedNull){H=[];for(C=0;C<g.length;C++)H[C]=g[C]instanceof a.CastedNull?null:g[C]}else H=g;wa.lastMethod=j;g=j.apply(this,H)}if(!(g instanceof e)){b=g;break a}g=!0}if("construct"==f)b=void 0;else throw new k(this,d,f,Q.typeString);}}return b};j.methodName=d;j.claxxReference=
b;j=h[d]=j;d=[];for(h=0;h<m.length;h++)d[h]=m[h];j.stacks=d}m=j.stacks;0>U(m,b)&&m.push(b);l&&(l.claxxOwner===b?(j[l.funParams]=l,l.claxxOwner=null,l.funParams=null):l.claxxOwner||(j["\\unknown"]=l));f.exClazz=b;j[g]=f;return j};duplicatedMethods={};var T=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]=
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 U=function(a,b){if(a&&b)for(var c=a.length;0<=--c;)if(a[c]===b)return c;return-1},G=function(a,b){var c=U(a,b);if(0<=c){for(var d=a.length-1;c<d;c++)a[c]=a[c+1];a.length--;return!0}},r=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";
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=r(e);a._Loader._checkLoad&&T(b,c,e);d.funParams=e;d.claxxOwner=b;return b.prototype[c]=d};var w="";a.getProfile=function(){var a="";if(c){var a=[],b;for(b in c){var d=""+c[b];a.push("        ".substring(d.length)+d+"\t"+b)}a=a.sort().reverse().join("\r\n");c={}}return a+w};a.getParamsType=
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 pa=0;a.allPackage={};a.allClasses={};a.lastPackageName=null;a.lastPackage=null;a.unloadedClasses=[];a.declarePackage=
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;
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 f=a.unloadedClasses[b];f&&(c=f);f=b.lastIndexOf(".");if(-1!=f){var g=b.substring(0,f),g=a.declarePackage(g),f=b.substring(f+1);if(g[f])return g[f];g[f]=c}else{if(window[b])return window[b];a.setGlobal(b,c)}a.decorateAsType(c,b,d,e);b=a._innerFunctions;c.defineMethod=
b.defineMethod;c.defineStaticMethod=b.defineStaticMethod;c.makeConstructor=b.makeConstructor;return c};var W=!1;-1!=navigator.userAgent.indexOf("Safari")&&(b=navigator.userAgent,s=b.indexOf("Version/"),-1!=s&&(b=b.substring(s+8),W=4<=parseFloat(b)));a.instantialize=function(a,b){if(!b||!(1==b.length&&b[0]&&b[0]instanceof j)){a instanceof Number&&(a.valueOf=function(){return this});if(W){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&&
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(" ");
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;
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]):
a._Loader&&(d=a._Loader.getClasspathFor(e,!0)),d){var d=d.replace(/\\/g,"/"),f=d.length,f=d.charAt(f-1);"/"!=f&&(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),f=d.lastIndexOf(e.replace(/\./g,"/")),-1!=f)d=d.substring(0,f);else if(f=-1,d.indexOf(".z.js")==d.length-5&&-1!=(f=d.lastIndexOf("/")))for(var d=d.substring(0,f+1),f=e.split(/\./),g=1;g<f.length;g++){for(var h="/",j=0;j<g;j++)h+=f[j]+"/";if(h.length>
d.length)break;if(d.indexOf(h)==d.length-h.length){d=d.substring(0,d.length-h.length+1);break}}else d=a._Loader.getClasspathFor(e,!0);else(f=a.binaryFolders)&&f.length&&(d=f[0]);d||(d="j2s/");d=d.replace(/\\/g,"/");f=d.length;f=d.charAt(f-1);"/"!=f&&(d+="/");this.base?c.url=d+b:(f=e.lastIndexOf("."),c.url=-1==f||this.base?d+b:d+e.substring(0,f).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);
this[b]=this.prototype[b]},makeConstructor:function(b,c){a.makeConstructor(this,b,c)}};var X=[];a.pu$h=function(a){a||(a=self.c$);a&&X.push(a)};a.p0p=function(){return X.pop()};a.decorateAsClass=function(b,c,d,e,f,g){var h=null;c&&(h=c.__PKG_NAME__,h||(h=c.__CLASS_NAME__));var j=(h?h+".":"")+d;a._Loader._classPending[j]&&(delete a._Loader._classPending[j],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+h+"."+d);(h=a.unloadedClasses[j])&&
(b=h);Y(b,c,d);g?a.inheritClass(b,e,g):e&&a.inheritClass(b,e);f&&a.implementOf(b,f);return b};var Y=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(){};Y(e,b,c);d&&a.implementOf(e,d);return e};
a.declareType=function(b,c,d,e,f){return a.decorateAsClass(function(){a.instantialize(this,arguments)},b,c,d,e,f)};a.declareAnonymous=function(b,c,d,e,f){return a.decorateAsClass(function(){a.prepareCallback(this,arguments);a.instantialize(this,arguments)},b,c,d,e,f)};a.decorateAsType=function(b,c,d,e,f,g){a.extendJO(b,c);b.equals=a._innerFunctions.equals;b.getName=a._innerFunctions.getName;if(g)for(c=0;c<a.innerFunctionNames.length;c++)g=a.innerFunctionNames[c],b[g]=a._innerFunctions[g];f?a.inheritClass(b,
d,f):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,"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,"Comparator");java.lang.ClassLoader=
{__CLASS_NAME__:"ClassLoader"};k=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),f={};if(b.b$)for(var g in b.b$)f[g]=b.b$[g];b.b$=f;f[e]=d;for(e=a.getClass(d);e.superClazz;)e=e.superClazz,f[a.getClassName(e,!0)]=
d;if(d=d.b$)for(g in d)f[g]=d[g]}for(f=0;f<c.length-1;f++)c[f]=c[f+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 f={},g;for(g in c.f$)f[g]=c.f$[g];for(g in d)f[g]=d[g];e.f$=f}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]);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,a.inheritArgs)}g=arguments.length-
3;for(f=Array(g);0<=--g;)f[g]=arguments[g+3];a.instantialize(e,f);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=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;b=function(a){return function(){for(var b=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=b(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=b(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=b(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=b(64),Float64Array.prototype.float64Fake=function(){},Float64Array.prototype.toString=
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,f=b[e];switch(b.length){case 0:case 1:return[];case 2:if(null==f)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?f:Array(d),g=d;0<=--g;)b[g]=f;return b;
default:for(var h=Array(e),g=0;g<e;g++)h[g]=b[g+1];b=Array(d);if(null==f||0<=f||2<e)for(g=0;g<d;g++)b[g]=a.newArray(h,c);return b}};a.newArray32=function(b,c){var d=b[0];"string"==typeof d&&(d=d.charCodeAt(0));var e=b.length-1,f=b[e];switch(b.length){case 0:case 1:return alert("ERROR IN newArray32 -- args.length < 2"),[];case 2:if(e=0>d)d=f.length;var g=0>f?Array(d):c?new Int32Array(d):new Float64Array(d);if(e)for(e=d;0<=--e;)g[e]=f[e];return g}for(f=Array(e);0<=--e;)f[e]=b[e+1];g=Array(d);for(e=
0;e<d;e++)g[e]=a.newArray(f,c);return g};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 K=function(a,b){return a.constructor&&a.constructor!=Number&&0<=a.constructor.toString().indexOf(b)};a.isAS=function(a){return a&&"object"==typeof a&&K(a," Array")&&
("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?K(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?K(b,"Float64Array"):b.float64Fake?!0:!1)};a.isAFF=function(b){return b&&"object"==typeof b&&a.isAF(b[0])};
a.isAFFF=function(b){return b&&"object"==typeof b&&a.isAFF(b[0])};a.isAFloat=function(b){return b&&"object"==typeof b&&K(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,
[])};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 f=0;f<e;f++)c[d+f]=a[b+f];else{for(var g=[],f=0;f<e;f++)g[f]=a[b+f];for(f=0;f<e;f++)c[d+f]=g[f]}},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,
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=
++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=
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,
[],[],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));
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=
function(){return java.lang.reflect.Modifier.PUBLIC};a._innerFunctions.newInstance=function(){return new this};b=a.innerFunctionNames;for(s=0;s<b.length;s++)a._O[b[s]]=a._innerFunctions[b[s]],Array[b[s]]=a._innerFunctions[b[s]];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,f=0;f<d.length-1;f++)e=e?e[d[f]]:a.allPackage[d[0]];if(e)for(g in e[d[d.length-1]]=null,e)0==g.indexOf(d[d.length-1]+"$")&&
(a.unloadClass(e.__PKG_NAME__+"."+g),e[g]=null);else{a.allPackage[d[0]]=null;window[d[0]]=null;for(var g in window)0==g.indexOf(b+"$")&&(a.unloadClass(g),window[g]=null)}if(a.allClasses[b])for(g in a.allClasses[b]=!1,a.allClasses)0==g.indexOf(b+"$")&&(a.allClasses[g]=!1);for(var h in c)Z(c[h]);for(h in c.prototype)Z(c.prototype[h]);a._Loader&&a._Loader.unloadClassExt(b);return!0}return!1};var Z=function(a){a&&("function"==typeof a&&a.lastMethod&&a.lastParams&&a.lastClaxxRef)&&(a.lastMethod=null,a.lastParams=
null,a.lastClaxxRef=null)}}a._Loader=a.ClazzLoader=function(){};var m=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=h._checkLoad;b.updateNodeForFunctionDecoration=function(a){(a=D(a))&&a.status==m.STATUS_KNOWN&&window.setTimeout(function(a){return function(){updateNode(a)}}(a),1)};m.prototype.toString=function(){return this.name||this.path||"ClazzNode"};m.STATUS_UNKNOWN=
0;m.STATUS_KNOWN=1;m.STATUS_CONTENT_LOADED=2;m.STATUS_MUSTS_LOADED=3;m.STATUS_DECLARED=4;m.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 m,e={},f=0,g=6,j=navigator.userAgent.toLowerCase(),k=-1!=j.indexOf("opera"),l=-1!=j.indexOf("msie")&&!k,n=-1!=j.indexOf("gecko");if(k&&(g=1,k=j.indexOf("opera/"),-1!=k)){var q=9;try{q=parseFloat(j.subString(k+6))}catch(s){}9.6<=q&&(g=6)}var r;
self.Clazz&&a.isClassDefined?isClassDefined=a.isClassDefined:(r={},isClassDefined=function(a){return!0==r[a]});var w=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},A=[],v={},y=0;b.loadPackageClasspath=function(a,c,d,e,f,g){f||(f=0);e||(e=null);g||(g=0);var h=d&&v["@"+
a];if(0==f&&(d&&!v["@java"]&&0!=a.indexOf("java")&&E("java"))&&(b.loadPackage("java",e?function(){b.loadPackageClasspath(a,c,d,e,1)}:null),e))return;if(a instanceof Array)if(w(a),e)g<a.length?b.loadPackageClasspath(a[g],c,d,function(){b.loadPackageClasspath(a,c,d,e,1,g+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&&(f="@net.sf.j2s.ajax",v[f]||(v[f]=c),f="@net.sf.j2s",v[f]||(v[f]=c));break;case "swt":a="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&&(v["@"+a]=c);d&&!h&&!window[a+".registered"]?(y++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){0==--y&&qa()},!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,f,g,h,j){j||(j=0);null==h&&(h=!1);if("boolean"==typeof f)return a.evalType(c);
System.out.println("loadClass "+c);E("java")&&b.loadPackage("java");E("core")&&b.loadPackage("core");b.keepOnLoading=!0;if(!g&&(y&&c.lastIndexOf(".package")!=c.length-8||0!=c.indexOf("java.")&&!isClassDefined($)))ja.push([c,f]),System.out.println("loadclass-queuing"+c+$+" "+isClassDefined($));else if((j=isClassDefined(c))||F["@"+c]){if(j&&f&&(g=D(c),!g||g.status>=m.STATUS_LOAD_COMPLETE))h?window.setTimeout(f,25):f()}else{var k=b.getClasspathFor(c);j=e[k];if(!j)for(h=A.length;0<=--h;)if(A[h].path==
k||A[h].name==c){j=!0;break}if(j){if(f&&(j=D(c)))if(j.onLoaded){if(f!=j.onLoaded){var l=j.onLoaded,u=f;j.onLoaded=function(){l();u()}}}else j.onLoaded=f}else{j=a.unloadedClasses[c]&&D(c)||new m;j.name=c;j.path=k;j.isPackage=k.lastIndexOf("package.js")==k.length-10;ea(k,c,j);j.onLoaded=f;j.status=m.STATUS_KNOWN;c=!1;for(h=A.length;0<=--h;)if(A[h].status!=m.STATUS_LOAD_COMPLETE){c=!0;break}if(j.isPackage){for(h=A.length;0<=--h&&!A[h].isPackage;)A[h+1]=A[h];A[++h]=j}else c&&A.push(j);if(!c){var n=!1;
f&&(n=I,I=!0);g&&(f=null);aa(d,j,!0);K(j,j.path,j.requiredBy,!1,f?function(){I=n;f()}:null)}}}};var E=function(a){return null!=window[a+".registered"]&&!v["@"+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]);w(b);for(var c=b.length;0<=--c;)v["#"+b[c]]=a;v["$"+a]=b};b.registerPackages=function(c,d){for(var e=b.getClasspathFor(c+
".*",!0),f=0;f<d.length;f++)window.Clazz&&a.declarePackage(c+"."+d[f]),b.loadPackageClasspath(c+"."+d[f],e)};b.getClasspathFor=function(c,d,e){var f=v["#"+c];if(!f||d||e){var g,h;if(f){if(c=c.replace(/\./g,"/"),0<=(h=f.lastIndexOf(c))||0<=(h=c.lastIndexOf("/"))&&0<=(h=f.lastIndexOf(c.substring(0,h))))g=f.substring(0,h)}else{for(h=c.length+2;0<=(h=c.lastIndexOf(".",h-2))&&!(g=v["@"+c.substring(0,h)]););d||(c=c.replace(/\./g,"/"))}null==g&&(g=window.Clazz&&a.binaryFolders&&a.binaryFolders.length?a.binaryFolders[0]:
b.binaryFolders&&b.binaryFolders.length?b.binaryFolders[0]:"j2s");f=(g.lastIndexOf("/")==g.length-1?g:g+"/")+(d?"":c.lastIndexOf("/*")==c.length-2?c.substring(0,h+1):c+(!e?".js":"."!=e.charAt(0)?"."+e:e))}return f};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];w(a);for(c=0;c<b;c++)F["@"+a[c]]=1};b.onScriptLoading=function(){};b.onScriptLoaded=function(){};b.onScriptInitialized=
function(){};b.onScriptCompleted=function(){};b.onClassUnloaded=function(){};b.onGlobalLoaded=function(){};b.keepOnLoading=!0;var B={},F={},M=function(c,d){try{eval(d)}catch(e){if(a._isQuiet)return;var f="[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(f);a.alert(f);throw e;}b.onScriptLoaded(c,!1);x(c)},N=function(a){return function(){if("interactive"!=
a.readyState){try{a.parentNode&&a.parentNode.removeChild(a)}catch(b){}a=null}}},L=function(a){window["j2s.script.debugging"]||window.setTimeout(N(a),1)};a._4Name=function(c,d,e){if(a.isClassDefined(c))return a.evalType(c);d=h._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 K=function(c,d,g,j,k){a.currentPath=d;j&&alert("WHY>>");e[d]=!0;G(A,d);fa=
!0;ga=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+"  ajax="+fa+" async="+ga);b.onScriptLoading(d);if(fa&&!ga){g=h._getFileData(d);try{M(d,g)}catch(l){alert(l+" loading file "+d+" "+c.name+" "+a.getStackTrace())}k&&k()}else System.out.println("for file "+d+" fSuccess = "+(k?k.toString():"")),c={dataType:"script",async:!0,type:"GET",url:d,success:O(d,!1,k),error:O(d,!0,k)},f++,h.$ajax(c)},O=function(c,d,e){a.getStackTrace();return function(){n&&this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),
this.timeoutHandle=null);0<f&&f--;this.onerror=this.onload=null;d&&alert("There was a problem loading "+c);b.onScriptLoaded(c,!0);var a=this,g;g=e?function(){L(a);x(c,e)}:function(){L(a);x(c)};0<=ka?window.setTimeout(function(){x(c,g)},ka):x(c,g)}},I=!0,P=!1,x=function(c,h){var j=B["@"+c];if(j){var k,t=v["$"+c];if(t)for(var p=0;p<t.length;p++){var u=t[p];if(u!=j.name&&(k=D(u)))k.status<m.STATUS_CONTENT_LOADED&&(k.status=m.STATUS_CONTENT_LOADED,updateNode(k));else{k=new m;k.name=u;var n=v["#"+u];n||
(alert(u+" J2S error in tryToLoadNext"),error("Java2Script implementation error! Please report this bug!"));k.path=n;ea(k.path,u,k);k.status=m.STATUS_CONTENT_LOADED;aa(d,k,!1);updateNode(k)}}if(j instanceof Array)for(p=0;p<j.length;p++)j[p].status<m.STATUS_CONTENT_LOADED&&(j[p].status=m.STATUS_CONTENT_LOADED,updateNode(j[p]));else if(j.status<m.STATUS_CONTENT_LOADED){k=!1;t=document.getElementsByTagName("SCRIPT");for(p=0;p<t.length;p++)if(l){if(t[p].onreadystatechange&&t[p].onreadystatechange.path==
j.path&&"interactive"==t[p].readyState){k=!0;break}}else if(t[p].onload&&t[p].onload.path==j.path){k=!0;break}k||(j.status=m.STATUS_CONTENT_LOADED,updateNode(j))}if(b.keepOnLoading){p=!0;if(k=la(m.STATUS_KNOWN))for(ha(k);f<g&&(k=la(m.STATUS_KNOWN));)ha(k);else if(0!=A.length)k=A.shift(),!e[k.path]||0!=A.length||!I||k.musts.length||k.optionals.length?(aa(d,k,!0),K(k,k.path,k.requiredBy,!1)):I&&(I=!1);else if(k=ma(m.STATUS_KNOWN))for(ha(k);f<g&&(k=ma(m.STATUS_KNOWN));)ha(k);else p=!1;if(!(p||0<f)){j=
[la,ma];t=null;for(p=0;2>p;p++)for(;k=j[p](m.STATUS_CONTENT_LOADED);)1==p&&t===k&&(k.status=m.STATUS_LOAD_COMPLETE),updateNode(k),t=k;for(;!(S=[],!T(d,c)););for(p=0;2>p;p++)for(t=null;(k=j[p](m.STATUS_DECLARED))&&t!==k;)updateNode(t=k);t=[];for(p=0;2>p;p++)for(;k=j[p](m.STATUS_DECLARED);)t.push(k),k.status=m.STATUS_LOAD_COMPLETE;if(t.length){for(p=0;p<t.length;p++)R(t[p]);for(p=0;p<t.length;p++)if(j=t[p].onLoaded)t[p].onLoaded=null,j()}if(h)h();else if(b._classCountPending)for(u in b._classPending){if(k=
D(u),System.out.println("class left pending "+u+" "+k),k){updateNode(k);break}}else b._checkLoad&&(System.out.println("I think I'm done: SAEM call count: "+pa),a.showDuplicates(!0));b.onGlobalLoaded()}}}},S=[],T=function(a,c){var d=S,e=d.length;d.push(a);for(var f=e;0<=--f&&!(d[f]===a&&d[f].status>=m.STATUS_DECLARED););if(0<=f){if(b._checkLoad){var g;System.out.println("cycle found loading "+c+" for "+a)}for(;f<e;f++){var h=d[f];h.status=m.STATUS_LOAD_COMPLETE;R(h);for(g=0;g<h.parents.length;g++)updateNode(h.parents[g]);
h.parents=[];var j=h.onLoaded;b._checkLoad&&(g="cycle setting status to LOAD_COMPLETE for "+h.name+(j?" firing "+j.toString():""),System.out.println(g));j&&(h.onLoaded=null,j())}d.length=0;return!0}h=[a.musts,a.optionals];for(g=0;2>g;g++){j=h[g];for(f=j.length;0<=--f;)if(j[f].status==m.STATUS_DECLARED&&T(j[f],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=D(c);d?(a.push(d),System.out.println(U("",
"",d,"",0))):alert("No node for "+c)}return a};var U=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 f=0;f<c.parents.length;f++)a=U(a,b,c.parents[f],d+"\t",e+1);a+="\n"}return a};updateNode=function(a){if(!a.name||a.status>=m.STATUS_LOAD_COMPLETE)R(a);else{var c=!0;if(a.musts.length&&a.declaration)for(var d=a.musts.length,e=
d;0<=--e;){var f=a.musts[e];f.requiredBy=a;if(f.status<m.STATUS_DECLARED&&isClassDefined(f.name)){var g=[];f.status=m.STATUS_LOAD_COMPLETE;R(f);if(f.declaration&&f.declaration.clazzList){for(var h=0,j=f.declaration.clazzList,k=j.length;h<k;h++){var l=D(j[h]);l&&(l.status!=m.STATUS_LOAD_COMPLETE&&l!==f)&&(l.status=f.status,l.declaration=null,R(l),l.onLoaded&&g.push(l))}f.declaration=null}f.onLoaded&&g.push(f);for(h=0;h<g.length;h++)if(j=g[h].onLoaded)g[h].onLoaded=null,j()}else f.status==m.STATUS_CONTENT_LOADED&&
updateNode(f),f.status<m.STATUS_DECLARED&&(c=!1);a.musts.length!=d&&(e=d=a.musts.length,c=!0)}if(c){if(a.status<m.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=m.STATUS_DECLARED;r&&(r[a.name]=!0);b.onScriptInitialized(a.path);if(a.declaration&&a.declaration.clazzList){h=0;j=a.declaration.clazzList;for(k=j.length;h<k;h++)if((l=D(j[h]))&&l.status!=m.STATUS_DECLARED&&l!==a)l.status=
m.STATUS_DECLARED,r&&(r[l.name]=!0),b.onScriptInitialized(l.path)}}c=m.STATUS_DECLARED;if(0==a.optionals.length&&0==a.musts.length||a.status>m.STATUS_KNOWN&&!a.declaration||W(a.musts,m.STATUS_LOAD_COMPLETE)&&W(a.optionals,m.STATUS_LOAD_COMPLETE)){c=m.STATUS_LOAD_COMPLETE;if(!X(a,c))return!1;if(a.declaration&&a.declaration.clazzList){h=0;j=a.declaration.clazzList;for(k=j.length;h<k;h++)if((l=D(j[h]))&&l.status!=c&&l!==a)if(l.declaration=null,!X(l,c))return!1}}if(a.parents&&a.parents.length){for(e=
0;e<a.parents.length;e++)h=a.parents[e],h.status<c&&updateNode(h,h.name);c==m.STATUS_LOAD_COMPLETE&&(a.parents=[])}}}};var W=function(a,b){for(var c=a.length;0<=--c;)if(a[c].status<b)return!1;return!0},X=function(a,c){a.status=c;b.onScriptCompleted(a.path);var d=a.onLoaded;if(d&&(a.onLoaded=null,d(),!b.keepOnLoading))return!1;R(a);return!0},Y={"r0.13412":1},Z=function(){for(;;){var a=Math.random(),b="r"+a;if(!Y[b])return Y[b]=1,d.random=a}},D=function(a){Z();return ba(a,d)},ma=function(a){Z();return ra(d,
a)},la=function(a){return da(d,a)},ba=function(a,b){var c;return b.name==a?b:(c=ca(a,b.musts))||(c=ca(a,b.optionals))?c:null},ca=function(a,b){for(var c=d.random,e=b.length;0<=--e;){var f=b[e];if(f.name==a||f.random!=c&&(f.random=c,f=ba(a,f)))return f}return null},ia=function(a,b){return a.status==b&&(b!=m.STATUS_KNOWN||!e[a.path])&&(b==m.STATUS_DECLARED||!isClassDefined(a.name))},da=function(a,b){for(var c=a.musts.length;0<=--c;){var d=a.musts[c];if(ia(d,b)||(d=da(d,b)))return d}return ia(a,b)?a:
null},ra=function(a,b){var c;return(c=sa(a.musts,b))||(c=sa(a.optionals,b))||ia(c=a,b)?c:null},sa=function(a,b){if(a)for(var c=d.random,e=0;e<a.length;e++){var f=a[e];if(ia(f,b)||f.random!=c&&(f.random=c,f=ra(f,b)))return f}return null},ta={},na=function(a,c,e,f){if(c instanceof Array){w(c);for(var g=0;g<c.length;g++)na(a,c[g],e,f,c)}else{b._checkLoad&&!b._classPending[c]&&(b._classPending[c]=1,0==b._classCountPending++&&(b._classCountOK=0),System.out.println("Loading class "+c));g=B["#"+c];g||(g=
(g=D(c))?g:new m,g.name=c,g.path=v["#"+c]||"unknown",ea(g.path,c,g),g.status=m.STATUS_KNOWN,aa(d,g,!1));ua(g,a,!0);5==arguments.length&&f&&(f.status=g.status,f.clazzList=arguments[4]);if(g.declaration=f)g.status=m.STATUS_CONTENT_LOADED;ua(g,e,!1)}},ua=function(a,b,c){if(b&&b.length){w(b);for(var d=0;d<b.length;d++){var e=b[d];if(e&&!isClassDefined(e)&&!F["@"+e]){var f=D(e);f||(f=new m,f.name=e,f.status=m.STATUS_KNOWN);f.requiredBy=a;aa(a,f,c)}}}};window.Clazz?a.load=na:b.load=na;var ea=function(a,
b,c){var d="@"+a;if(a=B[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 B[d]=[a,c];else B[d]=c;B["#"+b]=c},ha=function(a){var c=a.name;if(!isClassDefined(c)&&!F["@"+c]){var d=b.getClasspathFor(c);a.path=d;ea(d,c,a);if(!e[d])return K(a,d,a.requiredBy,!1),!0}return!1},$=b.runtimeKeyClass="java.lang.String",ja=[];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")+"/"):
null};var ga=!0,fa=!1,ka=-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);fa=e;ka=(ga=d)&&0<=c?c:-1;return d};var qa=function(){if(!y&&isClassDefined($)){for(var a=ja,c=0;c<a.length;c++)b.loadClass(a[c][0],a[c][1]);ja=[]}};b.loadZJar=function(a,c){var d=null,e=c instanceof Array;e?c=c[c.length-1]:d=c==$?qa:null;b.jarClasspath(a,
e?c:[c]);b.loadClass(c,d,!0)};var va={},oa=[],aa=function(a,b,c){var e=!1;c?(c=a.musts,b.requiredBy||(b.requiredBy=a)):c=a.optionals;va[b.name]||(oa.push(b),va[b.name]=b);for(var f=0;f<c.length;f++)if(c[f].name==b.name){e=!0;break}e||(c.push(b),I&&(0!=b.name.indexOf("java")&&0!=b.name.indexOf("net.sf.j2s.ajax"))&&(P&&(I=!1),P=!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)}},R=function(a){var b=a.parents;if(b)for(var c=b.length;0<=
--c;)G(b[c].musts,a)||G(b[c].optionals,a)};b.unloadClassExt=function(a){r&&(r[a]=!1);if(v["#"+a]){var c=v["#"+a];v["#"+a]=null;var d=v["$"+c];G(d,a)&&(v["$"+c]=d)}if(c=D(a))c.status=m.STATUS_KNOWN,e[c.path]=!1;c=b.getClasspathFor(a);e[c]=!1;ta[c]&&(ta[c]=!1);b.onClassUnloaded(a)};a.binaryFolders=b.binaryFolders=[b.getJ2SLibBase()]})(a,a._Loader);a._LoaderProgressMonitor={};var B=a._LoaderProgressMonitor,L=null,M=0,y=null,S=0;B.DEFAULT_OPACITY=h&&h._j2sLoadMonitorOpacity?h._j2sLoadMonitorOpacity:55;
B.hideMonitor=function(){y.style.display="none"};B.showStatus=function(a,b){if(!y){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=oa;y=c;document.body.appendChild(c);ba||(ba=!0)}ca(y);if(null==a)b?O():B.hideMonitor();else{y.appendChild(document.createTextNode(""+
a));"none"==y.style.display&&(y.style.display="");da(B.DEFAULT_OPACITY);var d,c=navigator.userAgent;d=document.body;var e=d.parentNode,f=e.clientHeight;d=d.scrollTop+d.offsetTop;var g=e.scrollTop+e.offsetTop,c=0>c.indexOf("Opera")&&document.all?0==f?d:g:0>c.indexOf("Gecko")?f==e.offsetHeight&&f==e.scrollHeight?d:g:d;S!=c&&(S=c,y.style.bottom=S+4+"px");b&&O()}};var ca=function(a){if(a)for(var b=a.childNodes.length;0<=--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&ca(c);try{a.removeChild(c)}catch(d){}}}},
da=function(a){L&&a==B.DEFAULT_OPACITY&&(window.clearTimeout(L),L=null);M=a;navigator.userAgent.toLowerCase();y.style.filter="Alpha(Opacity="+a+")";y.style.opacity=a/100},oa=function(){B.hideMonitor()},ba=!1,O=function(){"none"!=y.style.display&&(M==B.DEFAULT_OPACITY?(L=window.setTimeout(function(){O()},750),M-=5):0<=M-10?(da(M-10),L=window.setTimeout(function(){O()},40)):y.style.display="none")},n=a.Console,E=System;n.maxTotalLines=1E4;n.setMaxTotalLines=function(a){n.maxTotalLines=0<a?a:999999};
n.maxLatency=40;n.setMaxLatency=function(a){n.maxLatency=0<a?a:40};n.pinning=!1;n.enablePinning=function(a){n.pinning=a};n.linesCount=0;n.metLineBreak=!1;n.createConsoleWindow=function(){var a=document.createElement("DIV");a.style.cssText="font-family:monospace, Arial, sans-serif;";document.body.appendChild(a);return a};var F=String.fromCharCode(160),F=F+(F+F+F);n.consoleOutput=function(a,b){var c=window["j2s.lib"];(c=c&&c.console)&&"string"==typeof c&&(c=document.getElementById(c));if(!c)return!1;
if(n.linesCount>n.maxTotalLines){for(var d=0;d<n.linesCount-n.maxTotalLines;d++)c&&0<c.childNodes.length&&c.removeChild(c.childNodes[0]);n.linesCount=n.maxTotalLines}var e=!1;a=("undefined"==typeof a?"":null==a?"null":""+a).replace(/\t/g,F);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 f=null;a=a.replace(/\t/g,F);for(var f=a.split(/\r\n|\r|\n/g),d=0,g=f.length-1;d<=g;d++){var h=null;if(n.metLineBreak||
0==n.linesCount||1>c.childNodes.length)h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",n.linesCount++;else try{h=c.childNodes[c.childNodes.length-1]}catch(j){h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",n.linesCount++}var k=document.createElement("SPAN");h.appendChild(k);k.style.whiteSpace="nowrap";b&&(k.style.color=b);h=f[d];0==h.length&&(h=F);k.appendChild(document.createTextNode(h));n.pinning||(c.scrollTop+=100);n.metLineBreak=d!=g||
e}d=c.parentNode.className;!n.pinning&&(d&&-1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);n.lastOutputTime=(new Date).getTime()};n.clear=function(){try{n.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]);n.linesCount=0}}catch(e){}};a.alert=function(a){n.consoleOutput(a+"\r\n")};E.out.print=function(a){n.consoleOutput(a)};E.out.println=function(a){n.consoleOutput("undefined"==
typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};E.out.write=function(a,b,c){E.out.print(String.instantialize(a).substring(b,b+c))};E.err.__CLASS_NAME__="java.io.PrintStream";E.err.print=function(a){n.consoleOutput(a,"red")};E.err.println=function(a){n.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};E.err.write=function(a,b,c){E.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2015-07-09 21:14:50 -0500 (Thu, 09 Jul 2015) $";
Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.2.15_2015.07.09";
