window.thumbnails = {};
															thumbnails[7127717] = clik.newPhoto({"id":7127717,"src":"IMG_0043_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7127717.html","width":130,"caption":"Heaven and Earth","height":130});
															thumbnails[6253275] = clik.newPhoto({"id":6253275,"src":"IMG_PI01a_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253275.html","width":130,"caption":"Vitra","height":65});
															thumbnails[7419920] = clik.newPhoto({"id":7419920,"src":"IMG_9670G_thumb.jpg","galleries_id":332541,"server_id":15,"link":"photo_7419920.html","width":130,"caption":"First Ski Lesson","height":229});
															thumbnails[1495436] = clik.newPhoto({"id":1495436,"src":"Wbste-IMG017_thumb.jpg","galleries_id":332547,"server_id":15,"link":"photo_1495436.html","width":130,"caption":"Sunflower","height":87});
															thumbnails[840844] = clik.newPhoto({"id":840844,"src":"WBSITE_thumb.jpg_00111.JPG","galleries_id":56423,"server_id":15,"link":"photo_840844.html","width":130,"caption":"Lighthouse","height":195});
															thumbnails[7365227] = clik.newPhoto({"id":7365227,"src":"IMG_0726_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7365227.html","width":130,"caption":"River Series no.1","height":129});
															thumbnails[6253277] = clik.newPhoto({"id":6253277,"src":"IMG_0094_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253277.html","width":130,"caption":"Vitra -museum","height":83});
															thumbnails[7419971] = clik.newPhoto({"id":7419971,"src":"IMG_9730G_thumb.jpg","galleries_id":332551,"server_id":15,"link":"photo_7419971.html","width":130,"caption":"Rising with the lark","height":87});
															thumbnails[4906153] = clik.newPhoto({"id":4906153,"src":"IMG_3033trim433_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4906153.html","width":130,"caption":"View over Mittlere Brucke","height":77});
															thumbnails[2290275] = clik.newPhoto({"id":2290275,"src":"IMG_0351_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_2290275.html","width":130,"caption":"Aerial View of Basel ","height":130});
															thumbnails[735408] = clik.newPhoto({"id":735408,"src":"IMG_6525final_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_735408.html","width":130,"caption":"Early one morning","height":55});
															thumbnails[735414] = clik.newPhoto({"id":735414,"src":"WBSITE_thumb.jpg_0079.JPG","galleries_id":56427,"server_id":15,"link":"photo_735414.html","width":130,"caption":"Munster","height":195});
															thumbnails[6254443] = clik.newPhoto({"id":6254443,"src":"IMG_0140_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254443.html","width":130,"caption":"Vitra","height":195});
															thumbnails[7419525] = clik.newPhoto({"id":7419525,"src":"IMG_The-journey_thumb.jpg","galleries_id":402098,"server_id":15,"link":"photo_7419525.html","width":130,"caption":"The journey","height":118});
															thumbnails[7365246] = clik.newPhoto({"id":7365246,"src":"IMG_0724_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7365246.html","width":130,"caption":"Raindrops","height":131});
															thumbnails[6254458] = clik.newPhoto({"id":6254458,"src":"IMG_9989_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254458.html","width":130,"caption":"Vitra","height":82});
															thumbnails[7419514] = clik.newPhoto({"id":7419514,"src":"IMG_Nadias-Garden_thumb.jpg","galleries_id":402098,"server_id":15,"link":"photo_7419514.html","width":130,"caption":"Nadia's Garden","height":130});
															thumbnails[7365038] = clik.newPhoto({"id":7365038,"src":"IMG_0745Bottmingen_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365038.html","width":130,"caption":"Flowers at Bottmingen","height":130});
															thumbnails[7127758] = clik.newPhoto({"id":7127758,"src":"IMG_0064_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7127758.html","width":130,"caption":"Bachalpsee II","height":130});
															thumbnails[6254614] = clik.newPhoto({"id":6254614,"src":"IMG_9981_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254614.html","width":130,"caption":"Detail","height":87});
															thumbnails[7419777] = clik.newPhoto({"id":7419777,"src":"IMG_9658G_thumb.jpg","galleries_id":332551,"server_id":15,"link":"photo_7419777.html","width":130,"caption":"View over the Alps","height":195});
															thumbnails[6254593] = clik.newPhoto({"id":6254593,"src":"IMG_0358_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_6254593.html","width":130,"caption":"In my Father's Garden","height":26});
															thumbnails[3426486] = clik.newPhoto({"id":3426486,"src":"IMG_1315panoramwt_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_3426486.html","width":130,"caption":"Panoramic view of Basel from the Bruderholz Watertower","height":36});
															thumbnails[4699121] = clik.newPhoto({"id":4699121,"src":"IMG_290728Bergli_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699121.html","width":130,"caption":"Mittlere Brucke","height":76});
															thumbnails[1124270] = clik.newPhoto({"id":1124270,"src":"Website_thumb.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124270.html","width":130,"caption":"Semana Santa","height":195});
															thumbnails[792863] = clik.newPhoto({"id":792863,"src":"WBSITE_thumb.jpg_0186.JPG","galleries_id":61613,"server_id":15,"link":"photo_792863.html","width":130,"caption":"Fasnacht","height":195});
															thumbnails[840841] = clik.newPhoto({"id":840841,"src":"WBSITE_thumb.jpg_00401.JPG","galleries_id":56423,"server_id":15,"link":"photo_840841.html","width":130,"caption":"El Rompido","height":191});
															thumbnails[7365158] = clik.newPhoto({"id":7365158,"src":"IMG_0736Muttenz_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365158.html","width":130,"caption":"Vineyards of Muttenz- One summers day","height":130});
															thumbnails[7127749] = clik.newPhoto({"id":7127749,"src":"IMG_0060_1_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7127749.html","width":130,"caption":"Flowers at Bottmingen","height":130});
															thumbnails[7419851] = clik.newPhoto({"id":7419851,"src":"IMG_9692G_thumb.jpg","galleries_id":332551,"server_id":15,"link":"photo_7419851.html","width":130,"caption":"First Light","height":84});
															thumbnails[3426246] = clik.newPhoto({"id":3426246,"src":"IMG_9994dyptich09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426246.html","width":130,"caption":"The Odiel Reserve (Where flamingos walk)","height":64});
															thumbnails[3426244] = clik.newPhoto({"id":3426244,"src":"IMG_9991woodland09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426244.html","width":130,"caption":"The Forest, Abstract","height":42});
															thumbnails[840705] = clik.newPhoto({"id":840705,"src":"WBSITE_thumb.jpg_00261.JPG","galleries_id":56426,"server_id":15,"link":"photo_840705.html","width":130,"caption":"Marina at Nuevo Portil","height":195});
															thumbnails[7127782] = clik.newPhoto({"id":7127782,"src":"IMG_9333_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7127782.html","width":130,"caption":"Sailing around the spit.","height":54});
															thumbnails[3424330] = clik.newPhoto({"id":3424330,"src":"IMG_2098feb-09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3424330.html","width":130,"caption":"Abstract \/ When you follow the sun.....","height":129});
															thumbnails[3424267] = clik.newPhoto({"id":3424267,"src":"IMG_2095feb-09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3424267.html","width":130,"caption":"The Garden","height":131});
															thumbnails[1495445] = clik.newPhoto({"id":1495445,"src":"wbste-IMG022_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1495445.html","width":130,"caption":"Sunrise over the Rhine","height":164});
															thumbnails[7365159] = clik.newPhoto({"id":7365159,"src":"IMG_0723_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365159.html","width":130,"caption":"As time goes by- Basel Munster","height":103});
															thumbnails[7420008] = clik.newPhoto({"id":7420008,"src":"IMG_9483G_thumb.jpg","galleries_id":332551,"server_id":15,"link":"photo_7420008.html","width":130,"caption":"Snow at Dornach","height":87});
															thumbnails[6253186] = clik.newPhoto({"id":6253186,"src":"IMG_0019_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253186.html","width":130,"caption":"Fire Station , Vitra","height":86});
															thumbnails[1124266] = clik.newPhoto({"id":1124266,"src":"WBSITE_thumb.jpg_9790.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124266.html","width":130,"caption":"Semana Santa","height":198});
															thumbnails[840985] = clik.newPhoto({"id":840985,"src":"WBSITE_thumb.jpg_0068.JPG","galleries_id":56427,"server_id":15,"link":"photo_840985.html","width":130,"caption":"View across the Rhine","height":87});
															thumbnails[738960] = clik.newPhoto({"id":738960,"src":"WBSITE_thumb.jpg_0125.JPG","galleries_id":332533,"server_id":15,"link":"photo_738960.html","width":130,"caption":"El Rompido lighthouse","height":265});
															thumbnails[736074] = clik.newPhoto({"id":736074,"src":"WBSITE_thumb.jpg_0105.JPG","galleries_id":332541,"server_id":15,"link":"photo_736074.html","width":130,"caption":"Castles on the beach","height":87});
															thumbnails[736046] = clik.newPhoto({"id":736046,"src":"WBSITE_thumb.jpg_0089.JPG","galleries_id":332547,"server_id":15,"link":"photo_736046.html","width":130,"caption":"Calla Lily","height":203});
															thumbnails[7365162] = clik.newPhoto({"id":7365162,"src":"IMG_0720_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365162.html","width":130,"caption":"The Rhine, sketch","height":162});
															thumbnails[7420370] = clik.newPhoto({"id":7420370,"src":"IMG_9390B_thumb.jpg","galleries_id":332551,"server_id":15,"link":"photo_7420370.html","width":130,"caption":"Bachalpsee","height":78});
															thumbnails[6253272] = clik.newPhoto({"id":6253272,"src":"IMG_0038_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253272.html","width":130,"caption":"Fire Station","height":92});
															thumbnails[4699106] = clik.newPhoto({"id":4699106,"src":"IMG0131_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699106.html","width":130,"caption":"Les Trois Roi","height":195});
															thumbnails[7365168] = clik.newPhoto({"id":7365168,"src":"IMG_07211_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365168.html","width":130,"caption":"Flying high","height":164});
															thumbnails[6253271] = clik.newPhoto({"id":6253271,"src":"IMG_0027_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253271.html","width":130,"caption":"Fire Station II","height":169});
															thumbnails[3426514] = clik.newPhoto({"id":3426514,"src":"IMG_2851panbw-h_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_3426514.html","width":130,"caption":"On the way to the Fair","height":74});
															thumbnails[1502917] = clik.newPhoto({"id":1502917,"src":"Wbste-IMG020_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1502917.html","width":130,"caption":"Abstract ","height":132});
															thumbnails[6253270] = clik.newPhoto({"id":6253270,"src":"IMG_PI02_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6253270.html","width":130,"caption":"Fire Station ","height":196});
															thumbnails[4699099] = clik.newPhoto({"id":4699099,"src":"IMG_43031_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699099.html","width":130,"caption":"Wettstein Brucke","height":87});
															thumbnails[735419] = clik.newPhoto({"id":735419,"src":"WBSITE_thumb.jpg_0070.JPG","galleries_id":56427,"server_id":15,"link":"photo_735419.html","width":130,"caption":"Mittlere Brucke","height":195});
															thumbnails[7365178] = clik.newPhoto({"id":7365178,"src":"IMG_07222_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365178.html","width":130,"caption":"Basel ","height":162});
															thumbnails[7365194] = clik.newPhoto({"id":7365194,"src":"IMG_0732_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365194.html","width":130,"caption":"towards the Munster","height":127});
															thumbnails[4699116] = clik.newPhoto({"id":4699116,"src":"IMG_51841_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699116.html","width":130,"caption":"Houses at Kleinbasel","height":195});
															thumbnails[3426243] = clik.newPhoto({"id":3426243,"src":"webste-IMG125_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426243.html","width":130,"caption":"The Beach","height":130});
															thumbnails[1124272] = clik.newPhoto({"id":1124272,"src":"WBsite_thumb.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124272.html","width":130,"caption":"Semana Santa","height":214});
															thumbnails[841027] = clik.newPhoto({"id":841027,"src":"WBSITE_thumb.jpg_0073.JPG","galleries_id":56427,"server_id":15,"link":"photo_841027.html","width":130,"caption":"Ferry crossing","height":195});
															thumbnails[7365209] = clik.newPhoto({"id":7365209,"src":"IMG_0740_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365209.html","width":130,"caption":"Basel Sketch series no.6","height":174});
															thumbnails[6254532] = clik.newPhoto({"id":6254532,"src":"IMG_0341_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_6254532.html","width":130,"caption":"Basel on the Rhine","height":129});
															thumbnails[3426255] = clik.newPhoto({"id":3426255,"src":"IMG_9985-smblue-09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426255.html","width":130,"caption":"Abstract","height":131});
															thumbnails[4699124] = clik.newPhoto({"id":4699124,"src":"IMG_692511_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699124.html","width":130,"caption":"Ferry to the Munster","height":195});
															thumbnails[6254490] = clik.newPhoto({"id":6254490,"src":"IMG_0059_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254490.html","width":130,"caption":"Fire Station","height":170});
															thumbnails[3426257] = clik.newPhoto({"id":3426257,"src":"IMG_9988-feb-09pink_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426257.html","width":130,"caption":"Abstract","height":44});
															thumbnails[4699113] = clik.newPhoto({"id":4699113,"src":"IMG_29061_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699113.html","width":130,"caption":"Mittlere Brucke","height":195});
															thumbnails[4699127] = clik.newPhoto({"id":4699127,"src":"IMG0151_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699127.html","width":130,"caption":"Waiting for the Ferry II","height":191});
															thumbnails[942865] = clik.newPhoto({"id":942865,"src":"IMG191_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_942865.html","width":130,"caption":"","height":195});
															thumbnails[7365213] = clik.newPhoto({"id":7365213,"src":"IMG_0738_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365213.html","width":130,"caption":"Les Trois Rois","height":171});
															thumbnails[943080] = clik.newPhoto({"id":943080,"src":"IMG186_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_943080.html","width":130,"caption":"Fire Boat I","height":71});
															thumbnails[735275] = clik.newPhoto({"id":735275,"src":"WBSITE_thumb.jpg_0016.JPG","galleries_id":56427,"server_id":15,"link":"photo_735275.html","width":130,"caption":"Big Wheel at the Herbstmesse","height":87});
															thumbnails[1118978] = clik.newPhoto({"id":1118978,"src":"webste-IMG124_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1118978.html","width":130,"caption":"Hong Kong","height":107});
															thumbnails[7365217] = clik.newPhoto({"id":7365217,"src":"IMG_0739_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365217.html","width":130,"caption":"Ferry","height":171});
															thumbnails[3426344] = clik.newPhoto({"id":3426344,"src":"IMG_9985fields09_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3426344.html","width":130,"caption":"Abstract Fields","height":129});
															thumbnails[943094] = clik.newPhoto({"id":943094,"src":"IMG185_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_943094.html","width":130,"caption":"Fire boat II","height":195});
															thumbnails[1116950] = clik.newPhoto({"id":1116950,"src":"webste-IMG114_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1116950.html","width":130,"caption":"Harbour Lights","height":170});
															thumbnails[6254454] = clik.newPhoto({"id":6254454,"src":"IMG_0163_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254454.html","width":130,"caption":"Vitra House","height":87});
															thumbnails[3424357] = clik.newPhoto({"id":3424357,"src":"IMG_2093-feb-092_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_3424357.html","width":130,"caption":"Abstract-Australia","height":157});
															thumbnails[4699140] = clik.newPhoto({"id":4699140,"src":"IMG_24121_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_4699140.html","width":130,"caption":"Big Wheel, Luzern Fair","height":195});
															thumbnails[1124275] = clik.newPhoto({"id":1124275,"src":"WBSITE_thumb.jpg_9832.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124275.html","width":130,"caption":"Procession of the Virgin Mary","height":195});
															thumbnails[840923] = clik.newPhoto({"id":840923,"src":"WBSITE_thumb.jpg_0017.JPG","galleries_id":56427,"server_id":15,"link":"photo_840923.html","width":130,"caption":"Big wheel","height":195});
															thumbnails[840727] = clik.newPhoto({"id":840727,"src":"WBSITE_thumb.jpg_01181.JPG","galleries_id":56426,"server_id":15,"link":"photo_840727.html","width":130,"caption":"Running Solo","height":195});
															thumbnails[6254448] = clik.newPhoto({"id":6254448,"src":"IMG_0147_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254448.html","width":130,"caption":"Vitra House<br>\r\nArchitect: Herzog & de Meuron","height":181});
															thumbnails[943145] = clik.newPhoto({"id":943145,"src":"IMG1901_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_943145.html","width":130,"caption":"les Trois Rois","height":87});
															thumbnails[6254455] = clik.newPhoto({"id":6254455,"src":"IMG_0219_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254455.html","width":130,"caption":"Staircase","height":87});
															thumbnails[943153] = clik.newPhoto({"id":943153,"src":"IMG189_thumb.jpg","galleries_id":56427,"server_id":15,"link":"photo_943153.html","width":130,"caption":"Between Shifts","height":195});
															thumbnails[6254495] = clik.newPhoto({"id":6254495,"src":"IMG_0211_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254495.html","width":130,"caption":"Interior","height":89});
															thumbnails[840835] = clik.newPhoto({"id":840835,"src":"WBSITE_thumb.jpg_00351.JPG","galleries_id":56426,"server_id":15,"link":"photo_840835.html","width":130,"caption":"View to El Rompido","height":195});
															thumbnails[840744] = clik.newPhoto({"id":840744,"src":"WBSITE_thumb.jpg_00371.JPG","galleries_id":56426,"server_id":15,"link":"photo_840744.html","width":130,"caption":"El Rompido","height":195});
															thumbnails[6254542] = clik.newPhoto({"id":6254542,"src":"IMG_0353_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_6254542.html","width":130,"caption":"Basel Munster","height":130});
															thumbnails[1124810] = clik.newPhoto({"id":1124810,"src":"Website_thumb.jpg_5845.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124810.html","width":130,"caption":"Romaria","height":98});
															thumbnails[840974] = clik.newPhoto({"id":840974,"src":"WBSITE_thumb.jpg_0018.JPG","galleries_id":56427,"server_id":15,"link":"photo_840974.html","width":130,"caption":"Herbstmesse","height":195});
															thumbnails[6254549] = clik.newPhoto({"id":6254549,"src":"IMG_0327_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_6254549.html","width":130,"caption":"Monday Morning on the Rhine","height":130});
															thumbnails[7127726] = clik.newPhoto({"id":7127726,"src":"IMG_0059_9704A8B9-1EC9-D45B-1CBA78C84FAC2770_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_7127726.html","width":130,"caption":"Bachalpsee","height":105});
															thumbnails[1124803] = clik.newPhoto({"id":1124803,"src":"Website_thumb.jpg_5873.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124803.html","width":130,"caption":"Romaria","height":103});
															thumbnails[840760] = clik.newPhoto({"id":840760,"src":"WBSITE_thumb.jpg_00381.JPG","galleries_id":56426,"server_id":15,"link":"photo_840760.html","width":130,"caption":"Sunset, El Rompido","height":87});
															thumbnails[738202] = clik.newPhoto({"id":738202,"src":"WBSITE_thumb.jpg_0116.JPG","galleries_id":332533,"server_id":15,"link":"photo_738202.html","width":130,"caption":"Beach and Tide","height":61});
															thumbnails[3426237] = clik.newPhoto({"id":3426237,"src":"IMG_0011skmbrucke09_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_3426237.html","width":130,"caption":"Mittlere Brucke, Basel","height":63});
															thumbnails[6254487] = clik.newPhoto({"id":6254487,"src":"IMG_0137_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254487.html","width":130,"caption":"Conference Centre Cafe","height":194});
															thumbnails[4699199] = clik.newPhoto({"id":4699199,"src":"IMG_0328a_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_4699199.html","width":130,"caption":"Summer Evening by the Rhine","height":62});
															thumbnails[6254482] = clik.newPhoto({"id":6254482,"src":"IMG_0129_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254482.html","width":130,"caption":"Conference Centre<br>\r\nArchitect: Tadao Ando","height":87});
															thumbnails[2280493] = clik.newPhoto({"id":2280493,"src":"IMG_8186-webmunsterrhine_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_2280493.html","width":130,"caption":"Munster on the Rhine, Basel","height":63});
															thumbnails[1124809] = clik.newPhoto({"id":1124809,"src":"Website_thumb.jpg_5926.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124809.html","width":130,"caption":"Romaria","height":183});
															thumbnails[792887] = clik.newPhoto({"id":792887,"src":"WBSITE_thumb.jpg_0177.JPG","galleries_id":61613,"server_id":15,"link":"photo_792887.html","width":130,"caption":"Cliques","height":133});
															thumbnails[840967] = clik.newPhoto({"id":840967,"src":"WBSITE_thumb.jpg_00151.JPG","galleries_id":56427,"server_id":15,"link":"photo_840967.html","width":130,"caption":"View from Big Wheel","height":195});
															thumbnails[738962] = clik.newPhoto({"id":738962,"src":"WBSITE_thumb.jpg_0124.JPG","galleries_id":332533,"server_id":15,"link":"photo_738962.html","width":130,"caption":"Abstract","height":155});
															thumbnails[3426533] = clik.newPhoto({"id":3426533,"src":"IMG_3415houses-Rhine_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_3426533.html","width":130,"caption":"Riverside Houses, Basel","height":99});
															thumbnails[792899] = clik.newPhoto({"id":792899,"src":"WBSITE_thumb.jpg_0187.JPG","galleries_id":61613,"server_id":15,"link":"photo_792899.html","width":130,"caption":"Kinder Fasnacht","height":195});
															thumbnails[2275916] = clik.newPhoto({"id":2275916,"src":"IMG_0344_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_2275916.html","width":130,"caption":"Aerial View of Basel","height":103});
															thumbnails[6254515] = clik.newPhoto({"id":6254515,"src":"IMG_0009_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254515.html","width":130,"caption":"Pump Station<br>\r\nArchitect: John Prouve'","height":100});
															thumbnails[2280499] = clik.newPhoto({"id":2280499,"src":"IMG-8216webmarktplatz_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_2280499.html","width":130,"caption":"The Rathaus and Marktplatz, Basel","height":156});
															thumbnails[1124825] = clik.newPhoto({"id":1124825,"src":"Website_thumb.jpg_5939.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124825.html","width":130,"caption":"Fiesta","height":195});
															thumbnails[792904] = clik.newPhoto({"id":792904,"src":"WBSITE_thumb.jpg_0178.JPG","galleries_id":61613,"server_id":15,"link":"photo_792904.html","width":130,"caption":"Mandarin","height":203});
															thumbnails[736085] = clik.newPhoto({"id":736085,"src":"WBSITE_thumb.jpg_0108.JPG","galleries_id":332541,"server_id":15,"link":"photo_736085.html","width":130,"caption":"Beach in Winter","height":87});
															thumbnails[840865] = clik.newPhoto({"id":840865,"src":"WBSITE_thumb.jpg_0007.JPG","galleries_id":56423,"server_id":15,"link":"photo_840865.html","width":130,"caption":"Town Hall","height":195});
															thumbnails[6254520] = clik.newPhoto({"id":6254520,"src":"IMG_0004_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254520.html","width":130,"caption":"Architect: Buckminster Fuller","height":195});
															thumbnails[7365253] = clik.newPhoto({"id":7365253,"src":"IMG_0717_thumb.jpg","galleries_id":56733,"server_id":15,"link":"photo_7365253.html","width":130,"caption":"Towards Pfeffingen","height":174});
															thumbnails[6254521] = clik.newPhoto({"id":6254521,"src":"IMG_0002_thumb.jpg","galleries_id":347736,"server_id":15,"link":"photo_6254521.html","width":130,"caption":"Interior","height":195});
															thumbnails[1124833] = clik.newPhoto({"id":1124833,"src":"Website_thumb.jpg_6008.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124833.html","width":130,"caption":"Fiesta","height":97});
															thumbnails[792907] = clik.newPhoto({"id":792907,"src":"WBSITE_thumb.jpg_0180.JPG","galleries_id":61613,"server_id":15,"link":"photo_792907.html","width":130,"caption":"Sunshine","height":216});
															thumbnails[840876] = clik.newPhoto({"id":840876,"src":"WBSITE_thumb.jpg_00091.JPG","galleries_id":56423,"server_id":15,"link":"photo_840876.html","width":130,"caption":"Marina at Ayamonte","height":195});
															thumbnails[738207] = clik.newPhoto({"id":738207,"src":"WBSITE_thumb.jpg_01211.JPG","galleries_id":332547,"server_id":15,"link":"photo_738207.html","width":130,"caption":"Calla Lily","height":137});
															thumbnails[735458] = clik.newPhoto({"id":735458,"src":"WBSITE_thumb.jpg_0052.JPG","galleries_id":56733,"server_id":15,"link":"photo_735458.html","width":130,"caption":"Sevilla","height":201});
															thumbnails[792912] = clik.newPhoto({"id":792912,"src":"WBSITE_thumb.jpg_0190.JPG","galleries_id":61613,"server_id":15,"link":"photo_792912.html","width":130,"caption":"Neptune and fish","height":102});
															thumbnails[1124874] = clik.newPhoto({"id":1124874,"src":"Website_thumb.jpg_6055.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124874.html","width":130,"caption":"Fiesta","height":195});
															thumbnails[1116929] = clik.newPhoto({"id":1116929,"src":"webste-IMG126_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1116929.html","width":130,"caption":"Fields of sunflowers","height":132});
															thumbnails[3426491] = clik.newPhoto({"id":3426491,"src":"IMG_1610bwmut3_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_3426491.html","width":130,"caption":"Muttenz I","height":195});
															thumbnails[3426489] = clik.newPhoto({"id":3426489,"src":"IMG_1603bwmut2_thumb.jpg","galleries_id":209437,"server_id":15,"link":"photo_3426489.html","width":130,"caption":"Muttenz  II","height":87});
															thumbnails[1124838] = clik.newPhoto({"id":1124838,"src":"Website_thumb.jpg_6006.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124838.html","width":130,"caption":"Romaria","height":195});
															thumbnails[840882] = clik.newPhoto({"id":840882,"src":"WBSITE_thumb.jpg_00101.JPG","galleries_id":56423,"server_id":15,"link":"photo_840882.html","width":130,"caption":"Marina II","height":87});
															thumbnails[735463] = clik.newPhoto({"id":735463,"src":"WBSITE_thumb.jpg_0053.JPG","galleries_id":56733,"server_id":15,"link":"photo_735463.html","width":130,"caption":"Sydney, view from Kurraba Point","height":161});
															thumbnails[792923] = clik.newPhoto({"id":792923,"src":"WBSITE_thumb.jpg_0174.JPG","galleries_id":61613,"server_id":15,"link":"photo_792923.html","width":130,"caption":"","height":147});
															thumbnails[1124849] = clik.newPhoto({"id":1124849,"src":"Website_thumb.jpg_6117.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124849.html","width":130,"caption":"Virgin Mary","height":195});
															thumbnails[792917] = clik.newPhoto({"id":792917,"src":"WBSITE_thumb.jpg_0179.JPG","galleries_id":61613,"server_id":15,"link":"photo_792917.html","width":130,"caption":"Waggis","height":195});
															thumbnails[841045] = clik.newPhoto({"id":841045,"src":"WBSITE_thumb.jpg_00871.JPG","galleries_id":56427,"server_id":15,"link":"photo_841045.html","width":130,"caption":"Basel II","height":141});
															thumbnails[1124856] = clik.newPhoto({"id":1124856,"src":"Website_thumb.jpg_6126.jpg","galleries_id":82134,"server_id":15,"link":"photo_1124856.html","width":130,"caption":"Watching ","height":195});
															thumbnails[792920] = clik.newPhoto({"id":792920,"src":"WBSITE_thumb.jpg_0196.JPG","galleries_id":61613,"server_id":15,"link":"photo_792920.html","width":130,"caption":"Nuns","height":142});
															thumbnails[736097] = clik.newPhoto({"id":736097,"src":"WBSITE_thumb.jpg_0112.JPG","galleries_id":332541,"server_id":15,"link":"photo_736097.html","width":130,"caption":"","height":96});
															thumbnails[840813] = clik.newPhoto({"id":840813,"src":"WBSITE_thumb.jpg_00301.JPG","galleries_id":56426,"server_id":15,"link":"photo_840813.html","width":130,"caption":"Sunset","height":195});
															thumbnails[840906] = clik.newPhoto({"id":840906,"src":"WBSITE_thumb.jpg_00121.JPG","galleries_id":56423,"server_id":15,"link":"photo_840906.html","width":130,"caption":"Funfair at Zoomarine ","height":195});
															thumbnails[1116854] = clik.newPhoto({"id":1116854,"src":"webste IMG109_thumb.JPG","galleries_id":332533,"server_id":15,"link":"photo_1116854.html","width":130,"caption":"Early morning on the beach","height":132});
															thumbnails[792926] = clik.newPhoto({"id":792926,"src":"WBSITE_thumb.jpg_0194.JPG","galleries_id":61613,"server_id":15,"link":"photo_792926.html","width":130,"caption":"","height":93});
															thumbnails[840819] = clik.newPhoto({"id":840819,"src":"WBSITE_thumb.jpg_0044.JPG","galleries_id":56426,"server_id":15,"link":"photo_840819.html","width":130,"caption":"Fishing at dusk","height":195});
															thumbnails[840827] = clik.newPhoto({"id":840827,"src":"WBSITE_thumb.jpg_0041.JPG","galleries_id":56426,"server_id":15,"link":"photo_840827.html","width":130,"caption":"G&Ts at sunset","height":195});
															thumbnails[840830] = clik.newPhoto({"id":840830,"src":"WBSITE_thumb.jpg_0042.JPG","galleries_id":56426,"server_id":15,"link":"photo_840830.html","width":130,"caption":"Sunset","height":87});
															thumbnails[1119017] = clik.newPhoto({"id":1119017,"src":"webste-IMG122_thumb.jpg","galleries_id":332533,"server_id":15,"link":"photo_1119017.html","width":130,"caption":"Retrospective","height":104});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[332532] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Fine Art","link":"gallery_332532.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7365038,4699199,2290275","id":332532,"singleSection":false});				  						galleries[56733] = clik.newGallery({"parentGallery":332532,"usePopups":true,"title":"Drawings and watercolours","link":"gallery_56733.html","maxRecords":0.0,"photoIDs":[2290275.0,7365038.0,7365158.0,7365159.0,7365162.0,7365168.0,7365178.0,7365194.0,7365209.0,6254532.0,7365213.0,7365217.0,6254542.0,6254549.0,3426237.0,4699199.0,2280493.0,3426533.0,2275916.0,2280499.0,7365253.0,735458.0,735463.0],"skipIndex":0,"section_code":"gallery","featured_images":"7365038,4699199,2290275","id":56733,"singleSection":false});				  						galleries[332533] = clik.newGallery({"parentGallery":332532,"usePopups":true,"title":"Acrylics and oils","link":"gallery_332533.html","maxRecords":0.0,"photoIDs":[7127717.0,7365227.0,7365246.0,7127758.0,6254593.0,7127749.0,3426246.0,3426244.0,7127782.0,3424330.0,3424267.0,1495445.0,738960.0,1502917.0,3426243.0,3426255.0,3426257.0,1118978.0,3426344.0,1116950.0,3424357.0,7127726.0,738202.0,738962.0,1116929.0,1116854.0,1119017.0],"skipIndex":0,"section_code":"gallery","featured_images":"7365246,7365227,7127782,7127758,7127749,7127726,7127717,6254593,3426344,3426257","id":332533,"singleSection":false});				  						galleries[269683] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Black and White Photography","link":"gallery_269683.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"4906153,4699140,4699127,4699124,4699121,4699116,4699113,4699106,4699099,3426514","id":269683,"singleSection":false});				  						galleries[209437] = clik.newGallery({"parentGallery":269683,"usePopups":true,"title":"Switzerland","link":"gallery_209437.html","maxRecords":0.0,"photoIDs":[4906153.0,4699121.0,4699106.0,3426514.0,4699099.0,4699116.0,4699124.0,4699113.0,4699127.0,4699140.0,3426491.0,3426489.0],"skipIndex":0,"section_code":"gallery","featured_images":"4906153,4699140,4699127,4699124,4699121,4699116,4699113,4699106,4699099,3426514","id":209437,"singleSection":false});				  						galleries[332543] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Architecture","link":"gallery_332543.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6253275,6253186","id":332543,"singleSection":false});				  						galleries[56427] = clik.newGallery({"parentGallery":332543,"usePopups":true,"title":"Switzerland","link":"gallery_56427.html","maxRecords":0.0,"photoIDs":[735408.0,735414.0,3426486.0,840985.0,735419.0,841027.0,942865.0,943080.0,735275.0,943094.0,840923.0,943145.0,943153.0,840974.0,840967.0,841045.0],"skipIndex":0,"section_code":"gallery","featured_images":"3426486,943153,943145,943094,943080,942865,841045,841027,840985,840974","id":56427,"singleSection":false});				  						galleries[56423] = clik.newGallery({"parentGallery":332543,"usePopups":true,"title":"Spanish Architecture","link":"gallery_56423.html","maxRecords":0.0,"photoIDs":[840844.0,840841.0,840865.0,840876.0,840882.0,840906.0],"skipIndex":0,"section_code":"gallery","featured_images":"840906,840882,840876,840865,840844,840841","id":56423,"singleSection":false});				  						galleries[347736] = clik.newGallery({"parentGallery":332543,"usePopups":true,"title":"Vitra","link":"gallery_347736.html","maxRecords":0.0,"photoIDs":[6253275.0,6253277.0,6254443.0,6254458.0,6254614.0,6253186.0,6253272.0,6253271.0,6253270.0,6254490.0,6254454.0,6254448.0,6254455.0,6254495.0,6254487.0,6254482.0,6254515.0,6254520.0,6254521.0],"skipIndex":0,"section_code":"gallery","featured_images":"6253275,6253186","id":347736,"singleSection":false});				  						galleries[332546] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Landscapes and Nature","link":"gallery_332546.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7419777,840727,736046","id":332546,"singleSection":false});				  						galleries[56426] = clik.newGallery({"parentGallery":332546,"usePopups":true,"title":"Landscapes in Spain","link":"gallery_56426.html","maxRecords":0.0,"photoIDs":[840705.0,840727.0,840835.0,840744.0,840760.0,840813.0,840819.0,840827.0,840830.0],"skipIndex":0,"section_code":"gallery","featured_images":840727.0,"id":56426,"singleSection":false});				  						galleries[332547] = clik.newGallery({"parentGallery":332546,"usePopups":true,"title":"Nature","link":"gallery_332547.html","maxRecords":0.0,"photoIDs":[1495436.0,736046.0,738207.0],"skipIndex":0,"section_code":"gallery","featured_images":736046.0,"id":332547,"singleSection":false});				  						galleries[332551] = clik.newGallery({"parentGallery":332546,"usePopups":true,"title":"Swiss Landscapes","link":"gallery_332551.html","maxRecords":0.0,"photoIDs":[7419971.0,7419777.0,7419851.0,7420008.0,7420370.0],"skipIndex":0,"section_code":"gallery","featured_images":7419777.0,"id":332551,"singleSection":false});				  						galleries[332545] = clik.newGallery({"parentGallery":"","usePopups":true,"title":" Fiestas and Fasnacht","link":"gallery_332545.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1124856,792907,792887","id":332545,"singleSection":false});				  						galleries[61613] = clik.newGallery({"parentGallery":332545,"usePopups":true,"title":"Fasnacht in Switzerland","link":"gallery_61613.html","maxRecords":0.0,"photoIDs":[792863.0,792887.0,792899.0,792904.0,792907.0,792912.0,792923.0,792917.0,792920.0,792926.0],"skipIndex":0,"section_code":"gallery","featured_images":"792907,792887","id":61613,"singleSection":false});				  						galleries[82134] = clik.newGallery({"parentGallery":332545,"usePopups":true,"title":"Fiesta","link":"gallery_82134.html","maxRecords":0.0,"photoIDs":[1124270.0,1124266.0,1124272.0,1124275.0,1124810.0,1124803.0,1124809.0,1124825.0,1124833.0,1124874.0,1124838.0,1124849.0,1124856.0],"skipIndex":0,"section_code":"gallery","featured_images":1124856.0,"id":82134,"singleSection":false});				  						galleries[332541] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery_332541.html","maxRecords":0.0,"photoIDs":[7419920.0,736074.0,736085.0,736097.0],"skipIndex":0,"section_code":"gallery","featured_images":7419920.0,"id":332541,"singleSection":false});				  						galleries[402098] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Commissions","link":"gallery_402098.html","maxRecords":0.0,"photoIDs":[7419525.0,7419514.0],"skipIndex":0,"section_code":"gallery","featured_images":"7419525,7419514","id":402098,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6253275,7419971,735408,7419777,7365158,7127749,7420008,6254532,6254455,792907';
imageSets[2] = '7419920,6253275,2290275,7419777,7365038,6253186,736046,840727,4699199,792887,792907,1124856';
imageSets[3] = '7127717,6254614,6254593,7419851,3426244,3426255,1116950,4699140,2275916,2280499';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Sarah_Jane_Hartney_Artwx/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Sarah_Jane_Hartney_Artwx/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 = 'artwx: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			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;
	}
}

			

