window.thumbnails = {};
															thumbnails[3808575] = clik.newPhoto({"id":3808575,"src":"Anchorage_Wahiba_Sands_Oman_2008_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Anchorage, Wahiba Sands; Oman 2008","height":100});
															thumbnails[3565337] = clik.newPhoto({"id":3565337,"src":"Boarding_Shanghai_2008_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Boarding, Shanghai 2008","height":87});
															thumbnails[3808577] = clik.newPhoto({"id":3808577,"src":"chair_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"chair","height":107});
															thumbnails[3808590] = clik.newPhoto({"id":3808590,"src":"Solitude_Standing_Brussels_2008_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Solitude Standing, Brussels 2008","height":101});
															thumbnails[3808591] = clik.newPhoto({"id":3808591,"src":"Sustainability_Beussent_2008_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Sustainability, Beussent 2008","height":105});
															thumbnails[3808598] = clik.newPhoto({"id":3808598,"src":"The_Spider__His_Web_Noah_Brussels_2008_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"The Spider & His Web; Noah, Brussels 2008","height":160});
															thumbnails[3528046] = clik.newPhoto({"id":3528046,"src":"A Long Drag, Xitang 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528046.html","width":130,"caption":"The Long Drag, Xitang 2006","height":87});
															thumbnails[3528100] = clik.newPhoto({"id":3528100,"src":"Art is Larger Than Life, Shanghai 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528100.html","width":130,"caption":"Art is Larger Than Life, Shanghai 2006","height":87});
															thumbnails[3528131] = clik.newPhoto({"id":3528131,"src":"For Public Consumption, Xian 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528131.html","width":130,"caption":"For Public Consumption, Xian 2006","height":87});
															thumbnails[3564921] = clik.newPhoto({"id":3564921,"src":"A_Meal_for_Two_Shanghai_2008_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564921.html","width":130,"caption":"A Meal for Two, Shanghai 2008","height":87});
															thumbnails[3564948] = clik.newPhoto({"id":3564948,"src":"The_Foundation_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564948.html","width":130,"caption":"The Foundation, Brussels 2007","height":87});
															thumbnails[3564965] = clik.newPhoto({"id":3564965,"src":"The_Message_Brussels2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564965.html","width":130,"caption":"The Message Brussels2007","height":86});
															thumbnails[3565199] = clik.newPhoto({"id":3565199,"src":"Transient__Contingent_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3565199.html","width":130,"caption":"Transient & Contingent, Brussels 2007","height":87});
															thumbnails[3807989] = clik.newPhoto({"id":3807989,"src":"A_Cut_Below_The_Rest_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3807989.html","width":130,"caption":"A Cut Below The Rest","height":132});
															thumbnails[3808513] = clik.newPhoto({"id":3808513,"src":"Alternative_Exits_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808513.html","width":130,"caption":"Alternative Exits","height":129});
															thumbnails[3808549] = clik.newPhoto({"id":3808549,"src":"Still_Waters1_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808549.html","width":130,"caption":"Still Waters","height":130});
															thumbnails[3808573] = clik.newPhoto({"id":3808573,"src":"A_Wish_Brussels_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808573.html","width":130,"caption":"A Wish, Brussels 2008","height":171});
															thumbnails[3528132] = clik.newPhoto({"id":3528132,"src":"Happiness is_thumb....., Xitang 2006.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528132.html","width":130,"caption":"Happiness is..., Xitang 2006","height":87});
															thumbnails[3564922] = clik.newPhoto({"id":3564922,"src":"A_Second_Dimension_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564922.html","width":130,"caption":"A Second Dimension, Brussels 2007","height":87});
															thumbnails[3565335] = clik.newPhoto({"id":3565335,"src":"Attraction_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565335.html","width":130,"caption":"Attraction, Brussels 2007","height":87});
															thumbnails[3807961] = clik.newPhoto({"id":3807961,"src":"Living_Is_Easy_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3807961.html","width":130,"caption":"Living Is Easy","height":132});
															thumbnails[3808514] = clik.newPhoto({"id":3808514,"src":"Calling_Cards_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808514.html","width":130,"caption":"Calling Cards","height":130});
															thumbnails[3808574] = clik.newPhoto({"id":3808574,"src":"Analog_Kiss_St_Pancras_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808574.html","width":130,"caption":"Analog Kiss, St Pancras 2008","height":170});
															thumbnails[3528102] = clik.newPhoto({"id":3528102,"src":"Between Worlds_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528102.html","width":130,"caption":"Between Worlds, Shanghai 2006","height":87});
															thumbnails[3528133] = clik.newPhoto({"id":3528133,"src":"IMG_0309_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528133.html","width":130,"caption":"By Bulb Light #1","height":87});
															thumbnails[3564923] = clik.newPhoto({"id":3564923,"src":"Connections_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564923.html","width":130,"caption":"Connections, Brussels 2007","height":87});
															thumbnails[3564950] = clik.newPhoto({"id":3564950,"src":"The_Long_Walk_Brussels_2009_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564950.html","width":130,"caption":"The Long Walk, Brussels 2009","height":87});
															thumbnails[3565512] = clik.newPhoto({"id":3565512,"src":"Hand_Signals_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3565512.html","width":130,"caption":"Hand Signals","height":128});
															thumbnails[3807962] = clik.newPhoto({"id":3807962,"src":"One_Size_Fits_All_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3807962.html","width":130,"caption":"One Size Fits All","height":131});
															thumbnails[3808515] = clik.newPhoto({"id":3808515,"src":"Clear_Horizons_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808515.html","width":130,"caption":"Clear Horizons","height":132});
															thumbnails[3528103] = clik.newPhoto({"id":3528103,"src":"By Bulb Light xx_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528103.html","width":130,"caption":"By Bulb Light #2","height":87});
															thumbnails[3528134] = clik.newPhoto({"id":3528134,"src":"IMG_0348_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528134.html","width":130,"caption":"By Bulb Light #3","height":87});
															thumbnails[3564924] = clik.newPhoto({"id":3564924,"src":"Depth_of_Vision_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564924.html","width":130,"caption":"Depth of Vision, Brussels 2007","height":87});
															thumbnails[3808516] = clik.newPhoto({"id":3808516,"src":"Flat_Roofsx_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808516.html","width":130,"caption":"Flat Roofsx","height":132});
															thumbnails[3808576] = clik.newPhoto({"id":3808576,"src":"Bridge_Over_Troubled_Waters_Den_Haag_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808576.html","width":130,"caption":"Bridge Over Troubled Waters, Den Haag 2008","height":170});
															thumbnails[3528104] = clik.newPhoto({"id":3528104,"src":"Chinas Future_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528104.html","width":130,"caption":"China's Future, Shanghai 2006","height":87});
															thumbnails[3528135] = clik.newPhoto({"id":3528135,"src":"IMG_1675-01_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528135.html","width":130,"caption":"The Great Escape, Shanghai 2005","height":87});
															thumbnails[3564925] = clik.newPhoto({"id":3564925,"src":"Essentials_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564925.html","width":130,"caption":"Essentials, Brussels 2007","height":87});
															thumbnails[3564952] = clik.newPhoto({"id":3564952,"src":"The_Private_Recital_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564952.html","width":130,"caption":"The Private Recital, Brussels 2007","height":87});
															thumbnails[3565338] = clik.newPhoto({"id":3565338,"src":"Fashion__Aggression_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565338.html","width":130,"caption":"Fashion & Aggression, Brussels 2007","height":87});
															thumbnails[3808517] = clik.newPhoto({"id":3808517,"src":"Flights_Of_Fancy_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808517.html","width":130,"caption":"Flights Of Fancy","height":133});
															thumbnails[3528105] = clik.newPhoto({"id":3528105,"src":"Cyberspace Pace, Shanghai 2006_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528105.html","width":130,"caption":"By Bulb Light #4","height":87});
															thumbnails[3528136] = clik.newPhoto({"id":3528136,"src":"IMG_1733-01_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528136.html","width":130,"caption":"The Weekend, Shanghai 2005","height":90});
															thumbnails[3564926] = clik.newPhoto({"id":3564926,"src":"Far_Away_Brussels_2009_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564926.html","width":130,"caption":"Far Away, Brussels 2009","height":87});
															thumbnails[3564953] = clik.newPhoto({"id":3564953,"src":"The_Silent_Treatment_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564953.html","width":130,"caption":"The Silent Treatment, Brussels 2007","height":87});
															thumbnails[3565514] = clik.newPhoto({"id":3565514,"src":"The_Faceless_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3565514.html","width":130,"caption":"The Faceless","height":131});
															thumbnails[3808518] = clik.newPhoto({"id":3808518,"src":"Flocks_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808518.html","width":130,"caption":"Flocks","height":130});
															thumbnails[3808578] = clik.newPhoto({"id":3808578,"src":"DreamscapeTim_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808578.html","width":130,"caption":"DreamscapeTim","height":166});
															thumbnails[3564927] = clik.newPhoto({"id":3564927,"src":"Going_Down_Birmingham_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564927.html","width":130,"caption":"Going Down, Birmingham 2007","height":87});
															thumbnails[3565340] = clik.newPhoto({"id":3565340,"src":"Gone_Shopping_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565340.html","width":130,"caption":"Gone Shopping, Brussels 2007","height":87});
															thumbnails[3565515] = clik.newPhoto({"id":3565515,"src":"The_Lonesome_Look_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3565515.html","width":130,"caption":"The Lonesome Look","height":130});
															thumbnails[3808519] = clik.newPhoto({"id":3808519,"src":"Hanging_Loose_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808519.html","width":130,"caption":"Hanging Loose","height":130});
															thumbnails[3808579] = clik.newPhoto({"id":3808579,"src":"Drifting_Bray-Dunes_2008_thumb.jpg","galleries_id":211325,"server_id":15,"link":"photo_3808579.html","width":130,"caption":"Drifting, Bray-Dunes 2008","height":178});
															thumbnails[3528138] = clik.newPhoto({"id":3528138,"src":"IMG_2443-01_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528138.html","width":130,"caption":"The Joy of Knowing, Shanghai 2005","height":195});
															thumbnails[3564955] = clik.newPhoto({"id":3564955,"src":"The_Traveller_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564955.html","width":130,"caption":"The Traveller, Brussels 2007","height":87});
															thumbnails[3565342] = clik.newPhoto({"id":3565342,"src":"La_Vie_Est_Belge_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565342.html","width":130,"caption":"La Vie Est Belge, Brussels 2007","height":87});
															thumbnails[3807966] = clik.newPhoto({"id":3807966,"src":"Shine_On_You_Crazy_Darling_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3807966.html","width":130,"caption":"Shine On (You Crazy Darling)","height":132});
															thumbnails[3808520] = clik.newPhoto({"id":3808520,"src":"Instant_Noodles_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808520.html","width":130,"caption":"Instant Noodles","height":130});
															thumbnails[3808580] = clik.newPhoto({"id":3808580,"src":"Drought_Randall_Annas_Creek_Station_SA_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808580.html","width":130,"caption":"Drought; Randall, Annas Creek Station SA 2008","height":163});
															thumbnails[3528139] = clik.newPhoto({"id":3528139,"src":"IMG_2800ed_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528139.html","width":130,"caption":"The Watchwoman, Kaili 2005","height":87});
															thumbnails[3564929] = clik.newPhoto({"id":3564929,"src":"Life_Insurance_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564929.html","width":130,"caption":"Life Insurance, Brussels 2007","height":87});
															thumbnails[3564956] = clik.newPhoto({"id":3564956,"src":"The_Waiting_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3564956.html","width":130,"caption":"The Waiting, Brussels 2007","height":87});
															thumbnails[3565343] = clik.newPhoto({"id":3565343,"src":"Leaving_Time_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565343.html","width":130,"caption":"Leaving Time, Brussels 2007","height":87});
															thumbnails[3808521] = clik.newPhoto({"id":3808521,"src":"Jack_In_The_Box_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808521.html","width":130,"caption":"Jack In The Box","height":129});
															thumbnails[3808581] = clik.newPhoto({"id":3808581,"src":"Fading_Landmark_Bray-Dunes_2008_thumb.jpg","galleries_id":211325,"server_id":15,"link":"photo_3808581.html","width":130,"caption":"Fading Landmark, Bray-Dunes 2008","height":167});
															thumbnails[3528140] = clik.newPhoto({"id":3528140,"src":"IMG_3277_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528140.html","width":130,"caption":"By Bulb Light #5","height":87});
															thumbnails[3564930] = clik.newPhoto({"id":3564930,"src":"Life_Is_A_Question_Of_Choice_Brussels_2008_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564930.html","width":130,"caption":"Life Is A Question Of Choice, Brussels 2008","height":87});
															thumbnails[3565344] = clik.newPhoto({"id":3565344,"src":"Life_Is_A_Staircase_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565344.html","width":130,"caption":"Life Is A Staircase, Brussels 2007","height":87});
															thumbnails[3565517] = clik.newPhoto({"id":3565517,"src":"View_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3565517.html","width":130,"caption":"View","height":130});
															thumbnails[3807968] = clik.newPhoto({"id":3807968,"src":"Stitch_thumb.jpg","galleries_id":211323,"server_id":15,"link":"photo_3807968.html","width":130,"caption":"Stitch","height":131});
															thumbnails[3808522] = clik.newPhoto({"id":3808522,"src":"Low_Rise_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808522.html","width":130,"caption":"Low Rise","height":130});
															thumbnails[3808582] = clik.newPhoto({"id":3808582,"src":"Heart_xBeat_A_Oman_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808582.html","width":130,"caption":"Heart xBeat; A, Oman 2008","height":172});
															thumbnails[3528141] = clik.newPhoto({"id":3528141,"src":"IMG_6314_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528141.html","width":130,"caption":"Time, Shanghai 2006","height":195});
															thumbnails[3564931] = clik.newPhoto({"id":3564931,"src":"Mind_The_Gap_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564931.html","width":130,"caption":"Mind The Gap, Brussels 2007","height":87});
															thumbnails[3565345] = clik.newPhoto({"id":3565345,"src":"Love_Is_Like_A_Bust_Stop_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565345.html","width":130,"caption":"Love Is Like A Bust Stop, Brussels 2007","height":87});
															thumbnails[3808523] = clik.newPhoto({"id":3808523,"src":"Revolution_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808523.html","width":130,"caption":"Revolution","height":133});
															thumbnails[3528142] = clik.newPhoto({"id":3528142,"src":"IMG_9344_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528142.html","width":130,"caption":"Some Like it Hot, Hong Kong 2006","height":86});
															thumbnails[3808524] = clik.newPhoto({"id":3808524,"src":"Seeing_Beyond_Your_Nose_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808524.html","width":130,"caption":"Seeing Beyond Your Nose","height":130});
															thumbnails[3808583] = clik.newPhoto({"id":3808583,"src":"Inheritence_The_Bedouin_Boy_Wahiba_SandsOman_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808583.html","width":130,"caption":"Inheritence (The Bedouin Boy), Wahiba Sands;Oman 2008","height":170});
															thumbnails[3528143] = clik.newPhoto({"id":3528143,"src":"IMG_9654_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528143.html","width":130,"caption":"By Bulb Light #6","height":87});
															thumbnails[3564933] = clik.newPhoto({"id":3564933,"src":"Sitting_On_The_Edge_Brussels_2007_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564933.html","width":130,"caption":"Sitting On The Edge, Brussels 2007","height":87});
															thumbnails[3808525] = clik.newPhoto({"id":3808525,"src":"seeing_the_Woods_for_the_Trees_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808525.html","width":130,"caption":"seeing the Woods for the Trees","height":130});
															thumbnails[3808584] = clik.newPhoto({"id":3808584,"src":"John_Baldwin_Barrossa_SA_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808584.html","width":130,"caption":"John Baldwin, Barrossa SA 2008","height":165});
															thumbnails[3528144] = clik.newPhoto({"id":3528144,"src":"Kiosk_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528144.html","width":130,"caption":"By Bulb Light #7","height":87});
															thumbnails[3564934] = clik.newPhoto({"id":3564934,"src":"Snap_Solitude_Brussels_2008_thumb.jpg","galleries_id":210490,"server_id":15,"link":"photo_3564934.html","width":130,"caption":"Snap Solitude, Brussels 2008","height":87});
															thumbnails[3565348] = clik.newPhoto({"id":3565348,"src":"Rhythms_Of_Life_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565348.html","width":130,"caption":"Rhythms Of Life, Brussels 2007","height":87});
															thumbnails[3808585] = clik.newPhoto({"id":3808585,"src":"Paige_Shanghai_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808585.html","width":130,"caption":"Paige, Shanghai 2008","height":174});
															thumbnails[3528145] = clik.newPhoto({"id":3528145,"src":"Lao Shi, Shanghai 2006_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528145.html","width":130,"caption":"Lao Shi, Shanghai 2006","height":87});
															thumbnails[3565349] = clik.newPhoto({"id":3565349,"src":"Secrets__Lies_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565349.html","width":130,"caption":"Secrets & Lies, Brussels 2007","height":87});
															thumbnails[3808527] = clik.newPhoto({"id":3808527,"src":"Smooth_Dunes_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808527.html","width":130,"caption":"Smooth Dunes","height":130});
															thumbnails[3808586] = clik.newPhoto({"id":3808586,"src":"Passage_Brussels_2008_thumb.jpg","galleries_id":211325,"server_id":15,"link":"photo_3808586.html","width":130,"caption":"Passage, Brussels 2008","height":160});
															thumbnails[3528146] = clik.newPhoto({"id":3528146,"src":"Le Chat Savant, Xitang 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528146.html","width":130,"caption":"Le Chat Savant, Xitang 2006","height":87});
															thumbnails[3808587] = clik.newPhoto({"id":3808587,"src":"Phoebes_Folly_Brussels_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808587.html","width":130,"caption":"Phoebe's Folly, Brussels 2008","height":165});
															thumbnails[3528147] = clik.newPhoto({"id":3528147,"src":"Life (On the Street) is Sweet, Shanghai 2006_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528147.html","width":130,"caption":"Life (On the Street) is Sweet, Shanghai 2006","height":193});
															thumbnails[3565351] = clik.newPhoto({"id":3565351,"src":"The_Kiss_Bruges_2008_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565351.html","width":130,"caption":"The Kiss, Bruges 2008","height":87});
															thumbnails[3808588] = clik.newPhoto({"id":3808588,"src":"Ralph_The_Rock_Berkhampstead_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808588.html","width":130,"caption":"Ralph The Rock, Berkhampstead 2008","height":170});
															thumbnails[3528148] = clik.newPhoto({"id":3528148,"src":"Look in to my eyes_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528148.html","width":130,"caption":"Barriers, Shanghai 2006","height":87});
															thumbnails[3808589] = clik.newPhoto({"id":3808589,"src":"RIP_Polaroid_burn_Bray-Dunes_2008_thumb.jpg","galleries_id":211325,"server_id":15,"link":"photo_3808589.html","width":130,"caption":"RIP (Polaroid) burn, Bray-Dunes 2008","height":167});
															thumbnails[3528149] = clik.newPhoto({"id":3528149,"src":"Mao's Child_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528149.html","width":130,"caption":"Mao's Child, Shanghai 2005","height":195});
															thumbnails[3565353] = clik.newPhoto({"id":3565353,"src":"The_Patriots_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565353.html","width":130,"caption":"The Patriots, Brussels 2007","height":87});
															thumbnails[3528150] = clik.newPhoto({"id":3528150,"src":"Matsa Body Language_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528150.html","width":130,"caption":"Body Language, Shanghai 2005","height":87});
															thumbnails[3565354] = clik.newPhoto({"id":3565354,"src":"The_Revolving_Story_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565354.html","width":130,"caption":"The Revolving Story, Brussels 2007","height":87});
															thumbnails[3528151] = clik.newPhoto({"id":3528151,"src":"Matsa Life goes on_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528151.html","width":130,"caption":"Life goes on, Shanghai 2005","height":195});
															thumbnails[3808531] = clik.newPhoto({"id":3808531,"src":"The_Surfx_thumb.jpg","galleries_id":216132,"server_id":15,"link":"photo_3808531.html","width":130,"caption":"The Surf","height":130});
															thumbnails[3528152] = clik.newPhoto({"id":3528152,"src":"Minimalist Protest, Shanghai 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528152.html","width":130,"caption":"Minimalist Protest, Shanghai 2006","height":87});
															thumbnails[3565356] = clik.newPhoto({"id":3565356,"src":"Transit_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565356.html","width":130,"caption":"Transit, Brussels 2007","height":87});
															thumbnails[3528153] = clik.newPhoto({"id":3528153,"src":"Prayers_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528153.html","width":130,"caption":"Prayers, Shanghai 2004","height":94});
															thumbnails[3565357] = clik.newPhoto({"id":3565357,"src":"When_Opportunity_Calls_Brussels_2007_thumb.jpg","galleries_id":212075,"server_id":15,"link":"photo_3565357.html","width":130,"caption":"When Opportunity Calls, Brussels 2007","height":83});
															thumbnails[3528154] = clik.newPhoto({"id":3528154,"src":"Private Moments, Public Places_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528154.html","width":130,"caption":"A Cut Below The Rest, Shanghai 2006","height":87});
															thumbnails[3528155] = clik.newPhoto({"id":3528155,"src":"Shekumenc_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528155.html","width":130,"caption":"Shekumen, Shanghai 2005","height":83});
															thumbnails[3808593] = clik.newPhoto({"id":3808593,"src":"The_Bents_Leefdal_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808593.html","width":130,"caption":"The Bents, Leefdal 2008","height":176});
															thumbnails[3808594] = clik.newPhoto({"id":3808594,"src":"The_Dream_Makers_Brussels_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808594.html","width":130,"caption":"The Dream Makers, Brussels 2008","height":170});
															thumbnails[3528157] = clik.newPhoto({"id":3528157,"src":"Super City, Shanghai 2006_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528157.html","width":130,"caption":"Super City, Shanghai 2006","height":87});
															thumbnails[3808595] = clik.newPhoto({"id":3808595,"src":"The_Kingdom_Of_The_Trees_Darcy_Brussels_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808595.html","width":130,"caption":"The Kingdom Of The Trees; Darcy, Brussels 2008","height":165});
															thumbnails[3528158] = clik.newPhoto({"id":3528158,"src":"The Art Of Drinking Tea, Shanghai 2006_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528158.html","width":130,"caption":"The Art Of Drinking, Shanghai 2006","height":87});
															thumbnails[3808596] = clik.newPhoto({"id":3808596,"src":"The_Score_Den_Haag_2008_thumb.jpg","galleries_id":232022,"server_id":15,"link":"photo_3808596.html","width":130,"caption":"The Score, Den Haag 2008","height":169});
															thumbnails[3528159] = clik.newPhoto({"id":3528159,"src":"The Bare Necessities of Street Life, SHanghai 2006_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528159.html","width":130,"caption":"The Bare Necessities of Street Life, Shanghai 2006","height":87});
															thumbnails[3808597] = clik.newPhoto({"id":3808597,"src":"The_Show_Brussels_2008_thumb.jpg","galleries_id":211327,"server_id":15,"link":"photo_3808597.html","width":130,"caption":"The Show, Brussels 2008","height":165});
															thumbnails[3528160] = clik.newPhoto({"id":3528160,"src":"The First Kiss_thumb.jpg","galleries_id":211338,"server_id":15,"link":"photo_3528160.html","width":130,"caption":"The First Kiss, Shanghai 2005","height":88});
															thumbnails[3528161] = clik.newPhoto({"id":3528161,"src":"The Gamee_thumb.jpg","galleries_id":212091,"server_id":15,"link":"photo_3528161.html","width":130,"caption":"By Bulb Light #8","height":83});
															thumbnails[3528162] = clik.newPhoto({"id":3528162,"src":"The Love Bike, Shanghai 2006_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528162.html","width":130,"caption":"The Love Bike, Shanghai 2006","height":195});
															thumbnails[3528163] = clik.newPhoto({"id":3528163,"src":"The World as I see It_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528163.html","width":130,"caption":"The World as I see It, Shanghai 2006","height":192});
															thumbnails[3528164] = clik.newPhoto({"id":3528164,"src":"Twilight_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528164.html","width":130,"caption":"Twilight, Shanghai 2005","height":192});
															thumbnails[3528165] = clik.newPhoto({"id":3528165,"src":"When we were young_thumb.jpg","galleries_id":216124,"server_id":15,"link":"photo_3528165.html","width":130,"caption":"When we were young, Shanghai 2006","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[210489] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"China Odyssey","link":"gallery_210489.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"3528165,3528164,3528163,3528162,3528161,3528160,3528159,3528158,3528157,3528155","id":210489,"singleSection":false});				  						galleries[211338] = clik.newGallery({"parentGallery":210489,"usePopups":false,"title":"Urban Days","link":"gallery_211338.html","maxRecords":0.0,"photoIDs":[3528046.0,3528100.0,3528131.0,3528132.0,3528102.0,3528104.0,3528135.0,3528136.0,3528139.0,3528142.0,3528146.0,3528148.0,3528150.0,3528152.0,3528153.0,3528154.0,3528155.0,3528157.0,3528160.0],"skipIndex":0,"section_code":"gallery","featured_images":"3528160,3528157,3528155,3528154,3528153,3528152,3528150,3528148,3528146,3528142","id":211338,"singleSection":false});				  						galleries[216124] = clik.newGallery({"parentGallery":210489,"usePopups":false,"title":"The Great Leap","link":"gallery_216124.html","maxRecords":0.0,"photoIDs":[3528138.0,3528141.0,3528147.0,3528149.0,3528151.0,3528162.0,3528163.0,3528164.0,3528165.0],"skipIndex":0,"section_code":"gallery","featured_images":"3528165,3528164,3528163,3528162,3528151,3528149,3528147,3528141,3528138","id":216124,"singleSection":false});				  						galleries[212091] = clik.newGallery({"parentGallery":210489,"usePopups":false,"title":"By Bulb Light","link":"gallery_212091.html","maxRecords":0.0,"photoIDs":[3528133.0,3528103.0,3528134.0,3528105.0,3528140.0,3528143.0,3528144.0,3528145.0,3528158.0,3528159.0,3528161.0],"skipIndex":0,"section_code":"gallery","featured_images":"3528161,3528159,3528158,3528145,3528144,3528143,3528140,3528134,3528133,3528105","id":212091,"singleSection":false});				  						galleries[212075] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Feeling Lucky","link":"gallery_212075.html","maxRecords":0.0,"photoIDs":[3565335.0,3565338.0,3565340.0,3565342.0,3564956.0,3565343.0,3565344.0,3565345.0,3565348.0,3565349.0,3565351.0,3565353.0,3565354.0,3565356.0,3565357.0],"skipIndex":0,"section_code":"gallery","featured_images":"3565357,3565356,3565354,3565353,3565351,3565349,3565348,3565345,3565344,3565343","id":212075,"singleSection":false});				  						galleries[210490] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Urban Solitude","link":"gallery_210490.html","maxRecords":0.0,"photoIDs":[3564921.0,3564948.0,3564965.0,3565199.0,3564922.0,3564923.0,3564950.0,3564924.0,3564925.0,3564952.0,3564926.0,3564953.0,3564927.0,3564955.0,3564929.0,3564930.0,3564931.0,3564933.0,3564934.0],"skipIndex":0,"section_code":"gallery","featured_images":"3565199,3564965,3564955,3564953,3564952,3564950,3564948,3564934,3564933,3564931","id":210490,"singleSection":false});				  						galleries[211323] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ex Ante","link":"gallery_211323.html","maxRecords":0.0,"photoIDs":[3807989.0,3807961.0,3565512.0,3807962.0,3565514.0,3565515.0,3807966.0,3565517.0,3807968.0],"skipIndex":0,"section_code":"gallery","featured_images":"3807989,3807968,3807966,3807962,3807961,3565517,3565515,3565514,3565512","id":211323,"singleSection":false});				  						galleries[216132] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Whatever Happened to...","link":"gallery_216132.html","maxRecords":0.0,"photoIDs":[3808513.0,3808549.0,3808514.0,3808515.0,3808516.0,3808517.0,3808518.0,3808519.0,3808520.0,3808521.0,3808522.0,3808523.0,3808524.0,3808525.0,3808527.0,3808531.0],"skipIndex":0,"section_code":"gallery","featured_images":"3808549,3808531,3808527,3808525,3808524,3808523,3808522,3808521,3808520,3808519","id":216132,"singleSection":false});				  						galleries[211325] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Land Marks","link":"gallery_211325.html","maxRecords":0.0,"photoIDs":[3808579.0,3808581.0,3808586.0,3808589.0],"skipIndex":0,"section_code":"gallery","featured_images":"3808589,3808586,3808581,3808579","id":211325,"singleSection":false});				  						galleries[211327] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Narratives","link":"gallery_211327.html","maxRecords":0.0,"photoIDs":[3808573.0,3808574.0,3808576.0,3808578.0,3808580.0,3808583.0,3808594.0,3808597.0],"skipIndex":0,"section_code":"gallery","featured_images":"3808597,3808594,3808583,3808580,3808578,3808576,3808574,3808573","id":211327,"singleSection":false});				  						galleries[232022] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_232022.html","maxRecords":0.0,"photoIDs":[3808582.0,3808584.0,3808585.0,3808587.0,3808588.0,3808593.0,3808595.0,3808596.0],"skipIndex":0,"section_code":"gallery","featured_images":"3808596,3808595,3808593,3808588,3808587,3808585,3808584,3808582","id":232022,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3808598,3808597,3808596,3808595,3808594,3808593,3808591,3808590,3808589,3808588,3808587,3808586,3808585,3808584,3808583,3808582,3808581,3808580,3808579,3808578,3808577,3808576,3808575,3808574,3808573,3808549,3808531,3808527,3808525,3808524,3808523,3808522,3808521,3808520,3808519,3808518,3808517,3808516,3808515,3808514,3808513,3807989,3807968,3807966,3807962,3807961,3565517,3565515,3565514,3565512';
imageSets[3] = '3808598,3808597,3808596,3808595,3808594,3808593,3808591,3808590,3808589,3808588,3808587,3808586,3808585,3808584,3808583,3808582,3808581,3808580,3808579,3808578,3808577,3808576,3808575,3808574,3808573,3808549,3808531,3808527,3808525,3808524,3808523,3808522,3808521,3808520,3808519,3808518,3808517,3808516,3808515,3808514,3808513,3807989,3807968,3807966,3807962,3807961,3565517,3565515,3565514,3565512';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/shangheye/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/shangheye/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/shangheye/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 = 'Kal Khogali : ' + 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> &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.item_price !== '') {
																		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="">';
					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="">';
				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;
	}
}

			

