window.thumbnails = {};
															thumbnails[4765579] = clik.newPhoto({"id":4765579,"src":"JBabstract01-01_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765579.html","width":130,"caption":"Blotch Green","height":92});
															thumbnails[4765677] = clik.newPhoto({"id":4765677,"src":"JBabstract01-21_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765677.html","width":130,"caption":"Mountain One","height":92});
															thumbnails[4766129] = clik.newPhoto({"id":4766129,"src":"JBabstract03-02b_thumb.JPG","galleries_id":455308,"server_id":18,"link":"photo_4766129.html","width":130,"caption":"Blue Cross","height":184});
															thumbnails[4787921] = clik.newPhoto({"id":4787921,"src":"Sensual-Rock1b_thumb.jpg","galleries_id":455239,"server_id":18,"link":"photo_4787921.html","width":130,"caption":"Sensual Rocks","height":92});
															thumbnails[4891968] = clik.newPhoto({"id":4891968,"src":"Water_Pebbles_05-01x_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4891968.html","width":130,"caption":"Water Pebbles","height":92});
															thumbnails[4765583] = clik.newPhoto({"id":4765583,"src":"JBabstract01-02_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765583.html","width":130,"caption":"Blotch Dark Green","height":92});
															thumbnails[4765672] = clik.newPhoto({"id":4765672,"src":"JBabstract01-18_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765672.html","width":130,"caption":"Mountain Two","height":92});
															thumbnails[4765685] = clik.newPhoto({"id":4765685,"src":"JBabstract02-03_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4765685.html","width":130,"caption":"Camden Lock","height":92});
															thumbnails[4766206] = clik.newPhoto({"id":4766206,"src":"JBabstract03-07b_thumb.JPG","galleries_id":455308,"server_id":18,"link":"photo_4766206.html","width":130,"caption":"Keystone","height":184});
															thumbnails[4787933] = clik.newPhoto({"id":4787933,"src":"Sensual-Rock2a_thumb.jpg","galleries_id":455239,"server_id":18,"link":"photo_4787933.html","width":130,"caption":"Sensual Rock","height":92});
															thumbnails[4765567] = clik.newPhoto({"id":4765567,"src":"JBabstract01-03_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765567.html","width":130,"caption":"Blotch Purple","height":92});
															thumbnails[4765674] = clik.newPhoto({"id":4765674,"src":"JBabstract01-19_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765674.html","width":130,"caption":"Mountain Three","height":92});
															thumbnails[4765696] = clik.newPhoto({"id":4765696,"src":"JBabstract02-10_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4765696.html","width":130,"caption":"Driftwood","height":92});
															thumbnails[4766207] = clik.newPhoto({"id":4766207,"src":"JBabstract03-09b_thumb.JPG","galleries_id":455308,"server_id":18,"link":"photo_4766207.html","width":130,"caption":"Open Cloister","height":184});
															thumbnails[4787937] = clik.newPhoto({"id":4787937,"src":"Liquid-Rock1a_thumb.jpg","galleries_id":455239,"server_id":18,"link":"photo_4787937.html","width":130,"caption":"Liquid Rock","height":92});
															thumbnails[4765585] = clik.newPhoto({"id":4765585,"src":"JBabstract01-04_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765585.html","width":130,"caption":"Butterfly","height":92});
															thumbnails[4765676] = clik.newPhoto({"id":4765676,"src":"JBabstract01-20_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765676.html","width":130,"caption":"Mountain Four","height":92});
															thumbnails[4765701] = clik.newPhoto({"id":4765701,"src":"JBabstract02-12_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4765701.html","width":130,"caption":"Sailing","height":92});
															thumbnails[4766209] = clik.newPhoto({"id":4766209,"src":"JBabstract03-14b_thumb.JPG","galleries_id":455308,"server_id":18,"link":"photo_4766209.html","width":130,"caption":"Strong Faith","height":184});
															thumbnails[4787954] = clik.newPhoto({"id":4787954,"src":"Liquid-Rock2a_thumb.jpg","galleries_id":455239,"server_id":18,"link":"photo_4787954.html","width":130,"caption":"Bubble Rock","height":92});
															thumbnails[4765586] = clik.newPhoto({"id":4765586,"src":"JBabstract01-05_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765586.html","width":130,"caption":"Cloud One","height":92});
															thumbnails[4765649] = clik.newPhoto({"id":4765649,"src":"JBabstract01-10_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765649.html","width":130,"caption":"Mountain Five","height":92});
															thumbnails[4765688] = clik.newPhoto({"id":4765688,"src":"JBabstract02-05_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765688.html","width":130,"caption":"Fungi","height":92});
															thumbnails[4766211] = clik.newPhoto({"id":4766211,"src":"JBabstract03-16b_thumb.JPG","galleries_id":455308,"server_id":18,"link":"photo_4766211.html","width":130,"caption":"Arch","height":184});
															thumbnails[4787984] = clik.newPhoto({"id":4787984,"src":"Liquid-Rock3a_thumb.jpg","galleries_id":455239,"server_id":18,"link":"photo_4787984.html","width":130,"caption":"Squeezed Bubbles","height":92});
															thumbnails[4792822] = clik.newPhoto({"id":4792822,"src":"JBabstract02-20_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4792822.html","width":130,"caption":"Geko","height":92});
															thumbnails[4765638] = clik.newPhoto({"id":4765638,"src":"JBabstract01-06_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765638.html","width":130,"caption":"Cloud Two","height":92});
															thumbnails[4765650] = clik.newPhoto({"id":4765650,"src":"JBabstract01-11_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765650.html","width":130,"caption":"Mountain Six","height":92});
															thumbnails[4765689] = clik.newPhoto({"id":4765689,"src":"JBabstract02-06_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765689.html","width":130,"caption":"Fungi Purple","height":92});
															thumbnails[4765643] = clik.newPhoto({"id":4765643,"src":"JBabstract01-07_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765643.html","width":130,"caption":"Cloud Three","height":92});
															thumbnails[4765687] = clik.newPhoto({"id":4765687,"src":"JBabstract02-04_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765687.html","width":130,"caption":"Eagle in Mountains","height":92});
															thumbnails[4765646] = clik.newPhoto({"id":4765646,"src":"JBabstract01-08_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765646.html","width":130,"caption":"Cloud Four","height":92});
															thumbnails[4765660] = clik.newPhoto({"id":4765660,"src":"JBabstract01-14_thumb.JPG","galleries_id":274587,"server_id":18,"link":"photo_4765660.html","width":130,"caption":"Gismic","height":92});
															thumbnails[4765692] = clik.newPhoto({"id":4765692,"src":"JBabstract02-08_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765692.html","width":130,"caption":"Lily Pond","height":92});
															thumbnails[4765647] = clik.newPhoto({"id":4765647,"src":"JBabstract01-09_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765647.html","width":130,"caption":"Cloud Five","height":92});
															thumbnails[4795502] = clik.newPhoto({"id":4795502,"src":"Cloud6-01-24_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4795502.html","width":130,"caption":"Cloud Six","height":92});
															thumbnails[4795503] = clik.newPhoto({"id":4795503,"src":"Cloud7-01-25_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4795503.html","width":130,"caption":"Cloud Seven","height":92});
															thumbnails[4795505] = clik.newPhoto({"id":4795505,"src":"Cloud8-01-26_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4795505.html","width":130,"caption":"Cloud Eight","height":92});
															thumbnails[4796727] = clik.newPhoto({"id":4796727,"src":"Clouds9-01-27x_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4796727.html","width":130,"caption":"Cloud Nine","height":92});
															thumbnails[4796735] = clik.newPhoto({"id":4796735,"src":"Cloud10-01-28x_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4796735.html","width":130,"caption":"Cloud Ten","height":92});
															thumbnails[4798211] = clik.newPhoto({"id":4798211,"src":"Cloud11-01-27x_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4798211.html","width":130,"caption":"Cloud Eleven","height":92});
															thumbnails[4765697] = clik.newPhoto({"id":4765697,"src":"JBabstract02-11_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765697.html","width":130,"caption":"Rainbow","height":92});
															thumbnails[4765652] = clik.newPhoto({"id":4765652,"src":"JBabstract01-12_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765652.html","width":130,"caption":"Elephant Eye","height":92});
															thumbnails[4765656] = clik.newPhoto({"id":4765656,"src":"JBabstract01-13_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765656.html","width":130,"caption":"Fairy Tree","height":92});
															thumbnails[4765703] = clik.newPhoto({"id":4765703,"src":"JBabstract02-13_thumb.JPG","galleries_id":97250,"server_id":18,"link":"photo_4765703.html","width":130,"caption":"Serene Storm","height":92});
															thumbnails[4765665] = clik.newPhoto({"id":4765665,"src":"JBabstract01-15_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765665.html","width":130,"caption":"Gismic Garden","height":92});
															thumbnails[4765706] = clik.newPhoto({"id":4765706,"src":"JBabstract02-15_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765706.html","width":130,"caption":"Vampire","height":92});
															thumbnails[4765667] = clik.newPhoto({"id":4765667,"src":"JBabstract01-16_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765667.html","width":130,"caption":"Dunes","height":92});
															thumbnails[4765669] = clik.newPhoto({"id":4765669,"src":"JBabstract01-17_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765669.html","width":130,"caption":"Red Lion","height":92});
															thumbnails[4765708] = clik.newPhoto({"id":4765708,"src":"JBabstract02-17_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765708.html","width":130,"caption":"Rainbow Right","height":92});
															thumbnails[4765709] = clik.newPhoto({"id":4765709,"src":"JBabstract02-18_thumb.JPG","galleries_id":274588,"server_id":18,"link":"photo_4765709.html","width":130,"caption":"Rainbow Left","height":92});
															thumbnails[4791846] = clik.newPhoto({"id":4791846,"src":"JBabstract02-19_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4791846.html","width":130,"caption":"Tropical Flower","height":92});
															thumbnails[4765679] = clik.newPhoto({"id":4765679,"src":"JBabstract01-22_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765679.html","width":130,"caption":"Night Cheetah","height":92});
															thumbnails[4765680] = clik.newPhoto({"id":4765680,"src":"JBabstract01-23_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4765680.html","width":130,"caption":"Bark","height":92});
															thumbnails[4833668] = clik.newPhoto({"id":4833668,"src":"JBabstract01-24_thumb.jpg","galleries_id":97241,"server_id":18,"link":"photo_4833668.html","width":130,"caption":"Colours","height":92});
															thumbnails[4833764] = clik.newPhoto({"id":4833764,"src":"JBabstract01-25_thumb.JPG","galleries_id":97241,"server_id":18,"link":"photo_4833764.html","width":130,"caption":"Alien","height":92});
															thumbnails[4785140] = clik.newPhoto({"id":4785140,"src":"JB03b_thumb.jpg","galleries_id":97634,"server_id":18,"link":"photo_4785140.html","width":130,"caption":"James","height":157});
															thumbnails[4850216] = clik.newPhoto({"id":4850216,"src":"002_T862234z_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4850216.html","width":130,"caption":"Oman","height":84});
															thumbnails[4902878] = clik.newPhoto({"id":4902878,"src":"Oman_Scenes_a_1_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4902878.html","width":130,"caption":"Oman - Ras al Hadd","height":83});
															thumbnails[4902883] = clik.newPhoto({"id":4902883,"src":"Oman_Scenes_a_2_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4902883.html","width":130,"caption":"Oman - Nizwa Fort","height":87});
															thumbnails[4902888] = clik.newPhoto({"id":4902888,"src":"Oman_Scenes_a_3_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4902888.html","width":130,"caption":"Oman - Eid Souk","height":84});
															thumbnails[4902896] = clik.newPhoto({"id":4902896,"src":"Oman_Scenes_a_4_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4902896.html","width":130,"caption":"Oman - Jabrin Fort","height":83});
															thumbnails[4902898] = clik.newPhoto({"id":4902898,"src":"Oman_Scenes_a_5_thumb.jpg","galleries_id":455360,"server_id":18,"link":"photo_4902898.html","width":130,"caption":"Oman - Sunrise at Jebel Shams","height":88});
															thumbnails[4902772] = clik.newPhoto({"id":4902772,"src":"Birds-a1_thumb.JPG","galleries_id":455364,"server_id":18,"link":"photo_4902772.html","width":130,"caption":"Green Backed Heron","height":98});
															thumbnails[4902857] = clik.newPhoto({"id":4902857,"src":"Weaver_a6_thumb.JPG","galleries_id":455364,"server_id":18,"link":"photo_4902857.html","width":130,"caption":"Male Thick Billed Weaver","height":98});
															thumbnails[4902795] = clik.newPhoto({"id":4902795,"src":"Birds-a2_thumb.JPG","galleries_id":455364,"server_id":18,"link":"photo_4902795.html","width":130,"caption":"Long Crested Eagle","height":98});
															thumbnails[4902863] = clik.newPhoto({"id":4902863,"src":"Weaver_a_2_thumb.jpg","galleries_id":455364,"server_id":18,"link":"photo_4902863.html","width":130,"caption":"Spotted Backed Weaver","height":98});
															thumbnails[4902793] = clik.newPhoto({"id":4902793,"src":"Birds_b3_thumb.JPG","galleries_id":455364,"server_id":18,"link":"photo_4902793.html","width":130,"caption":"Cinnamon Breasted Rock Bunting","height":179});
															thumbnails[4902867] = clik.newPhoto({"id":4902867,"src":"Weaver_a_3_thumb.jpg","galleries_id":455364,"server_id":18,"link":"photo_4902867.html","width":130,"caption":"Spotted Backed Weaver","height":98});
															thumbnails[4902799] = clik.newPhoto({"id":4902799,"src":"Birds_b4_thumb.JPG","galleries_id":455364,"server_id":18,"link":"photo_4902799.html","width":130,"caption":"Goliath Heron","height":173});
															thumbnails[4902874] = clik.newPhoto({"id":4902874,"src":"Weaver_a_4_thumb.jpg","galleries_id":455364,"server_id":18,"link":"photo_4902874.html","width":130,"caption":"Yellow Weavers","height":98});
															thumbnails[4902803] = clik.newPhoto({"id":4902803,"src":"Birds-a5_thumb.jpg","galleries_id":455364,"server_id":18,"link":"photo_4902803.html","width":130,"caption":"Pelican","height":98});
															thumbnails[4902876] = clik.newPhoto({"id":4902876,"src":"Weaver_a_5_thumb.jpg","galleries_id":455364,"server_id":18,"link":"photo_4902876.html","width":130,"caption":"Cape Weavers","height":98});
															thumbnails[4850270] = clik.newPhoto({"id":4850270,"src":"N650201ax_thumb.jpg","galleries_id":455361,"server_id":18,"link":"photo_4850270.html","width":130,"caption":"Sarawak","height":84});
															thumbnails[4902902] = clik.newPhoto({"id":4902902,"src":"Omani_Portrait_b01_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4902902.html","width":130,"caption":"Omani","height":213});
															thumbnails[4902905] = clik.newPhoto({"id":4902905,"src":"Omani_Portrait_b02_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4902905.html","width":130,"caption":"Omani","height":206});
															thumbnails[4903716] = clik.newPhoto({"id":4903716,"src":"Omani_Portrait_b03_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4903716.html","width":130,"caption":"Ahmeds Grandmother","height":205});
															thumbnails[4903830] = clik.newPhoto({"id":4903830,"src":"Omani_Portrait_b04_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4903830.html","width":130,"caption":"Omani","height":206});
															thumbnails[4903905] = clik.newPhoto({"id":4903905,"src":"Omani_Portrait_05a_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4903905.html","width":130,"caption":"Omani","height":198});
															thumbnails[4904048] = clik.newPhoto({"id":4904048,"src":"Omani_Portrait_b06_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904048.html","width":130,"caption":"Omani Boy","height":202});
															thumbnails[4904055] = clik.newPhoto({"id":4904055,"src":"Omani_Portrait_b07_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904055.html","width":130,"caption":"Omani Girl","height":202});
															thumbnails[4904060] = clik.newPhoto({"id":4904060,"src":"Omani_Portrait_b08_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904060.html","width":130,"caption":"Omani Youth","height":173});
															thumbnails[4904068] = clik.newPhoto({"id":4904068,"src":"Omani_Portrait_b09_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904068.html","width":130,"caption":"Omani","height":173});
															thumbnails[4904077] = clik.newPhoto({"id":4904077,"src":"Omani_Portrait_b10_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904077.html","width":130,"caption":"Omani Boy","height":173});
															thumbnails[4904079] = clik.newPhoto({"id":4904079,"src":"Omani_Portrait_b11_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904079.html","width":130,"caption":"Beduin Boy","height":173});
															thumbnails[4904088] = clik.newPhoto({"id":4904088,"src":"Omani_Portrait_b12_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904088.html","width":130,"caption":"Beduin Girl","height":173});
															thumbnails[4904090] = clik.newPhoto({"id":4904090,"src":"Omani_Portrait_b13_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904090.html","width":130,"caption":"Khalil","height":173});
															thumbnails[4904097] = clik.newPhoto({"id":4904097,"src":"Omani_Portrait_b14_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904097.html","width":130,"caption":"Omani Youth","height":173});
															thumbnails[4904100] = clik.newPhoto({"id":4904100,"src":"Omani_Portrait_b15_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904100.html","width":130,"caption":"Mubarak","height":173});
															thumbnails[4904112] = clik.newPhoto({"id":4904112,"src":"Omani_Portrait_b16_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904112.html","width":130,"caption":"Omani","height":173});
															thumbnails[4904118] = clik.newPhoto({"id":4904118,"src":"Omani_Portrait_b17_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904118.html","width":130,"caption":"Omani","height":173});
															thumbnails[4904123] = clik.newPhoto({"id":4904123,"src":"Omani_Portrait_b18_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904123.html","width":130,"caption":"Omani","height":173});
															thumbnails[4904136] = clik.newPhoto({"id":4904136,"src":"Omani_Portrait_b19_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904136.html","width":130,"caption":"Omani Girl","height":205});
															thumbnails[4904140] = clik.newPhoto({"id":4904140,"src":"Omani_Portrait_b20_thumb.jpg","galleries_id":455362,"server_id":18,"link":"photo_4904140.html","width":130,"caption":"Omani","height":202});
															thumbnails[4904707] = clik.newPhoto({"id":4904707,"src":"Oman_Doors__Windows_a1_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904707.html","width":130,"caption":"Omani Door","height":173});
															thumbnails[4904709] = clik.newPhoto({"id":4904709,"src":"Oman_Doors__Windows_a2_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904709.html","width":130,"caption":"Omani Door","height":173});
															thumbnails[4904711] = clik.newPhoto({"id":4904711,"src":"Oman_Doors__Windows_a3_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904711.html","width":130,"caption":"Omani Door","height":173});
															thumbnails[4904715] = clik.newPhoto({"id":4904715,"src":"Oman_Doors__Windows_a4_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904715.html","width":130,"caption":"Omani Window","height":173});
															thumbnails[4904718] = clik.newPhoto({"id":4904718,"src":"Oman_Doors__Windows_a5_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904718.html","width":130,"caption":"Omani Door","height":203});
															thumbnails[4904719] = clik.newPhoto({"id":4904719,"src":"Oman_Doors__Windows_a6_thumb.JPG","galleries_id":455363,"server_id":18,"link":"photo_4904719.html","width":130,"caption":"Omani Door","height":173});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[455364] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"birds","link":"section550960.html","maxRecords":0.0,"photoIDs":[4902772.0,4902857.0,4902795.0,4902863.0,4902793.0,4902867.0,4902799.0,4902874.0,4902803.0,4902876.0],"skipIndex":0,"section_code":"section550960","featured_images":"4902876,4902874,4902867,4902863,4902857,4902803,4902799,4902795,4902793,4902772","id":455364,"singleSection":true});				  						galleries[455363] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"doors and windows","link":"section550963.html","maxRecords":0.0,"photoIDs":[4904707.0,4904709.0,4904711.0,4904715.0,4904718.0,4904719.0],"skipIndex":0,"section_code":"section550963","featured_images":"4904719,4904718,4904715,4904711,4904709,4904707","id":455363,"singleSection":true});				  						galleries[97634] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"logos","link":"section131266.html","maxRecords":0.0,"photoIDs":[4785140.0],"skipIndex":0,"section_code":"section131266","featured_images":4785140.0,"id":97634,"singleSection":true});				  						galleries[455360] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"oman","link":"section550900_455360.html","maxRecords":0.0,"photoIDs":[4850216.0,4902878.0,4902883.0,4902888.0,4902896.0,4902898.0],"skipIndex":0,"section_code":"section550900","featured_images":"4902898,4902896,4902888,4902883,4902878,4850216","id":455360,"singleSection":false});				  						galleries[455311] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"others","link":"section550900_455311.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section550900","featured_images":"","id":455311,"singleSection":false});				  						galleries[455362] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"portraits","link":"section550962.html","maxRecords":0.0,"photoIDs":[4902902.0,4902905.0,4903716.0,4903830.0,4903905.0,4904048.0,4904055.0,4904060.0,4904068.0,4904077.0,4904079.0,4904088.0,4904090.0,4904097.0,4904100.0,4904112.0,4904118.0,4904123.0,4904136.0,4904140.0],"skipIndex":0,"section_code":"section550962","featured_images":"4904140,4904136,4904123,4904118,4904112,4904100,4904097,4904090,4904088,4904079","id":455362,"singleSection":true});				  						galleries[455361] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"sarawak","link":"section550961.html","maxRecords":0.0,"photoIDs":[4850270.0],"skipIndex":0,"section_code":"section550961","featured_images":4850270.0,"id":455361,"singleSection":true});				  						galleries[97241] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"abstracts","link":"gallery_97241.html","maxRecords":0.0,"photoIDs":[4765579.0,4765583.0,4765567.0,4765585.0,4765688.0,4765689.0,4765692.0,4765652.0,4765656.0,4765665.0,4765706.0,4765667.0,4765669.0,4791846.0,4765679.0,4765680.0,4833668.0,4833764.0],"skipIndex":0,"section_code":"gallery","featured_images":"4833764,4833668,4791846,4765706,4765692,4765689,4765688,4765680,4765679,4765669","id":97241,"singleSection":false});				  						galleries[455308] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"art arabia","link":"gallery_455308.html","maxRecords":0.0,"photoIDs":[4766129.0,4766206.0,4766207.0,4766209.0,4766211.0],"skipIndex":0,"section_code":"gallery","featured_images":"4766211,4766209,4766207,4766206,4766129","id":455308,"singleSection":false});				  						galleries[97250] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"art photos","link":"gallery_97250.html","maxRecords":0.0,"photoIDs":[4891968.0,4765685.0,4765696.0,4765701.0,4792822.0,4765703.0],"skipIndex":0,"section_code":"gallery","featured_images":"4891968,4792822,4765703,4765701,4765696,4765685","id":97250,"singleSection":false});				  						galleries[274588] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"clouds","link":"gallery_274588.html","maxRecords":0.0,"photoIDs":[4765586.0,4765638.0,4765643.0,4765646.0,4765647.0,4795502.0,4795503.0,4795505.0,4796727.0,4796735.0,4798211.0,4765697.0,4765708.0,4765709.0],"skipIndex":0,"section_code":"gallery","featured_images":"4798211,4796735,4796727,4795505,4795503,4795502,4765709,4765708,4765697,4765647","id":274588,"singleSection":false});				  						galleries[455239] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"monochrome","link":"gallery_455239.html","maxRecords":0.0,"photoIDs":[4787921.0,4787933.0,4787937.0,4787954.0,4787984.0],"skipIndex":0,"section_code":"gallery","featured_images":"4787984,4787954,4787937,4787933,4787921","id":455239,"singleSection":false});				  						galleries[274587] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"mountains","link":"gallery_274587.html","maxRecords":0.0,"photoIDs":[4765677.0,4765672.0,4765674.0,4765676.0,4765649.0,4765650.0,4765687.0,4765660.0],"skipIndex":0,"section_code":"gallery","featured_images":"4765687,4765677,4765676,4765674,4765672,4765660,4765650,4765649","id":274587,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[245576] = '4765677,4765672,4765674,4765676,4765649,4765650,4765660';
