"undefined"==typeof jQuery&&alert("Note -- JSmoljQuery is required for JSmol, but it's not defined.");
Jmol=function(a){return{_jmolInfo:{userAgent:navigator.userAgent,version:version="Jmol-JSO 13.0"},_allowedJmolSize:[25,2048,300],_applets:{},_asynchronous:!0,_ajaxQueue:[],db:{_databasePrefixes:"$=:",_fileLoadScript:";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * };",_nciLoadScript:";n = ({molecule=1}.length < {molecule=2}.length ? 2 : 1); select molecule=n;display selected;center selected;",_pubChemLoadScript:"",
_DirectDatabaseCalls:{"cactus.nci.nih.gov":"%URL","www.rcsb.org":"%URL","pubchem.ncbi.nlm.nih.gov":"%URL",$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",$$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf","=":"http://www.rcsb.org/pdb/files/%FILE.pdb","==":"http://www.rcsb.org/pdb/files/ligand/%FILE.cif",":":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d"},_restQueryUrl:"http://www.rcsb.org/pdb/rest/search",_restQueryXml:"<orgPdbQuery><queryType>org.pdb.query.simple.AdvancedKeywordQuery</queryType><description>Text Search</description><keywords>QUERY</keywords></orgPdbQuery>",
_restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:a,_execLog:"",_execStack:[],_isMsie:0<=navigator.userAgent.toLowerCase().indexOf("msie"),_isXHTML:!1,_lastAppletID:null,_mousePageX:null,_serverUrl:"http://chemapps.stolaf.edu/jmol/jsmol.jsmol.php",_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1}}(document);
(function(a,d){a.$=function(b,a){return d("#"+b._id+(a?"_"+a:""))};a.$ajax=function(b){return d.ajax(b)};a.$attr=function(b,a,j){return d("#"+b).attr(a,j)};a.$bind=function(b,a,j){return j?d(b).bind(a,j):d(b).unbind(a)};a.$html=function(b,a){return d("#"+b).html(a)};a.$offset=function(b){return d("#"+b).offset()};a.$on=function(b,a){return d(window).on(b,a)};a.$resize=function(b){return d(window).resize(b)};a.$submit=function(b){return d("#"+b).submit()};a.$val=function(b,a){return d("#"+b).val(a)};
var c=jQuery,h=document;c.map(["click","mousemove","mouseup","touchmove","touchend"],function(b){var a=function(b){c(l).each(function(){var a=c(this);this!==b.target&&!a.has(b.target).length&&a.triggerHandler(j,[b.target,b])})},j=b+"outjsmol",l=c(),e=b+"."+j+"-special-event";c.event.special[j]={setup:function(){l=l.add(this);1===l.length&&c(h).bind(e,a)},teardown:function(){l=l.not(this);0===l.length&&c(h).unbind(e)},add:function(b){var a=b.handler;b.handler=function(b,j){b.target=j;a.apply(this,
arguments)}}}});var g=jQuery;g.ajaxSettings.xdr=function(){return window.XDomainRequest?new window.XDomainRequest:null};var k=g.ajaxSettings.xdr();g.extend(g.support,{iecors:!!k});g.support.iecors&&g.ajaxTransport(function(b){return{send:function(a,j){var l=b.xdr();l.onload=function(){j(200,"OK",{text:l.responseText},{"Content-Type":l.contentType})};b.xhrFields&&(l.onerror=b.xhrFields.error,l.ontimeout=b.xhrFields.timeout);l.open(b.type,b.url);l.send(b.hasContent&&b.data||null)},abort:function(){xdr.abort()}}});
a._clearVars=function(){delete jQuery;delete d;delete a;java&&(delete J,delete JZ,delete java,delete Clazz,delete JavaObject,delete bhtest,delete xxxbhparams,delete xxxShowParams,delete c$,delete d$,delete w$,delete $_A,delete $_AB,delete $_AC,delete $_AD,delete $_AF,delete $_AI,delete $_AL,delete $_AS,delete $_Ab,delete $_B,delete $_C,delete $_D,delete $_E,delete $_F,delete $_G,delete $_H,delete $_I,delete $_J,delete $_K,delete $_L,delete $_M,delete $_N,delete $_O,delete $_P,delete $_Q,delete $_R,
delete $_S,delete $_T,delete $_U,delete $_V,delete $_W,delete $_X,delete $_Y,delete $_Z,delete $_k,delete $_s,delete $t$)};var b=document,e=window,f={};f.ua=navigator.userAgent.toLowerCase();f.os=function(){for(var b=["linux","unix","mac","win"],a=b.length;a--;)if(-1!=f.ua.indexOf(b[a]))return b[a];return"unknown"};f.browser=function(){for(var b=f.ua,a="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),j=0;j<a.length;j++)if(0<=b.indexOf(a[j]))return a[j];return"unknown"};f.browserName=
f.browser();f.browserVersion=parseFloat(f.ua.substring(f.ua.indexOf(f.browserName)+f.browserName.length+1));f.supportsXhr2=function(){return d.support.cors||d.support.iecors};f.allowDestroy="msie"!=f.browserName;f.allowHTML5="msie"!=f.browserName||0>navigator.appVersion.indexOf("MSIE 8");f.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};f._webGLtest=0;f.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var m;a.featureDetection._webGLtest=e.WebGLRenderingContext&&
((m=b.createElement("canvas")).getContext("webgl")||m.getContext("experimental-webgl"))?1:-1}return 0<a.featureDetection._webGLtest};f.supportsLocalization=function(){for(var a=b.getElementsByTagName("meta"),e=a.length;0<=--e;)if(0<=a[e].outerHTML.toLowerCase().indexOf("utf-8"))return!0;return!1};f.supportsJava=function(){if(!a.featureDetection._javaEnabled){if(a._isMsie)return!0;a.featureDetection._javaEnabled=navigator.javaEnabled()?1:-1}return 0<a.featureDetection._javaEnabled};f.compliantBrowser=
function(){var a=!!b.getElementById,e=f.os();if("opera"==f.browserName&&7.54>=f.browserVersion&&"mac"==e||"webkit"==f.browserName&&125.12>f.browserVersion||"msie"==f.browserName&&"mac"==e||"konqueror"==f.browserName&&3.3>=f.browserVersion)a=!1;return a};f.isFullyCompliant=function(){return f.compliantBrowser()&&f.supportsJava()};f.useIEObject="win"==f.os()&&"msie"==f.browserName&&5.5<=f.browserVersion;f.useHtml4Object="mozilla"==f.browserName&&5<=f.browserVersion||"opera"==f.browserName&&8<=f.browserVersion||
"webkit"==f.browserName&&412.2<=f.browserVersion;a.featureDetection=f;a._ajax=function(b){if(!b.async)return a.$ajax(b).responseText;a._ajaxQueue.push(b);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var b=a._ajaxQueue.shift();b&&a.$ajax(b)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"]];a._getGrabberOptions=function(b,e){if(0==a._grabberOptions.length)return"";var j='<input type="text" id="ID_query" onkeypress="13==event.which&&Jmol._applets[\'ID\']._search()" size="32" value="" />',
l='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(j="<nobr>"+j+'<span style="display:none">',l="</span>"+l):j+="<br /><nobr>";for(var j=j+'<select id="ID_select">',f=0;f<a._grabberOptions.length;f++)var h=a._grabberOptions[f],j=j+('<option value="'+h[0]+'" '+(0==f?"selected":"")+">"+h[1]+"</option>");j=(j+"</select>"+l).replace(/ID/g,b._id)+(e?e:"");return"<br />"+j};a._saveFile=function(b,e,j,l){var f=a._serverUrl;f&&(a.$attr("__jsmolform__",
"action",f+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",j),a.$val("__jsmolfilename__",b),a.$val("__jsmolmimetype__",e),a.$val("__jsmolencoding__",l),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""))};a._getScriptForDatabase=function(b){return"$"==b?a.db._nciLoadScript:":"==b?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(b,a,j){var l=[],e="";if(0==j.indexOf("ERROR"))e=j;else switch(a){case "=":a=j.split("<dimStructure.structureId>");l=["<table>"];for(j=1;j<a.length;j++)l.push('<tr><td valign=top><a href="javascript:Jmol.search('+
b._id+",'="+a[j].substring(0,4)+"')\">"+a[j].substring(0,4)+"</a></td>"),l.push("<td>"+a[j].split("Title>")[1].split("</")[0]+"</td></tr>");l.push("</table>");e=a.length-1+" matches";break;case "$":case ":":break;default:return}b._infoHeader=e;b._info=l.join("");b._showInfo(!0)};a._loadSuccess=function(b,e){e&&(a._ajaxDone(),e(b))};a._loadError=function(b){a._ajaxDone();a.say("Error connecting to server.");null!=b&&b()};a._isDatabaseCall=function(b){return 0<=a.db._databasePrefixes.indexOf(b.substring(0,
1))};a._getDirectDatabaseCall=function(b,e){if(e&&!a.featureDetection.supportsXhr2())return b;var j=2,l,f=a.db._DirectDatabaseCalls[b.substring(0,j)];f||(f=a.db._DirectDatabaseCalls[l=b.substring(0,--j)]);f&&":"==l&&(l=b.toLowerCase(),isNaN(parseInt(b.substring(1)))?0==l.indexOf(":smiles:")?(f+="?POST?smiles="+b.substring(8),b=":smiles"):0==l.indexOf(":cid:")?b=":cid/"+b.substring(5):(0==l.indexOf(":name:")?b=b.substring(5):0==l.indexOf(":cas:")&&(b=b.substring(4)),b=":name/"+encodeURIComponent(b.substring(1))):
b=":cid/"+b.substring(1));return b=f?f.replace(/\%FILE/,b.substring(j)):b};a._getRawDataFromServer=function(b,e,j,l,f,h){b="?call=getRawDataFromDatabase&database="+b+"&query="+encodeURIComponent(e)+(f?"&encoding=base64":"")+(h?"":"&script="+encodeURIComponent(a._getScriptForDatabase(b)));return a._contactServer(b,j,l)};a._getInfoFromDatabase=function(b,e,j){if("===="==e){var l=a.db._restQueryXml.replace(/QUERY/,j),l={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,
data:encodeURIComponent(l)+"&req=browser",success:function(l){a._ajaxDone();a._extractInfoFromRCSB(b,e,j,l)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(l)}j="?call=getInfoFromDatabase&database="+e+"&query="+encodeURIComponent(j);return a._contactServer(j,function(j){a._setInfo(b,e,j)})};a._extractInfoFromRCSB=function(b,e,j,l){var f=l.length/5;if(0!=f&&4==j.length&&1!=f){j=j.toUpperCase();var h=l.indexOf(j);0<h&&0<="123456789".indexOf(j.substring(0,1))&&(l=j+","+l.substring(0,
h)+l.substring(h+5));50<f&&(l=l.substring(0,250));l=l.replace(/\n/g,",");l=a._restReportUrl.replace(/IDLIST/,l);a._loadFileData(b,l,function(j){a._setInfo(b,e,j)})}};a._loadFileData=function(b,e,j,l){if(a._isDatabaseCall(e)&&(a._setQueryTerm(b,e),e=a._getDirectDatabaseCall(e,!0),a._isDatabaseCall(e))){e=a._getDirectDatabaseCall(e,!1);a._getRawDataFromServer("_",e,j,l);return}b={dataType:"text",url:e,async:a._asynchronous,success:function(b){a._loadSuccess(b,j)},error:function(){a._loadError(l)}};
var f=e.indexOf("?POST?");0<f&&(b.url=e.substring(0,f),b.data=e.substring(f+6),b.type="POST",b.contentType="application/x-www-form-urlencoded");a._ajax(b)};a._contactServer=function(b,e,j){return a._ajax({dataType:"text",type:"GET",url:a._serverUrl+b,success:function(b){a._loadSuccess(b,e)},error:function(){a._loadError(j)},async:e?a._asynchronous:!1})};a._setQueryTerm=function(b,e){if(e&&b._hasOptions&&"http://"!=e.substring(0,7)){if(a._isDatabaseCall(e)){var j=e.substring(0,1);e=e.substring(1);
"="==j&&(4==e.length&&"="==e.substring(0,1))&&(e=e.substring(1));var l=a._getElement(b,"select");if(l.options)for(var f=0;f<l.options.length;f++)l[f].value==j&&(l[f].selected=!0)}a._getElement(b,"query").value=e}};a._search=function(b,e,j){1<arguments.length||(e=null);a._setQueryTerm(b,e);e||(e=a._getElement(b,"query").value);if(0==e.indexOf("!"))b._script(e);else{e&&(e=e.replace(/\"/g,""));b._showInfo(!1);var f;a._isDatabaseCall(e)?(f=e.substring(0,1),e=e.substring(1)):f=b._hasOptions?a._getElement(b,
"select").value:"$";"="==f&&3==e.length&&(e="="+e);var h=f+e;e&&!(0>h.indexOf("?")&&h==b._thisJmolModel)&&(b._thisJmolModel=h,"$"==f||":"==f?b._jmolFileType="MOL":"="==f&&(b._jmolFileType="PDB"),b._searchDatabase(e,f,j))}};a._searchDatabase=function(b,e,j,f){b._showInfo(!1);return 0<=e.indexOf("?")?(a._getInfoFromDatabase(b,j,e.split("?")[0]),!0):a.db._DirectDatabaseCalls[j]?(b._loadFile(j+e,f),!0):!1};a._syncBinaryOK="?";a._canSyncBinary=function(){if(self.VBArray)return a._syncBinaryOK=!1;if("?"!=
a._syncBinaryOK)return a._syncBinaryOK;a._syncBinaryOK=!0;try{var b=new window.XMLHttpRequest;b.open("text","http://google.com",!1);b.hasOwnProperty("responseType")?b.responseType="arraybuffer":b.overrideMimeType&&b.overrideMimeType("text/plain; charset=x-user-defined")}catch(e){return System.out.println("JmolCore.js: synchronous binary file transfer is not available"),a._syncBinaryOK=!1}return!0};a._binaryTypes=".gz .jpg .png .zip .jmol .bin .smol .spartan .mrc .pse".split(" ");a._isBinaryUrl=function(b){for(var e=
a._binaryTypes.length;0<=--e;)if(0<=b.indexOf(a._binaryTypes[e]))return!0;return!1};a._getFileData=function(b){var e=a._isBinaryUrl(b)?"binary":"text",j="binary"==e&&!a._canSyncBinary(),f=0<=b.indexOf("?POST?");0==b.indexOf("file:/")&&0!=b.indexOf("file:///")&&(b="file://"+b.substring(5));var h=0>b.indexOf("://")||0==b.indexOf(document.location.protocol)&&0<=b.indexOf(document.location.host),c=a._isDirectCall(b);if(!h&&d.support.iecors||j||!h&&!c)return a._getRawDataFromServer("_",b,null,null,j,!0);
e={dataType:e,async:!1};f?(e.type="POST",e.url=b.split("?POST?")[0],e.data=b.split("?POST?")[1]):e.url=b;b=a.$ajax(e);return self.Clazz&&Clazz.instanceOf(b.response,self.ArrayBuffer)?b.response:b.responseText};a._isDirectCall=function(b){for(var e in a.db._DirectDatabaseCalls)if(0<=e.indexOf(".")&&0<=b.indexOf(e))return!0;return!1};a._cleanFileData=function(b){return 0<=b.indexOf("\r")&&0<=b.indexOf("\n")?b.replace(/\r\n/g,"\n"):0<=b.indexOf("\r")?b.replace(/\r/g,"\n"):b};a._getFileType=function(b){var a=
b.substring(0,1);if("$"==a||":"==a)return"MOL";if("="==a)return"="==b.substring(1,2)?"LCIF":"PDB";b=b.split(".").pop().toUpperCase();return b.substring(0,Math.min(b.length,3))};a._scriptLoad=function(b,a,j,e){var f=b._isJava||!b._noscript||1<j.length;f&&b._script("zap;set echo middle center;echo Retrieving data...");if(!e)return!1;f?b._script('load "'+a+'"'+j):b._applet.viewer.openFile(a);b._checkDeferred("");return!0};a._setConsoleDiv=function(b){self.Clazz&&Clazz.setConsoleDiv(b)};a._setJmolParams=
function(b,e,j){for(var f in e)if(0<="'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'".indexOf("'"+
f.toLowerCase()+"'")&&("language"!=f||a.featureDetection.supportsLocalization()))j?b.put(f,!0===e[f]?Boolean.TRUE:!1===e[f]?Boolean.FALSE:e[f]):b[f]=e[f]};a._registerApplet=function(b,e){return window[b]=a._applets[b]=a._applets[e]=e};a._readyCallback=function(b,e,j,f){var h=b.split("_object")[0];a._applets[h]._readyCallback(b,e,j,f)};a._getWrapper=function(b,e){var j=b._height,f=b._width;if("string"!==typeof j||0>j.indexOf("%"))j+="px";if("string"!==typeof f||0>f.indexOf("%"))f+="px";var h="";b._coverImage&&
(h=' onclick="Jmol.coverApplet(ID, false)" title="'+b._coverTitle+'"',h='<div id="ID_coverdiv" style="backgoround-color:red;z-index:10000;width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+b._coverImage+'" style="width:100%;height:100%"'+h+"/>"+('<image id="ID_coverclickgo" src="'+b._j2sPath+'/img/play_make_live.jpg" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:10001;opacity:0.5;"'+h+" />")+"</div>");var c=!e&&
!a._formdiv?'<div id="__jsmolformdiv__" style="display:none">\t\t\t\t<form id="__jsmolform__" method="post" target="_blank" action="">\t\t\t\t<input name="call" value="saveFile"/>\t\t\t\t<input id="__jsmolmimetype__" name="mimetype" value=""/>\t\t\t\t<input id="__jsmolencoding__" name="encoding" value=""/>\t\t\t\t<input id="__jsmolfilename__" name="filename" value=""/>\t\t\t\t<input id="__jsmoldata__" name="data" value=""/>\t\t\t\t</form>\t\t\t\t</div>':"";c&&(a._formdiv="__jsmolform__");return(e?
'<div id="ID_appletinfotablediv" style="width:Wpx;height:Hpx;position:relative">IMG<div id="ID_appletdiv" style="z-index:9999;width:100%;height:100%;position:absolute:top:0px;left:0px;">':'</div><div id="ID_infotablediv" style="width:100%;height:100%;position:absolute;top:0px;left:0px">\t\t\t<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>\t\t\t<div id="ID_infodiv" style="position:absolute;top:20px;bottom:0;width:100%;height:95%;overflow:auto"></div></div></div>'+
c).replace(/IMG/,h).replace(/Hpx/g,j).replace(/Wpx/g,f).replace(/ID/g,b._id)};a._documentWrite=function(b){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var e=document.getElementsByTagName("script");a._XhtmlElement=e.item(e.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(b):a._document.write(b);return null}return b};a._domWrite=function(b){for(var e=[0];e[0]<b.length;){var j=a._getDomElement(b,e);if(!j)break;a._XhtmlAppendChild?a._XhtmlElement.appendChild(j):a._XhtmlElement.parentNode.insertBefore(j,
_jmol.XhtmlElement)}};a._getDomElement=function(b,a){var j=document.createElement("span");j.innerHTML=b;a[0]=b.length;return j};a._setObject=function(b,a,j){b._id=a;b.__Info={};for(var e in j)b.__Info[e]=j[e];b._width=j.width;b._height=j.height;b._noscript=!b._isJava&&j.noscript;b._console=j.console;b._console||(b._console=b._id+"_infodiv");"none"==b._console&&(b._console=null);b._color=j.color?j.color.replace(/0x/,"#"):"#FFFFFF";b._disableInitialConsole=j.disableInitialConsole;b._noMonitor=j.disableJ2SLoadMonitor;
b._j2sPath=j.j2sPath;b._deferApplet=j.deferApplet;b._deferUncover=j.deferUncover;b._coverImage=!b._isJava&&j.coverImage;b._isCovered=!!b._coverImage;b._coverScript=j.coverScript;b._coverTitle=j.coverTitle;b._coverTitle||(b._coverTitle=b._deferApplet?"activate 3D model":"3D model is loading...");b._containerWidth=b._width+(b._width==parseFloat(b._width)?"px":"");b._containerHeight=b._height+(b._height==parseFloat(b._height)?"px":"");b._info="";b._infoHeader=b._jmolType+' "'+b._id+'"';b._hasOptions=
j.addSelectionOptions;b._defaultModel=j.defaultModel;b._readyScript=j.script?j.script:"";b._readyFunction=j.readyFunction;b._coverImage&&!b._deferApplet&&(b._readyScript+=";javascript "+a+"._displayCoverImage(false)");b._src=j.src};a._addDefaultInfo=function(b,a){for(var j in a)"undefined"==typeof b[j]&&(b[j]=a[j])};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(b){a._syncedReady[b]=1;for(var e=0,j=0;j<a._syncedApplets.length;j++){if(a._syncedApplets[j]==
b._id)a._syncedApplets[j]=b,a._syncedReady[j]=1;else if(!a._syncedReady[j])continue;e++}e==a._syncedApplets.length&&a._setSyncReady()};a._setDestroy=function(b){a.featureDetection.allowDestroy&&a.$on("beforeunload",function(){a._destroy(b)})};a._destroy=function(b){try{b._applet&&b._applet.destroy();b._applet=null;a._unsetMouse(b._canvas);b._canvas=null;for(var e=0,j=0;j<a._syncedApplets.length;j++)a._syncedApplets[j]==b&&(a._syncedApplets[j]=null),a._syncedApplets[j]&&e++;0<e||a._clearVars()}catch(f){}};
a._setSyncReady=function(){a._syncReady=!0;for(var b="",e=0;e<a._syncedApplets.length;e++)a._syncedCommands[e]&&(b+="Jmol.script(Jmol._syncedApplets["+e+"], Jmol._syncedCommands["+e+"]);");setTimeout(b,50)};a._mySyncCallback=function(b,e){if(!a._syncReady||!a._isJmolJSVSync)return 1;for(var j=0;j<a._syncedApplets.length;j++)0<=e.indexOf(a._syncedApplets[j]._syncKeyword)&&a._syncedApplets[j]._syncScript(e);return 0};a._getElement=function(b,a){return document.getElementById(b._id+"_"+a)||{}};a._evalJSON=
function(b,a){b+="";if(!b)return[];if("{"!=b.charAt(0))return 0<=b.indexOf(" | ")&&(b=b.replace(/\ \|\ /g,"\n")),b;var j=(new Function("return "+b))();return!j?null:a&&void 0!=j[a]?j[a]:j};a._sortMessages=function(b){function a(b,j){return b[0]<j[0]?1:b[0]>j[0]?-1:0}if(!b||"object"!=typeof b)return[];for(var j=[],e=b.length-1;0<=e;e--)for(var f=0,h=b[e].length;f<h;f++)j[j.length]=b[e][f];if(0!=j.length)return j=j.sort(a)};a._jsGetMouseModifiers=function(b){var a=0;switch(b.button){case 0:a=16;break;
case 1:a=8;break;case 2:a=4}b.shiftKey&&(a+=1);b.altKey&&(a+=8);b.ctrlKey&&(a+=2);return a};a._jsGetXY=function(b,e){if(!b.applet._ready)return!1;e.preventDefault();var j=a.$offset(b.id),f,h=e.originalEvent;a._mousePageX=e.pageX;a._mousePageY=e.pageY;h.targetTouches&&h.targetTouches[0]?(f=h.targetTouches[0].pageX-j.left,j=h.targetTouches[0].pageY-j.top):h.changedTouches?(f=h.changedTouches[0].pageX-j.left,j=h.changedTouches[0].pageY-j.top):(f=e.pageX-j.left,j=e.pageY-j.top);return void 0==f?null:
[Math.round(f),Math.round(j),a._jsGetMouseModifiers(e)]};a._gestureUpdate=function(b,e){e.stopPropagation();e.preventDefault();var j=e.originalEvent;switch(e.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=!1}if(!j.touches||2!=j.touches.length)return!1;switch(e.type){case "touchstart":b._touches=[[],[]];break;case "touchmove":var f=a.$offset(b.id);b._touches[0].push([j.touches[0].pageX-f.left,j.touches[0].pageY-f.top]);b._touches[1].push([j.touches[1].pageX-f.left,j.touches[1].pageY-
f.top]);2<=b._touches[0].length&&b.applet._processGesture(b._touches)}return!0};a._jsSetMouse=function(b){a.$bind(b,"mousedown touchstart",function(e){e.stopPropagation();e.preventDefault();b.isDragging=!0;if("touchstart"==e.type&&a._gestureUpdate(b,e))return!1;a._setConsoleDiv(b.applet._console);var j=a._jsGetXY(b,e);if(!j)return!1;2!=e.button&&b.applet._popups&&a.Menu.hidePopups(b.applet.popups);b.applet._processEvent(501,j);return!1});a.$bind(b,"mouseup touchend",function(e){e.stopPropagation();
e.preventDefault();b.isDragging=!1;if("touchend"==e.type&&a._gestureUpdate(b,e))return!1;e=a._jsGetXY(b,e);if(!e)return!1;b.applet._processEvent(502,e);return!1});a.$bind(b,"mousemove touchmove",function(e){e.stopPropagation();e.preventDefault();if(("touchmove"==e.type||a._touching)&&a._gestureUpdate(b,e))return!1;e=a._jsGetXY(b,e);if(!e)return!1;b.isDragging||(e[2]=0);b.applet._processEvent(b.isDragging?506:503,e);return!1});a.$bind(b,"DOMMouseScroll mousewheel",function(e){e.stopPropagation();e.preventDefault();
b.isDragging=!1;var j=e.originalEvent,j=j.detail?j.detail:j.wheelDelta;e=a._jsGetMouseModifiers(e);b.applet._processEvent(-1,[0>j?-1:1,0,e]);return!1});a.$bind(b,"contextmenu",function(){return!1});a.$bind(b,"mouseout",function(){b.applet._applet&&b.applet._applet.viewer.startHoverWatcher(!1)});a.$bind(b,"mouseenter",function(e){b.applet._applet&&b.applet._applet.viewer.startHoverWatcher(!0);if(0===e.buttons||0===e.which){b.isDragging=!1;e=a._jsGetXY(b,e);if(!e)return!1;b.applet._processEvent(502,
e)}});b.applet._is2D&&a.$resize(function(){b.applet&&b.applet._resize()});a.$bind("body","mouseup touchend",function(){b.applet&&(b.isDragging=!1)})};a._jsUnsetMouse=function(b){b.applet=null;a.$bind(b,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null)};a._setDraggable=function(b){b=b.prototype;b.setContainer=function(b){this.container=b;this.ignoreMouse=this.isDragging=!1;var a=this;b.bind("mousedown touchstart",function(b){if(a.ignoreMouse)return a.ignoreMouse=
!1,!0;a.isDragging=!0;a.pageX=b.pageX;a.pageY=b.pageY;return!1});b.bind("mousemove touchmove",function(b){if(a.isDragging)return a.mouseMove(b),!1});b.bind("mouseup touchend",function(b){a.mouseUp(b)})};b.mouseUp=function(b){if(this.isDragging)return this.pageX0+=b.pageX-this.pageX,this.pageY0+=b.pageY-this.pageY,this.isDragging=!1};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){this.isDragging&&this.container.css({top:this.pageY0+(b.pageY-this.pageY)+"px",left:this.pageX0+(b.pageX-this.pageX)+"px"})};b.dragBind=function(b){this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");if(b){var a=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",
function(b,e,f){a.mouseMove(f)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(b,e,f){a.mouseUp(f)})}}}})(Jmol,jQuery);
(function(a){a._getCanvas=function(d,c,h,g,k){var b=null;g&&a.featureDetection.supportsWebGL()&&(a._Canvas3D.prototype=a._jsSetPrototype(new a._Applet(d,c,"",!0)),GLmol.setRefresh(a._Canvas3D.prototype),b=new a._Canvas3D(d,c,null,h));k&&null==b&&(a._Canvas2D.prototype=a._jsSetPrototype(new a._Applet(d,c,"",!0)),b=new a._Canvas2D(d,c,null,h));return b};a._Canvas2D=function(d,c,h,g){this._syncId=(""+Math.random()).substring(3);this._id=d;this._is2D=!0;this._isJava=!1;this._aaScale=1;this._jmolType=
"Jmol._Canvas2D (JSmol)";this._platform="J.awtjs2d.Platform";if(g)return this;window[d]=this;this._createCanvas(d,c,h,null);if(!a._document||this._deferApplet)return this;this._init();return this};a._jsSetPrototype=function(d){d._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};d._cover=function(c){if(c||!this._deferApplet)this._displayCoverImage(c);else{var h=this._coverScript?this._coverScript:"";this._coverScript="";this._deferUncover&&(h+=";refresh;javascript "+
this._id+"._displayCoverImage(false)");this._script(h,!0);this._deferUncover&&"activate 3D model"==this._coverTitle&&(a._getElement(this,"coverimage").title="3D model is loading...");this._start();this._deferUncover||this._displayCoverImage(c);this._init&&this._init()}};d._displayCoverImage=function(c){this._coverImage&&this._isCovered!=c&&(this._isCovered=c,a._getElement(this,"coverdiv").style.display=c?"block":"none")};d._createCanvas=function(c,h,g,d){a._setObject(this,c,h);d&&(this._GLmol=d,this._GLmol.applet=
this,this._GLmol.id=this._id);d=a._getWrapper(this,!0);this._deferApplet||(a._document?(a._documentWrite(d),this._getCanvas(!1),d=""):(this._deferApplet=!0,d+='<script type="text/javascript">'+c+"._cover(false)\x3c/script>"));d+=a._getWrapper(this,!1);h.addSelectionOptions&&(d+=a._getGrabberOptions(this,g));a._debugAlert&&!a._document&&alert(d);this._code=a._documentWrite(d)};d._start=function(){this._deferApplet&&this._getCanvas(!1);this._defaultModel&&a._search(this,this._defaultModel);this._readyScript&&
this._script(this._readyScript);this._showInfo(!1)};d._getCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};d._createCanvas2d=function(c){var h=document.createElement("canvas"),g=a.$(this,"appletdiv");c&&(g[0].removeChild(this._canvas),a._jsUnsetMouse(this._canvas));c=Math.round(g.width());var d=Math.round(g.height());h.applet=this;this._canvas=h;h.style.width="100%";h.style.height="100%";h.width=c;h.height=d;h.id=this._id+"_canvas2d";g.append(h);a._jsSetMouse(h)};d._setupJS=
function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console};var c=a._execStack,h=0==c.length;c.push([this,a.__loadClazz,null,"loadClazz"]);this._is2D||(c.push([this,a.__loadClass,"J.exportjs.JSExporter","load JSExporter"]),c.push([this,this.__addExportHook,null,"addExportHook"]));a.debugCode&&c.push([this,a.__loadClass,"J.appletjs.Jmol","load Jmol"]);c.push([this,this.__createApplet,null,"createApplet"]);this._isSigned=!0;this._ready=!1;this._applet=null;this._canScript=
function(){return!0};this._savedOrientations=[];this._syncKeyword="Select:";a._execLog+="execStack loaded by "+this._id+" len="+a._execStack.length+"\n";h&&a.__nextExecution()};d.__addExportHook=function(c){GLmol.addExportHook(c);a.__nextExecution()};d.__createApplet=function(c){var h=new java.util.Hashtable;a._setJmolParams(h,c.__Info,!0);h.put("appletReadyCallback","Jmol._readyCallback");h.put("applet",!0);h.put("name",c._id+"_object");h.put("syncId",c._syncId);c._color&&h.put("bgcolor",c._color);
c._is2D||h.put("script","set multipleBondSpacing 0.35;");h.put("signedApplet","true");h.put("platform",c._platform);c._is2D&&h.put("display",c._id+"_canvas2d");h.put("documentBase",document.location.href);var g=document.location.href.split("?")[0].split("#")[0].split("/");g[g.length-1]=window["j2s.lib"].base;h.put("codeBase",g.join("/"));a._registerApplet(c._id,c);c._applet=new J.appletjs.Jmol(h);c._is2D||(c._GLmol.applet=c);c._jsSetScreenDimensions();c.aaScale&&1!=c.aaScale&&c._applet.viewer.actionManager.setMouseDragFactor(c.aaScale);
a.__nextExecution()};d._jsSetScreenDimensions=function(){if(this._applet){var c=a._getElement(this,this._is2D?"canvas2d":"canvas");this._applet.viewer.setScreenDimension(c.width,c.height)}};d._loadModel=function(a,h){this._script('load DATA "model"\n'+a+'\nEND "model" '+h);this._showInfo(!1)};d._show=function(c){a._getElement(this,"appletdiv").style.display=c?"block":"none";c&&a._repaint(this,!0)};d._canScript=function(){return!0};d._delay=function(a,h,g){this._delayID=setTimeout(function(){a.resumeEval(h,
!1)},g)};d._loadFile=function(c,h){this._showInfo(!1);h||(h="");this._thisJmolModel=""+Math.random();this._fileName=c;a._scriptLoad(this,c,h,!0)};d._createDomNode=function(a,h){a=this._id+"_"+a;var g=document.getElementById(a);g&&document.body.removeChild(g);if(h){0==h.indexOf("<?")&&(h=h.substring(h.indexOf("<",1)));if(0<=h.indexOf("/>")){for(var g=h.split("/>"),d=g.length-1;0<=--d;)for(var b=g[d],e=b.lastIndexOf("<")+1,f=e,m=b.length,q="";++f<m;)if(0<=" \t\n\r".indexOf(b.charAt(f))){q=b.substring(e,
f);g[d]=b+"></"+q+">";break}h=g.join("")}g=document.createElement("_xml");g.id=a;g.innerHTML=h;g.style.display="none";document.body.appendChild(g);return g}};d.equals=function(a){return this==a};d.clone=function(){return this};d.hashCode=function(){return parseInt(this._syncId)};d._processGesture=function(a){return this._applet.viewer.mouse.processTwoPointGesture(a)};d._processEvent=function(a,h){this._applet.viewer.handleOldJvm10Event(a,h[0],h[1],h[2],System.currentTimeMillis())};d._resize=function(){var c=
"__resizeTimeout_"+this._id;a[c]&&clearTimeout(a[c]);a[c]=setTimeout(function(){a._repaint(this,!0);a[c]=null},100)};return d};a._repaint=function(d,c){if(d._applet){var h=a.$(d,"appletdiv"),g=Math.round(h.width()),h=Math.round(h.height());if(d._is2D&&(d._canvas.width!=g||d._canvas.height!=h))d._getCanvas(!0),d._applet.viewer.setDisplay(d._canvas);d._applet.viewer.setScreenDimension(g,h);c?setTimeout(function(){d._applet.viewer.updateJS(0,0)}):d._applet.viewer.updateJS(0,0)}};a._getHiddenCanvas=function(a,
c,h,g,k){c=a._id+"_"+c;(a=document.getElementById(c))&&k&&(a=null);a||(a=document.createElement("canvas"));a.width=a.style.width=h;a.height=a.style.height=g;a.id!=c&&(a.id=c);return a};a.__loadClass=function(d,c){ClazzLoader.loadClass(c,function(){a.__nextExecution()})};a.__nextExecution=function(d){var c=a._execStack;0!=c.length&&(d?(d=c.shift(),a._execLog+="executing "+d[0]._id+" "+d[3]+"\n",d[1](d[0],d[2])):(a._execLog+="settimeout for "+c[0][0]._id+" "+c[0][3]+" len="+c.length+"\n",setTimeout("Jmol.__nextExecution(true)",
10)))};a.__loadClazz=function(d){a.__clazzLoaded?a.__nextExecution():(a.__clazzLoaded=!0,LoadClazz(),d._noMonitor&&(ClassLoaderProgressMonitor.showStatus=function(){}),LoadClazz=null,ClazzLoader.globalLoaded=function(){ClassLoaderProgressMonitor.showStatus("Application loaded.",!0);if(!a.debugCode||!a.haveCore)a.haveCore=!0,a.__nextExecution()},ClazzLoader.packageClasspath("java",null,!0),ClazzLoader.setPrimaryFolder(d._j2sPath),ClazzLoader.packageClasspath(d._j2sPath))};a._doAjax=function(d,c,h){d=
d.toString();if(null!=h)return h=J.io.Base64.getBase64(h).toString(),d=d.substring(d.lastIndexOf("/")+1),c=0<=d.indexOf(".png")?"image/png":0<=d.indexOf(".jpg")?"image/jpg":"",a._saveFile(d,c,h,"base64"),"OK";c&&(d+="?POST?"+c);h=a._getFileData(d);return a._processData(h,a._isBinaryUrl(d))};a._processData=function(d,c){"undefined"==typeof d&&(d="",c=!1);c&=a._canSyncBinary();if(!c)return J.util.SB.newS(d);var h;if(Clazz.instanceOf(d,self.ArrayBuffer)){d=new Uint8Array(d);h=Clazz.newByteArray(d.length,
0);for(var g=d.length;0<=--g;)h[g]=d[g];return h}h=Clazz.newByteArray(d.length,0);for(g=d.length;0<=--g;)h[g]=d.charCodeAt(g)&255;return h};a._loadImage=function(d,c,h,g,k){var b=c[1];if(null==k)return k=new Image,k.onload=function(){a._loadImage(d,c,null,g,k)},null!=h&&(h=J.io.Base64.getBase64(h).toString(),h=b.substring(url.lastIndexOf("/")+1),0<=h.indexOf(".png")||h.indexOf(".jpg")),k.src=b,!0;h=k.width;var e=k.height,f="echo_"+c[0],m=a._getHiddenCanvas(d.viewer.applet,f,h,e,!0);m.imageWidth=h;
m.imageHeight=e;m.id=f;m.image=k;a._setCanvasImage(m,h,e);g(m,b)};a._setCanvasImage=function(a,c,h){a.buf32=null;a.width=c;a.height=h;a.getContext("2d").drawImage(a.image,0,0,c,h)}})(Jmol);
(function(a,d){a._Applet=function(h,g,c,b){window[h]=this;this._jmolType="Jmol._Applet"+(g.isSigned?" (signed)":"");this._isJava=!0;if(b)return this;this._isSigned=g.isSigned;this._readyFunction=g.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=g.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._syncKeyword="Select:";this._initialize=function(b,f){var h=!1;if(this._jarFile){var g=this._jarFile;0<=g.indexOf("/")?
(alert("This web page URL is requesting that the applet used be "+g+". 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 "+g+"? ","yes or no")?(b=g.substring(0,g.lastIndexOf("/")),f=g.substring(g.lastIndexOf("/")+1)):h=!0):f=g}this._jarPath=b||".";this._jarFile="string"==typeof f?f:(f?"JmolAppletSigned":"JmolApplet")+"0.jar";h&&alert("The web page URL was ignored. Continuing using "+
this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(h,g,c);return this};a._Applet._getApplet=function(h,g,c){c||(c=!1);g||(g={});a._addDefaultInfo(g,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://chemapps.stolaf.edu/jmol/jsmol/jsmol.php",defaultModel:"",script:null,src:null,readyFunction:null,use:"HTML5",jarPath:"java",jarFile:"JmolApplet0.jar",isSigned:!1,j2sPath:"j2s",coverImage:null,coverTitle:"",coverCommand:"",
deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!1,debug:!1});a._debugAlert=g.debug;a.featureDetection.allowHTML5||(g.use="JAVA");var b=!1;g.serverURL&&(a._serverUrl=g.serverURL);var e=null;if(g.use){for(var f=g.use.toUpperCase().split("#")[0].split(" "),m=0;m<f.length;m++){switch(f[m]){case "JAVA":b=!0;a.featureDetection.supportsJava()&&(e=new a._Applet(h,g,null,c));break;case "WEBGL":e=a._getCanvas(h,g,c,!0,!1);break;case "HTML5":e=a._getCanvas(h,g,c,!1,!0);break;case "IMAGE":e=
new a._Image(h,g,null,c)}if(null!=e)break}null==e&&(c||!b?e={_jmolType:"none"}:b&&(e=new a._Applet(h,g,null,!1)))}else{if(!g.useNoApplet&&!g.useImageOnly&&(navigator.javaEnabled()||g.useJmolOnly))e=new a._Applet(h,g,null,c);null==e&&(!g.useJmolOnly&&!g.useImageOnly&&(e=a._getCanvas(h,g,c,g.useWebGlIfAvailable,!g.useWebGlIfAvailable)),null==e&&(e=new a._Image(h,g,null,c)))}return c?e:a._registerApplet(h,e)};a._Applet._noJavaMsg="You do not have Java applets enabled in your web browser, or your browser is blocking this applet.<br />      Check the warning message from your browser and/or enable Java applets in<br />      your web browser preferences, or install the Java Runtime Environment from <a href='http://www.java.com'>www.java.com</a>";
a._Applet._noJavaMsg2="You do not have the<br />      Java Runtime Environment<br />      installed for applet support.<br />      Visit <a href='http://www.java.com'>www.java.com</a>";a._Applet._setCommonMethods=function(h){h._showInfo=a._Applet.prototype._showInfo;h._search=a._Applet.prototype._search;h._readyCallback=a._Applet.prototype._readyCallback};a._Applet._createApplet=function(h,g,c,b,e,f){a._syncedApplets.length&&(c.synccallback="Jmol._mySyncCallback");c.java_arguments="-Xmx"+Math.round(g.memoryLimit||
h._memoryLimit)+"m";h._initialize(g.jarPath,g.jarFile);var m=0<=h._containerWidth.indexOf("px")?h._containerWidth:"100%",d=0<=h._containerHeight.indexOf("px")?h._containerHeight:"100%",m=' style="width:'+m+";height:"+d+'" ',j,l;if(a.featureDetection.useIEObject||a.featureDetection.useHtml4Object)c.archive=h._jarFile,e&&(c.script=e),c.mayscript="true",c.codebase=h._jarPath,c.code=b+".class",j="<object name='"+h._id+"_object' id='"+h._id+"_object' \n"+m+"\n",l="</object>";a.featureDetection.useIEObject?
j+=" classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'\n codebase='http://java.sun.com/update/1.6.0/jinstall-6u22-windows-i586.cab'\n>\n":a.featureDetection.useHtml4Object?j+=" type='application/x-java-applet'\n>\n":(e&&(c.script=e),j="<applet name='"+h._id+"_object' id='"+h._id+"_object' \n"+m+"\n code='"+b+"' archive='"+h._jarFile+"' codebase='"+h._jarPath+"'\n mayscript='true'>\n",l="</applet>");a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?(b="width:"+h._width,-1==b.indexOf("%")&&
(b+="px"),e="height:"+h._height,-1==e.indexOf("%")&&(e+="px"),b="<p style='background-color:yellow; color:black; "+b+";"+e+";text-align:center;vertical-align:middle;'>\n"+a._Applet._noJavaMsg+"</p>"):b="<table bgcolor='yellow'><tr><td align='center' valign='middle' "+m+"><font color='black'>\n"+a._Applet._noJavaMsg2+"</font></td></tr></table>";j=a._getWrapper(h,!0)+j;for(var p in c)c[p]&&(j+="  <param name='"+p+"' value='"+c[p]+"' />\n");j+=b+l+a._getWrapper(h,!1)+(g.addSelectionOptions?a._getGrabberOptions(h,
f):"");a._debugAlert&&alert(j);h._code=a._documentWrite(j)};var c=a._Applet.prototype;c._create=function(h,c){a._setObject(this,h,c);var d={syncId:(""+Math.random()).substring(3),progressbar:"true",progresscolor:"blue",boxbgcolor:this._color||"black",boxfgcolor:"white",boxmessage:"Downloading JmolApplet ...",script:!c.color?"":"background "+(0==c.color.indexOf("#")?"[0x"+c.color.substring(1)+"]":c.color)};a._setJmolParams(d,c,!1);var b;c.inlineModel?(b=c.inlineModel,b=b.replace(/\r|\n|\r\n/g,0<=b.indexOf("|")?
"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+b)):b="";d.loadInline=b;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);a._Applet._createApplet(this,c,d,"JmolApplet",null)};c._readyCallback=function(h,c,d,b){d&&(a._setDestroy(this),this._ready=!0,h=this._readyScript,this._applet=b,this._defaultModel?a._search(this,
this._defaultModel,h?";"+h:""):h?this._script(h):this._src&&this._script('load "'+this._src+'"'),this._showInfo(!0),this._showInfo(!1),this._readyFunction&&this._readyFunction(this),a._setReady(this))};c._showInfo=function(h){a._getElement(this,"infoheaderspan").innerHTML=this._infoHeader;this._info&&(a._getElement(this,"infodiv").innerHTML=this._info);if(!this._isInfoVisible!=!h){this._isInfoVisible=h;if(this._isJava){var c=h?"2px":"100%";a._getElement(this,"appletdiv").style.width=h?"2px":"100%";
a._getElement(this,"appletdiv").style.height=c}this._infoObject?this._infoObject._showInfo(h):(a._getElement(this,"infotablediv").style.display=h?"block":"none",a._getElement(this,"infoheaderdiv").style.display=h?"block":"none");this._show(!h)}};c._show=function(h){var c=!h?"2px":"100%";h=!h?"2px":"100%";var d=a._getElement(this,"object");d&&d.style&&(d.style.width=c,d.style.height=h)};c._search=function(h,c){a._search(this,h,c)};c._loadModel=function(a,c){!c&&this._noscript?this._applet.viewer.loadInline(a,
"\x00"):this._applet.script('load DATA "model"\n'+a+'\nEND "model" '+c)};c._clearConsole=function(){this._console==this._id+"_infodiv"&&(this.info="");self.Clazz&&(a._setConsoleDiv(this._console),Clazz.Console.clear())};c._addScript=function(a){this._readyScript||(this._readyScript=";");this._readyScript+=";"+a;return!0};c._script=function(h){if(!this._ready)return this._addScript(h);a._setConsoleDiv(this._console);this._applet.script(h)};c._syncScript=function(a){this._applet.syncScript(a)};c._scriptWait=
function(a){a=this._scriptWaitAsArray(a);for(var c="",d=a.length;0<=--d;)for(var b=0,e=a[d].length;b<e;b++)c+=a[d][b]+"\n";return c};c._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var c="",d=a.length;0<=--d;)for(var b=a[d].length;0<=--b;)"scriptEcho"==a[d][b][1]&&(c+=a[d][b][3]+"\n");return c.replace(/ \| /g,"\n")};c._scriptMessage=function(a){a=this._scriptWaitAsArray(a);for(var c="",d=a.length;0<=--d;)for(var b=a[d].length;0<=--b;)"scriptStatus"==a[d][b][1]&&(c+=a[d][b][3]+"\n");return c.replace(/ \| /g,
"\n")};c._scriptWaitOutput=function(a){var c="";try{a&&(c+=this._applet.scriptWaitOutput(a))}catch(d){}return c};c._scriptWaitAsArray=function(h){var c="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),h&&(c+=this._applet.scriptWait(h),c=a._evalJSON(c,"jmolStatus"),"object"==typeof c))return c}catch(d){}return[[c]]};c._getStatus=function(h){return a._sortMessages(this._getPropertyAsArray("jmolStatus",h))};c._getPropertyAsArray=function(h,c){return a._evalJSON(this._getPropertyAsJSON(h,
c),h)};c._getPropertyAsString=function(a,c){void 0==c&&(c="");return this._applet.getPropertyAsString(a,c)+""};c._getPropertyAsJSON=function(a,c){void 0==c&&(c="");try{return this._applet.getPropertyAsJSON(a,c)+""}catch(d){return""}};c._getPropertyAsJavaObject=function(a,c){void 0==c&&(c="");return this._applet.getProperty(a,c)};c._evaluate=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var c=a.replace(/\-*\d+/,"");if(""==c&&!isNaN(parseInt(a)))return parseInt(a);c=a.replace(/\-*\d*\.\d*/,
"");return""==c&&!isNaN(parseFloat(a))?parseFloat(a):a};c._saveOrientation=function(a){return this._savedOrientations[a]=this._getPropertyAsArray("orientationInfo","info").moveTo};c._restoreOrientation=function(a){a=this._savedOrientations[a];return!a||""==a?a.replace(/1\.0/,"0"):this._scriptWait(a)};c._restoreOrientationDelayed=function(a,c){1>arguments.length&&(c=1);var d=this._savedOrientations[a];return!d||""==d?d.replace(/1\.0/,c):this._scriptWait(d)};c._resizeApplet=function(c){function d(b,
e){var f=""+b;return 0==f.length?e?"":a._allowedJmolSize[2]:f.indexOf("%")==f.length-1?f: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)+(e?e:"")}var k;"object"==typeof c&&null!=c?(k=c[0]||c.width,c=c[1]||c.height):k=c;k=[d(k,"px"),d(c,"px")];c=a._getElement(this,"appletinfotablediv");c.style.width=k[0];c.style.height=k[1];this._containerWidth=k[0];this._containerHeight=
k[1];this._is2D&&a._repaint(this,!0)};c._loadFile=function(c,d){this._showInfo(!1);d||(d="");this._thisJmolModel=""+Math.random();this._fileName=c;if(!a._scriptLoad(this,c,d,this._isSigned)){var k=this;a._loadFileData(this,c,function(b){k._loadModel(b,d)})}};c._searchDatabase=function(c,d,k){this._showInfo(!1);if(0<=c.indexOf("?"))a._getInfoFromDatabase(this,d,c.split("?")[0]);else{k||(k=a._getScriptForDatabase(d));var b=d+c;if(a.db._DirectDatabaseCalls[d])this._loadFile(b,k);else if(k=";"+k,!a._scriptLoad(this,
b,k,this._isSigned)){var e=this;a._getRawDataFromServer(d,c,function(b){e._loadModel(b,k)})}}};c._isDeferred=function(){return this._cover&&this._isCovered&&this._deferApplet};c._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};a._Image=function(a,c,d,b){this._jmolType="image";if(b)return this;this._create(a,c,d);return this};a._Image.prototype._create=function(c,d,k){a._setObject(this,c,d);this._src||(this._src="");d=a._getWrapper(this,!0)+'<img id="'+
c+'_image" width="'+d.width+'" height="'+d.height+'" src=""/>'+a._getWrapper(this,!1)+(d.addSelectionOptions?a._getGrabberOptions(this,k):"");a._debugAlert&&alert(d);this._code=a._documentWrite(d);this._ready=!1;a._document&&this._readyCallback(c,null,this._ready=!0,null)};a._Applet._setCommonMethods(a._Image.prototype);a._Image.prototype._canScript=function(a){var c=a.toLowerCase().replace(/[\",\']/g,""),d=c.length;return 0<=a.indexOf("#alt:LOAD")||0>c.indexOf(";")&&0>c.indexOf("\n")&&(0==c.indexOf("script ")||
0==c.indexOf("load "))&&(c.indexOf(".png")==d-4||c.indexOf(".jpg")==d-4)};a._Image.prototype._script=function(c){var g=c.toLowerCase().replace(/[\",\']/g,""),k=g.length;if(0>g.indexOf(";")&&0>g.indexOf("\n")&&(0==g.indexOf("script ")||0==g.indexOf("load "))&&(g.indexOf(".png")==k-4||g.indexOf(".pngj")==k-5||g.indexOf(".jpg")==k-4)){c=c.substring(c.indexOf(" ")+1);k=c.length;for(g=0;g<k;g++)switch(c.charAt(g)){case " ":continue;case '"':c=c.substring(g+1,c.indexOf('"',g+1));g=k;continue;case "'":c=
c.substring(g+1,c.indexOf("'",g+1));g=k;continue;default:c=c.substring(g),g=k}c=c.replace(/\.min\.png/,".all.png");d.getElementById(this._id+"_image").src=c}else if(0<=c.indexOf("#alt:LOAD ")){c=c.split("#alt:LOAD ")[1];if(0<=c.indexOf("??")){k=c.split("??")[0];c=prompt(c.split("??")[1],"");if(!c)return;a.db._DirectDatabaseCalls[c.substring(0,1)]||(c=k+c)}this._loadFile(c)}};a._Image.prototype._show=function(c){a._getElement(this,"appletdiv").style.display=c?"block":"none"};a._Image.prototype._loadFile=
function(c,g){this._showInfo(!1);this._thisJmolModel=""+Math.random();g=g?g:"";if(a._isDatabaseCall(c))c.substring(0,1),c=a._getDirectDatabaseCall(c,!1);else if(0>c.indexOf("://")){var k=d.location.href,b=k.lastIndexOf("/");c=k.substring(0,b+1)+c}k=a._serverUrl+"?call=getImageForFileLoad&file="+escape(c)+"&width="+this._width+"&height="+this._height+"&params="+encodeURIComponent(g+";frank off;");a._getElement(this,"image").src=k};a._Image.prototype._searchDatabase=function(c,d,k){c.indexOf("?")==
c.length-1?a._getInfoFromDatabase(this,d,c.split("?")[0]):(this._showInfo(!1),k||(k=a._getScriptForDatabase(d)),c=a._serverUrl+"?call=getImageFromDatabase&database="+d+"&query="+c+"&width="+this._width+"&height="+this._height+"&script="+encodeURIComponent(k+";frank off;"),a._getElement(this,"image").src=c)}})(Jmol,document);
(function(a){var d=a.controls={_hasResetForms:!1,_scripts:[""],_checkboxMasters:{},_checkboxItems:{},_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:""};d._addScript=
function(a,h){if(!h)return 0;var g=d._scripts.length;d._scripts[g]=[a,h];return g};d._getIdForControl=function(a,d){return"string"==typeof a?a:!d||a._canScript(d)?a._id:null};d._radio=function(a,h,g,k,b,e,f,m){a=d._getIdForControl(a,h);if(null==a)return null;++d._radioCount;void 0!=e&&null!=e||(e="jmolRadioGroup"+(d._radioGroupCount-1));if(!h)return"";void 0!=g&&null!=g||(g=h.substring(0,32));b||(b="");var q=d._addScript(a,h);h="</span>";k='<span id="span_'+f+'"'+(m?' title="'+m+'"':"")+"><input name='"+
e+"' id='"+f+"' type='radio' onclick='Jmol.controls._click(this,"+q+","+a+");return true;' onmouseover='Jmol.controls._mouseOver("+q+");return true;' onmouseout='Jmol.controls._mouseOut()' "+(k?"checked='true' ":"")+d._radioCssText+" />";0<=g.toLowerCase().indexOf("<td>")&&(k+=h,h="");return k+('<label for="'+f+'">'+g+"</label>"+h+b)};d._scriptExecute=function(c,d){var g=a._applets[d[0]],k=d[1];if("object"==typeof k)k[0](c,k,g);else"function"==typeof k?k(g):a.script(g,k)};d._commandKeyPress=function(c,
d,g){if(13==(13==c?13:window.event?window.event.keyCode:c?c.which:0))c=document.getElementById(d),a.controls._scriptExecute(c,[g,c.value])};d._click=function(c,d){a.controls._element=c;a.controls._scriptExecute(c,a.controls._scripts[d])};d._menuSelected=function(c,d){var g=c.value;if(void 0!=g)a.controls._scriptExecute(c,a.controls._scripts[g]);else{g=c.length;if("number"==typeof g)for(var k=0;k<g;++k)if(c[k].selected){a.controls._click(c[k],c[k].value,d);return}alert("?Que? menu selected bug #8734")}};
d._cbNotifyMaster=function(c){var d=!0,g=!0,k;for(k in c.chkGroup)c.chkGroup[k].checked?g=!1:d=!1;d&&(c.chkMaster.checked=!0);g&&(c.chkMaster.checked=!1);(d||g)&&a.controls._checkboxItems[c.chkMaster.id]&&a.controls._cbNotifyMaster(a.controls._checkboxItems[c.chkMaster.id])};d._cbNotifyGroup=function(c,d){for(var g in c.chkGroup){var k=c.chkGroup[g];k.checked=d;a.controls._checkboxMasters[k.id]&&a.controls._cbNotifyGroup(a.controls._checkboxMasters[k.id],d)}};d._cbSetCheckboxGroup=function(c,d){var g=
c;"number"==typeof g&&(g="jmolCheckbox"+g);(c=document.getElementById(g))||alert("jmolSetCheckboxGroup: master checkbox not found: "+g);var k=a.controls._checkboxMasters[g]={};k.chkMaster=c;k.chkGroup={};for(var b=1;b<arguments.length;b++)g=arguments[b],"number"==typeof g&&(g="jmolCheckbox"+g),(checkboxItem=document.getElementById(g))||alert("jmolSetCheckboxGroup: group checkbox not found: "+g),k.chkGroup[g]=checkboxItem,a.controls._checkboxItems[g]=k};d._cbClick=function(c,d,g,k){var b=a.controls;
b._control=c;b._click(c,c.checked?d:g,k);b._checkboxMasters[c.id]&&b._notifyGroup(b._checkboxMasters[c.id],c.checked);b._checkboxItems[c.id]&&b._notifyMaster(b._checkboxItems[c.id])};d._cbOver=function(c,d,g){window.status=a.controls._scripts[c.checked?g:d]};d._mouseOver=function(a){window.status=d._scripts[a]};d._mouseOut=function(){window.status=" ";return!0};d._onloadResetForms=function(){var c=a.controls;c._hasResetForms||(c._hasResetForms=!0,c._previousOnloadHandler=window.onload,window.onload=
function(){var c=a.controls;if(0<c._buttonCount+c._checkboxCount+c._menuCount+c._radioCount+c._radioGroupCount)for(var d=document.forms,k=d.length;0<=--k;)d[k].reset();c._previousOnloadHandler&&c._previousOnloadHandler()})};d._getButton=function(c,d,g,k,b){var e=a.controls;c=e._getIdForControl(c,d);if(null==c)return"";e=a.controls;void 0!=k&&null!=k||(k="jmolButton"+e._buttonCount);void 0!=g&&null!=g||(g=d.substring(0,32));++e._buttonCount;d=e._addScript(c,d);g='<span id="span_'+k+'"'+(b?' title="'+
b+'"':"")+"><input type='button' name='"+k+"' id='"+k+"' value='"+g+"' onclick='Jmol.controls._click(this,"+d+")' onmouseover='Jmol.controls._mouseOver("+d+");return true' onmouseout='Jmol.controls._mouseOut()' "+e._buttonCssText+" /></span>";a._debugAlert&&alert(g);return a._documentWrite(g)};d._getCheckbox=function(c,d,g,k,b,e,f){var m=a.controls,q=m._getIdForControl(c,d);null!=q&&(q=m._getIdForControl(c,g));if(null==q)return"";void 0!=e&&null!=e||(e="jmolCheckbox"+m._checkboxCount);++m._checkboxCount;
if(void 0==d||null==d||void 0==g||null==g)alert("jmolCheckbox requires two scripts");else if(void 0==k||null==k)alert("jmolCheckbox requires a label");else return c=m._addScript(q,d),q=m._addScript(q,g),g="</span>",b='<span id="span_'+e+'"'+(f?' title="'+f+'"':"")+"><input type='checkbox' name='"+e+"' id='"+e+"' onclick='Jmol.controls._cbClick(this,"+c+","+q+")' onmouseover='Jmol.controls._cbOver(this,"+c+","+q+");return true' onmouseout='Jmol.controls._mouseOut()' "+(b?"checked='true' ":"")+m._checkboxCssText+
" />",0<=k.toLowerCase().indexOf("<td>")&&(b+=g,g=""),b+='<label for="'+e+'">'+k+"</label>"+g,a._debugAlert&&alert(b),a._documentWrite(b)};d._getCommandInput=function(c,d,g,k,b){var e=a.controls;c=e._getIdForControl(c,"x");if(null==c)return"";void 0!=k&&null!=k||(k="jmolCmd"+e._cmdCount);void 0!=d&&null!=d||(d="Execute");void 0!=g&&!isNaN(g)||(g=60);++e._cmdCount;d='<span id="span_'+k+'"'+(b?' title="'+b+'"':"")+"><input name='"+k+"' id='"+k+"' size='"+g+"' onkeypress='Jmol.controls._commandKeyPress(event,\""+
k+'","'+c+"\")' /><input  type='button' name='"+k+"Btn' id='"+k+"Btn' value = '"+d+"' onclick='Jmol.controls._commandKeyPress(13,\""+k+'","'+c+"\")' /></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};d._getLink=function(c,d,g,k,b){var e=a.controls;c=e._getIdForControl(c,d);if(null==c)return"";void 0!=k&&null!=k||(k="jmolLink"+e._linkCount);void 0!=g&&null!=g||(g=d.substring(0,32));++e._linkCount;d=e._addScript(c,d);g='<span id="span_'+k+'"'+(b?' title="'+b+'"':"")+"><a name='"+k+"' id='"+
k+"' href='javascript:Jmol.controls._click(this,"+d+");' onmouseover='Jmol.controls._mouseOver("+d+");return true;' onmouseout='Jmol.controls._mouseOut()' "+e._linkCssText+">"+g+"</a></span>";a._debugAlert&&alert(g);return a._documentWrite(g)};d._getMenu=function(c,d,g,k,b){var e=a.controls,f=e._getIdForControl(c,null);void 0!=k&&null!=k||(k="jmolMenu"+e._menuCount);++e._menuCount;var m=typeof d;if(null!=m&&"object"==m&&d.length){var q=d.length;"number"!=typeof g||1==g?g=null:0>g&&(g=q);g='<span id="span_'+
k+'"'+(b?' title="'+b+'"':"")+"><select name='"+k+"' id='"+k+"' onChange='Jmol.controls._menuSelected(this,\""+f+"\")'"+(g?" size='"+g+"' ":"")+e._menuCssText+">";for(k=0;k<q;++k){var f=d[k],m=typeof f,j=null,l=b=null;"object"==m&&null!=f?(j=f[0],b=f[1],l=f[2]):j=b=f;f=e._getIdForControl(c,j);if(null==f)return"";null==b&&(b=j);"#optgroup"==j?g+="<optgroup label='"+b+"'>":"#optgroupEnd"==j?g+="</optgroup>":(m=e._addScript(f,j),g+="<option value='"+m+(l?"' selected='true'>":"'>")+b+"</option>")}g+=
"</select></span>";a._debugAlert&&alert(g);return a._documentWrite(g)}};d._getRadio=function(c,d,g,k,b,e,f,m){var q=a.controls;0==q._radioGroupCount&&++q._radioGroupCount;c=q._radio(c,d,g,k,b,e,f?f:e+"_"+a._radioCount,m?m:0);if(null==c)return"";a._debugAlert&&alert(c);return a._documentWrite(c)};d._getRadioGroup=function(c,d,g,k,b,e){var f=typeof d;if("object"!=f||null==f||!d.length)alert("invalid arrayOfRadioButtons");else{var m=a.controls;void 0!=g&&null!=g||(g="&#xa0; ");var q=d.length;++m._radioGroupCount;
k||(k="jmolRadioGroup"+(m._radioGroupCount-1));for(var j="<span id='"+(b?b:k)+"'>",l=0;l<q;++l){l==q-1&&(g="");var p=d[l],f=typeof p,u=null,j="object"==f?j+(u=m._radio(c,p[0],p[1],p[2],g,k,3<p.length?p[3]:(b?b:k)+"_"+l,4<p.length?p[4]:0,e)):j+(u=m._radio(c,p,null,null,g,k,(b?b:k)+"_"+l,e));if(null==u)return""}j+="</span>";a._debugAlert&&alert(j);return a._documentWrite(j)}}})(Jmol);
(function(a){a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(d,c,h){return a._Applet._getApplet(d,c,h)};a.getJMEApplet=function(d,c,h,g){return a._JMEApplet._getApplet(d,c,h,g)};a.getJSVApplet=function(d,c,h){return a._JSVApplet._getApplet(d,c,h)};a.loadFile=function(a,c,h){a._loadFile(c,h)};a.script=function(a,c){a._checkDeferred(c)||a._script(c)};a.scriptWait=function(a,c){return a._scriptWait(c)};a.scriptEcho=function(a,c){return a._scriptEcho(c)};a.scriptMessage=function(a,
c){return a._scriptMessage(c)};a.scriptWaitOutput=function(a,c){return a._scriptWait(c)};a.scriptWaitAsArray=function(a,c){return a._scriptWaitAsArray(c)};a.search=function(a,c,h){a._search(c,h)};a.evaluate=function(a,c){return a._evaluate(c)};a.getAppletHtml=function(a){return a._code};a.getPropertyAsArray=function(a,c,h){return a._getPropertyAsArray(c,h)};a.getPropertyAsJavaObject=function(a,c,h){return a._getPropertyAsJavaObject(c,h)};a.getPropertyAsJSON=function(a,c,h){return a._getPropertyAsJSON(c,
h)};a.getPropertyAsString=function(a,c,h){return a._getPropertyAsString(c,h)};a.getStatus=function(a,c){return a._getStatus(c)};a.resizeApplet=function(a,c){return a._resizeApplet(c)};a.restoreOrientation=function(a,c){return a._restoreOrientation(c)};a.restoreOrientationDelayed=function(a,c,h){return a._restoreOrientationDelayed(c,h)};a.saveOrientation=function(a,c){return a._saveOrientation(c)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};
a.setInfo=function(a,c,h){a._info=c;2<arguments.length&&a._showInfo(h)};a.showInfo=function(a,c){a._showInfo(c)};a.jmolBr=function(){return a._documentWrite("<br />")};a.jmolButton=function(d,c,h,g,k){return a.controls._getButton(d,c,h,g,k)};a.jmolCheckbox=function(d,c,h,g,k,b,e){return a.controls._getCheckbox(d,c,h,g,k,b,e)};a.jmolCommandInput=function(d,c,h,g,k){return a.controls._getCommandInput(d,c,h,g,k)};a.jmolHtml=function(d){return a._documentWrite(d)};a.jmolLink=function(d,c,h,g,k){return a.controls._getLink(d,
c,h,g,k)};a.jmolMenu=function(d,c,h,g,k){return a.controls._getMenu(d,c,h,g,k)};a.jmolRadio=function(d,c,h,g,k,b,e,f){return a.controls._getRadio(d,c,h,g,k,b,e,f)};a.jmolRadioGroup=function(d,c,h,g,k,b){return a.controls._getRadioGroup(d,c,h,g,k,b)};a.setCheckboxGroup=function(d,c){a.controls._cbSetCheckboxGroup(d,c)};a.setDocument=function(d){a._document=d};a.setXHTML=function(d){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;d&&(a._XhtmlElement=document.getElementById(d),a._XhtmlAppendChild=
!0)};a.setAppletCss=function(d,c){null!=d&&(a.controls._appletCssClass=d);a.controls._appletCssText=c?c+" ":d?'class="'+d+'" ':""};a.setButtonCss=function(d,c){null!=d&&(a.controls._buttonCssClass=d);a.controls._buttonCssText=c?c+" ":d?'class="'+d+'" ':""};a.setCheckboxCss=function(d,c){null!=d&&(a.controls._checkboxCssClass=d);a.controls._checkboxCssText=c?c+" ":d?'class="'+d+'" ':""};a.setRadioCss=function(d,c){null!=d&&(a.controls._radioCssClass=d);a.controls._radioCssText=c?c+" ":d?'class="'+
d+'" ':""};a.setLinkCss=function(d,c){null!=d&&(a.controls._linkCssClass=d);a.controls._linkCssText=c?c+" ":d?'class="'+d+'" ':""};a.setMenuCss=function(d,c){null!=d&&(a.controls._menuCssClass=d);a.controls._menuCssText=c?c+" ":d?'class="'+d+'" ':""};a.setAppletSync=function(d,c,h){a._syncedApplets=d;a._syncedCommands=c;a._syncedReady={};a._isJmolJSVSync=h};a.setGrabberOptions=function(d){a._grabberOptions=d};a.setAppletHtml=function(d,c){d._code&&(a.$html(c,d._code),d._init&&!d._deferApplet&&d._init())};
a.coverApplet=function(a,c){a._cover&&a._cover(c)}})(Jmol);
LoadClazz=function(){window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!1);window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!0,bhtest=!1,xxxbhparams={},xxxShowParams=function(){var a="",d;for(d in xxxbhparams)a+="#P "+xxxbhparams[d]+"\t"+d+"\n";xxxbhparams={};alert(a)},window["j2s.object.native"]=!0,Class=Clazz=function(){},function(a){NullObject=function(){};JavaObject=Object;a.supportsNativeObject=window["j2s.object.native"];JavaObject=a.supportsNativeObject?function(){}:Object;ClazzLoaderProgressMonitor=
ClassLoaderProgressMonitor={};a.Console={};a.dateToString=Date.prototype.toString;System=new JavaObject;a.debuggingBH=!1;a.getSignature=function(b,a,f,c){return c?b[a]=f:b[a]};a.addProto=function(b,e,f){a.getSignature(b,e,f,!0)};var d=JavaObject.prototype;a.addProto(d,"equals",function(b){return this==b});a.addProto(d,"hashCode",function(){try{return this.toString().hashCode()}catch(b){var a=":",f;for(f in this)a+=f+":";return a.hashCode()}});a.addProto(d,"getClass",function(){return a.getClass(this)});
a.addProto(d,"clone",function(){return a.clone(this)});a.clone=function(b){var a=new b.constructor,f;for(f in b)a[f]=b[f];return a};a.addProto(d,"finalize",function(){});a.addProto(d,"notify",function(){});a.addProto(d,"notifyAll",function(){});a.addProto(d,"wait",function(){});a.addProto(d,"to$tring",Object.prototype.toString);a.addProto(d,"toString",function(){return null!=this.__CLASS_NAME__?"["+this.__CLASS_NAME__+" object]":this.to$tring.apply(this,arguments)});if(a.supportsNativeObject){a.extendedObjectMethods=
"equals hashCode getClass clone finalize notify notifyAll wait to$tring toString".split(" ");for(d=0;d<a.extendedObjectMethods.length;d++){var c=a.extendedObjectMethods[d];Array.prototype[c]=JavaObject.prototype[c]}JavaObject.__CLASS_NAME__="Object";JavaObject.getClass=function(){return JavaObject}}a.extendJO=function(b,e){e&&(b.__CLASS_NAME__=b.prototype.__CLASS_NAME__=e);if(a.supportsNativeObject)for(var f=0;f<a.extendedObjectMethods.length;f++){var c=a.extendedObjectMethods[f];a.getSignature(b.prototype,
c,JavaObject.prototype[c],!0)}};a.extractClassName=function(b){b=b.substring(1,b.length-1);return 0<=b.indexOf("Array")?"Array":0<=b.indexOf("object ")?b.substring(7):b};a.getClassName=function(b,e){if(null==b)return"NullObject";if(b instanceof a.CastedNull)return b.clazzName;switch(typeof b){case "number":return"Number";case "boolean":return"Boolean";case "string":return"String";case "function":if(null!=b.__CLASS_NAME__)return e?b.__CLASS_NAME__:"Class";var f=b.toString(),c=f.indexOf("function");
if(0>c)return"["==f.charAt(0)?a.extractClassName(f):f.replace(/[^a-zA-Z0-9]/g,"");var c=c+8,d=f.indexOf("(",c);if(0>d)return"Object";f=f.substring(c,d);if(0<=f.indexOf("Array"))return"Array";f=f.replace(/^\s+/,"").replace(/\s+$/,"");return"anonymous"==f||""==f?"Function":f;case "object":if(null!=b.__CLASS_NAME__)return b.__CLASS_NAME__;if(null==b.constructor)return"Object";if(null==b.constructor.__CLASS_NAME__){if(b instanceof Number)return"Number";if(b instanceof Boolean)return"Boolean";if(b instanceof
Array)return"Array";f=b.toString();if("["==f.charAt(0))return a.extractClassName(f)}}return a.getClassName(b.constructor,!0)};a.getClass=function(b){if(null==b)return JavaObject;if("function"==typeof b)return b;var e=null;if(b instanceof a.CastedNull)e=b.clazzName;else{if("string"==typeof b)return String;if("object"==typeof b)if(null!=b.__CLASS_NAME__)e=b.__CLASS_NAME__;else return null==b.constructor?JavaObject:b.constructor}return null!=e?a.evalType(e,!0):b.constructor};a.extendsProperties=function(b,
e){for(var f in e)"b$"!=f&&("prototype"!=f&&"superClazz"!=f&&"__CLASS_NAME__"!=f&&"implementz"!=f&&!a.checkInnerFunction(e,f))&&(b[f]=e[f])};a.checkInnerFunction=function(b,e){for(var f=0;f<a.innerFunctionNames.length;f++)if(e==a.innerFunctionNames[f]&&a.innerFunctions[e]===b[e])return!0;return!1};a.implementsProperties=function(b,e){for(var f in e)"b$"!=f&&("prototype"!=f&&"superClazz"!=f&&"__CLASS_NAME__"!=f&&"implementz"!=f)&&!("function"==typeof e[f]&&a.checkInnerFunction(e,f))&&(b[f]=e[f],b.prototype[f]=
e[f])};a.args4InheritClass=function(){};a.inheritArgs=new a.args4InheritClass;a.inheritClass=function(b,e,f){a.extendsProperties(b,e);a.isClassUnloaded(b)||(b.prototype=null!=f?f:e!==Number?new e(a.inheritArgs):new Number);b.superClazz=e;b.prototype.__CLASS_NAME__=b.__CLASS_NAME__};a.implementOf=function(b,e){if(2<=arguments.length){null==b.implementz&&(b.implementz=[]);var f=b.implementz;if(2==arguments.length)if("function"==typeof e)f[f.length]=e,a.implementsProperties(b,e);else{if(e instanceof
Array)for(var c=0;c<e.length;c++)f[f.length]=e[c],a.implementsProperties(b,e[c])}else for(c=1;c<arguments.length;c++)f[f.length]=arguments[c],a.implementsProperties(b,arguments[c])}};a.extendInterface=a.implementOf;a.equalsOrExtendsLevel=function(b,e){if(b===e)return 0;if(null!=b.implementz)for(var f=b.implementz,c=0;c<f.length;c++){var d=a.equalsOrExtendsLevel(f[c],e);if(0<=d)return d+1}return-1};a.getInheritedLevel=function(b,e){if(b===e)return 0;var f="string"==typeof b,c="string"==typeof e;if(f&&
("void"==b||"unknown"==b)||c&&("void"==e||"unknown"==e))return-1;if((f&&"NullObject"==b||NullObject===b)&&e!==Number&&e!==Boolean&&e!==NullObject)return 0;f&&(b=a.evalType(b));c&&(e=a.evalType(e));if(null==e||null==b)return-1;f=0;for(c=b;c!==e&&10>f;){if(null!=c.implementz)for(var d=c.implementz,j=0;j<d.length;j++){var l=a.equalsOrExtendsLevel(d[j],e);if(0<=l)return f+l+1}c=c.superClazz;if(null==c)return e===Object||e===JavaObject?f+1.5:-1;f++}return f};a.instanceOf=function(b,e){if(null==b)return!1==
e;if(null==e)return!1;if(b instanceof e)return!0;var f=a.getClassName(b);return 0<=a.getInheritedLevel(f,e)};a.superCall=function(b,e,f,c){var d=null,j=-1,l=b[f];if(null!=l)if(null!=l.claxxOwner)l.claxxOwner!==e&&(d=l);else if(null==l.stacks&&!(null!=l.lastClaxxRef&&null!=l.lastClaxxRef.prototype[f]&&null!=l.lastClaxxRef.prototype[f].stacks))d=l;else{var p=l.stacks;null==p&&(p=l.lastClaxxRef.prototype[f].stacks);for(j=p.length-1;0<=j;j--)if(e===p[j]){0<j?(j--,d=p[j].prototype[f]):d=p[0].prototype[f]["\\unknown"];
break}else if(0<a.getInheritedLevel(e,p[j])){d=p[j].prototype[f];break}}if(null!=d)return 0==j&&"construct"==f&&(j=l.stacks,null!=j&&(null==j[0].superClazz&&null!=j[0].con$truct)&&j[0].con$truct.apply(b,[])),a.tracingCalling?(j=arguments.callee.caller,j===a.superConstructor&&(j=j.arguments.callee.caller),a.pu$hCalling(new a.callingStack(j,e)),d=d.apply(b,null==c?[]:c),a.p0pCalling(),d):d.apply(b,null==c?[]:c);if("construct"!=f)throw a.alert(["j2slib","no class found",c.typeString]),new a.MethodNotFoundException(b,
e,f,a.getParamsType(c).typeString);};a.superConstructor=function(b,e,f){a.superCall(b,e,"construct",f);null!=e.con$truct&&e.con$truct.apply(b,[])};a.CastedNull=function(b){this.clazzName=null!=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.MethodException=function(){};a.MethodNotFoundException=function(){this.toString=function(){return"MethodNotFoundException"}};
a.getParamsType=function(b){var e=b.length;switch(e){case 0:var f=["void"];f.typeString="\\void";return f;case 1:if(f=b[0],null!=f&&"number"==typeof f)return f=["Number"],f.typeString="\\Number",f}f=[];f.hasCastedNull=!1;if(null!=b)for(var c=0;c<e;c++)f[c]=a.getClassName(b[c]),b[c]instanceof a.CastedNull&&(f.hasCastedNull=!0);f.typeString="\\"+f.join("\\");return f};a.searchAndExecuteMethod=function(b,e,f,c){var d=b[f],j=a.getParamsType(c);if(bhtest&&self.JSON){var l=e.__CLASS_NAME__+" "+f+" "+JSON.stringify(j);
xxxbhparams[l]||(xxxbhparams[l]=0);xxxbhparams[l]++}if(d.lastParams==j.typeString&&d.lastClaxxRef===e){e=null;if(j.hasCastedNull){e=[];for(j=0;j<c.length;j++)e[j]=c[j]instanceof a.CastedNull?null:c[j]}else e=c;if(null!=d.lastMethod)return d.lastMethod.apply(b,e)}else{d.lastParams=j.typeString;d.lastClaxxRef=e;l=d.stacks;null==l&&(l=e.prototype[f].stacks);for(var p=!1,g=l.length-1;-1<g;g--)if(p||l[g]===e){p=a.tryToSearchAndExecute(f,b,l[g].prototype[f],j,c,d);if(!(p instanceof a.MethodException))return p;
p=!0}if("construct"!=f)throw new a.MethodNotFoundException(b,e,f,j.typeString);}};a.tracingCalling=!1;a.tryToSearchAndExecute=function(b,e,f,c,d,j){var l=[],p=!0,g;for(g in f)if(92==g.charCodeAt(0)){var h=g.substring(1).split("\\");h.length==c.length&&(l[l.length]=h);p=!1}else if(p&&"funParams"==g&&null!=f.funParams){g=f.funParams;h=g.substring(1).split("\\");h.length==c.length&&(l[0]=h);break}if(0==l.length)return new a.MethodException;g=a.searchMethod(l,c);if(null!=g){l=null;l=p?f:f["\\"+g];p=null;
if(c.hasCastedNull){p=[];for(g=0;g<d.length;g++)p[g]=d[g]instanceof a.CastedNull?null:d[g]}else p=d;if(a.tracingCalling){h=arguments.callee.caller;h=h=h.arguments.callee.caller;if(g="construct"==l.exName&&0<=a.getInheritedLevel(l.exClazz,Throwable)&&!a.initializingException){a.initializingException=!0;var k=h.arguments.callee.caller.arguments.callee.caller,t=k.arguments.callee,s=t.claxxReference;null==s&&(s=t.exClazz);null==s&&(s=t.claxxOwner);a.pu$hCalling(new a.callingStack(k,s))}if(k=h!==a.instantialize&&
h!==a.superCall)t=h.arguments.callee,s=t.claxxReference,null==s&&(s=t.exClazz),null==s&&(s=t.claxxOwner),a.pu$hCalling(new a.callingStack(h,s));j.lastMethod=l;l=l.apply(e,p);k&&a.p0pCalling();g&&a.p0pCalling();return l}j.lastMethod=l;return l.apply(e,p)}return new a.MethodException};a.initializingException=!1;a.searchMethod=function(b,e){for(var f=[],c=0;c<b.length;c++){for(var d=[],j=!0,l=0;l<b[c].length;l++)if(d[l]=a.getInheritedLevel(e[l],b[c][l]),0>d[l]){j=!1;break}j&&(d[e.length]=c,f[f.length]=
d)}if(0==f.length)return null;d=f[0];for(c=1;c<f.length;c++){j=!0;for(l=0;l<e.length;l++)if(d[l]<f[c][l]){j=!1;break}j&&(d=f[c])}return b[d[e.length]].join("\\")};a.generateDelegatingMethod=function(b,a){var f=function(){var b=arguments;return SAEM(this,b.callee.claxxReference,b.callee.methodName,b)};f.methodName=a;f.claxxReference=b;return f};SAEM=a.searchAndExecuteMethod;a.expExpandParameters=function(b,a){return"N"==a?"Number":"B"==a?"Boolean":"S"==a?"String":"O"==a?"Object":"A"==a?"Array":"Unknown"};
a.formatParameters=function(b){return null==b||0==b.length?"\\void":b.replace(/~([NABSO])/g,a.expExpandParameters).replace(/\s+/g,"").replace(/^|,/g,"\\").replace(/\$/g,"org.eclipse.s")};a.overrideMethod=function(b,e,f,c){a.assureInnerClass&&a.assureInnerClass(b,f);f.exName=e;c=a.formatParameters(c);f.funParams=c;f.claxxOwner=b;return a.getSignature(b.prototype,e,f,!0)};a.defineMethod=function(b,e,f,c){a.assureInnerClass&&a.assureInnerClass(b,f);f.exName=e;c=a.formatParameters(c);var d=b.prototype,
j=a.getSignature(d,e,f,!1);if(null==j||j.claxxOwner===b&&j.funParams==c)return f.funParams=c,f.claxxOwner=b,f.exClazz=b,delete $fz,a.getSignature(d,e,f,!0);var l=null,p=[];null==j.stacks?(l=j,null!=j.claxxOwner&&(p[0]=l.claxxOwner)):p=j.stacks;if(null==j.stacks||j.claxxReference!==b){j=a.getSignature(d,e,a.generateDelegatingMethod(b,e,j),!0);d=[];for(e=0;e<p.length;e++)d[e]=p[e];j.stacks=d}p=j.stacks;if(0==p.length)p[0]=b;else{d=!1;for(e=p.length-1;0<=e;e--)if(p[e]===b){d=!0;break}d||(p[p.length]=
b)}null!=l&&(l.claxxOwner===b?(j[l.funParams]=l,l.claxxOwner=null,l.funParams=null):null==l.claxxOwner&&(j["\\unknown"]=l));f.exClazz=b;j[c]=f;delete $fz;return j};a.makeConstructor=function(b,e,f){a.defineMethod(b,"construct",e,f);null!=b.con$truct&&(b.con$truct.index=b.con$truct.stacks.length)};a.overrideConstructor=function(b,e,f){a.overrideMethod(b,"construct",e,f);null!=b.con$truct&&(b.con$truct.index=b.con$truct.stacks.length)};a.allPackage={};a.allClasses={};a.lastPackageName=null;a.lastPackage=
null;a.unloadedClasses=[];a.isClassUnloaded=function(b){b=a.getClassName(b,!0);return null!=a.unloadedClasses[b]};a.declarePackage=function(b){if(a.lastPackageName==b)return a.lastPackage;if(null!=b&&0!=b.length){for(var e=b.split(/\./),f=a.allPackage,c=0;c<e.length;c++)null==f[e[c]]&&(f[e[c]]={__PKG_NAME__:null!=f.__PKG_NAME__?f.__PKG_NAME__+"."+e[c]:e[c]},0==c&&(window[e[c]]=f[e[c]])),f=f[e[c]];a.lastPackageName=b;return a.lastPackage=f}};a.evalType=function(b,e){var f=b.lastIndexOf(".");if(-1!=
f){var c=b.substring(0,f),c=a.declarePackage(c),f=b.substring(f+1);return c[f]}return e?window[b]:"number"==b?Number:"object"==b?JavaObject:"string"==b?String:"boolean"==b?Boolean:"function"==b?Function:"void"==b||"undefined"==b||"unknown"==b?b:"NullObject"==b?NullObject:window[b]};a.defineType=function(b,e,f,c){var d=a.unloadedClasses[b];null!=d&&(e=d);d=b.lastIndexOf(".");if(-1!=d){var j=b.substring(0,d),j=a.declarePackage(j),d=b.substring(d+1);if(null!=j[d])return j[d];j[d]=e}else{if(null!=window[b])return window[b];
window[b]=e}a.decorateAsType(e,b,f,c);b=a.innerFunctions;e.defineMethod=b.defineMethod;e.defineStaticMethod=b.defineStaticMethod;e.makeConstructor=b.makeConstructor;return e};a.isSafari=-1!=navigator.userAgent.indexOf("Safari");a.isSafari4Plus=!1;a.isSafari&&(d=navigator.userAgent,c=d.indexOf("Version/"),-1!=c&&(d=d.substring(c+8),d=parseFloat(d),a.isSafari4Plus=4<=d));a.instantialize=function(b,e){if(!(null!=e&&1==e.length&&null!=e[0]&&e[0]instanceof a.args4InheritClass)){b instanceof Number&&(b.valueOf=
function(){return this});if(a.isSafari4Plus){for(var f=[],c=0;c<e.length;c++)f[c]=e[c];e=f}f=b.construct;null!=f?null==b.con$truct?f.apply(b,e):null==b.getClass().superClazz?(b.con$truct.apply(b,[]),f.apply(b,e)):null!=f.claxxOwner&&f.claxxOwner===b.getClass()||null!=f.stacks&&f.stacks[f.stacks.length-1]==b.getClass()?f.apply(b,e):(null!=f.claxxOwner&&null==f.claxxOwner.superClazz&&null!=f.claxxOwner.con$truct?f.claxxOwner.con$truct.apply(b,[]):null!=f.stacks&&(1==f.stacks.length&&null==f.stacks[0].superClazz)&&
f.stacks[0].con$truct.apply(b,[]),f.apply(b,e),b.con$truct.apply(b,[])):null!=b.con$truct&&b.con$truct.apply(b,[])}};a.innerFunctionNames="equals hashCode getName getClassLoader getResourceAsStream defineMethod defineStaticMethod makeConstructor".split(" ");a.innerFunctions={equals:function(b){return this===b},hashCode:function(){return this.getName().hashCode()},toString:function(){return"class "+this.getName()},getName:function(){return a.getClassName(this,!0)},getClassLoader:function(){var b=this.__CLASS_NAME__,
e=ClazzLoader.getClasspathFor(b),f=e.lastIndexOf(b.replace(/\./g,"/")),e=-1!=f?e.substring(0,f):ClazzLoader.getClasspathFor(b,!0),b=ClassLoader.requireLoaderByBase(e);b.getResourceAsStream=a.innerFunctions.getResourceAsStream;return b},getResourceAsStream:function(b){var e=null;if(null==b)return e;null!=java.io.InputStream?e=new java.io.InputStream:(e=new JavaObject,e.__CLASS_NAME__="java.io.InputStream",e.close=NullObject);e.read=function(){return 0};b=b.replace(/\\/g,"/");var f=null,c=this.__CLASS_NAME__;
2==arguments.length&&0!=b.indexOf("/")&&(b="/"+b);if(0==b.indexOf("/"))if(2==arguments.length?(f=arguments[1],null==f&&(f=ClazzLoader.binaryFolders[0])):null!=window.ClazzLoader&&(f=ClazzLoader.getClasspathFor(c,!0)),null==f||0==f.length)e.url=b.substring(1);else{var f=f.replace(/\\/g,"/"),d=f.length,d=f.charAt(d-1);"/"!=d&&(f+="/");e.url=f+b.substring(1)}else{if(null!=this.base)f=this.base;else if(null!=window.ClazzLoader)if(f=ClazzLoader.getClasspathFor(c),d=f.lastIndexOf(c.replace(/\./g,"/")),
-1!=d)f=f.substring(0,d);else if(d=-1,f.indexOf(".z.js")==f.length-5&&-1!=(d=f.lastIndexOf("/")))for(var f=f.substring(0,d+1),d=c.split(/\./),j=1;j<d.length;j++){for(var l="/",p=0;p<j;p++)l+=d[p]+"/";if(l.length>f.length)break;if(f.indexOf(l)==f.length-l.length){f=f.substring(0,f.length-l.length+1);break}}else f=ClazzLoader.getClasspathFor(c,!0);else d=a.binaryFolders,null!=d&&0!=d.length&&(f=d[0]);if(null==f||0==f.length)f="j2s/";f=f.replace(/\\/g,"/");d=f.length;d=f.charAt(d-1);"/"!=d&&(f+="/");
null!=this.base?e.url=f+b:(d=c.lastIndexOf("."),e.url=-1==d||null!=this.base?f+b:f+c.substring(0,d).replace(/\./g,"/")+"/"+b)}return e},defineMethod:function(b,e,f){a.defineMethod(this,b,e,f)},defineStaticMethod:function(b,e,f){a.defineMethod(this,b,e,f);this[b]=this.prototype[b]},makeConstructor:function(b,e){a.makeConstructor(this,b,e)}};a.decorateFunction=function(b,e,f){null!=window.ClazzLoader&&ClazzLoader.checkInteractive();var c=null;null==e?(c=f,window[f]=b):null!=e.__PKG_NAME__?(c=e.__PKG_NAME__+
"."+f,e[f]=b,e===java.lang&&(window[f]=b)):(c=e.__CLASS_NAME__+"."+f,e[f]=b);a.extendJO(b,c);e=a.innerFunctionNames;for(f=0;f<e.length;f++)b[e[f]]=a.innerFunctions[e[f]];null!=window.ClazzLoader&&(b=ClazzLoader.findClass(c),null!=b&&b.status==ClazzNode.STATUS_KNOWN&&window.setTimeout(function(b){return function(){ClazzLoader.updateNode(b)}}(b),1))};a.currentPath="";a.declareInterface=function(b,e,f){var c=function(){};a.decorateFunction(c,b,e,"Clazz.declareInterface");null!=f&&a.implementOf(c,f);
return c};a.decorateAsClass=function(b,e,f,c,d,j,l){var p=null;null!=e&&(p=e.__PKG_NAME__,null==p&&(p=e.__CLASS_NAME__));p=a.unloadedClasses[(null==p?"":p+".")+f];null!=p&&(b=p);a.decorateFunction(b,e,f,l+"...Clazz.decorateAsClass");null!=j?a.inheritClass(b,c,j):null!=c&&a.inheritClass(b,c);null!=d&&a.implementOf(b,d);return b};a.declareType=function(b,e,f,c,d){return a.decorateAsClass(function(){a.instantialize(this,arguments)},b,e,f,c,d,"Clazz.declareType")};a.declareAnonymous=function(b,e,f,c,
d){return a.decorateAsClass(function(){a.prepareCallback(this,arguments);a.instantialize(this,arguments)},b,e,f,c,d,"Clazz.declareAnonymous")};a.decorateAsType=function(b,e,f,c,d,j){a.extendJO(b,e);b.equals=a.innerFunctions.equals;b.getName=a.innerFunctions.getName;if(j)for(e=0;e<a.innerFunctionNames.length;e++)j=a.innerFunctionNames[e],b[j]=a.innerFunctions[j];null!=d?a.inheritClass(b,f,d):null!=f&&a.inheritClass(b,f);null!=c&&a.implementOf(b,c);return b};a._ex_reg=function(b,a,f){f||(f="[^\\s]+");
var c=b.indexOf(a);b=b.substring(0,c)+f+b.substring(c+a.length);return RegExp("^"+b+"$")};try{null.hello()}catch(h){/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)?(d=h.message.indexOf(":"),c=h.message.indexOf(":",d+2),a._NPEMsgFragment=h.message.substr(d+1,c-d-20),a._isNPEExceptionPredicate=function(b){return-1!=b.message.indexOf(a._NPEMsgFragment)}):-1!=navigator.userAgent.toLowerCase().indexOf("webkit")?(a._exceptionNPERegExp=a._ex_reg(h.message,"hello"),a._isNPEExceptionPredicate=function(b){return a._exceptionNPERegExp.test(b.message)}):
(a._exceptionNPERegExp=a._ex_reg(h.message,"$$o$$"),a._isNPEExceptionPredicate=function(b){return a._exceptionNPERegExp.test(b.message)})}a.exceptionOf=function(b,e){if(b.__CLASS_NAME__)return a.instanceOf(b,e);if(e==Error){if(0<=(""+b).indexOf("Error"))for(var f=arguments.callee,c=0;50>c;c++){f=f.caller;if(!f)break;System.out.println(c+" "+(f.exName?(f.claxxOwner?f.claxxOwner.__CLASS_NAME__+".":"")+f.exName:f.toString?f.toString().substring(0,f.toString().indexOf("{")):"<native method>"))}return 0<=
(""+b).indexOf("Error")}return e==Exception||e==Throwable||e==NullPointerException&&a._isNPEExceptionPredicate(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.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"};if(null!=window.Clazz&&null==window.Clazz.unloadClass){a.MethodNotFoundException=function(b,e,f,c){b="";null!=c&&(b=c.substring(1).replace(/\\/g,","));this.message=(null!=f&&"construct"!=f?"Method":"Constructor")+" "+a.getClassName(e,!0)+"."+f+"("+b+") is not found!";this.toString=function(){return"MethodNotFoundException:"+this.message}};a.prepareCallback=function(b,e){var f=e[0];if(null!=b&&null!=f&&f!==window){var c=[];if(null!=b.b$)for(var d in b.b$)"length"!=
d&&(c[d]=b.b$[d]);b.b$=c;var j=a.getClassName(f,!0);c[j.replace(/org\.eclipse\.swt\./,"$wt.")]=f;for(j=a.getClass(f);null!=j.superClazz;)j=j.superClazz,c[a.getClassName(j,!0).replace(/org\.eclipse\.swt\./,"$wt.")]=f;f=f.b$;if(null!=f&&f instanceof Array)for(d in f)"length"!=d&&(c[d]=f[d])}for(c=0;c<e.length-1;c++)e[c]=e[c+1];e.length--};a.innerTypeInstance=function(b,e,f){null==b&&(b=arguments.callee.caller);var c=null;if(null==f&&null==e.$finals)if(3==arguments.length)c=new b(e);else if(4==arguments.length)c=
e.__CLASS_NAME__==b.__CLASS_NAME__&&arguments[3]===a.inheritArgs?e:new b(e,arguments[3]);else if(5==arguments.length)c=new b(e,arguments[3],arguments[4]);else if(6==arguments.length)c=new b(e,arguments[3],arguments[4],arguments[5]);else if(7==arguments.length)c=new b(e,arguments[3],arguments[4],arguments[5],arguments[6]);else if(8==arguments.length)c=new b(e,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);else if(9==arguments.length)c=new b(e,arguments[3],arguments[4],arguments[5],
arguments[6],arguments[7],arguments[8]);else if(10==arguments.length)c=new b(e,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);else{for(var c=new b(e,a.inheritArgs),d=[],j=3;j<arguments.length;j++)d[j-3]=arguments[j];a.instantialize(c,d)}else{c=new b(e,a.inheritArgs);if(null!=f&&null==e.f$)c.f$=f;else if(null==f&&null!=e.f$)c.f$=e.f$;else if(null!=f&&null!=e.f$){d={};for(j in e.f$)d[j]=e.f$[j];for(j in f)d[j]=f[j];c.f$=d}d=[];for(j=3;j<arguments.length;j++)d[j-
3]=arguments[j];a.instantialize(c,d)}return c};a.cloneFinals=function(){for(var b={},a=arguments.length/2,c=0;c<a;c++)b[arguments[c+c]]=arguments[c+c+1];return b};a.isClassDefined=a.isDefinedClass=function(b){if(null!=b&&0!=b.length){if(a.allClasses[b])return!0;for(var e=b.split(/\./),c=null,d=0;d<e.length;d++)if(null==c){if(null==a.allPackage[e[0]])return!1;c=a.allPackage[e[0]]}else{if(null==c[e[d]])return!1;c=c[e[d]]}if(null!=c)return a.allClasses[b]=!0}return!1};a.defineEnumConstant=function(b,
e,c,d,g){var j=null,j=null!=g?new g:new b;a.superConstructor(j,b,[e,c]);null!=d&&0!=d.length&&j.construct.apply(j,d);b[e]=j;b.prototype[e]=j;null==b["$ values"]&&(b["$ values"]=[],b.values=function(){return this["$ values"]});b["$ values"].push(j);return j};a.floatToInt=function(b){return 0>b?Math.ceil(b):Math.floor(b)};a.floatToByte=a.floatToShort=a.floatToLong=a.floatToInt;a.doubleToByte=a.doubleToShort=a.doubleToLong=a.doubleToInt=a.floatToInt;a.floatToChar=function(b){return String.fromCharCode(0>
b?Math.ceil(b):Math.floor(b))};a.doubleToChar=a.floatToChar;self.Int32Array&&self.Int32Array!=Array?(a.haveInt32=!0,Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort)):(Int32Array=function(b){b||(b=0);var a=Array(b);a.toString=function(){return"[object Int32Array]"};for(var c=0;c<b;c++)a[c]=0;return a},a.haveInt32=!1,Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.int32Fake=function(){});self.Float64Array&&self.Float64Array!=Array?(a.haveFloat64=!0,Float64Array.prototype.sort||
(Float64Array.prototype.sort=Array.prototype.sort)):(a.haveFloat64=!1,Float64Array=function(b){b||(b=0);for(var a=Array(b),c=0;c<b;c++)a[c]=0;return a},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.float64Fake=function(){},Float64Array.prototype.toString=function(){return"[object Float64Array]"});a.newArray=function(){if(arguments[0]instanceof Array)var b=arguments[0],e=arguments[1];else b=arguments,e=Array;if(1>=b.length)return[];var c=b[0];"string"==typeof c&&(c=c.charCodeAt(0));
var d=b.length-1,g=b[d];if(2==b.length){if(null==g)return Array(c);if(!0===e&&a.haveInt32)return new Int32Array(c);if(!1===e&&a.haveFloat64)return new Float64Array(c);if(e==Array&&null==g)return Array(c);for(var b=!0===e?new Int32Array:!1===e?new Float64Array:Array(c),j=c;0<=--j;)b[j]=g;return b}for(var l=Array(d),j=0;j<d;j++)l[j]=b[j+1];b=Array(c);if(null==g||0<=g||2<d)for(j=0;j<c;j++)b[j]=a.newArray(l,e);return b};a.newArray32=function(b,e){var c=b[0];"string"==typeof c&&(c=c.charCodeAt(0));var d=
b.length-1,g=b[d];switch(b.length){case 0:case 1:return alert("ERROR IN newArray32 -- args length < 2"),[];case 2:if(0>g)return Array(c);try{return e?new Int32Array(c):new Float64Array(c)}catch(j){alert(c+" "+arguments.callee.caller.arguments.callee.caller+j)}}for(g=Array(d);0<=--d;)g[d]=b[d+1];for(var l=Array(c),d=0;d<c;d++)l[d]=a.newArray(g,e);return l};a.newInt32Array=function(){return a.newArray32(arguments,!0)};a.newFloat64Array=function(){return a.newArray32(arguments,!1)};a.newFloatArray=a.newDoubleArray=
a.newFloat64Array;a.newIntArray=a.newLongArray=a.newShortArray=a.newByteArray=a.newInt32Array;a.newCharArray=a.newBooleanArray=a.newArray;$_AI=a.newIntArray;$_AF=a.newFloatArray;$_AD=a.newDoubleArray;$_AL=a.newLongArray;$_AS=a.newShortArray;$_AB=a.newByteArray;$_AC=a.newCharArray;$_Ab=a.newBooleanArray;a.isAS=function(b){return"object"==typeof b&&b.constructor&&0<=b.constructor.toString().indexOf(" Array")&&"string"==typeof b[0]};a.isASS=function(b){return"object"==typeof b&&a.isAS(b[0])};a.isAP=
function(b){return"J.util.Point3f"==a.getClassName(b[0])};a.isAI=function(b){return"object"==typeof b&&(a.haveInt32?b.constructor&&0<=b.constructor.toString().indexOf("Int32Array"):b.int32Fake?!0:!1)};a.isAII=function(b){return"object"==typeof b&&a.isAI(b[0])};a.isAF=function(b){return"object"==typeof b&&(a.haveFloat64?b.constructor&&0<=b.constructor.toString().indexOf("Float64Array"):b.float64Fake?!0:!1)};a.isAFF=function(b){return"object"==typeof b&&a.isAF(b[0])};a.isAFFF=function(b){return"object"==
typeof b&&a.isAFF(b[0])};a.isAFloat=function(b){return"object"==typeof b&&b.constructor&&0<=b.constructor.toString().indexOf(" Array")&&a.instanceOf(b[0],Float)};a.makeFunction=function(b){return function(a){null==a&&(a=window.event);null!=b.setEvent&&b.setEvent(a);b.run();if(1==b.returnSet)return b.returnNumber;if(2==b.returnSet)return b.returnBoolean;if(3==b.returnSet)return b.returnObject}};a.defineStatics=function(b){for(var a=0;a<(arguments.length-1)/2;a++){var c=arguments[a+a+1];b[c]=b.prototype[c]=
arguments[a+a+2]}};a.prepareFields=function(b,e){var c=[];if(null!=b.con$truct)for(var d=b.con$truct.stacks,g=0;g<d.length;g++)c[g]=d[g];a.addProto(b.prototype,"con$truct",b.con$truct=function(){var b=arguments.callee.stacks;if(null!=b)for(var a=0;a<b.length;a++)b[a].apply(this,[])});c[c.length]=e;b.con$truct.stacks=c;b.con$truct.index=0};a.registerSerializableFields=function(b){var a=arguments,c=a.length,d=[];if(null!=b.declared$Fields)for(var g=0;g<b.declared$Fields.length;g++)d[g]=b.declared$Fields[g];
b.declared$Fields=d;if(0<c&&1==c%2){d=b.declared$Fields;for(g=1;g<=(c-1)/2;g++){for(var j={name:a[g+g-1],type:a[g+g]},l=!1,p=0;p<d.length;p++)if(d[p].name==j.name){d[p].type=j.type;l=!0;break}l||(d[d.length]=j)}}};a.getMixedCallerMethod=function(b){var e={};b=b.callee.caller;if(null==b||b!==a.tryToSearchAndExecute&&(b=b.arguments.callee.caller,null==b)||b!==a.tryToSearchAndExecute)return null;b=b.arguments.callee.caller;if(null==b||b!==a.searchAndExecuteMethod)return null;e.claxxRef=b.arguments[1];
e.fxName=b.arguments[2];e.paramTypes=a.getParamsType(b.arguments[3]);b=b.arguments.callee.caller;if(null==b)return null;b=b.arguments.callee.caller;if(null==b)return null;e.caller=b;return e};a.checkPrivateMethod=function(b){var e=a.getMixedCallerMethod(b);if(null==e)return null;var c=e.claxxRef.prototype[e.caller.exName];if(null==c)return null;var d=null;if(null!=c.claxxOwner)d=c.claxxOwner.prototype[e.fxName];else for(var c=c.stacks,g=c.length-1;0<=g;g--){var j=c[g].prototype[e.caller.exName];if(j===
e.caller)d=c[g].prototype[e.fxName];else if(null!=j)for(var l in j)if(0==l.indexOf("\\")&&j[l]===e.caller){d=c[g].prototype[e.fxName];break}if(null!=d)break}null!=d&&null==d.claxxOwner&&(d=d["\\"+e.paramTypes]);return null!=d&&d.isPrivate&&d!==b.callee?d:null};c$=$fz=null;a.cla$$$tack=[];a.pu$h=function(){null!=c$&&(a.cla$$$tack[a.cla$$$tack.length]=c$)};a.p0p=function(){if(0<a.cla$$$tack.length){var b=a.cla$$$tack[a.cla$$$tack.length-1];a.cla$$$tack.length--;return b}return null};a.tracingCalling=
!1;a.initializingException=!1;a.callingStack=function(b,a){this.caller=b;this.owner=a};a.callingStackTraces=[];a.pu$hCalling=function(b){a.callingStackTraces[a.callingStackTraces.length]=b};a.p0pCalling=function(){var b=a.callingStackTraces.length;return 0<b?(b=a.callingStackTraces[b-1],a.callingStackTraces.length--,b):null};a.binaryFolders=null!=window.ClazzLoader&&null!=ClazzLoader.binaryFolders?ClazzLoader.binaryFolders:["j2s/","","j2slib/"];a.addBinaryFolder=function(b){if(null!=b){for(var e=
a.binaryFolders,c=0;c<e.length;c++)if(e[c]==b)return;e[e.length]=b}};a.removeBinaryFolder=function(b){if(null!=b)for(var e=a.binaryFolders,c=0;c<e.length;c++)if(e[c]==b){for(;c<e.length-1;c++)e[c]=e[c+1];e.length--;return b}return null};a.setPrimaryFolder=function(b){if(null!=b){a.removeBinaryFolder(b);for(var c=a.binaryFolders,f=c.length-1;0<=f;f--)c[f+1]=c[f];c[0]=b}};a.load=function(b,a,c,d){null!=d&&d();delete c$};java.lang.Object=JavaObject;JavaObject.getName=a.innerFunctions.getName;w$=window;
d$=document;System={currentTimeMillis:function(){return(new Date).getTime()},props:null,getProperties:function(){return System.props},setProperties:function(b){System.props=b},getProperty:function(b,a){return null!=System.props?System.props.getProperty(b,a):null!=a?a:b},setProperty:function(b,a){null!=System.props&&System.props.setProperty(b,a)},currentTimeMillis:function(){return(new Date).getTime()},arraycopy:function(b,a,c,d,g){if(b!==c)for(var j=0;j<g;j++)c[d+j]=b[a+j];else{for(var l=[],j=0;j<
g;j++)l[j]=b[a+j];for(j=0;j<g;j++)c[d+j]=l[j]}}};System.out=new JavaObject;System.out.__CLASS_NAME__="java.io.PrintStream";System.out.print=function(){};System.out.printf=function(){};System.out.println=function(){};System.err=new JavaObject;System.err.__CLASS_NAME__="java.io.PrintStream";System.err.print=function(){};System.err.printf=function(){};System.err.println=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.intCast=function(b){var a=(b&4278190080)>>24,c=(b&16711680)>>16,d=(b&65280)>>8;b&=255;return 0!=(a&128)?-(((a&127)<<24)+(c<<16)+(d<<8)+b+1):(a<<24)+(c<<16)+(d<<8)+b};a.shortCast=function(){var b=(n&65280)>>8,a=n&255;return 0!=(b&128)?-(((b&127)<<8)+a+1):(b<<8)+b4};a.byteCast=function(b){return 0!=(b&128)?-((b&127)+1):b&255};a.charCast=function(b){return String.fromCharCode(b&255).charAt(0)};a.floatCast=function(b){return b};
a.longMasks=[];a.longReverseMasks=[];a.longBits=[];d=[1];for(c=1;53>c;c++)d[c]=d[c-1]+d[c-1];a.longBits=d;a.longMasks[52]=d[52];for(c=51;0<=c;c--)a.longMasks[c]=a.longMasks[c+1]+d[c];a.longReverseMasks[0]=d[0];for(c=1;52>c;c++)a.longReverseMasks[c]=a.longReverseMasks[c-1]+d[c];a.longLeftShift=function(b,c){if(0==c)return b;if(64<=c)return 0;if(52<c)return error("[Java2Script] Error : JavaScript does not support long shift!"),b;if(0!=(b&a.longMasks[c-1]))return error("[Java2Script] Error : Such shift operator results in wrong calculation!"),
b;var f=b&a.longMasks[20+c];return 0!=f?f*a.longBits[c]+(b&a.longReverseMasks[32-c])<<0:b<<c};a.intLeftShift=function(b,a){return b<<a&4294967295};a.longRightShift=function(b,c){return 0!=(b&a.longMasks[20])?Math.round((b&a.longMasks[20])/a.longBits[32-c])+(b&a.longReverseMasks[c])>>c:b>>c};a.intRightShift=function(b,a){return b>>a};a.long0RightShift=function(b,a){return b>>>a};a.int0RightShift=function(b,a){return b>>>a};$_L=a.load;$_W=a.declareAnonymous;$_T=a.declareType;$_J=a.declarePackage;$_C=
a.decorateAsClass;$_Z=a.instantialize;$_I=a.declareInterface;$_D=a.isClassDefined;$_H=a.pu$h;$_P=a.p0p;$_B=a.prepareCallback;$_N=a.innerTypeInstance;$_K=a.makeConstructor;$_U=a.superCall;$_R=a.superConstructor;$_M=a.defineMethod;$_V=a.overrideMethod;$_S=a.defineStatics;$_E=a.defineEnumConstant;$_F=a.cloneFinals;$_Y=a.prepareFields;$_A=a.newArray;$_O=a.instanceOf;$_G=a.inheritArgs;$_X=a.checkPrivateMethod;$_Q=a.makeFunction;$_s=a.registerSerializableFields;$_k=a.overrideConstructor;a.declarePackage("java.lang.reflect");
a.declarePackage("java.security");a.innerFunctionNames=a.innerFunctionNames.concat("getSuperclass isAssignableFrom getMethods getMethod getDeclaredMethods getDeclaredMethod getConstructor getModifiers isArray 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 b=[],a=this.prototype,c;for(c in a)"function"==typeof a[c]&&null==a[c].__CLASS_NAME__&&(b[b.length]=new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC));a=this;for(c in a)"function"==typeof a[c]&&null==a[c].__CLASS_NAME__&&(b[b.length]=new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC|java.lang.reflect.Modifier.STATIC));return b};a.innerFunctions.getDeclaredMethod=
a.innerFunctions.getMethod=function(b){var a=this.prototype,c;for(c in a)if(b==c&&"function"==typeof a[c]&&null==a[c].__CLASS_NAME__)return new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC);a=this;for(c in a)if(b==c&&"function"==typeof a[c]&&null==a[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.isArray=function(){return!1};a.innerFunctions.newInstance=function(){return new this};d=a.innerFunctionNames;for(c=0;c<d.length;c++)JavaObject[d[c]]=a.innerFunctions[d[c]],Array[d[c]]=a.innerFunctions[d[c]];Array.isArray=function(){return!0};a.forName=function(b){if(a.isClassDefined(b))return a.evalType(b);if(null!=window.ClazzLoader)return ClazzLoader.setLoadingMode("xhr.sync"),ClazzLoader.loadClass(b),a.evalType(b);a.alert("[Java2Script] Error: No ClassLoader!")};a.cleanDelegateMethod=
function(b){null!=b&&("function"==typeof b&&null!=b.lastMethod&&null!=b.lastParams&&null!=b.lastClaxxRef)&&(b.lastMethod=null,b.lastParams=null,b.lastClaxxRef=null)};a.unloadClass=function(b){var c=a.evalType(b);if(null!=c){a.unloadedClasses[b]=c;for(var f=b.split(/\./),d=null,g=0;g<f.length-1;g++)d=null==d?a.allPackage[f[0]]:d[f[g]];if(null==d){a.allPackage[f[0]]=null;window[f[0]]=null;for(var j in window)0==j.indexOf(b+"$")&&(a.unloadClass(j),window[j]=null)}else for(j in d[f[f.length-1]]=null,
d)0==j.indexOf(f[f.length-1]+"$")&&(a.unloadClass(d.__PKG_NAME__+"."+j),d[j]=null);if(!0==a.allClasses[b])for(j in a.allClasses[b]=!1,a.allClasses)0==j.indexOf(b+"$")&&(a.allClasses[j]=!1);for(var l in c)a.cleanDelegateMethod(c[l]);for(l in c.prototype)a.cleanDelegateMethod(c.prototype[l]);null!=window.ClazzLoader&&ClazzLoader.unloadClassExt(b);return!0}return!1};a.addEvent=function(b,c,d){if(b.addEventListener)b.addEventListener(c,d,!1);else{d.$$guid||(d.$$guid=a.addEvent.guid++);b.events||(b.events=
{});var g=b.events[c];g||(g=b.events[c]={},b["on"+c]&&(g[0]=b["on"+c]));g[d.$$guid]=d;b["on"+c]=a.handleEvent}};a.addEvent.guid=1;a.removeEvent=function(b,a,c){b.removeEventListener?b.removeEventListener(a,c,!1):b.events&&b.events[a]&&delete b.events[a][c.$$guid]};a.isVeryOldIE=-1!=navigator.userAgent.indexOf("MSIE 6.0")||-1!=navigator.userAgent.indexOf("MSIE 5.5")||-1!=navigator.userAgent.indexOf("MSIE 5.0");a.handleEvent=function(b){var c=!0;if(a.isVeryOldIE){if(null==b){b=null;try{var d=(this.ownerDocument||
this.document||this).parentWindow;null!=d&&(b=d.event)}catch(g){b=window.event}b=a.fixEvent(b)}}else b=b||a.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var d=this.events[b.type],h;for(h in d)isNaN(h)||(this.$$handleEvent=d[h],"function"==typeof this.$$handleEvent&&!1===this.$$handleEvent(b)&&(c=!1));return c};a.fixEvent=function(b){b.preventDefault=a.fixEvent.preventDefault;b.stopPropagation=a.fixEvent.stopPropagation;return b};a.fixEvent.preventDefault=function(){this.returnValue=
!1};a.fixEvent.stopPropagation=function(){this.cancelBubble=!0}}ClazzLoader=function(){};ClazzNode=function(){this.parents=[];this.musts=[];this.optionals=[];this.path=this.name=this.declaration=null;this.status=0;this.random=0.13412;this.optionalsLoaded=null;this.toString=function(){return null!=this.name?this.name:null!=this.path?this.path:"ClazzNode"}};(function(b,c){c.STATUS_UNKNOWN=0;c.STATUS_KNOWN=1;c.STATUS_CONTENT_LOADED=2;c.STATUS_MUSTS_LOADED=3;c.STATUS_DECLARED=4;c.STATUS_OPTIONALS_LOADED=
5;b.loaders=[];b.requireLoaderByBase=function(a){for(var c=0;c<b.loaders.length;c++)if(b.loaders[c].base==a)return b.loaders[c];c=new b;c.base=a;return b.loaders[b.loaders.length]=c};b.clazzTreeRoot=new c;b.loadedScripts={};b.inLoadingThreads=0;b.maxLoadingThreads=6;b.userAgent=navigator.userAgent.toLowerCase();b.isOpera=-1!=b.userAgent.indexOf("opera");b.isIE=-1!=b.userAgent.indexOf("msie")&&!b.isOpera;b.isGecko=-1!=b.userAgent.indexOf("gecko");if(b.isOpera){b.maxLoadingThreads=1;var d=b.userAgent.indexOf("opera/");
if(-1!=d){var g=9;try{g=parseFloat(b.userAgent.subString(d+6))}catch(h){}9.6<=g&&(b.maxLoadingThreads=6)}}null!=window.Clazz&&a.isClassDefined?b.isClassDefined=a.isClassDefined:(b.definedClasses={},b.isClassDefined=function(a){return!0==b.definedClasses[a]});b.binaryFolders=null!=window.Clazz&&null!=a.binaryFolders?a.binaryFolders:["bin/","","j2slib/"];b.addBinaryFolder=function(a){if(null!=a){for(var c=b.binaryFolders,e=0;e<c.length;e++)if(c[e]==a)return;c[c.length]=a}};b.removeBinaryFolder=function(a){if(null!=
a)for(var c=b.binaryFolders,e=0;e<c.length;e++)if(c[e]==a){for(;e<c.length-1;e++)c[e]=c[e+1];c.length--;return a}return null};b.setPrimaryFolder=function(a){if(null!=a){b.removeBinaryFolder(a);for(var c=b.binaryFolders,e=c.length-1;0<=e;e--)c[e+1]=c[e];c[0]=a}};b.isAsynchronousLoading=!0;b.isUsingXMLHttpRequest=!1;b.loadingTimeLag=-1;b.setLoadingMode=function(a,c){null!=a&&("string"==typeof a?(a=a.toLowerCase(),0==a.length||-1!=a.indexOf("script")?(b.isUsingXMLHttpRequest=!1,b.isAsynchronousLoading=
!0):(b.isUsingXMLHttpRequest=!0,b.isAsynchronousLoading=-1!=a.indexOf("async")?!0:!1),b.isAsynchronousLoading=!1):a==b.MODE_SCRIPT?(b.isUsingXMLHttpRequest=!1,b.isAsynchronousLoading=!0):(b.isUsingXMLHttpRequest=!0,b.isAsynchronousLoading=a==b.MODE_XHR_ASYNC?!0:!1));b.loadingTimeLag=b.isAsynchronousLoading&&0<=c?c:-1};b.MODE_SCRIPT=0;b.MODE_SCRIPT_ASYNC=0;b.MODE_XHR=3;b.MODE_XHR_SYNC=3;b.MODE_XHR_ASYNC=1;b.unwrapArray=function(b){if(null==b||0==b.length)return b;for(var a=null,c=0;c<b.length;c++)if(null!=
b[c]){if("$"==b[c].charAt(0))if("."==b[c].charAt(1)){if(null==a)continue;var e=a.lastIndexOf(".");-1!=e&&(a=a.substring(0,e),b[c]=a+b[c].substring(1))}else b[c]="org.eclipse.s"+b[c].substring(1);a=b[c]}return b};b.classQueue=[];b.classpathMap={};b.packageClasspath=function(a,c,e){var d=b.classpathMap,f=!0==e&&null!=d["@"+a];e&&(null==d["@java"]&&0!=a.indexOf("java"))&&b.assurePackageClasspath("java");if(a instanceof Array){b.unwrapArray(a);for(d=0;d<a.length;d++)b.packageClasspath(a[d],c,e)}else{if("java"==
a||"java.*"==a){var g="@net.sf.j2s.ajax";null==d[g]&&null!=c&&(d[g]=c);g="@net.sf.j2s";null==d[g]&&null!=c&&(d[g]=c)}else"swt"==a?a="org.eclipse.swt":"ajax"==a?a="net.sf.j2s.ajax":"j2s"==a&&(a="net.sf.j2s");a.lastIndexOf(".*")==a.length-2&&(a=a.substring(0,a.length-2));null!=c&&(d["@"+a]=c);!0==e&&(!0!=window[a+".registered"]&&!f)&&(b.pkgRefCount++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){b.pkgRefCount--;0==b.pkgRefCount&&b.runtimeLoaded()},!0))}};b.pkgRefCount=0;b.jarClasspath=function(a,
c){c instanceof Array||(c=[classes]);b.unwrapArray(c);for(var e=0;e<c.length;e++)b.classpathMap["#"+c[e]]=a;b.classpathMap["$"+a]=c};b.registerPackages=function(c,e){b.checkInteractive();for(var d=b.getClasspathFor(c+".*",!0),f=0;f<e.length;f++)null!=window.Clazz&&a.declarePackage(c+"."+e[f]),b.packageClasspath(c+"."+e[f],d)};b.multipleSites=function(a){var c=window["j2s.update.delta"];if(null!=c&&c instanceof Array&&3<=c.length)for(var e=null,d=null,f=0;f<c.length/3;f++){var g=c[f+f+f];"$"!=g&&(e=
g);g=c[f+f+f+1];"$"!=g&&(d=g);var g=c[f+f+f+2],h=e+"/"+g,k=a.indexOf(h);if(-1!=k&&k==a.length-h.length){a=a.substring(0,k)+d+"/"+g;break}}c=a.length;if(1<b.maxLoadingThreads&&(15<c&&"http://archive."==a.substring(0,15)||9<c&&"http://a."==a.substring(0,9)))if(e=a.lastIndexOf("/"),e<c-3)return d=a.charCodeAt(e+1),f=a.charCodeAt(e+2),k=3*(c-e)+5*d+7*f,a.substring(0,7)+"aeiouy".split("")[k%6]+a.substring(8);return a};b.getClasspathFor=function(a,c,e){var d=b.classpathMap["#"+a],f=null;if(null!=d){if(!c&&
null==e)return b.multipleSites(d);var g=d.lastIndexOf(a.replace(/\./g,"/"));-1!=g?f=d.substring(0,g):(g=a.lastIndexOf("."),-1!=g&&(g=d.lastIndexOf(a.substring(0,g).replace(/\./g,"/")),-1!=g&&(f=d.substring(0,g))))}else for(g=a.lastIndexOf(".");-1!=g;){d=a.substring(0,g);f=b.classpathMap["@"+d];if(null!=f)break;g=a.lastIndexOf(".",g-2)}f=b.assureBase(f);if(c)return b.multipleSites(f);if(a.lastIndexOf(".*")==a.length-2)return a=f+a.substring(0,g+1).replace(/\./g,"/"),b.multipleSites(a);null==e?e=".js":
"."!=e.charAt(0)&&(e="."+e);a=f+a.replace(/\./g,"/")+e;return b.multipleSites(a)};b.assureBase=function(c){null==c&&(c=null!=window.Clazz&&null!=a.binaryFolders&&0!=a.binaryFolders.length?a.binaryFolders[0]:null!=b.binaryFolders&&0!=b.binaryFolders.length?b.binaryFolders[0]:"j2s");c.lastIndexOf("/")!=c.length-1&&(c+="/");return c};b.excludeClassMap={};b.ignore=function(){var a=null;1==arguments.length&&arguments[0]instanceof Array&&(a=arguments[0]);if(null==a)for(var a=[],c=0;c<arguments.length;c++)a[a.length]=
arguments[c];b.unwrapArray(a);for(c=0;c<a.length;c++)b.excludeClassMap["@"+a[c]]=!0};b.isClassExcluded=function(a){return!0==b.excludeClassMap["@"+a]};b.scriptLoading=function(){};b.scriptLoaded=function(){};b.scriptInited=function(){};b.scriptCompleted=function(){};b.classUnloaded=function(){};b.classReloaded=function(){};b.globalLoaded=function(){};b.keepOnLoading=!0;b.mapPath2ClassNode={};b.xhrOnload=function(c,e){if(400<=c.status||null==c.responseText||0==c.responseText.length){a.alert("xhronload error"+
c.responseText);var d=b.failedScripts;null==d[e]?(d[e]=1,b.loadedScripts[e]=!1,b.loadScript(e,"xhrOnload 2nd try")):(a.alert("[Java2Script] ClazzLoader.xhrOnload Error in loading "+e+"!"),b.tryToLoadNext(e))}else b.evaluate(e,c.responseText)};b.evaluate=function(c,e){try{eval(e)}catch(d){throw alert(d),a.alert("[Java2Script] Script error: "+d.message),d;}b.scriptLoaded(c);b.tryToLoadNext(c)};b.emptyOnRSC=function(){};b.failedScripts={};b.failedHandles={};b.takeAnotherTry=!0;b.generateRemovingFunction=
function(b){return function(){if("interactive"!=b.readyState){try{null!=b.parentNode&&b.parentNode.removeChild(b)}catch(a){}b=null}}};b.removeScriptNode=function(a){window["j2s.script.debugging"]||window.setTimeout(b.generateRemovingFunction(a),1)};b.generatingXHROnload=function(a,c){return function(){b.xhrOnload(a,c);c=a=null}};b.generatingXHRCallback=function(a,c){return function(){if(4==a.readyState){0<b.inLoadingThreads&&b.inLoadingThreads--;var e=b.generatingXHROnload(a,c);isActiveX?(a.onreadystatechange=
b.emptyOnRSC,window.setTimeout(e,0>b.loadingTimeLag?0:b.loadingTimeLag)):(a.onreadystatechange=null,0<=b.loadingTimeLag?window.setTimeout(e,b.loadingTimeLag):b.xhrOnload(a,c));c=a=null}}};b.loadingNextByPath=function(a){0<=b.loadingTimeLag?window.setTimeout(function(){b.tryToLoadNext(a)},b.loadingTimeLag):b.tryToLoadNext(a)};b.ieToLoadScriptAgain=function(a,c){return window.setTimeout(function(){b.takeAnotherTry&&(b.failedScripts[a]=0,b.loadedScripts[a]=!1,0<b.inLoadingThreads&&b.inLoadingThreads--,
b.loadScript(a,"ietoloadscriptAgain"))},c?500:15E3)};b.w3cFailedLoadingTest=function(b){return window.setTimeout(function(){b.onerror();b=b.timeoutHandle=null},500)};b.generatingW3CScriptOnCallback=function(c,e){return function(){e&&a.debuggingBH&&a.alert("############ forError="+e+" path="+c+" ####"+(e?"NOT":"")+"LOADED###");b.isGecko&&null!=this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null);0<b.inLoadingThreads&&b.inLoadingThreads--;this.onerror=this.onload=null;
if(e){var d=b.failedScripts;if(null==d[c]&&b.takeAnotherTry){d[c]=1;e||(b.innerLoadedScripts[this.src]=!1);b.loadedScripts[c]=!1;b.loadScript(c,"w3c script failed");b.removeScriptNode(this);return}e&&b.scriptLoaded(c)}else b.scriptLoaded(c);b.loadingNextByPath(c);b.removeScriptNode(this)}};b.generatingIEScriptOnCallback=function(c){return function(){var e=b.failedHandles,d=b.failedScripts,f=""+this.readyState,g="loading"==f&&(0==this.src.indexOf("file:")||"file:"==window.location.protocol&&0!=this.src.indexOf("http"));
if("loaded"!=f&&"complete"!=f){if(null==d[c]){e[c]=b.ieToLoadScriptAgain(c,g);return}if(1==d[c])return}null!=e[c]&&(window.clearTimeout(e[c]),e[c]=null);if((g||"loaded"==f)&&!b.innerLoadedScripts[this.src]){if(!g&&(null==d[c]||0==d[c])&&b.takeAnotherTry){0<b.inLoadingThreads&&b.inLoadingThreads--;d[c]=1;b.loadedScripts[c]=!1;b.loadScript(c,"local or loaded failed");b.removeScriptNode(this);return}a.alert("[Java2Script] generatingIEScriptOnCallback Error in loading "+c+"!")}0<b.inLoadingThreads&&b.inLoadingThreads--;
b.scriptLoaded(c);this.onreadystatechange=null;b.loadingNextByPath(c);b.removeScriptNode(this)}};a.transport=null;b.loadScript=function(c,e,d){a.currentPath=c;d=!0==d;if(b.loadedScripts[c]&&!d)b.tryToLoadNext(c);else{b.loadedScripts[c]=!0;for(var f=b.classQueue,g=0;g<f.length;g++)if(f[g]==c){for(var h=g;h<f.length-1;h++)f[g]=f[g+1];f.length--;break}System.out.println("call loadScript "+c.replace(/\//g,"\\").replace(/j2s[\\\.]/g,"")+(e?" -- required by "+e:""));if(b.isUsingXMLHttpRequest)if(b.scriptLoading(c),
b.isAsynchronousLoading){if(!a.transport){if(window.XMLHttpRequest)a.transport=new XMLHttpRequest;else try{a.transport=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){a.transport=new ActiveXObject("Microsoft.XMLHTTP")}if(null==a.transport){a.alert("[Java2Script] XMLHttpRequest not supported!");return}}d=a.transport;try{d.open("GET",c,b.isAsynchronousLoading)}catch(m){alert(m+" "+c)}d.onreadystatechange=b.generatingXHRCallback(d,c);b.inLoadingThreads++;try{d.send(null)}catch(q){a.alert("[Java2Script] Loading file error: "+
q.message),b.xhrOnload(d,c)}}else d=Jmol.$ajax({dataType:"text",async:!1,url:c}).responseText,b.evaluate(c,d);else if(e=document.createElement("SCRIPT"),e.type="text/javascript",e.src=b.isChrome&&b.reloadingClasses[c]?c+"?"+Math.floor(1E5*Math.random()):c,f=document.getElementsByTagName("HEAD")[0],d)f.appendChild(e);else{e.defer=!0;if("undefined"==typeof e.onreadystatechange||!b.isIE){if(b.isGecko&&(0==c.indexOf("file:")||"file:"==window.location.protocol&&0!=c.indexOf("http")))e.timeoutHandle=b.w3cFailedLoadingTest(e);
e.onload=b.generatingW3CScriptOnCallback(c,!1);e.onerror=b.generatingW3CScriptOnCallback(c,!0);b.isOpera&&(b.needOnloadCheck=!0)}else b.needOnloadCheck=!0,e.onreadystatechange=b.generatingIEScriptOnCallback(c);b.inLoadingThreads++;f.appendChild(e);b.scriptLoading(c)}}};b.isResourceExisted=function(b,a,c){if(null!=b&&null!=document.getElementById(b))return!0;if(null!=a){var e=a;null!=c&&0==a.indexOf(c)&&(e=a.substring(c.length));if(a.lastIndexOf(".css")==a.length-4){var d=document.getElementsByTagName("LINK");
for(a=0;a<d.length;a++){var f=d[a].href;c=f.lastIndexOf(e);if(-1!=c&&c==f.length-e.length)return!0}if(!0==window["css."+b])return!0}else if(a.lastIndexOf(".js")==a.length-4){b=document.getElementsByTagName("SCRIPT");for(a=0;a<b.length;a++)if(d=b[a].src,c=d.lastIndexOf(e),-1!=c&&c==d.length-e.length)return!0}}return!1};b.queueBe4SWT=[];b.lockQueueBe4SWT=!0;b.isLoadingEntryClass=!0;b.besidesJavaPackage=!1;b.tryToLoadNext=function(a){if(b.lockQueueBe4SWT&&0!=b.pkgRefCount&&a.lastIndexOf("package.js")!=
a.length-10&&!b.isOpera){var d=b.queueBe4SWT;d[d.length]=a}else{var f=b.mapPath2ClassNode["@"+a];if(null!=f){var g=b.classpathMap["$"+a];if(null!=g)for(a=0;a<g.length;a++){var h=g[a];if(h!=f.name)if(d=b.findClass(h),null!=d)d.status<c.STATUS_CONTENT_LOADED&&(d.status=c.STATUS_CONTENT_LOADED,b.updateNode(d));else{d=new c;d.name=h;var k=b.classpathMap["#"+h];null==k&&(alert(h),error("Java2Script implementation error! Please report this bug!"));d.path=k;b.mappingPathNameNode(d.path,h,d);d.status=c.STATUS_CONTENT_LOADED;
b.addChildClassNode(b.clazzTreeRoot,d,-1);b.updateNode(d)}}if(f instanceof Array)for(a=0;a<f.length;a++)f[a].status<c.STATUS_CONTENT_LOADED&&(f[a].status=c.STATUS_CONTENT_LOADED,b.updateNode(f[a]));else if(f.status<c.STATUS_CONTENT_LOADED){d=!1;g=document.getElementsByTagName("SCRIPT");for(a=0;a<g.length;a++)if(b.isIE){if(null!=g[a].onreadystatechange&&g[a].onreadystatechange.path==f.path&&"interactive"==g[a].readyState){d=!0;break}}else if(null!=g[a].onload&&g[a].onload.path==f.path){d=!0;break}d||
(f.status=c.STATUS_CONTENT_LOADED,b.updateNode(f))}if(b.keepOnLoading){f=!1;d=b.findNextMustClass(b.clazzTreeRoot,c.STATUS_KNOWN);if(null!=d)for(b.loadClassNode(d);b.inLoadingThreads<b.maxLoadingThreads;){a=b.findNextMustClass(b.clazzTreeRoot,c.STATUS_KNOWN);if(null==a)break;b.loadClassNode(a)}else if(g=b.classQueue,0!=g.length){d=g[0];for(a=0;a<g.length-1;a++)g[a]=g[a+1];g.length--;!b.loadedScripts[d.path]||0!=g.length||!b.isLoadingEntryClass||null!=d.musts&&0!=d.musts.length||null!=d.optionals&&
0!=d.optionals.length?(b.addChildClassNode(b.clazzTreeRoot,d,1),b.loadScript(d.path,d.requiredBy)):b.isLoadingEntryClass&&(b.isLoadingEntryClass=!1)}else if(d=b.findNextOptionalClass(c.STATUS_KNOWN),null!=d)for(b.loadClassNode(d);b.inLoadingThreads<b.maxLoadingThreads;){a=b.findNextOptionalClass(c.STATUS_KNOWN);if(null==a)break;b.loadClassNode(a)}else f=!0;if(f&&0==b.inLoadingThreads){for(;null!=(d=b.findNextMustClass(b.clazzTreeRoot,c.STATUS_CONTENT_LOADED));)b.updateNode(d);for(a=null;null!=(d=
b.findNextOptionalClass(c.STATUS_CONTENT_LOADED));)a===d&&(d.status=c.STATUS_OPTIONALS_LOADED),b.updateNode(d),a=d;for(;!(b.tracks=[],!b.checkOptionalCycle(b.clazzTreeRoot)););for(a=null;null!=(d=b.findNextMustClass(b.clazzTreeRoot,c.STATUS_DECLARED))&&a!==d;)b.updateNode(d),a=d;for(a=null;null!=(d=b.findNextOptionalClass(c.STATUS_DECLARED))&&a!==d;)b.updateNode(d),a=d;for(f=[];null!=(d=b.findNextMustClass(b.clazzTreeRoot,c.STATUS_DECLARED));)f[f.length]=d,d.status=c.STATUS_OPTIONALS_LOADED;for(;null!=
(d=b.findNextOptionalClass(c.STATUS_DECLARED));)f[f.length]=d,d.status=c.STATUS_OPTIONALS_LOADED;for(a=0;a<f.length;a++)b.destroyClassNode(f[a]);for(a=0;a<f.length;a++)d=f[a].optionalsLoaded,null!=d&&(f[a].optionalsLoaded=null,d());b.globalLoaded()}}}}};b.tracks=[];b.checkOptionalCycle=function(a){for(var d=b.tracks,f=d.length,g=-1,h=0;h<d.length;h++)if(d[h]===a&&d[h].status>=c.STATUS_DECLARED){g=h;break}d[d.length]=a;if(-1!=g){for(h=g;h<d.length;h++){d[h].status=c.STATUS_OPTIONALS_LOADED;b.destroyClassNode(d[h]);
for(a=0;a<d[h].parents.length;a++)b.updateNode(d[h].parents[a]);d[h].parents=[];a=d[h].optionalsLoaded;null!=a&&(d[h].optionalsLoaded=null,a())}d.length=0;return!0}for(h=0;h<a.musts.length;h++)if(a.musts[h].status==c.STATUS_DECLARED&&b.checkOptionalCycle(a.musts[h]))return!0;for(h=0;h<a.optionals.length;h++)if(a.optionals[h].status==c.STATUS_DECLARED&&b.checkOptionalCycle(a.optionals[h]))return!0;d.length=f;return!1};b.updateNode=function(a){if(null==a.name||a.status>=c.STATUS_OPTIONALS_LOADED)b.destroyClassNode(a);
else{var d=!1;if(null==a.musts||0==a.musts.length||null==a.declaration)d=!0;else for(var d=!0,f=a.musts.length,g=f-1;0<=g;g--){var h=a.musts[g];h.requiredBy=a;if(h.status<c.STATUS_DECLARED){if(b.isClassDefined(h.name)){var k=[];h.status=c.STATUS_OPTIONALS_LOADED;b.destroyClassNode(h);if(null!=h.declaration&&null!=h.declaration.clazzList){for(var m=h.declaration.clazzList,q=0;q<m.length;q++){var r=b.findClass(m[q]);r.status!=c.STATUS_OPTIONALS_LOADED&&r!==h&&(r.status=h.status,r.declaration=null,b.destroyClassNode(r),
null!=r.optionalsLoaded&&(k[k.length]=r))}h.declaration=null}null!=h.optionalsLoaded&&(k[k.length]=h);for(q=0;q<k.length;q++)h=k[q].optionalsLoaded,null!=h&&(k[q].optionalsLoaded=null,h())}else h.status==c.STATUS_CONTENT_LOADED&&b.updateNode(h),h.status<c.STATUS_DECLARED&&(d=!1);a.musts.length!=f&&(g=f=a.musts.length,d=!0)}}if(d){if(a.status<c.STATUS_DECLARED&&(g=a.declaration,null!=g&&(!1==g.executed?(g(),g.executed=!0):g()),a.status=c.STATUS_DECLARED,null!=b.definedClasses&&(b.definedClasses[a.name]=
!0),b.scriptInited(a.path),null!=a.declaration&&null!=a.declaration.clazzList)){m=a.declaration.clazzList;for(q=0;q<m.length;q++)r=b.findClass(m[q]),r.status!=c.STATUS_DECLARED&&r!==a&&(r.status=c.STATUS_DECLARED,null!=b.definedClasses&&(b.definedClasses[r.name]=!0),b.scriptInited(r.path))}d=c.STATUS_DECLARED;m=!1;if((null==a.optionals||0==a.optionals.length)&&(null==a.musts||0==a.musts.length)||a.status>c.STATUS_KNOWN&&null==a.declaration)m=!0;else{m=!0;for(g=0;g<a.musts.length;g++)if(h=a.musts[g],
h.status<c.STATUS_OPTIONALS_LOADED){m=!1;break}if(m)for(g=0;g<a.optionals.length;g++)if(h=a.optionals[g],h.status<c.STATUS_OPTIONALS_LOADED){m=!1;break}}if(m){d=c.STATUS_OPTIONALS_LOADED;a.status=d;b.scriptCompleted(a.path);h=a.optionalsLoaded;if(null!=h&&(a.optionalsLoaded=null,h(),!b.keepOnLoading))return!1;b.destroyClassNode(a);if(null!=a.declaration&&null!=a.declaration.clazzList){m=a.declaration.clazzList;for(q=0;q<m.length;q++)if(r=b.findClass(m[q]),r.status!=d&&r!==a){r.status=d;r.declaration=
null;b.scriptCompleted(r.path);h=r.optionalsLoaded;if(null!=h&&(r.optionalsLoaded=null,h(),!b.keepOnLoading))return!1;b.destroyClassNode(a)}}}b.updateParents(a,d)}}};b.updateParents=function(a,d){if(!(null==a.parents||0==a.parents.length)){for(var f=0;f<a.parents.length;f++){var g=a.parents[f];g.status>=d||b.updateNode(g)}d==c.STATUS_OPTIONALS_LOADED&&(a.parents=[])}};b.findNextMustClass=function(a,d){if(null!=a){if(null!=a.musts&&0!=a.musts.length)for(var f=0;f<a.musts.length;f++){var g=a.musts[f];
if(g.status==d&&(d!=c.STATUS_KNOWN||!0!=b.loadedScripts[g.path])&&(d==c.STATUS_DECLARED||!b.isClassDefined(g.name)))return g;g=b.findNextMustClass(g,d);if(null!=g)return g}if(a.status==d&&(d!=c.STATUS_KNOWN||!0!=b.loadedScripts[a.path])&&(d==c.STATUS_DECLARED||!b.isClassDefined(a.name)))return a}return null};b.usedRandoms={};b.usedRandoms["r0.13412"]=0.13412;b.findNextOptionalClass=function(a){for(var c=0;;){var c=Math.random(),d="r"+c;if(b.usedRandoms[d]!=c){b.usedRandoms[d]=c;break}}b.clazzTreeRoot.random=
c;return b.findNodeNextOptionalClass(b.clazzTreeRoot,a)};b.findNodeNextOptionalClass=function(a,d){var f=b.clazzTreeRoot.random;if(null!=a.musts&&0!=a.musts.length){var g=b.searchClassArray(a.musts,f,d);if(null!=g&&(d!=c.STATUS_KNOWN||!0!=b.loadedScripts[g.path])&&(d==c.STATUS_DECLARED||!b.isClassDefined(g.name)))return g}return null!=a.optionals&&0!=a.optionals.length&&(g=b.searchClassArray(a.optionals,f,d),null!=g&&(d!=c.STATUS_KNOWN||!0!=b.loadedScripts[g.path])&&(d==c.STATUS_DECLARED||!b.isClassDefined(g.name)))?
g:a.status==d&&(d!=c.STATUS_KNOWN||!0!=b.loadedScripts[a.path])&&(d==c.STATUS_DECLARED||!b.isClassDefined(a.name))?a:null};b.searchClassArray=function(a,d,f){for(var g=0;g<a.length;g++){var h=a[g];if(h.status==f&&(f!=c.STATUS_KNOWN||!0!=b.loadedScripts[h.path])&&(f==c.STATUS_DECLARED||!b.isClassDefined(h.name))||h.random!=d&&(h.random=d,h=b.findNodeNextOptionalClass(h,f),null!=h))return h}return null};b.innerLoadedScripts={};b.interactiveScript=null;b.needOnloadCheck=!1;b.checkInteractive=function(){if(b.needOnloadCheck){var a=
b.interactiveScript;if(!(null!=a&&"interactive"==a.readyState)){b.interactiveScript=null;for(var a=document.getElementsByTagName("SCRIPT"),c=0;c<a.length;c++)"interactive"==a[c].readyState&&null!=a[c].onreadystatechange?(b.interactiveScript=a[c],b.innerLoadedScripts[a[c].src]=!0):b.isOpera&&"loaded"==a[c].readyState&&(null!=a[c].src&&0!=a[c].src.length)&&(b.innerLoadedScripts[a[c].src]=!0)}}};b.load=function(a,d,f,g){b.checkInteractive();if(d instanceof Array){b.unwrapArray(d);for(var h=0;h<d.length;h++)b.load(a,
d[h],f,g,d)}else{"$"==d.charAt(0)&&(d="org.eclipse.s"+d.substring(1));var k=b.mapPath2ClassNode["#"+d];if(null==k){var m=b.findClass(d),k=null!=m?m:new c;k.name=d;h=b.classpathMap["#"+d];null==h&&(h="unknown");k.path=h;b.mappingPathNameNode(k.path,d,k);k.status=c.STATUS_KNOWN;b.addChildClassNode(b.clazzTreeRoot,k,-1)}if(null!=a&&0!=a.length){b.unwrapArray(a);for(h=0;h<a.length;h++)if(m=a[h],!(null==m||0==m.length)&&!b.isClassDefined(m)&&!b.isClassExcluded(m))m=b.findClass(m),null==m&&(m=new c,m.name=
a[h],m.status=c.STATUS_KNOWN),m.requiredBy=k,b.addChildClassNode(k,m,1)}5==arguments.length&&null!=g&&(g.status=k.status,g.clazzList=arguments[4]);k.declaration=g;null!=g&&(k.status=c.STATUS_CONTENT_LOADED);if(null!=f&&0!=f.length){b.unwrapArray(f);for(h=0;h<f.length;h++)if(m=f[h],!(null==m||0==m.length)&&!b.isClassDefined(m)&&!b.isClassExcluded(m))m=b.findClass(m),null==m&&(m=new c,m.name=f[h],m.status=c.STATUS_KNOWN),b.addChildClassNode(k,m,-1)}}};null!=window.Clazz&&(a.load=b.load,null!=window.$_L&&
($_L=a.load));b.findClass=function(a){for(var c=0;;){var c=Math.random(),d="r"+c;if(b.usedRandoms[d]!=c){b.usedRandoms[d]=c;break}}b.clazzTreeRoot.random=c;return b.findClassUnderNode(a,b.clazzTreeRoot)};b.findClassUnderNode=function(a,c){var d=b.clazzTreeRoot.random;if(c.name==a)return c;for(var e=0;e<c.musts.length;e++){var f=c.musts[e];if(f.name==a||f.random!=d&&(f.random=d,f=b.findClassUnderNode(a,f),null!=f))return f}for(e=0;e<c.optionals.length;e++)if(f=c.optionals[e],f.name==a||f.random!=d&&
(f.random=d,f=b.findClassUnderNode(a,f),null!=f))return f;return null};b.mappingPathNameNode=function(a,c,d){var e=b.mapPath2ClassNode,f="@"+a;a=e[f];if(null!=a)if(a instanceof Array){for(var f=!1,g=0;g<a.length;g++)if(a[g].name==c){f=!0;break}f||(a[a.length]=d)}else g=[],g[0]=a,g[1]=d,e[f]=g;else e[f]=d;e["#"+c]=d};b.loadClassNode=function(a){var c=a.name;if(!b.isClassDefined(c)&&!b.isClassExcluded(c)){var d=b.getClasspathFor(c);a.path=d;b.mappingPathNameNode(d,c,a);if(!b.loadedScripts[d])return b.loadScript(d,
a.requiredBy),!0}return!1};b.runtimeKeyClass="java.lang.String";b.queueBe4KeyClazz=[];b.getJ2SLibBase=function(){var a=window["j2s.lib"];if(null!=a)return null==a.base&&(a.base="http://archive.java2script.org/"),a.base+("."==a.alias?"":(a.alias?a.alias:a.version?a.version:"1.0.0")+"/");for(var a=document.getElementsByTagName("SCRIPT"),c=0;c<a.length;c++){var d=a[c].src,e=d.indexOf("j2slib.z.js");if(-1!=e)return d.substring(0,e);e=d.indexOf("j2slibcore.z.js");if(-1!=e)return d.substring(0,e);e=b.classpathMap["@java"];
if(null!=e)return e;e=d.indexOf("java/lang/ClassLoader.js");if(-1!=e)return d.substring(0,e)}return null};b.J2SLibBase=null;b.fastGetJ2SLibBase=function(){null==b.J2SLibBase&&(b.J2SLibBase=b.getJ2SLibBase());return b.J2SLibBase};b.assurePackageClasspath=function(a){var c=window[a+".registered"];!1!=c&&(!0!=c&&null==b.classpathMap["@"+a])&&(window[a+".registered"]=!1,c=b.fastGetJ2SLibBase(),null==c&&(c="j2s"),b.packageClasspath(a,c,!0))};b.loadClass=function(d,f,g,h){if("boolean"==typeof f)return a.evalType(d);
b.assurePackageClasspath("java");b.assurePackageClasspath("core");(0==d.indexOf("org.eclipse.swt")||0==d.indexOf("$wt"))&&b.assurePackageClasspath("org.eclipse.swt");0==d.indexOf("junit")&&b.assurePackageClasspath("junit");b.keepOnLoading=!0;if(!g&&(0!=b.pkgRefCount&&d.lastIndexOf(".package")!=d.length-8||!b.isClassDefined(b.runtimeKeyClass)&&0!=d.indexOf("java.")))h=b.queueBe4KeyClazz,h[h.length]=[d,f];else if(!b.isClassDefined(d)&&!b.isClassExcluded(d)){var k=b.getClasspathFor(d),m=b.loadedScripts[k];
h=b.classQueue;if(!m)for(g=h.length-1;0<=g;g--)if(h[g].path==k||h[g].name==d)m=!0;if(m){if(null!=f&&(m=b.findClass(d),null!=m))if(null==m.optionalsLoaded)m.optionalsLoaded=f;else if(f!=m.optionalsLoaded){var q=m.optionalsLoaded;m.optionalsLoaded=function(){q();f()}}}else{m=null;null!=a.unloadedClasses[d]&&(m=b.findClass(d));null==m&&(m=new c);m.name=d;m.path=k;b.mappingPathNameNode(k,d,m);m.optionalsLoaded=f;m.status=c.STATUS_KNOWN;var s=!1;for(g=h.length-1;0<=g;g--)if(h[g].status!=c.STATUS_OPTIONALS_LOADED){s=
!0;break}if(k.lastIndexOf("package.js")==k.length-10){k=!1;for(g=h.length-1;0<=g;g--){d=h[g].name;if(d.lastIndexOf("package.js")==d.length-10){h[g+1]=m;k=!0;break}h[g+1]=h[g]}k||(h[0]=m)}else s&&(h[h.length]=m);s||(d=!1,null!=f&&(d=b.isLoadingEntryClass,b.isLoadingEntryClass=!0),b.addChildClassNode(b.clazzTreeRoot,m,1),b.loadScript(m.path),null!=f&&(b.isLoadingEntryClass=d))}}else if(null!=f&&b.isClassDefined(d)&&(d=b.findClass(d),null==d||d.status>=c.STATUS_OPTIONALS_LOADED))h?window.setTimeout(f,
25):f()};b.loadJ2SApp=function(c,d,e){if(null!=c){var f=c;"$"==c.charAt(0)&&(f="org.eclipse.s"+c.substring(1));var g=-1;if(-1!=(g=f.indexOf("@")))c=f.substring(g+1),b.setPrimaryFolder(c),f=f.substring(0,g),g=f.lastIndexOf("."),-1!=g&&(g=f.substring(0,g),b.packageClasspath(g,c));if(null==d||!(d instanceof Array))d=[];if(null==e){var h=f,k=d;e=function(){a.evalType(h).main(k)}}else e=e(f,d);b.loadClass(f,e)}};b.loadJUnit=function(c,d){b.loadJ2SApp(c,d,function(c){return function(){b.loadClass("junit.textui.TestRunner",
function(){junit.textui.TestRunner.run(a.evalType(c))})}})};b.runtimeLoaded=function(){if(0==b.pkgRefCount&&b.isClassDefined(b.runtimeKeyClass)){for(var a=b.queueBe4KeyClazz,c=0;c<a.length;c++)b.loadClass(a[c][0],a[c][1]);b.queueBe4KeyClazz=[]}};b.loadZJar=function(a,c){var d=c,e=c instanceof Array;e&&(d=c[c.length-1]);b.jarClasspath(a,e?c:[c]);c==b.runtimeKeyClass?b.loadClass(d,b.runtimeLoaded,!0):b.loadClass(d,null,!0)};b._nodeMap={};b._allNodes=[];b.addChildClassNode=function(a,c,d){var e=!1,f=
null;1==d?(f=a.musts,c.requiredBy||(c.requiredBy=a),a.requires||(a.requires=[],a.requiresMap={}),a.requiresMap[c.name]||(a.requiresMap[c.name]=c,a.requires.push[c])):f=a.optionals;b._nodeMap[c.name]||(b._allNodes.push(c),b._nodeMap[c.name]=c);for(d=0;d<f.length;d++)if(f[d].name==c.name){e=!0;break}if(!e){f[f.length]=c;if(0==c.name.indexOf("org.eclipse.swt")||0==c.name.indexOf("$wt"))window["swt.lazy.loading.callback"]=b.swtLazyLoading,b.assurePackageClasspath("org.eclipse.swt");b.isLoadingEntryClass&&
(0!=c.name.indexOf("java")&&0!=c.name.indexOf("net.sf.j2s.ajax"))&&(b.besidesJavaPackage&&(b.isLoadingEntryClass=!1),b.besidesJavaPackage=!0)}e=!1;for(d=0;d<c.parents.length;d++)if(c.parents[d].name==a.name){e=!0;break}!e&&(null!=a.name&&a!=b.clazzTreeRoot&&a!=c)&&(c.parents[c.parents.length]=a)};b.swtLazyLoading=function(){b.lockQueueBe4SWT=!1;for(var a=b.queueBe4SWT,c=0;c<a.length;c++)b.tryToLoadNext(a[c]);b.queueBe4SWT=[]};b.removeFromArray=function(b,a){if(null==a||null==b)return!1;for(var c=
0,d=0;d<a.length;d++)a[d]!==b&&(c<d&&(a[c]=a[d]),c++);a.length=c;return!1};b.destroyClassNode=function(a){var c=a.parents;if(null!=c)for(var d=0;d<c.length;d++)b.removeFromArray(a,c[d].musts)||b.removeFromArray(a,c[d].optionals)};b.unloadClassExt=function(a){null!=b.definedClasses&&(b.definedClasses[a]=!1);if(null!=b.classpathMap["#"+a]){var d=b.classpathMap["#"+a];b.classpathMap["#"+a]=null;for(var f=b.classpathMap["$"+d],g=!1,h=0;h<f.length;h++)if(f[h]==a){for(g=h;g<f.length-1;g++)f[g]=f[g+1];f.length--;
g=!0;break}g&&(b.classpathMap["$"+d]=f)}d=b.findClass(a);null!=d&&(d.status=c.STATUS_KNOWN,b.loadedScripts[d.path]=!1);d=b.getClasspathFor(a);b.loadedScripts[d]=!1;b.innerLoadedScripts[d]&&(b.innerLoadedScripts[d]=!1);b.classUnloaded(a)};b.assureInnerClass=function(b,c){var d=b.__CLASS_NAME__;if(a.unloadedClasses[d]&&-1==d.indexOf("$")){var e=[],d=d+"$",f;for(f in a.unloadedClasses)null!=a.unloadedClasses[f]&&0==f.indexOf(d)&&(e[e.length]=f);if(0!=e.length&&(e=""+c,f=e.indexOf(d),-1!=f)){var g=e.indexOf('"',
f+d.length);-1!=g&&(d=e.substring(f,g),null!=a.unloadedClasses[d]&&(f=e.indexOf("{",g),-1!=f&&(f++,g=e.indexOf("("+d+",",f+3),-1!=g&&(g=e.lastIndexOf("}",g-1),-1!=g&&(e=e.substring(f,g),eval(e),a.unloadedClasses[d]=null)))))}}};ClassLoader=b})(ClazzLoader,ClazzNode);var g=ClazzLoaderProgressMonitor;g.fadeOutTimer=null;g.fadeAlpha=0;g.monitorEl=null;g.lastScrollTop=0;g.bindingParent=null;g.DEFAULT_OPACITY=55;g.clearChildren=function(a){if(null!=a)for(var c=a.childNodes.length-1;0<=c;c--){var d=a.childNodes[c];
if(null!=d){null!=d.childNodes&&0!=d.childNodes.length&&this.clearChildren(d);try{a.removeChild(d)}catch(g){}}}};g.setAlpha=function(a){null!=this.fadeOutTimer&&a==this.DEFAULT_OPACITY&&(window.clearTimeout(this.fadeOutTimer),this.fadeOutTimer=null);this.fadeAlpha=a;var c=navigator.userAgent.toLowerCase();-1!=c.indexOf("msie")&&-1==c.indexOf("opera")?this.monitorEl.style.filter="Alpha(Opacity="+a+")":this.monitorEl.style.opacity=a/100};g.hiddingOnMouseOver=function(){this.style.display="none"};g.attached=
!1;g.cleanup=function(){var b=ClassLoaderProgressMonitor;null!=b.monitorEl&&(b.monitorEl.onmouseover=null);b.monitorEl=null;b.bindingParent=null;a.removeEvent(window,"unload",b.cleanup);b.attached=!1};g.createHandle=function(){var a=document.createElement("DIV");a.id="clazzloader-status";a.style.cssText="position:absolute;bottom:4px;left:4px;padding:2px 8px;z-index:3333;background-color:#8e0000;color:yellow;font-family:Arial, sans-serif;font-size:10pt;white-space:nowrap;";a.onmouseover=this.hiddingOnMouseOver;
this.monitorEl=a;null==this.bindingParent?document.body.appendChild(a):this.bindingParent.appendChild(a);return a};g.fadeOut=function(){"none"!=this.monitorEl.style.display&&(this.fadeAlpha==this.DEFAULT_OPACITY?(this.fadeOutTimer=window.setTimeout(function(){ClassLoaderProgressMonitor.fadeOut()},750),this.fadeAlpha-=5):0<=this.fadeAlpha-10&&(this.setAlpha(this.fadeAlpha-10),this.fadeOutTimer=window.setTimeout(function(){ClassLoaderProgressMonitor.fadeOut()},40)))};g.getFixedOffsetTop=function(){if(null!=
this.bindingParent){var a=this.bindingParent;return a.scrollTop}var c=navigator.userAgent,a=document.body,d=a.parentNode,g=d.clientHeight,a=a.scrollTop+a.offsetTop,h=d.scrollTop+d.offsetTop;return-1==c.indexOf("Opera")&&document.all?0==g?a:h:-1!=c.indexOf("Gecko")?g==d.offsetHeight&&g==d.scrollHeight?a:h:a};g.initialize=function(b){this.bindingParent=b;null!=b&&!this.attached&&(this.attached=!0,a.addEvent(window,"unload",this.cleanup))};g.showStatus=function(b,c){null==this.monitorEl&&(this.createHandle(),
this.attached||(this.attached=!0,a.addEvent(window,"unload",this.cleanup)));this.clearChildren(this.monitorEl);this.monitorEl.appendChild(document.createTextNode(""+b));"none"==this.monitorEl.style.display&&(this.monitorEl.style.display="");this.setAlpha(this.DEFAULT_OPACITY);var d=this.getFixedOffsetTop();this.lastScrollTop!=d&&(this.lastScrollTop=d,this.monitorEl.style.bottom=this.lastScrollTop+4+"px");c&&this.fadeOut()};null!=window.ClazzLoader&&(ClazzLoader.scriptLoading=function(a){g.showStatus("Loading "+
a+"...")},ClazzLoader.scriptLoaded=function(a){g.showStatus(a+" loaded.",!0)},ClazzLoader.globalLoaded=function(){g.showStatus("Application loaded.",!0)},ClazzLoader.classUnloaded=function(a){g.showStatus("Class "+a+" is unloaded.",!0)},ClazzLoader.classReloaded=function(a){g.showStatus("Class "+a+" is reloaded.",!0)},d=navigator.userAgent.toLowerCase(),-1!=d.indexOf("msie")&&-1==d.indexOf("opera")&&ClazzLoader.setLoadingMode("script",5));var k=a.Console;k.maxTotalLines=1E4;k.setMaxTotalLines=function(a){k.maxTotalLines=
0>=a?999999:a};k.maxLatency=40;k.setMaxLatency=function(a){k.maxLatency=0>=a?40:a};k.pinning=!1;k.enablePinning=function(a){k.pinning=a};k.linesCount=0;k.metLineBreak=!1;k.splitNeedFixed=2!="\n".split(/\n/).length;k.splitIntoLineByR=function(a){for(var c=[],d=0,g=-1;;)if(d=a.indexOf("\r",g+1),-1!=d){if(c[c.length]=a.substring(g+1,d),g=d,g+1==a.length){c[c.length]="";break}}else{c[c.length]=a.substring(g+1);break}return c};k.splitIntoLines=function(a){var c=[];if(null==a)return c;for(var d=0,g=-1;;){var d=
a.indexOf("\n",g+1),h=null;-1!=d?(h=0<d&&"\r"==a.charAt(d-1)?a.substring(g+1,d-1):a.substring(g+1,d),g=d):h=a.substring(g+1);for(var h=k.splitIntoLineByR(h),j=0;j<h.length;j++)c[c.length]=h[j];if(-1==d)break;else if(g+1==a.length){c[c.length]="";break}}return c};k.createConsoleWindow=function(){var a=document.createElement("DIV");a.style.cssText="font-family:monospace, Arial, sans-serif;";document.body.appendChild(a);return a};k.consoleOutput=function(a,c){var d=window["j2s.lib"].console;d&&"string"==
typeof d&&(d=document.getElementById(d));if(null==d)return!1;if(k.linesCount>k.maxTotalLines){for(var g=0;g<k.linesCount-k.maxTotalLines;g++)null!=d&&0<d.childNodes.length&&d.removeChild(d.childNodes[0]);k.linesCount=k.maxTotalLines}var h=!1;a="undefined"==typeof a?"":null==a?"null":""+a;0<a.length&&(g=a.charAt(a.length-1),"\n"==g?(a=1<a.length?"\r"==a.charAt(a.length-2)?a.substring(0,a.length-2):a.substring(0,a.length-1):"",h=!0):"\r"==g&&(a=a.substring(0,a.length-1),h=!0));var j=null;a=a.replace(/\t/g,
k.c160);if(k.splitNeedFixed)try{j=k.splitIntoLines(a)}catch(l){window.popup(l.message)}else j=a.split(/\r\n|\r|\n/g);for(g=0;g<j.length;g++){var p=null;if(k.metLineBreak||0==k.linesCount||1>d.childNodes.length)p=document.createElement("DIV"),d.appendChild(p),p.style.whiteSpace="nowrap",k.linesCount++;else try{p=d.childNodes[d.childNodes.length-1]}catch(u){p=document.createElement("DIV"),d.appendChild(p),p.style.whiteSpace="nowrap",k.linesCount++}var v=document.createElement("SPAN");p.appendChild(v);
v.style.whiteSpace="nowrap";null!=c&&(v.style.color=c);0==j[g].length&&(j[g]=String.fromCharCode(160));v.appendChild(document.createTextNode(j[g]));k.pinning||(d.scrollTop+=100);k.metLineBreak=g!=j.length-1?!0:h}h=d.parentNode.className;!k.pinning&&(null!=h&&-1!=h.indexOf("composite"))&&(d.parentNode.scrollTop=d.parentNode.scrollHeight);k.lastOutputTime=(new Date).getTime()};k.clear=function(){try{k.metLineBreak=!0;var a=window["j2s.lib"].console;if(!(null==a||null==(a=document.getElementById(a)))){for(var c=
a.childNodes,d=c.length-1;0<=d;d--)a.removeChild(c[d]);k.linesCount=0}}catch(g){}};a.alert=function(a){k.consoleOutput(a+"\r\n")};k.c160=String.fromCharCode(160);k.c160+=k.c160+k.c160+k.c160;System.currentTimeMillis=function(){return(new Date).getTime()};System.arraycopy=function(a,c,d,g,h){if(a!=d)for(var j=0;j<h;j++)d[g+j]=a[c+j];else{for(var k=[],j=0;j<h;j++)k[j]=a[c+j];for(j=0;j<h;j++)d[g+j]=k[j]}};System.props=null;System.getProperties=function(){return System.props};System.getProperty=function(a,
c){return null!=System.props?System.props.getProperty(a,c):1==arguments.length?null:null!=c?c:a};System.setProperties=function(a){System.props=a};System.setProperty=function(a,c){null!=System.props&&System.props.setProperty(a,c)};System.out=new JavaObject;System.out.__CLASS_NAME__="java.io.PrintStream";System.out.print=function(a){k.consoleOutput(a)};System.out.println=function(a){k.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};System.err=new JavaObject;System.err.__CLASS_NAME__=
"java.io.PrintStream";System.err.print=function(a){k.consoleOutput(a,"red")};System.err.println=function(a){k.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};System.gc=function(){};System.getSecurityManager=function(){return null};String.prototype.contains=function(a){return 0<=this.indexOf(a)};String.prototype.compareTo=function(a){return this>a?1:this<a?-1:0};a.setConsoleDiv=function(a){window["j2s.lib"].console=a}}(Clazz),ClazzLoader.registerPackages("java","io lang lang.reflect util util.regex util.zip net text".split(" ")),
window.reflect=java.lang.reflect,ClazzLoader.ignore("net.sf.j2s.ajax.HttpRequest java.util.MapEntry.Type java.net.UnknownServiceException java.lang.Runtime java.security.AccessController java.security.PrivilegedExceptionAction java.io.File java.io.FileInputStream java.io.FileWriter java.io.OutputStreamWriter java.util.Calendar java.text.SimpleDateFormat java.text.DateFormat java.util.concurrent.Executors".split(" ")))};
