<% // expects to be passed an img field in QueryString with the relative path of the image var notdim = 300 // dimension of block when file not found var widthlim = 650 // limit width of side-by-side image and descrip var bgcolor var imgrelpath,imgpath,fullpath var imgent,caption,filefound,hasinfo var cellcontents,cellclass var dims,w,h,limit // OBSTACLE There are no "decent" examples or docs for how to appropriately use the // "built-in object collections", like QueryString, in Javascript/Jscript. // It is counterintuitive to use // the same parentheses-based syntax as vbscript to retrieve the argument value. // It is totally unexpected that using a index for a non-existant argument causes an error // instead of returning an "undefined" value. (.count must be used to check) imgrelpath = Request.QueryString("img").item bgcolor = GetImgBG(imgrelpath) imgent = GetImgInfo(imgrelpath) imgpath = IMGS_ROOT+imgrelpath fullpath = Server.MapPath(imgpath) hasinfo = imgent.hasinfo caption = imgent.caption if (!caption) caption = imgent.name if (imgent.filestatus==0) filefound = GetFSO().FileExists(fullpath); else filefound = (imgent.filestatus==1); // the include above is done at this point because it contains a vbscript routine that // is imported inside a