/***************************************************************************
* Create a photo object                                                    *
***************************************************************************/
function photo(id, galleries_id, photo_ref, section_code, src, width, height, caption, thumbnail, thumbnail_width, thumbnail_height, home, gallery, description, takendate, photographer, location, item_price, purchase_instruction) {
	this.id = id;
	this.galleries_id = galleries_id;
	this.photo_ref = photo_ref;
	this.section_code = section_code;
	this.src = src;
	this.width = width;
	this.height = height;
	this.caption = caption;
	this.thumbnail = thumbnail;
	this.thumbnail_width = thumbnail_width;
	this.thumbnail_height = thumbnail_height;
	this.home = home;
	this.gallery = gallery;
	this.description = description;
	this.takendate = takendate;
	this.photographer = photographer;
	this.location = location;
	this.item_price = item_price;
	this.purchase_instruction = purchase_instruction;
}
/***************************************************************************
* Create a gallery object                                                  *
***************************************************************************/

function gallery(id,featured_images,title,section_code) {
	this.id = id;
	this.featured_images = featured_images;
	this.title = title;
	this.section_code = section_code;}

/***************************************************************************
* Select a random value from a comma separated list                        *
***************************************************************************/
function randomListVal(list) {
	arrayVals = list.split(',');
	pos = Math.round(Math.random() * (arrayVals.length - 1));
	debug('Returning ' + arrayVals[pos] + ' as random image');
	return arrayVals[pos];
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('3568244,3568242,3568240,3568239,3568238,2304659,2304651,2304650,2296659,2296648,2296631,2296622,2296376,2296112,2296107,2291799,2291637,2291632,2291621,2291613,2291608');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if (!basic) {
			img.src = photos[j].src;
			img.width = photos[j].width;
			img.height = photos[j].height;
			}
			else {
				newImage = new Image(photos[j].width,photos[j].height);
				newImage.src = photos[j].src;
				document.images[img.name] = newImage;
				debug(newImage.src);
			}
			break;
		}
	}
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline() {
	
	imageID = randomListVal('3568244,3568242,3568240,3568239,3568238,2304659,2304651,2304650,2296659,2296648,2296631,2296622,2296376,2296112,2296107,2291799,2291637,2291632,2291621,2291613,2291608');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !((0) || (0))) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'Tim Hensel: ' + photos[nextImg].caption;
										/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
						if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
						if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(2291802,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel17_me_1.JPG',475,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel17_me_1_thumb.JPG',130, 164,0, 0,'','','','','','');
