Error Object Expected: ';'

THis code runs fine on my server,
when I upload it I get a Error
Line: 9
Char: 9
Error: Object Expected ';'
Code: 0

I can create the error on my box when I try to preview it on frontpage.
Any suggestions?????

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>JavaScript Image Popup's Done Right</title>
<script language="javascript">

//------- popImg() ---------------------------------------
//-- Input : (iName) - the name of the large image to be shown in the popup
//-- Options : (pInfo) - These are for the base window settings when opened
function popImg(iName) {
var pURL='popup.aspx?pi='+iName;
pInfo+='height=576';, 'bigPop', pInfo);
Click the thumbnail for a larger image.<br>
<a href="javascript:popImg('maria/mv1.jpg');"><img src="images/maria/t1.jpg" border="0" height="100" width="67"></a>

<%@ Page Language="vb" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<%@ Import Namespace="System.Drawing" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script runat=server>
sub page_load

'-- The default text if no querystring is passed.
wPanel.Text = "Requested image does not exist"

'-- first check to see if a querysting is present
If Request.QueryString IS String.Empty Then

'- do nothing
wPanel.Text = getImagePop(Request.QueryString("pi"))
End If
end sub

'-- This grabs the image size from the file information and resizes the window
Function getImagePop(ByVal imageName As String) As String

'-- The StringBuilder class for better string concatenation performance.
Dim iStr As New StringBuilder("")

'-- The image width
Dim iH As Integer = 0

'-- The image height
Dim iW As Integer = 0

'-- The path to your larger images
Dim imagePath As String = "/images/"

'-- check to see if the image exists
If File.Exists(Server.MapPath(imagePath + imageName)) = True Then
Dim ti As System.Drawing.Image = ti.FromFile(Server.MapPath(imagePath + imageName))

'-- Get the height and width and add 0px of padding
iH = ti.Height + 0
iW = ti.Width + 0

'-- Create the image tag and the JavaScript resize code
iStr.Append("<div align=""absolute"">")
iStr.Append("<img src=" + Chr(34) + imagePath + imageName + Chr(34))
iStr.Append(" alt=""Pop Up"" title=""Pop Up"" border=""0""></div>")
iStr.Append("<script language=javascript>" + vbCrLf)
iStr.Append("<!--" + vbCrLf)
iStr.Append("window.resizeTo(" + iW.ToString + "," + iH.ToString + ");" + vbCrLf)
iStr.Append("-->" + vbCrLf)
iStr.Append(Chr(60) + "/script/" + Chr(62) + vbCrLf)
iStr.Append("Whoops... I don't quite know what you were expecting to see here.")
End If

'-- Convert the StringBuilder to a String and return the value.
Return iStr.ToString
End Function


<title>Home Page</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta http-equiv="imagetoolbar" content="no">
<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<asp:literal id="wPanel" Runat="server" EnableViewState="False"></asp:literal>
So it happens in Javascript, not in server side script? What I don't understand is this line:


What "java_script_:" means here?
Well, it maybe the forum replaced it :)

Also you are mixing JScript and VBScript on Server side. The script that runs on server you wrote in VBScript, but for example the last statement (Return Return iStr.ToString) is wrong IMHO. As far as I remember there is no "Return" statement in VBScript, but in JScript.

Also (again as far as I remember) there is no "ToString" method in VBScript. Anything is converted to string automatically (except nasty Null)
---- Edited ----
Omg... when submitted I saw that this is actually ASP.NET. Bummer :) Sorry, discard my posts, I have no idea in syntax of VBScript.NET (using C#)