undefinedundefinedundefined
I am an intern with the task of writting an interface for a hardware database.
I have to take some code my supervisor wrote and try to output it in HTML, but in a way that it can be edited after it is output. Here is the code. My problem is getting the html to recognize the vbscript procedure. Is it a good idea to make it a procedure?

Does any have any suggestions? I need help bad.
<HTML>
<BODY>
<HEAD>
<TITLE>onemore</TITLE>
<script language="vbscript">
Sub_cmdButton onClick()
Dim Name As String
Dim Model As String
Model = strmsg & "Model: " & objItem.Model CRLF
Name = strmsg & "Name: " & objItem.Name
'strComputer = "."
strComputer = InputBox("Please enter the name of the computer[insert a period '.']
for the current machine")
If strComputer = "" Then
wscript (0)
End If
Set objWMIService = GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'Win32_ComputerSystem
Set colItems = objWMIService.ExecQuery('Select * from
Win32_ComputerSystem",,48)
For Each ObjItem in colItems
Memformat = Cint(objItem.TotalPhysicalMemory/1000000)
</script>
</HEAD>
<BODY onload = "cmdButton()">
<script langauge = "javascript">
document.write(Name)
document.write(Model)
</scrip>
</BODY>
</HTML>