Function for invoking JavaGrins

<SCRIPT LANGUAGE="JavaScript">
var newWindow = null
function makeNewWindow() {
    vers=navigator.appVersion.substr(0,4)
    if ((navigator.appName == "Netscape" ) &&
        (vers != null) && ( vers > 4.01 )) {
        if (navigator.javaEnabled()) {
            newWindow = window.open("","StartingJava",
               "HEIGHT=330,WIDTH=350")
                var newContent="<HTML><HEAD><TITLE>JavaGrins</TITLE></HEAD>"
        newContent += "<BODY>"
        newContent += "<H3>Starting JavaGrins. Please wait.</H3>"
        newContent += "<UL><LI>Use File->GrinsToSmiles to transfer SMILES to document"
        newContent += "<LI>Use File->SmilesToGrins to transfer SMILES from document"
        newContent += "<LI>Use File->Exit or close this window to exit JavaGrins</UL>"
        newContent += "<APPLET CODE=\"NetscapeApplet\" "
        newContent += "CODEBASE=\"/dayhtml/java\""
        newContent += "NAME=\"Grins\""
        newContent += "ARCHIVE=\"/dayhtml/java/grins.jar\" "
        newContent += "ALT=\"There is a Java Applet here."
        newContent += "To view it you need a Java1.1 enabled browser\" "
        newContent += "ALIGN=\"CENTER\" HEIGHT=104  WIDTH=104 MAYSCRIPT NAME=\"Grins\">"
        newContent += "<PARAM NAME=\"ApplicationClass\"
            value=\"daylight.services.AppLoader\">"
        newContent += "<PARAM NAME=\"LiveConnectElement\"
            value=\"smilesForm.smiles\">"
        newContent += "<h4>There is a Java applet here."
        newContent += "To view it you need a Java1.1-enabled browser</h4>"
        newContent += "</APPLET></BODY></HTML>"
        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!")
}
}
</SCRIPT>  
Back to
beginning