window.thumbnails = {};
															thumbnails[3012513] = clik.newPhoto({"id":3012513,"src":"Uzbek_0029a1_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3012513.html","width":130,"caption":"","height":68});
															thumbnails[2834402] = clik.newPhoto({"id":2834402,"src":"Uzbek_0140 web_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_2834402.html","width":130,"caption":"","height":99});
															thumbnails[3013317] = clik.newPhoto({"id":3013317,"src":"Vnam_1122a-nik1-print_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_3013317.html","width":130,"caption":"","height":57});
															thumbnails[3016347] = clik.newPhoto({"id":3016347,"src":"Dune0005a_filtered a copy a_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3016347.html","width":130,"caption":"","height":59});
															thumbnails[3016419] = clik.newPhoto({"id":3016419,"src":"Laos_01971_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3016419.html","width":130,"caption":"","height":65});
															thumbnails[3016431] = clik.newPhoto({"id":3016431,"src":"IMG_2131_big_C5D7085F-24E8-5EC4-4FF9922E49BB4E2C_thumb.jpg","galleries_id":155438,"server_id":5,"link":"photo_3016431.html","width":130,"caption":"","height":119});
															thumbnails[5011611] = clik.newPhoto({"id":5011611,"src":"Wales_0025_copy_C6426714-24E8-5EC4-4FB8A3726FEE7CEF_thumb.jpg","galleries_id":157300,"server_id":5,"link":"photo_5011611.html","width":130,"caption":"","height":92});
															thumbnails[5183669] = clik.newPhoto({"id":5183669,"src":"Istan_0118_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5183669.html","width":130,"caption":"","height":80});
															thumbnails[5984018] = clik.newPhoto({"id":5984018,"src":"Nepal_0292_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5984018.html","width":130,"caption":"","height":89});
															thumbnails[8839336] = clik.newPhoto({"id":8839336,"src":"China_0674s_copy_1_C2732814-1EC9-DFB6-09A38DDB905AD729_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839336.html","width":130,"caption":"","height":78});
															thumbnails[3300465] = clik.newPhoto({"id":3300465,"src":"USA  08_206_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3300465.html","width":130,"caption":"","height":59});
															thumbnails[3188559] = clik.newPhoto({"id":3188559,"src":"USA  08_186_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188559.html","width":130,"caption":"","height":78});
															thumbnails[2830879] = clik.newPhoto({"id":2830879,"src":"Laos_0054_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_2830879.html","width":130,"caption":"","height":71});
															thumbnails[3188557] = clik.newPhoto({"id":3188557,"src":"USA  08_041a print_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188557.html","width":130,"caption":"","height":87});
															thumbnails[3012455] = clik.newPhoto({"id":3012455,"src":"Uzbek_12361_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3012455.html","width":130,"caption":"","height":96});
															thumbnails[3016423] = clik.newPhoto({"id":3016423,"src":"Laos_023-new_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3016423.html","width":130,"caption":"","height":85});
															thumbnails[3016436] = clik.newPhoto({"id":3016436,"src":"Camb_02531_thumb.jpg","galleries_id":155438,"server_id":5,"link":"photo_3016436.html","width":130,"caption":"","height":87});
															thumbnails[3188553] = clik.newPhoto({"id":3188553,"src":"USA 2008_276a copy print_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188553.html","width":130,"caption":"","height":102});
															thumbnails[5183661] = clik.newPhoto({"id":5183661,"src":"Istan_0113_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5183661.html","width":130,"caption":"","height":87});
															thumbnails[5224700] = clik.newPhoto({"id":5224700,"src":"Wales_0054_sharp_print_a_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_5224700.html","width":130,"caption":"","height":78});
															thumbnails[8839343] = clik.newPhoto({"id":8839343,"src":"China_0967s_C275C67F-1EC9-DFB6-092F2FB54915E9BB_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839343.html","width":130,"caption":"","height":82});
															thumbnails[2837070] = clik.newPhoto({"id":2837070,"src":"Uzbek_0273 web_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_2837070.html","width":130,"caption":"","height":85});
															thumbnails[3188561] = clik.newPhoto({"id":3188561,"src":"USA  08_258 copy_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188561.html","width":130,"caption":"","height":98});
															thumbnails[5983967] = clik.newPhoto({"id":5983967,"src":"Orchha_0122_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983967.html","width":130,"caption":"","height":91});
															thumbnails[8839368] = clik.newPhoto({"id":8839368,"src":"China_2069_crop_C27FFFB8-1EC9-DFB6-094E4E1B8AB30A10_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839368.html","width":130,"caption":"","height":77});
															thumbnails[5983446] = clik.newPhoto({"id":5983446,"src":"Nepal_05971_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983446.html","width":130,"caption":"","height":97});
															thumbnails[5984001] = clik.newPhoto({"id":5984001,"src":"Jaipur__0064_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5984001.html","width":130,"caption":"","height":87});
															thumbnails[3012457] = clik.newPhoto({"id":3012457,"src":"Uzbek_1171a11_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3012457.html","width":130,"caption":"","height":125});
															thumbnails[3013330] = clik.newPhoto({"id":3013330,"src":"Laos_03452_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3013330.html","width":130,"caption":"","height":84});
															thumbnails[3016442] = clik.newPhoto({"id":3016442,"src":"Camb_00481_thumb.jpg","galleries_id":155438,"server_id":5,"link":"photo_3016442.html","width":130,"caption":"","height":141});
															thumbnails[3188556] = clik.newPhoto({"id":3188556,"src":"USA  08_017 print_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_3188556.html","width":130,"caption":"","height":78});
															thumbnails[4721209] = clik.newPhoto({"id":4721209,"src":"_MG_3738_copy_copy_copy_thumb.jpg","galleries_id":157300,"server_id":5,"link":"photo_4721209.html","width":130,"caption":"","height":102});
															thumbnails[5183664] = clik.newPhoto({"id":5183664,"src":"Istan_0216_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5183664.html","width":130,"caption":"","height":87});
															thumbnails[5983448] = clik.newPhoto({"id":5983448,"src":"Varanasi_0215_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983448.html","width":130,"caption":"","height":133});
															thumbnails[7978893] = clik.newPhoto({"id":7978893,"src":"Cornwall_3_135a_print_web_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_7978893.html","width":130,"caption":"","height":87});
															thumbnails[8839352] = clik.newPhoto({"id":8839352,"src":"China_1506_copy_cropjpg_C603BBEB-24E8-5EC4-4FA23433C4F91F2D_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839352.html","width":130,"caption":"","height":121});
															thumbnails[5983882] = clik.newPhoto({"id":5983882,"src":"Nepal_0642_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983882.html","width":130,"caption":"","height":174});
															thumbnails[2830880] = clik.newPhoto({"id":2830880,"src":"Laos_0284_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_2830880.html","width":130,"caption":"","height":106});
															thumbnails[3188570] = clik.newPhoto({"id":3188570,"src":"USA  08_365_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188570.html","width":130,"caption":"","height":99});
															thumbnails[3303059] = clik.newPhoto({"id":3303059,"src":"Uzbek_0331_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3303059.html","width":130,"caption":"","height":95});
															thumbnails[5983526] = clik.newPhoto({"id":5983526,"src":"Varanasi_0221_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983526.html","width":130,"caption":"","height":178});
															thumbnails[7978963] = clik.newPhoto({"id":7978963,"src":"Khajuraho_0216s_plat_calc_shrp_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_7978963.html","width":130,"caption":"","height":89});
															thumbnails[2830877] = clik.newPhoto({"id":2830877,"src":"Laos_0019_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_2830877.html","width":130,"caption":"","height":103});
															thumbnails[3012232] = clik.newPhoto({"id":3012232,"src":"Vnam_05551_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3012232.html","width":130,"caption":"","height":89});
															thumbnails[3012461] = clik.newPhoto({"id":3012461,"src":"Uzbek_05001_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3012461.html","width":130,"caption":"","height":146});
															thumbnails[3016445] = clik.newPhoto({"id":3016445,"src":"Camb_0038a1_thumb.jpg","galleries_id":155438,"server_id":5,"link":"photo_3016445.html","width":130,"caption":"","height":156});
															thumbnails[3020436] = clik.newPhoto({"id":3020436,"src":"Laos_0186a_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3020436.html","width":130,"caption":"","height":154});
															thumbnails[3188625] = clik.newPhoto({"id":3188625,"src":"USA  08_062 copy a_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188625.html","width":130,"caption":"","height":96});
															thumbnails[5184324] = clik.newPhoto({"id":5184324,"src":"Istan_0212_as_Smart_Object-11_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5184324.html","width":130,"caption":"","height":163});
															thumbnails[5983592] = clik.newPhoto({"id":5983592,"src":"Nepal_05551_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983592.html","width":130,"caption":"","height":187});
															thumbnails[8763814] = clik.newPhoto({"id":8763814,"src":"Web_Release_2a_Ruari1_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_8763814.html","width":130,"caption":"","height":90});
															thumbnails[8839358] = clik.newPhoto({"id":8839358,"src":"China_1563s_C27ABCC0-1EC9-DFB6-099B15A05908EF66_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839358.html","width":130,"caption":"","height":104});
															thumbnails[3188648] = clik.newPhoto({"id":3188648,"src":"USA  08_079_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3188648.html","width":130,"caption":"","height":84});
															thumbnails[3013324] = clik.newPhoto({"id":3013324,"src":"Vnam_04481_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3013324.html","width":130,"caption":"","height":87});
															thumbnails[3742858] = clik.newPhoto({"id":3742858,"src":"Camb_0192_thumb.jpg","galleries_id":155438,"server_id":5,"link":"photo_3742858.html","width":130,"caption":"","height":188});
															thumbnails[3742871] = clik.newPhoto({"id":3742871,"src":"Laos_0206a_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3742871.html","width":130,"caption":"","height":139});
															thumbnails[7982993] = clik.newPhoto({"id":7982993,"src":"Uzbek_0956_crop_girl_crop_web_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_7982993.html","width":130,"caption":"","height":145});
															thumbnails[8763830] = clik.newPhoto({"id":8763830,"src":"web_Childhoods_End_212_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_8763830.html","width":130,"caption":"","height":93});
															thumbnails[8839365] = clik.newPhoto({"id":8839365,"src":"China_1861_C27DBBEB-1EC9-DFB6-09F53F9DAE066871_thumb.jpg","galleries_id":154844,"server_id":5,"link":"photo_8839365.html","width":130,"caption":"","height":92});
															thumbnails[3725698] = clik.newPhoto({"id":3725698,"src":"Laos_0152_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3725698.html","width":130,"caption":"","height":139});
															thumbnails[3742827] = clik.newPhoto({"id":3742827,"src":"Laos_0095_thumb.jpg","galleries_id":155436,"server_id":5,"link":"photo_3742827.html","width":130,"caption":"","height":193});
															thumbnails[5183774] = clik.newPhoto({"id":5183774,"src":"Istan_0323_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5183774.html","width":130,"caption":"","height":186});
															thumbnails[2432738] = clik.newPhoto({"id":2432738,"src":"Uzbek_0792a1 copy_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_2432738.html","width":130,"caption":"","height":179});
															thumbnails[3012235] = clik.newPhoto({"id":3012235,"src":"Vnam_13811_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3012235.html","width":130,"caption":"","height":111});
															thumbnails[5183678] = clik.newPhoto({"id":5183678,"src":"Istan_04141_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_5183678.html","width":130,"caption":"","height":195});
															thumbnails[2830814] = clik.newPhoto({"id":2830814,"src":"Vnam_0743 marshall a copy 21_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_2830814.html","width":130,"caption":"","height":161});
															thumbnails[3012511] = clik.newPhoto({"id":3012511,"src":"Uzbek_06192_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3012511.html","width":130,"caption":"","height":161});
															thumbnails[3016349] = clik.newPhoto({"id":3016349,"src":"Malay-0607new-01 comp a copy a_thumb.jpg","galleries_id":157300,"server_id":5,"link":"photo_3016349.html","width":130,"caption":"","height":95});
															thumbnails[4879451] = clik.newPhoto({"id":4879451,"src":"Istan_0435_filtered_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_4879451.html","width":130,"caption":"","height":130});
															thumbnails[5983974] = clik.newPhoto({"id":5983974,"src":"Nepal_0311_thumb.jpg","galleries_id":337218,"server_id":5,"link":"photo_5983974.html","width":119,"caption":"","height":200});
															thumbnails[2830762] = clik.newPhoto({"id":2830762,"src":"Vnam_1284-crop-sharp-nik-a_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_2830762.html","width":130,"caption":"","height":163});
															thumbnails[3012234] = clik.newPhoto({"id":3012234,"src":"Vnam_02351_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3012234.html","width":130,"caption":"","height":184});
															thumbnails[8347261] = clik.newPhoto({"id":8347261,"src":"Istan_0358_thumb.jpg","galleries_id":292711,"server_id":5,"link":"photo_8347261.html","width":130,"caption":"","height":90});
															thumbnails[3459136] = clik.newPhoto({"id":3459136,"src":"Vnam_0124a1_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3459136.html","width":128,"caption":"","height":200});
															thumbnails[7253664] = clik.newPhoto({"id":7253664,"src":"Cornwall2_0163a_web_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_7253664.html","width":130,"caption":"","height":102});
															thumbnails[2836913] = clik.newPhoto({"id":2836913,"src":"Uzbek_0091 web_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_2836913.html","width":130,"caption":"","height":182});
															thumbnails[2830818] = clik.newPhoto({"id":2830818,"src":"Vnam_0488 nik1_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_2830818.html","width":130,"caption":"","height":178});
															thumbnails[2837006] = clik.newPhoto({"id":2837006,"src":"Uzbek_0998 web_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_2837006.html","width":130,"caption":"","height":195});
															thumbnails[3020640] = clik.newPhoto({"id":3020640,"src":"Vnam_0991 copy_filtered_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3020640.html","width":124,"caption":"","height":200});
															thumbnails[3606638] = clik.newPhoto({"id":3606638,"src":"Uzbek_0389-copy-a_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3606638.html","width":130,"caption":"","height":88});
															thumbnails[3606839] = clik.newPhoto({"id":3606839,"src":"Uzbek_0513-copy1_thumb.jpg","galleries_id":155032,"server_id":5,"link":"photo_3606839.html","width":130,"caption":"","height":102});
															thumbnails[7979024] = clik.newPhoto({"id":7979024,"src":"Jaipur__0266_filtered_copy_flip_copy_prin_webt_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_7979024.html","width":130,"caption":"","height":121});
															thumbnails[3621115] = clik.newPhoto({"id":3621115,"src":"Vnam_04071_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3621115.html","width":130,"caption":"","height":175});
															thumbnails[7253608] = clik.newPhoto({"id":7253608,"src":"Manchester_0124b_second_improve_extendweb_thumb.jpg","galleries_id":157300,"server_id":5,"link":"photo_7253608.html","width":130,"caption":"","height":120});
															thumbnails[3487948] = clik.newPhoto({"id":3487948,"src":"USA--08_229a_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3487948.html","width":130,"caption":"","height":116});
															thumbnails[3724650] = clik.newPhoto({"id":3724650,"src":"Vnam_0992-a_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3724650.html","width":130,"caption":"","height":183});
															thumbnails[7978874] = clik.newPhoto({"id":7978874,"src":"temp_2_web_thumb.jpg","galleries_id":157300,"server_id":5,"link":"photo_7978874.html","width":130,"caption":"","height":171});
															thumbnails[8763843] = clik.newPhoto({"id":8763843,"src":"web_Delhi_0201_crop_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_8763843.html","width":130,"caption":"","height":126});
															thumbnails[3606867] = clik.newPhoto({"id":3606867,"src":"USA__08_520_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3606867.html","width":130,"caption":"","height":87});
															thumbnails[3620571] = clik.newPhoto({"id":3620571,"src":"USA--08_311a_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3620571.html","width":130,"caption":"","height":85});
															thumbnails[3621132] = clik.newPhoto({"id":3621132,"src":"Vnam_1141_filtered_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3621132.html","width":130,"caption":"","height":132});
															thumbnails[8065594] = clik.newPhoto({"id":8065594,"src":"Vintage_Flower_1b_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_8065594.html","width":130,"caption":"","height":174});
															thumbnails[3299046] = clik.newPhoto({"id":3299046,"src":"USA  08_597_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3299046.html","width":130,"caption":"","height":89});
															thumbnails[3656014] = clik.newPhoto({"id":3656014,"src":"Vnam_01781_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3656014.html","width":130,"caption":"","height":101});
															thumbnails[4004420] = clik.newPhoto({"id":4004420,"src":"Vnam_0538_crop_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_4004420.html","width":130,"caption":"","height":117});
															thumbnails[3298994] = clik.newPhoto({"id":3298994,"src":"USA  08_085_thumb.jpg","galleries_id":194988,"server_id":5,"link":"photo_3298994.html","width":130,"caption":"","height":195});
															thumbnails[3656016] = clik.newPhoto({"id":3656016,"src":"Vnam_10102_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_3656016.html","width":130,"caption":"","height":92});
															thumbnails[5610044] = clik.newPhoto({"id":5610044,"src":"Brave_New_World_big_C7064E0D-24E8-5EC4-4FA3561659135A2F_thumb.jpg","galleries_id":429096,"server_id":5,"link":"photo_5610044.html","width":130,"caption":"","height":195});
															thumbnails[5571900] = clik.newPhoto({"id":5571900,"src":"Vnam_0354a_thumb.jpg","galleries_id":155433,"server_id":5,"link":"photo_5571900.html","width":130,"caption":"","height":95});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[155433] = clik.newGallery({"parentGallery":155435,"usePopups":false,"title":"Vietnam","link":"gallery_155433.html","maxRecords":0.0,"photoIDs":[3012232.0,3013324.0,3012235.0,2830814.0,2830762.0,3012234.0,3459136.0,2830818.0,3020640.0,3621115.0,3724650.0,3621132.0,3656014.0,4004420.0,3656016.0,5571900.0],"skipIndex":0,"section_code":"gallery","featured_images":"5571900,4004420,3656016,3013324,3012232","id":155433,"singleSection":false});				  						galleries[155436] = clik.newGallery({"parentGallery":155435,"usePopups":false,"title":"Laos","link":"gallery_155436.html","maxRecords":0.0,"photoIDs":[3016419.0,2830879.0,3016423.0,3013330.0,2830880.0,2830877.0,3020436.0,3742871.0,3725698.0,3742827.0],"skipIndex":0,"section_code":"gallery","featured_images":"2830880,2830877","id":155436,"singleSection":false});				  						galleries[155438] = clik.newGallery({"parentGallery":155435,"usePopups":false,"title":"Cambodia","link":"gallery_155438.html","maxRecords":0.0,"photoIDs":[3016431.0,3016436.0,3016442.0,3016445.0,3742858.0],"skipIndex":0,"section_code":"gallery","featured_images":"3016436,3016431","id":155438,"singleSection":false});				  						galleries[154844] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"China","link":"gallery_154844.html","maxRecords":0.0,"photoIDs":[8839336.0,8839343.0,8839368.0,8839352.0,8839358.0,8839365.0],"skipIndex":0,"section_code":"gallery","featured_images":8839352.0,"id":154844,"singleSection":false});				  						galleries[155435] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Indo China","link":"gallery_155435.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5571900,4004420,3656016,3016436,3016431,3013324,3012232,2830880,2830877","id":155435,"singleSection":false});				  						galleries[292711] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Istanbul","link":"gallery_292711.html","maxRecords":0.0,"photoIDs":[5183669.0,5183661.0,5183664.0,5184324.0,5183774.0,5183678.0,4879451.0,8347261.0],"skipIndex":0,"section_code":"gallery","featured_images":"5183664,5183661","id":292711,"singleSection":false});				  						galleries[337218] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nepal & India","link":"gallery_337218.html","maxRecords":0.0,"photoIDs":[5984018.0,5983967.0,5983446.0,5984001.0,5983448.0,5983882.0,5983526.0,5983592.0,5983974.0],"skipIndex":0,"section_code":"gallery","featured_images":"5984018,5983967,5983446","id":337218,"singleSection":false});				  						galleries[194988] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"SW USA","link":"gallery_194988.html","maxRecords":0.0,"photoIDs":[3016347.0,3300465.0,3188559.0,3188557.0,3188553.0,3188561.0,3188570.0,3188625.0,3188648.0,3487948.0,3606867.0,3620571.0,3299046.0,3298994.0],"skipIndex":0,"section_code":"gallery","featured_images":"3606867,3299046,3188648,3188570,3188553","id":194988,"singleSection":false});				  						galleries[155032] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Uzbekistan","link":"gallery_155032.html","maxRecords":0.0,"photoIDs":[3012513.0,2834402.0,3012455.0,2837070.0,3012457.0,3303059.0,3012461.0,7982993.0,2432738.0,3012511.0,2836913.0,2837006.0,3606638.0,3606839.0],"skipIndex":0,"section_code":"gallery","featured_images":"3606638,3012513,2837070,2834402","id":155032,"singleSection":false});				  						galleries[429096] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Exhibition Acceptances","link":"gallery_429096.html","maxRecords":0.0,"photoIDs":[3013317.0,5224700.0,3188556.0,7978893.0,7978963.0,8763814.0,8763830.0,7253664.0,7979024.0,8763843.0,8065594.0,5610044.0],"skipIndex":0,"section_code":"gallery","featured_images":"7978963,7978893,7253664,5224700,3188556,3013317","id":429096,"singleSection":false});				  						galleries[157300] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Various","link":"gallery_157300.html","maxRecords":0.0,"photoIDs":[5011611.0,4721209.0,3016349.0,7253608.0,7978874.0],"skipIndex":0,"section_code":"gallery","featured_images":5011611.0,"id":157300,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3016347,3013317,3188557,3188553,3013330,7978963,2830877,3012461,3188648,3013324';
imageSets[2] = '3012513,5984018,5011611,3016431,3013317,2834402,5224700,5183661,3188553,3016436,5983967,2837070,5983446,8839352,7978893,5183664,3188556,7978963,3188570,2830880,2830877,3012232,3188648,3013324,7253664,3606638,3606867,3299046,4004420,3656016,5571900';
imageSets[3] = '8839368,8839365,8839358,8839352,8839343,8839336,8763843,8763830,8763814,8347261,8065594,7982993,7979024,7978963,7978893,7978874,7253664,7253608,5984018,5984001,5983974,5983967,5983882,5983592,5983526,5983448,5983446,5610044,5571900,5224700,5184324,5183774,5183678,5183669,5183664,5183661,5011611,4879451,4721209,4004420,3742871,3742858,3742827,3725698,3724650,3656016,3656014,3621132,3621115,3620571';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/peterkellis/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/peterkellis/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 || photos || {})[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 = 'Peter Ellis Photography: ' + 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.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;
	}
}

			