imageSets[1] = '4765579,4765685,4765583,4787937,4766209,4765701,4765676,4765585,4765650,4795502,4796727,4765697,4765703,4765667,4765679,4833764';
imageSets[2] = '4785140';
imageSets[3] = '4904719,4904718,4904715,4904711,4904709,4904707,4904140,4904136,4904123,4904118,4904112,4904100,4904097,4904090,4904088,4904079,4904077,4904068,4904060,4904055,4904048,4903905,4903830,4903716,4902905,4902902,4902898,4902896,4902888,4902883,4902878,4902876,4902874,4902867,4902863,4902857,4902803,4902799,4902795,4902793,4902772,4891968,4850270,4850216,4833764,4833668,4798211,4796735,4796727,4795505';
imageSets[245577] = '4765586,4765638,4765643,4765646,4765647,4795502,4795503,4795505,4796727,4796735,4798211,4765697,4765708,4765709';
imageSets[232552] = '4765579,4765583,4765567,4765585,4765688,4765689,4765652,4765656,4765665,4765667,4765669,4791846,4765679,4765680,4833668,4833764';
imageSets[232553] = '4902857,4902772,4902863,4902795,4902867,4902793,4902874,4902799,4902876';
imageSets[232554] = '4891968,4765685,4765701,4792822,4765703';
imageSets[232555] = '4850216,4904707,4902902,4902878,4904709,4902905,4904711,4903716,4902888,4904715,4903830,4902896,4904718,4903905,4902898,4904719,4904048,4904055,4904060,4904068,4904077,4904079,4904088,4904090,4904097,4904100,4904112,4904118,4904123,4904136,4904140';
imageSets[245589] = '4766129,4766206,4766207,4766209,4766211';
imageSets[245578] = '4787921,4787933,4787937,4787954,4787984';
imageSets[245568] = '4850270';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jbphotoart/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jbphotoart/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 = 'james butterworth 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.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> &pound;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="jb@southbroom.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="jb@southbroom.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

