window.thumbnails = {};
															thumbnails[5056034] = clik.newPhoto({"id":5056034,"src":"HI_NL_ACNI_process_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":104});
															thumbnails[5056067] = clik.newPhoto({"id":5056067,"src":"Arts_Council_whitelogoeps_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":165});
															thumbnails[6889379] = clik.newPhoto({"id":6889379,"src":"metropolis-1_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6889379.html","width":130,"caption":"Metropolis, oil on canvas 170 x 213 cm","height":108});
															thumbnails[8648879] = clik.newPhoto({"id":8648879,"src":"harbour_office_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_8648879.html","width":130,"caption":"Oil on Linen, Simon McWilliams","height":109});
															thumbnails[8855001] = clik.newPhoto({"id":8855001,"src":"nanpu_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_8855001.html","width":130,"caption":"Nanpu Bridge, Shanghai ","height":107});
															thumbnails[6345989] = clik.newPhoto({"id":6345989,"src":"Simon_McWilliams_Skotia_Gallery_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6345989.html","width":130,"caption":"Art in America Guide to Galleries ","height":166});
															thumbnails[6346353] = clik.newPhoto({"id":6346353,"src":"green-scaff-moon2clikpic_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6346353.html","width":130,"caption":"Building Babel, oil on canvas ","height":120});
															thumbnails[6889319] = clik.newPhoto({"id":6889319,"src":"m-machine-number-2clikpic_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6889319.html","width":130,"caption":"M-Machine Number 2 oil on linen, 72 x 60inches","height":139});
															thumbnails[6132320] = clik.newPhoto({"id":6132320,"src":"obelisk_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6132320.html","width":130,"caption":"Obelisk, oil on canvas","height":154});
															thumbnails[6132322] = clik.newPhoto({"id":6132322,"src":"welder_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6132322.html","width":130,"caption":"Welder, oil on linen 100x 80 cm","height":161});
															thumbnails[6132324] = clik.newPhoto({"id":6132324,"src":"towerof-babel_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6132324.html","width":130,"caption":"Tower of Babel, oil on linen","height":170});
															thumbnails[7212040] = clik.newPhoto({"id":7212040,"src":"Obel-Duskclikpic_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_7212040.html","width":130,"caption":"Obel and weder, oil on linen 100 x 80 cm","height":161});
															thumbnails[4703289] = clik.newPhoto({"id":4703289,"src":"Titanic_Quarter_bulding3_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_4703289.html","width":130,"caption":"Titanic quarter building, oil on linen","height":174});
															thumbnails[6132318] = clik.newPhoto({"id":6132318,"src":"m-machine_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_6132318.html","width":130,"caption":"M-Machine,  oil on Linen 100 x 80 cm","height":162});
															thumbnails[3430047] = clik.newPhoto({"id":3430047,"src":"ulster-scaffolding_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430047.html","width":130,"caption":"Ulster Scaffolding, oil on canvas, Simon McWilliams","height":122});
															thumbnails[3430082] = clik.newPhoto({"id":3430082,"src":"Titanic_quarter_construction_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430082.html","width":130,"caption":"Titanic Quarter Under Construction, oil on canvas, Simon McWilliams","height":109});
															thumbnails[5120010] = clik.newPhoto({"id":5120010,"src":"Simon_McWilliams-theARC_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_5120010.html","width":130,"caption":"Arc, oil on canvas","height":106});
															thumbnails[2099549] = clik.newPhoto({"id":2099549,"src":"traffic-lights-galway-polar_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_2099549.html","width":130,"caption":"Traffic Lights oil on canvas 178 x 188 cms","height":124});
															thumbnails[3430371] = clik.newPhoto({"id":3430371,"src":"Tower_Scaffolding_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430371.html","width":130,"caption":"Tower Scaffolding, oil on canvas, Simon McWilliams","height":107});
															thumbnails[3430149] = clik.newPhoto({"id":3430149,"src":"green-wrapping_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430149.html","width":130,"caption":"Green Wrapping, oil on canvas, Simon McWilliams","height":115});
															thumbnails[4703162] = clik.newPhoto({"id":4703162,"src":"Arc_75_x_90cmSimonMcWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_4703162.html","width":130,"caption":"ARC oil on canvas","height":106});
															thumbnails[3430490] = clik.newPhoto({"id":3430490,"src":"Veiled_Building_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430490.html","width":130,"caption":"Veiled Building, oil on canvas, Simon McWilliams","height":132});
															thumbnails[4154034] = clik.newPhoto({"id":4154034,"src":"SMcWilliams_Shuttering-and-_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_4154034.html","width":130,"caption":"yellow shuttering, oil on canvas board","height":183});
															thumbnails[3430374] = clik.newPhoto({"id":3430374,"src":"Red-apartments_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430374.html","width":130,"caption":"Red Apartments, oil on canvas, Simon McWilliams, Bank of Ireland Collection","height":158});
															thumbnails[4153955] = clik.newPhoto({"id":4153955,"src":"SMcWilliams_Red-Arc-Study_9_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_4153955.html","width":130,"caption":"arc, oil on canvas board","height":103});
															thumbnails[3430154] = clik.newPhoto({"id":3430154,"src":"Sunlight_on_Scaffolding_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430154.html","width":130,"caption":"Sunlight on scaffolding, oil on canvas, Simon Mcwilliams","height":152});
															thumbnails[3430509] = clik.newPhoto({"id":3430509,"src":"Traffic-Lights-2_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430509.html","width":130,"caption":"Traffic Lights II, oil on canvas, Simon McWilliams","height":124});
															thumbnails[3430503] = clik.newPhoto({"id":3430503,"src":"green-scaffolding_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430503.html","width":130,"caption":"Green Scaffolding, oil on canvas, Simon mcWilliams","height":116});
															thumbnails[3435142] = clik.newPhoto({"id":3435142,"src":"restoration_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3435142.html","width":130,"caption":"Restoration, oil on canvas, Simon McWilliams","height":152});
															thumbnails[3435321] = clik.newPhoto({"id":3435321,"src":"chandelier_screenprint_Simon_McWilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435321.html","width":130,"caption":"Chandelier, Screenprint edition of 25, Simon McWilliams","height":176});
															thumbnails[3435148] = clik.newPhoto({"id":3435148,"src":"red-and-blue-scaffolding_Simon_mcwilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435148.html","width":130,"caption":"Red and Blue Scaffolding, oil on canvas, Simon McWilliams","height":151});
															thumbnails[3435155] = clik.newPhoto({"id":3435155,"src":"stairwell_Simon_mcwilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3435155.html","width":130,"caption":"Stairwell, oil on canvas, Simon McWilliams, Arts Council of Northern Ireland Collection","height":124});
															thumbnails[3435327] = clik.newPhoto({"id":3435327,"src":"Botanical_Garden_Simon_mcwilliams_etching_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435327.html","width":130,"caption":"Botanical Garden, etching edition of 20, Simon McWilliams","height":104});
															thumbnails[3435336] = clik.newPhoto({"id":3435336,"src":"Princes_Gates_monotype_simon_mcwilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435336.html","width":130,"caption":"Prince's Gates, monotype oil on paper, Simon McWilliams","height":107});
															thumbnails[3435349] = clik.newPhoto({"id":3435349,"src":"church_drypoint_Simon_McWilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435349.html","width":130,"caption":"Church, drypoint, Simon McWilliams","height":118});
															thumbnails[3435313] = clik.newPhoto({"id":3435313,"src":"gateway_screenprint_Simon_McWilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435313.html","width":130,"caption":"Gateway, Screenprint edition of 25,  Simon McWilliams","height":105});
															thumbnails[3452921] = clik.newPhoto({"id":3452921,"src":"Boat_Apartments_monotype_si_thumb.jpg","galleries_id":209948,"server_id":1,"link":"photo_3452921.html","width":130,"caption":"Boat Apartments, Simon McWilliams, oil on paper monotype.","height":172});
															thumbnails[3430270] = clik.newPhoto({"id":3430270,"src":"In_The_Palmhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430270.html","width":130,"caption":"In The Palmhouse, oil on canvas, Simon McWilliams","height":122});
															thumbnails[3430451] = clik.newPhoto({"id":3430451,"src":"glasnevin_palmhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430451.html","width":130,"caption":"Glasnevin Palmhouse, oil on canvas, Simon McWilliams","height":131});
															thumbnails[3430275] = clik.newPhoto({"id":3430275,"src":"mist-in-the-palmhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430275.html","width":130,"caption":"Mist in the Palmhouse, oil on canvas","height":113});
															thumbnails[3435358] = clik.newPhoto({"id":3435358,"src":"palmhouse_screenprint_Simon_McWilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435358.html","width":130,"caption":"Palmhouse, Screenprint, edition of 25, Simon McWilliams","height":104});
															thumbnails[3430091] = clik.newPhoto({"id":3430091,"src":"The_Palmhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430091.html","width":130,"caption":"The Palmhouse, oil on canvas, Simon McWilliams","height":138});
															thumbnails[3430106] = clik.newPhoto({"id":3430106,"src":"Azalea_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430106.html","width":130,"caption":"Azalea, Oil on canvas, 38 x 40 ins Simon McWilliams","height":124});
															thumbnails[3430142] = clik.newPhoto({"id":3430142,"src":"Fatsia_Japonic_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430142.html","width":130,"caption":"Fatsia Japonica, oil on canvas, Simon McWilliams","height":121});
															thumbnails[3430250] = clik.newPhoto({"id":3430250,"src":"Rhododendrons_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430250.html","width":130,"caption":"Rhodedendrons oil on canvas Simon McWilliams","height":92});
															thumbnails[3452923] = clik.newPhoto({"id":3452923,"src":"Untitled-smoke-monotype_Sim_thumb.jpg","galleries_id":209948,"server_id":1,"link":"photo_3452923.html","width":130,"caption":"untitled - smoke, monotype oil on paper, Simon McWilliams","height":175});
															thumbnails[3430076] = clik.newPhoto({"id":3430076,"src":"Central_Park_Tennis_and_Shadows_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430076.html","width":130,"caption":"Central Park tennis with shadows, oil on canvas, Simon McWilliams","height":82});
															thumbnails[3430255] = clik.newPhoto({"id":3430255,"src":"Hydrangeas_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430255.html","width":130,"caption":"Hydrangeas oil on canvas, Simon McWilliams","height":126});
															thumbnails[3435351] = clik.newPhoto({"id":3435351,"src":"Red-Apartments_Simon_McWilliams_Screenprint_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435351.html","width":130,"caption":"Red Apartments, Screenprint, edition of 25 Simon McWilliams","height":181});
															thumbnails[3430066] = clik.newPhoto({"id":3430066,"src":"The_Tennis_party_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430066.html","width":130,"caption":"The Tennis Party (After Lavery) oil on Canvas, Simon McWilliams, from the Invisible Collection, Ava Gallery","height":111});
															thumbnails[3452925] = clik.newPhoto({"id":3452925,"src":"untitled study for rs monotype_smcw_thumb.jpg","galleries_id":209948,"server_id":1,"link":"photo_3452925.html","width":130,"caption":"untitled, study for Red Skeleton, monotype oil onpaper, Simon McWilliams","height":174});
															thumbnails[3430373] = clik.newPhoto({"id":3430373,"src":"Cherry_Blossoms_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430373.html","width":130,"caption":"Cherry Blossoms, oil on canvas, Simon McWilliams","height":122});
															thumbnails[3435045] = clik.newPhoto({"id":3435045,"src":"Spine_screenprint_Simon_McWilliams_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_3435045.html","width":130,"caption":"Spine, Screenprint, Simon McWilliams, from edition of 20","height":146});
															thumbnails[1642837] = clik.newPhoto({"id":1642837,"src":"cherryprint_thumb.jpg","galleries_id":111094,"server_id":1,"link":"photo_1642837.html","width":130,"caption":"Cherry Blossoms, Giclee print of Painting edition of 100 commissioned for Bank of Ireland","height":122});
															thumbnails[3430454] = clik.newPhoto({"id":3430454,"src":"Hedge_and_wall_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430454.html","width":130,"caption":"Hedge and Wall, oil on canvas, Simon McWilliams","height":122});
															thumbnails[3452920] = clik.newPhoto({"id":3452920,"src":"Arc_Monotype_SimonMcWilliam_thumb.jpg","galleries_id":209948,"server_id":1,"link":"photo_3452920.html","width":130,"caption":"Arc, monotype, oil on paper, Simon McWilliams","height":96});
															thumbnails[8764190] = clik.newPhoto({"id":8764190,"src":"green02461_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_8764190.html","width":130,"caption":"untitled scaffolding, oil on canvas","height":182});
															thumbnails[3430100] = clik.newPhoto({"id":3430100,"src":"Gateway_Simon_McWilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430100.html","width":130,"caption":"Gateway, oil on canvas, Simon McWilliams","height":107});
															thumbnails[3430360] = clik.newPhoto({"id":3430360,"src":"Prince's_gates_simon_mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430360.html","width":130,"caption":"Prince's Gates, London, oil on canvas, Simon McWilliams","height":114});
															thumbnails[3430363] = clik.newPhoto({"id":3430363,"src":"Prince's_gates_2_Simon_Mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430363.html","width":130,"caption":"Prince's Gates 2, London, Oil on canvas, Simon McWilliams","height":111});
															thumbnails[3430368] = clik.newPhoto({"id":3430368,"src":"Law_Courts_Simon_McWilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430368.html","width":130,"caption":"Law Courts, Belfast, oil on canvas, Simon McWilliams","height":111});
															thumbnails[3430458] = clik.newPhoto({"id":3430458,"src":"Saint_Malachy's_gates_Simon_McWilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430458.html","width":130,"caption":"Saint Malachy's Gates, Belfast, oil on canvas, Simon mcWilliams","height":129});
															thumbnails[3430348] = clik.newPhoto({"id":3430348,"src":"Office-Ceiling_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430348.html","width":130,"caption":"Office Ceiling, mixed media on canvas, Simon McWilliams, Boyle Civic Collection","height":109});
															thumbnails[3430358] = clik.newPhoto({"id":3430358,"src":"Scaffolding-with-traffic_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430358.html","width":130,"caption":"Scaffolding with traffic, oil on canvas, Simon McWilliams","height":122});
															thumbnails[3430354] = clik.newPhoto({"id":3430354,"src":"red-skeleton_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430354.html","width":130,"caption":"Red Skeleton, oil on canvas, Simon McWilliams,  Bar Library Collection Belfast","height":121});
															thumbnails[3430353] = clik.newPhoto({"id":3430353,"src":"spine_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430353.html","width":130,"caption":"Spine, oil on canvas, Simon McWilliams","height":141});
															thumbnails[3430265] = clik.newPhoto({"id":3430265,"src":"Blue_Skeleton_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430265.html","width":130,"caption":"Blue Skeleton, oil on canvas, Queens University Collection, Simon McWilliams","height":107});
															thumbnails[3430481] = clik.newPhoto({"id":3430481,"src":"scaffold-workers_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3430481.html","width":130,"caption":"Scaffold Workers, oil on canvas, Simon McWilliams","height":125});
															thumbnails[3430444] = clik.newPhoto({"id":3430444,"src":"Palmhouse_Commission_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430444.html","width":130,"caption":"Palmhouse oil on canvas, Simon McWilliams","height":91});
															thumbnails[3430370] = clik.newPhoto({"id":3430370,"src":"Church_Saint_Patricks_Simon_McWilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3430370.html","width":130,"caption":"Church (Saint Patricks) oil on canvas, Simon McWilliams, Ulster Museum Collection","height":120});
															thumbnails[1515443] = clik.newPhoto({"id":1515443,"src":"glasnevin-palm-housesmall1.jpg","galleries_id":103773,"server_id":1,"link":"photo_1515443.html","width":130,"caption":"Glasnevin Palmhouse Small oil on paper on board","height":83});
															thumbnails[3430159] = clik.newPhoto({"id":3430159,"src":"Christian_Lacroix_Bond_street_simon_McWilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3430159.html","width":130,"caption":"Christian Lacroix, Bond Street, oil on canvas, Simon McWilliams","height":129});
															thumbnails[3430478] = clik.newPhoto({"id":3430478,"src":"Green_House_greenhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430478.html","width":130,"caption":"Green House, oil on canvas, Simon McWilliams","height":129});
															thumbnails[3430470] = clik.newPhoto({"id":3430470,"src":"Palmhouse_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430470.html","width":130,"caption":"Palmhouse, Belfast, Oil on Canvas, Simon McWilliams","height":117});
															thumbnails[3430462] = clik.newPhoto({"id":3430462,"src":"palmhouse-dome_Simon_mcwiliiams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430462.html","width":130,"caption":"Palmhouse Dome, Belfast, oil on canvas, Simon McWilliams","height":118});
															thumbnails[3430164] = clik.newPhoto({"id":3430164,"src":"palmhouse-raining_simon_mcwilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3430164.html","width":130,"caption":"Palmhouse raining, oil on canvas, Simon McWilliams","height":96});
															thumbnails[1515488] = clik.newPhoto({"id":1515488,"src":"small-palmhouse-0031.jpg","galleries_id":351673,"server_id":1,"link":"photo_1515488.html","width":130,"caption":"Small palmhouse painting oil and card on canvas","height":129});
															thumbnails[3430212] = clik.newPhoto({"id":3430212,"src":"ceiling-plant_Simon_mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430212.html","width":130,"caption":"Ceiling Plant, oil on canvas, Simon McWilliams","height":137});
															thumbnails[3430178] = clik.newPhoto({"id":3430178,"src":"Chandelier_I_Simon_Mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430178.html","width":130,"caption":"Chandelier I, Simon McWilliams, Oil on Canvas","height":203});
															thumbnails[3430185] = clik.newPhoto({"id":3430185,"src":"Chandelier_II_Simon_Mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430185.html","width":130,"caption":"Chandelier II, Simon McWilliams, oil on canvas","height":182});
															thumbnails[3430197] = clik.newPhoto({"id":3430197,"src":"Chandelier_with_shades_Simon_mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430197.html","width":130,"caption":"Chandelier with shades, oil on canvas, Simon McWilliams","height":149});
															thumbnails[3430225] = clik.newPhoto({"id":3430225,"src":"Small_chandelier_simon_mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430225.html","width":130,"caption":"Small Chandelier, oil on canvas, Simon McWilliams","height":127});
															thumbnails[3430351] = clik.newPhoto({"id":3430351,"src":"small_chandelier_II_Simon_mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3430351.html","width":130,"caption":"Small Chandelier II, Oil on Canvas, Simon McWilliams","height":169});
															thumbnails[3435056] = clik.newPhoto({"id":3435056,"src":"Linenhall_Library_I_Simon_Mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3435056.html","width":130,"caption":"Linenhall Library I, oil on canvas, Simon McWilliams","height":131});
															thumbnails[3435072] = clik.newPhoto({"id":3435072,"src":"Linenhall_library_Simon_Mcwilliams_thumb.jpg","galleries_id":351678,"server_id":1,"link":"photo_3435072.html","width":130,"caption":"Linenhall Library II, oil on Canvas, Simon McWilliams Collection McCann Fitzgerald Solicitors Dublin","height":116});
															thumbnails[3435095] = clik.newPhoto({"id":3435095,"src":"Bedford-Dolphin_at_the_Shipyard_Simon_mcwilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435095.html","width":130,"caption":"The Bedford Dolphin at the Shipyard, oil on canvas, Simon McWilliams, Collection Brian O'Donnell and Partners, Dublin","height":129});
															thumbnails[1515556] = clik.newPhoto({"id":1515556,"src":"Commission-pic1.jpg","galleries_id":103773,"server_id":1,"link":"photo_1515556.html","width":130,"caption":"ESB Gas Turbine Power Station, Coolkeeragh, Commission for ESB oil on canvas","height":116});
															thumbnails[3435107] = clik.newPhoto({"id":3435107,"src":"Royal_albert+hall_Simon_mcwilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435107.html","width":130,"caption":"Royal Albert Hall, oil on canvas, Simon McWilliams Collection Native Productions, London","height":149});
															thumbnails[3435133] = clik.newPhoto({"id":3435133,"src":"bamboo_canes_Simon_Mcwilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435133.html","width":130,"caption":"Bamboo Canes, oil on canvas, Simon McWilliams","height":118});
															thumbnails[3435152] = clik.newPhoto({"id":3435152,"src":"docks_warehouse_Simon_McWilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435152.html","width":130,"caption":"Docks warehouse, oil on canvas, Simon McWilliams","height":125});
															thumbnails[3435156] = clik.newPhoto({"id":3435156,"src":"the-ravine-Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3435156.html","width":130,"caption":"The Ravine, oil on canvas, Simon McWilliams","height":115});
															thumbnails[3435159] = clik.newPhoto({"id":3435159,"src":"The_ravine_2_Simon_McWilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3435159.html","width":130,"caption":"The Ravine 2, oil on canvas, Simon McWilliams","height":106});
															thumbnails[3435303] = clik.newPhoto({"id":3435303,"src":"small-palmhouse_east_wing_Simon_mcwilliams_thumb.jpg","galleries_id":351673,"server_id":1,"link":"photo_3435303.html","width":130,"caption":"Palmhouse East Wing, oil on canvas, Simon McWilliams","height":149});
															thumbnails[3435382] = clik.newPhoto({"id":3435382,"src":"post-office-Donegall-Street_simon_mcwilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435382.html","width":130,"caption":"Post Office Donegall Street, oil on canvas, Simon McWilliams","height":133});
															thumbnails[3435377] = clik.newPhoto({"id":3435377,"src":"umbrellas_at_the_post_office_Simon_mcwiliiams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435377.html","width":130,"caption":"Umbrellas at the Post Office, Donegall Street, oil on Canvas, Simon McWilliams, Collection Northern Ireland Civil Service","height":131});
															thumbnails[3435031] = clik.newPhoto({"id":3435031,"src":"greyhound_track_Simon_McWilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435031.html","width":130,"caption":"Greyhound Track, oil on canvas, Simon McWilliams Allied Irish BanK Collection","height":119});
															thumbnails[3430524] = clik.newPhoto({"id":3430524,"src":"greenhouse_condensation_Simon_McWilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3430524.html","width":130,"caption":"Greenhouse Condensation , oil on canvas, Simon McWilliams","height":120});
															thumbnails[3435016] = clik.newPhoto({"id":3435016,"src":"dress-shirt-shoes_Simon_McWilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435016.html","width":130,"caption":"Dress, Shirt and Shoes, Bond street shop window oil on canvas, Simon McWilliams","height":144});
															thumbnails[3435371] = clik.newPhoto({"id":3435371,"src":"Blue_scaffolding_II_Simon_McWilliams_thumb.jpg","galleries_id":103773,"server_id":1,"link":"photo_3435371.html","width":130,"caption":"Blue Scaffolding II, oil on canvas, Simon McWilliams","height":114});
															thumbnails[3435117] = clik.newPhoto({"id":3435117,"src":"shoe_Shop_Bond_Street_Simon_Mcwilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435117.html","width":130,"caption":"Shoe Shop Bond street London, Oil on canvas, Simon McWilliams ","height":140});
															thumbnails[3435339] = clik.newPhoto({"id":3435339,"src":"chair_race_Simon_McWilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435339.html","width":130,"caption":"Chair Race, oil on canvas, Simon McWilliams","height":116});
															thumbnails[3435365] = clik.newPhoto({"id":3435365,"src":"blue-saint_patricks_church_Simon_Mcwilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435365.html","width":130,"caption":"Blue Saint Patricks Church, oil on paper mounted on canvas, Simon McWilliams","height":105});
															thumbnails[1526604] = clik.newPhoto({"id":1526604,"src":"churchdrypoint1.jpg","galleries_id":209948,"server_id":1,"link":"photo_1526604.html","width":130,"caption":"Church, Drypoint","height":118});
															thumbnails[3435286] = clik.newPhoto({"id":3435286,"src":"blue-Royal_Academy_Courtyard_Simon_McWilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435286.html","width":130,"caption":"Blue Academy Courtyard, oil on canvas, Simon McWilliams","height":133});
															thumbnails[3435079] = clik.newPhoto({"id":3435079,"src":"Arena_odyssey_under_construction_belfast_Simon_McWilliams_thumb.jpg","galleries_id":351684,"server_id":1,"link":"photo_3435079.html","width":130,"caption":"Arena, (The Odessey, Belfast, Under Construction) oil on canvas, Simon McWilliams","height":83});
															thumbnails[3435066] = clik.newPhoto({"id":3435066,"src":"Apartments_and_willow_tree_New_york_simon_mcwilliams_thumb.jpg","galleries_id":351680,"server_id":1,"link":"photo_3435066.html","width":130,"caption":"Apartments and willow tree, New York, oil on canvas, Simon McWilliams. Permanent TSB Collection, Dublin","height":143});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[351673] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery three","link":"gallery_351673.html","maxRecords":0.0,"photoIDs":[3430270.0,3430451.0,3430275.0,3430091.0,3430106.0,3430142.0,3430250.0,3430076.0,3430255.0,3430066.0,3430373.0,3430454.0,3430444.0,3430478.0,3430470.0,3430462.0,3430164.0,1515488.0,3435156.0,3435159.0,3435303.0],"skipIndex":0,"section_code":"gallery","featured_images":"3435303,3435159,3435156,3430478,3430470,3430462,3430454,3430451,3430444,3430373","id":351673,"singleSection":false});				  						galleries[351678] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery four","link":"gallery_351678.html","maxRecords":0.0,"photoIDs":[3430100.0,3430360.0,3430363.0,3430368.0,3430458.0,3430212.0,3430178.0,3430185.0,3430197.0,3430225.0,3430351.0,3435056.0,3435072.0],"skipIndex":0,"section_code":"gallery","featured_images":"3435072,3435056,3430458,3430368,3430363,3430360,3430351,3430225,3430212,3430197","id":351678,"singleSection":false});				  						galleries[351680] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery five","link":"gallery_351680.html","maxRecords":0.0,"photoIDs":[3430159.0,3435107.0,3435031.0,3430524.0,3435016.0,3435117.0,3435365.0,3435286.0,3435066.0],"skipIndex":0,"section_code":"gallery","featured_images":"3435365,3435286,3435117,3435107,3435066,3435031,3435016,3430524,3430159","id":351680,"singleSection":false});				  						galleries[111094] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery six","link":"gallery_111094.html","maxRecords":0.0,"photoIDs":[3435321.0,3435327.0,3435336.0,3435349.0,3435313.0,3435358.0,3435351.0,3435045.0,1642837.0],"skipIndex":0,"section_code":"gallery","featured_images":"3435358,3435351,3435349,3435336,3435327,3435321,3435313,3435045,1642837","id":111094,"singleSection":false});				  						galleries[351684] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery seven","link":"gallery_351684.html","maxRecords":0.0,"photoIDs":[3435148.0,3430370.0,3435095.0,3435133.0,3435152.0,3435382.0,3435377.0,3435339.0,3435079.0],"skipIndex":0,"section_code":"gallery","featured_images":"3435382,3435377,3435339,3435152,3435148,3435133,3435095,3435079,3430370","id":351684,"singleSection":false});				  						galleries[209948] = clik.newGallery({"parentGallery":351672,"usePopups":false,"title":"Gallery eight","link":"gallery_209948.html","maxRecords":0.0,"photoIDs":[3452921.0,3452923.0,3452925.0,3452920.0,1526604.0],"skipIndex":0,"section_code":"gallery","featured_images":3452921.0,"id":209948,"singleSection":false});				  						galleries[103773] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery One","link":"gallery_103773.html","maxRecords":0.0,"photoIDs":[6889379.0,8648879.0,8855001.0,6345989.0,6346353.0,6889319.0,6132320.0,6132322.0,6132324.0,7212040.0,4703289.0,6132318.0,3430047.0,3430082.0,5120010.0,2099549.0,3430371.0,3430149.0,4703162.0,3430490.0,4154034.0,3430374.0,4153955.0,3430154.0,3430509.0,3430503.0,3435142.0,3435155.0,8764190.0,3430348.0,3430358.0,3430354.0,3430353.0,3430265.0,3430481.0,1515443.0,1515556.0,3435371.0],"skipIndex":0,"section_code":"gallery","featured_images":8855001.0,"id":103773,"singleSection":false});				  						galleries[351672] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery two","link":"gallery_351672.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":3452921.0,"id":351672,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6889379';
imageSets[2] = '8855001,3452921';
imageSets[3] = '3435327';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/simonmcwilliams/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/simonmcwilliams/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 = 'Simon McWilliams: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="SIMONMCWILLIAMS">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