photos[1] = new photo(2291805,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel18_me_2.JPG',492,492,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel18_me_2_thumb.JPG',130, 130,0, 0,'','','','','','');
photos[2] = new photo(2304431,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck_smal.jpg',300,202,'Suck: 29m x 18m, on Urbis, Manchester.','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck_smal_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[3] = new photo(2305571,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel17_me_1_smaller.jpg',317,400,'Self Portrait, June 2008','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel17_me_1_smaller_thumb.jpg',130, 164,0, 0,'','','','','','');
photos[4] = new photo(2296648,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Ella.jpg',470,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Ella_thumb.jpg',130, 166,1, 1,'','','','','','');
photos[5] = new photo(2297191,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Joe.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Joe_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[6] = new photo(2304661,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Blow1.jpg',600,404,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Blow1_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[7] = new photo(2297192,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Watk_1.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Watk_1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[8] = new photo(2304663,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck1.jpg',600,404,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck1_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[9] = new photo(2297190,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Arent.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Arent_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[10] = new photo(2297200,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_5.jpg',600,463,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_5_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[11] = new photo(2297198,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_4.jpg',600,461,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_4_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[12] = new photo(2297197,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_3.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_3_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[13] = new photo(2297195,'','','','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_2.jpg',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Wed_2_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[14] = new photo(2291621,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel04.JPG',492,515,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel04_thumb.JPG',130, 136,1, 1,'','','','','','');
photos[15] = new photo(2291799,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel14.JPG',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel14_thumb.JPG',130, 87,1, 0,'','','','','','');
photos[16] = new photo(2291632,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel09.JPG',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel09_thumb.JPG',130, 195,1, 0,'','','','','','');
photos[17] = new photo(2291637,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel10.JPG',492,492,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel10_thumb.JPG',130, 130,1, 0,'','','','','','');
photos[18] = new photo(2291627,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel08.JPG',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel08_thumb.JPG',130, 195,0, 0,'','','','','','');
photos[19] = new photo(2291613,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel16_idiot.JPG',428,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel16_idiot_thumb.JPG',130, 182,1, 0,'','','','','','');
photos[20] = new photo(2291608,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel01_dancer_b&w.jpg',492,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel01_dancer_b&w_thumb.jpg',130, 159,1, 0,'','','','','','');
photos[21] = new photo(2304650,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_2.jpg',600,377,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_2_thumb.jpg',130, 82,1, 0,'','','','','','');
photos[22] = new photo(2304651,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_3.jpg',600,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_3_thumb.jpg',130, 130,1, 1,'','','','','','');
photos[23] = new photo(2304649,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_1.jpg',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_1_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[24] = new photo(2304659,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_grid_21.jpg',600,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_grid_21_thumb.jpg',130, 130,1, 0,'','','','','','');
photos[25] = new photo(2304645,'148602','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_grid_3.jpg',600,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_grid_3_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[26] = new photo(2296622,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Crosby.jpg',211,600,'.','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Crosby_thumb.jpg',130, 370,1, 0,'36\"x12\" Photograph<br>\r\nLimited Edition Print','','','','','');
photos[27] = new photo(3568244,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/LOR-4853.jpg',600,323,'.','http://admin2.clikpic.com/timhenselart/images/LOR-4853_thumb.jpg',130, 70,1, 0,'30\"x16\" Photograph, mounted on foamcore board<br>\r\nLimited Edition Print','','','','','');
photos[28] = new photo(3568240,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/LOR-4811-16x12-fg2-print.jpg',600,450,'','http://admin2.clikpic.com/timhenselart/images/LOR-4811-16x12-fg2-print_thumb.jpg',130, 98,1, 0,'','','','','','');
photos[29] = new photo(3568239,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/LOR-4798-10x8-print.jpg',480,600,'','http://admin2.clikpic.com/timhenselart/images/LOR-4798-10x8-print_thumb.jpg',130, 163,1, 0,'','','','','','');
photos[30] = new photo(2296631,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Torrs_1.jpg',600,450,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Torrs_1_thumb.jpg',130, 98,1, 1,'','','','','','');
photos[31] = new photo(2296659,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_5.jpg',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_5_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[32] = new photo(2296655,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_2.jpg',412,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_2_thumb.jpg',130, 189,0, 0,'','','','','','');
photos[33] = new photo(2296656,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_3.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Port_Maroc_3_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[34] = new photo(2296629,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Moroc_1.jpg',600,411,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Moroc_1_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[35] = new photo(2297238,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Scot_1.jpg',600,281,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Scot_1_thumb.jpg',130, 61,0, 0,'','','','','','');
photos[36] = new photo(2296376,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Blueb.jpg',600,424,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Blueb_thumb.jpg',130, 92,1, 0,'','','','','','');
photos[37] = new photo(2304656,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_6.jpg',600,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Plant_6_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[38] = new photo(2297184,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_5.jpg',400,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_5_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[39] = new photo(2297181,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_3.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_3_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[40] = new photo(2297183,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_4.jpg',600,497,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_4_thumb.jpg',130, 108,0, 0,'','','','','','');
photos[41] = new photo(2296618,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats.jpg',600,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Land_Boats_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[42] = new photo(3568238,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/IMG_2626-edit.jpg',600,400,'','http://admin2.clikpic.com/timhenselart/images/IMG_2626-edit_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[43] = new photo(3568245,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/LOR-9073-10x8-print.jpg',600,480,'','http://admin2.clikpic.com/timhenselart/images/LOR-9073-10x8-print_thumb.jpg',130, 104,0, 0,'','','','','','');
photos[44] = new photo(3568242,'152165','','gallery','http://admin2.clikpic.com/timhenselart/images/LOR-4834-10x8-Print.jpg',480,600,'','http://admin2.clikpic.com/timhenselart/images/LOR-4834-10x8-Print_thumb.jpg',130, 163,1, 0,'','','','','','');
photos[45] = new photo(2296112,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck.jpg',600,404,'Suck','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Suck_thumb.jpg',130, 88,1, 1,'','','','','','');
photos[46] = new photo(2296107,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Blow.jpg',600,404,'Blow','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Diesel_Blow_thumb.jpg',130, 88,1, 0,'','','','','','');
photos[47] = new photo(2317847,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis01.JPG',600,414,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis01_thumb.JPG',130, 90,0, 0,'','','','','','');
photos[48] = new photo(2317912,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis02.JPG',600,404,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis02_thumb.JPG',130, 88,0, 0,'','','','','','');
photos[49] = new photo(2317913,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis04.JPG',402,600,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis04_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[50] = new photo(2317914,'150306','','gallery','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis05.JPG',600,385,'','http://admin2.clikpic.com/timhenselart/images/Tim_Hensel_Urbis05_thumb.JPG',130, 83,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(148602,'2304651,2291621','Organic forms','gallery');
galleries[1] = new gallery(152165,'2296631','Landscapes','gallery');
galleries[2] = new gallery(150306,'2296112','Diesel Wall 2008','gallery');

