window.thumbnails = {};
thumbnails[7709809] = clik.newPhoto({"link":"photo_7709809.html","caption":"","height":130,"id":7709809,"server_id":31,"src":"PROD-001_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7709811] = clik.newPhoto({"link":"photo_7709811.html","caption":"","height":130,"id":7709811,"server_id":31,"src":"PROD-002_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7709812] = clik.newPhoto({"link":"photo_7709812.html","caption":"","height":130,"id":7709812,"server_id":31,"src":"PROD-006_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7712529] = clik.newPhoto({"link":"photo_7712529.html","caption":"","height":130,"id":7712529,"server_id":31,"src":"PR7_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7712530] = clik.newPhoto({"link":"photo_7712530.html","caption":"","height":130,"id":7712530,"server_id":31,"src":"PR8_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7712531] = clik.newPhoto({"link":"photo_7712531.html","caption":"","height":130,"id":7712531,"server_id":31,"src":"PR9_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7712533] = clik.newPhoto({"link":"photo_7712533.html","caption":"","height":130,"id":7712533,"server_id":31,"src":"PR10_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7712575] = clik.newPhoto({"link":"photo_7712575.html","caption":"","height":130,"id":7712575,"server_id":31,"src":"0011_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712576] = clik.newPhoto({"link":"photo_7712576.html","caption":"","height":130,"id":7712576,"server_id":31,"src":"002_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712578] = clik.newPhoto({"link":"photo_7712578.html","caption":"","height":130,"id":7712578,"server_id":31,"src":"0041_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712579] = clik.newPhoto({"link":"photo_7712579.html","caption":"","height":130,"id":7712579,"server_id":31,"src":"0051_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712583] = clik.newPhoto({"link":"photo_7712583.html","caption":"","height":130,"id":7712583,"server_id":31,"src":"0061_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712599] = clik.newPhoto({"link":"photo_7712599.html","caption":"","height":130,"id":7712599,"server_id":31,"src":"007_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712601] = clik.newPhoto({"link":"photo_7712601.html","caption":"","height":130,"id":7712601,"server_id":31,"src":"008_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712602] = clik.newPhoto({"link":"photo_7712602.html","caption":"","height":130,"id":7712602,"server_id":31,"src":"0091_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7712603] = clik.newPhoto({"link":"photo_7712603.html","caption":"","height":130,"id":7712603,"server_id":31,"src":"0101_thumb.jpg","galleries_id":414942,"width":130});
thumbnails[7653754] = clik.newPhoto({"link":"photo_7653754.html","caption":"","height":130,"id":7653754,"server_id":31,"src":"AERIAL1_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653817] = clik.newPhoto({"link":"photo_7653817.html","caption":"","height":130,"id":7653817,"server_id":31,"src":"PRODUCT1_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653872] = clik.newPhoto({"link":"photo_7653872.html","caption":"","height":130,"id":7653872,"server_id":31,"src":"INDUSTRIAL1_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653891] = clik.newPhoto({"link":"photo_7653891.html","caption":"","height":130,"id":7653891,"server_id":31,"src":"PR1_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7712508] = clik.newPhoto({"link":"photo_7712508.html","caption":"","height":130,"id":7712508,"server_id":31,"src":"001_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7653755] = clik.newPhoto({"link":"photo_7653755.html","caption":"","height":130,"id":7653755,"server_id":31,"src":"AERIAL2_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653821] = clik.newPhoto({"link":"photo_7653821.html","caption":"","height":130,"id":7653821,"server_id":31,"src":"PRODUCT2_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653873] = clik.newPhoto({"link":"photo_7653873.html","caption":"","height":130,"id":7653873,"server_id":31,"src":"INDUSTRIAL2_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653892] = clik.newPhoto({"link":"photo_7653892.html","caption":"","height":130,"id":7653892,"server_id":31,"src":"PR2_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7709823] = clik.newPhoto({"link":"photo_7709823.html","caption":"","height":130,"id":7709823,"server_id":31,"src":"IND-002_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653757] = clik.newPhoto({"link":"photo_7653757.html","caption":"","height":130,"id":7653757,"server_id":31,"src":"AERIAL3_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653874] = clik.newPhoto({"link":"photo_7653874.html","caption":"","height":130,"id":7653874,"server_id":31,"src":"INDUSTRIAL3_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7709799] = clik.newPhoto({"link":"photo_7709799.html","caption":"","height":130,"id":7709799,"server_id":31,"src":"PROD-005_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7709828] = clik.newPhoto({"link":"photo_7709828.html","caption":"","height":130,"id":7709828,"server_id":31,"src":"IND-004_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653774] = clik.newPhoto({"link":"photo_7653774.html","caption":"","height":130,"id":7653774,"server_id":31,"src":"AERIAL4_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653824] = clik.newPhoto({"link":"photo_7653824.html","caption":"","height":130,"id":7653824,"server_id":31,"src":"PRODUCT4_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653875] = clik.newPhoto({"link":"photo_7653875.html","caption":"","height":130,"id":7653875,"server_id":31,"src":"INDUSTRIAL4_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653894] = clik.newPhoto({"link":"photo_7653894.html","caption":"","height":130,"id":7653894,"server_id":31,"src":"PR4_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7709825] = clik.newPhoto({"link":"photo_7709825.html","caption":"","height":130,"id":7709825,"server_id":31,"src":"IND-003_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653778] = clik.newPhoto({"link":"photo_7653778.html","caption":"","height":130,"id":7653778,"server_id":31,"src":"AERIAL5_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653827] = clik.newPhoto({"link":"photo_7653827.html","caption":"","height":130,"id":7653827,"server_id":31,"src":"PRODUCT5_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653876] = clik.newPhoto({"link":"photo_7653876.html","caption":"","height":130,"id":7653876,"server_id":31,"src":"INDUSTRIAL5_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653895] = clik.newPhoto({"link":"photo_7653895.html","caption":"","height":130,"id":7653895,"server_id":31,"src":"PR5_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7653779] = clik.newPhoto({"link":"photo_7653779.html","caption":"","height":130,"id":7653779,"server_id":31,"src":"AERIAL6_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7653830] = clik.newPhoto({"link":"photo_7653830.html","caption":"","height":130,"id":7653830,"server_id":31,"src":"PRODUCT6_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653877] = clik.newPhoto({"link":"photo_7653877.html","caption":"","height":130,"id":7653877,"server_id":31,"src":"INDUSTRIAL6_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653896] = clik.newPhoto({"link":"photo_7653896.html","caption":"","height":130,"id":7653896,"server_id":31,"src":"PR6_thumb.jpg","galleries_id":414575,"width":130});
thumbnails[7653833] = clik.newPhoto({"link":"photo_7653833.html","caption":"","height":130,"id":7653833,"server_id":31,"src":"PRODUCT7_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653879] = clik.newPhoto({"link":"photo_7653879.html","caption":"","height":130,"id":7653879,"server_id":31,"src":"INDUSTRIAL7_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653838] = clik.newPhoto({"link":"photo_7653838.html","caption":"","height":130,"id":7653838,"server_id":31,"src":"RODUCT8_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7653880] = clik.newPhoto({"link":"photo_7653880.html","caption":"","height":130,"id":7653880,"server_id":31,"src":"INDUSTRIAL8_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7653841] = clik.newPhoto({"link":"photo_7653841.html","caption":"","height":130,"id":7653841,"server_id":31,"src":"PRODUCT9_thumb.jpg","galleries_id":414571,"width":130});
thumbnails[7709820] = clik.newPhoto({"link":"photo_7709820.html","caption":"","height":130,"id":7709820,"server_id":31,"src":"ind-0011_thumb.jpg","galleries_id":414572,"width":130});
thumbnails[7712509] = clik.newPhoto({"link":"photo_7712509.html","caption":"","height":130,"id":7712509,"server_id":31,"src":"003_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712510] = clik.newPhoto({"link":"photo_7712510.html","caption":"","height":130,"id":7712510,"server_id":31,"src":"004_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712511] = clik.newPhoto({"link":"photo_7712511.html","caption":"","height":130,"id":7712511,"server_id":31,"src":"005_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712512] = clik.newPhoto({"link":"photo_7712512.html","caption":"","height":130,"id":7712512,"server_id":31,"src":"006_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712513] = clik.newPhoto({"link":"photo_7712513.html","caption":"","height":130,"id":7712513,"server_id":31,"src":"009_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712514] = clik.newPhoto({"link":"photo_7712514.html","caption":"","height":130,"id":7712514,"server_id":31,"src":"010_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712515] = clik.newPhoto({"link":"photo_7712515.html","caption":"","height":130,"id":7712515,"server_id":31,"src":"011_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7712516] = clik.newPhoto({"link":"photo_7712516.html","caption":"","height":130,"id":7712516,"server_id":31,"src":"012_thumb.jpg","galleries_id":414956,"width":130});
thumbnails[7709668] = clik.newPhoto({"link":"photo_7709668.html","caption":"","height":130,"id":7709668,"server_id":31,"src":"MAP_thumb.jpg","galleries_id":414537,"width":130});
thumbnails[7712630] = clik.newPhoto({"link":"photo_7712630.html","caption":"","height":130,"id":7712630,"server_id":31,"src":"CLASS_thumb.jpg","galleries_id":417427,"width":130});
thumbnails[7712632] = clik.newPhoto({"link":"photo_7712632.html","caption":"","height":130,"id":7712632,"server_id":31,"src":"LEAVERS_thumb.jpg","galleries_id":417427,"width":130});
thumbnails[7712635] = clik.newPhoto({"link":"photo_7712635.html","caption":"","height":130,"id":7712635,"server_id":31,"src":"PR_thumb.jpg","galleries_id":417427,"width":130});
thumbnails[7712641] = clik.newPhoto({"link":"photo_7712641.html","caption":"","height":130,"id":7712641,"server_id":31,"src":"PRODUCTION_thumb.jpg","galleries_id":417427,"width":130});
thumbnails[7712643] = clik.newPhoto({"link":"photo_7712643.html","caption":"","height":130,"id":7712643,"server_id":31,"src":"SPORT_thumb.jpg","galleries_id":417427,"width":130});
thumbnails[7938883] = clik.newPhoto({"link":"photo_7938883.html","caption":"","height":130,"id":7938883,"server_id":31,"src":"039_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938885] = clik.newPhoto({"link":"photo_7938885.html","caption":"","height":130,"id":7938885,"server_id":31,"src":"041_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938886] = clik.newPhoto({"link":"photo_7938886.html","caption":"","height":130,"id":7938886,"server_id":31,"src":"043_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938887] = clik.newPhoto({"link":"photo_7938887.html","caption":"","height":130,"id":7938887,"server_id":31,"src":"weddings-002_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938889] = clik.newPhoto({"link":"photo_7938889.html","caption":"","height":130,"id":7938889,"server_id":31,"src":"weddings-004_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938890] = clik.newPhoto({"link":"photo_7938890.html","caption":"","height":130,"id":7938890,"server_id":31,"src":"weddings-008_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938892] = clik.newPhoto({"link":"photo_7938892.html","caption":"","height":130,"id":7938892,"server_id":31,"src":"weddings-011_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938894] = clik.newPhoto({"link":"photo_7938894.html","caption":"","height":130,"id":7938894,"server_id":31,"src":"weddings-023_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7938895] = clik.newPhoto({"link":"photo_7938895.html","caption":"","height":130,"id":7938895,"server_id":31,"src":"weddings-036_thumb.jpg","galleries_id":427666,"width":130});
thumbnails[7654258] = clik.newPhoto({"link":"photo_7654258.html","caption":"","height":130,"id":7654258,"server_id":31,"src":"PORTRAIT1_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654260] = clik.newPhoto({"link":"photo_7654260.html","caption":"","height":130,"id":7654260,"server_id":31,"src":"PORTRAIT2_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654261] = clik.newPhoto({"link":"photo_7654261.html","caption":"","height":130,"id":7654261,"server_id":31,"src":"PORTRAIT3_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654262] = clik.newPhoto({"link":"photo_7654262.html","caption":"","height":130,"id":7654262,"server_id":31,"src":"PORTRAIT4_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654263] = clik.newPhoto({"link":"photo_7654263.html","caption":"","height":130,"id":7654263,"server_id":31,"src":"PORTRAIT5_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654264] = clik.newPhoto({"link":"photo_7654264.html","caption":"","height":130,"id":7654264,"server_id":31,"src":"PORTRAIT6_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654265] = clik.newPhoto({"link":"photo_7654265.html","caption":"","height":130,"id":7654265,"server_id":31,"src":"PORTRAIT7_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654266] = clik.newPhoto({"link":"photo_7654266.html","caption":"","height":130,"id":7654266,"server_id":31,"src":"PORTRAIT8_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7654267] = clik.newPhoto({"link":"photo_7654267.html","caption":"","height":130,"id":7654267,"server_id":31,"src":"PORTRAIT9_thumb.jpg","galleries_id":414957,"width":130});
thumbnails[7739506] = clik.newPhoto({"link":"photo_7739506.html","caption":"","height":130,"id":7739506,"server_id":31,"src":"exhibition2_thumb.jpg","galleries_id":414962,"width":130});
thumbnails[7739510] = clik.newPhoto({"link":"photo_7739510.html","caption":"","height":130,"id":7739510,"server_id":31,"src":"exhibition3_thumb.jpg","galleries_id":414962,"width":130});
thumbnails[7739237] = clik.newPhoto({"link":"photo_7739237.html","caption":"","height":130,"id":7739237,"server_id":31,"src":"design1_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7739239] = clik.newPhoto({"link":"photo_7739239.html","caption":"","height":130,"id":7739239,"server_id":31,"src":"print1_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7739512] = clik.newPhoto({"link":"photo_7739512.html","caption":"","height":130,"id":7739512,"server_id":31,"src":"exhibition4_thumb.jpg","galleries_id":414962,"width":130});
thumbnails[7739240] = clik.newPhoto({"link":"photo_7739240.html","caption":"","height":130,"id":7739240,"server_id":31,"src":"print2_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7739238] = clik.newPhoto({"link":"photo_7739238.html","caption":"","height":130,"id":7739238,"server_id":31,"src":"design2_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7739241] = clik.newPhoto({"link":"photo_7739241.html","caption":"","height":130,"id":7739241,"server_id":31,"src":"print4_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7739242] = clik.newPhoto({"link":"photo_7739242.html","caption":"","height":130,"id":7739242,"server_id":31,"src":"print5_thumb.jpg","galleries_id":414960,"width":130});
thumbnails[7653924] = clik.newPhoto({"link":"photo_7653924.html","caption":"","height":130,"id":7653924,"server_id":31,"src":"HOME1_thumb.jpg","galleries_id":414938,"width":130});
thumbnails[7677145] = clik.newPhoto({"link":"photo_7677145.html","caption":"","height":130,"id":7677145,"server_id":31,"src":"HP1_thumb.jpg","galleries_id":414938,"width":130});
thumbnails[7677146] = clik.newPhoto({"link":"photo_7677146.html","caption":"","height":130,"id":7677146,"server_id":31,"src":"HP2_thumb.jpg","galleries_id":414938,"width":130});
thumbnails[7677147] = clik.newPhoto({"link":"photo_7677147.html","caption":"","height":130,"id":7677147,"server_id":31,"src":"HP3_thumb.jpg","galleries_id":414938,"width":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[414960] = clik.newGallery({"photoIDs":[7739237,7739239,7739240,7739238,7739241,7739242],"link":"section496136_414960.html","skipIndex":0,"section_code":"section496136","id":414960,"parentGallery":"","featured_images":7739238,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Design & Print"});galleries[414962] = clik.newGallery({"photoIDs":[7739506,7739510,7739512],"link":"section496136_414962.html","skipIndex":0,"section_code":"section496136","id":414962,"parentGallery":"","featured_images":7739506,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Exhibition displays"});galleries[414938] = clik.newGallery({"photoIDs":[7653924,7677145,7677146,7677147],"link":"photo_7653924.html","skipIndex":true,"section_code":"section496586","id":414938,"parentGallery":"","featured_images":7677147,"maxRecords":0,"usePopups":false,"singleSection":true,"title":"HOME PAGE IMAGES"});galleries[414572] = clik.newGallery({"photoIDs":[7653872,7653873,7709823,7653874,7709828,7653875,7709825,7653876,7653877,7653879,7653880,7709820],"link":"gallery_414572.html","skipIndex":0,"section_code":"gallery","id":414572,"parentGallery":"","featured_images":7653880,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Industrial Photography"});galleries[414956] = clik.newGallery({"photoIDs":[7712508,7712509,7712510,7712511,7712512,7712513,7712514,7712515,7712516],"link":"gallery_414956.html","skipIndex":0,"section_code":"gallery","id":414956,"parentGallery":"","featured_images":7712513,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Motorsport Photography"});galleries[414957] = clik.newGallery({"photoIDs":[7654258,7654260,7654261,7654262,7654263,7654264,7654265,7654266,7654267],"link":"section500060_414957.html","skipIndex":0,"section_code":"section500060","id":414957,"parentGallery":"","featured_images":7654258,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Portrait Photography"});galleries[414575] = clik.newGallery({"photoIDs":[7712529,7712530,7712531,7712533,7653891,7653892,7653894,7653895,7653896],"link":"gallery_414575.html","skipIndex":0,"section_code":"gallery","id":414575,"parentGallery":"","featured_images":7653894,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"PR & Promotional Photography"});galleries[414571] = clik.newGallery({"photoIDs":[7709809,7709811,7709812,7653817,7653821,7709799,7653824,7653827,7653830,7653833,7653838,7653841],"link":"gallery_414571.html","skipIndex":0,"section_code":"gallery","id":414571,"parentGallery":"","featured_images":7653824,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Product Photography"});galleries[417427] = clik.newGallery({"photoIDs":[7712630,7712632,7712635,7712641,7712643],"link":"section496143.html","skipIndex":0,"section_code":"section496143","id":417427,"parentGallery":"","featured_images":"7712643,7712641,7712635,7712632,7712630","maxRecords":0,"usePopups":false,"singleSection":true,"title":"SCHOOL PHOTOGRAPHY"});galleries[427666] = clik.newGallery({"photoIDs":[7938883,7938885,7938886,7938887,7938889,7938890,7938892,7938894,7938895],"link":"section500060_427666.html","skipIndex":0,"section_code":"section500060","id":427666,"parentGallery":"","featured_images":7938883,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Wedding photography"});galleries[414537] = clik.newGallery({"photoIDs":[7653754,7653755,7653757,7653774,7653778,7653779,7709668],"link":"gallery_414537.html","skipIndex":0,"section_code":"gallery","id":414537,"parentGallery":"","featured_images":7653757,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Aerial Photography"});galleries[414942] = clik.newGallery({"photoIDs":[7712575,7712576,7712578,7712579,7712583,7712599,7712601,7712602,7712603],"link":"gallery_414942.html","skipIndex":0,"section_code":"gallery","id":414942,"parentGallery":"","featured_images":7712602,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Corporate & Event Photography"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '7938895,7938894,7938892,7938890,7938889,7938887,7938886,7938885,7938883,7739512,7739510,7739506,7739242,7739241,7739240,7739239,7739238,7739237,7712643,7712641,7712635,7712632,7712630,7712603,7712602,7712601,7712599,7712583,7712579,7712578,7712576,7712575,7712533,7712531,7712530,7712529,7712516,7712515,7712514,7712513,7712512,7712511,7712510,7712509,7712508,7709828,7709825,7709823,7709820,7709812';
imageSets[2] = '7938883,7739506,7739238,7712643,7712641,7712635,7712632,7712630,7712602,7712513,7677147,7654258,7653894,7653880,7653824,7653757';
imageSets[1] = '7677147,7677146,7677145,7653924';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/imagination2image/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/imagination2image/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
				  document.title = 'i2i imagination2image: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
			
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
						temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* 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, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

