1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

var idx = parent.SETUP.document.molecule.structure.selectedIndex var file = parent.SETUP.document.molecule.structure.options[idx].value;

PDBFilNam = "COORDS/" + file + ".pdb";//structure file URL document.write("<BR><EMBED SRC=" + PDBFilNam +
" WIDTH=175 HEIGHT=175 spiny=30 bgcolor=#00006b" +
" startspin=true display3D=ball&stick" +
" script='select elemno=6; colour atom [0,160,0];" +
" select *.Cl; spacefill 135;" +
" select hydrogen; spacefill 90; select *; zoom 140;'>");

Figure 6. JavaScript code for dynamically creating HTML tags in the
Chimeplugin display frame

The HTML for the physicochemical and safety data displays is similarly created by dynamic JavaScript generation from the appropriate JavaScript array elements (Fig.7) and sample display frames are shown in Figures 8 and 9.

<SCRIPT LANGUAGE="JavaScript" SRC="JavaScriptArray.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript">

var idx = parent.SETUP.document.molecule.structure.selectedIndex var selected = parent.SETUP.pointer[idx];

document.write('<BR><FONT COLOR=red><CENTER><B>');
document.write(Mol[selected]['Molname'].toUpperCase() +
'</B></FONT><BR><BR>');
document.write('<FONT COLOR=#00008B>');

if(option == "physical") {

document.write('Melting Point : ' + Mol[selected].mp + '<BR>');
document.write('Boiling Point : ' + Mol[selected].bp + '<BR>');
document.write('Refractive Index : ' + Mol[selected].ri + '<BR>');
document.write('Rotation : ' + Mol[selected].alpha_d + '<BR>');
document.write('Molecular Weight : ' + Mol[selected].mw + '<BR>'); }

if(option == "safety") {

for ( ii = 0; ii <= 3; ii++) {
var id = "safety" + ii;
document.write('\n' + Mol[selected][id] + '<BR>');
}
}
document.write('</FONT></CENTER>');

</SCRIPT>

Figure 7. JavaScript code for dynamically creating HTML tags of
text display of physicochemical properties.