window.thumbnails = {};
															thumbnails[4583827] = clik.newPhoto({"id":4583827,"src":"20-20_semi_tarry_03_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Womens 20\/20 Cricket","height":172});
															thumbnails[4591835] = clik.newPhoto({"id":4591835,"src":"ashes_tarry_59_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"The Ashes 2009","height":210});
															thumbnails[4595461] = clik.newPhoto({"id":4595461,"src":"tarry_test_01_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"the sunday times","height":111});
															thumbnails[4595679] = clik.newPhoto({"id":4595679,"src":"P5180082_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"the sunday times","height":98});
															thumbnails[4595751] = clik.newPhoto({"id":4595751,"src":"in_gear_mshow_pt_14_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"the sunday times","height":195});
															thumbnails[4595884] = clik.newPhoto({"id":4595884,"src":"adam_pt_02_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"in gear","height":87});
															thumbnails[4598447] = clik.newPhoto({"id":4598447,"src":"in_gearfred_hunttarry_16_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"hunt","height":195});
															thumbnails[4598983] = clik.newPhoto({"id":4598983,"src":"homept04_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"artists family","height":192});
															thumbnails[4818352] = clik.newPhoto({"id":4818352,"src":"audi_tarry11_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"AUDI","height":206});
															thumbnails[5881850] = clik.newPhoto({"id":5881850,"src":"home_ashley_hometarry12_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":74});
															thumbnails[5881868] = clik.newPhoto({"id":5881868,"src":"home_ashley_hometarry23_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":206});
															thumbnails[6034380] = clik.newPhoto({"id":6034380,"src":"iiii_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":183});
															thumbnails[6173871] = clik.newPhoto({"id":6173871,"src":"london_06_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":78});
															thumbnails[4583786] = clik.newPhoto({"id":4583786,"src":"6W8E0450_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4583786.html","width":130,"caption":"Andre Agassi & Steffi Graff 2009","height":140});
															thumbnails[4583825] = clik.newPhoto({"id":4583825,"src":"17_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4583825.html","width":130,"caption":"England v All Blacks at Twickenham","height":163});
															thumbnails[4590768] = clik.newPhoto({"id":4590768,"src":"pt_ni_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4590768.html","width":130,"caption":"Rafa Nadel","height":109});
															thumbnails[4590783] = clik.newPhoto({"id":4590783,"src":"SPT02PTENGVISRAEL0897_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4590783.html","width":130,"caption":"england v israel","height":72});
															thumbnails[4590826] = clik.newPhoto({"id":4590826,"src":"wimbledon_09_tarry_07_copy_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4590826.html","width":130,"caption":"wimbledon ","height":166});
															thumbnails[4590832] = clik.newPhoto({"id":4590832,"src":"athletics_d2_pt_42_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4590832.html","width":130,"caption":"m.rooney","height":80});
															thumbnails[4590838] = clik.newPhoto({"id":4590838,"src":"tarry_03_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4590838.html","width":130,"caption":"maria sharapova","height":81});
															thumbnails[4590854] = clik.newPhoto({"id":4590854,"src":"TARRY07ENGvNEWZEALAND_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4590854.html","width":130,"caption":"england v new zealand","height":85});
															thumbnails[4590868] = clik.newPhoto({"id":4590868,"src":"TARRY05LONDONIRISHvWASPS_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4590868.html","width":130,"caption":"london irish v wasps","height":86});
															thumbnails[4590892] = clik.newPhoto({"id":4590892,"src":"murray_pt_04_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4590892.html","width":130,"caption":"andy murray","height":190});
															thumbnails[4590905] = clik.newPhoto({"id":4590905,"src":"TARRY41CHELSEAvFULHAM_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4590905.html","width":130,"caption":"chelsea v fulham","height":94});
															thumbnails[4591296] = clik.newPhoto({"id":4591296,"src":"ivanovic_tarry_10_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4591296.html","width":130,"caption":"anna ivanovic","height":156});
															thumbnails[4591520] = clik.newPhoto({"id":4591520,"src":"yyy_thumb.jpg","galleries_id":339256,"server_id":18,"link":"photo_4591520.html","width":130,"caption":"tiger woods","height":97});
															thumbnails[4591523] = clik.newPhoto({"id":4591523,"src":"chelsea__tarry__04_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4591523.html","width":130,"caption":"Chelsea v Bolton","height":85});
															thumbnails[4591531] = clik.newPhoto({"id":4591531,"src":"west_ham_pt_15_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4591531.html","width":130,"caption":"West Ham v Manchester City","height":172});
															thumbnails[4591534] = clik.newPhoto({"id":4591534,"src":"IMG_0028_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4591534.html","width":130,"caption":"David Coulthard","height":63});
															thumbnails[4591621] = clik.newPhoto({"id":4591621,"src":"open_tiger_tarry_28_thumb.jpg","galleries_id":339256,"server_id":18,"link":"photo_4591621.html","width":130,"caption":"Tiger Wood","height":65});
															thumbnails[4591628] = clik.newPhoto({"id":4591628,"src":"athletics_pt_57_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4591628.html","width":130,"caption":"Pole Vault","height":108});
															thumbnails[4591634] = clik.newPhoto({"id":4591634,"src":"open_fisher_tarry_07_thumb.jpg","galleries_id":339256,"server_id":18,"link":"photo_4591634.html","width":130,"caption":"Ross Fisher","height":195});
															thumbnails[4591642] = clik.newPhoto({"id":4591642,"src":"oooo_thumb.jpg","galleries_id":339258,"server_id":18,"link":"photo_4591642.html","width":130,"caption":"Boat Race","height":194});
															thumbnails[4591803] = clik.newPhoto({"id":4591803,"src":"TARRY-22_thumb.jpg","galleries_id":339258,"server_id":18,"link":"photo_4591803.html","width":130,"caption":"The Oxford Rowing Team","height":77});
															thumbnails[4591812] = clik.newPhoto({"id":4591812,"src":"tarry_rooney_alt_frame_02_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4591812.html","width":130,"caption":"Wayne Rooney","height":87});
															thumbnails[4591822] = clik.newPhoto({"id":4591822,"src":"TARRY_05_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4591822.html","width":130,"caption":"David Beckham","height":129});
															thumbnails[4591844] = clik.newPhoto({"id":4591844,"src":"TARRY03PORTSvSWANSEA_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4591844.html","width":130,"caption":"Portsmouth v Swansea","height":89});
															thumbnails[4591856] = clik.newPhoto({"id":4591856,"src":"WIMBLEDON_PT_18_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4591856.html","width":130,"caption":"Wimbledon","height":69});
															thumbnails[4591862] = clik.newPhoto({"id":4591862,"src":"nadal_tarry_10_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_4591862.html","width":130,"caption":"Rafa Nadal","height":187});
															thumbnails[4591869] = clik.newPhoto({"id":4591869,"src":"TARRY_06_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4591869.html","width":130,"caption":"David Beckham","height":85});
															thumbnails[4591944] = clik.newPhoto({"id":4591944,"src":"TARRY07PALACEvWATFORD_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_4591944.html","width":130,"caption":"Crystal Palace v Watford","height":92});
															thumbnails[4591952] = clik.newPhoto({"id":4591952,"src":"eastbourne_tarry_09_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_4591952.html","width":130,"caption":"caroline wozniacki","height":85});
															thumbnails[4595457] = clik.newPhoto({"id":4595457,"src":"wimbledon_roof_tarry_13_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595457.html","width":130,"caption":"the sunday times","height":87});
															thumbnails[4595459] = clik.newPhoto({"id":4595459,"src":"TARRY_COWES_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595459.html","width":130,"caption":"the sunday times","height":80});
															thumbnails[4595460] = clik.newPhoto({"id":4595460,"src":"TARRY__13_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595460.html","width":130,"caption":"the sunday times","height":107});
															thumbnails[4595462] = clik.newPhoto({"id":4595462,"src":"polish_pt_08_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595462.html","width":130,"caption":"the sunday times","height":104});
															thumbnails[4595687] = clik.newPhoto({"id":4595687,"src":"cowespt_14_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595687.html","width":130,"caption":"the sunday times","height":79});
															thumbnails[4595689] = clik.newPhoto({"id":4595689,"src":"in_gearpt19_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595689.html","width":130,"caption":"the sunday times","height":108});
															thumbnails[4595731] = clik.newPhoto({"id":4595731,"src":"athletics_d2_pt_19_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595731.html","width":130,"caption":"the sunday times","height":74});
															thumbnails[4595743] = clik.newPhoto({"id":4595743,"src":"DAVID_14_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_4595743.html","width":130,"caption":"the sunday times","height":87});
															thumbnails[4595887] = clik.newPhoto({"id":4595887,"src":"aston_pt_34_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595887.html","width":130,"caption":"in gear","height":100});
															thumbnails[4595911] = clik.newPhoto({"id":4595911,"src":"bullet_pt_55_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595911.html","width":130,"caption":"in gear","height":101});
															thumbnails[4595915] = clik.newPhoto({"id":4595915,"src":"ferrari_pt_21_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595915.html","width":130,"caption":"in gear","height":90});
															thumbnails[4595918] = clik.newPhoto({"id":4595918,"src":"file463_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595918.html","width":130,"caption":"in gear","height":88});
															thumbnails[4595932] = clik.newPhoto({"id":4595932,"src":"goodwood_pt_07_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_4595932.html","width":130,"caption":"in gear","height":198});
															thumbnails[4595935] = clik.newPhoto({"id":4595935,"src":"goodwood_pt_09_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595935.html","width":130,"caption":"in gear","height":65});
															thumbnails[4595938] = clik.newPhoto({"id":4595938,"src":"goodwood_pt_15_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4595938.html","width":130,"caption":"in gear","height":173});
															thumbnails[4596781] = clik.newPhoto({"id":4596781,"src":"in_gearrallypt18_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596781.html","width":130,"caption":"in gear","height":68});
															thumbnails[4596787] = clik.newPhoto({"id":4596787,"src":"goodwood_pt_20_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596787.html","width":130,"caption":"in gear","height":166});
															thumbnails[4596789] = clik.newPhoto({"id":4596789,"src":"goodwoodtarry02_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596789.html","width":130,"caption":"in gear","height":73});
															thumbnails[4596825] = clik.newPhoto({"id":4596825,"src":"LPLP_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596825.html","width":130,"caption":"in gear","height":96});
															thumbnails[4596833] = clik.newPhoto({"id":4596833,"src":"ptreventon54_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596833.html","width":130,"caption":"in gear","height":169});
															thumbnails[4596839] = clik.newPhoto({"id":4596839,"src":"schm_pt_08_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596839.html","width":130,"caption":"in gear","height":88});
															thumbnails[4596843] = clik.newPhoto({"id":4596843,"src":"tarry_02_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596843.html","width":130,"caption":"in gear","height":94});
															thumbnails[4596857] = clik.newPhoto({"id":4596857,"src":"tarry_09_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596857.html","width":130,"caption":"in gear","height":68});
															thumbnails[4596865] = clik.newPhoto({"id":4596865,"src":"tarry_12_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596865.html","width":130,"caption":"in gear","height":155});
															thumbnails[4596914] = clik.newPhoto({"id":4596914,"src":"tarry_14_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_4596914.html","width":130,"caption":"in gear","height":80});
															thumbnails[4598389] = clik.newPhoto({"id":4598389,"src":"15_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598389.html","width":130,"caption":"oliver","height":88});
															thumbnails[4598394] = clik.newPhoto({"id":4598394,"src":"1_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598394.html","width":130,"caption":"kelsey and melissa","height":97});
															thumbnails[4598408] = clik.newPhoto({"id":4598408,"src":"benitez_tarry_01_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598408.html","width":130,"caption":"benitez","height":87});
															thumbnails[4598419] = clik.newPhoto({"id":4598419,"src":"edwards_pt_26_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598419.html","width":130,"caption":"edwards","height":177});
															thumbnails[4598431] = clik.newPhoto({"id":4598431,"src":"veyrongsporttarry99_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598431.html","width":130,"caption":"wookie","height":68});
															thumbnails[4598434] = clik.newPhoto({"id":4598434,"src":"homewaltertarry08_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598434.html","width":130,"caption":"walter","height":95});
															thumbnails[4598435] = clik.newPhoto({"id":4598435,"src":"JV1Q0063_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598435.html","width":130,"caption":"lucy","height":187});
															thumbnails[4598437] = clik.newPhoto({"id":4598437,"src":"tarry_01_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598437.html","width":130,"caption":"mason","height":169});
															thumbnails[4598921] = clik.newPhoto({"id":4598921,"src":"rowing_sbihi_tarry_16_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598921.html","width":130,"caption":"sbihi","height":174});
															thumbnails[4598928] = clik.newPhoto({"id":4598928,"src":"robertson_pt_30_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598928.html","width":130,"caption":"robertson","height":195});
															thumbnails[4598937] = clik.newPhoto({"id":4598937,"src":"TARRY-39-OPEN_GOLF1_thumb.jpg","galleries_id":339256,"server_id":18,"link":"photo_4598937.html","width":130,"caption":"Tiger Wood Silhouette","height":84});
															thumbnails[4598957] = clik.newPhoto({"id":4598957,"src":"wiggins_pt_09_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598957.html","width":130,"caption":"wiggins","height":94});
															thumbnails[4598958] = clik.newPhoto({"id":4598958,"src":"TARRY-HILL-08_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598958.html","width":130,"caption":"hill","height":80});
															thumbnails[4598960] = clik.newPhoto({"id":4598960,"src":"rowing_purchase_tarry11_thumb.jpg","galleries_id":339258,"server_id":18,"link":"photo_4598960.html","width":130,"caption":"purchase","height":82});
															thumbnails[4598970] = clik.newPhoto({"id":4598970,"src":"TARRY28ENGvNEWZEALAND_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598970.html","width":130,"caption":"borthwick","height":127});
															thumbnails[4598972] = clik.newPhoto({"id":4598972,"src":"s_warne_pt_20_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598972.html","width":130,"caption":"warne","height":87});
															thumbnails[4598977] = clik.newPhoto({"id":4598977,"src":"uni_guide_pt_78_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598977.html","width":130,"caption":"swimmer","height":73});
															thumbnails[4598988] = clik.newPhoto({"id":4598988,"src":"home_pt_34_thumb.jpg","galleries_id":265505,"server_id":18,"link":"photo_4598988.html","width":130,"caption":"architect","height":175});
															thumbnails[5686940] = clik.newPhoto({"id":5686940,"src":"in_gearmanselltarry90_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_5686940.html","width":130,"caption":"Mansell","height":73});
															thumbnails[5686956] = clik.newPhoto({"id":5686956,"src":"wimbledon_09_tarry_05_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_5686956.html","width":130,"caption":"Wimbledon View","height":73});
															thumbnails[6034132] = clik.newPhoto({"id":6034132,"src":"6W8E0150_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_6034132.html","width":130,"caption":"","height":72});
															thumbnails[6034134] = clik.newPhoto({"id":6034134,"src":"34_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034134.html","width":130,"caption":"","height":229});
															thumbnails[6034142] = clik.newPhoto({"id":6034142,"src":"bolt_tarry_23_thumb.jpg","galleries_id":265502,"server_id":18,"link":"photo_6034142.html","width":130,"caption":"","height":90});
															thumbnails[6034145] = clik.newPhoto({"id":6034145,"src":"dd_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034145.html","width":130,"caption":"","height":195});
															thumbnails[6034149] = clik.newPhoto({"id":6034149,"src":"f_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034149.html","width":130,"caption":"","height":181});
															thumbnails[6034152] = clik.newPhoto({"id":6034152,"src":"homezara_phillipstarry59_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_6034152.html","width":130,"caption":"","height":186});
															thumbnails[6034382] = clik.newPhoto({"id":6034382,"src":"IMG_0412_thumb.jpg","galleries_id":339257,"server_id":18,"link":"photo_6034382.html","width":130,"caption":"","height":88});
															thumbnails[6034384] = clik.newPhoto({"id":6034384,"src":"kkkkkkk_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034384.html","width":130,"caption":"","height":213});
															thumbnails[6034389] = clik.newPhoto({"id":6034389,"src":"lkl_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034389.html","width":130,"caption":"","height":195});
															thumbnails[6034423] = clik.newPhoto({"id":6034423,"src":"lllllll_thumb.jpg","galleries_id":265975,"server_id":18,"link":"photo_6034423.html","width":130,"caption":"","height":74});
															thumbnails[6034498] = clik.newPhoto({"id":6034498,"src":"polpo_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034498.html","width":130,"caption":"","height":77});
															thumbnails[6034504] = clik.newPhoto({"id":6034504,"src":"r_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034504.html","width":130,"caption":"","height":95});
															thumbnails[6034512] = clik.newPhoto({"id":6034512,"src":"rrrrrr_thumb.jpg","galleries_id":339223,"server_id":18,"link":"photo_6034512.html","width":130,"caption":"","height":70});
															thumbnails[6034518] = clik.newPhoto({"id":6034518,"src":"the_boat_racetarry07_thumb.jpg","galleries_id":339258,"server_id":18,"link":"photo_6034518.html","width":130,"caption":"","height":77});
															thumbnails[6166041] = clik.newPhoto({"id":6166041,"src":"henin_tarry02_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166041.html","width":130,"caption":"Henin ","height":106});
															thumbnails[6166043] = clik.newPhoto({"id":6166043,"src":"IMG_7686_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166043.html","width":130,"caption":"","height":254});
															thumbnails[6166045] = clik.newPhoto({"id":6166045,"src":"ladies_final_tarry_13_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166045.html","width":130,"caption":"","height":74});
															thumbnails[6166050] = clik.newPhoto({"id":6166050,"src":"ladies_final_tarry_20_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166050.html","width":130,"caption":"","height":210});
															thumbnails[6166052] = clik.newPhoto({"id":6166052,"src":"ladies_final_tarry_25_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166052.html","width":130,"caption":"","height":86});
															thumbnails[6166189] = clik.newPhoto({"id":6166189,"src":"ladies_final_tarry_26_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166189.html","width":130,"caption":"","height":111});
															thumbnails[6166202] = clik.newPhoto({"id":6166202,"src":"ladies_final_tarry_37_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166202.html","width":130,"caption":"","height":100});
															thumbnails[6166299] = clik.newPhoto({"id":6166299,"src":"murray_tarry_10_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166299.html","width":130,"caption":"","height":212});
															thumbnails[6166313] = clik.newPhoto({"id":6166313,"src":"murray_tarry_13_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166313.html","width":130,"caption":"","height":98});
															thumbnails[6166314] = clik.newPhoto({"id":6166314,"src":"murray_tarry_15_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166314.html","width":130,"caption":"","height":184});
															thumbnails[6166755] = clik.newPhoto({"id":6166755,"src":"roddick_tarry_03_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166755.html","width":130,"caption":"","height":194});
															thumbnails[6166779] = clik.newPhoto({"id":6166779,"src":"wimbledon_09_tarry_01_thumb.jpg","galleries_id":339222,"server_id":18,"link":"photo_6166779.html","width":130,"caption":"","height":122});
															thumbnails[6166885] = clik.newPhoto({"id":6166885,"src":"4_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_6166885.html","width":130,"caption":"","height":136});
															thumbnails[6173832] = clik.newPhoto({"id":6173832,"src":"car_2_thumb.jpg","galleries_id":265503,"server_id":18,"link":"photo_6173832.html","width":130,"caption":"","height":198});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[339257] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Football","link":"gallery_339257.html","maxRecords":0.0,"photoIDs":[4590783.0,4590905.0,4591523.0,4591531.0,4591812.0,4591869.0,4591944.0,6034382.0],"skipIndex":0,"section_code":"gallery","featured_images":"6034382,4591944,4591869,4591812,4591531,4591523,4590905,4590783","id":339257,"singleSection":false});				  						galleries[339256] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Golf","link":"gallery_339256.html","maxRecords":0.0,"photoIDs":[4591520.0,4591621.0,4591634.0,4598937.0],"skipIndex":0,"section_code":"gallery","featured_images":4598937.0,"id":339256,"singleSection":false});				  						galleries[339223] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Goodwood","link":"gallery_339223.html","maxRecords":0.0,"photoIDs":[4595932.0,6034134.0,6034145.0,6034149.0,6034384.0,6034389.0,6034498.0,6034504.0,6034512.0],"skipIndex":0,"section_code":"gallery","featured_images":6034512.0,"id":339223,"singleSection":false});				  						galleries[265503] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Motoring","link":"gallery_265503.html","maxRecords":0.0,"photoIDs":[4591534.0,4595887.0,4595911.0,4595915.0,4595918.0,4595935.0,4595938.0,4596781.0,4596787.0,4596789.0,4596825.0,4596833.0,4596839.0,4596843.0,4596857.0,4596865.0,4596914.0,5686940.0,6166885.0,6173832.0],"skipIndex":0,"section_code":"gallery","featured_images":"5686940,4596914,4596865","id":265503,"singleSection":false});				  						galleries[265505] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery_265505.html","maxRecords":0.0,"photoIDs":[4598389.0,4598394.0,4598408.0,4598419.0,4598431.0,4598434.0,4598435.0,4598437.0,4598921.0,4598928.0,4598957.0,4598958.0,4598970.0,4598972.0,4598977.0,4598988.0],"skipIndex":0,"section_code":"gallery","featured_images":"4598988,4598977,4598972,4598970,4598958,4598957,4598928,4598921,4598437,4598435","id":265505,"singleSection":false});				  						galleries[339258] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Rowing","link":"gallery_339258.html","maxRecords":0.0,"photoIDs":[4591642.0,4591803.0,4598960.0,6034518.0],"skipIndex":0,"section_code":"gallery","featured_images":"6034518,4598960,4591803,4591642","id":339258,"singleSection":false});				  						galleries[265975] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"the sunday times","link":"gallery_265975.html","maxRecords":0.0,"photoIDs":[4595457.0,4595459.0,4595460.0,4595462.0,4595687.0,4595689.0,4595731.0,4595743.0,6034152.0,6034423.0],"skipIndex":0,"section_code":"gallery","featured_images":"4595687,4595459","id":265975,"singleSection":false});				  						galleries[339222] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wimbledon","link":"gallery_339222.html","maxRecords":0.0,"photoIDs":[4583786.0,4590768.0,4590826.0,4590838.0,4590892.0,4591296.0,4591856.0,4591862.0,6166041.0,6166043.0,6166045.0,6166050.0,6166052.0,6166189.0,6166202.0,6166299.0,6166313.0,6166314.0,6166755.0,6166779.0],"skipIndex":0,"section_code":"gallery","featured_images":"4590838,4590826,4590768","id":339222,"singleSection":false});				  						galleries[265502] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Sport","link":"gallery_265502.html","maxRecords":0.0,"photoIDs":[4583825.0,4590832.0,4590854.0,4590868.0,4591628.0,4591822.0,4591844.0,4591952.0,5686956.0,6034132.0,6034142.0],"skipIndex":0,"section_code":"gallery","featured_images":4590854.0,"id":265502,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[235948] = '6034134';
imageSets[235946] = '4591862,4591856';
imageSets[1] = '4598937,4598431,4598394,4596914,4596865,4595687,4595459,4591952,4591803,4590854,4590838';
imageSets[2] = '6034512,5686940,4818352,4598937,4596914,4596865,4595687,4595461,4595459,4590854,4590838,4590826,4590768';
imageSets[3] = '4595459,4591803';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ptarry/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ptarry/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ptarry/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ptarry/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ptarry/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ptarry/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ptarry/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'PETER TARRY PHOTOGRAPHY: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Peter Tarry </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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<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;
	}
}

			

