// bigPics.js - enlargments popup window generator
// DO NOT EDIT THESE varS. CHANGE/ADD IMAGES AND CAPTIONS IN THE NEXT SECTION
var images = [];
var imageFilenames = [];
var captions = [];
var picsFolder = "img";
var enLargedPicsFolder = "enLarged";
var enXLargedPicsFolder = "enXLarged";

// --------------------------  DO NOT EDIT ABOVE THIS LINE  --------------------------
//                      SET YOUR IMAGE FILENAMES AND CAPTIONS BELOW                   
// Follow the pattern of the following lines:
// imageFilenames[imageFilenames.length] =  "your_filename_here.jpg"; 
// captions[captions.length] = "your caption text"; 
// NOTE that there is enough room for one <br> per caption (2 lines).
// NOTE <br> is the symbol for a line break; use in long captions that won't fit on one line.
// NOTE one SPACE is made with the combination of letters and punctutation EXACTLY as follows: &nbsp;
// NOTE single spaces do not need special symbol, but to make extra spaces, must use &nbsp;
// NOTE should be 3 spaces between title & location; 4 spaces between location & date.

// --------------------------  DO NOT EDIT ABOVE THIS LINE  --------------------------

//imageFilenames[imageFilenames.length] = "costa1.jpg";
//captions[captions.length] = "jefe. &nbsp; costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa1.jpg";
captions[captions.length] = "jefe. &nbsp; costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa2.jpg";
captions[captions.length] = "costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa6.jpg";
captions[captions.length] = "costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa3.jpg";
captions[captions.length] = "costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa7.jpg";
captions[captions.length] = "stak. &nbsp; costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "costa4.jpg";
captions[captions.length] = "costa rica &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "surf6.jpg";
captions[captions.length] = "apalachicola, florida &nbsp;&nbsp; 2009";

imageFilenames[imageFilenames.length] = "surf7.jpg";
captions[captions.length] = "cannon beach, oregon &nbsp;&nbsp; 2009";

imageFilenames[imageFilenames.length] = "surf8.jpg";
captions[captions.length] = "cannon beach, oregon &nbsp;&nbsp; 2009";

imageFilenames[imageFilenames.length] = "newz2.jpg";
captions[captions.length] = "kare kare beach. &nbsp;&nbsp; auckland, new zealand &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "newz5.jpg";
captions[captions.length] = "kare kare beach. &nbsp;&nbsp; auckland, new zealand &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "nzew4.jpg";
captions[captions.length] = "kare kare beach. &nbsp;&nbsp; auckland, new zealand &nbsp;&nbsp; 2008";

imageFilenames[imageFilenames.length] = "surf01.jpg";
captions[captions.length] = "san diego, california &nbsp;&nbsp; 2009";

imageFilenames[imageFilenames.length] = "san6.jpg";
captions[captions.length] = "san diego, california &nbsp;&nbsp; 2007";

imageFilenames[imageFilenames.length] = "surf2.jpg";
captions[captions.length] = "san diego, california &nbsp;&nbsp; 2009";

imageFilenames[imageFilenames.length] = "surf1.jpg";
captions[captions.length] = "two dudes. &nbsp;  san diego, california &nbsp;&nbsp; 2007";



// -----------------  DO NOT EDIT BELOW THIS LINE  --------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// **************************************************************************
// **************************************************************************
// ************* SET YOUR IMAGE FILENAMES AND CAPTIONS ABOVE ****************
// **************************************************************************
// **************************************************************************
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// -----------------  DO NOT EDIT BELOW THIS LINE  --------------------------
//
//
//
//
//
//
function makeTDs() {
	for(var g = 0 ; g < imageFilenames.length ; g++) { 
		images[g] = new Image();
		images[g].src = picsFolder + "/" + imageFilenames[g];
		var gTD = "<td><div class=\"glass\" onclick=\"enlg(" + g + ")\"></div><img id=\"i" + g + "\" src=\"" + images[g].src + "\" class=\"bdr\" alt=\"\" /></td>";
		document.writeln(gTD);
	}
}


var bWin;
var bImgSrc = [];
var imgNum;
var imgName;
var imgPathStr;

function enlg(x) {
	imgNum = x;
	if (screen.height > 900) {
		imgPathStr = picsFolder + "/" + enXLargedPicsFolder;
		bImgSrc[x] = images[x].src.replace(/img\//, imgPathStr);
		bWin = window.open("enlarge.html", "nlgWin", "width=980,height=910,status=no,location=no,resizable=no", false); 
	}
	else {
		imgPathStr = picsFolder + "/" + enLargedPicsFolder;
		bImgSrc[x] = images[x].src.replace(/img\//, imgPathStr);
		bWin = window.open("enlarge.html", "nlgWin", "width=980,height=660,status=no,location=no,resizable=no", false); 
	}
	bWin.focus();
}
