var thisField = null
function pasteSmiles(i){
        var rtnStruc = document.qt.smiles.value
        thisField = null
        if (i == 1){thisField = document.qt.Q01}
        if (i == 2){thisField = document.qt.Q02}
        if (i == 3){thisField = document.qt.Q03}
        if (i == 4){thisField = document.qt.Q04}
        if (i == 5){thisField = document.qt.Q05}
        if (i == 6){thisField = document.qt.Q06}
        if (i == 7){thisField = document.qt.Q07}
        if (i == 8){thisField = document.qt.Q08}
        if (i == 9){thisField = document.qt.Q09}
        if (i == 10){thisField = document.qt.Q10}
        if (i == 11){thisField = document.qt.Q11}
        if (i == 12){thisField = document.qt.Q12}
        if (i == 13){thisField = document.qt.Q13}
        if (i == 14){thisField = document.qt.Q14}
        if (i == 15){thisField = document.qt.Q15}
        if (i == 16){thisField = document.qt.Q16}
        if (i == 17){thisField = document.qt.Q17}
        if (i == 18){thisField = document.qt.Q18}
        if (i == 19){thisField = document.qt.Q19}
        if (i == 20){thisField = document.qt.Q20} 
        if (i == 21){thisField = document.qt.Q21}
        if (i == 22){thisField = document.qt.Q22}
        if (i == 23){thisField = document.qt.Q23}
        if (i == 24){thisField = document.qt.Q24}
        if (i == 25){thisField = document.qt.Q25}
        if (i == 26){thisField = document.qt.Q26}
        if (i == 27){thisField = document.qt.Q27}
        if (i == 28){thisField = document.qt.Q28}
        if (i == 29){thisField = document.qt.Q29}
        if (i == 30){thisField = document.qt.Q30}
        thisField.value = rtnStruc
}

var newWindow = null
function makeNewWindow() {
   if ((navigator.appName == "Netscape" ) && ( parseFloat(navigator.appVersion.substr(0,4)) > 4.01 )) {
           if (navigator.javaEnabled()) {
              newWindow = window.open("","StartingJava", "HEIGHT=260,WIDTH=200")
              var newContent="<HTML><HEAD><TITLE>JavaGrins</TITLE></HEAD>\n"
              newContent += "<body BGCOLOR=\"#c0c0c0\" text=\"#000080\" link=\"#000080\"\n"
              newContent +=  "vlink=\"#000080\"><CENTER>\n"
              newContent += "<APPLET CODE=\"NetscapeApplet\" \n"
              newContent += "CODEBASE=\"http://www.daylight.com/dayhtml/java/\"\n"
              newContent += "NAME=\"Grins\"\n"
              newContent += "ARCHIVE=\"grins.jar\" \n"
              newContent += "ALT=\"There is a Java Applet here.\n"
              newContent += "To view it you need a Java1.1 enabled browser\" \n"
              newContent += "ALIGN=\"CENTER\" HEIGHT=104  WIDTH=104 MAYSCRIPT NAME=\"Grins\">\n"
              newContent += "<PARAM NAME=\"ApplicationClass\" value=\"daylight.services.AppLoader\">\n"
              newContent += "<PARAM NAME=\"LiveConnectElement\" value=\"qt.smiles\">\n"
              newContent += "<h4>There is a Java applet here.\n"
              newContent += "To view it you need a Java1.1-enabled browser</h4></APPLET>\n"
              newContent += "<P><B>JavaGrins Loading<BR><BR>Please Read<BR>JavaGrins Instructions<BR>\n"
              newContent += "In Main Document</B></P></CENTER></BODY></HTML>\n"
              newWindow.document.write(newContent)
              newWindow.document.close()
           }
           else {
              alert("You need to enable Java in Netscape to run JavaGrins!");
                }
   }
   else {
      alert("You need Netscape version 4.02 or higher to run JavaGrins!")
        }
}
