﻿//Use PIX resizer to resize pictures Thumbnails 104x78 Pics 600x450
function setvariables(selection){
if (selection=="mugshots.html"){
maxpics=8;
cols=5;
piclocation="lbpicsmugshots";
thumblocation="lbthumbmugshots";
cellhalign="center"; //left center right justify
cellvalign="top"; //top middle baseline bottom
//thumbsizex=104;
//thumbsizey=78;
caption="Mugshots Bullsbrook Hash";
}
if (selection=="socialpics.html"){
maxpics=12;
cols=5;
piclocation="lbpicssocial";
thumblocation="lbthumbsocial";
cellhalign="center"; //left center right justify
cellvalign="top"; //top middle baseline bottom
//thumbsizex=104;
//thumbsizey=78;
caption="Bullsbrook Hash turns 32";
}
}
//get current page name to select variables settings
var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);


var varmaxpics; //Number of pics to show
var cols; //Number of columns
var caption;
var cell; //Builds up table details
var piclocation;// location of pics
var thumblocation; // Location of thumbnails
var cellhalign;
var cellvalign;
//var thumbsizex; //Width of thumbnail
//var thumbsizey; //height of thumbnail
setvariables(sPage)
var cc=0;
//top table for header label
var cell="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"center\" width=\"415\" height=\"33\" background=\"images/tab1b.jpg\"><b>"+caption+"</b></td></tr></table>"
//cellspacing gives space between thumbnails
//cellpadding gives white border size
cell+="<table style=\"width: 1px\" cellspacing=\"5\" cellpadding=\"8\" bgcolor=\"#E9E3D5\">";
cell+="<tr>";
for (var i = 1; i <= maxpics; i++) {
cc++
//This overwrites the caption variable set above This can be removed 
//alert(sPage);
if (sPage=="mugshots.html"){
if(i==1)caption="RTT turns 200";
if(i==2)caption="Tis true, Concorde is a prick";
if(i==3)caption="The lads enjoying a moment";
if(i==4)caption="Would you buy a ticket of this man?";
if(i==5)caption="Now this is a BBQ";
if(i==6)caption="Just how old is Diesel?";
if(i==7)caption="FItzall and Goatsbreath share a charge";
if(i==8)caption="Which one is the penis?";
}
if (sPage=="socialpics.html"){
//if(i==1)caption="";
//if(i==2)caption="";
//if(i==3)caption="";
//if(i==4)caption=";
}




cell+="<td bgcolor=\"#ffffff\" align=\""+cellhalign+"\" valign=\""+cellvalign+"\"><a href=\""+piclocation+"/"+i+".jpg\" rel=\"lightbox[roadtrip]\" title=\""+caption+"\"><img src=\""+thumblocation+"/"+i+".jpg\" /></a></td>"
if (cc==cols){
cc=0;
cell+="</tr>";
cell+="<tr>";
}
}
cell+="</tr>";
cell+="<tr>";
cell+="</table>";



