I'm sorry, I don't understand what you mean with: "You would simply change any reference to this: data[someNum]".
I just don't know what to do. My total code is below. I would like to give titles to the thumnails p1 - p20 and to the images p1 - p20, both in the first script below:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Foto Galerij InspirationCompany</title>
<link href="
rel="stylesheet" type="text/css">
<link href="
rel="stylesheet" type="text/css">
<script src="
type="text/javascript"></script>
<link href="
rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
var preloads=[];
var data=['thumbnails/p1.jpg','thumbnails/p2.jpg','thumbnails/p3.jpg',
'thumbnails/p4.jpg','thumbnails/p5.jpg','thumbnails/p6.jpg',
'thumbnails/p7.jpg','thumbnails/p8.jpg','thumbnails/p9.jpg',
'thumbnails/p10.jpg','thumbnails/p11.jpg','thumbnails/p12.jpg',
'thumbnails/p13.jpg','thumbnails/p14.jpg','thumbnails/p15.jpg',
'thumbnails/p16.jpg','thumbnails/p17.jpg','thumbnails/p18.jpg',
'thumbnails/p19.jpg','thumbnails/p20.jpg'];
var url=['images/p1.jpg','images/p2.jpg','images/p3.jpg',
'images/p4.jpg',
'images/p5.jpg','images/p6.jpg','images/p7.jpg','images/p8.jpg',
'images/p9.jpg','images/p10.jpg','images/p11.jpg','images/p12.jpg',
'images/p13.jpg','images/p14.jpg','images/p15.jpg','images/p16.jpg',
'images/p17.jpg'];
var cellsPerRow=10; // Number Of cells Per Row
var spanLastCell=0; // 0 = no, 1 = yes
var obj,obj1,obj2,obj3;
function preload() {
for(i=0;i<arguments.length;i++) {
preloads[preloads.length]=new Image();
preloads[preloads.length-1].src=arguments
;
}
}
preload('images/p1.jpg','images/p2.jpg','images/p3.jpg','images/p4.jpg');
function createTable() {
obj3=document.getElementById('clicker');
cellsPerRow=cellsPerRow;
if(cellsPerRow>window['data'].length) {
cellsPerRow=window['data'].length;
}
totalCells=window["data"].length;
totalRows=Math.ceil(totalCells/cellsPerRow);
if(spanLastCell==0) {
totalCells=Math.ceil(totalCells);
while(totalCells%cellsPerRow != 0) {
totalCells++;
window["data"][totalCells-1]=[' '];
}
}
startCount=0;
endCount=cellsPerRow;
newTable=document.createElement('table');
newTable.setAttribute('id','thumbtable');
newTBody=document.createElement('tbody');
for(i=0;i<totalRows;i++) {
newRow=document.createElement('tr');
for(j=startCount;j<endCount;j++){
newCell=document.createElement('td');
anc=document.createElement('a')
anc.setAttribute('href',url[j]);
anc.setAttribute('class','pic');
anc.setAttribute('className','pic'); //IE does not accept 'class' for some reason
newImg=document.createElement('img');
newImg.setAttribute('src',data[j]);
newImg.setAttribute('border',0);
anc.appendChild(newImg);
newCell.appendChild(anc);
spanSize=(totalRows*cellsPerRow)-totalCells;
maxCells=totalRows*cellsPerRow;
spanColumns=(maxCells-totalCells)+1;
if(j==totalCells-1) {
newCell.colSpan=spanColumns;
}
newRow.appendChild(newCell);
}
startCount+=cellsPerRow;
endCount+=cellsPerRow;
if(endCount>totalCells){
endCount-=endCount-totalCells;
}
newTBody.appendChild(newRow);
}
newTable.appendChild(newTBody);
document.getElementById('my_table').appendChild(newTable);
links=document.getElementById('my_table').getElementsByTagName('a');
for(c=0;c<links.length;c++) {
links[c].onclick=function() {
obj=document.getElementById('big_pic');
obj1=document.getElementById('img_container');
obj2=document.getElementById('close');
obj.className=';
obj.src=this.href;
obj3.className='show';
if(obj.offsetWidth>obj.offsetHeight) {
obj.className='landscape';
obj1.className=obj2.className='l_right';
}
else {
obj.className='portrait';
obj1.className=obj2.className='show s_right';
}
return false;
}
}
obj3.onclick=function() {
this.className=obj1.className='hide';
}
}
window.onload=createTable;
// -->
</script>
<style type="text/css">
#thumbtable {
border:1px solid #DCDCDC; position: relative; z-index: 112; top: 0px; left: 0px;
}
#thumbtable td{
width:58px;
height:58px;
text-align:center;
border:0 solid;
}
#thumbtable img {
display:block;
width:56px;
height:56px;
margin:1px;
border:1px solid #DCDCDC;
}
a.pic img{
filter:alpha(opacity=60);
opacity:0.7;
}
a.pic:hover img {
filter:alpha(opacity=100);
opacity:1.0;
}
#img_container {position: relative
margin:10px auto;
}
#close {
position:absolute;
text-align:right;
}
#close #clicker {
padding:3px;
border:1px solid #000;
background-color:#fff;
font-family:arial,verdan,hevetica,sans-serif;
font-size:14px;
font-weight:bold;
color:#000;
cursor
ointer;
}
.l_right{
width:310px;
height:20px;
left:3px;
top:13px;
}
.s_right{
width:230px;
height:20px;
left:3px;
top:13px;
}
.hide {
visibility:hidden;
}
.show {
visibility:visible;
}
.portrait {
width:240px;
height:320px;
border:1px double #DCDCDC;
}
.landscape {
width:320px;
height:240px;
border:1px double #DCDCDC;
}
</style>
<script type="text/javascript">
<!--
var w=235;
var h=295;
var l=screen.width-(w+15);
var features2='left='+l+',top=0,width='+w+',height='+h+',resizable=yes';
function pop(url) {
window.open(url,',features2);
}
//-->
</script>
</head>
<body>
<div id="content">
<div id="ex11" style="position: absolute; z-index: 15; top: 10px; height: 400px" >
<div style="position: relative; z-index: 20;">
<h4><a href=" target="_self" class="link7" ; onfocus="this.blur();">Wie zijn wij?</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Inspiratie Trainingen</a> <img src=" width="8" height="1">
<a href=" target="_self" class="link7" ; onfocus="this.blur();">Teambuilding</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Bezielings Trainingen</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Denkworkshops</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Games</a> <img src=" width="8" height="1">
<a href=" target="_self" class="link7" ; onfocus="this.blur();">Communicatie Trainingen</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Belevings-Events</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7a" ; onfocus="this.blur();">Arrangementen</a> <img src=" width="8" height="1"> <a href=" target="_self" class="link7" ; onfocus="this.blur();">Surprise Meetings</a><img src=" width="8" height="1"> <a href="#" onclick="window.open(''resizable=yes,width=220,height=295')" class="link7" onfocus="if(this.blur)this.blur()">Contact</a><br>
</h4>
<h1><a href=" target="_self" class="link1"; onfocus="this.blur();">Foto Galerij</a></h1>
</div>
<div id="logo2" style="position: relative; z-index: 16; top: 0px;">
<div id="logozelf" style="position: relative; z-index: 15; top: -10px; ">
<div id="layertop2" style="position: relative; z-index: 15; top: 5px; ">
<h2></h2>
</div>
<div id="layertext2" style="position: relative; z-index: 15; top: 15px; height: 342px; overflow-x: none; overflow-y: auto; padding-right: 6%;">
<div class="tekst">
<br>
</div>
</div>
<div style="position: relative; z-index: 55; top: -350px; left:65px" ><h2>Essent Inspiration-game 4 oktober 2006</h2>
<div id="my_table"></div>
<div id="img_container" class="hide" style="position: relative; z-index: 56; top: -35px; left: -335px;">
<div id="close"><span id="clicker">X</span></div>
<img id="big_pic" src="" alt=""/><br><br><br><br><br><br><br><br><br>
</div>
</div>
</div>
</div>
<div id="layermenu" style="position: absolute; z-index: 15; top: 125px; left: 5px;">
<a href="essent-2006-10-4.html" target="_self" class="link5" ; onfocus="this.blur();">Essent Inspiration-game (4 oktober)</a>
<br><br><br>
<img src=" border="0" width="53%" alt="inspiratie training" title="">
</div>
<div id="overzicht2" style="position: absolute; z-index: 15; top: 325px;" >
<a href="workshops-events.html" target="_self" class="link3" onfocus="if(this.blur)this.blur()">
Overzicht trainingen en workshops</a><br>
<a href=" target="_blank" class="link4" onfocus="if(this.blur)this.blur()">Cases</a><br>
<a href=" target="_blank" class="link4" onfocus="if(this.blur)this.blur()">Download folder</a><br>
<a href="#" onclick="window.open('e-niewsbriefinschrijving.htm',',
'resizable=yes,width=440,height=295')" class="link4a" onfocus="if(this.blur)this.blur()">Aanmelden voor I-Nieuwsbrief</a><br>
<a href="#" onclick="window.open(''resizable=yes,width=220,height=295')" class="link4a" onfocus="if(this.blur)this.blur()">Contact: 020-776.47.04 of 026-750.24.50</a><br>
<a href=" onclick="pop(this.href); return false" class="link3" onfocus="if(this.blur)this.blur()">Index-zoek-functie</a><br>
</div>
</div>
</div>
<!--LADOT STATS SCRIPTCODE START-->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
// Modification of this code is not allowed and will permanently disable your account!
// Account ID: L3563
// Site URL : // Copyright (C) 2003 Ladotstats.nl All Rights Reserved
function LadotStat_Pageview()
{
var d=document;
var sid="L3563";
var CONTENTSECTION="";
var CUSTOMDATA="";
var osp_URL=d.URL;
var osp_Title=d.title;
var t=new Date();
var p="http"+(document.URL.indexOf('https:')==0?'s':')+"://stats.
ladotstats.nl/stat.aspx?tagver=2&sid="+sid;
p+="&url="+escape(osp_URL);
p+="&ti="+escape(osp_Title);
p+="§ion="+escape(CONTENTSECTION);
p+="&custom="+escape(CUSTOMDATA);
p+="&rf="+escape(parent==self?window.document.referrer:top.document.
referrer);
p+="&tz="+escape(t.getTimezoneOffset());
p+="&ch="+escape(t.getHours());
p+="&js=1";
p+="&ul"+escape(navigator.appName=="Netscape"?navigator.language:
navigator.userLanguage);
if(typeof(screen)=="object"){
p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
}
d.write('<A HREF=" target=_blank><IMG ID="LADOTSTAT_TAG" BORDER="0" SRC="'+p+'" ></A>');
}
LadotStat_Pageview();
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF=" target=_blank>
<IMG BORDER="0" SRC=" >
</A>
</NOSCRIPT>
<!--LADOT STATS SCRIPTCODE END-->
</body>
</html>