(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(d,k){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||k(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 d=new window.XDomainRequest;d.onload=function(){b(200,
"OK",{text:d.responseText},{"Content-Type":d.contentType})};a.xhrFields&&(d.onerror=a.xhrFields.error,d.ontimeout=a.xhrFields.timeout);d.open(a.type,a.url);d.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,d){var k=a.xhr();console.log("xhr.open binary async="+a.async+" url="+a.url);k.open(a.type,a.url,a.async);
var h=!1;try{k.hasOwnProperty("responseType")&&(k.responseType="arraybuffer",h=!0)}catch(e){}try{!h&&k.overrideMimeType&&k.overrideMimeType("text/plain; charset=x-user-defined")}catch(j){}!a.crossDomain&&!b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");try{for(var f in b)k.setRequestHeader(f,b[f])}catch(s){}k.send(a.hasContent&&a.data||null);c=function(){var e=k.status,f="",j=k.getAllResponseHeaders(),b={};try{if(c&&4===k.readyState){c=void 0;try{b.text="string"===typeof k.responseText?
k.responseText:null}catch(s){}try{b.binary=k.response}catch(h){}try{f=k.statusText}catch(l){f=""}!e&&a.isLocal&&!a.crossDomain?e=b.text?200:404:1223===e&&(e=204);d(e,f,b,j)}}catch(r){alert(r),d(-1,r)}};a.async?4===k.readyState?setTimeout(c):k.onreadystatechange=c:c()},abort:function(){}}}))})(jQuery);
(function(a,h,g,c){function b(b,g){function l(f){a(e).each(function(){self.Jmol&&(0<=g.indexOf("mouseup")||0<=g.indexOf("touchend"))&&Jmol._setMouseOwner(null);var e=a(this);this!==f.target&&!e.has(f.target).length&&e.triggerHandler(g,[f.target,f])})}g=g||b+c;var e=a(),j=b+"."+g+"-special-event";a.event.special[g]={setup:function(){e=e.add(this);1===e.length&&a(h).bind(j,l)},teardown:function(){self.Jmol&&Jmol._setMouseOwner(null);e=e.not(this);0===e.length&&a(h).unbind(j)},add:function(a){var e=
a.handler;a.handler=function(a,f){a.target=f;e.apply(this,arguments)}}}}a.map(g.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-09-19 23:29:54 -0500 (Sat, 19 Sep 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 g in Jmol)h[g]=Jmol[g];return h}(document,Jmol));
(function(a,h){a.__$=h;h(document).ready(function(){a._document=null});a.$=function(a,j){null==a&&alert(j+arguments.callee.caller.toString());return h(j?"#"+a._id+"_"+j: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,j){return a._getFileData("http://cactus.nci.nih.gov/chemical/structure/"+e+"/"+("name"==
j?"names":j))};a.$appEvent=function(e,j,f,b){e=a.$(e,j);e.off(f)&&b&&e.on(f,b)};a.$resize=function(a){return h(window).resize(a)};a.$after=function(a,j){return h(a).after(j)};a.$append=function(a,j){return h(a).append(j)};a.$bind=function(a,j,f){return f?h(a).bind(j,f):h(a).unbind(j)};a.$closest=function(a,j){return h(a).closest(j)};a.$get=function(a,j){return h(a).get(j)};a.$documentOff=function(a,j){return h(document).off(a,"#"+j)};a.$documentOn=function(a,j,f){return h(document).on(a,"#"+j,f)};
a.$getAncestorDiv=function(a,j){return h("div."+j+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return h.support.iecors};a.$attr=function(e,j,f){return a._$(e).attr(j,f)};a.$css=function(e,j){return a._$(e).css(j)};a.$find=function(e,j){return a._$(e).find(j)};a.$focus=function(e){return a._$(e).focus()};a.$html=function(e,j){return a._$(e).html(j)};a.$offset=function(e){return a._$(e).offset()};a.$windowOn=function(a,j){return h(window).on(a,j)};a.$prop=function(e,j,f){var b=a._$(e);
return 3==arguments.length?b.prop(j,f):b.prop(j)};a.$remove=function(e){return a._$(e).remove()};a.$scrollTo=function(e,j){var f=a._$(e);return f.scrollTop(0>j?f[0].scrollHeight:j)};a.$setEnabled=function(e,j){return a._$(e).attr("disabled",j?null:"disabled")};a.$getSize=function(e){e=a._$(e);return[e.width(),e.height()]};a.$setSize=function(e,j,f){return a._$(e).width(j).height(f)};a.$setVisible=function(e,j){var f=a._$(e);return j?f.show():f.hide()};a.$submit=function(e){return a._$(e).submit()};
a.$val=function(e,j){var f=a._$(e);return 1==arguments.length?f.val():f.val(j)};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 g=document,c=window,b={};b.ua=navigator.userAgent.toLowerCase();var d;a:{d=["linux","unix","mac","win"];for(var k=d.length;k--;)if(-1!=b.ua.indexOf(d[k])){d=d[k];break a}d="unknown"}b.os=d;b.browser=function(){for(var a=b.ua,j="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),
f=0;f<j.length;f++)if(0<=a.indexOf(j[f]))return j[f];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=g.createElement("canvas")).getContext("webgl")||e.getContext("experimental-webgl"))?1:-1}return 0<a.featureDetection._webGLtest};b.supportsLocalization=function(){for(var a=g.getElementsByTagName("meta"),j=a.length;0<=--j;)if(0<=a[j].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=!!g.getElementById,j=b.os;if("opera"==b.browserName&&7.54>=b.browserVersion&&"mac"==j||"webkit"==b.browserName&&125.12>b.browserVersion||"msie"==b.browserName&&"mac"==j||"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 j='<input type="text" id="ID_query" onfocus="jQuery(this).select()" onkeypress="if(13==event.which){Jmol._applets[\'ID\']._search();return false}" size="32" value="" />',f='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(j="<nobr>"+j+'<span style="display:none">',f="</span>"+f):j+="<br /><nobr>";for(var j=
j+'<select id="ID_select">',b=0;b<a._grabberOptions.length;b++)var d=a._grabberOptions[b],j=j+('<option value="'+d[0]+'" '+(0==b?"selected":"")+">"+d[1]+"</option>");j=(j+"</select>"+f).replace(/ID/g,e._id);return"<br />"+j};a._getScriptForDatabase=function(e){return"$"==e?a.db._nciLoadScript:":"==e?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,j,f){var b=[],d="";if(0==f.indexOf("ERROR"))d=f;else switch(j){case "=":j=f.split("<dimStructure.structureId>");b=["<table>"];for(f=
1;f<j.length;f++)b.push('<tr><td valign=top><a href="javascript:Jmol.search('+a._id+",'="+j[f].substring(0,4)+"')\">"+j[f].substring(0,4)+"</a></td>"),b.push("<td>"+j[f].split("Title>")[1].split("</")[0]+"</td></tr>");b.push("</table>");d=j.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=d;a._info=b.join("");a._showInfo(!0)};a._loadSuccess=function(e,j){j&&(a._ajaxDone(),j(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,j){if(j&&!a.featureDetection.supportsXhr2())return e;var f=2,b,d=a.db._DirectDatabaseCalls[e.substring(0,f)];d||(d=a.db._DirectDatabaseCalls[b=e.substring(0,--f)]);d&&(":"==b?(b=e.toLowerCase(),isNaN(parseInt(e.substring(1)))?0==b.indexOf(":smiles:")?(d+="?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(f))):e="cid/"+e.substring(1)):e=encodeURIComponent(e.substring(f)),0<=d.indexOf("FILENCI")?(e=e.replace(/\%2F/g,"/"),e=d.replace(/\%FILENCI/,e)):e=d.replace(/\%FILE/,e));return e};a._getRawDataFromServer=function(e,j,f,b,d,c){e="?call=getRawDataFromDatabase&database="+e+(0<=j.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(j)+(d?"&encoding=base64":"")+(c?"":"&script="+encodeURIComponent(a._getScriptForDatabase(e)));
return a._contactServer(e,f,b)};a._checkFileName=function(e,j,f){a._isDatabaseCall(j)&&(f&&a._setQueryTerm(e,j),j=a._getDirectDatabaseCall(j,!0),a._isDatabaseCall(j)&&(j=a._getDirectDatabaseCall(j,!1),f&&(f[0]=!0)));return j};a._checkCache=function(e,j,f){if(e._cacheFiles&&a._fileCache&&!j.endsWith(".js")){if(e=a._fileCache[j])return System.out.println("using "+e.length+" bytes of cached data for "+j),f(e),null;f=function(e,j){f(a._fileCache[e]=j)}}return f};a._loadFileData=function(e,j,f,b){var d=
[];j=a._checkFileName(e,j,d);f=a._checkCache(e,j,f);d[0]?a._getRawDataFromServer("_",j,f,b):(e={type:"GET",dataType:"text",url:j,async:a._asynchronous,success:function(e){a._loadSuccess(e,f)},error:function(){a._loadError(b)}},a._checkAjaxPost(e),a._ajax(e))};a._getInfoFromDatabase=function(e,j,f){if("===="==j){var b=a.db._restQueryXml.replace(/QUERY/,f),b={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(b)+"&req=browser",
success:function(b){a._ajaxDone();a._extractInfoFromRCSB(e,j,f,b)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(b)}f="?call=getInfoFromDatabase&database="+j+"&query="+encodeURIComponent(f);return a._contactServer(f,function(f){a._setInfo(e,j,f)})};a._extractInfoFromRCSB=function(e,j,f,b){var d=b.length/5;if(0!=d&&4==f.length&&1!=d){f=f.toUpperCase();var c=b.indexOf(f);0<c&&0<="123456789".indexOf(f.substring(0,1))&&(b=f+","+b.substring(0,c)+b.substring(c+5));50<d&&(b=
b.substring(0,250));b=b.replace(/\n/g,",");b=a._restReportUrl.replace(/IDLIST/,b);a._loadFileData(e,b,function(f){a._setInfo(e,j,f)})}};a._checkAjaxPost=function(a){var j=a.url.indexOf("?POST?");0<j&&(a.data=a.url.substring(j+6),a.url=a.url.substring(0,j),a.type="POST",a.contentType="application/x-www-form-urlencoded")};a._contactServer=function(e,j,f){e={dataType:"text",type:"GET",url:a._serverUrl+e,success:function(e){a._loadSuccess(e,j)},error:function(){a._loadError(f)},async:j?a._asynchronous:
!1};a._checkAjaxPost(e);return a._ajax(e)};a._setQueryTerm=function(e,j){if(j&&e._hasOptions&&"http://"!=j.substring(0,7)){if(a._isDatabaseCall(j)){var f=j.substring(0,1);j=j.substring(1);j.substring(0,1)==f&&0<="=$".indexOf(f)&&(j=j.substring(1));var b=a._getElement(e,"select");if(b&&b.options)for(var d=0;d<b.options.length;d++)b[d].value==f&&(b[d].selected=!0)}a.$val(a.$(e,"query"),j)}};a._search=function(e,b,f){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,f,!0))};a._searchMol=function(e,b,f,d){var c;a._isDatabaseCall(b)?(c=b.substring(0,1),b=b.substring(1)):c=e._hasOptions?a.$val(a.$(e,"select")):"$";"="==c&&3==b.length&&(b="="+b);var g=c+b;if(b&&!(0>g.indexOf("?")&&g==e._thisJmolModel)){e._thisJmolModel=g;var k;d&&null!=e._viewSet&&null!=(k=a.View.__findView(e._viewSet,{chemID:g}))?a.View.__setView(k,e,!1):("$"==c||":"==c?e._jmolFileType="MOL":"="==
c&&(e._jmolFileType="PDB"),e._searchDatabase(b,c,f))}};a._searchDatabase=function(e,b,f,d){e._showInfo(!1);return 0<=b.indexOf("?")?(a._getInfoFromDatabase(e,f,b.split("?")[0]),!0):a.db._DirectDatabaseCalls[f]?(e._loadFile(f+b,d),!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(f){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,f){var d=a._isBinaryUrl(e),c=0<=e.indexOf("pdb.gz")&&0==e.indexOf("http://www.rcsb.org/pdb/files/"),g=d&&!a._canSyncBinary(c);g&&c&&(e=e.replace(/pdb\.gz/,"pdb"),g=d=!1);c=0<=e.indexOf("?POST?");0==e.indexOf("file:/")&&0!=e.indexOf("file:///")&&(e="file://"+e.substring(5));var k=0>e.indexOf("://")||0==e.indexOf(document.location.protocol)&&0<=e.indexOf(document.location.host),h="https://"==a._httpProto&&0==e.indexOf("http://"),
l=a._isDirectCall(e),R=!k&&a.$supportsIECrossDomainScripting(),z=null;if(h||g||!k&&!l||!b&&R)z=a._getRawDataFromServer("_",e,b,b,g,!0);else{e=e.replace(/file:\/\/\/\//,"file://");var r={dataType:d?"binary":"text",async:!!b};c?(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||(z=a._xhrReturn(r.xhr))}if(!f)return z;null==z&&(z="",d=!1);d&&(d=a._canSyncBinary(!0));
return d?a._strToBytes(z):JU.SB.newS(z)};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,f,d){if(0!=f.indexOf("?")){var c=f;f=a._checkFileName(b,f);var g=function(b){a._setData(e,f,c,b,d)},g=a._checkCache(b,f,g);0<=f.indexOf("|")&&(f=f.split("|")[0]);return null==g?null:
a._getFileData(f,g)}if(!a.featureDetection.hasFileReader)return e.setData("Local file reading is not enabled in your browser",null,null,d);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 f=a.$(b,"localReader_files")[0].files[0],c=new FileReader;c.onloadend=function(c){c.target.readyState==FileReader.DONE&&(a.$css(a.$(b,"localReader"),{display:"none"}),a._setData(e,f.name,f.name,c.target.result,d))};c.readAsArrayBuffer(f)});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,d)});a.$css(a.$(b,"localReader"),{display:"block"})};a._setData=function(e,b,f,d,c){d=a._strToBytes(d);0<=b.indexOf(".jdx")&&a.Cache.put("cache://"+b,d);e.setData(b,f,d,c)};a._toBytes=function(a){if("string"==typeof a)return a.getBytes();a=new Uint8Array(a);for(var b=Clazz.newByteArray(a.length,0),f=a.length;0<=--f;)b[f]=a[f];return b};a._doAjax=function(e,b,f){e=e.toString();if(null!=f)return a._saveFile(e,f);b&&(e+="?POST?"+b);return a._getFileData(e,null,
!0)};a._saveFile=function(e,b,f,d){if(a._localFileSaveFunction&&a._localFileSaveFunction(e,b))return"OK";e=e.substring(e.lastIndexOf("/")+1);f||(f=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 c="string"==typeof b;c||(b=(JU?JU:J.util).Base64.getBase64(b).toString());d||(d=c?"":"base64");(c=a._serverUrl)&&0<=c.indexOf("your.server")&&(c="");a._useDataURI||!c?(d||(b=btoa(b)),d=document.createElement("a"),
d.href="data:"+f+";base64,"+b,d.type=f||"text/plain",d.download=e,d.target="_blank",h("body").append(d),d.click(),d.remove()):(a._formdiv||(a.$after("body",'<div id="__jsmolformdiv__" style="display:none">\t\t\t\t\t\t<form id="__jsmolform__" method="post" target="_blank" action="">\t\t\t\t\t\t<input name="call" value="saveFile"/>\t\t\t\t\t\t<input id="__jsmolmimetype__" name="mimetype" value=""/>\t\t\t\t\t\t<input id="__jsmolencoding__" name="encoding" value=""/>\t\t\t\t\t\t<input id="__jsmolfilename__" name="filename" value=""/>\t\t\t\t\t\t<textarea id="__jsmoldata__" name="data"></textarea>\t\t\t\t\t\t</form>\t\t\t\t\t\t</div>'),
a._formdiv="__jsmolform__"),a.$attr(a._formdiv,"action",c+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",b),a.$val("__jsmolfilename__",e),a.$val("__jsmolmimetype__",f),a.$val("__jsmolencoding__",d),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),f=e.length;0<=--f;)b[f]=e.charCodeAt(f)&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,f,d,c){e=e.split("_object")[0];c||(c=d);f=f.booleanValue?f.booleanValue():f;var g=a._applets[e];g._appletPanel=c;g._applet=d;a._track(g._readyCallback(e,b,f))};a._getWrapper=function(e,b){var f;if(b){var d="";e._coverImage&&(d=' onclick="Jmol.coverApplet(ID, false)" title="'+e._coverTitle+'"',f='<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;"'+d+" />",d='<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%"'+d+"/>"+f+"</div>");f=a._appletCssText.replace(/\'/g,'"');f=0<=f.indexOf('style="')?f.split('style="')[1]:
'" '+f;f='...<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;"+f+">";var c=e._height,g=e._width;if("string"!==typeof c||0>c.indexOf("%"))c+="px";if("string"!==typeof g||0>g.indexOf("%"))g+="px";f=f.replace(/IMG/,d).replace(/Hpx/g,c).replace(/Wpx/g,g)}else f='......</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 f.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 f=a._getDomElement(e,b);if(!f)break;a._XhtmlAppendChild?a._XhtmlElement.appendChild(f):a._XhtmlElement.parentNode.insertBefore(f,
_jmol.XhtmlElement)}};a._getDomElement=function(a,b){var f=document.createElement("span");f.innerHTML=a;b[0]=a.length;return f};a._setObject=function(e,b,f){e._id=b;e.__Info={};f.z&&f.zIndexBase&&(a._z=a._getZOrders(f.zIndexBase));for(var d in f)e.__Info[d]=f[d];(e._z=f.z)||f.zIndexBase&&(e._z=e.__Info.z=a._getZOrders(f.zIndexBase));e._width=f.width;e._height=f.height;e._noscript=!e._isJava&&f.noscript;e._console=f.console;e._cacheFiles=!!f.cacheFiles;e._viewSet=null==f.viewSet||e._isJava?null:"Set"+
f.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=f.color?f.color.replace(/0x/,"#"):"#FFFFFF";e._disableInitialConsole=f.disableInitialConsole;e._noMonitor=f.disableJ2SLoadMonitor;a._j2sPath&&(f.j2sPath=a._j2sPath);e._j2sPath=f.j2sPath;e._coverImage=f.coverImage;e._isCovered=!!e._coverImage;e._deferApplet=f.deferApplet||e._isCovered&&e._isJava;e._deferUncover=
f.deferUncover&&!e._isJava;e._coverScript=f.coverScript;e._coverTitle=f.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=f.addSelectionOptions;e._defaultModel=f.defaultModel;e._readyScript=f.script?f.script:"";e._readyFunction=f.readyFunction;
e._coverImage&&!e._deferApplet&&(e._readyScript+=";javascript "+b+"._displayCoverImage(false)");e._src=f.src};a._addDefaultInfo=function(e,b){for(var f in b)"undefined"==typeof e[f]&&(e[f]=b[f]);a._use&&(e.use=a._use);0<=e.use.indexOf("SIGNED")&&(0>e.jarFile.indexOf("Signed")&&(e.jarFile=e.jarFile.replace(/Applet/,"AppletSigned")),e.use=e.use.replace(/SIGNED/,"JAVA"),e.isSigned=!0)};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(e){a._syncedReady[e]=
1;for(var b=0,f=0;f<a._syncedApplets.length;f++){if(a._syncedApplets[f]==e._id)a._syncedApplets[f]=e,a._syncedReady[f]=1;else if(!a._syncedReady[f])continue;b++}b==a._syncedApplets.length&&a._setSyncReady()};a._setDestroy=function(e){a.featureDetection.allowDestroy&&a.$windowOn("beforeunload",function(){a._destroy(e)})};a._destroy=function(e){try{e._appletPanel&&e._appletPanel.destroy();e._applet=null;a._unsetMouse(e._canvas);e._canvas=null;for(var b=0,f=0;f<a._syncedApplets.length;f++)a._syncedApplets[f]==
e&&(a._syncedApplets[f]=null),a._syncedApplets[f]&&b++;0<b||a._clearVars()}catch(d){}};a._setSyncReady=function(){a._syncReady=!0;for(var e="",b=0;b<a._syncedApplets.length;b++)a._syncedCommands[b]&&(e+="Jmol.script(Jmol._syncedApplets["+b+"], Jmol._syncedCommands["+b+"]);");setTimeout(e,50)};a._mySyncCallback=function(e,b){app=a._applets[e];if(app._viewSet)a.View.updateFromSync(app,b);else{if(!a._syncReady||!a._isJmolJSVSync)return 1;for(var f=0;f<a._syncedApplets.length;f++)0<=b.indexOf(a._syncedApplets[f]._syncKeyword)&&
a._syncedApplets[f]._syncScript(b);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 f=(new Function("return "+a))();return!f?null:b&&void 0!=f[b]?f[b]:f};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 f=[],d=a.length-1;0<=d;d--)for(var c=0,g=a[d].length;c<g;c++)f[f.length]=
a[d][c];if(0!=f.length)return f=f.sort(b)};a._setMouseOwner=function(e,b){null==e||b?a._mouseOwner=e:a._mouseOwner==e&&(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,d){if(!b.applet._ready||a._touching&&0>d.type.indexOf("touch"))return!1;var f=a.$offset(b.id),c,g=d.originalEvent;d.pageX||(d.pageX=g.pageX);d.pageY||(d.pageY=g.pageY);
a._mousePageX=d.pageX;a._mousePageY=d.pageY;g.targetTouches&&g.targetTouches[0]?(c=g.targetTouches[0].pageX-f.left,f=g.targetTouches[0].pageY-f.top):g.changedTouches?(c=g.changedTouches[0].pageX-f.left,f=g.changedTouches[0].pageY-f.top):(c=d.pageX-f.left,f=d.pageY-f.top);return void 0==c?null:[Math.round(c),Math.round(f),a._jsGetMouseModifiers(d)]};a._gestureUpdate=function(b,d){d.stopPropagation();d.preventDefault();var f=d.originalEvent;switch(d.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=
!1}if(!f.touches||2!=f.touches.length)return!1;switch(d.type){case "touchstart":b._touches=[[],[]];break;case "touchmove":var c=a.$offset(b.id),g=b._touches[0],k=b._touches[1];g.push([f.touches[0].pageX-c.left,f.touches[0].pageY-c.top]);k.push([f.touches[1].pageX-c.left,f.touches[1].pageY-c.top]);f=g.length;3<f&&(g.shift(),k.shift());2<=f&&b.applet._processGesture(b._touches)}return!0};a._jsSetMouse=function(b){var d=function(a){return!a.target||0<=(""+a.target.className).indexOf("swingjs-ui")};a.$bind(b,
"mousedown touchstart",function(f){if(d(f))return!0;a._setMouseOwner(b,!0);f.stopPropagation();var c=f.target["data-UI"];(!c||!c.handleJSEvent(b,501,f))&&f.preventDefault();b.isDragging=!0;if("touchstart"==f.type&&a._gestureUpdate(b,f))return!!c;a._setConsoleDiv(b.applet._console);var g=a._jsGetXY(b,f);g&&(2!=f.button&&a.Swing.hideMenus(b.applet),b.applet._processEvent(501,g));return!!c});a.$bind(b,"mouseup touchend",function(f){if(d(f))return!0;a._setMouseOwner(null);f.stopPropagation();var c=f.target["data-UI"];
(!c||!c.handleJSEvent(b,502,f))&&f.preventDefault();b.isDragging=!1;if("touchend"==f.type&&a._gestureUpdate(b,f))return!!c;(f=a._jsGetXY(b,f))&&b.applet._processEvent(502,f);return!!c});a.$bind(b,"mousemove touchmove",function(f){if(d(f))return!0;if(a._mouseOwner&&a._mouseOwner!=b&&a._mouseOwner.isDragging){if(!a._mouseOwner.mouseMove)return!0;a._mouseOwner.mouseMove(f);return!1}return a._drag(b,f)});a._drag=function(b,e){e.stopPropagation();e.preventDefault();if("touchmove"==e.type&&a._gestureUpdate(b,
e))return!1;var d=a._jsGetXY(b,e);if(!d)return!1;b.isDragging||(d[2]=0);var c=e.target["data-UI"];b.isdragging&&(!c||c.handleJSEvent(b,506,e));b.applet._processEvent(b.isDragging?506:503,d);return!!c};a.$bind(b,"DOMMouseScroll mousewheel",function(f){if(d(f))return!0;f.stopPropagation();f.preventDefault();b.isDragging=!1;var c=f.originalEvent,c=c.detail?c.detail:("mac"==a.featureDetection.os?1:-1)*c.wheelDelta;f=a._jsGetMouseModifiers(f);b.applet._processEvent(-1,[0>c?-1:1,0,f]);return!1});a.$bind(b,
"contextmenu",function(){return!1});a.$bind(b,"mouseout",function(f){if(d(f))return!0;a._mouseOwner&&!a._mouseOwner.mouseMove&&a._setMouseOwner(null);b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(b,f);return!1});a.$bind(b,"mouseenter",function(f){if(d(f))return!0;b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!0);if(0===f.buttons||0===f.which){b.isDragging=!1;f=a._jsGetXY(b,f);if(!f)return!1;b.applet._processEvent(504,f);b.applet._processEvent(502,f);
return!1}});a.$bind(b,"mousemoveoutjsmol",function(f,c,g){if(d(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(f){if(d(f))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 e=this;b.bind("mousedown touchstart",function(b){if(e.ignoreMouse)return e.ignoreMouse=!1,!0;a._setMouseOwner(e,!0);e.isDragging=!0;e.pageX=b.pageX;e.pageY=b.pageY;return!1});b.bind("mousemove touchmove",function(b){if(e.isDragging&&a._mouseOwner==e)return e.mouseMove(b),
!1});b.bind("mouseup touchend",function(b){e.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 e=this.pageX0+(b.pageX-this.pageX);b=this.pageY0+(b.pageY-this.pageY);a._mousePageX=e;a._mousePageY=b;this.container.css({top:b+"px",left:e+"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 e=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a,b,d){e.mouseMove(d)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,b,d){e.mouseUp(d)})}})};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 d=b.id+"_mover",f=a._$(d),c;f[0]?(f.html(b.html),c=f[0].jd):(a.$after("body","<div id='"+d+"' style='position:absolute;left:0px;top:0px;'>"+b.html+"</div>"),c=new l.JSDialog,f=a._$(d),b.container=f,c.applet=b.manager.vwr.html5Applet,c.setContainer(f),c.dialog=b,c.setPosition(),c.dragBind(!0),f[0].jd=c);a.$bind("#"+b.id+" .JButton","mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JComboBox",
"mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JCheckBox","mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JTextField","mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JTable","mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JScrollPane","mousedown touchstart",function(){c.ignoreMouse=!0});a.$bind("#"+b.id+" .JEditorPane","mousedown touchstart",function(){c.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,d){var f=l.htDialogs[b.id];if(f){var c=f.toString();if(0<=c.indexOf("JCheck"))f.selected=b.checked;else if(0<=c.indexOf("JCombo"))f.selectedIndex=b.selectedIndex;else if(null!=f.text&&(f.text=b.value,d&&13!=(d.charCode||
d.keyCode)))return}c=l.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];c.manager.actionPerformed(f?f.name:c.registryKey+"/"+b.id)};l.setFront=function(b){var d=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(d,"dialog")&&(b.zIndex=a._incrZ(d,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};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 d='<iframe style="display:none" width="0" height="0" frameborder="0" tabindex="-1" src="'+(a._tracker+"&applet="+b._jmolType+"&version="+a._version+"&appver="+a.___JmolVersion+"&url="+encodeURIComponent(document.location.href))+'"></iframe>';a.$after("body",d)}catch(f){}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 f=a.indexOf(b+"=");return 0<=f&&0<=(f=a.indexOf('"',f))?a.substring(f+1,a.indexOf('"',f+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.updateView=function(d,f){if(null!=d._viewSet){f.chemID||(d._searchQuery=null);f.data||(f.data="N/A");f.type=d._viewType;if(null==(d._currentView=b.__findView(d._viewSet,f)))d._currentView=b.__createViewSet(d._viewSet,f.chemID,
f.viewID||f.chemID);d._currentView[f.type].data=f.data;d._currentView[f.type].smiles=d._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateView");b.__setView(d._currentView,d,!1)}};b.updateFromSync=function(d,f){d._updateMsg=f;var c=a._getAttr(f,"sourceID")||a._getAttr(f,"file");if(c){var g=b.__findView(d._viewSet,{viewID:c});if(null==g)return a.updateView(d,f);g!=d._currentView&&b.__setView(g,d,!0);var k=(c=a._getAttr(f,"atoms"))&&0<=f.indexOf("selectionhalos ON")?eval("["+
c+"]"):[];setTimeout(function(){d._currentView==g&&b.updateAtomPick(d,k)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateFromSync")}};b.updateAtomPick=function(b,f){var e=b._currentView;if(null!=e){for(var d in e)"info"!=d&&e[d].applet!=b&&e[d].applet._updateAtomPick(f);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var f=b.sets[a];if(f){var d="View set "+a+":\n";a=b.applets[a];for(var c in a)d+="\napplet "+a[c]._id+" currentView="+
(a[c]._currentView?a[c]._currentView.info.viewID:null);for(c=f.length;0<=--c;){a=f[c];var d=d+("\n\n<b>view="+c+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"</b>\n"),g,k;for(k in a)"info"!=k&&(d+="\nview="+c+" type="+k+" applet="+((g=a[k]).applet?g.applet._id:null)+" SMILES="+g.smiles+"\n atomMap="+JSON.stringify(g.atomMap)+"\n data=\n"+g.data+"\n")}return d}};b.__init=function(a){var f=a._viewSet,d=b.applets;d[f]||(d[f]={});d[f][a._viewType]=a};b.__findView=function(a,f){var d=b.sets[a];null==
d&&(d=b.sets[a]=[]);for(var c=d.length;0<=--c;){var g=d[c];if(f.viewID){if(g.info.viewID==f.viewID)return g}else{if(null!=f.chemID&&f.chemID==g.info.chemID)return g;for(var k in g)if("info"!=k&&(null!=f.data&&null!=g[k].data?f.data==g[k].data:f.type==k))return g}}return null};b.__createViewSet=function(d,f,c){b.count++;f={info:{chemID:f,viewID:c||"model_"+b.count}};for(var g in a._applets)c=a._applets[g],c._viewSet==d&&(f[c._viewType]={applet:c,data:null});b.sets[d].push(f);return f};b.__setView=
function(a,b,d){for(var e in a)if("info"!=e){var c=a[e],g=c.applet,k=d||null!=g&&"<modified>"==g._molData;if(!(null==g||g==b&&!k)){var h=null==c.data,l=null!=g._currentView;g._currentView=a;if(!l||!(a[e].data==c.data&&!h&!k))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,d){a.Cache.fileCache[b]=d};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(d){var f=d.originalEvent;f.stopPropagation();f.preventDefault();var c=f.dataTransfer.files[0];if(null==c)try{c=""+f.dataTransfer.getData("text"),(0==c.indexOf("file:/")||0==c.indexOf("http:/"))&&b._scriptLoad(c)}catch(g){}else f=new FileReader,f.onloadend=function(f){if(f.target.readyState==FileReader.DONE){var g="cache://DROP_"+c.name;f=a._toBytes(f.target.result);g.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",
!1);"JSV"==b._viewType||g.endsWith(".jdx")?a.Cache.put(g,f):b._appletPanel.cachePut(g,f);(f=a._jsGetXY(b._canvas,d))&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,f[0],f[1],g))&&b._appletPanel.openFileAsyncSpecial(g,1)}},f.readAsArrayBuffer(c)})}})(Jmol,jQuery);Jmol._debugCode=!1;
(function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var h=!1,g=[],c=[],b=0,d=[],k=[],l=function(f){arguments.length||(f=!0);delete b;for(var d;0<c.length&&"done"==(d=c[0])[4];)c.shift();if(0!=c.length)if(!a._isAsync&&!f)setTimeout(l,10);else{d.push("done");var e="JSmol exec "+d[0]._id+" "+d[3]+" "+d[2];self.System&&System.out.println(e);self.console&&console.log(e+" -- OK");g.push(e);d[1](d[0],d[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))},j=function(a,b){Clazz._Loader.loadClass(b,function(){l()})};a.showExecLog=function(){return g.join("\n")};a._addExec=function(a){a[1]||(a[1]=j);var b="JSmol load "+a[0]._id+" "+a[3];self.console&&console.log(b+"...");g.push(b);
c.push(a)};a._addCoreFile=function(b,e,c){b=b.toLowerCase().split(".")[0];if(!(0<=d.join("").indexOf(b))){d.push(b);d.sort();a._coreFiles=[e+"/core/core"+d.join("")+".z.js"];if(c&&(c=c.split(" ")))for(b=0;b<c.length;b++)0>k.join("").indexOf(c[b])&&k.push(e+"/core/core"+c[b]+".z.js");for(b=0;b<k.length;b++)a._coreFiles.push(k[b])}};a._Canvas2D=function(b,d,e,c){this._uniqueId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._jmolType="Jmol._Canvas2D ("+e+")";this._isLayered=
d._isLayered||!1;this._isSwing=d._isSwing||!1;this._isJSV=d._isJSV||!1;this._isAstex=d._isAstex||!1;this._platform=d._platform||"";if(c)return this;window[b]=this;this._createCanvas(b,d);if(!a._document||this._deferApplet)return this;this._init();return this};a._setAppletParams=function(b,d,e,c){for(var g in e)if(!b||0<=b.indexOf(";"+g.toLowerCase()+";"))null==e[g]||"language"==g&&!a.featureDetection.supportsLocalization()||(c?d.put(g,!0===e[g]?Boolean.TRUE:!1===e[g]?Boolean.FALSE:e[g]):d[g]=e[g])};
a._jsSetPrototype=function(d){d._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};d._createCanvas=function(b,d,e){a._setObject(this,b,d);e&&(this._GLmol=e,this._GLmol.applet=this,this._GLmol.id=this._id);e=a._getWrapper(this,!0);this._deferApplet||(a._document?(a._documentWrite(e),this._newCanvas(!1),e=""):(this._deferApplet=!0,e+='<script type="text/javascript">'+b+"._cover(false)\x3c/script>"));e+=a._getWrapper(this,!1);d.addSelectionOptions&&(e+=
a._getGrabberOptions(this));a._debugAlert&&!a._document&&alert(e);this._code=a._documentWrite(e)};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(d){}var e=Math.round(b.width()),f=Math.round(b.height()),c=document.createElement("canvas");c.applet=this;this._canvas=c;c.style.width="100%";c.style.height="100%";c.width=e;c.height=f;c.id=this._id+"_canvas2d";b.append(c);
a._$(c.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var g=document.createElement("div");c.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?e: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:e+"px",height:f+"px",overflow:"hidden"}),this._mouseInterface=c.contentLayer,c.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,e,f,!1)}else this._mouseInterface=c;a._jsSetMouse(this._mouseInterface)};d._getLayer=function(b,d,e,f,c){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=e;g.height=f;d.append(g);g.applet=this;a._$(g.id).css({background:c?"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 e=b._j2sPath+"/";if(0>e.indexOf("://")){var f=document.location.href.split("#")[0].split("?")[0].split("/");0==e.indexOf("/")?f=[f[0],e.substring(1)]:f[f.length-1]=e;e=f.join("/")}d.put("codePath",e);a._registerApplet(b._id,b);try{b._newApplet(d)}catch(c){System.out.println((a._isAsync?
"normal async abort from ":"")+c);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,d){if(b&&b._appletPanel){var e=a.$(b,"appletdiv"),c=Math.round(e.width()),e=Math.round(e.height());if(b._is2D&&(b._canvas.width!=
c||b._canvas.height!=e))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(c,e);c=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};d?setTimeout(c):c()}};a._loadImage=function(b,d,e,c,g,k){var j="echo_"+d+e+(c?"_"+c.length:""),h=a._getHiddenCanvas(b.vwr.html5Applet,j,0,0,!1,!0);if(null==h){if(null==k){k=new Image;if(null==c)return k.onload=function(){a._loadImage(b,d,e,null,g,k)},k.src=e,null;System.out.println("Jsmol.js Jmol._loadImage using data URI for "+
j);k.src="string"==typeof c?c:"data:"+JU.Rdr.guessMimeTypeForBytes(c)+";base64,"+JU.Base64.getBase64(c)}var l=k.width,r=k.height;"webgl"==d&&(l/=2,r/=2);h=a._getHiddenCanvas(b.vwr.html5Applet,j,l,r,!0,!1);h.imageWidth=l;h.imageHeight=r;h.id=j;h.image=k;a._setCanvasImage(h,l,r)}else System.out.println("Jsmol.js Jmol._loadImage reading cached image for "+j);return null==c?g(h,e):h};a._canvasCache={};a._getHiddenCanvas=function(b,d,e,c,g,k){d=b._id+"_"+d;b=a._canvasCache[d];if(k)return b;if(g||!b||b.width!=
e||b.height!=c)b=document.createElement("canvas"),b.width=b.style.width=e,b.height=b.style.height=c,b.id=d,a._canvasCache[d]=b;return b};a._setCanvasImage=function(a,b,d){a.buf32=null;a.width=b;a.height=d;a.getContext("2d").drawImage(a.image,0,0,a.image.width,a.image.height,0,0,b,d)};a._apply=function(a,b){return a(b)}})(Jmol);
(function(a,h){a._Applet=function(b,d,c){window[b]=this;this._jmolType="Jmol._Applet"+(d.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(c)return this;this._isSigned=d.isSigned;this._readyFunction=d.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=d.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(b,e){var c=!1;a._jarFile&&(e=a._jarFile);if(this._jarFile){var f=this._jarFile;0<=f.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+f+". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network."),
"yes"==prompt("Do you want to use applet "+f+"? ","yes or no")?(b=f.substring(0,f.lastIndexOf("/")),e=f.substring(f.lastIndexOf("/")+1)):c=!0):e=f;this_isSigned=d.isSigned=0<=e.indexOf("Signed")}this._jarPath=d.jarPath=b||".";this._jarFile=d.jarFile="string"==typeof e?e:(e?"JmolAppletSigned":"JmolApplet")+"0.jar";c&&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,d);return this};
var g=a._Applet,c=a._Applet.prototype;g._get=function(b,d,c){c||(c=!1);d||(d={});a._addDefaultInfo(d,{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=d.debug;
d.serverURL&&(a._serverUrl=d.serverURL);for(var h=!1,e=null,j=d.use.toUpperCase().split("#")[0].split(" "),f=0;f<j.length;f++){switch(j[f]){case "JAVA":h=!0;a.featureDetection.supportsJava()&&(e=new g(b,d,c));break;case "WEBGL":e=g._getCanvas(b,d,c,!0);break;case "HTML5":a.featureDetection.allowHTML5?e=g._getCanvas(b,d,c,!1):j.push("JAVA");break;case "IMAGE":e=new a._Image(b,d,c)}if(null!=e)break}null==e&&(c||!h?e={_jmolType:"none"}:h&&(e=new g(b,d)));return c?e:a._registerApplet(b,e)};g._getCanvas=
function(b,d,c,h){d._isLayered=!1;d._platform="J.awtjs2d.Platform";return h&&a.featureDetection.supportsWebGL()?(a._Canvas3D.prototype=a.GLmol.extendApplet(a._jsSetPrototype(new g(b,d,!0))),new a._Canvas3D(b,d,"Jmol",c)):!h?(a._Canvas2D.prototype=a._jsSetPrototype(new g(b,d,!0)),new a._Canvas2D(b,d,"Jmol",c)):null};g._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>";
g._setCommonMethods=function(a){a._showInfo=c._showInfo;a._search=c._search;a._getName=c._getName;a._readyCallback=c._readyCallback};g._createApplet=function(b,d,c){b._initialize(d.jarPath,d.jarFile);var l=b._jarFile;a._isFile&&(l=l.replace(/0\.jar/,".jar"));var e=0<=b._containerWidth.indexOf("px")?b._containerWidth:"100%",j=0<=b._containerHeight.indexOf("px")?b._containerHeight:"100%",e=' style="width:'+e+";height:"+j+'" ',j="name='"+b._id+"_object' id='"+b._id+"_object' \n"+e+"\n";c.codebase=b._jarPath;
c.codePath=c.codebase+"/";if(0>c.codePath.indexOf("://")){var f=h.location.href.split("#")[0].split("?")[0].split("/");f[f.length-1]=c.codePath;c.codePath=f.join("/")}c.archive=l;c.mayscript="true";c.java_arguments="-Xmx"+Math.round(d.memoryLimit||b._memoryLimit)+"m";c.permissions=b._isSigned?"all-permissions":"sandbox";c.documentLocation=h.location.href;c.documentBase=h.location.href.split("#")[0].split("?")[0];c.jarPath=d.jarPath;a._syncedApplets.length&&(c.synccallback="Jmol._mySyncCallback");
b._startupScript&&(c.script=b._startupScript);var f="\n",s;for(s in c)c[s]&&(f+="  <param name='"+s+"' value='"+c[s]+"' />\n");f=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"<object "+j+(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'>")+f+"<p style='background-color:yellow;"+e.split('"')[1]+";text-align:center;vertical-align:middle;'>\n"+
g._noJavaMsg+"</p></object>\n":"<applet "+j+" code='"+c.code+"' codebase='"+b._jarPath+"' archive='"+l+"' mayscript='true'>\n"+f+"<table bgcolor='yellow'><tr><td align='center' valign='middle' "+e+">\n"+g._noJavaMsg+"</td></tr></table></applet>\n";b._deferApplet&&(b._javaCode=f,f="");f=a._getWrapper(b,!0)+f+a._getWrapper(b,!1)+(d.addSelectionOptions?a._getGrabberOptions(b):"");a._debugAlert&&alert(f);b._code=a._documentWrite(f)};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,d){a._setObject(this,b,d);var c={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,c,d);var h;d.inlineModel?(h=d.inlineModel,h=h.replace(/\r|\n|\r\n/g,0<=h.indexOf("|")?"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+h)):h="";c.loadInline=h;c.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&(c.synccallback="Jmol._mySyncCallback");c.java_arguments="-Xmx"+Math.round(d.memoryLimit||this._memoryLimit)+"m";this._initialize(d.jarPath,
d.jarFile);g._createApplet(this,d,c)};c._restoreState=function(b,d){System.out.println("\n\nasynchronous restore state for "+b+" "+d);var c=this,g=c._applet&&c._applet.viewer;switch(d){case "setOptions":return function(){c.__startAppletJS(c)};case "render":return function(){setTimeout(function(){g.refresh(2)},10)};default:switch(b){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(g&&g.isScriptExecuting&&g.isScriptExecuting()){if(a._asyncCallbacks[b])return System.out.println("...ignored"),
1;var e=g.getEvalContextAndHoldQueue(g.eval),h=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);g.eval.resumeEval(e)};g.eval.pc=g.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](h)}}System.out.println(b+"?????????????????????"+d);return function(){setTimeout(function(){g.refresh(2)},
10)}}};c._readyCallback=function(b,d,c){c&&(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 d=b?2:"100%";a.$setSize(a.$(this,"appletdiv"),d,d)}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 d=jmol._evaluate("{*}.count"),c=[],g=[],e=0;e<a.length;e++){var h=a[e];c[h[0]+1]=h[1]-d+1;g[h[1]-d+1]=h[0]+1}return{fromJmol:c,toJmol:g}};c._show=function(b){var d=!b?2:"100%";a.$setSize(a.$(this,"object"),d,d);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,d){var c=this._scriptWaitAsArray(a),g="";if(!d)for(var e=c.length;0<=
--e;)for(var h=0,f=c[e].length;h<f;h++)g+=c[e][h]+"\n";return g};c._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var d="",c=a.length;0<=--c;)for(var g=a[c].length;0<=--g;)"scriptEcho"==a[c][g][1]&&(d+=a[c][g][3]+"\n");return d.replace(/ \| /g,"\n")};c._scriptMessage=function(a){a=this._scriptWaitAsArray(a);for(var d="",c=a.length;0<=--c;)for(var g=a[c].length;0<=--g;)"scriptStatus"==a[c][g][1]&&(d+=a[c][g][3]+"\n");return d.replace(/ \| /g,"\n")};c._scriptWaitOutput=function(a){var d="";
try{a&&(d+=this._applet.scriptWaitOutput(a))}catch(c){}return d};c._scriptWaitAsArray=function(b){var d="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),b&&(d+=this._applet.scriptWait(b),d=a._evalJSON(d,"jmolStatus"),"object"==typeof d))return d}catch(c){}return[[d]]};c._getStatus=function(b){return a._sortMessages(this._getPropertyAsArray("jmolStatus",b))};c._getPropertyAsArray=function(b,d){return a._evalJSON(this._getPropertyAsJSON(b,d),b)};c._getPropertyAsString=
function(a,d){void 0==d&&(d="");return this._applet.getPropertyAsString(a,d)+""};c._getPropertyAsJSON=function(a,d){void 0==d&&(d="");try{return this._applet.getPropertyAsJSON(a,d)+""}catch(c){return""}};c._getPropertyAsJavaObject=function(a,d){void 0==d&&(d="");return this._applet.getProperty(a,d)};c._evaluate=function(a){null!=a||(a="");return this._getPropertyAsArray("variableInfo",a)};c._evaluateDEPRECATED=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var d=a.replace(/\-*\d+/,"");
if(""==d&&!isNaN(parseInt(a)))return parseInt(a);d=a.replace(/\-*\d*\.\d*/,"");return""==d&&!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,d){1>arguments.length&&(d=1);var c=this._savedOrientations[a];return!c||""==c?c.replace(/1\.0/,
d):this._scriptWait(c)};c._resizeApplet=function(b){function d(b,d){var c=""+b;return 0==c.length?d?"":a._allowedJmolSize[2]:c.indexOf("%")==c.length-1?c: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)+(d?d:"")}var c;"object"==typeof b&&null!=b?(c=b[0]||b.width,b=b[1]||b.height):c=b;c=[d(c,"px"),d(b,"px")];b=a._getElement(this,"appletinfotablediv");b.style.width=c[0];b.style.height=
c[1];this._containerWidth=c[0];this._containerHeight=c[1];this._is2D&&a._repaint(this,!0)};c._search=function(b,d){a._search(this,b,d)};c._searchDatabase=function(b,d,c){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(b,d,c);this._showInfo(!1);0<=b.indexOf("?")?a._getInfoFromDatabase(this,d,b.split("?")[0]):(c||(c=a._getScriptForDatabase(d)),b=d+b,this._currentView=null,this._searchQuery=b,this._loadFile(b,c,b))};c._loadFile=function(b,
d,c){this._showInfo(!1);d||(d="");this._thisJmolModel=""+Math.random();this._fileName=b;if(!this._scriptLoad(b,d)){var g=this;a._loadFileData(this,b,function(a){g.__loadModel(a,d,c)},function(){g.__loadModel(null)})}};c._scriptLoad=function(a,c){c||(c="");var g=this._isJava||!this._noscript;g&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;g?this._script('load async "'+a+'";'+c):this._applet.openFile(a);this._checkDeferred("");return!0};
c.__loadModel=function(b,c,g){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:g,data:b}))};c._loadMolData=function(a,c,g){c||(c="");g=g?"append":"model";this._applet.scriptWait('load DATA "'+g+'"'+a+'\nEND "'+g+'" ;'+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 g=[c+1];a.View.updateAtomPick(this,g);this._updateAtomPick(g)}};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,d,k,l,e,j){var f=h._getIdForControl(a,c);if(null==f)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));k||(k="");a="</span>";h._actions[e]=
h._addScript(f,c);c='<span id="span_'+e+'"'+(j?' title="'+j+'"':"")+"><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()' "+(d?"checked='true' ":"")+h._radioCssText+" />";0<=b.toLowerCase().indexOf("<td>")&&(c+=a,a="");return c+('<label for="'+e+'">'+b+"</label>"+a+k)};h._scriptExecute=function(g,c){var b=a._applets[c[0]],d=c[1];if("object"==typeof d)d[0](g,d,
b);else"function"==typeof d?d(b):a.script(b,d)};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(g,c,b){g=13==g?13:window.event?window.event.keyCode:g?g.keyCode||g.which:0;var d=document.getElementById(c),
k=a._applets[b];switch(g){case 13:return c=d.value,h._scriptExecute(d,[b,c]),d._cmds||(d._cmds=[],d._cmddir=0,d._cmdpt=-1,d._cmdadd=0),c&&0==d._cmdadd?(++d._cmdpt,d._cmds.splice(d._cmdpt,0,c),d._cmdadd=0,d._cmddir=0):d._cmdadd=0,d.value="",!1;case 27:return setTimeout(function(){d.value=""},20),!1;case 38:h.__getCmd(-1,d);break;case 40:h.__getCmd(1,d);break;default:d._cmdadd=0}setTimeout(function(){h.__checkScript(k,d)},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,d;for(d in a.chkGroup)a.chkGroup[d].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 d=a.chkGroup[b];d.checked!=c&&(d.checked=c,h._cbClick(d));h._checkboxMasters[d.id]&&h._cbNotifyGroup(h._checkboxMasters[d.id],c)}};h._cbSetCheckboxGroup=function(a,c,b){var d=a;"number"==typeof d&&(d="jmolCheckbox"+d);(a=document.getElementById(d))||alert("jmolSetCheckboxGroup: master checkbox not found: "+d);var k=h._checkboxMasters[d]={};k.chkMaster=a;k.chkGroup={};"string"==typeof c?(c=b,d=1):d=0;for(a=d;a<c.length;a++)d=c[a],"number"==
typeof d&&(d="jmolCheckbox"+d),(checkboxItem=document.getElementById(d))||alert("jmolSetCheckboxGroup: group checkbox not found: "+d),k.chkGroup[d]=checkboxItem,h._checkboxItems[d]=k};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(g,c,b,d,k){g=h._getIdForControl(g,c);if(null==g)return"";void 0!=d&&null!=d||(d="jmolButton"+h._buttonCount);void 0!=b&&null!=b||(b=c.substring(0,32));++h._buttonCount;h._actions[d]=h._addScript(g,c);c='<span id="span_'+d+'"'+(k?' title="'+k+'"':"")+"><input type='button' name='"+d+"' id='"+d+"' 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(g,c,b,d,k,l,e){var j=h._getIdForControl(g,c);null!=j&&(j=h._getIdForControl(g,b));if(null==j)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==d||null==d)alert("jmolCheckbox requires a label");else return h._actions[l]=[h._addScript(j,c),h._addScript(j,b)],g="</span>",k='<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()' "+(k?"checked='true' ":"")+h._checkboxCssText+" />",0<=d.toLowerCase().indexOf("<td>")&&(k+=g,g=""),k+='<label for="'+l+'">'+d+"</label>"+g,a._debugAlert&&alert(k),a._documentWrite(k)};h._getCommandInput=function(g,c,b,d,k,l){g=h._getIdForControl(g,"x");if(null==g)return"";void 0!=d&&null!=d||(d="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_'+d+'"'+(k?' title="'+k+'"':"")+"><input name='"+d+"' id='"+d+"' size='"+b+"' onkeydown='return Jmol.controls._commandKeyPress(event,\""+d+'","'+g+"\")' value='"+l+"'/><input  type='button' name='"+d+"Btn' id='"+d+"Btn' value = '"+c+"' onclick='Jmol.controls._commandKeyPress(13,\""+d+'","'+g+"\")' /></span>";a._debugAlert&&alert(c);return a._documentWrite(c)};h._getLink=function(g,
c,b,d,k){g=h._getIdForControl(g,c);if(null==g)return"";void 0!=d&&null!=d||(d="jmolLink"+h._linkCount);void 0!=b&&null!=b||(b=c.substring(0,32));++h._linkCount;c=h._addScript(g,c);b='<span id="span_'+d+'"'+(k?' title="'+k+'"':"")+"><a name='"+d+"' id='"+d+"' 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(g,c,b,d,k){var l=h._getIdForControl(g,null);void 0!=d&&null!=d||(d="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_'+d+'"'+(k?' title="'+k+'"':"")+"><select name='"+d+"' id='"+d+"' onChange='Jmol.controls._menuSelected(this)'"+(b?" size='"+b+"' ":"")+h._menuCssText+">";for(d=0;d<e;++d){var j=c[d],l=typeof j,f=null,s=k=null;"object"==l&&null!=j?(f=j[0],k=j[1],s=j[2]):
f=k=j;l=h._getIdForControl(g,f);if(null==l)return"";null==k&&(k=f);"#optgroup"==f?b+="<optgroup label='"+k+"'>":"#optgroupEnd"==f?b+="</optgroup>":(l=h._addScript(l,f),b+="<option value='"+l+(s?"' selected='true'>":"'>")+k+"</option>")}b+="</select></span>";a._debugAlert&&alert(b);return a._documentWrite(b)}};h._getRadio=function(g,c,b,d,k,l,e,j){0==h._radioGroupCount&&++h._radioGroupCount;l||(l="jmolRadioGroup"+(h._radioGroupCount-1));g=h._radio(g,c,b,d,k,l,e?e:l+"_"+h._radioCount,j?j:0);if(null==
g)return"";a._debugAlert&&alert(g);return a._documentWrite(g)};h._getRadioGroup=function(g,c,b,d,k,l){var e=typeof c;if("object"!=e||null==e||!c.length)alert("invalid arrayOfRadioButtons");else{void 0!=b&&null!=b||(b="&#xa0; ");var j=c.length;++h._radioGroupCount;d||(d="jmolRadioGroup"+(h._radioGroupCount-1));for(var f="<span id='"+(k?k:d)+"'>",s=0;s<j;++s){s==j-1&&(b="");var q=c[s],e=typeof q,O=null,f="object"==e?f+(O=h._radio(g,q[0],q[1],q[2],b,d,3<q.length?q[3]:(k?k:d)+"_"+s,4<q.length?q[4]:0,
l)):f+(O=h._radio(g,q,null,null,b,d,(k?k:d)+"_"+s,l));if(null==O)return""}f+="</span>";a._debugAlert&&alert(f);return a._documentWrite(f)}}})(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(g,c,b){return a._Applet._get(g,c,b)};a.getJMEApplet=function(g,c,b,d){return a._JMEApplet._get(g,c,b,d)};a.getJSVApplet=function(g,c,b){return a._JSVApplet._get(g,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(g,c){if(c){var b=a._document;a._document=null;g=a.getApplet(g,c);a._document=b}return g._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(g,c,b,d,h){return a.controls._getButton(g,c,b,d,h)};a.jmolCheckbox=function(g,c,b,d,h,l,e){return a.controls._getCheckbox(g,c,b,d,h,l,e)};a.jmolCommandInput=function(g,c,b,d,h,l){return a.controls._getCommandInput(g,c,b,d,h,l)};a.jmolHtml=function(g){return a._documentWrite(g)};a.jmolLink=function(g,c,b,d,h){return a.controls._getLink(g,c,b,d,h)};a.jmolMenu=function(g,c,b,d,h){return a.controls._getMenu(g,c,b,d,h)};a.jmolRadio=function(g,c,b,d,h,l,e,j){return a.controls._getRadio(g,
c,b,d,h,l,e,j)};a.jmolRadioGroup=function(g,c,b,d,h,l){return a.controls._getRadioGroup(g,c,b,d,h,l)};a.setCheckboxGroup=function(g,c){a.controls._cbSetCheckboxGroup(g,c,arguments)};a.setDocument=function(g){a._document=g};a.setXHTML=function(g){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;g&&(a._XhtmlElement=document.getElementById(g),a._XhtmlAppendChild=!0)};a.setAppletCss=function(g,c){null!=g&&(a._appletCssClass=g);a._appletCssText=c?c+" ":g?'class="'+g+'" ':""};a.setButtonCss=function(g,
c){null!=g&&(a.controls._buttonCssClass=g);a.controls._buttonCssText=c?c+" ":g?'class="'+g+'" ':""};a.setCheckboxCss=function(g,c){null!=g&&(a.controls._checkboxCssClass=g);a.controls._checkboxCssText=c?c+" ":g?'class="'+g+'" ':""};a.setRadioCss=function(g,c){null!=g&&(a.controls._radioCssClass=g);a.controls._radioCssText=c?c+" ":g?'class="'+g+'" ':""};a.setLinkCss=function(g,c){null!=g&&(a.controls._linkCssClass=g);a.controls._linkCssText=c?c+" ":g?'class="'+g+'" ':""};a.setMenuCss=function(g,c){null!=
g&&(a.controls._menuCssClass=g);a.controls._menuCssText=c?c+" ":g?'class="'+g+'" ':""};a.setAppletSync=function(g,c,b){a._syncedApplets=g;a._syncedCommands=c;a._syncedReady={};a._isJmolJSVSync=b};a.setGrabberOptions=function(g){a._grabberOptions=g};a.setAppletHtml=function(g,c){g._code&&(a.$html(c,g._code),g._init&&!g._deferApplet&&g._init())};a.coverApplet=function(a,c){a._cover&&a._cover(c)};a.setFileCaching=function(g,c){g?g._cacheFiles=c:a.fileCache=c?{}:null};a.updateView=function(a,c,b){a._updateView(c,
b)};a.getChemicalInfo=function(g,c,b){c||(c="name");"string"!=typeof applet_or_Identifier&&(g=g._getSmiles());return a._getNCIInfo(g,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,_debugging:!1},function(a,h){try{a._debugging=0<=document.location.href.indexOf("j2sdebug")}catch(g){}var c=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){c.push(a);window[a]=b};a.getGlobals=function(){return c.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=
a)};var b=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 d=a._O.prototype;d.equals=function(a){return this==a};d.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};d.getClass=function(){return a.getClass(this)};
d.clone=function(){return a.clone(this)};a.clone=function(a){var b=new a.constructor,c;for(c in a)b[c]=a[c];return b};d.finalize=function(){};d.notify=function(){};d.notifyAll=function(){};d.wait=function(){};d.to$tring=Object.prototype.toString;d.toString=function(){return this.__CLASS_NAME__?"["+this.__CLASS_NAME__+" object]":this.to$tring.apply(this,arguments)};a._extendedObjectMethods="equals hashCode getClass clone finalize notify notifyAll wait to$tring toString".split(" ");a.extendJO=function(b,
c){c&&(b.__CLASS_NAME__=b.prototype.__CLASS_NAME__=c);if(a._supportsNativeObject)for(var d=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 k=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},l=function(){};a.inheritArgs=new l;a.inheritClass=function(b,c,d){for(var e in c)"b$"!=e&&("prototype"!=e&&"superClazz"!=e&&"__CLASS_NAME__"!=e&&"implementz"!=e&&!k(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),e(a,b);else{if(b instanceof Array)for(var d=0;d<b.length;d++)c.push(b[d]),e(a,b[d])}else for(d=1;d<arguments.length;d++)c.push(arguments[d]),e(a,arguments[d])}};var e=function(a,b){for(var c in b)if("b$"!=c&&"prototype"!=c&&"superClazz"!=c&&"__CLASS_NAME__"!=c&&"implementz"!=c&&("function"!=typeof b[c]||!k(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 "n":case "b":return-1;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]){f=0<g?j[--g].prototype[d]: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||[]);"construct"!=d&&(a.alert(["j2slib","no class found",e.typeString]),
X(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 j=function(){this.toString=function(){return"J2S MethodException"}},
f;try{null.hello()}catch(s){if(d=function(a,b,c){c||(c="[^\\s]+");var d=a.indexOf(b);a=a.substring(0,d)+c+a.substring(d+b.length);return RegExp("^"+a+"$")},/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var d=s.message.indexOf(":"),q=s.message.indexOf(":",d+2),O=s.message.substr(d+1,q-d-20);f=function(a){return-1!=a.message.indexOf(O)}}else if(-1!=navigator.userAgent.toLowerCase().indexOf("webkit")){var Q=d(s.message,"hello");f=function(a){return Q.test(a.message)}}else Q=d(s.message,"$$o$$"),
f=function(a){return Q.test(a.message)}}a.exceptionOf=function(b,c){if(b.__CLASS_NAME__)return a.instanceOf(b,c);b.getMessage||(b.getMessage=function(){return""+this});b.printStackTrace||(b.printStackTrace=function(){},alert(b+" try/catch path:"+a.getStackTrace(-10)));if(c==Error){if(0>(""+b).indexOf("Error"))return!1;System.out.println(a.getStackTrace());return!0}return c==Exception||c==Throwable||c==NullPointerException&&f(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(c,d,e,f){a.assureInnerClass&&a.assureInnerClass(c,e);e.exName=d;f=z(f);var g=c.prototype,h=g[d];a._Loader._checkLoad&&U(c,d,f);if(!h||h.claxxOwner===c&&h.funParams==f)return e.funParams=f,e.claxxOwner=c,e.exClazz=c,g[d]=e;var k=null,l=h.stacks;l||(l=[],k=h,h.claxxOwner&&
(l[0]=k.claxxOwner));if(!h.stacks||h.claxxReference!==c){var m=++ra,h=function(){var c;a:{var d=arguments.callee.claxxReference,e=arguments.callee.methodName;c=arguments;fx=this[e];var f=a.getParamsType(c),D="SAEM "+d.__CLASS_NAME__+"."+e+"("+f+")\n";300<xxxSAEMlist.length&&(xxxSAEMlist="");xxxSAEMlist+=D;if(!fx)try{System.out.println(a.getStackTrace(5))}catch(xa){}b&&(D=m+" "+d.__CLASS_NAME__+" "+e+" ",0>r.indexOf(D)&&(r+=D+"\n"),b[D]||(b[D]=0),b[D]++);if(fx.lastParams==f.typeString&&fx.lastClaxxRef===
d){if(f.hasCastedNull){d=[];for(e=0;e<c.length;e++)d[e]=c[e]instanceof a.CastedNull?null:c[e]}else d=c;c=fx.lastMethod?fx.lastMethod.apply(this,d):null}else{fx.lastParams=f.typeString;fx.lastClaxxRef=d;D=fx.stacks;D||(D=d.prototype[e].stacks);for(var g=!1,A=D.length;0<=--A;)if(g||D[A]===d){var h=D[A].prototype[e],E=f,g=c,k=fx,l=[],I=!0,u=void 0;for(u in h)if(92==u.charCodeAt(0)){var y=u.substring(1).split("\\");y.length==E.length&&l.push(y);I=!1}else if(I&&"funParams"==u&&h.funParams){u=h.funParams;
y=u.substring(1).split("\\");y.length==E.length&&(l[0]=y);break}u=void 0;if(!(u=0==l.length)){u=void 0;for(var u=[],W=l.length,y=0;y<W;y++){for(var n=[],s=!0,q=l[y].length,x=0;x<q;x++)if(n[x]=a.getInheritedLevel(E[x],l[y][x]),0>n[x]){s=!1;break}s&&(n[E.length]=y,u.push(n))}if(0==u.length)u=null;else{W=u[0];for(y=1;y<u.length;y++){n=!0;for(x=0;x<E.length;x++)if(W[x]<u[y][x]){n=!1;break}n&&(W=u[y])}u=l[W[E.length]].join("\\")}u=!(l=u)}if(u)g=new j;else{h=I?h:h["\\"+l];I=null;if(E.hasCastedNull){I=[];
for(E=0;E<g.length;E++)I[E]=g[E]instanceof a.CastedNull?null:g[E]}else I=g;k.lastMethod=h;g=h.apply(this,I)}if(!(g instanceof j)){c=g;break a}g=!0}"construct"!=e&&X(this,d,e,f.typeString);c=void 0}}return c};h.methodName=d;h.claxxReference=c;h=g[d]=h;d=[];for(g=0;g<l.length;g++)d[g]=l[g];h.stacks=d}l=h.stacks;0>V(l,c)&&l.push(c);k&&(k.claxxOwner===c?(h[k.funParams]=k,k.claxxOwner=null,k.funParams=null):k.claxxOwner||(h["\\unknown"]=k));e.exClazz=c;h[f]=e;return h};duplicatedMethods={};var U=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 V=function(a,b){if(a&&b)for(var c=a.length;0<=--c;)if(a[c]===b)return c;
return-1},R=function(a,b){var c=V(a,b);if(0<=c){for(var d=a.length-1;c<d;c++)a[c]=a[c+1];a.length--;return!0}},z=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=z(e);a._Loader._checkLoad&&
U(b,c,e);d.funParams=e;d.claxxOwner=b;return b.prototype[c]=d};var r="";a.getProfile=function(){var a="";if(b){var a=[],c;for(c in b){var d=""+b[c];a.push("        ".substring(d.length)+d+"\t"+c)}a=a.sort().reverse().join("\r\n");b={}}return a+r};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 ra=0;xxxSAEMlist="";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 Y=!1;-1!=navigator.userAgent.indexOf("Safari")&&(d=navigator.userAgent,q=d.indexOf("Version/"),-1!=q&&(d=
d.substring(q+8),Y=4<=parseFloat(d)));a.instantialize=function(a,b){if(!b||!(1==b.length&&b[0]&&b[0]instanceof l)){a instanceof Number&&(a.valueOf=function(){return this});if(Y){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 getCanonicalName 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)},getCanonicalName:function(){return this.__CLASS_NAME__},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(a=
this.getResourceAsStream(a))?a.url:null},getResourceAsStream:function(b){if(!b)return null;b=b.replace(/\\/g,"/");var c=null,d=b,d=this.__CLASS_NAME__;2==arguments.length&&0!=b.indexOf("/")&&(b="/"+b);if(0==b.indexOf("/"))if(2==arguments.length?(c=arguments[1])||(c=a.binaryFolders[0]):a._Loader&&(c=a._Loader.getClasspathFor(d,!0)),c){var c=c.replace(/\\/g,"/"),e=c.length,e=c.charAt(e-1);"/"!=e&&(c+="/");d=c+b.substring(1)}else d=b.substring(1);else{if(this.base)c=this.base;else if(a._Loader)if(c=
a._Loader.getClasspathFor(d),e=c.lastIndexOf(d.replace(/\./g,"/")),-1!=e)c=c.substring(0,e);else if(e=-1,c.indexOf(".z.js")==c.length-5&&-1!=(e=c.lastIndexOf("/")))for(var c=c.substring(0,e+1),e=d.split(/\./),f=1;f<e.length;f++){for(var g="/",j=0;j<f;j++)g+=e[j]+"/";if(g.length>c.length)break;if(c.indexOf(g)==c.length-g.length){c=c.substring(0,c.length-g.length+1);break}}else c=a._Loader.getClasspathFor(d,!0);else(e=a.binaryFolders)&&e.length&&(c=e[0]);c||(c="j2s/");c=c.replace(/\\/g,"/");e=c.length;
e=c.charAt(e-1);"/"!=e&&(c+="/");this.base?d=c+b:(e=d.lastIndexOf("."),d=-1==e||this.base?c+b:c+d.substring(0,e).replace(/\./g,"/")+"/"+b)}c=null;try{if(0>d.indexOf(":/")){var k=document.location.href.split("?")[0].split("/");k[k.length-1]=d;d=k.join("/")}c=new java.net.URL(d)}catch(l){}k=null==c?null:h._getFileData(d.toString());if(!k||"error"==k||0==k.indexOf("[Exception"))return null;k=(new java.lang.String(k)).getBytes();k=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(k));k.url=
c;return k},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 Z=[];a.pu$h=function(a){a||(a=self.c$);a&&Z.push(a)};a.p0p=function(){return Z.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);$(b,c,d);g?a.inheritClass(b,e,g):e&&a.inheritClass(b,e);f&&a.implementOf(b,f);return b};var $=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(){};$(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"};var X=function(b,c,d,e){b="";e&&(b=e.substring(1).replace(/\\/g,","));c=(d&&"construct"!=d?"Method":"Constructor")+" "+a.getClassName(c,!0)+"."+d+"("+b+") is not found!";throw new java.lang.NoSuchMethodException(c);};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;d=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=d(32))):(Int32Array=function(a){a||(a=0);var b=Array(a);b.toString=function(){return"[object Int32Array]"};for(var c=0;c<a;c++)b[c]=0;return b},a.haveInt32=
!1,Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.clone=d(32),Int32Array.prototype.int32Fake=function(){});self.Float64Array&&self.Float64Array!=Array?(a.haveFloat64=!0,Float64Array.prototype.sort||(Float64Array.prototype.sort=Array.prototype.sort),Float64Array.prototype.clone||(Float64Array.prototype.clone=d(64))):(a.haveFloat64=!1,Float64Array=function(a){a||(a=0);for(var b=Array(a),c=0;c<a;c++)b[c]=0;return b},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.clone=
d(64),Float64Array.prototype.float64Fake=function(){},Float64Array.prototype.toString=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 L=function(a,b){return a.constructor&&a.constructor!=Number&&0<=a.constructor.toString().indexOf(b)};
a.isAS=function(a){return a&&"object"==typeof a&&L(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?L(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?L(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&&L(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};a.checkPrivateMethod=function(){me=arguments.callee.caller;caller=arguments.callee.caller.caller;var b="\\"+a.getParamsType(arguments[0]).join("\\");me.privateNote||(me.privateNote="You are seeing this note because the method "+me.exName+b+" in class "+me.exClazz.__CLASS_NAME__+" has a superclass method by the same name (possibly with the same parameters) that is private and  therefore might be called improperly from this class. If your  code does not run properly, or you want to make it run faster, change the name of this method to something else.",
System.out.println(me.privateNote),alert(me.privateNote));return null};java.lang.Object=a._O;a._O.getName=a._innerFunctions.getName;java.lang.System=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];if("undefined"!=typeof c)return c;if(0<a.indexOf(".")){c=null;switch(a){case "java.version":case "file.separator":case "path.separator":c="/";break;case "line.separator":c=0<=navigator.userAgent.indexOf("Windows")?"\r\n":"\n";break;case "os.name":case "os.version":c=navigator.userAgent}if(c)return System.$props[a]=c}return 1==arguments.length?null:null==b?a:b},getSecurityManager:function(){return null},setProperties:function(a){System.props=a},lineSeparator:function(){return"\n"},
setProperty:function(a,b){if(!System.props)return System.$props[a]=b;System.props.setProperty(a,b)}};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(a){switch(null==a?0:a.length){case 0:return new this;case 1:return new this(a[0]);case 2:return new this(a[0],a[1]);case 3:return new this(a[0],a[1],a[2]);case 4:return new this(a[0],a[1],a[2],a[3]);
default:for(var b="new "+this.__CLASS_NAME__+"(",c=0;c<a.length;c++)b+=(0==c?"":",")+"a["+c+"]";return eval(b+")")}};d=a.innerFunctionNames;for(q=0;q<d.length;q++)a._O[d[q]]=a._innerFunctions[d[q]],Array[d[q]]=a._innerFunctions[d[q]];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)aa(c[h]);for(h in c.prototype)aa(c.prototype[h]);a._Loader&&a._Loader.unloadClassExt(b);return!0}return!1};var aa=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=F(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 r=9;try{r=parseFloat(j.subString(k+6))}catch(s){}9.6<=
r&&(g=6)}var q;self.Clazz&&a.isClassDefined?isClassDefined=a.isClassDefined:(q={},isClassDefined=function(a){return!0==q[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},B=[],v={},z=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")&&G("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"]?(z++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){0==--z&&sa()},!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);G("java")&&b.loadPackage("java");G("core")&&b.loadPackage("core");b.keepOnLoading=!0;if(!g&&(z&&c.lastIndexOf(".package")!=c.length-8||0!=c.indexOf("java.")&&!isClassDefined(ba)))la.push([c,f]),System.out.println("loadclass-queuing"+c+ba+" "+isClassDefined(ba));else if((j=isClassDefined(c))||H["@"+c]){if(j&&f&&(g=F(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=
B.length;0<=--h;)if(B[h].path==k||B[h].name==c){j=!0;break}if(j){if(f&&(j=F(c)))if(j.onLoaded){if(f!=j.onLoaded){var l=j.onLoaded,A=f;j.onLoaded=function(){l();A()}}}else j.onLoaded=f}else{j=a.unloadedClasses[c]&&F(c)||new m;j.name=c;j.path=k;j.isPackage=k.lastIndexOf("package.js")==k.length-10;ga(k,c,j);j.onLoaded=f;j.status=m.STATUS_KNOWN;c=!1;for(h=B.length;0<=--h;)if(B[h].status!=m.STATUS_LOAD_COMPLETE){c=!0;break}if(j.isPackage){for(h=B.length;0<=--h&&!B[h].isPackage;)B[h+1]=B[h];B[++h]=j}else c&&
B.push(j);if(!c){var n=!1;f&&(n=K,K=!0);g&&(f=null);ca(d,j,!0);L(j,j.path,j.requiredBy,!1,f?function(){K=n;f()}:null)}}}};var G=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++)H["@"+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 C={},H={},N=function(c,d,e){try{eval(e+";//# sourceURL="+c)}catch(f){if(a._isQuiet)return;c="[Java2Script] The required class file \n\n"+c+(0==e.indexOf("[Exception")&&e.indexOf("data: no")?"\nwas not found.\n":"\ncould not be loaded. Script error: "+f.message+" \n\ndata:\n\n"+e)+"\n\n"+a.getStackTrace();alert(c);a.alert(c);throw f;}b.onScriptLoaded(c,
!1);x(d)},O=function(a){return function(){if("interactive"!=a.readyState){try{a.parentNode&&a.parentNode.removeChild(a)}catch(b){}a=null}}},M=function(a){window["j2s.script.debugging"]||window.setTimeout(O(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 L=function(c,d,
g,j,k){a.currentPath=d;j&&alert("WHY>>");e[d]=!0;R(B,d);ha=!0;ia=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+"  ajax="+ha+" async="+ia);g=d;a._debugging&&(d=d.replace(/\.z\.js/,".js"));b.onScriptLoading(d);if(ha&&!ia){j=h._getFileData(d);try{N(d,g,j)}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:P(d,!1,k),error:P(d,
!0,k)},f++,h.$ajax(c)},P=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(){M(a);x(c,e)}:function(){M(a);x(c)};0<=ma?window.setTimeout(function(){x(c,g)},ma):x(c,g)}},K=!0,Q=!1,x=function(c,h){var j=C["@"+c];if(j){var k,t=v["$"+c];if(t)for(var p=0;p<t.length;p++){var A=t[p];if(A!=
j.name&&(k=F(A)))k.status<m.STATUS_CONTENT_LOADED&&(k.status=m.STATUS_CONTENT_LOADED,updateNode(k));else{k=new m;k.name=A;var n=v["#"+A];n||(alert(A+" J2S error in tryToLoadNext"),error("Java2Script implementation error! Please report this bug!"));k.path=n;ga(k.path,A,k);k.status=m.STATUS_CONTENT_LOADED;ca(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=na(m.STATUS_KNOWN))for(ja(k);f<g&&(k=na(m.STATUS_KNOWN));)ja(k);else if(0!=B.length)k=B.shift(),!e[k.path]||0!=B.length||!K||k.musts.length||k.optionals.length?(ca(d,k,!0),L(k,k.path,
k.requiredBy,!1)):K&&(K=!1);else if(k=oa(m.STATUS_KNOWN))for(ja(k);f<g&&(k=oa(m.STATUS_KNOWN));)ja(k);else p=!1;if(!(p||0<f)){j=[na,oa];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(;!(T=[],!U(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++)S(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(A in b._classPending){if(k=F(A),System.out.println("class left pending "+A+" "+k),k){updateNode(k);break}}else b._checkLoad&&(System.out.println("I think I'm done: SAEM call count: "+ra),a.showDuplicates(!0));b.onGlobalLoaded()}}}},T=[],U=function(a,c){var d=T,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;S(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&&U(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=F(c);d?(a.push(d),System.out.println(V("","",d,"",0))):alert("No node for "+c)}return a};var V=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=V(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)S(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;S(f);if(f.declaration&&f.declaration.clazzList){for(var h=0,j=f.declaration.clazzList,k=j.length;h<k;h++){var l=F(j[h]);l&&(l.status!=m.STATUS_LOAD_COMPLETE&&l!==f)&&(l.status=f.status,l.declaration=null,S(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;q&&(q[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=F(j[h]))&&l.status!=m.STATUS_DECLARED&&l!==a)l.status=m.STATUS_DECLARED,q&&(q[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||X(a.musts,m.STATUS_LOAD_COMPLETE)&&X(a.optionals,m.STATUS_LOAD_COMPLETE)){c=m.STATUS_LOAD_COMPLETE;if(!Y(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=
F(j[h]))&&l.status!=c&&l!==a)if(l.declaration=null,!Y(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 X=function(a,b){for(var c=a.length;0<=--c;)if(a[c].status<b)return!1;return!0},Y=function(a,c){a.status=c;b.onScriptCompleted(a.path);var d=a.onLoaded;if(d&&(a.onLoaded=null,d(),!b.keepOnLoading))return!1;S(a);return!0},Z={"r0.13412":1},$=function(){for(;;){var a=Math.random(),
b="r"+a;if(!Z[b])return Z[b]=1,d.random=a}},F=function(a){$();return aa(a,d)},oa=function(a){$();return fa(d,a)},na=function(a){return ea(d,a)},aa=function(a,b){var c;return b.name==a?b:(c=da(a,b.musts))||(c=da(a,b.optionals))?c:null},da=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=aa(a,f)))return f}return null},ka=function(a,b){return a.status==b&&(b!=m.STATUS_KNOWN||!e[a.path])&&(b==m.STATUS_DECLARED||!isClassDefined(a.name))},ea=function(a,
b){for(var c=a.musts.length;0<=--c;){var d=a.musts[c];if(ka(d,b)||(d=ea(d,b)))return d}return ka(a,b)?a:null},fa=function(a,b){var c;return(c=ta(a.musts,b))||(c=ta(a.optionals,b))||ka(c=a,b)?c:null},ta=function(a,b){if(a)for(var c=d.random,e=0;e<a.length;e++){var f=a[e];if(ka(f,b)||f.random!=c&&(f.random=c,f=fa(f,b)))return f}return null},ua={},pa=function(a,c,e,f){if(c instanceof Array){w(c);for(var g=0;g<c.length;g++)pa(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=C["#"+c];g||(g=(g=F(c))?g:new m,g.name=c,g.path=v["#"+c]||"unknown",ga(g.path,c,g),g.status=m.STATUS_KNOWN,ca(d,g,!1));va(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;va(g,e,!1)}},va=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)&&!H["@"+e]){var f=F(e);f||(f=new m,f.name=e,
f.status=m.STATUS_KNOWN);f.requiredBy=a;ca(a,f,c)}}}};window.Clazz?a.load=pa:b.load=pa;var ga=function(a,b,c){var d="@"+a;if(a=C[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 C[d]=[a,c];else C[d]=c;C["#"+b]=c},ja=function(a){var c=a.name;if(!isClassDefined(c)&&!H["@"+c]){var d=b.getClasspathFor(c);a.path=d;ga(d,c,a);if(!e[d])return L(a,d,a.requiredBy,!1),!0}return!1},ba=b.runtimeKeyClass="java.lang.String",la=[];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 ia=!0,ha=!1,ma=-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);ha=e;ma=(ia=d)&&0<=c?c:-1;return d};var sa=function(){if(!z&&isClassDefined(ba)){for(var a=la,c=0;c<a.length;c++)b.loadClass(a[c][0],a[c][1]);la=[]}};b.loadZJar=
function(a,c){var d=null,e=c instanceof Array;e?c=c[c.length-1]:d=c==ba?sa:null;b.jarClasspath(a,e?c:[c]);b.loadClass(c,d,!0)};var wa={},qa=[],ca=function(a,b,c){var e=!1;c?(c=a.musts,b.requiredBy||(b.requiredBy=a)):c=a.optionals;wa[b.name]||(qa.push(b),wa[b.name]=b);for(var f=0;f<c.length;f++)if(c[f].name==b.name){e=!0;break}e||(c.push(b),K&&(0!=b.name.indexOf("java")&&0!=b.name.indexOf("net.sf.j2s.ajax"))&&(Q&&(K=!1),Q=!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)}},S=function(a){var b=a.parents;if(b)for(var c=b.length;0<=--c;)R(b[c].musts,a)||R(b[c].optionals,a)};b.unloadClassExt=function(a){q&&(q[a]=!1);if(v["#"+a]){var c=v["#"+a];v["#"+a]=null;var d=v["$"+c];R(d,a)&&(v["$"+c]=d)}if(c=F(a))c.status=m.STATUS_KNOWN,e[c.path]=!1;c=b.getClasspathFor(a);e[c]=!1;ua[c]&&(ua[c]=!1);b.onClassUnloaded(a)};a.binaryFolders=b.binaryFolders=[b.getJ2SLibBase()]})(a,a._Loader);a._LoaderProgressMonitor={};var C=a._LoaderProgressMonitor,M=
null,N=0,w=null,T=0;C.DEFAULT_OPACITY=h&&h._j2sLoadMonitorOpacity?h._j2sLoadMonitorOpacity:55;C.hideMonitor=function(){w.style.display="none"};C.showStatus=function(a,b){if(!w){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=qa;w=c;document.body.appendChild(c);
da||(da=!0)}ea(w);if(null==a)b?P():C.hideMonitor();else{w.appendChild(document.createTextNode(""+a));"none"==w.style.display&&(w.style.display="");fa(C.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;T!=c&&(T=c,w.style.bottom=T+4+"px");b&&P()}};var ea=function(a){if(a)for(var b=a.childNodes.length;0<=
--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&ea(c);try{a.removeChild(c)}catch(d){}}}},fa=function(a){M&&a==C.DEFAULT_OPACITY&&(window.clearTimeout(M),M=null);N=a;navigator.userAgent.toLowerCase();w.style.filter="Alpha(Opacity="+a+")";w.style.opacity=a/100},qa=function(){C.hideMonitor()},da=!1,P=function(){"none"!=w.style.display&&(N==C.DEFAULT_OPACITY?(M=window.setTimeout(function(){P()},750),N-=5):0<=N-10?(fa(N-10),M=window.setTimeout(function(){P()},40)):w.style.display=
"none")},n=a.Console,G=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 H=String.fromCharCode(160),H=H+(H+H+H);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,H);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,H);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=H);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")};G.out.print=function(a){n.consoleOutput(a)};G.out.println=function(a){n.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};G.out.write=function(a,b,c){G.out.print(String.instantialize(a).substring(b,b+c))};G.err.__CLASS_NAME__="java.io.PrintStream";G.err.print=function(a){n.consoleOutput(a,"red")};G.err.println=function(a){n.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};G.err.write=function(a,b,c){G.err.print(String.instantialize(a).substring(b,
b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2015-10-14 19:01:37 -0500 (Wed, 14 Oct 2015) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.4.0_2015.10.14";
