function photo_obj(pic,thumb,caption,width,height)    {    this.pic=pic;    this.thumb=thumb;    this.caption=caption;    this.width=width;    this.height=height;   }//The next thing I do is create an array of the photo objects and fill it up with the info.galleryPhotos= new Array();galleryPhotos[0]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[1]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/hyped.jpg','http://ursart.com/other/mHornsby/images/gallery/hyped_sm.jpg','Hyped','400','304');galleryPhotos[2]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/baldieProfile.jpg','http://ursart.com/other/mHornsby/images/gallery/baldieProfile_sm.jpg','Baldie Profile','293','450');galleryPhotos[3]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/beiraDugout.jpg','http://ursart.com/other/mHornsby/images/gallery/beiraDugout_sm.jpg','Beira Dugout','197','450');galleryPhotos[4]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/bigBend.jpg','http://ursart.com/other/mHornsby/images/gallery/bigBend_sm.jpg','Big Bend','302','450');galleryPhotos[5]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/cdArticle.jpg','http://ursart.com/other/mHornsby/images/gallery/cdArticle_sm.jpg','CD Article','264','450');galleryPhotos[6]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/hot7.jpg','http://ursart.com/other/mHornsby/images/gallery/hot7_sm.jpg','15 Minutes Songwriter\'s Series','400','185');galleryPhotos[7]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/hugh.jpg','http://ursart.com/other/mHornsby/images/gallery/hugh_sm.jpg','Hugh','207','450');galleryPhotos[8]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/massRoad.jpg','http://ursart.com/other/mHornsby/images/gallery/massRoad_sm.jpg','Africa Bar Flyer','296','450');galleryPhotos[9]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/mikeAndRaoulBW.jpg','http://ursart.com/other/mHornsby/images/gallery/mikeAndRaoulBW_sm.jpg','Africa Bar Flyer','312','450');galleryPhotos[10]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/oceannaStreet.jpg','http://ursart.com/other/mHornsby/images/gallery/oceannaStreet_sm.jpg','Africa Bar Flyer','353','450');galleryPhotos[11]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/pescadores.jpg','http://ursart.com/other/mHornsby/images/gallery/pescadores_sm.jpg','Pescadores','291','450');galleryPhotos[12]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/skyTree.jpg','http://ursart.com/other/mHornsby/images/gallery/skyTree_sm.jpg','Sky Tree','400','262');galleryPhotos[13]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[14]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[15]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[16]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[17]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[18]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[19]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[20]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[21]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[22]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[23]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[24]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[25]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[26]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[27]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[28]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[29]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[30]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[31]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');galleryPhotos[32]= new photo_obj('http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer.jpg','http://ursart.com/other/mHornsby/images/gallery/africaBarFlyer_sm.jpg','Africa Bar Flyer','400','236');//Now we have to turn our array into actual HTML. To do that you can create a function that spits out table information.function make_page(pic_obj) {tableTop='<TABLE cellspacing=0 cellpadding=3 border=1 bordercolor=white>';tableBottom='</tr></TABLE>';tablebody='';mybg="#99ccff";for (var n = 0 ; n <=(pic_obj.length-1) ; n++) {myind=pic_obj.length-n-1    if (!(n%4)) {        tablebody +='<TR>'        }   tablebody+='<TD valign=top bgcolor="25326B" align=center><A href="javascript:pager(\''+ pic_obj[myind].pic + '\',\'' + pic_obj[myind].width + '\',\''+ pic_obj[myind].height + '\')"><IMG src="'+%20pic_obj%5bmyind%5d.thumb%20+%20'"  border=0><BR>'+ pic_obj[myind].caption + '</A></TD>\n';if (!((n+1)%4)) {    tablebody +='</TR>'    }}alltable= tableTop+tablebody+tableBottom;document.myAlbum.InnerHtml=alltable;  //assuming IE  --change for others or create a function  }//This created a variable named alltable that we can use to write the table. //I also have a small script that is called when the object is selected that pops up the image in new window. Here it is:var popup = null;function pager(pic,wide,high){popup = window.open(pic,'pic','scrollbars,resizable,width='+wide+',height='+high);}function destroyPop() {        if (popup != null && popup.open) popup.close();}window.onfocus=destroyPop; //destroys popup on refocus the window//All the above javascript can sit in one javascript tag in the head of your html page.