window.thumbnails = new Object();
												thumbnails[2529420] = new thumbnail(2529420,'161957','','IMG_0289E_thumb.jpg',130, 90,32,'photo_2529420.html');
												thumbnails[2535057] = new thumbnail(2535057,'161957','','IMG_0311new colour_thumb.jpg',130, 87,32,'photo_2535057.html');
												thumbnails[2535067] = new thumbnail(2535067,'161957','','May 08036E2_thumb.jpg',130, 87,32,'photo_2535067.html');
												thumbnails[2535111] = new thumbnail(2535111,'161957','','IMG_0292new size_thumb.jpg',130, 87,32,'photo_2535111.html');
												thumbnails[2535160] = new thumbnail(2535160,'161957','','Chris and Kay\'s wedding027E2_thumb.jpg',130, 104,32,'photo_2535160.html');
												thumbnails[2535178] = new thumbnail(2535178,'161957','','May 08045_thumb.JPG',130, 87,32,'photo_2535178.html');
												thumbnails[2535192] = new thumbnail(2535192,'161957','','Marilena048E2_thumb.jpg',130, 87,32,'photo_2535192.html');
												thumbnails[2535300] = new thumbnail(2535300,'162004','','Chris and Kay\'s wedding058E_thumb.jpg',130, 87,32,'photo_2535300.html');
												thumbnails[2535486] = new thumbnail(2535486,'162004','','Chris and Kay\'s wedding231E3 copy_thumb.jpg',130, 96,32,'photo_2535486.html');
												thumbnails[2535493] = new thumbnail(2535493,'162004','','Chris and Kay\'s wedding308E_thumb.jpg',130, 100,32,'photo_2535493.html');
												thumbnails[2535520] = new thumbnail(2535520,'162004','','Mark and Karen187new colour_thumb.jpg',130, 87,32,'photo_2535520.html');
												thumbnails[2535630] = new thumbnail(2535630,'162004','','Mark and Karen194E_thumb.jpg',130, 88,32,'photo_2535630.html');
												thumbnails[2535631] = new thumbnail(2535631,'162004','','Mark and Karen061Enew colour_thumb.jpg',130, 87,32,'photo_2535631.html');
												thumbnails[2590926] = new thumbnail(2590926,'162005','','jane_thumb.JPG',130, 87,32,'photo_2590926.html');
												thumbnails[2590946] = new thumbnail(2590946,'162005','','Jane052E_thumb.JPG',130, 87,32,'photo_2590946.html');
												thumbnails[2590954] = new thumbnail(2590954,'162005','','Jane cooking day054E_thumb.JPG',130, 87,32,'photo_2590954.html');
												thumbnails[2603286] = new thumbnail(2603286,'162004','','Mark and Karen236_thumb.JPG',130, 195,32,'photo_2603286.html');
												thumbnails[2603287] = new thumbnail(2603287,'162004','','Mark and Karen292E_thumb.jpg',130, 195,32,'photo_2603287.html');
												thumbnails[2603364] = new thumbnail(2603364,'161957','','Marilena112E_thumb.jpg',130, 194,32,'photo_2603364.html');
												thumbnails[2691678] = new thumbnail(2691678,'169946','','IMG_1961_thumb.JPG',130, 195,32,'photo_2691678.html');
												thumbnails[2691988] = new thumbnail(2691988,'169946','','IMG_1519 for web_thumb.JPG',130, 195,32,'photo_2691988.html');
												thumbnails[2691990] = new thumbnail(2691990,'169946','','IMG_1520 for web_thumb.JPG',130, 87,32,'photo_2691990.html');
												thumbnails[2691991] = new thumbnail(2691991,'169946','','IMG_1552 for web_thumb.JPG',130, 195,32,'photo_2691991.html');
												thumbnails[2692000] = new thumbnail(2692000,'169946','','IMG_1646 for web1_thumb.JPG',130, 87,32,'photo_2692000.html');
												thumbnails[2692005] = new thumbnail(2692005,'169946','','IMG_1939 for web_thumb.JPG',130, 87,32,'photo_2692005.html');
												thumbnails[2692011] = new thumbnail(2692011,'169946','','IMG_2057 for web_thumb.JPG',130, 195,32,'photo_2692011.html');
												thumbnails[2692018] = new thumbnail(2692018,'169946','','IMG_2061 for web_thumb.JPG',130, 87,32,'photo_2692018.html');
												thumbnails[2692021] = new thumbnail(2692021,'169946','','IMG_2106 for web_thumb.JPG',130, 87,32,'photo_2692021.html');
												thumbnails[2983139] = new thumbnail(2983139,'183692','','CRW_3108black and white_thumb.jpg',130, 87,32,'photo_2983139.html');
												thumbnails[2983151] = new thumbnail(2983151,'183692','','CRW_3097_thumb.jpg',130, 87,32,'photo_2983151.html');
												thumbnails[2983156] = new thumbnail(2983156,'161957','','IMG_2647_thumb.JPG',130, 195,32,'photo_2983156.html');
												thumbnails[2983157] = new thumbnail(2983157,'161957','','IMG_2686_thumb.JPG',130, 87,32,'photo_2983157.html');
												thumbnails[2983158] = new thumbnail(2983158,'161957','','IMG_2719_thumb.JPG',130, 195,32,'photo_2983158.html');
												thumbnails[2983159] = new thumbnail(2983159,'161957','','IMG_2712_thumb.JPG',130, 195,32,'photo_2983159.html');
												thumbnails[2983162] = new thumbnail(2983162,'161957','','IMG_2814_thumb.JPG',130, 87,32,'photo_2983162.html');
												thumbnails[2983163] = new thumbnail(2983163,'161957','','IMG_2278_thumb.JPG',130, 195,32,'photo_2983163.html');
												thumbnails[2983164] = new thumbnail(2983164,'161957','','IMG_2297_thumb.JPG',130, 195,32,'photo_2983164.html');
												thumbnails[2983166] = new thumbnail(2983166,'161957','','IMG_2313_thumb.JPG',130, 87,32,'photo_2983166.html');
												thumbnails[2985686] = new thumbnail(2985686,'161957','','CRW_3295blackandwhiteforprinting_thumb.jpg',130, 195,32,'photo_2985686.html');
												thumbnails[2985716] = new thumbnail(2985716,'161957','','CRW_3308bwforweb_thumb.jpg',130, 195,32,'photo_2985716.html');
												thumbnails[2985735] = new thumbnail(2985735,'183692','','CRW_2864forweb_thumb.jpg',130, 195,32,'photo_2985735.html');
												thumbnails[2985736] = new thumbnail(2985736,'183692','','CRW_2903E2forweb_thumb.jpg',130, 195,32,'photo_2985736.html');
												thumbnails[2985738] = new thumbnail(2985738,'183692','','CRW_3085forweb_thumb.jpg',130, 195,32,'photo_2985738.html');
												thumbnails[2985740] = new thumbnail(2985740,'183692','','CRW_3101forweb_thumb.jpg',130, 87,32,'photo_2985740.html');
												thumbnails[2985741] = new thumbnail(2985741,'183692','','CRW_3148forweb_thumb.jpg',130, 195,32,'photo_2985741.html');
												thumbnails[2985744] = new thumbnail(2985744,'183692','','CRW_3149forweb_thumb.jpg',130, 87,32,'photo_2985744.html');
												thumbnails[2985745] = new thumbnail(2985745,'183692','','CRW_3141forweb_thumb.jpg',130, 87,32,'photo_2985745.html');
												thumbnails[3040868] = new thumbnail(3040868,'161957','','CRW_3375blackandwhiteforprinting_thumb.jpg',130, 87,32,'photo_3040868.html');
												thumbnails[3399260] = new thumbnail(3399260,'161957','','CRW_4704_thumb.jpg',130, 87,32,'photo_3399260.html');
												thumbnails[3399264] = new thumbnail(3399264,'161957','','CRW_4717blackandwhite_thumb.jpg',130, 195,32,'photo_3399264.html');
												thumbnails[3399266] = new thumbnail(3399266,'161957','','CRW_4723blackandwhite_thumb.jpg',130, 87,32,'photo_3399266.html');
												thumbnails[3399269] = new thumbnail(3399269,'161957','','CRW_4736_thumb.jpg',130, 87,32,'photo_3399269.html');
												thumbnails[3399292] = new thumbnail(3399292,'162004','','CRW_4472_thumb.jpg',130, 87,32,'photo_3399292.html');
												thumbnails[3399294] = new thumbnail(3399294,'162004','','CRW_4618_thumb.jpg',130, 87,32,'photo_3399294.html');
												thumbnails[3399296] = new thumbnail(3399296,'183692','','CRW_4766_thumb.jpg',130, 87,32,'photo_3399296.html');
												thumbnails[3399299] = new thumbnail(3399299,'162004','','CRW_4647_thumb.jpg',130, 195,32,'photo_3399299.html');
												thumbnails[3630012] = new thumbnail(3630012,'161957','','CRW_5204blackandwhite_thumb.jpg',130, 195,32,'photo_3630012.html');
												thumbnails[3630014] = new thumbnail(3630014,'161957','','CRW_5210blackandwhite_thumb.jpg',130, 195,32,'photo_3630014.html');
												thumbnails[3630016] = new thumbnail(3630016,'161957','','CRW_5099_thumb.jpg',130, 195,32,'photo_3630016.html');
												thumbnails[3630018] = new thumbnail(3630018,'161957','','CRW_5109_thumb.jpg',130, 87,32,'photo_3630018.html');
												thumbnails[3630022] = new thumbnail(3630022,'161957','','CRW_5116blackandwhite_thumb.jpg',130, 195,32,'photo_3630022.html');
												thumbnails[3630023] = new thumbnail(3630023,'161957','','CRW_5119_thumb.jpg',130, 195,32,'photo_3630023.html');
												thumbnails[3630134] = new thumbnail(3630134,'161957','','CRW_5118_thumb.jpg',130, 87,32,'photo_3630134.html');
												thumbnails[3630137] = new thumbnail(3630137,'162005','','CRW_5235_thumb.jpg',130, 195,32,'photo_3630137.html');
												thumbnails[3630140] = new thumbnail(3630140,'162005','','CRW_5228_thumb.jpg',130, 198,32,'photo_3630140.html');
												thumbnails[3630171] = new thumbnail(3630171,'161957','','CRW_3867_thumb.jpg',130, 195,32,'photo_3630171.html');
												thumbnails[3630185] = new thumbnail(3630185,'161957','','CRW_3950_thumb.jpg',130, 87,32,'photo_3630185.html');
												thumbnails[3890161] = new thumbnail(3890161,'161957','','CRW_5279blackandwhite_thumb.jpg',130, 195,32,'photo_3890161.html');
												thumbnails[3890164] = new thumbnail(3890164,'161957','','CRW_5288blackandwhite_thumb.jpg',130, 195,32,'photo_3890164.html');
												thumbnails[3890204] = new thumbnail(3890204,'161957','','CRW_5369_thumb.jpg',130, 195,32,'photo_3890204.html');
												thumbnails[3890214] = new thumbnail(3890214,'161957','','CRW_5422_thumb.jpg',130, 87,32,'photo_3890214.html');
												thumbnails[3890217] = new thumbnail(3890217,'161957','','CRW_5464blackandwhite_thumb.jpg',130, 195,32,'photo_3890217.html');
												thumbnails[3890220] = new thumbnail(3890220,'161957','','CRW_5482_thumb.jpg',130, 87,32,'photo_3890220.html');
												thumbnails[3890223] = new thumbnail(3890223,'161957','','CRW_5446_thumb.jpg',130, 87,32,'photo_3890223.html');
												thumbnails[3890226] = new thumbnail(3890226,'161957','','CRW_5487blackandwhite_thumb.jpg',130, 195,32,'photo_3890226.html');
												thumbnails[3890230] = new thumbnail(3890230,'161957','','CRW_5508_thumb.jpg',130, 87,32,'photo_3890230.html');
												thumbnails[3890233] = new thumbnail(3890233,'161957','','CRW_5408_thumb.jpg',130, 195,32,'photo_3890233.html');
												thumbnails[3890237] = new thumbnail(3890237,'161957','','CRW_5449blackandwhite_thumb.jpg',130, 195,32,'photo_3890237.html');
												thumbnails[4226296] = new thumbnail(4226296,'161957','','CRW_5841blackandwhite_thumb.jpg',130, 195,32,'photo_4226296.html');
												thumbnails[3040857] = new thumbnail(3040857,'161957','','CRW_3188BW_thumb.jpg',130, 87,32,'photo_3040857.html');
												thumbnails[4226274] = new thumbnail(4226274,'161957','','CRW_5691_thumb.jpg',130, 87,32,'photo_4226274.html');
												thumbnails[8105337] = new thumbnail(8105337,'250631','IMG 0192','IMG_0192_thumb.jpg',130, 195,32,'photo_8105337.html');
												thumbnails[8105354] = new thumbnail(8105354,'250631','IMG 0201','IMG_0201_thumb.jpg',130, 195,32,'photo_8105354.html');
												thumbnails[8105421] = new thumbnail(8105421,'250631','IMG 0280','IMG_0280_thumb.jpg',130, 195,32,'photo_8105421.html');
												thumbnails[8105338] = new thumbnail(8105338,'250631','IMG 0194','IMG_0194_thumb.jpg',130, 195,32,'photo_8105338.html');
												thumbnails[8105355] = new thumbnail(8105355,'250631','IMG 0203','IMG_0203_thumb.jpg',130, 195,32,'photo_8105355.html');
												thumbnails[8105422] = new thumbnail(8105422,'250631','IMG 0281','IMG_0281_thumb.jpg',130, 87,32,'photo_8105422.html');
												thumbnails[8105444] = new thumbnail(8105444,'250631','IMG 0289','IMG_0289_0ACBDBA7-1EC9-D45B-1C680EB68279BED4_thumb.jpg',130, 195,32,'photo_8105444.html');
												thumbnails[8105339] = new thumbnail(8105339,'250631','IMG 0195','IMG_0195_thumb.jpg',130, 87,32,'photo_8105339.html');
												thumbnails[8105356] = new thumbnail(8105356,'250631','IMG 0205','IMG_0205_thumb.jpg',130, 195,32,'photo_8105356.html');
												thumbnails[8105423] = new thumbnail(8105423,'250631','IMG 0282','IMG_0282_thumb.jpg',130, 87,32,'photo_8105423.html');
												thumbnails[8105445] = new thumbnail(8105445,'250631','IMG 0300','IMG_0300_thumb.jpg',130, 195,32,'photo_8105445.html');
												thumbnails[8105340] = new thumbnail(8105340,'250631','IMG 0196','IMG_0196_thumb.jpg',130, 195,32,'photo_8105340.html');
												thumbnails[8105357] = new thumbnail(8105357,'250631','IMG 0208','IMG_0208_thumb.jpg',130, 195,32,'photo_8105357.html');
												thumbnails[8105424] = new thumbnail(8105424,'250631','IMG 0283','IMG_0283_thumb.jpg',130, 195,32,'photo_8105424.html');
												thumbnails[8105446] = new thumbnail(8105446,'250631','IMG 0301','IMG_0301_thumb.jpg',130, 195,32,'photo_8105446.html');
												thumbnails[8105341] = new thumbnail(8105341,'250631','IMG 0198','IMG_0198_thumb.jpg',130, 195,32,'photo_8105341.html');
												thumbnails[8105358] = new thumbnail(8105358,'250631','IMG 0209','IMG_0209_thumb.jpg',130, 195,32,'photo_8105358.html');
												thumbnails[8105425] = new thumbnail(8105425,'250631','IMG 0284','IMG_0284_thumb.jpg',130, 87,32,'photo_8105425.html');
												thumbnails[8105447] = new thumbnail(8105447,'250631','IMG 0304','IMG_0304_thumb.jpg',130, 195,32,'photo_8105447.html');
												thumbnails[8105359] = new thumbnail(8105359,'250631','IMG 0210','IMG_0210_thumb.jpg',130, 195,32,'photo_8105359.html');
												thumbnails[8105426] = new thumbnail(8105426,'250631','IMG 0285','IMG_0285_thumb.jpg',130, 87,32,'photo_8105426.html');
												thumbnails[8105448] = new thumbnail(8105448,'250631','IMG 0305','IMG_0305_thumb.jpg',130, 195,32,'photo_8105448.html');
												thumbnails[8105360] = new thumbnail(8105360,'250631','IMG 0212','IMG_0212_thumb.jpg',130, 195,32,'photo_8105360.html');
												thumbnails[8105427] = new thumbnail(8105427,'250631','IMG 0286','IMG_0286_thumb.jpg',130, 195,32,'photo_8105427.html');
												thumbnails[8105449] = new thumbnail(8105449,'250631','IMG 0307','IMG_0307_thumb.jpg',130, 195,32,'photo_8105449.html');
												thumbnails[8105361] = new thumbnail(8105361,'250631','IMG 0213','IMG_0213_thumb.jpg',130, 195,32,'photo_8105361.html');
												thumbnails[8105428] = new thumbnail(8105428,'250631','IMG 0289','IMG_0289_thumb.jpg',130, 195,32,'photo_8105428.html');
												thumbnails[8105450] = new thumbnail(8105450,'250631','IMG 0308','IMG_0308_thumb.jpg',130, 195,32,'photo_8105450.html');
												thumbnails[8105362] = new thumbnail(8105362,'250631','IMG 0216','IMG_0216_thumb.jpg',130, 195,32,'photo_8105362.html');
												thumbnails[8105429] = new thumbnail(8105429,'250631','IMG 0291','IMG_0291_thumb.jpg',130, 195,32,'photo_8105429.html');
												thumbnails[8105451] = new thumbnail(8105451,'250631','IMG 0313','IMG_0313_thumb.jpg',130, 195,32,'photo_8105451.html');
												thumbnails[8105363] = new thumbnail(8105363,'250631','IMG 0219','IMG_0219_thumb.jpg',130, 87,32,'photo_8105363.html');
												thumbnails[8105430] = new thumbnail(8105430,'250631','IMG 0292','IMG_0292_thumb.jpg',130, 195,32,'photo_8105430.html');
												thumbnails[8105452] = new thumbnail(8105452,'250631','IMG 0318','IMG_0318_thumb.jpg',130, 195,32,'photo_8105452.html');
												thumbnails[8105364] = new thumbnail(8105364,'250631','IMG 0221','IMG_0221_thumb.jpg',130, 195,32,'photo_8105364.html');
												thumbnails[8105431] = new thumbnail(8105431,'250631','IMG 02921','IMG_02921_thumb.jpg',130, 195,32,'photo_8105431.html');
												thumbnails[8105365] = new thumbnail(8105365,'250631','IMG 0224','IMG_0224_thumb.jpg',130, 87,32,'photo_8105365.html');
												thumbnails[8105432] = new thumbnail(8105432,'250631','IMG 0293','IMG_0293_thumb.jpg',130, 195,32,'photo_8105432.html');
												thumbnails[8105366] = new thumbnail(8105366,'250631','IMG 0226','IMG_0226_thumb.jpg',130, 195,32,'photo_8105366.html');
												thumbnails[8105433] = new thumbnail(8105433,'250631','IMG 0294','IMG_0294_thumb.jpg',130, 195,32,'photo_8105433.html');
												thumbnails[8105367] = new thumbnail(8105367,'250631','IMG 0228','IMG_0228_thumb.jpg',130, 195,32,'photo_8105367.html');
												thumbnails[8105434] = new thumbnail(8105434,'250631','IMG 0298','IMG_0298_thumb.jpg',130, 195,32,'photo_8105434.html');
												thumbnails[8105368] = new thumbnail(8105368,'250631','IMG 0231','IMG_0231_thumb.jpg',130, 87,32,'photo_8105368.html');
												thumbnails[8105435] = new thumbnail(8105435,'250631','IMG 0299','IMG_0299_thumb.jpg',130, 195,32,'photo_8105435.html');
												thumbnails[8105382] = new thumbnail(8105382,'250631','IMG 0232','IMG_0232_thumb.jpg',130, 87,32,'photo_8105382.html');
												thumbnails[8105383] = new thumbnail(8105383,'250631','IMG 0233','IMG_0233_thumb.jpg',130, 195,32,'photo_8105383.html');
												thumbnails[8105384] = new thumbnail(8105384,'250631','IMG 0234','IMG_0234_thumb.jpg',130, 195,32,'photo_8105384.html');
												thumbnails[8105385] = new thumbnail(8105385,'250631','IMG 0237','IMG_0237_thumb.jpg',130, 195,32,'photo_8105385.html');
												thumbnails[8105386] = new thumbnail(8105386,'250631','IMG 0238','IMG_0238_thumb.jpg',130, 195,32,'photo_8105386.html');
												thumbnails[8105387] = new thumbnail(8105387,'250631','IMG 0242','IMG_0242_thumb.jpg',130, 195,32,'photo_8105387.html');
												thumbnails[8105388] = new thumbnail(8105388,'250631','IMG 0244','IMG_0244_thumb.jpg',130, 195,32,'photo_8105388.html');
												thumbnails[8105389] = new thumbnail(8105389,'250631','IMG 0245','IMG_0245_thumb.jpg',130, 195,32,'photo_8105389.html');
												thumbnails[8105390] = new thumbnail(8105390,'250631','IMG 0246','IMG_0246_thumb.jpg',130, 195,32,'photo_8105390.html');
												thumbnails[8105391] = new thumbnail(8105391,'250631','IMG 0249','IMG_0249_thumb.jpg',130, 195,32,'photo_8105391.html');
												thumbnails[8105392] = new thumbnail(8105392,'250631','IMG 0251','IMG_0251_thumb.jpg',130, 195,32,'photo_8105392.html');
												thumbnails[8105393] = new thumbnail(8105393,'250631','IMG 0256','IMG_0256_thumb.jpg',130, 87,32,'photo_8105393.html');
												thumbnails[8105394] = new thumbnail(8105394,'250631','IMG 0257','IMG_0257_thumb.jpg',130, 87,32,'photo_8105394.html');
												thumbnails[8105395] = new thumbnail(8105395,'250631','IMG 0259','IMG_0259_thumb.jpg',130, 87,32,'photo_8105395.html');
												thumbnails[8105396] = new thumbnail(8105396,'250631','IMG 0261','IMG_0261_thumb.jpg',130, 195,32,'photo_8105396.html');
												thumbnails[8105397] = new thumbnail(8105397,'250631','IMG 0262','IMG_0262_thumb.jpg',130, 195,32,'photo_8105397.html');
												thumbnails[8105398] = new thumbnail(8105398,'250631','IMG 0263','IMG_0263_thumb.jpg',130, 87,32,'photo_8105398.html');
												thumbnails[8105399] = new thumbnail(8105399,'250631','IMG 0266','IMG_0266_thumb.jpg',130, 195,32,'photo_8105399.html');
												thumbnails[8105400] = new thumbnail(8105400,'250631','IMG 0267','IMG_0267_thumb.jpg',130, 195,32,'photo_8105400.html');
												thumbnails[8105401] = new thumbnail(8105401,'250631','IMG 0271','IMG_0271_thumb.jpg',130, 195,32,'photo_8105401.html');
												thumbnails[8105402] = new thumbnail(8105402,'250631','IMG 0272','IMG_0272_thumb.jpg',130, 87,32,'photo_8105402.html');
												thumbnails[8105403] = new thumbnail(8105403,'250631','IMG 0274','IMG_0274_thumb.jpg',130, 195,32,'photo_8105403.html');
												thumbnails[8105404] = new thumbnail(8105404,'250631','IMG 0275','IMG_0275_thumb.jpg',130, 195,32,'photo_8105404.html');
												thumbnails[8105405] = new thumbnail(8105405,'250631','IMG 0277','IMG_0277_thumb.jpg',130, 87,32,'photo_8105405.html');
												thumbnails[8105407] = new thumbnail(8105407,'250631','IMG 0278','IMG_0278_thumb.jpg',130, 87,32,'photo_8105407.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[250631] = new gallery(250631,'8105382','Bedford School Summer Leavers\' Ball 2011','gallery',[8105337,8105354,8105421,8105338,8105355,8105422,8105444,8105339,8105356,8105423,8105445,8105340,8105357,8105424,8105446,8105341,8105358,8105425,8105447,8105359,8105426,8105448,8105360,8105427,8105449,8105361,8105428,8105450,8105362,8105429,8105451,8105363,8105430,8105452,8105364,8105431,8105365,8105432,8105366,8105433,8105367,8105434,8105368,8105435,8105382,8105383,8105384,8105385,8105386,8105387,8105388,8105389,8105390,8105391,8105392,8105393,8105394,8105395,8105396,8105397,8105398,8105399,8105400,8105401,8105402,8105403,8105404,8105405,8105407],0, 0, '', 'gallery_250631.html',0,0);
				  					galleries[161957] = new gallery(161957,'3040868','Family Portraits','gallery',[2529420,2535057,2535067,2535111,2535160,2535178,2535192,2603364,2983156,2983157,2983158,2983159,2983162,2983163,2983164,2983166,2985686,2985716,3040868,3399260,3399264,3399266,3399269,3630012,3630014,3630016,3630018,3630022,3630023,3630134,3630171,3630185,3890161,3890164,3890204,3890214,3890217,3890220,3890223,3890226,3890230,3890233,3890237,4226296,3040857,4226274],0, 0, '', 'gallery_161957.html',0,0);
				  					galleries[162004] = new gallery(162004,'2535631,2535486','Your events','gallery',[2535300,2535486,2535493,2535520,2535630,2535631,2603286,2603287,3399292,3399294,3399299],0, 0, '', 'gallery_162004.html',0,0);
				  					galleries[162005] = new gallery(162005,'2590946','Corporate','gallery',[2590926,2590946,2590954,3630137,3630140],0, 0, '', 'gallery_162005.html',0,0);
				  					galleries[169946] = new gallery(169946,'2692021,2692018,2692011,2692005,2692000,2691991,2691990,2691988,2691678','Valentia Island','gallery',[2691678,2691988,2691990,2691991,2692000,2692005,2692011,2692018,2692021],0, 0, '', 'gallery_169946.html',0,0);
				  					galleries[183692] = new gallery(183692,'3399296,2985745,2985744,2985741,2985740,2985738,2985736,2985735,2983151,2983139','Bedford cards','gallery',[2983139,2983151,2985735,2985736,2985738,2985740,2985741,2985744,2985745,3399296],0, 0, '', 'gallery_183692.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '3890230,3890223,3890220,3399269,3399260,3040868,3040857,2985686,2983166,2535631,2535520,2535486,2535192,2535178,2535160,2535067,2529420';
imageSets[2] = '8105382,3040868,2590946,2535631,2535486';
imageSets[3] = '8105452,8105451,8105450,8105449,8105448,8105447,8105446,8105445,8105444,8105435,8105434,8105433,8105432,8105431,8105430,8105429,8105428,8105427,8105426,8105425,8105424,8105423,8105422,8105421,8105407,8105405,8105404,8105403,8105402,8105401,8105400,8105399,8105398,8105397,8105396,8105395,8105394,8105393,8105392,8105391,8105390,8105389,8105388,8105387,8105386,8105385,8105384,8105383,8105382,8105368';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/anncollins/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/anncollins/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/anncollins/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/anncollins/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/anncollins/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/anncollins/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Ann Collins Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

