function writePicRow(wotSect){
var theSect=wotSect;
var theSectArray=eval("section"+theSect);
var theStarter=1;
var theIncrement=rowSize;
var fullSectNum=eval(theSectArray.length);
var rowNumsFull=(fullSectNum/theIncrement);
var rowNumsMod=(fullSectNum%theIncrement);
var emptyCells=(theIncrement-rowNumsMod);
var rowNums;

document.write('<div align="center"><table border="0" cellspacing="'+outerCellSpace+'" cellpadding="'+outerCellPadd+'">');

if (rowNumsMod>0){
   strNums=""+rowNumsFull;
   len=strNums.length;
   var rowNums=(strNums.substring(0,1));
}
else {rowNums=eval(fullSectNum/theIncrement);}
for (z=0;z<rowNums;z++){
   var theRowSize=eval(theStarter+theIncrement);
   document.write('<tr>');
   for (ctr=theStarter;ctr<theRowSize;ctr++){
     var currentSect=theSectArray[(ctr-1)];

     var whichPic=myUnescape(currentSect[0]);
     var wotPicW=eval(currentSect[1]);
     var wotPicH=eval(currentSect[2]);
     var haveHeading=eval(currentSect[3]);
     var wotHeading=myUnescape(currentSect[4]);
     var isWinCap=eval(currentSect[5]);
     var winCap=myUnescape(currentSect[6]);
     var pageCap=myUnescape(currentSect[7]);
     var isCredit=eval(currentSect[8]);
     var photographer=myUnescape(currentSect[9]);
     var thumbBoxed=eval(currentSect[10]);
     var imageBoxed=eval(currentSect[11]);

     if (haveHeading==0){wotHeading=theTitle;}
     document.write('<td valign="top" class="gallOuterBgndClr">');
     document.write('<table border="0" cellspacing="'+innerCellSpace+'" cellpadding="'+innerCellPadd+'">');
     if (thumbBoxed==0){document.write('<tr><td valign="middle" align="center" class="gallInnerBgndClr">');}
     else{document.write('<tr><td valign="middle" align="center" bgcolor="'+picTableColour+'">');}
     document.write('<a href="javascr'+'ipt:launchFullPic(\''+whichPic+'\','+wotPicW+','+wotPicH+',\''+picPath+'\',\''+wotHeading+'\','+isWinCap+',\''+winCap+'\',\''+pageCap+'\','+isCredit+',\''+photographer+'\',\''+whichPic+'Win\','+imageBoxed+')">');
     document.write('<img src="'+thumbPath+whichPic+'.jpg" alt="" title="" border="0" width="'+thumbW+'" ');
     document.write('height="'+thumbH+'" hspace="0" vspace="0" title="Click to see a bigger version of this pic"><'+'/a>');
     document.write('<'+'/td><'+'/tr>');
     if (isPageCap>0){
       if (isPageCap==2){pageCap=winCap};
       document.write('<tr><td valign="middle" align="center" class="galleryTextLink"><a href="javascr'+'ipt:launchFullPic(\''+whichPic+'\','+wotPicW+','+wotPicH+',\''+picPath+'\',\''+wotHeading+'\','+isWinCap+',\''+winCap+'\',\''+pageCap+'\','+isCredit+',\''+photographer+'\',\''+whichPic+'Win\','+imageBoxed+')" class="galleryTextLink">'+pageCap+'<'+'/a><'+'/td><'+'/tr>');
     }
     document.write('<'+'/table>');
     document.write('<'+'/td>');
   }
   document.write('<'+'/tr>');
   var theStarter=eval(theStarter+theIncrement);
}

if (fullSectNum<rowSize){theRowSize=1};
document.write('<tr>');
for (a=0;a<rowNumsMod;a++){
   for (var ctr=theStarter;ctr<(theRowSize+rowNumsMod);ctr++){
     var currentSect=theSectArray[(ctr-1)];
      
     var whichPic=myUnescape(currentSect[0]);
     var wotPicW=eval(currentSect[1]);
     var wotPicH=eval(currentSect[2]);
     var haveHeading=eval(currentSect[3]);
     var wotHeading=myUnescape(currentSect[4]);
     var isWinCap=eval(currentSect[5]);
     var winCap=myUnescape(currentSect[6]);
     var pageCap=myUnescape(currentSect[7]);
     var isCredit=eval(currentSect[8]);
     var photographer=myUnescape(currentSect[9]);
     var thumbBoxed=eval(currentSect[10]);
     var imageBoxed=eval(currentSect[11]);
      
     if (haveHeading==0){wotHeading=theTitle;}
     document.write('<td valign="top" class="gallOuterBgndClr">');
     document.write('<table border="0" cellspacing="'+innerCellSpace+'" cellpadding="'+innerCellPadd+'">');
     if (thumbBoxed==0){document.write('<tr><td valign="middle" align="center" class="gallInnerBgndClr">');}
     else{document.write('<tr><td valign="middle" align="center" bgcolor="'+picTableColour+'">');}
     document.write('<a href="javascr'+'ipt:launchFullPic(\''+whichPic+'\','+wotPicW+','+wotPicH+',\''+picPath+'\',\''+wotHeading+'\','+isWinCap+',\''+winCap+'\',\''+pageCap+'\','+isCredit+',\''+photographer+'\',\''+whichPic+'Win\','+imageBoxed+')">');
     document.write('<img src="'+thumbPath+whichPic+'.jpg" alt="" border="0" width="'+thumbW+'" ');
     document.write('height="'+thumbH+'" hspace="0" vspace="0" title="Click to see a bigger version of this pic"><'+'/a>');
     document.write('<'+'/td><'+'/tr>');
     if (isPageCap>0){
       if (isPageCap==2){pageCap=winCap};
       document.write('<tr><td valign="middle" align="center" class="galleryTextLink"><a href="javascr'+'ipt:launchFullPic(\''+whichPic+'\','+wotPicW+','+wotPicH+',\''+picPath+'\',\''+wotHeading+'\','+isWinCap+',\''+winCap+'\',\''+pageCap+'\','+isCredit+',\''+photographer+'\',\''+whichPic+'Win\','+imageBoxed+')" class="galleryTextLink">'+pageCap+'<'+'/a><'+'/td><'+'/tr>');
     }
     document.write('<'+'/table>');
     document.write('<'+'/td>');
     var theStarter=eval(theStarter+1);
   }
}
for (zz=0;zz<emptyCells;zz++){document.write('<td><img src="'+imgFolderPath+'spacer.gif" alt="" width="10" height="1" hspace="0" vspace="0"><'+'/td>');}
document.write('<'+'/tr>');
document.write('<'+'/table><'+'/div>');
}

