I wasn't sure where to post this, but the main topic is classic asp.

I was wondering if there was a way to use classic asp in conjunction with a jscript for arrays. I'm pulling data from sql using classic asp. I want to create script array from data(image1,image2...) and perform on mouse out and on mouse over using this asp code. Is this possible? So far I have :

<%

if rs("image2") <> "" then

%>

<script type="text/javascript">
var imgArray = new Array(
imgArray[0] = <%= rs("image2").Value %>;
imgArray[1] = <%= rs("image3").Value %>;
imgArray[2] = <%= rs("image4").Value%>;
imgArray[3] = <%= rs("image5").Value %>;
imgArray[4] = <%= rs("image6").Value %>;
imgArray[5] = <%= rs("image7").Value%>;
imgArray[6] = <%= rs("image8").Value%>;
imgArray[7] = <%= rs("image9").Value%>;
imgArray[8] = <%= rs("image10").Value%>;
);

var imgPath = "media/images/";

function swapImage(imgID) {
var theImage = document.getElementById('theImage');
var newImg;
newImg = imgArray[imgID];
theImage.src = imgPath + newImg;
}

function preloadImages() {
for(var i = 0; i < imgArray.length; i++) {
var tmpImg = new Image;
tmpImg.src = imgPath + imgArray[i];
}
}
</script>

<% end if%>

Is this the correct way in setting up an array using asp and jscript?

<img src="media/images/<%= rs("image9")%>" onmouseover="swapImage(7)" onmouseout="swapImage(0)"></td>

All the rs("image") Images show up but no roll over.
Thanks in advance
Steve