/***************************************************************************
* 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('2645532,2645531,2645206,2645204,2645202,2645201,2645182,2645181,2645180,2645178,2070059,2070056,2070054,2070052,2070049,2070048,2070047,2070045,2070044,2070040,2070038,2070035,2069114,2069112,2069105,2069094,2069092,2069087,2069086,2069085,2069081,2069063,2069062,2069060,2049381,2049378,2049377,2049375,2049373,2049371,2049327,2049326,2049325,2049324,2049323,2049322,2049320,2049319,2049318,2049317');
	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('2645532,2645531,2645206,2645204,2645202,2645201,2645182,2645181,2645180,2645178,2070059,2070056,2070054,2070052,2070049,2070048,2070047,2070045,2070044,2070040,2070038,2070035,2069114,2069112,2069105,2069094,2069092,2069087,2069086,2069085,2069081,2069063,2069062,2069060,2049381,2049378,2049377,2049375,2049373,2049371,2049327,2049326,2049325,2049324,2049323,2049322,2049320,2049319,2049318,2049317');
	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)) {
		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 + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			document.title = 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(2070035,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/a_website_photography_alarm.jpg',600,450,'Alarm Clock','http://www2.clikpic.com/fullerpicture/images/a_website_photography_alarm_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[1] = new photo(2070038,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/b_website_photography_ calc.jpg',600,450,'Calculator','http://www2.clikpic.com/fullerpicture/images/b_website_photography_ calc_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[2] = new photo(2070040,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/c_website_photography_ tide.jpg',600,450,'Tide Clock','http://www2.clikpic.com/fullerpicture/images/c_website_photography_ tide_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[3] = new photo(2070044,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/d_website_photography_ radio.jpg',600,450,'Radio','http://www2.clikpic.com/fullerpicture/images/d_website_photography_ radio_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[4] = new photo(2070045,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/e_website_photography_ frame.jpg',600,450,'Photo Frame','http://www2.clikpic.com/fullerpicture/images/e_website_photography_ frame_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[5] = new photo(2070047,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/f_website_photography_hooks.jpg',600,450,'Coat Hooks','http://www2.clikpic.com/fullerpicture/images/f_website_photography_hooks_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[6] = new photo(2070048,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/g_website_photography_tool.jpg',600,450,'Multitool','http://www2.clikpic.com/fullerpicture/images/g_website_photography_tool_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[7] = new photo(2070049,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/h_website_photography_ corkscrew.jpg',600,450,'Corkscrew','http://www2.clikpic.com/fullerpicture/images/h_website_photography_ corkscrew_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[8] = new photo(2070052,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/i_website_photography_trail.jpg',600,450,'Cycle Repair Kit','http://www2.clikpic.com/fullerpicture/images/i_website_photography_trail_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[9] = new photo(2070054,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/j_website_photography_ passport.jpg',600,450,'Passport Cover','http://www2.clikpic.com/fullerpicture/images/j_website_photography_ passport_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[10] = new photo(2070056,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/k_website_photography_ knife.jpg',600,450,'Pruning Knife','http://www2.clikpic.com/fullerpicture/images/k_website_photography_ knife_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[11] = new photo(2070059,'133808','','gallery','http://www2.clikpic.com/fullerpicture/images/l_website_photography_ opener.jpg',600,450,'Keyring Bottle Opener','http://www2.clikpic.com/fullerpicture/images/l_website_photography_ opener_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[12] = new photo(2045714,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product__hook_rail_red.jpg',600,450,'Retro Coat Hooks','http://www2.clikpic.com/fullerpicture/images/product__hook_rail_red_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[13] = new photo(2049314,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/photo_barometer_therm.jpg',600,450,'Thermometer & Barometer','http://www2.clikpic.com/fullerpicture/images/photo_barometer_therm_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[14] = new photo(2049317,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_basket_metal.jpg',600,450,'Wire Egg Basket','http://www2.clikpic.com/fullerpicture/images/product_photo_basket_metal_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[15] = new photo(2049318,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_basket_cakes.jpg',600,450,'Breakfast Basket','http://www2.clikpic.com/fullerpicture/images/product_photo_basket_cakes_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[16] = new photo(2049319,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_boxes_choc.jpg',600,450,'Wooden Boxes','http://www2.clikpic.com/fullerpicture/images/product_photo_boxes_choc_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[17] = new photo(2049320,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_brush_wooden.jpg',600,450,'Hearth Brush','http://www2.clikpic.com/fullerpicture/images/product_photo_brush_wooden_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[18] = new photo(2049322,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_bunting_flora.jpg',600,450,'Floral Bunting','http://www2.clikpic.com/fullerpicture/images/product_photo_bunting_flora_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[19] = new photo(2049323,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_glass_t_light.jpg',600,450,'Glass Bell Votive','http://www2.clikpic.com/fullerpicture/images/product_photo_glass_t_light_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[20] = new photo(2049324,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_hooks_choc.jpg',600,450,'Chocolat Au Lait Hooks','http://www2.clikpic.com/fullerpicture/images/product_photo_hooks_choc_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[21] = new photo(2049325,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_metal_dustpan.jpg',600,450,'Metal Dustpan','http://www2.clikpic.com/fullerpicture/images/product_photo_metal_dustpan_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[22] = new photo(2049326,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_sweet_pea_tin.jpg',600,450,'Seed Tin','http://www2.clikpic.com/fullerpicture/images/product_photo_sweet_pea_tin_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[23] = new photo(2049327,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_tealight.jpg',600,450,'Moroccan Tea Glasses','http://www2.clikpic.com/fullerpicture/images/product_photo_tealight_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[24] = new photo(2645178,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/canvas_print_product_photo.jpg',600,450,'Stretched Canvas Print','http://www2.clikpic.com/fullerpicture/images/canvas_print_product_photo_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[25] = new photo(2645206,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/rolled_print_product_photo.jpg',600,450,'Large Rolled Paper Print','http://www2.clikpic.com/fullerpicture/images/rolled_print_product_photo_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[26] = new photo(2645531,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/frame_joinery_product_photo.jpg',600,450,'Canvas Frame Joinery','http://www2.clikpic.com/fullerpicture/images/frame_joinery_product_photo_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[27] = new photo(2645532,'136712','','gallery','http://www2.clikpic.com/fullerpicture/images/gift_voucher_photograph.jpg',600,450,'Gift Voucher Card','http://www2.clikpic.com/fullerpicture/images/gift_voucher_photograph_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[28] = new photo(2049371,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_tin_1.jpg',600,450,'London Bus Money Box','http://www2.clikpic.com/fullerpicture/images/packaging_tin_1_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[29] = new photo(2049373,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_tin_3.jpg',600,450,'English Breakfast Tea','http://www2.clikpic.com/fullerpicture/images/packaging_tin_3_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[30] = new photo(2049375,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_teapot_tin_blue.jpg',600,450,'Mini Teapot Set Blue','http://www2.clikpic.com/fullerpicture/images/packaging_teapot_tin_blue_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[31] = new photo(2049378,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_jar_marmalade.jpg',600,450,'Breakfast Marmalade','http://www2.clikpic.com/fullerpicture/images/packaging_jar_marmalade_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[32] = new photo(2049381,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_strawberry.jpg',600,450,'Tea Time Selection','http://www2.clikpic.com/fullerpicture/images/packaging_strawberry_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[33] = new photo(2049377,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_group.jpg',600,450,'Mixed Group','http://www2.clikpic.com/fullerpicture/images/packaging_group_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[34] = new photo(2645181,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_bag_in_box_photo.jpg',600,450,'\"Bag in Box\" Coffee Containers','http://www2.clikpic.com/fullerpicture/images/packaging_bag_in_box_photo_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[35] = new photo(2645202,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photo_bag_in_box.jpg',600,450,'Cut out of \"Bag in Box\"','http://www2.clikpic.com/fullerpicture/images/product_photo_bag_in_box_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[36] = new photo(2645182,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_photography_box.jpg',600,450,'Metallic Carton & Bags','http://www2.clikpic.com/fullerpicture/images/packaging_photography_box_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[37] = new photo(2645180,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/pack_shot_bag_in_box.jpg',600,450,'\"Bag in Box\" Oil Dispenser','http://www2.clikpic.com/fullerpicture/images/pack_shot_bag_in_box_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[38] = new photo(2645204,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/product_photography_bags.jpg',600,450,'Metallic & transparent bags','http://www2.clikpic.com/fullerpicture/images/product_photography_bags_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[39] = new photo(2645201,'133814','','gallery','http://www2.clikpic.com/fullerpicture/images/packaging_rolled_print_tube.jpg',600,450,'Cardboard Tube Packaging','http://www2.clikpic.com/fullerpicture/images/packaging_rolled_print_tube_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[40] = new photo(2069060,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/01_product_photography_button.jpg',600,450,'Coat & Buttons','http://www2.clikpic.com/fullerpicture/images/01_product_photography_button_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[41] = new photo(2069062,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/02_product_photo_camel.jpg',600,450,'Camel Jacket & Stitching','http://www2.clikpic.com/fullerpicture/images/02_product_photo_camel_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[42] = new photo(2069063,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/03_product_photo_shirts.jpg',600,450,'Camel Shirts Collar & Colour','http://www2.clikpic.com/fullerpicture/images/03_product_photo_shirts_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[43] = new photo(2069081,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/04_product_photography_ scarf.jpg',600,450,'Monti Scarves','http://www2.clikpic.com/fullerpicture/images/04_product_photography_ scarf_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[44] = new photo(2069085,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/06_product_photography_jeans.jpg',600,450,'Calvin Klein in detail','http://www2.clikpic.com/fullerpicture/images/06_product_photography_jeans_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[45] = new photo(2069086,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/07_product_photography_boots.jpg',600,450,'Boots with shape','http://www2.clikpic.com/fullerpicture/images/07_product_photography_boots_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[46] = new photo(2069087,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/08_product_photo_gloves.jpg',600,450,'Gloves Selection','http://www2.clikpic.com/fullerpicture/images/08_product_photo_gloves_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[47] = new photo(2069092,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/10_product_photo_tops.jpg',600,450,'Marc O`Polo Knitwear','http://www2.clikpic.com/fullerpicture/images/10_product_photo_tops_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[48] = new photo(2069094,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/11_product_photo_trainers.jpg',600,450,'Trainers Group','http://www2.clikpic.com/fullerpicture/images/11_product_photo_trainers_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[49] = new photo(2069105,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/12_product_photography_ ties.jpg',600,450,'Range of Shirt Ties','http://www2.clikpic.com/fullerpicture/images/12_product_photography_ ties_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[50] = new photo(2069112,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/15_product_photography_shirts.jpg',600,450,'Tommy Hilfiger Shirts','http://www2.clikpic.com/fullerpicture/images/15_product_photography_shirts_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');
photos[51] = new photo(2069114,'133807','','gallery','http://www2.clikpic.com/fullerpicture/images/16_photography_formal_shirt.jpg',600,450,'Cuff & Collar','http://www2.clikpic.com/fullerpicture/images/16_photography_formal_shirt_thumb.jpg',130, 98,0, 0,'Product Photography Sample Image','','Joe Fuller','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(132974,'2645532,2645531,2645206,2645204,2645202,2645201,2645182,2645181,2645180,2645178','Sample Images','gallery');
galleries[1] = new gallery(133808,'2070059,2070056,2070054,2070052,2070049,2070048,2070047,2070045,2070044,2070040','Gadgets','gallery');
galleries[2] = new gallery(136712,'2645532,2645531,2645206,2645178,2049327,2049326,2049325,2049324,2049323,2049322','Home Accessories','gallery');
galleries[3] = new gallery(133814,'2645204,2645202,2645201,2645182,2645181,2645180,2049381,2049378,2049377,2049375','Packaging','gallery');
galleries[4] = new gallery(133807,'2069114,2069112,2069105,2069094,2069092,2069087,2069086,2069085,2069081,2069063','Clothes','gallery');

