I performed some additional searches and came upon some info regarding the pageobject. It appears based on the forum I read that I can call a server side script from a client side script using this object. Given that this is totally new for I would like to know if this the way to go? If so, does matter where my server side script resides?
Here is my code at this point, still not working.
<script language="vbscript" >
sub ImageHits
dim dDate
dim dDate2
dim sSQL
dim iDiff
if instr(1, window.event.srcElement,"divaimg2"

> 0 then
dDate=Mid(window.event.srcElement,instr(1,window.event.srcElement,"20"

,8)
dDate2=mid(dDate,5,2) & "/" & mid(dDate,7,2) & "/" & mid(dDate,1,4)
iDiff = datediff( "d", dDate2, now)
else
iDiff = 721
end if
if iDiff < 31 then
sSQL="update ImageCounts set IC_LEVEL30 = IC_LEVEL30 + 1"
else if idiff < 61 then
sSQL="update ImageCounts set IC_LEVEL60 = IC_LEVEL60 + 1"
else if idiff < 91 then
sSQL="update ImageCounts set IC_LEVEL930 = IC_LEVEL90 + 1"
else if idiff < 181 then
sSQL="update ImageCounts set IC_LEVEL180 = IC_LEVEL180 + 1"
else if idiff < 271 then
sSQL="update ImageCounts set IC_LEVEL270 = IC_LEVEL270 + 1"
else if idiff < 361 then
sSQL="update ImageCounts set IC_LEVEL360 = IC_LEVEL360 + 1"
else if idiff < 541 then
sSQL="update ImageCounts set IC_LEVEL540 = IC_LEVEL540 + 1"
else if idiff < 721 then
sSQL="update ImageCounts set IC_LEVEL720 = IC_LEVEL720 + 1"
else if idiff > 720 then
sSQL="update ImageCounts set IC_LEVEL720PLUS = IC_LEVEL720PLUS + 1"
end if
end if
end if
end if
end if
end if
end if
end if
end if
call result2.execute.testsub( ssql)
end sub
</script>
<script language="vbscript" runat = server>
sub Testsub(sql)
dim CN
Set CN=Server.CreateObject("ADODB.Connection"

CN.Open Application("accpaywf_connectionstring"

CN.Execute sql
CN.Close
set CN = nothing
end sub
</script>
<p> </p>
</body>
</html>