var newwin=null;
var pic = new Image();
function launchFullPic(pic,width,height,path,winTitle,isWinCap,winCap,PageCap,isCredit,photographer,winName,isBoxed) {
  if (isWinCap>0){
    if (navigator.appVersion.lastIndexOf('Mac') != -1) {var winFeatures='width='+(width+10)+',height='+(height+32)+',dependent,left=0,top=0';}
    else {var winFeatures='width='+(width+10)+',height='+(height+40)+',dependent,left=0,top=0';}
  }
  else {var winFeatures='width='+(width+10)+',height='+(height+10)+',dependent,left=0,top=0';}
  newwin=window.open('',winName,winFeatures);
  if(jsvers>1.0){setTimeout('newwin.focus();',250);}
  var doc=newwin.document; 
  doc.open('text/html','replace');
  var sMarkup='<html><head><title>'+winTitle+'<'+'/title><'+'/head>';
  sMarkup+='<style type="text/css"><!--';
  sMarkup+='td {font-family:Arial, Helvetica, sans-serif;font-size:11px;}';
  sMarkup+='td.theCap {background-color:#000000;color:#ffffff;padding-left:4px;}';
  sMarkup+='td.theCredit {background-color:#000000;color:#ffffff;text-align:right;}';
  if (isWinCap=="2"){
    sMarkup+='td.theCap {background-color:#ffffff;color:#000000;padding-left:4px;}';
    sMarkup+='td.theCredit {background-color:#ffffff;color:#000000;text-align:right;}';
  }
  sMarkup+='//--><'+'/style>';
  sMarkup+='<body bgcolor="#'+winBgndColor+'" topmargin="9" leftmargin="0" marginheight="9" marginwidth="0">';
  
  if (isBoxed==1){
    sMarkup+='<div align="center"><table cellspacing="0" cellpadding="1" border="0" bgcolor="#'+winBgndColor+'"><tr><td align="center" valign="middle">';
  }
  else{
    sMarkup+='<div align="center"><table cellspacing="0" cellpadding="1" border="0" bgcolor="#'+winBorderColor+'"><tr><td align="center" valign="middle">';
  }
  sMarkup+='<div align="center"><table cellspacing="0" cellpadding="0" border="0" width="'+width+'"><tr><td align="center" valign="middle" colspan="2">';
  sMarkup+='<img src="'+path+pic+'.jpg" width="'+width+'" height="'+height+'" vspace="0" hspace="0"><'+'/td><'+'/tr>';
  var theColspan=2;
  
  if (isWinCap>0){
    if (isCredit>0){theColspan=1};
    sMarkup+='<tr><td colspan="2"><img src="'+imgFolderPath+'spacer.gif" width="10" height="1" vspace="0"><'+'/td><'+'/tr>';
    sMarkup+='<tr><td colspan="2" class="theCap"><img src="'+imgFolderPath+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
    sMarkup+='<tr><td valign="top" class="theCap" nowrap colspan="'+theColspan+'"';
    if (isCredit==0){sMarkup+=' align="center"';}
    sMarkup+='>&nbsp;'+winCap+'<'+'/td>';
  }
  
  if (isCredit>0){sMarkup+='<td valign="top" class="theCredit" nowrap align="right">Photo: '+photographer+'&nbsp;<'+'/td>';}
  
  sMarkup+='<'+'/tr>';
  if (isWinCap>0){
    sMarkup+='<tr><td colspan="2" class="theCap"><img src="'+imgFolderPath+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
  }
  sMarkup+='<'+'/table><'+'/div>';
  sMarkup+='<'+'/td><'+'/tr><'+'/table><'+'/div>';
  sMarkup+='<'+'/body><'+'/html>';
  doc.write(sMarkup);
  doc.close();
}

