(function(a){function j(a){try{return a?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest}catch(d){}}a.ajaxSettings.xhr=void 0===window.ActiveXObject?j:function(){return(this.url==document.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&j()||j(1)};a.ajaxTransport("+script",function(a){var d,b=document.head||jQuery("head")[0]||document.documentElement;return{send:function(c,k){d=document.createElement("script");a.scriptCharset&&
(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,b){if(b||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),d=null,b||k(200,"success")};b.insertBefore(d,b.firstChild)},abort:function(){if(d)d.onload(void 0,!0)}}});a.extend(a.support,{iecors:!!window.XDomainRequest});a.support.iecors?a.ajaxTransport(function(a){return{send:function(d,b){var c=new window.XDomainRequest;c.onload=function(){b(200,
"OK",{text:c.responseText},{"Content-Type":c.contentType})};a.xhrFields&&(c.onerror=a.xhrFields.error,c.ontimeout=a.xhrFields.timeout);c.open(a.type,a.url);c.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 d;return{send:function(b,c){var k=a.xhr();console.log("xhr.open binary async="+a.async+" url="+a.url);k.open(a.type,a.url,a.async);
var j=!1;try{k.hasOwnProperty("responseType")&&(k.responseType="arraybuffer",j=!0)}catch(l){}try{!j&&k.overrideMimeType&&k.overrideMimeType("text/plain; charset=x-user-defined")}catch(e){}!a.crossDomain&&!b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");try{for(var f in b)k.setRequestHeader(f,b[f])}catch(h){}k.send(a.hasContent&&a.data||null);d=function(){var e=k.status,f="",h=k.getAllResponseHeaders(),b={};try{if(d&&4===k.readyState){d=void 0;try{b.text="string"===typeof k.responseText?
k.responseText:null}catch(j){}try{b.binary=k.response}catch(m){}try{f=k.statusText}catch(l){f=""}!e&&a.isLocal&&!a.crossDomain?e=b.text?200:404:1223===e&&(e=204);c(e,f,b,h)}}catch(t){alert(t),c(-1,t)}};a.async?4===k.readyState?setTimeout(d):k.onreadystatechange=d:d()},abort:function(){}}}))})(jQuery);
(function(a,j,g,d){function b(b,g){function m(e){a(l).each(function(){self.Jmol&&(0<=g.indexOf("mouseup")||0<=g.indexOf("touchend"))&&Jmol._setMouseOwner(null);var h=a(this);this!==e.target&&!h.has(e.target).length&&h.triggerHandler(g,[e.target,e])})}g=g||b+d;var l=a(),e=b+"."+g+"-special-event";a.event.special[g]={setup:function(){l=l.add(this);1===l.length&&a(j).bind(e,m)},teardown:function(){self.Jmol&&Jmol._setMouseOwner(null);l=l.not(this);0===l.length&&a(j).unbind(e)},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"+d);b("focusout","blur"+d)})(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 j=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}},j={_version:"$Date: 2017-04-27 20:28:06 -0500 (Thu, 27 Apr 2017) $",_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:j,_z:j(Jmol.z||9E3),_debugCode:!0,_debugCore:!1,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":null,".x3dna.org":null,"rruff.geo.arizona.edu":null,".rcsb.org":null,
"ftp.wwpdb.org":null,"pdbe.org":null,"materialsproject.org":null,".ebi.ac.uk":null,"pubchem.ncbi.nlm.nih.gov":null,"www.nmrdb.org/tools/jmol/predict.php":null,$:"https://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf&get3d=True",$$:"https://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf","=":"https://files.rcsb.org/download/%FILE.pdb","*":"https://www.ebi.ac.uk/pdbe/entry-files/download/%FILE.cif","==":"https://files.rcsb.org/ligands/download/%FILE.cif",":":"https://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:"https://your.server.here/jsmol.php",_syncId:(""+Math.random()).substring(3),
_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1};a=a.location.href.toLowerCase();j._debugCore=0<=a.indexOf("j2sdebugcore");j._httpProto=0==a.indexOf("https")?"https://":"http://";j._isFile=0==a.indexOf("file:");j._isFile&&$.ajaxSetup({mimeType:"text/plain"});j._ajaxTestSite=j._httpProto+"google.com";a=j._isFile||0==a.indexOf("http://localhost")||0==a.indexOf("http://127.");j._tracker=!a&&"https://chemapps.stolaf.edu/jmol/JmolTracker.php?id=UA-45940799-1";j._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");
j._isSafari=!j._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari");j._isMsie=void 0!==window.ActiveXObject;j._isEdge=0<=navigator.userAgent.indexOf("Edge/");j._useDataURI=!j._isSafari&&!j._isMsie&&!j._isEdge;window.requestAnimationFrame||(window.requestAnimationFrame=window.setTimeout);for(var g in Jmol)j[g]=Jmol[g];return j}(document,Jmol));
(function(a,j){a.__$=j;j(document).ready(function(){a._document=null});a.$=function(a,f){null==a&&alert(f+arguments.callee.caller.toString());return j(f?"#"+a._id+"_"+f:a)};a._$=function(a){return"string"==typeof a?j("#"+a):a};a.$ajax=function(e){a._ajaxCall=e.url;e.cache="NO"!=e.cache;e.url=a._fixProtocol(e.url);return j.ajax(e)};a._fixProtocol=function(e){0<=e.indexOf("get3d=True")&&(e=e.replace(/get3d\=True/,"get3d=true"));return 0==e.indexOf("http://www.rcsb.org/pdb/files/")&&0>e.indexOf("/ligand/")?
"http://files.rcsb.org/view/"+e.substring(30).replace(/\.gz/,""):0==e.indexOf("http://")&&("https://"==a._httpProto||0<e.indexOf(".gov/")||0==e.indexOf("http://www.materialsproject"))?"https"+e.substring(4):e};a._getNCIInfo=function(e,f){return a._getFileData("https://cactus.nci.nih.gov/chemical/structure/"+e+"/"+("name"==f?"names":f))};a.$appEvent=function(e,f,h,b){e=a.$(e,f);e.off(h)&&b&&e.on(h,b)};a.$resize=function(a){return j(window).resize(a)};a.$after=function(a,f){return j(a).after(f)};a.$append=
function(a,f){return j(a).append(f)};a.$bind=function(a,f,h){return h?j(a).bind(f,h):j(a).unbind(f)};a.$closest=function(a,f){return j(a).closest(f)};a.$get=function(a,f){return j(a).get(f)};a.$documentOff=function(a,f){return j(document).off(a,"#"+f)};a.$documentOn=function(a,f,h){return j(document).on(a,"#"+f,h)};a.$getAncestorDiv=function(a,f){return j("div."+f+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return j.support.iecors};a.$attr=function(e,f,h){return a._$(e).attr(f,
h)};a.$css=function(e,f){return a._$(e).css(f)};a.$find=function(e,f){return a._$(e).find(f)};a.$focus=function(e){return a._$(e).focus()};a.$html=function(e,f){return a._$(e).html(f)};a.$offset=function(e){return a._$(e).offset()};a.$windowOn=function(a,f){return j(window).on(a,f)};a.$prop=function(e,f,h){var b=a._$(e);return 3==arguments.length?b.prop(f,h):b.prop(f)};a.$remove=function(e){return a._$(e).remove()};a.$scrollTo=function(e,f){var h=a._$(e);return h.scrollTop(0>f?h[0].scrollHeight:f)};
a.$setEnabled=function(e,f){return a._$(e).attr("disabled",f?null:"disabled")};a.$getSize=function(e){e=a._$(e);return[e.width(),e.height()]};a.$setSize=function(e,f,h){return a._$(e).width(f).height(h)};a.$is=function(e,f){return a._$(e).is(f)};a.$setVisible=function(e,f){var h=a._$(e);return f?h.show():h.hide()};a.$submit=function(e){return a._$(e).submit()};a.$val=function(e,f){var h=a._$(e);return 1==arguments.length?h.val():h.val(f)};a._clearVars=function(){delete jQuery;delete j;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,d=window,b={};b.ua=navigator.userAgent.toLowerCase();var c;a:{c=["linux","unix","mac","win"];for(var k=c.length;k--;)if(-1!=b.ua.indexOf(c[k])){c=c[k];break a}c="unknown"}b.os=c;b.browser=function(){for(var a=b.ua,f="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),h=0;h<f.length;h++)if(0<=a.indexOf(f[h]))return f[h];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 j.support.cors||j.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=d.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"),f=a.length;0<=--f;)if(0<=a[f].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,f=b.os;if("opera"==b.browserName&&7.54>=b.browserVersion&&"mac"==f||"webkit"==b.browserName&&125.12>b.browserVersion||"msie"==b.browserName&&"mac"==f||"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=d.File&&d.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 f='<input type="text" id="ID_query" onfocus="jQuery(this).select()" onkeypress="if(13==event.which){Jmol._applets[\'ID\']._search();return false}" size="32" value="" />',h='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(f="<nobr>"+f+'<span style="display:none">',h="</span>"+h):f+="<br /><nobr>";for(var f=f+'<select id="ID_select">',b=0;b<a._grabberOptions.length;b++)var c=a._grabberOptions[b],
f=f+('<option value="'+c[0]+'" '+(0==b?"selected":"")+">"+c[1]+"</option>");f=(f+"</select>"+h).replace(/ID/g,e._id);return"<br />"+f};a._getScriptForDatabase=function(e){return"$"==e?a.db._nciLoadScript:":"==e?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,f,h){var b=[],c="";if(0==h.indexOf("ERROR"))c=h;else switch(f){case "=":f=h.split("<dimStructure.structureId>");b=["<table>"];for(h=1;h<f.length;h++)b.push('<tr><td valign=top><a href="javascript:Jmol.search('+a._id+",'="+
f[h].substring(0,4)+"')\">"+f[h].substring(0,4)+"</a></td>"),b.push("<td>"+f[h].split("Title>")[1].split("</")[0]+"</td></tr>");b.push("</table>");c=f.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=c;a._info=b.join("");a._showInfo(!0)};a._loadSuccess=function(e,f){f&&(a._ajaxDone(),f(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,f){if(f&&!a.featureDetection.supportsXhr2())return e;var h=2,b=e.substring(0,h),c=a.db._DirectDatabaseCalls[b]||a.db._DirectDatabaseCalls[b=e.substring(0,--h)];c&&(":"==b?(b=e.toLowerCase(),isNaN(parseInt(e.substring(1)))?0==b.indexOf(":smiles:")?(c+="?POST?smiles="+e.substring(8),e="smiles"):0==b.indexOf(":cid:")?e="cid/"+e.substring(5):(0==b.indexOf(":name:")?e=e.substring(5):0==b.indexOf(":cas:")&&(e=e.substring(4)),e="name/"+encodeURIComponent(e.substring(h))):
e="cid/"+e.substring(1)):e=encodeURIComponent(e.substring(h)),0<=e.indexOf(".mmtf")?e="http://mmtf.rcsb.org/full/"+e.replace(/\.mmtf/,""):0<=c.indexOf("FILENCI")?(e=e.replace(/\%2F/g,"/"),e=c.replace(/\%FILENCI/,e)):e=c.replace(/\%FILE/,e));return e};a._getRawDataFromServer=function(e,f,h,b,c,d){e="?call=getRawDataFromDatabase&database="+e+(0<=f.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(f)+(c?"&encoding=base64":"")+(d?"":"&script="+encodeURIComponent(a._getScriptForDatabase(e)));
return a._contactServer(e,h,b)};a._checkFileName=function(e,f,h){a._isDatabaseCall(f)&&(h&&a._setQueryTerm(e,f),f=a._getDirectDatabaseCall(f,!0),a._isDatabaseCall(f)&&(f=a._getDirectDatabaseCall(f,!1),h&&(h[0]=!0)));return f};a._checkCache=function(e,f,h){if(e._cacheFiles&&a._fileCache&&!f.endsWith(".js")){if(e=a._fileCache[f])return System.out.println("using "+e.length+" bytes of cached data for "+f),h(e),null;h=function(e,f){h(a._fileCache[e]=f)}}return h};a._playAudio=function(a){var f=document.createElement("audio");
f.controls="true";f.src=a;f.play()};a._loadFileData=function(e,f,h,b){var c=[];f=a._checkFileName(e,f,c);h=a._checkCache(e,f,h);c[0]?a._getRawDataFromServer("_",f,h,b):(e={type:"GET",dataType:"text",url:f,async:a._asynchronous,success:function(e){a._loadSuccess(e,h)},error:function(){a._loadError(b)}},a._checkAjaxPost(e),a._ajax(e))};a._getInfoFromDatabase=function(e,f,h){if("===="==f){var b=a.db._restQueryXml.replace(/QUERY/,h),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,f,h,b)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(b)}h="?call=getInfoFromDatabase&database="+f+"&query="+encodeURIComponent(h);return a._contactServer(h,function(h){a._setInfo(e,f,h)})};a._extractInfoFromRCSB=function(e,f,h,b){var c=b.length/5;if(0!=c&&4==h.length&&1!=c){h=h.toUpperCase();var d=b.indexOf(h);0<d&&0<="123456789".indexOf(h.substring(0,
1))&&(b=h+","+b.substring(0,d)+b.substring(d+5));50<c&&(b=b.substring(0,250));b=b.replace(/\n/g,",");b=a._restReportUrl.replace(/IDLIST/,b);a._loadFileData(e,b,function(h){a._setInfo(e,f,h)})}};a._checkAjaxPost=function(a){var f=a.url.indexOf("?POST?");0<f&&(a.data=a.url.substring(f+6),a.url=a.url.substring(0,f),a.type="POST",a.contentType="application/x-www-form-urlencoded")};a._contactServer=function(e,f,h){e={dataType:"text",type:"GET",url:a._serverUrl+e,success:function(e){a._loadSuccess(e,f)},
error:function(){a._loadError(h)},async:f?a._asynchronous:!1};a._checkAjaxPost(e);return a._ajax(e)};a._setQueryTerm=function(e,f){if(f&&e._hasOptions&&"http://"!=f.substring(0,7)){if(a._isDatabaseCall(f)){var h=f.substring(0,1);f=f.substring(1);f.substring(0,1)==h&&0<="=$".indexOf(h)&&(f=f.substring(1));var b=a._getElement(e,"select");if(b&&b.options)for(var c=0;c<b.options.length;c++)b[c].value==h&&(b[c].selected=!0)}a.$val(a.$(e,"query"),f)}};a._search=function(e,f,h){1<arguments.length||(f=null);
a._setQueryTerm(e,f);f||(f=a.$val(a.$(e,"query")));0==f.indexOf("!")?e._script(f.substring(1)):(f&&(f=f.replace(/\"/g,"")),e._showInfo(!1),a._searchMol(e,f,h,!0))};a._searchMol=function(e,f,h,b){var c;a._isDatabaseCall(f)?(c=f.substring(0,1),f=f.substring(1)):c=e._hasOptions?a.$val(a.$(e,"select")):"$";"="==c&&3==f.length&&(f="="+f);var d=c+f;if(f&&!(0>d.indexOf("?")&&d==e._thisJmolModel)){e._thisJmolModel=d;var g;b&&null!=e._viewSet&&null!=(g=a.View.__findView(e._viewSet,{chemID:d}))?a.View.__setView(g,
e,!1):("$"==c||":"==c?e._jmolFileType="MOL":"="==c&&(e._jmolFileType="PDB"),e._searchDatabase(f,c,h))}};a._searchDatabase=function(e,f,h,b){e._showInfo(!1);return 0<=f.indexOf("?")?(a._getInfoFromDatabase(e,h,f.split("?")[0]),!0):a.db._DirectDatabaseCalls[h]?(e._loadFile(h+f,b),!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 f=new window.XMLHttpRequest;
f.open("text",a._ajaxTestSite,!1);f.hasOwnProperty("responseType")?f.responseType="arraybuffer":f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined")}catch(h){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="mmtf .gz .jpg .gif .png .zip .jmol .bin .smol .spartan .pmb .mrc .map .ccp4 .dn6 .delphi .omap .pse .dcd".split(" ");
a._isBinaryUrl=function(e){for(var f=a._binaryTypes.length;0<=--f;)if(0<=e.indexOf(a._binaryTypes[f]))return!0;return!1};a._getFileData=function(e,f,h){var b=a._isBinaryUrl(e),c=0<=e.indexOf(".gz")&&0<=e.indexOf("rcsb.org");c&&(e=e.replace(/\.gz/,""),b=!1);var c=b&&!f&&!a._canSyncBinary(c),d=0<=e.indexOf("?POST?");0==e.indexOf("file:/")&&0!=e.indexOf("file:///")&&(e="file://"+e.substring(5));var g=0>e.indexOf("://")||0==e.indexOf(document.location.protocol)&&0<=e.indexOf(document.location.host),k=
"https://"==a._httpProto&&0==e.indexOf("http://"),j=a._isDirectCall(e);!j&&0<=e.indexOf("?ALLOWSORIGIN?")&&(j=!0,e=e.replace(/\?ALLOWSORIGIN\?/,""));var m=!g&&a.$supportsIECrossDomainScripting(),l=null;if(k||c||!g&&!j||!f&&m)l=a._getRawDataFromServer("_",e,f,f,c,!0);else{e=e.replace(/file:\/\/\/\//,"file://");var q={dataType:b?"binary":"text",async:!!f};d?(q.type="POST",q.url=e.split("?POST?")[0],q.data=e.split("?POST?")[1]):(q.type="GET",q.url=e);f&&(q.success=function(){f(a._xhrReturn(q.xhr))},
q.error=function(){f(q.xhr.statusText)});q.xhr=a.$ajax(q);f||(l=a._xhrReturn(q.xhr))}if(!h)return l;null==l&&(l="",b=!1);b&&(b=a._canSyncBinary(!0));return b?a._strToBytes(l):JU.SB.newS(l)};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){if(0<=e.indexOf("?ALLOWSORIGIN?"))return!0;for(var f in a.db._DirectDatabaseCalls)if(0<=f.indexOf(".")&&0<=e.indexOf(f))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 f=a.substring(0,1);if("$"==f||":"==f)return"MOL";if("="==f)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,f){return e&&e._z&&e._z[f]||a._z[f]};a._incrZ=function(e,f){return e&&e._z&&++e._z[f]||++a._z[f]};a._hideLocalFileReader=function(e){e._localReader&&
a.$setVisible(e._localReader,!1);e._readingLocal=!1;a._setCursor(e,0)};a.loadFileFromDialog=function(e){a._loadFileAsynchronously(null,e,null,null)};a._loadFileAsynchronously=function(e,f,h,b){if(h&&0!=h.indexOf("?")){var c=h;h=a._checkFileName(f,h);var d=function(d){a._setData(e,h,c,d,b,f)},d=a._checkCache(f,h,d);0<=h.indexOf("|")&&(h=h.split("|")[0]);return null==d?null:a._getFileData(h,d)}if(!a.featureDetection.hasFileReader)return e?e.setData("Local file reading is not enabled in your browser",
null,null,b,f):alert("Local file reading is not enabled in your browser");f._localReader||(d='<div id="ID" style="z-index:'+a._getZ(f,"fileOpener")+';position:absolute;background:#E0E0E0;left:10px;top:10px"><div style="margin:5px 5px 5px 5px;"><button id="ID_loadurl">URL</button><input type="file" id="ID_files" /><button id="ID_loadfile">load</button><button id="ID_cancel">cancel</button></div><div>',a.$after("#"+f._id+"_appletdiv",d.replace(/ID/g,f._id+"_localReader")),f._localReader=a.$(f,"localReader"));
a.$appEvent(f,"localReader_loadurl","click");a.$appEvent(f,"localReader_loadurl","click",function(){var e=prompt("Enter a URL");e&&(a._hideLocalFileReader(f,0),a._setData(null,e,e,null,b,f))});a.$appEvent(f,"localReader_loadfile","click");a.$appEvent(f,"localReader_loadfile","click",function(){var h=a.$(f,"localReader_files")[0].files[0],c=new FileReader;c.onloadend=function(c){c.target.readyState==FileReader.DONE&&(a._hideLocalFileReader(f,0),a._setData(e,h.name,h.name,c.target.result,b,f))};try{c.readAsArrayBuffer(h)}catch(d){alert("You must select a file first.")}});
a.$appEvent(f,"localReader_cancel","click");a.$appEvent(f,"localReader_cancel","click",function(){a._hideLocalFileReader(f);e&&e.setData("#CANCELED#",null,null,b,f)});a.$setVisible(f._localReader,!0);f._readingLocal=!0};a._setData=function(e,f,h,b,c,d){b&&(b=a._strToBytes(b));null!=b&&(null==e||0<=f.indexOf(".jdx"))&&a.Cache.put("cache://"+f,b);null==e?d._applet.openFileAsyncSpecial(null==b?f:"cache://"+f,1):e.setData(f,h,b,c)};a._doAjax=function(e,f,h){e=e.toString();if(null!=h)return a._saveFile(e,
h);f&&(e+="?POST?"+f);return a._getFileData(e,null,!0)};a._saveFile=function(e,f,h,b){if(a._localFileSaveFunction&&a._localFileSaveFunction(e,f))return"OK";e=e.substring(e.lastIndexOf("/")+1);h||(h=0<=e.indexOf(".pdf")?"application/pdf":0<=e.indexOf(".png")?"image/png":0<=e.indexOf(".gif")?"image/gif":0<=e.indexOf(".jpg")?"image/jpg":"");f=(JU?JU:J.util).Base64.getBase64("string"==typeof f?f.getBytes("UTF-8"):f).toString();b||(b="base64");var c=a._serverUrl;c&&0<=c.indexOf("your.server")&&(c="");
a._useDataURI||!c?(b=document.createElement("a"),b.href="data:"+h+";base64,"+f,b.type=h||"text/plain;charset=utf-8",b.download=e,b.target="_blank",j("body").append(b),b.click(),b.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__",f),a.$val("__jsmolfilename__",e),a.$val("__jsmolmimetype__",h),a.$val("__jsmolencoding__",b),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(a){if(Clazz.instanceOf(a,self.ArrayBuffer))return Clazz.newByteArray(-1,a);for(var f=Clazz.newByteArray(a.length,0),h=a.length;0<=--h;)f[h]=a.charCodeAt(h)&255;return f};a._setConsoleDiv=
function(a){self.Clazz&&Clazz.setConsoleDiv(a)};a._registerApplet=function(e,f){return window[e]=a._applets[e]=a._applets[e+"__"+a._syncId+"__"]=f};a._readyCallback=function(e,f,h,b,c){e=e.split("_object")[0];var d=a._applets[e];if(h=h.booleanValue?h.booleanValue():h)d._appletPanel=c||b,d._applet=b;a._track(d)._readyCallback(e,f,h)};a._getWrapper=function(e,f){var b;if(f){var c="";if(e._coverImage)var c=' onclick="Jmol.coverApplet(ID, false)" title="'+e._coverTitle+'"',d='<image id="ID_coverclickgo" src="'+
e._makeLiveImage+'" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:'+a._getZ(e,"coverImage")+';opacity:0.5;"'+c+" />",c='<div id="ID_coverdiv" style="background-color:red;z-index:'+a._getZ(e,"coverImage")+';width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+e._coverImage+'" style="width:100%;height:100%"'+c+"/>"+d+"</div>";d=e._isJava?"":'<image id="ID_waitimage" src="'+e._j2sPath+'/img/cursor_wait.gif" style="display:none;position:absolute;bottom:10px;left:10px;z-index:'+
a._getZ(e,"coverImage")+';" />';b=a._appletCssText.replace(/\'/g,'"');var g=e._getSpinner&&e._getSpinner();e._spinner=g=!g||"none"==g?"":"background-image:url("+g+"); background-repeat:no-repeat; background-position:center;";b=g+(0<=b.indexOf('style="')?b.split('style="')[1]:'" '+b);b='...<div id="ID_appletinfotablediv" style="width:Wpx;height:Hpx;position:relative;font-size:14px;text-align:left">IMG WAIT......<div id="ID_appletdiv" style="z-index:'+a._getZ(e,"header")+";width:100%;height:100%;position:absolute;top:0px;left:0px;"+
b+">";var g=e._height,k=e._width;if("string"!==typeof g||0>g.indexOf("%"))g+="px";if("string"!==typeof k||0>k.indexOf("%"))k+="px";b=b.replace(/IMG/,c).replace(/WAIT/,d).replace(/Hpx/g,g).replace(/Wpx/g,k)}else b='......</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 b.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,e._id)};a._hideLoadingSpinner=function(e){e._spinner&&a.$css(a.$(e,"appletdiv"),{"background-image":""})};a._documentWrite=function(e){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var f=document.getElementsByTagName("script");a._XhtmlElement=f.item(f.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(e):a._document.write(e)}return e};a._domWrite=function(e){for(var f=[0];f[0]<e.length;){var b=a._getDomElement(e,f);if(!b)break;
a._XhtmlAppendChild?a._XhtmlElement.appendChild(b):a._XhtmlElement.parentNode.insertBefore(b,_jmol.XhtmlElement)}};a._getDomElement=function(a,f){var b=document.createElement("span");b.innerHTML=a;f[0]=a.length;return b};a._setObject=function(e,f,b){e._id=f;e.__Info={};b.z&&b.zIndexBase&&(a._z=a._getZOrders(b.zIndexBase));for(var c in b)e.__Info[c]=b[c];(e._z=b.z)||b.zIndexBase&&(e._z=e.__Info.z=a._getZOrders(b.zIndexBase));e._width=b.width;e._height=b.height;e._noscript=!e._isJava&&b.noscript;e._console=
b.console;e._cacheFiles=!!b.cacheFiles;e._viewSet=null==b.viewSet||e._isJava?null:"Set"+b.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=b.color?b.color.replace(/0x/,"#"):"#FFFFFF";e._disableInitialConsole=b.disableInitialConsole;e._noMonitor=b.disableJ2SLoadMonitor;a._j2sPath&&(b.j2sPath=a._j2sPath);e._j2sPath=b.j2sPath;e._coverImage=b.coverImage;
e._makeLiveImage=b.makeLiveImage||b.j2sPath+"/img/play_make_live.jpg";e._isCovered=!!e._coverImage;e._deferApplet=b.deferApplet||e._isCovered&&e._isJava;e._deferUncover=b.deferUncover&&!e._isJava;e._coverScript=b.coverScript;e._coverTitle=b.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=b.addSelectionOptions;e._defaultModel=b.defaultModel;e._readyScript=b.script?b.script:"";e._readyFunction=b.readyFunction;e._coverImage&&!e._deferApplet&&(e._readyScript+=";javascript "+f+"._displayCoverImage(false)");e._src=b.src};a._addDefaultInfo=function(e,f){for(var b in f)"undefined"==typeof e[b]&&(e[b]=f[b]);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 f=0,b=0;b<a._syncedApplets.length;b++){if(a._syncedApplets[b]==e._id)a._syncedApplets[b]=e,a._syncedReady[b]=1;else if(!a._syncedReady[b])continue;f++}f==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 f=0,b=0;b<a._syncedApplets.length;b++)a._syncedApplets[b]==e&&(a._syncedApplets[b]=null),a._syncedApplets[b]&&f++;0<f||a._clearVars()}catch(c){}};a._setSyncReady=function(){a._syncReady=!0;for(var e="",f=0;f<a._syncedApplets.length;f++)a._syncedCommands[f]&&(e+="Jmol.script(Jmol._syncedApplets["+f+"], Jmol._syncedCommands["+f+"]);");setTimeout(e,50)};a._mySyncCallback=
function(e,f){app=a._applets[e];if(app._viewSet)a.View.updateFromSync(app,f);else{if(!a._syncReady||!a._isJmolJSVSync)return 1;for(var b=0;b<a._syncedApplets.length;b++)0<=f.indexOf(a._syncedApplets[b]._syncKeyword)&&a._syncedApplets[b]._syncScript(f);return 0}};a._getElement=function(a,f){return document.getElementById(a._id+"_"+f)||{}};a._evalJSON=function(a,f){a+="";if(!a)return[];if("{"!=a.charAt(0))return 0<=a.indexOf(" | ")&&(a=a.replace(/\ \|\ /g,"\n")),a;var b=(new Function("return "+a))();
return!b?null:f&&void 0!=b[f]?b[f]:b};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 h=[],c=a.length-1;0<=c;c--)for(var d=0,g=a[c].length;d<g;d++)h[h.length]=a[c][d];if(0!=h.length)return h=h.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(e,b){if(!e.applet._ready||a._touching&&0>b.type.indexOf("touch"))return!1;var h=a.$offset(e.id),c,d=b.originalEvent;b.pageX||(b.pageX=d.pageX);b.pageY||(b.pageY=d.pageY);a._mousePageX=b.pageX;a._mousePageY=b.pageY;d.targetTouches&&d.targetTouches[0]?(c=d.targetTouches[0].pageX-h.left,h=d.targetTouches[0].pageY-h.top):d.changedTouches?(c=d.changedTouches[0].pageX-h.left,h=d.changedTouches[0].pageY-h.top):(c=b.pageX-h.left,h=b.pageY-h.top);return void 0==
c?null:[Math.round(c),Math.round(h),a._jsGetMouseModifiers(b)]};a._setCursor=function(e,b){if(!e._isJava&&!e._readingLocal){var h;switch(b){case 1:h="crosshair";break;case 3:h="wait";a.$setVisible(a.$(e,"waitimage"),!0);break;case 8:h="ns-resize";break;case 12:h="grab";break;case 13:h="move";break;default:a.$setVisible(a.$(e,"waitimage"),!1),h="default"}e._canvas.style.cursor=h}};a._gestureUpdate=function(e,b){b.stopPropagation();b.preventDefault();var h=b.originalEvent;switch(b.type){case "touchstart":a._touching=
!0;break;case "touchend":a._touching=!1}if(!h.touches||2!=h.touches.length)return!1;switch(b.type){case "touchstart":e._touches=[[],[]];break;case "touchmove":var c=a.$offset(e.id),d=e._touches[0],g=e._touches[1];d.push([h.touches[0].pageX-c.left,h.touches[0].pageY-c.top]);g.push([h.touches[1].pageX-c.left,h.touches[1].pageY-c.top]);h=d.length;3<h&&(d.shift(),g.shift());2<=h&&e.applet._processGesture(e._touches)}return!0};a._jsSetMouse=function(b){var f=function(a){return!a.target||0<=(""+a.target.className).indexOf("swingjs-ui")};
a.$bind(b,"mousedown touchstart",function(h){if(f(h))return!0;a._setMouseOwner(b,!0);h.stopPropagation();var c=h.target["data-UI"];(!c||!c.handleJSEvent(b,501,h))&&h.preventDefault();b.isDragging=!0;if("touchstart"==h.type&&a._gestureUpdate(b,h))return!!c;a._setConsoleDiv(b.applet._console);var d=a._jsGetXY(b,h);d&&(2!=h.button&&a.Swing.hideMenus(b.applet),b.applet._processEvent(501,d));return!!c});a.$bind(b,"mouseup touchend",function(h){if(f(h))return!0;a._setMouseOwner(null);h.stopPropagation();
var c=h.target["data-UI"];(!c||!c.handleJSEvent(b,502,h))&&h.preventDefault();b.isDragging=!1;if("touchend"==h.type&&a._gestureUpdate(b,h))return!!c;(h=a._jsGetXY(b,h))&&b.applet._processEvent(502,h);return!!c});a.$bind(b,"mousemove touchmove",function(h){if(f(h))return!0;if(a._mouseOwner&&a._mouseOwner!=b&&a._mouseOwner.isDragging){if(!a._mouseOwner.mouseMove)return!0;a._mouseOwner.mouseMove(h);return!1}return a._drag(b,h)});a._drag=function(b,e){e.stopPropagation();e.preventDefault();if("touchmove"==
e.type&&a._gestureUpdate(b,e))return!1;var f=a._jsGetXY(b,e);if(!f)return!1;b.isDragging||(f[2]=0);var c=e.target["data-UI"];b.isdragging&&(!c||c.handleJSEvent(b,506,e));b.applet._processEvent(b.isDragging?506:503,f);return!!c};a.$bind(b,"DOMMouseScroll mousewheel",function(h){if(f(h))return!0;h.stopPropagation();h.preventDefault();b.isDragging=!1;var c=h.originalEvent,c=c.detail?c.detail:("mac"==a.featureDetection.os?1:-1)*c.wheelDelta;h=a._jsGetMouseModifiers(h);b.applet._processEvent(507,[0>c?
-1:1,0,h]);return!1});a.$bind(b,"contextmenu",function(){return!1});a.$bind(b,"mouseout",function(h){if(f(h))return!0;a._mouseOwner&&!a._mouseOwner.mouseMove&&a._setMouseOwner(null);b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(b,h);return!1});a.$bind(b,"mouseenter",function(h){if(f(h))return!0;b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!0);if(0===h.buttons||0===h.which){b.isDragging=!1;h=a._jsGetXY(b,h);if(!h)return!1;b.applet._processEvent(504,
h);b.applet._processEvent(502,h);return!1}});a.$bind(b,"mousemoveoutjsmol",function(h,c,d){if(f(d))return!0;if(b==a._mouseOwner&&b.isDragging)return a._drag(b,d)});b.applet._is2D&&a.$resize(function(){b.applet&&b.applet._resize()});a.$bind("body","mouseup touchend",function(h){if(f(h))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 m=a.Swing;SwingController=m;m.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,f){e.mouseMove(f)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,b,f){e.mouseUp(f)})}})};m.JSDialog=function(){};m.setDraggable(m.JSDialog);m.getScreenDimensions=function(a){a.width=j(window).width();a.height=j(window).height()};m.dispose=function(b){a.$remove(b.id+"_mover");delete m.htDialogs[b.id];b.container.obj.dragBind(!1)};
m.register=function(a,b){a.id=b+ ++m.count;m.htDialogs[a.id]=a};m.setDialog=function(b){a._setMouseOwner(null);a.$remove(b.id);var f=b.id+"_mover",h=a._$(f),c;h[0]?(h.html(b.html),c=h[0].jd):(a.$after("body","<div id='"+f+"' style='position:absolute;left:0px;top:0px;'>"+b.html+"</div>"),c=new m.JSDialog,h=a._$(f),b.container=h,c.applet=b.manager.vwr.html5Applet,c.setContainer(h),c.dialog=b,c.setPosition(),c.dragBind(!0),h[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})};m.setSelected=function(b){a.$prop(b.id,"checked",!!b.selected)};m.setSelectedIndex=function(b){a.$prop(b.id,"selectedIndex",b.selectedIndex)};m.setText=function(b){a.$prop(b.id,"value",b.text)};m.setVisible=function(b){a.$setVisible(b.id,b._visible)};m.setEnabled=function(b){a.$setEnabled(b.id,b.enabled)};m.click=function(b,f){var c=m.htDialogs[b.id];if(c){var d=c.toString();if(0<=d.indexOf("JCheck"))c.selected=b.checked;else if(0<=d.indexOf("JCombo"))c.selectedIndex=b.selectedIndex;else if(null!=
c.text&&(c.text=b.value,f&&13!=(f.charCode||f.keyCode)))return}d=m.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];d.manager.actionPerformed(c?c.name:d.registryKey+"/"+b.id)};m.setFront=function(b){var f=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(f,"dialog")&&(b.zIndex=a._incrZ(f,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};m.hideMenus=function(a){if(a=a._menus)for(var b in a)a[b]._visible&&m.hideMenu(a[b])};m.windowClosing=function(b){b=m.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 f='<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",f)}catch(c){}delete a._tracker}return b};var l;a.getProfile=function(a){if(self.Clazz&&self.JSON)return l||Clazz._startProfiling(l=
0==arguments.length||a),Clazz.getProfile()};a._getInChIKey=function(a,b){0<=b.indexOf("MOL=")&&b.split("MOL=")[1].split('"')};a._getAttr=function(a,b){var c=a.indexOf(b+"=");return 0<=c&&0<=(c=a.indexOf('"',c))?a.substring(c+1,a.indexOf('"',c+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.resetView=function(b,e){debugger;if(e){if(e._viewSet){var c=a.View.applets[e._viewSet];for(b in c)b!=e&&a.View.resetView(b)}}else b&&(b._reset(),a.View.updateView(b))};
b.updateView=function(f,c){if(null!=f._viewSet){c||(c={});c.chemID||(f._searchQuery=null);c.data||(c.data="N/A");c.type=f._viewType;if(null==(f._currentView=b.__findView(f._viewSet,c)))f._currentView=b.__createViewSet(f._viewSet,c.chemID,c.viewID||c.chemID);f._currentView[c.type].data=c.data;f._currentView[c.type].smiles=f._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(f,"updateView");b.__setView(f._currentView,f,!1)}};b.updateFromSync=function(f,c){f._updateMsg=c;var d=a._getAttr(c,
"sourceID")||a._getAttr(c,"file");if(d){var g=b.__findView(f._viewSet,{viewID:d});if(null==g)return a.updateView(f,c);g!=f._currentView&&b.__setView(g,f,!0);var k=(d=a._getAttr(c,"atoms"))&&0<=c.indexOf("selectionhalos ON")?eval("["+d+"]"):[];setTimeout(function(){f._currentView==g&&b.updateAtomPick(f,k)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(f,"updateFromSync")}};b.updateAtomPick=function(b,e){var c=b._currentView;if(null!=c){for(var d in c)"info"!=d&&c[d].applet!=b&&c[d].applet._updateAtomPick(e);
a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var c=b.sets[a];if(c){var d="View set "+a+":\n";a=b.applets[a];for(var g in a)d+="\napplet "+a[g]._id+" currentView="+(a[g]._currentView?a[g]._currentView.info.viewID:null);for(g=c.length;0<=--g;){a=c[g];var d=d+("\n\n<b>view="+g+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"</b>\n"),k,j;for(j in a)"info"!=j&&(d+="\nview="+g+" type="+j+" applet="+((k=a[j]).applet?k.applet._id:null)+" SMILES="+
k.smiles+"\n atomMap="+JSON.stringify(k.atomMap)+"\n data=\n"+k.data+"\n")}return d}};b.__init=function(a){var c=a._viewSet,d=b.applets;d[c]||(d[c]={});d[c][a._viewType]=a};b.__findView=function(a,c){var d=b.sets[a];null==d&&(d=b.sets[a]=[]);for(var g=d.length;0<=--g;){var k=d[g];if(c.viewID){if(k.info.viewID==c.viewID)return k}else{if(null!=c.chemID&&c.chemID==k.info.chemID)return k;for(var j in k)if("info"!=j&&(null!=c.data&&null!=k[j].data?c.data==k[j].data:c.type==j))return k}}return null};b.__createViewSet=
function(f,c,d){b.count++;c={info:{chemID:c,viewID:d||"model_"+b.count}};for(var g in a._applets)d=a._applets[g],d._viewSet==f&&(c[d._viewType]={applet:d,data:null});b.sets[f].push(c);return c};b.__setView=function(a,b,e){for(var c in a)if("info"!=c){var d=a[c],g=d.applet,k=e||null!=g&&"<modified>"==g._molData;if(!(null==g||g==b&&!k)){var j=null==d.data,m=null!=g._currentView;g._currentView=a;if(!m||!(a[c].data==d.data&&!j&!k))if(g._loadModelFromView(a),j)break}}}})(a.View);a.Cache={fileCache:{}};
a.Cache.get=function(b){return a.Cache.fileCache[b]};a.Cache.put=function(b,f){a.Cache.fileCache[b]=f};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(f){var c=f.originalEvent;c.stopPropagation();c.preventDefault();var d=c.dataTransfer.files[0];if(null==d)try{d=""+c.dataTransfer.getData("text"),(0==d.indexOf("file:/")||0==d.indexOf("http:/")||
0==d.indexOf("https:/"))&&b._scriptLoad(d)}catch(g){}else c=new FileReader,c.onloadend=function(c){if(c.target.readyState==FileReader.DONE){var g="cache://DROP_"+d.name;c=Clazz.newByteArray(-1,c.target.result);g.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",!1);"JSV"==b._viewType||g.endsWith(".jdx")?a.Cache.put(g,c):b._appletPanel.cachePut(g,c);(c=a._jsGetXY(b._canvas,f))&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,c[0],c[1],g))&&b._appletPanel.openFileAsyncSpecial(g,
1)}},c.readAsArrayBuffer(d)})}})(Jmol,jQuery);Jmol._debugCode=!1;
(function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var j=!1,g=[],d=[],b=0,c=[],k=[],m=function(c){arguments.length||(c=!0);delete b;for(var e;0<d.length&&"done"==(e=d[0])[4];)d.shift();if(0!=d.length)if(!a._isAsync&&!c)setTimeout(m,10);else{e.push("done");var k="JSmol exec "+e[0]._id+" "+e[3]+" "+e[2];self.System&&System.out.println(k);self.console&&console.log(k+" -- OK");g.push(k);e[1](e[0],e[2])}},l=function(b){j?m():(j=!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,m()},Clazz._Loader.loadPackageClasspath("java",null,!0,m))},e=function(a,b){Clazz._Loader.loadClass(b,function(){m()})};a.showExecLog=function(){return g.join("\n")};a._addExec=function(a){a[1]||(a[1]=e);var b="JSmol load "+a[0]._id+" "+a[3];self.console&&console.log(b+"...");g.push(b);
d.push(a)};a._addCoreFile=function(b,e,d){b=b.toLowerCase().split(".")[0];if(!(0<=c.join("").indexOf(b))){c.push(b);c.sort();a._coreFiles=[e+"/core/core"+c.join("")+".z.js"];if(d&&(d=d.split(" ")))for(b=0;b<d.length;b++)0>k.join("").indexOf(d[b])&&k.push(e+"/core/core"+d[b]+".z.js");for(b=0;b<k.length;b++)a._coreFiles.push(k[b])}};a._Canvas2D=function(b,c,e,d){this._uniqueId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._jmolType="Jmol._Canvas2D ("+e+")";this._isLayered=
c._isLayered||!1;this._isSwing=c._isSwing||!1;this._isJSV=c._isJSV||!1;this._isAstex=c._isAstex||!1;this._platform=c._platform||"";if(d)return this;window[b]=this;this._createCanvas(b,c);if(!a._document||this._deferApplet)return this;this._init();return this};a._setAppletParams=function(b,c,e,d){for(var g in e)if(!b||0<=b.indexOf(";"+g.toLowerCase()+";"))null==e[g]||"language"==g&&!a.featureDetection.supportsLocalization()||(d?c.put(g,!0===e[g]?Boolean.TRUE:!1===e[g]?Boolean.FALSE:e[g]):c[g]=e[g])};
a._jsSetPrototype=function(c){c._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};c._createCanvas=function(b,c,e){a._setObject(this,b,c);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);c.addSelectionOptions&&(e+=
a._getGrabberOptions(this));a._debugAlert&&!a._document&&alert(e);this._code=a._documentWrite(e)};c._newCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};c._getHtml5Canvas=function(){return this._canvas};c._getWidth=function(){return this._canvas.width};c._getHeight=function(){return this._canvas.height};c._getContentLayer=function(){return a.$(this,"contentLayer")[0]};c._repaintNow=function(){a._repaint(this,!1)};c._createCanvas2d=function(){var b=a.$(this,"appletdiv");
try{b[0].removeChild(this._canvas),this._canvas.frontLayer&&b[0].removeChild(this._canvas.frontLayer),this._canvas.rearLayer&&b[0].removeChild(this._canvas.rearLayer),this._canvas.contentLayer&&b[0].removeChild(this._canvas.contentLayer),a._jsUnsetMouse(this._mouseInterface)}catch(c){}var e=Math.round(b.width()),f=Math.round(b.height()),d=document.createElement("canvas");d.applet=this;this._canvas=d;d.style.width="100%";d.style.height="100%";d.width=e;d.height=f;d.id=this._id+"_canvas2d";b.append(d);
a._$(d.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var g=document.createElement("div");d.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=d.contentLayer,d.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,e,f,!1)}else this._mouseInterface=d;a._jsSetMouse(this._mouseInterface)};c._getLayer=function(b,c,e,f,d){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;c.append(g);g.applet=this;a._$(g.id).css({background:d?"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};c._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==d.length&&a._addExec([this,l,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(m,100)};c.__startAppletJS=function(b){0==a._version.indexOf("$Date: ")&&(a._version=(a._version.substring(7)+" -").split(" -")[0]+" (JSmol/j2s)");var c=Clazz._4Name("java.util.Hashtable").newInstance();a._setAppletParams(b._availableParams,c,b.__Info,!0);c.put("appletReadyCallback","Jmol._readyCallback");c.put("applet",!0);c.put("name",b._id);c.put("syncId",a._syncId);a._isAsync&&c.put("async",!0);b._color&&c.put("bgcolor",b._color);b._startupScript&&c.put("script",
b._startupScript);a._syncedApplets.length&&c.put("synccallback","Jmol._mySyncCallback");c.put("signedApplet","true");c.put("platform",b._platform);b._is2D&&c.put("display",b._id+"_canvas2d");c.put("documentBase",document.location.href);var 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("/")}c.put("codePath",e);a._registerApplet(b._id,b);try{b._newApplet(c)}catch(d){System.out.println((a._isAsync?
"normal async abort from ":"")+d);return}b._jsSetScreenDimensions();m()};c._restoreState||(c._restoreState=function(){});c._jsSetScreenDimensions=function(){if(this._appletPanel){var b=a._getElement(this,this._is2D?"canvas2d":"canvas");this._appletPanel.setScreenDimension(b.width,b.height)}};c._show=function(b){a.$setVisible(a.$(this,"appletdiv"),b);b&&a._repaint(this,!0)};c._canScript=function(){return!0};c.equals=function(a){return this==a};c.clone=function(){return this};c.hashCode=function(){return parseInt(this._uniqueId)};
c._processGesture=function(a){return this._appletPanel.processTwoPointGesture(a)};c._processEvent=function(a,b){this._appletPanel.processMouseEvent(a,b[0],b[1],b[2],System.currentTimeMillis())};c._resize=function(){var b="__resizeTimeout_"+this._id;a[b]&&clearTimeout(a[b]);var c=this;a[b]=setTimeout(function(){a._repaint(c,!0);a[b]=null},100)};return c};a._repaint=function(b,c){if(b&&b._appletPanel){var e=a.$(b,"appletdiv"),d=Math.round(e.width()),e=Math.round(e.height());if(b._is2D&&(b._canvas.width!=
d||b._canvas.height!=e))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(d,e);d=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};c?requestAnimationFrame(d):d()}};a._loadImage=function(b,c,e,d,g,k){var j="echo_"+c+e+(d?"_"+d.length:""),m=a._getHiddenCanvas(b.vwr.html5Applet,j,0,0,!1,!0);if(null==m){if(null==k){k=new Image;if(null==d)return k.onload=function(){a._loadImage(b,c,e,null,g,k)},k.src=e,null;System.out.println("Jsmol.js Jmol._loadImage using data URI for "+
j);k.src="string"==typeof d?d:"data:"+JU.Rdr.guessMimeTypeForBytes(d)+";base64,"+JU.Base64.getBase64(d)}var l=k.width,t=k.height;"webgl"==c&&(l/=2,t/=2);m=a._getHiddenCanvas(b.vwr.html5Applet,j,l,t,!0,!1);m.imageWidth=l;m.imageHeight=t;m.id=j;m.image=k;a._setCanvasImage(m,l,t)}else System.out.println("Jsmol.js Jmol._loadImage reading cached image for "+j);return null==d?g(m,e):m};a._canvasCache={};a._getHiddenCanvas=function(b,c,e,d,g,k){c=b._id+"_"+c;b=a._canvasCache[c];if(k)return b;if(g||!b||b.width!=
e||b.height!=d)b=document.createElement("canvas"),b.width=b.style.width=e,b.height=b.style.height=d,b.id=c,a._canvasCache[c]=b;return b};a._setCanvasImage=function(a,b,c){a.buf32=null;a.width=b;a.height=c;a.getContext("2d").drawImage(a.image,0,0,a.image.width,a.image.height,0,0,b,c)};a._apply=function(a,b){return a(b)}})(Jmol);
(function(a,j){a._Applet=function(b,c,d){window[b]=this;this._jmolType="Jmol._Applet"+(c.isSigned?" (signed)":"");this._viewType="Jmol";this._isJava=!0;this._syncKeyword="Select:";this._availableParams=";progressbar;progresscolor;boxbgcolor;boxfgcolor;allowjavascript;boxmessage;\t\t\t\t\t\t\t\t\t;messagecallback;pickcallback;animframecallback;appletreadycallback;atommovedcallback;\t\t\t\t\t\t\t\t\t;echocallback;evalcallback;hovercallback;language;loadstructcallback;measurecallback;\t\t\t\t\t\t\t\t\t;minimizationcallback;resizecallback;scriptcallback;statusform;statustext;statustextarea;\t\t\t\t\t\t\t\t\t;synccallback;usecommandthread;syncid;appletid;startupscript;menufile;";
if(d)return this;this._isSigned=c.isSigned;this._readyFunction=c.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=c.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(b,d){var e=!1;a._jarFile&&(d=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("/")),d=f.substring(f.lastIndexOf("/")+1)):e=!0):d=f;this_isSigned=c.isSigned=0<=d.indexOf("Signed")}this._jarPath=c.jarPath=b||".";this._jarFile=c.jarFile="string"==typeof d?d:(d?"JmolAppletSigned":"JmolApplet")+"0.jar";e&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(b,c);return this};
var g=a._Applet,d=a._Applet.prototype;g._get=function(b,c,d){d||(d=!1);c||(c={});a._addDefaultInfo(c,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://your.server.here/jsmol.php",defaultModel:"",script:null,src:null,readyFunction:null,use:"HTML5",jarPath:"java",jarFile:"JmolApplet0.jar",isSigned:!1,j2sPath:"j2s",coverImage:null,makeLiveImage:null,coverTitle:"",coverCommand:"",deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!0,debug:!1});a._debugAlert=
c.debug;c.serverURL&&(a._serverUrl=c.serverURL);for(var j=!1,l=null,e=c.use.toUpperCase().split("#")[0].split(" "),f=0;f<e.length;f++){switch(e[f]){case "JAVA":j=!0;a.featureDetection.supportsJava()&&(l=new g(b,c,d));break;case "WEBGL":l=g._getCanvas(b,c,d,!0);break;case "HTML5":a.featureDetection.allowHTML5?l=g._getCanvas(b,c,d,!1):e.push("JAVA")}if(null!=l)break}null==l&&(d||!j?l={_jmolType:"none"}:j&&(l=new g(b,c)));return d?l:a._registerApplet(b,l)};g._getCanvas=function(b,c,d,j){c._isLayered=
!1;c._platform="J.awtjs2d.Platform";return j&&a.featureDetection.supportsWebGL()?(a._Canvas3D.prototype=a.GLmol.extendApplet(a._jsSetPrototype(new g(b,c,!0))),new a._Canvas3D(b,c,"Jmol",d)):!j?(a._Canvas2D.prototype=a._jsSetPrototype(new g(b,c,!0)),new a._Canvas2D(b,c,"Jmol",d)):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=d._showInfo;a._search=d._search;a._getName=d._getName;a._readyCallback=d._readyCallback};g._createApplet=function(b,c,d){b._initialize(c.jarPath,c.jarFile);var m=b._jarFile;a._isFile&&(m=m.replace(/0\.jar/,".jar"));var l=0<=b._containerWidth.indexOf("px")?b._containerWidth:"100%",e=0<=b._containerHeight.indexOf("px")?b._containerHeight:"100%",l=' style="width:'+l+";height:"+e+'" ',e="name='"+b._id+"_object' id='"+b._id+"_object' \n"+l+"\n";d.codebase=b._jarPath;
d.codePath=d.codebase+"/";if(0>d.codePath.indexOf("://")){var f=j.location.href.split("#")[0].split("?")[0].split("/");f[f.length-1]=d.codePath;d.codePath=f.join("/")}d.archive=m;d.mayscript="true";d.java_arguments="-Xmx"+Math.round(c.memoryLimit||b._memoryLimit)+"m";d.permissions=b._isSigned?"all-permissions":"sandbox";d.documentLocation=j.location.href;d.documentBase=j.location.href.split("#")[0].split("?")[0];d.jarPath=c.jarPath;a._syncedApplets.length&&(d.synccallback="Jmol._mySyncCallback");
b._startupScript&&(d.script=b._startupScript);var f="\n",h;for(h in d)d[h]&&(f+="  <param name='"+h+"' value='"+d[h]+"' />\n");f=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"<object "+e+(a.featureDetection.useIEObject?" classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93' codebase='http://java.sun.com/update/1.6.0/jinstall-6u22-windows-i586.cab'>":" type='application/x-java-applet'>")+f+"<p style='background-color:yellow;"+l.split('"')[1]+";text-align:center;vertical-align:middle;'>\n"+
g._noJavaMsg+"</p></object>\n":"<applet "+e+" code='"+d.code+"' codebase='"+b._jarPath+"' archive='"+m+"' mayscript='true'>\n"+f+"<table bgcolor='yellow'><tr><td align='center' valign='middle' "+l+">\n"+g._noJavaMsg+"</td></tr></table></applet>\n";b._deferApplet&&(b._javaCode=f,f="");f=a._getWrapper(b,!0)+f+a._getWrapper(b,!1)+(c.addSelectionOptions?a._getGrabberOptions(b):"");a._debugAlert&&alert(f);b._code=a._documentWrite(f)};d._newApplet=function(a){this._is2D||a.put("script",(a.get("script")||
"")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};d._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"])};d._create=function(b,c){a._setObject(this,b,c);var d={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,d,c);var j;c.inlineModel?(j=c.inlineModel,j=j.replace(/\r|\n|\r\n/g,0<=j.indexOf("|")?"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+j)):j="";d.loadInline=j;d.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&(d.synccallback="Jmol._mySyncCallback");d.java_arguments="-Xmx"+Math.round(c.memoryLimit||this._memoryLimit)+"m";this._initialize(c.jarPath,
c.jarFile);g._createApplet(this,c,d)};d._restoreState=function(b,c){System.out.println("\n\nasynchronous restore state for "+b+" "+c);var d=this,g=d._applet&&d._applet.viewer;switch(c){case "setOptions":return function(){d.__startAppletJS(d)};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 j=g.getEvalContextAndHoldQueue(g.eval),e=j.pc-1;j.asyncID=b;a._asyncCallbacks[b]=function(a){j.pc=a;System.out.println("sc.asyncID="+j.asyncID+" sc.pc = "+j.pc);g.eval.resumeEval(j)};g.eval.pc=g.eval.pcEnd;System.out.println("setting resume for pc="+j.pc+" "+b+" to "+a._asyncCallbacks[b]+"//");return function(){System.out.println("resuming "+b+" "+a._asyncCallbacks[b]);a._asyncCallbacks[b](e)}}System.out.println(b+"?????????????????????"+c);return function(){setTimeout(function(){g.refresh(2)},
10)}}};d._readyCallback=function(b,c,d){if(d){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);if((b=this._2dapplet)&&b._isEmbedded&&b._ready&&b.__Info.visible)this._show2d(!0),this._show2d(!1),this._show2d(!0);a._hideLoadingSpinner(this)}};
d._showInfo=function(b){b&&this._2dapplet&&this._2dapplet._show(!1);a.$html(a.$(this,"infoheaderspan"),this._infoHeader);this._info&&a.$html(a.$(this,"infodiv"),this._info);if(!this._isInfoVisible!=!b){this._isInfoVisible=b;if(this._isJava){var c=b?2:"100%";a.$setSize(a.$(this,"appletdiv"),c,c)}a.$setVisible(a.$(this,"infotablediv"),b);a.$setVisible(a.$(this,"infoheaderdiv"),b);this._show(!b)}};d._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),
this._2dapplet.__showContainer(!0,!0))};d._getSpinner=function(){return this.__Info.appletLoadingImage||this._j2sPath+"/img/JSmol_spinner.gif"};d._getAtomCorrelation=function(a){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' 'H'); zap 2.1",!0);a=this._evaluate("atommap");for(var c=this._evaluate("{*}.count"),d=[],g=[],j=0;j<a.length;j++){var e=a[j];d[e[0]+1]=e[1]-c+1;g[e[1]-c+1]=e[0]+1}return{fromJmol:d,toJmol:g}};d._show=function(b){var c=!b?2:"100%";a.$setSize(a.$(this,"object"),c,c);
this._isJava||a.$setVisible(a.$(this,"appletdiv"),b)};d._clearConsole=function(){this._console==this._id+"_infodiv"&&(this.info="");self.Clazz&&(a._setConsoleDiv(this._console),Clazz.Console.clear())};d._addScript=function(a){this._readyScript||(this.readyScript="");this._readyScript&&(this._readyScript+=";");this._readyScript+=a;return!0};d._script=function(b){if(!this._ready)return this._addScript(b);a._setConsoleDiv(this._console);a._hideLocalFileReader(this);this._applet.script(b)};d._syncScript=
function(a){this._applet.syncScript(a)};d._scriptCheck=function(a){return this._ready&&this._applet.scriptCheck(a)};d._scriptWait=function(a,c){var d=this._scriptWaitAsArray(a),g="";if(!c)for(var j=d.length;0<=--j;)for(var e=0,f=d[j].length;e<f;e++)g+=d[j][e]+"\n";return g};d._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var c="",d=a.length;0<=--d;)for(var g=a[d].length;0<=--g;)"scriptEcho"==a[d][g][1]&&(c+=a[d][g][3]+"\n");return c.replace(/ \| /g,"\n")};d._scriptMessage=function(a){a=
this._scriptWaitAsArray(a);for(var c="",d=a.length;0<=--d;)for(var g=a[d].length;0<=--g;)"scriptStatus"==a[d][g][1]&&(c+=a[d][g][3]+"\n");return c.replace(/ \| /g,"\n")};d._scriptWaitOutput=function(a){var c="";try{a&&(c+=this._applet.scriptWaitOutput(a))}catch(d){}return c};d._scriptWaitAsArray=function(b){var c="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),b&&(c+=this._applet.scriptWait(b),c=a._evalJSON(c,"jmolStatus"),"object"==typeof c))return c}catch(d){}return[[c]]};
d._getStatus=function(b){return a._sortMessages(this._getPropertyAsArray("jmolStatus",b))};d._getPropertyAsArray=function(b,c){return a._evalJSON(this._getPropertyAsJSON(b,c),b)};d._getPropertyAsString=function(a,c){void 0==c&&(c="");return this._applet.getPropertyAsString(a,c)+""};d._getPropertyAsJSON=function(a,c){void 0==c&&(c="");try{return this._applet.getPropertyAsJSON(a,c)+""}catch(d){return""}};d._getPropertyAsJavaObject=function(a,c){void 0==c&&(c="");return this._applet.getProperty(a,c)};
d._evaluate=function(a){null!=a||(a="");return this._getPropertyAsArray("variableInfo",a)};d._evaluateDEPRECATED=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var c=a.replace(/\-*\d+/,"");if(""==c&&!isNaN(parseInt(a)))return parseInt(a);c=a.replace(/\-*\d*\.\d*/,"");return""==c&&!isNaN(parseFloat(a))?parseFloat(a):a};d._saveOrientation=function(a){return this._savedOrientations[a]=this._getPropertyAsArray("orientationInfo","info").moveTo};d._restoreOrientation=function(a){a=this._savedOrientations[a];
return!a||""==a?a.replace(/1\.0/,"0"):this._scriptWait(a)};d._restoreOrientationDelayed=function(a,c){1>arguments.length&&(c=1);var d=this._savedOrientations[a];return!d||""==d?d.replace(/1\.0/,c):this._scriptWait(d)};d._resizeApplet=function(b){function c(b,c){var e=""+b;return 0==e.length?c?"":a._allowedJmolSize[2]:e.indexOf("%")==e.length-1?e: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)+(c?c:"")}var d;"object"==typeof b&&null!=b?(d=b[0]||b.width,b=b[1]||b.height):d=b;d=[c(d,"px"),c(b,"px")];b=a._getElement(this,"appletinfotablediv");b.style.width=d[0];b.style.height=d[1];this._containerWidth=d[0];this._containerHeight=d[1];this._is2D&&a._repaint(this,!0)};d._search=function(b,c){a._search(this,b,c)};d._searchDatabase=function(b,c,d){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(b,c,d);this._showInfo(!1);
0<=b.indexOf("?")?a._getInfoFromDatabase(this,c,b.split("?")[0]):(d||(d=a._getScriptForDatabase(c)),b=c+b,this._currentView=null,this._searchQuery=b,this._loadFile(b,d,b))};d._loadFile=function(b,c,d){this._showInfo(!1);c||(c="");this._thisJmolModel=""+Math.random();this._fileName=b;if(!this._scriptLoad(b,c)){var g=this;a._loadFileData(this,b,function(a){g.__loadModel(a,c,d)},function(){g.__loadModel(null)})}};d._scriptLoad=function(a,c){c||(c="");var d=this._isJava||!this._noscript;d&&this._script("zap;set echo middle center;echo Retrieving data...");
if(!this._isSigned||null!=this._viewSet)return!1;d?this._script('load async "'+a+'";'+c):this._applet.openFile(a);this._checkDeferred("");return!0};d.__loadModel=function(b,c,d){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:d,
data:b}))};d._loadMolData=function(a,c,d){c||(c="");d=d?"append":"model";this._applet.scriptWait('load DATA "'+d+'"'+a+'\nEND "'+d+'" ;'+c)};d._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)};d._reset=function(){this._scriptWait("zap",!0)};d._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}")}))};d._atomPickedCallback=function(b,c){if(!(0>c)){var d=[c+1];a.View.updateAtomPick(this,d);this._updateAtomPick(d)}};d._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};d._isDeferred=function(){return!this._canvas&&this._cover&&
this._isCovered&&this._deferApplet};d._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};d._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())};d._displayCoverImage=function(b){this._coverImage&&this._isCovered!=b&&(this._isCovered=b,a._getElement(this,"coverdiv").style.display=b?"block":"none")};d._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};d._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};
d._getMol2D=function(){return this._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document);
(function(a){var j=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:""};
j._addScript=function(a,d){var b=j._scripts.length;j._scripts[b]=[a,d];return b};j._getIdForControl=function(a,d){return"string"==typeof a?a:!d||!a._canScript||a._canScript(d)?a._id:null};j._radio=function(a,d,b,c,k,m,l,e){var f=j._getIdForControl(a,d);if(null==f)return null;++j._radioCount;void 0!=m&&null!=m||(m="jmolRadioGroup"+(j._radioGroupCount-1));if(!d)return"";void 0!=l&&null!=l||(l="jmolRadio"+(j._radioCount-1));void 0!=b&&null!=b||(b=d.substring(0,32));k||(k="");a="</span>";j._actions[l]=
j._addScript(f,d);d='<span id="span_'+l+'"'+(e?' title="'+e+'"':"")+"><input name='"+m+"' id='"+l+"' type='radio' onclick='Jmol.controls._click(this);return true;' onmouseover='Jmol.controls._mouseOver(this);return true;' onmouseout='Jmol.controls._mouseOut()' "+(c?"checked='true' ":"")+j._radioCssText+" />";0<=b.toLowerCase().indexOf("<td>")&&(d+=a,a="");return d+('<label for="'+l+'">'+b+"</label>"+a+k)};j._scriptExecute=function(g,d){var b=a._applets[d[0]],c=d[1];if("object"==typeof c)c[0](g,c,
b);else"function"==typeof c?c(b):a.script(b,c)};j.__checkScript=function(a,d){var b=0<=d.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(d.value);d.style.color=b?"black":"red";return b};j.__getCmd=function(a,d){if(d._cmds&&d._cmds.length){var b=d._cmds[d._cmdpt=(d._cmdpt+d._cmds.length+a)%d._cmds.length];setTimeout(function(){d.value=b},10);d._cmdadd=1;d._cmddir=a}};j._commandKeyPress=function(g,d,b){g=13==g?13:window.event?window.event.keyCode:g?g.keyCode||g.which:0;var c=document.getElementById(d),
k=a._applets[b];switch(g){case 13:return d=c.value,j._scriptExecute(c,[b,d]),c._cmds||(c._cmds=[],c._cmddir=0,c._cmdpt=-1,c._cmdadd=0),d&&0==c._cmdadd?(++c._cmdpt,c._cmds.splice(c._cmdpt,0,d),c._cmdadd=0,c._cmddir=0):c._cmdadd=0,c.value="",!1;case 27:return setTimeout(function(){c.value=""},20),!1;case 38:j.__getCmd(-1,c);break;case 40:j.__getCmd(1,c);break;default:c._cmdadd=0}setTimeout(function(){j.__checkScript(k,c)},20);return!0};j._click=function(a,d){j._element=a;1==arguments.length&&(d=j._actions[a.id]);
j._scriptExecute(a,j._scripts[d])};j._menuSelected=function(a){var d=a.value;if(void 0!=d)j._scriptExecute(a,j._scripts[d]);else{d=a.length;if("number"==typeof d)for(var b=0;b<d;++b)if(a[b].selected){j._click(a[b],a[b].value);return}alert("?Que? menu selected bug #8734")}};j._cbNotifyMaster=function(a){var d=!0,b=!0,c=!1,k,m;for(m in a.chkGroup)k=a.chkGroup[m],k.checked?b=!1:d=!1,k.indeterminate&&(c=!0);k=a.chkMaster;d?k.checked=!0:b?k.checked=!1:c=!0;k.indeterminate=c;(a=j._checkboxItems[k.id])&&
(k=a.chkMaster)&&j._cbNotifyMaster(j._checkboxMasters[k.id])};j._cbNotifyGroup=function(a,d){for(var b in a.chkGroup){var c=a.chkGroup[b];c.checked!=d&&(c.checked=d,j._cbClick(c));j._checkboxMasters[c.id]&&j._cbNotifyGroup(j._checkboxMasters[c.id],d)}};j._cbSetCheckboxGroup=function(a,d,b){var c=a;"number"==typeof c&&(c="jmolCheckbox"+c);(a=document.getElementById(c))||alert("jmolSetCheckboxGroup: master checkbox not found: "+c);var k=j._checkboxMasters[c]={};k.chkMaster=a;k.chkGroup={};"string"==
typeof d?(d=b,c=1):c=0;for(a=c;a<d.length;a++)c=d[a],"number"==typeof c&&(c="jmolCheckbox"+c),(b=document.getElementById(c))||alert("jmolSetCheckboxGroup: group checkbox not found: "+c),k.chkGroup[c]=b,j._checkboxItems[c]=k};j._cbClick=function(a){j._control=a;var d=j._actions[a.id][0],b=j._actions[a.id][1];j._click(a,a.checked?d:b);j._checkboxMasters[a.id]&&j._cbNotifyGroup(j._checkboxMasters[a.id],a.checked);j._checkboxItems[a.id]&&j._cbNotifyMaster(j._checkboxItems[a.id])};j._cbOver=function(a){var d=
j._actions[a.id][0],b=j._actions[a.id][1];window.status=j._scripts[a.checked?b:d]};j._mouseOver=function(a,d){1==arguments.length&&(d=j._actions[a.id]);window.status=j._scripts[d]};j._mouseOut=function(){window.status=" ";return!0};j._onloadResetForms=function(){j._hasResetForms||(j._hasResetForms=!0,j._previousOnloadHandler=window.onload,window.onload=function(){if(0<j._buttonCount+j._checkboxCount+j._menuCount+j._radioCount+j._radioGroupCount)for(var a=document.forms,d=a.length;0<=--d;)a[d].reset();
j._previousOnloadHandler&&j._previousOnloadHandler()})};j._getButton=function(g,d,b,c,k){g=j._getIdForControl(g,d);if(null==g)return"";void 0!=c&&null!=c||(c="jmolButton"+j._buttonCount);void 0!=b&&null!=b||(b=d.substring(0,32));++j._buttonCount;j._actions[c]=j._addScript(g,d);d='<span id="span_'+c+'"'+(k?' title="'+k+'"':"")+"><input type='button' name='"+c+"' id='"+c+"' value='"+b+"' onclick='Jmol.controls._click(this)' onmouseover='Jmol.controls._mouseOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+
j._buttonCssText+" /></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};j._getCheckbox=function(g,d,b,c,k,m,l){var e=j._getIdForControl(g,d);null!=e&&(e=j._getIdForControl(g,b));if(null==e)return"";void 0!=m&&null!=m||(m="jmolCheckbox"+j._checkboxCount);++j._checkboxCount;if(void 0==d||null==d||void 0==b||null==b)alert("jmolCheckbox requires two scripts");else if(void 0==c||null==c)alert("jmolCheckbox requires a label");else return j._actions[m]=[j._addScript(e,d),j._addScript(e,b)],g="</span>",
k='<span id="span_'+m+'"'+(l?' title="'+l+'"':"")+"><input type='checkbox' name='"+m+"' id='"+m+"' onclick='Jmol.controls._cbClick(this)' onmouseover='Jmol.controls._cbOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+(k?"checked='true' ":"")+j._checkboxCssText+" />",0<=c.toLowerCase().indexOf("<td>")&&(k+=g,g=""),k+='<label for="'+m+'">'+c+"</label>"+g,a._debugAlert&&alert(k),a._documentWrite(k)};j._getCommandInput=function(g,d,b,c,k,m){g=j._getIdForControl(g,"x");if(null==g)return"";
void 0!=c&&null!=c||(c="jmolCmd"+j._cmdCount);void 0!=d&&null!=d||(d="Execute");void 0!=b&&!isNaN(b)||(b=60);void 0!=m||(m="help");++j._cmdCount;d='<span id="span_'+c+'"'+(k?' title="'+k+'"':"")+"><input name='"+c+"' id='"+c+"' size='"+b+"' onkeydown='return Jmol.controls._commandKeyPress(event,\""+c+'","'+g+"\")' value='"+m+"'/><input  type='button' name='"+c+"Btn' id='"+c+"Btn' value = '"+d+"' onclick='Jmol.controls._commandKeyPress(13,\""+c+'","'+g+"\")' /></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};
j._getLink=function(g,d,b,c,k){g=j._getIdForControl(g,d);if(null==g)return"";void 0!=c&&null!=c||(c="jmolLink"+j._linkCount);void 0!=b&&null!=b||(b=d.substring(0,32));++j._linkCount;d=j._addScript(g,d);b='<span id="span_'+c+'"'+(k?' title="'+k+'"':"")+"><a name='"+c+"' id='"+c+"' href='javascript:Jmol.controls._click(null,"+d+");' onmouseover='Jmol.controls._mouseOver(null,"+d+");return true;' onmouseout='Jmol.controls._mouseOut()' "+j._linkCssText+">"+b+"</a></span>";a._debugAlert&&alert(b);return a._documentWrite(b)};
j._getMenu=function(g,d,b,c,k){var m=j._getIdForControl(g,null);void 0!=c&&null!=c||(c="jmolMenu"+j._menuCount);++j._menuCount;m=typeof d;if(null!=m&&"object"==m&&d.length){var l=d.length;"number"!=typeof b||1==b?b=null:0>b&&(b=l);b='<span id="span_'+c+'"'+(k?' title="'+k+'"':"")+"><select name='"+c+"' id='"+c+"' onChange='Jmol.controls._menuSelected(this)'"+(b?" size='"+b+"' ":"")+j._menuCssText+">";for(c=0;c<l;++c){var e=d[c],m=typeof e,f=null,h=k=null;"object"==m&&null!=e?(f=e[0],k=e[1],h=e[2]):
f=k=e;m=j._getIdForControl(g,f);if(null==m)return"";null==k&&(k=f);"#optgroup"==f?b+="<optgroup label='"+k+"'>":"#optgroupEnd"==f?b+="</optgroup>":(m=j._addScript(m,f),b+="<option value='"+m+(h?"' selected='true'>":"'>")+k+"</option>")}b+="</select></span>";a._debugAlert&&alert(b);return a._documentWrite(b)}};j._getRadio=function(g,d,b,c,k,m,l,e){0==j._radioGroupCount&&++j._radioGroupCount;m||(m="jmolRadioGroup"+(j._radioGroupCount-1));g=j._radio(g,d,b,c,k,m,l?l:m+"_"+j._radioCount,e?e:0);if(null==
g)return"";a._debugAlert&&alert(g);return a._documentWrite(g)};j._getRadioGroup=function(g,d,b,c,k,m){var l=typeof d;if("object"!=l||null==l||!d.length)alert("invalid arrayOfRadioButtons");else{void 0!=b&&null!=b||(b="&#xa0; ");var e=d.length;++j._radioGroupCount;c||(c="jmolRadioGroup"+(j._radioGroupCount-1));for(var f="<span id='"+(k?k:c)+"'>",h=0;h<e;++h){h==e-1&&(b="");var r=d[h],l=typeof r,L=null,f="object"==l?f+(L=j._radio(g,r[0],r[1],r[2],b,c,3<r.length?r[3]:(k?k:c)+"_"+h,4<r.length?r[4]:0,
m)):f+(L=j._radio(g,r,null,null,b,c,(k?k:c)+"_"+h,m));if(null==L)return""}f+="</span>";a._debugAlert&&alert(f);return a._documentWrite(f)}}})(Jmol);
(function(a){var j=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=j("_J2S");a._jarFile=j("_JAR");a._use=j("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(g,d,b){return a._Applet._get(g,d,b)};a.getJMEApplet=function(g,d,b,c){return a._JMEApplet._get(g,d,b,c)};a.getJSVApplet=function(g,d,b){return a._JSVApplet._get(g,d,b)};a.loadFile=function(a,d,b){a._loadFile(d,b)};a.script=function(a,d){a._checkDeferred(d)||
a._script(d)};a.scriptCheck=function(a,d){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(d)};a.scriptWait=function(a,d){return a._scriptWait(d)};a.scriptEcho=function(a,d){return a._scriptEcho(d)};a.scriptMessage=function(a,d){return a._scriptMessage(d)};a.scriptWaitOutput=function(a,d){return a._scriptWait(d)};a.scriptWaitAsArray=function(a,d){return a._scriptWaitAsArray(d)};a.search=function(a,d,b){a._search(d,b)};a.evaluateVar=function(a,d){return a._evaluate(d)};a.evaluate=function(a,d){return a._evaluateDEPRECATED(d)};
a.getAppletHtml=function(g,d){if(d){var b=a._document;a._document=null;g=a.getApplet(g,d);a._document=b}return g._code};a.getPropertyAsArray=function(a,d,b){return a._getPropertyAsArray(d,b)};a.getPropertyAsJavaObject=function(a,d,b){return a._getPropertyAsJavaObject(d,b)};a.getPropertyAsJSON=function(a,d,b){return a._getPropertyAsJSON(d,b)};a.getPropertyAsString=function(a,d,b){return a._getPropertyAsString(d,b)};a.getStatus=function(a,d){return a._getStatus(d)};a.resizeApplet=function(a,d){return a._resizeApplet(d)};
a.restoreOrientation=function(a,d){return a._restoreOrientation(d)};a.restoreOrientationDelayed=function(a,d,b){return a._restoreOrientationDelayed(d,b)};a.saveOrientation=function(a,d){return a._saveOrientation(d)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,d,b){a._info=d;2<arguments.length&&a._showInfo(b)};a.showInfo=function(a,d){a._showInfo(d)};a.show2d=function(a,d){a._show2d(d)};a.jmolBr=function(){return a._documentWrite("<br>")};
a.jmolButton=function(g,d,b,c,j){return a.controls._getButton(g,d,b,c,j)};a.jmolCheckbox=function(g,d,b,c,j,m,l){return a.controls._getCheckbox(g,d,b,c,j,m,l)};a.jmolCommandInput=function(g,d,b,c,j,m){return a.controls._getCommandInput(g,d,b,c,j,m)};a.jmolHtml=function(g){return a._documentWrite(g)};a.jmolLink=function(g,d,b,c,j){return a.controls._getLink(g,d,b,c,j)};a.jmolMenu=function(g,d,b,c,j){return a.controls._getMenu(g,d,b,c,j)};a.jmolRadio=function(g,d,b,c,j,m,l,e){return a.controls._getRadio(g,
d,b,c,j,m,l,e)};a.jmolRadioGroup=function(g,d,b,c,j,m){return a.controls._getRadioGroup(g,d,b,c,j,m)};a.setCheckboxGroup=function(g,d){a.controls._cbSetCheckboxGroup(g,d,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,d){null!=g&&(a._appletCssClass=g);a._appletCssText=d?d+" ":g?'class="'+g+'" ':""};a.setButtonCss=function(g,
d){null!=g&&(a.controls._buttonCssClass=g);a.controls._buttonCssText=d?d+" ":g?'class="'+g+'" ':""};a.setCheckboxCss=function(g,d){null!=g&&(a.controls._checkboxCssClass=g);a.controls._checkboxCssText=d?d+" ":g?'class="'+g+'" ':""};a.setRadioCss=function(g,d){null!=g&&(a.controls._radioCssClass=g);a.controls._radioCssText=d?d+" ":g?'class="'+g+'" ':""};a.setLinkCss=function(g,d){null!=g&&(a.controls._linkCssClass=g);a.controls._linkCssText=d?d+" ":g?'class="'+g+'" ':""};a.setMenuCss=function(g,d){null!=
g&&(a.controls._menuCssClass=g);a.controls._menuCssText=d?d+" ":g?'class="'+g+'" ':""};a.setAppletSync=function(g,d,b){a._syncedApplets=g;a._syncedCommands=d;a._syncedReady={};a._isJmolJSVSync=b};a.setGrabberOptions=function(g){a._grabberOptions=g};a.setAppletHtml=function(g,d){g._code&&(a.$html(d,g._code),g._init&&!g._deferApplet&&g._init())};a.coverApplet=function(a,d){a._cover&&a._cover(d)};a.setFileCaching=function(g,d){g?g._cacheFiles=d:a.fileCache=d?{}:null};a.resetView=function(g,d){a.View.resetView(g,
d)};a.updateView=function(a,d,b){a._updateView(d,b)};a.getChemicalInfo=function(g,d,b){d||(d="name");"string"!=typeof g&&(g=g._getSmiles());return a._getNCIInfo(g,d,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,j){try{a._debugging=0<=document.location.href.indexOf("j2sdebug")}catch(g){}var d=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){d.push(a);window[a]=b};a.getGlobals=function(){return d.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=
a)};var b=null;a._startProfiling=function(a){b=a&&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 c=a._O.prototype;c.equals=function(a){return this==a};c.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};c.getClass=function(){return a.getClass(this)};
c.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};c.finalize=function(){};c.notify=function(){};c.notifyAll=function(){};c.wait=function(){};c.to$tring=Object.prototype.toString;c.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||b.BYTES_PER_ELEMENT)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},m=function(){};a.inheritArgs=new m;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),l(a,b);else{if(b instanceof Array)for(var d=0;d<b.length;d++)c.push(b[d]),l(a,b[d])}else for(d=1;d<arguments.length;d++)c.push(arguments[d]),l(a,arguments[d])}};var l=function(a,b){for(var c in b)if("b$"!=c&&"prototype"!=c&&"superClazz"!=c&&"__CLASS_NAME__"!=c&&"implementz"!=c&&("function"!=typeof b[c]||!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 j=a.equalsOrExtendsLevel(f[g],c);if(0<=j)return d+j+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,j=b[d];if(j)if(j.claxxOwner)j.claxxOwner!==c&&(f=j);else if(!j.stacks&&
(!j.lastClaxxRef||!j.lastClaxxRef.prototype[d]||!j.lastClaxxRef.prototype[d].stacks))f=j;else{var h=j.stacks;h||(h=j.lastClaxxRef.prototype[d].stacks);for(g=h.length;0<=--g;)if(c===h[g]){f=0<g?h[--g].prototype[d]:h[0].prototype[d]["\\unknown"];break}else if(0<a.getInheritedLevel(c,h[g])){f=h[g].prototype[d];break}}if(f)return 0==g&&"construct"==d&&(c=j.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]),
V(b,c,d,a.getParamsType(e).typeString))};a.superConstructor=function(b,c,d){a.superCall(b,c,"construct",d);c.con$truct&&c.con$truct.apply(b,[])};a.CastedNull=function(b){this.clazzName=b?b instanceof String?b:b instanceof Function?a.getClassName(b,!0):""+b:"Object";this.toString=function(){return null};this.valueOf=function(){return null}};a.castNullAs=function(b){return new a.CastedNull(b)};a._initializingException=!1;a._callingStackTraces=[];var e=function(){this.toString=function(){return"J2S MethodException"}},
f;try{null.hello()}catch(h){if(c=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 c=h.message.indexOf(":"),r=h.message.indexOf(":",c+2),L=h.message.substr(c+1,r-c-20);f=function(a){return-1!=a.message.indexOf(L)}}else if(-1!=navigator.userAgent.toLowerCase().indexOf("webkit")){var N=c(h.message,"hello");f=function(a){return N.test(a.message)}}else N=c(h.message,"$$o$$"),
f=function(a){return N.test(a.message)}}a.exceptionOf=function(b,c){if(b.__CLASS_NAME__)return a.instanceOf(b,c);b.getMessage||(b.getMessage=function(){return""+b+(b.stack?"\n"+b.stack:"")});b.printStackTrace||(b.printStackTrace=function(){});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 j=""+f[g];60<j.length&&(j=j.substring(0,60)+"...");b+=" args["+g+"]="+j.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,f,g){f.exName=d;g=T(g);var j=c.prototype,h=j[d];a._Loader._checkLoad&&R(c,d,g);if(!h||h.claxxOwner===c&&h.funParams==g)return f.funParams=g,f.claxxOwner=c,f.exClazz=c,j[d]=f;var k=null,m=h.stacks;m||(m=[],k=h,h.claxxOwner&&(m[0]=k.claxxOwner));if(!h.stacks||h.claxxReference!==c){++q;h=function(){var c;
a:{var d=arguments.callee.claxxReference,f=arguments.callee.methodName;c=arguments;fx=this[f];var U=a.getParamsType(c);if(!fx)try{System.out.println(a.getStackTrace(5))}catch(va){}if(b){var g=d.__CLASS_NAME__+" "+f+" ";0>t.indexOf(g)&&(t+=g+"\n");b[g]||(b[g]=0);b[g]++}if(fx.lastParams==U.typeString&&fx.lastClaxxRef===d){if(U.hasCastedNull){d=[];for(f=0;f<c.length;f++)d[f]=c[f]instanceof a.CastedNull?null:c[f]}else d=c;c=fx.lastMethod?fx.lastMethod.apply(this,d):null}else{fx.lastParams=U.typeString;
fx.lastClaxxRef=d;g=fx.stacks;g||(g=d.prototype[f].stacks);for(var j=!1,v=g.length;0<=--v;)if(j||g[v]===d){var h=g[v].prototype[f],D=U,j=c,k=fx,m=[],G=!0,l=void 0;for(l in h)if(92==l.charCodeAt(0)){var B=l.substring(1).split("\\");B.length==D.length&&m.push(B);G=!1}else if(G&&"funParams"==l&&h.funParams){l=h.funParams;B=l.substring(1).split("\\");B.length==D.length&&(m[0]=B);break}if(!(l=0==m.length)){for(var l=D,B=[],n=m.length,E=0;E<n;E++){for(var p=[],sa=!0,r=m[E].length,q=0;q<r;q++)if(p[q]=a.getInheritedLevel(l[q],
m[E][q]),0>p[q]){sa=!1;break}sa&&(p[l.length]=E,B.push(p))}if(0==B.length)m=null;else{n=B[0];for(E=1;E<B.length;E++){p=!0;for(q=0;q<l.length;q++)if(n[q]<B[E][q]){p=!1;break}p&&(n=B[E])}m=m[n[l.length]].join("\\")}l=!m}if(l)j=new e;else{h=G?h:h["\\"+m];G=null;if(D.hasCastedNull){G=[];for(D=0;D<j.length;D++)G[D]=j[D]instanceof a.CastedNull?null:j[D]}else G=j;k.lastMethod=h;j=h.apply(this,G)}if(!(j instanceof e)){c=j;break a}j=!0}"construct"!=f&&V(this,d,f,U.typeString);c=void 0}}return c};h.methodName=
d;h.claxxReference=c;h=j[d]=h;d=[];for(j=0;j<m.length;j++)d[j]=m[j];h.stacks=d}m=h.stacks;0>S(m,c)&&m.push(c);k&&(k.claxxOwner===c?(h[k.funParams]=k,k.claxxOwner=null,k.funParams=null):k.claxxOwner||(h["\\unknown"]=k));f.exClazz=c;h[g]=f;return h};duplicatedMethods={};var R=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 S=function(a,b){if(a&&b)for(var c=a.length;0<=--c;)if(a[c]===b)return c;return-1},la=function(a,b){var c=S(a,b);if(0<=c){for(var d=a.length-1;c<d;c++)a[c]=a[c+1];a.length--;return!0}},T=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){d.exName=c;e=T(e);a._Loader._checkLoad&&R(b,c,e);d.funParams=e;d.claxxOwner=b;return b.prototype[c]=d};var t="";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};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 q=0;a.allPackage={};a.allClasses={};a.lastPackageName=null;a.lastPackage=null;a.unloadedClasses=[];a.declarePackage=function(b){if(a.lastPackageName==
b)return a.lastPackage;if(b&&b.length){for(var c=b.split(/\./),d=a.allPackage,e=0;e<c.length;e++)d[c[e]]||(d[c[e]]={__PKG_NAME__:d.__PKG_NAME__?d.__PKG_NAME__+"."+c[e]:c[e]},0==e&&a.setGlobal(c[e],d[c[e]])),d=d[c[e]];a.lastPackageName=b;return a.lastPackage=d}};a.evalType=function(b,c){var d=b.lastIndexOf(".");if(-1!=d){var e=b.substring(0,d),e=a.declarePackage(e),d=b.substring(d+1);return e[d]}if(c)return window[b];switch(b){case "string":return String;case "number":return Number;case "object":return a._O;
case "boolean":return Boolean;case "function":return Function;case "void":case "undefined":case "unknown":return b;case "NullObject":return NullObject;default:return window[b]}};a.defineType=function(b,c,d,e){var f=a.unloadedClasses[b];f&&(c=f);f=b.lastIndexOf(".");if(-1!=f){var g=b.substring(0,f),g=a.declarePackage(g),f=b.substring(f+1);if(g[f])return g[f];g[f]=c}else{if(window[b])return window[b];a.setGlobal(b,c)}a.decorateAsType(c,b,d,e);b=a._innerFunctions;c.defineMethod=b.defineMethod;c.defineStaticMethod=
b.defineStaticMethod;c.makeConstructor=b.makeConstructor;return c};var X=!1;-1!=navigator.userAgent.indexOf("Safari")&&(c=navigator.userAgent,r=c.indexOf("Version/"),-1!=r&&(c=c.substring(r+8),X=4<=parseFloat(c)));a.instantialize=function(a,b){if(!b||!(1==b.length&&b[0]&&b[0]instanceof m)){a instanceof Number&&(a.valueOf=function(){return this});if(X){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="/",h=0;h<f;h++)g+=e[h]+"/";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(m){}k=null==c?null:j._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 Y=[];a.pu$h=function(a){a||(a=self.c$);a&&Y.push(a)};a.p0p=function(){return Y.pop()};a.decorateAsClass=function(b,c,d,e,f,g){var j=null;c&&(j=c.__PKG_NAME__,j||(j=
c.__CLASS_NAME__));var h=(j?j+".":"")+d;a._Loader._classPending[h]&&(delete a._Loader._classPending[h],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+j+"."+d);(j=a.unloadedClasses[h])&&(b=j);Z(b,c,d);g?a.inheritClass(b,e,g):e&&a.inheritClass(b,e);f&&a.implementOf(b,f);return b};var Z=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(){};Z(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 V=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 isNaN(a)?0: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;var aa=function(a,b){a||(a=0);if("object"==typeof a)var c=a;else for(var c=Array(a),d=0;d<a;d++)c[d]=0;c.BYTES_PER_ELEMENT=b>>3;c._fake=!0;return c},O=function(a,b){a||(a=0);b||(b=this.length);if(this._fake){var c=new this.constructor(b-a);System.arraycopy(this,a,c,0,b-a);return c}return new this.constructor(this.buffer.slice(a*this.BYTES_PER_ELEMENT,
b*this.BYTES_PER_ELEMENT))};!0==(a.haveInt32=!!(self.Int32Array&&self.Int32Array!=Array))?Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort):(Int32Array=function(a){return aa(a,32)},Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.toString=function(){return"[object Int32Array]"});Int32Array.prototype.slice||(Int32Array.prototype.slice=function(){return O.apply(this,arguments)});Int32Array.prototype.clone=function(){var a=this.slice();a.BYTES_PER_ELEMENT=
4;return a};!0==(a.haveFloat64=!!(self.Float64Array&&self.Float64Array!=Array))?Float64Array.prototype.sort||(Float64Array.prototype.sort=Array.prototype.sort):(Float64Array=function(a){return aa(a,64)},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.toString=function(){return"[object Float64Array]"});Float64Array.prototype.slice||(Float64Array.prototype.slice=function(){return O.apply(this,arguments)});Float64Array.prototype.clone=function(){return this.slice()};a.newArray=
function(a,b,c,d){if(-1!=a||2==arguments.length)return I(arguments,0);a=b.slice(c,d);a.BYTES_PER_ELEMENT=b.BYTES_PER_ELEMENT;return a};var I=function(a,b){var c=a[0];"string"==typeof c&&(c=c.charCodeAt(0));var d=a.length-1,e=a[d];if(1<d){for(var e=Array(d),f=0;f<d;f++)e[f]=a[f+1];d=Array(c);for(f=0;f<c;f++)d[f]=I(e,b);return d}0<b&&0>c&&(c=e);switch(b){case 8:return d=new Int8Array(c),d.BYTES_PER_ELEMENT=1,d;case 32:return d=new Int32Array(c),d.BYTES_PER_ELEMENT=4,d;case 64:return d=new Float64Array(c),
d.BYTES_PER_ELEMENT=8,d;default:d=0>c?e:Array(c);d.BYTES_PER_ELEMENT=0;if(0<c&&null!=e)for(f=c;0<=--f;)d[f]=e;return d}};a.newByteArray=function(){return I(arguments,8)};a.newIntArray=function(){return I(arguments,32)};a.newFloatArray=function(){return I(arguments,64)};a.newDoubleArray=a.newFloatArray;a.newLongArray=a.newShortArray=a.newIntArray;a.newCharArray=a.newBooleanArray=a.newArray;!0==(a.haveInt8=!!self.Int8Array)?(Int8Array.prototype.sort||(Int8Array.prototype.sort=Array.prototype.sort),
Int8Array.prototype.slice||(Int8Array.prototype.slice=function(){return O.apply(this,arguments)})):a.newByteArray=a.newIntArray;Int8Array.prototype.clone=function(){var a=this.slice();a.BYTES_PER_ELEMENT=1;return a};a.isAB=function(a){return a&&"object"==typeof a&&1==a.BYTES_PER_ELEMENT};a.isAI=function(a){return a&&"object"==typeof a&&4==a.BYTES_PER_ELEMENT};a.isAF=function(a){return a&&"object"==typeof a&&8==a.BYTES_PER_ELEMENT};a.isAS=function(a){return a&&"object"==typeof a&&a.constructor==Array&&
("string"==typeof a[0]||"undefined"==typeof a[0])};a.isAII=function(b){return b&&"object"==typeof b&&a.isAI(b[0])};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.isASS=function(b){return b&&"object"==typeof b&&a.isAS(b[0])};a.isAFloat=function(b){return b&&"object"==typeof b&&b.constructor==Array&&a.instanceOf(b[0],Float)};a.isAP=function(b){return b&&"JU.P3"==a.getClassName(b[0])};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||b>d)for(;0<=--e;)c[d++]=a[b++];else{d+=e;for(b+=e;0<=--e;)a[--d]=a[--b]}},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+")")}};c=a.innerFunctionNames;for(r=0;r<c.length;r++)a._O[c[r]]=a._innerFunctions[c[r]],Array[c[r]]=a._innerFunctions[c[r]];a._Loader=a.ClazzLoader=function(){};var n=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=j._checkLoad;b.updateNodeForFunctionDecoration=function(a){(a=C(a))&&a.status==n.STATUS_KNOWN&&window.setTimeout(function(a){return function(){updateNode(a)}}(a),
1)};n.prototype.toString=function(){return this.name||this.path||"ClazzNode"};n.STATUS_UNKNOWN=0;n.STATUS_KNOWN=1;n.STATUS_CONTENT_LOADED=2;n.STATUS_MUSTS_LOADED=3;n.STATUS_DECLARED=4;n.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 n,e={},f=0,g=6,h=navigator.userAgent.toLowerCase(),k=-1!=h.indexOf("opera"),m=-1!=h.indexOf("msie")&&!k,l=-1!=h.indexOf("gecko");if(k&&(g=1,k=h.indexOf("opera/"),
-1!=k)){var p=9;try{p=parseFloat(h.subString(k+6))}catch(r){}9.6<=p&&(g=6)}var t;self.Clazz&&a.isClassDefined?isClassDefined=a.isClassDefined:(t={},isClassDefined=function(a){return!0==t[a]});var u=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},x=[],w={},z=0;b.loadPackageClasspath=
function(a,c,d,e,f,g){f||(f=0);e||(e=null);g||(g=0);var j=d&&w["@"+a];if(0==f&&(d&&!w["@java"]&&0!=a.indexOf("java")&&null!=window["java.registered"]&&!w["@java"])&&(b.loadPackage("java",e?function(){b.loadPackageClasspath(a,c,d,e,1)}:null),e))return;if(a instanceof Array)if(u(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(j=0;j<a.length;j++)b.loadPackageClasspath(a[j],c,d,null);else{switch(a){case "java.*":a="java";case "java":c&&
(f="@net.sf.j2s.ajax",w[f]||(w[f]=c),f="@net.sf.j2s",w[f]||(w[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&&(w["@"+a]=c);d&&!j&&!window[a+".registered"]?(z++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){0==--z&&ta()},!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,j,h){h||(h=0);null==j&&(j=!1);if("boolean"==typeof f)return a.evalType(c);null!=window["java.registered"]&&!w["@java"]&&b.loadPackage("java");b.keepOnLoading=!0;if(!g&&(z&&c.lastIndexOf(".package")!=c.length-8||0!=c.indexOf("java.")&&!isClassDefined(ba)))ma.push([c,f]),System.out.println("loadclass-queuing"+c+ba+" "+isClassDefined(ba));else if((h=isClassDefined(c))||A["@"+c]){if(h&&f&&(g=C(c),!g||g.status>=n.STATUS_LOAD_COMPLETE))j?window.setTimeout(f,25):f()}else{var k=
b.getClasspathFor(c);h=e[k];if(!h)for(j=x.length;0<=--j;)if(x[j].path==k||x[j].name==c){h=!0;break}if(h){if(f&&(h=C(c)))if(h.onLoaded){if(f!=h.onLoaded){var m=h.onLoaded,l=f;h.onLoaded=function(){m();l()}}}else h.onLoaded=f}else{h=a.unloadedClasses[c]&&C(c)||new n;h.name=c;h.path=k;h.isPackage=k.lastIndexOf("package.js")==k.length-10;ga(k,c,h);h.onLoaded=f;h.status=n.STATUS_KNOWN;c=!1;for(j=x.length;0<=--j;)if(x[j].status!=n.STATUS_LOAD_COMPLETE){c=!0;break}if(h.isPackage){for(j=x.length;0<=--j&&
!x[j].isPackage;)x[j+1]=x[j];x[++j]=h}else c&&x.push(h);if(!c){var v=!1;f&&(v=H,H=!0);g&&(f=null);ca(d,h,!0);F(h,h.path,h.requiredBy,!1,f?function(){H=v;f()}:null)}}}};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=[b]);u(b);j._debugCore&&(a=a.replace(/\.z\./,"."));for(var c=b.length;0<=--c;)w["#"+b[c]]=a;w["$"+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=w["#"+c];if(!f||d||e){var g,j;if(f){if(c=c.replace(/\./g,"/"),0<=(j=f.lastIndexOf(c))||0<=(j=c.lastIndexOf("/"))&&0<=(j=f.lastIndexOf(c.substring(0,j))))g=f.substring(0,j)}else{for(j=c.length+2;0<=(j=c.lastIndexOf(".",j-2))&&!(g=w["@"+c.substring(0,j)]););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,j+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];u(a);for(c=0;c<b;c++)A["@"+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 y={},A={},K=function(c,d,e,f){if(!f)try{eval(e+";//# sourceURL="+c)}catch(g){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: "+g.message+" \n\ndata:\n\n"+e)+"\n\n"+a.getStackTrace();alert(c);
a.alert(c);throw g;}b.onScriptLoaded(c,!1);W(d)},L=function(a){return function(){if("interactive"!=a.readyState){try{a.parentNode&&a.parentNode.removeChild(a)}catch(b){}a=null}}},I=function(a){window["j2s.script.debugging"]||window.setTimeout(L(a),1)};a._4Name=function(c,d,e){if(a.isClassDefined(c))return a.evalType(c);d=j._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 F=function(c,d,g,h,k){a.currentPath=d;h&&alert("WHY>>");h=e[d];e[d]=!0;la(x,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"));h||System.out.println("loadScript "+d);b.onScriptLoading(d);if(ha&&!ia){var m=j._getFileData(d);try{K(d,g,m,h)}catch(l){alert(l+" loading file "+d+" "+c.name+" "+a.getStackTrace())}k&&k()}else c={dataType:"script",async:!0,type:"GET",url:d,success:M(d,
!1,k),error:M(d,!0,k)},f++,h?setTimeout(c.success,0):j.$ajax(c)},M=function(c,d,e){a.getStackTrace();return function(){l&&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(){I(a);W(c,e)}:function(){I(a);W(c)};0<=na?window.setTimeout(function(){W(c,g)},na):W(c,g)}},H=!0,N=!1,W=function(c,j){var h=y["@"+c];if(h){var k,s=w["$"+c];if(s)for(var l=
0;l<s.length;l++){var v=s[l];if(v!=h.name&&(k=C(v)))k.status<n.STATUS_CONTENT_LOADED&&(k.status=n.STATUS_CONTENT_LOADED,updateNode(k));else{k=new n;k.name=v;var p=w["#"+v];p||(alert(v+" J2S error in tryToLoadNext"),error("Java2Script implementation error! Please report this bug!"));k.path=p;ga(k.path,v,k);k.status=n.STATUS_CONTENT_LOADED;ca(d,k,!1);updateNode(k)}}if(h instanceof Array)for(l=0;l<h.length;l++)h[l].status<n.STATUS_CONTENT_LOADED&&(h[l].status=n.STATUS_CONTENT_LOADED,updateNode(h[l]));
else if(h.status<n.STATUS_CONTENT_LOADED){k=!1;s=document.getElementsByTagName("SCRIPT");for(l=0;l<s.length;l++)if(m){if(s[l].onreadystatechange&&s[l].onreadystatechange.path==h.path&&"interactive"==s[l].readyState){k=!0;break}}else if(s[l].onload&&s[l].onload.path==h.path){k=!0;break}k||(h.status=n.STATUS_CONTENT_LOADED,updateNode(h))}if(b.keepOnLoading){l=!0;if(k=oa(n.STATUS_KNOWN))for(ja(k);f<g&&(k=oa(n.STATUS_KNOWN));)ja(k);else if(0!=x.length)k=x.shift(),!e[k.path]||0!=x.length||!H||k.musts.length||
k.optionals.length?(ca(d,k,!0),F(k,k.path,k.requiredBy,!1)):H&&(H=!1);else if(k=pa(n.STATUS_KNOWN))for(ja(k);f<g&&(k=pa(n.STATUS_KNOWN));)ja(k);else l=!1;if(!(l||0<f)){h=[oa,pa];s=null;for(l=0;2>l;l++)for(;k=h[l](n.STATUS_CONTENT_LOADED);)1==l&&s===k&&(k.status=n.STATUS_LOAD_COMPLETE),updateNode(k),s=k;for(;!(O=[],!Q(d,c)););for(l=0;2>l;l++)for(s=null;(k=h[l](n.STATUS_DECLARED))&&s!==k;)updateNode(s=k);s=[];for(l=0;2>l;l++)for(;k=h[l](n.STATUS_DECLARED);)s.push(k),k.status=n.STATUS_LOAD_COMPLETE;
if(s.length){for(l=0;l<s.length;l++)P(s[l]);for(l=0;l<s.length;l++)if(h=s[l].onLoaded)s[l].onLoaded=null,h()}if(j)j();else if(b._classCountPending)for(v in b._classPending){if(k=C(v),System.out.println("class left pending "+v+" "+k),k){updateNode(k);break}}else b._checkLoad&&(System.out.println("I think I'm done: SAEM call count: "+q),a.showDuplicates(!0));b.onGlobalLoaded()}}}},O=[],Q=function(a,c){var d=O,e=d.length;d.push(a);for(var f=e;0<=--f&&!(d[f]===a&&d[f].status>=n.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=n.STATUS_LOAD_COMPLETE;P(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==n.STATUS_DECLARED&&
Q(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=C(c);d?(a.push(d),System.out.println(R("","",d,"",0))):alert("No node for "+c)}return a};var R=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=
R(a,b,c.parents[f],d+"\t",e+1);a+="\n"}return a};updateNode=function(a){if(!a.name||a.status>=n.STATUS_LOAD_COMPLETE)P(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<n.STATUS_DECLARED&&isClassDefined(f.name)){var g=[];f.status=n.STATUS_LOAD_COMPLETE;P(f);if(f.declaration&&f.declaration.clazzList){for(var h=0,j=f.declaration.clazzList,k=j.length;h<k;h++){var l=C(j[h]);l&&(l.status!=n.STATUS_LOAD_COMPLETE&&l!==f)&&
(l.status=f.status,l.declaration=null,P(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==n.STATUS_CONTENT_LOADED&&updateNode(f),f.status<n.STATUS_DECLARED&&(c=!1);a.musts.length!=d&&(e=d=a.musts.length,c=!0)}if(c){if(a.status<n.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=n.STATUS_DECLARED;
t&&(t[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=C(j[h]))&&l.status!=n.STATUS_DECLARED&&l!==a)l.status=n.STATUS_DECLARED,t&&(t[l.name]=!0),b.onScriptInitialized(l.path)}}c=n.STATUS_DECLARED;if(0==a.optionals.length&&0==a.musts.length||a.status>n.STATUS_KNOWN&&!a.declaration||S(a.musts,n.STATUS_LOAD_COMPLETE)&&S(a.optionals,n.STATUS_LOAD_COMPLETE)){c=n.STATUS_LOAD_COMPLETE;if(!T(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=C(j[h]))&&l.status!=c&&l!==a)if(l.declaration=null,!T(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==n.STATUS_LOAD_COMPLETE&&(a.parents=[])}}}};var S=function(a,b){for(var c=a.length;0<=--c;)if(a[c].status<b)return!1;return!0},T=function(a,c){a.status=c;b.onScriptCompleted(a.path);var d=a.onLoaded;if(d&&(a.onLoaded=null,d(),!b.keepOnLoading))return!1;
P(a);return!0},V={"r0.13412":1},X=function(){for(;;){var a=Math.random(),b="r"+a;if(!V[b])return V[b]=1,d.random=a}},C=function(a){X();return Y(a,d)},pa=function(a){X();return da(d,a)},oa=function(a){return aa(d,a)},Y=function(a,b){var c;return b.name==a?b:(c=Z(a,b.musts))||(c=Z(a,b.optionals))?c:null},Z=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=Y(a,f)))return f}return null},ka=function(a,b){return a.status==b&&(b!=n.STATUS_KNOWN||!e[a.path])&&
(b==n.STATUS_DECLARED||!isClassDefined(a.name))},aa=function(a,b){for(var c=a.musts.length;0<=--c;){var d=a.musts[c];if(ka(d,b)||(d=aa(d,b)))return d}return ka(a,b)?a:null},da=function(a,b){var c;return(c=ea(a.musts,b))||(c=ea(a.optionals,b))||ka(c=a,b)?c:null},ea=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=da(f,b)))return f}return null},qa=function(a,c,e,f){if(c instanceof Array){u(c);for(var g=0;g<c.length;g++)qa(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=y["#"+c];g||(g=(g=C(c))?g:new n,g.name=c,g.path=w["#"+c]||"unknown",ga(g.path,c,g),g.status=n.STATUS_KNOWN,ca(d,g,!1));fa(g,a,!0);5==arguments.length&&f&&(f.status=g.status,f.clazzList=arguments[4]);if(g.declaration=f)g.status=n.STATUS_CONTENT_LOADED;fa(g,e,!1)}},fa=function(a,b,c){if(b&&b.length){u(b);for(var d=0;d<b.length;d++){var e=b[d];if(e&&!isClassDefined(e)&&
!A["@"+e]){var f=C(e);f||(f=new n,f.name=e,f.status=n.STATUS_KNOWN);f.requiredBy=a;ca(a,f,c)}}}};window.Clazz?a.load=qa:b.load=qa;var ga=function(a,b,c){var d="@"+a;if(a=y[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 y[d]=[a,c];else y[d]=c;y["#"+b]=c},ja=function(a){var c=a.name;if(!isClassDefined(c)&&!A["@"+c]){var d=b.getClasspathFor(c);a.path=d;ga(d,c,a);if(!e[d])return F(a,d,a.requiredBy,!1),!0}return!1},ba=b.runtimeKeyClass="java.lang.String",
ma=[];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,na=-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;na=(ia=d)&&0<=c?c:-1;return d};var ta=function(){if(!z&&isClassDefined(ba)){for(var a=ma,c=0;c<a.length;c++)b.loadClass(a[c][0],
a[c][1]);ma=[]}};b.loadZJar=function(a,c){var d=null,e=c instanceof Array;e?c=c[c.length-1]:d=c==ba?ta:null;b.jarClasspath(a,e?c:[c]);b.loadClass(c,d,!0)};var ua={},ra=[],ca=function(a,b,c){var e=!1;c?(c=a.musts,b.requiredBy||(b.requiredBy=a)):c=a.optionals;ua[b.name]||(ra.push(b),ua[b.name]=b);for(var f=0;f<c.length;f++)if(c[f].name==b.name){e=!0;break}e||(c.push(b),H&&(0!=b.name.indexOf("java")&&0!=b.name.indexOf("net.sf.j2s.ajax"))&&(N&&(H=!1),N=!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)}},P=function(a){var b=a.parents;if(b)for(var c=b.length;0<=--c;)la(b[c].musts,a)||la(b[c].optionals,a)};a.binaryFolders=b.binaryFolders=[b.getJ2SLibBase()]})(a,a._Loader);a._LoaderProgressMonitor={};var y=a._LoaderProgressMonitor,F=null,K=0,u=null,Q=0;y.DEFAULT_OPACITY=j&&j._j2sLoadMonitorOpacity?j._j2sLoadMonitorOpacity:55;y.hideMonitor=function(){u.style.display="none"};y.showStatus=function(a,b){if(!u){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=ra;u=c;document.body.appendChild(c);da||(da=!0)}ea(u);if(null==a)b?M():y.hideMonitor();else{u.appendChild(document.createTextNode(""+a));"none"==u.style.display&&(u.style.display="");fa(y.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;Q!=c&&(Q=c,u.style.bottom=Q+4+"px");b&&M()}};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){F&&a==y.DEFAULT_OPACITY&&(window.clearTimeout(F),F=null);K=a;navigator.userAgent.toLowerCase();u.style.filter=
"Alpha(Opacity="+a+")";u.style.opacity=a/100},ra=function(){y.hideMonitor()},da=!1,M=function(){"none"!=u.style.display&&(K==y.DEFAULT_OPACITY?(F=window.setTimeout(function(){M()},750),K-=5):0<=K-10?(fa(K-10),F=window.setTimeout(function(){M()},40)):u.style.display="none")},p=a.Console,z=System;p.maxTotalLines=1E4;p.setMaxTotalLines=function(a){p.maxTotalLines=0<a?a:999999};p.maxLatency=40;p.setMaxLatency=function(a){p.maxLatency=0<a?a:40};p.pinning=!1;p.enablePinning=function(a){p.pinning=a};p.linesCount=
0;p.metLineBreak=!1;p.createConsoleWindow=function(){var a=document.createElement("DIV");a.style.cssText="font-family:monospace, Arial, sans-serif;";document.body.appendChild(a);return a};var A=String.fromCharCode(160),A=A+(A+A+A);p.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(p.linesCount>p.maxTotalLines){for(var d=0;d<p.linesCount-p.maxTotalLines;d++)c&&0<c.childNodes.length&&c.removeChild(c.childNodes[0]);
p.linesCount=p.maxTotalLines}var e=!1;a=("undefined"==typeof a?"":null==a?"null":""+a).replace(/\t/g,A);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,A);for(var f=a.split(/\r\n|\r|\n/g),d=0,g=f.length-1;d<=g;d++){var h=null;if(p.metLineBreak||0==p.linesCount||1>c.childNodes.length)h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.linesCount++;else try{h=
c.childNodes[c.childNodes.length-1]}catch(j){h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.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=A);k.appendChild(document.createTextNode(h));p.pinning||(c.scrollTop+=100);p.metLineBreak=d!=g||e}d=c.parentNode.className;!p.pinning&&(d&&-1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);p.lastOutputTime=(new Date).getTime()};
p.clear=function(){try{p.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]);p.linesCount=0}}catch(e){}};a.alert=function(a){p.consoleOutput(a+"\r\n")};z.out.print=function(a){p.consoleOutput(a)};z.out.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};z.out.write=function(a,b,c){z.out.print(String.instantialize(a).substring(b,b+c))};z.err.__CLASS_NAME__=
"java.io.PrintStream";z.err.print=function(a){p.consoleOutput(a,"red")};z.err.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};z.err.write=function(a,b,c){z.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2017-05-19 12:09:25 -0500 (Fri, 19 May 2017) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.16.1";
