window.thumbnails = new Object();
												thumbnails[5499945] = new thumbnail(5499945,'','','Mongolia_Book_31-Final_Image_thumb.jpg',130, 130,32,'#');
												thumbnails[5508324] = new thumbnail(5508324,'','','Mongolia_Book_5-Final_Image-retoned_thumb.jpg',130, 130,32,'#');
												thumbnails[5508325] = new thumbnail(5508325,'','','Mongolia_Book_3-Final_Image-retoned_thumb.jpg',130, 130,32,'#');
												thumbnails[5509630] = new thumbnail(5509630,'','','P1010440_thumb.jpg',130, 87,32,'#');
												thumbnails[6197817] = new thumbnail(6197817,'','Fred','Snow_hill_1-Fred_worked__cropped_thumb.jpg',130, 182,32,'#');
												thumbnails[8011004] = new thumbnail(8011004,'','','amateur_boxing_hartlepool-3_thumb.jpg',130, 87,32,'#');
												thumbnails[8011006] = new thumbnail(8011006,'','','amateur_boxing_hartlepool-5_thumb.jpg',130, 87,32,'#');
												thumbnails[5557577] = new thumbnail(5557577,'','','Hermafrodite_1_worked_final_toned_thumb.jpg',130, 130,32,'#');
												thumbnails[5557776] = new thumbnail(5557776,'','','Hermafrodite_3_worked_final_thumb.jpg',130, 130,32,'#');
												thumbnails[5550807] = new thumbnail(5550807,'','','Hermafrodite_4-workedfinal_thumb.jpg',130, 130,32,'#');
												thumbnails[5525010] = new thumbnail(5525010,'','','Master_terry__Slave_thumb.jpg',130, 130,32,'#');
												thumbnails[7987825] = new thumbnail(7987825,'','','malcolm_bradbury1_thumb.jpg',130, 130,32,'#');
												thumbnails[5527495] = new thumbnail(5527495,'','','Mandy_1_thumb.jpg',130, 130,32,'#');
												thumbnails[7987826] = new thumbnail(7987826,'','','editorial_portraits-1_thumb.jpg',130, 177,32,'#');
												thumbnails[7987829] = new thumbnail(7987829,'','','editorial_portraits-2_thumb.jpg',130, 175,32,'#');
												thumbnails[7987832] = new thumbnail(7987832,'','','editorial_portraits-3_thumb.jpg',130, 139,32,'#');
												thumbnails[7987834] = new thumbnail(7987834,'','','editorial_portraits-4_thumb.jpg',130, 130,32,'#');
												thumbnails[7987840] = new thumbnail(7987840,'','','editorial_portraits-8_thumb.jpg',130, 131,32,'#');
												thumbnails[5497540] = new thumbnail(5497540,'428842','Low tide at the height of summer','L31_thumb.jpg',130, 130,32,'photo_5497540.html');
												thumbnails[5497541] = new thumbnail(5497541,'428842','Els, Outer Mongolia','L9_thumb.jpg',130, 130,32,'photo_5497541.html');
												thumbnails[5497575] = new thumbnail(5497575,'428842','Raadhuis, Den haag','L5_thumb.jpg',130, 128,32,'photo_5497575.html');
												thumbnails[5497583] = new thumbnail(5497583,'428842','Abandoned copper mine, Ahlies, Eire','L1_thumb.jpg',130, 130,32,'photo_5497583.html');
												thumbnails[5497592] = new thumbnail(5497592,'428842','Brick Lane memories','L2_thumb.jpg',130, 126,32,'photo_5497592.html');
												thumbnails[5497622] = new thumbnail(5497622,'428842','','L6_thumb.jpg',130, 130,32,'photo_5497622.html');
												thumbnails[5498472] = new thumbnail(5498472,'428842','','cop_and_thief_1_thumb.jpg',130, 130,32,'photo_5498472.html');
												thumbnails[5508518] = new thumbnail(5508518,'310419','','man_912_thumb.jpg',130, 130,32,'photo_5508518.html');
												thumbnails[5508524] = new thumbnail(5508524,'310419','','man_31_thumb.jpg',130, 130,32,'photo_5508524.html');
												thumbnails[5508525] = new thumbnail(5508525,'310419','','man11_thumb.jpg',130, 130,32,'photo_5508525.html');
												thumbnails[5508527] = new thumbnail(5508527,'310419','','man_81_thumb.jpg',130, 130,32,'photo_5508527.html');
												thumbnails[5508528] = new thumbnail(5508528,'310419','','man_101_thumb.jpg',130, 130,32,'photo_5508528.html');
												thumbnails[5508531] = new thumbnail(5508531,'310419','','man21_thumb.jpg',130, 130,32,'photo_5508531.html');
												thumbnails[5508537] = new thumbnail(5508537,'310419','','man_151_thumb.jpg',130, 130,32,'photo_5508537.html');
												thumbnails[5508545] = new thumbnail(5508545,'310419','','man_141_thumb.jpg',130, 130,32,'photo_5508545.html');
												thumbnails[5508549] = new thumbnail(5508549,'310419','','man_191_thumb.jpg',130, 130,32,'photo_5508549.html');
												thumbnails[5508551] = new thumbnail(5508551,'310419','','man_171_thumb.jpg',130, 130,32,'photo_5508551.html');
												thumbnails[5508553] = new thumbnail(5508553,'310419','','man_181_thumb.jpg',130, 130,32,'photo_5508553.html');
												thumbnails[5508558] = new thumbnail(5508558,'310419','','woman_61_thumb.jpg',130, 130,32,'photo_5508558.html');
												thumbnails[5508628] = new thumbnail(5508628,'310421','','S020-9_worked_thumb.jpg',130, 133,32,'photo_5508628.html');
												thumbnails[5508631] = new thumbnail(5508631,'310421','','SO16-4_worked1_thumb.jpg',130, 134,32,'photo_5508631.html');
												thumbnails[5508642] = new thumbnail(5508642,'310421','','S020-19_worked1_thumb.jpg',130, 132,32,'photo_5508642.html');
												thumbnails[5508672] = new thumbnail(5508672,'310421','','SO21-9_worked1_thumb.jpg',130, 134,32,'photo_5508672.html');
												thumbnails[5508676] = new thumbnail(5508676,'310421','','S006-8_worked1_thumb.jpg',130, 131,32,'photo_5508676.html');
												thumbnails[5508677] = new thumbnail(5508677,'310421','','S004-11_worked1_thumb.jpg',130, 132,32,'photo_5508677.html');
												thumbnails[5523049] = new thumbnail(5523049,'310421','','S019-17_worked1_thumb.jpg',130, 132,32,'photo_5523049.html');
												thumbnails[5523051] = new thumbnail(5523051,'310421','','S004-6worked_thumb.jpg',130, 133,32,'photo_5523051.html');
												thumbnails[5523052] = new thumbnail(5523052,'310421','','SO30-7_worked1_thumb.jpg',130, 130,32,'photo_5523052.html');
												thumbnails[5523054] = new thumbnail(5523054,'310421','','S004-3_worked1_thumb.jpg',130, 130,32,'photo_5523054.html');
												thumbnails[5523056] = new thumbnail(5523056,'310421','','S028-11_worked1_thumb.jpg',130, 133,32,'photo_5523056.html');
												thumbnails[5523061] = new thumbnail(5523061,'310421','','S003-12_thumb.jpg',130, 135,32,'photo_5523061.html');
												thumbnails[6198195] = new thumbnail(6198195,'345993','Bird','Angerland_5_thumb.jpg',130, 195,32,'photo_6198195.html');
												thumbnails[6198456] = new thumbnail(6198456,'345993','Cenotaph','Angerland_3_worked1_thumb.jpg',130, 195,32,'photo_6198456.html');
												thumbnails[6198791] = new thumbnail(6198791,'345993','Pink Mist','Angerland_Red_Mist_worked_thumb.jpg',130, 195,32,'photo_6198791.html');
												thumbnails[6198808] = new thumbnail(6198808,'345993','Alpha Mike Foxtrot','Angerland_spattered_wall_worked_thumb.jpg',130, 195,32,'photo_6198808.html');
												thumbnails[6198863] = new thumbnail(6198863,'345993','Blue on Blue contact','Angerland_tree_worked1_thumb.jpg',130, 195,32,'photo_6198863.html');
												thumbnails[6221674] = new thumbnail(6221674,'345993','Collateral Damage','Angerland_collateral_damage_worked_thumb.jpg',130, 195,32,'photo_6221674.html');
												thumbnails[6221879] = new thumbnail(6221879,'345993','Sniper','Angerland__shadow_worked_thumb.jpg',130, 195,32,'photo_6221879.html');
												thumbnails[6221947] = new thumbnail(6221947,'345993','In the Field','Angerland_in_the_field_worked_thumb.jpg',130, 195,32,'photo_6221947.html');
												thumbnails[6221962] = new thumbnail(6221962,'345993','Oil Leak','Angerland_dripping_wall_worked_thumb.jpg',130, 195,32,'photo_6221962.html');
												thumbnails[7983760] = new thumbnail(7983760,'428842','minus 11','Staxton_Sportsfield_6_worked_thumb.jpg',130, 130,32,'photo_7983760.html');
												thumbnails[7986417] = new thumbnail(7986417,'428835','','final_edit-1_thumb.jpg',130, 87,32,'photo_7986417.html');
												thumbnails[7986437] = new thumbnail(7986437,'428835','','final_edit-71_thumb.jpg',130, 87,32,'photo_7986437.html');
												thumbnails[7986440] = new thumbnail(7986440,'428835','','final_edit-11_thumb.jpg',130, 87,32,'photo_7986440.html');
												thumbnails[7986441] = new thumbnail(7986441,'428835','','final_edit-12_thumb.jpg',130, 86,32,'photo_7986441.html');
												thumbnails[7986443] = new thumbnail(7986443,'428835','','final_edit-13_thumb.jpg',130, 87,32,'photo_7986443.html');
												thumbnails[7986444] = new thumbnail(7986444,'428835','','final_edit-14_thumb.jpg',130, 87,32,'photo_7986444.html');
												thumbnails[7986445] = new thumbnail(7986445,'428835','','final_edit-15_thumb.jpg',130, 87,32,'photo_7986445.html');
												thumbnails[7986446] = new thumbnail(7986446,'428835','','final_edit-17_thumb.jpg',130, 83,32,'photo_7986446.html');
												thumbnails[7986449] = new thumbnail(7986449,'428835','','final_edit-20_thumb.jpg',130, 87,32,'photo_7986449.html');
												thumbnails[7986450] = new thumbnail(7986450,'428835','','final_edit-22_thumb.jpg',130, 87,32,'photo_7986450.html');
												thumbnails[7986451] = new thumbnail(7986451,'428835','','final_edit-25_thumb.jpg',130, 87,32,'photo_7986451.html');
												thumbnails[7986452] = new thumbnail(7986452,'428835','','final_edit-23_thumb.jpg',130, 83,32,'photo_7986452.html');
												thumbnails[7986495] = new thumbnail(7986495,'428835','','final_edit-81_thumb.jpg',130, 87,32,'photo_7986495.html');
												thumbnails[7986793] = new thumbnail(7986793,'428835','','japan_2009_final_edit-1_thumb.jpg',130, 87,32,'photo_7986793.html');
												thumbnails[7987371] = new thumbnail(7987371,'428835','','japan_2009_final_edit-47_thumb.jpg',130, 87,32,'photo_7987371.html');
												thumbnails[7987400] = new thumbnail(7987400,'428835','','japan_2009_final_edit-511_thumb.jpg',130, 87,32,'photo_7987400.html');
												thumbnails[7987416] = new thumbnail(7987416,'428835','','japan_2009_final_edit-59_thumb.jpg',130, 87,32,'photo_7987416.html');
												thumbnails[7987423] = new thumbnail(7987423,'428835','','japan_2009_final_edit-61_thumb.jpg',130, 87,32,'photo_7987423.html');
												thumbnails[7987857] = new thumbnail(7987857,'429430','','editorial_portraits-14_thumb.jpg',130, 87,32,'photo_7987857.html');
												thumbnails[7987860] = new thumbnail(7987860,'429430','','editorial_portraits-12_thumb.jpg',130, 87,32,'photo_7987860.html');
												thumbnails[7987862] = new thumbnail(7987862,'429430','','editorial_portraits-11_thumb.jpg',130, 87,32,'photo_7987862.html');
												thumbnails[8009332] = new thumbnail(8009332,'429430','','-3_thumb.jpg',130, 87,32,'photo_8009332.html');
												thumbnails[8009345] = new thumbnail(8009345,'429430','','-4_thumb.jpg',130, 87,32,'photo_8009345.html');
												thumbnails[8009364] = new thumbnail(8009364,'429430','','-6_thumb.jpg',130, 82,32,'photo_8009364.html');
												thumbnails[8009367] = new thumbnail(8009367,'429430','','-1_thumb.jpg',130, 87,32,'photo_8009367.html');
												thumbnails[8009381] = new thumbnail(8009381,'429430','','-5_thumb.jpg',130, 87,32,'photo_8009381.html');
												thumbnails[8011003] = new thumbnail(8011003,'429430','','amateur_boxing_hartlepool-2_thumb.jpg',130, 87,32,'photo_8011003.html');
												thumbnails[8011005] = new thumbnail(8011005,'429430','','amateur_boxing_hartlepool-4_thumb.jpg',130, 87,32,'photo_8011005.html');
												thumbnails[8011791] = new thumbnail(8011791,'428842','','metamorphosis-1_thumb.jpg',130, 130,32,'photo_8011791.html');
												thumbnails[8012698] = new thumbnail(8012698,'428842','','metamorphosis-21_thumb.jpg',130, 130,32,'photo_8012698.html');
												thumbnails[5508321] = new thumbnail(5508321,'310420','','Mongolia_Book_8-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508321.html');
												thumbnails[5509396] = new thumbnail(5509396,'313176','','Brighty-Final_edit_thumb.jpg',130, 195,32,'photo_5509396.html');
												thumbnails[5516558] = new thumbnail(5516558,'310423','','Filey_2_thumb.jpg',130, 130,32,'photo_5516558.html');
												thumbnails[5508304] = new thumbnail(5508304,'310420','','Mongolia_Book_22-Final_Image_thumb.jpg',130, 130,32,'photo_5508304.html');
												thumbnails[5509308] = new thumbnail(5509308,'310423','','PiP__friend_1990-final_edit_thumb.jpg',130, 130,32,'photo_5509308.html');
												thumbnails[5528207] = new thumbnail(5528207,'313176','','Pip-1_thumb.jpg',130, 195,32,'photo_5528207.html');
												thumbnails[5508300] = new thumbnail(5508300,'310420','','Mongolia_Book_27-Final_Image_thumb.jpg',130, 130,32,'photo_5508300.html');
												thumbnails[5516575] = new thumbnail(5516575,'310423','','Filey_6_thumb.jpg',130, 130,32,'photo_5516575.html');
												thumbnails[5528212] = new thumbnail(5528212,'313176','','Yogi-1_thumb.jpg',130, 195,32,'photo_5528212.html');
												thumbnails[5499936] = new thumbnail(5499936,'310420','','Mongolia_Book_38-Final_Image_thumb.jpg',130, 130,32,'photo_5499936.html');
												thumbnails[5509239] = new thumbnail(5509239,'310423','','Cosmo-final_edit_thumb.jpg',130, 130,32,'photo_5509239.html');
												thumbnails[5528205] = new thumbnail(5528205,'313176','','Mick-1_thumb.jpg',130, 195,32,'photo_5528205.html');
												thumbnails[5499944] = new thumbnail(5499944,'310420','','Mongolia_Book_32-Final_Image_thumb.jpg',130, 130,32,'photo_5499944.html');
												thumbnails[5509300] = new thumbnail(5509300,'310423','','Two_pound_frank_worked_2-final_edit_thumb.jpg',130, 130,32,'photo_5509300.html');
												thumbnails[5528201] = new thumbnail(5528201,'313176','','Keith-1_thumb.jpg',130, 195,32,'photo_5528201.html');
												thumbnails[5508301] = new thumbnail(5508301,'310420','','Mongolia_Book_25-Final_Image_thumb.jpg',130, 130,32,'photo_5508301.html');
												thumbnails[5516581] = new thumbnail(5516581,'310423','','Filey_11_thumb.jpg',130, 130,32,'photo_5516581.html');
												thumbnails[5528210] = new thumbnail(5528210,'313176','','Neil_Cammiish-Boo_master_thumb.jpg',130, 196,32,'photo_5528210.html');
												thumbnails[5508303] = new thumbnail(5508303,'310420','','Mongolia_Book_23-Final_Image_thumb.jpg',130, 130,32,'photo_5508303.html');
												thumbnails[5509178] = new thumbnail(5509178,'310423','','Brighty_Portrait_Final_edit1_thumb.jpg',130, 130,32,'photo_5509178.html');
												thumbnails[5528258] = new thumbnail(5528258,'313176','','Two_Budgies_on_a_Plank_final_edit-sized_thumb.jpg',130, 85,32,'photo_5528258.html');
												thumbnails[5508302] = new thumbnail(5508302,'310420','','Mongolia_Book_24-Final_Image_thumb.jpg',130, 130,32,'photo_5508302.html');
												thumbnails[5516578] = new thumbnail(5516578,'310423','','Filey_5_thumb.jpg',130, 130,32,'photo_5516578.html');
												thumbnails[5528286] = new thumbnail(5528286,'313176','','Whitby_Phillipino_fishermen_thumb.jpg',130, 85,32,'photo_5528286.html');
												thumbnails[5501649] = new thumbnail(5501649,'310420','','Mongolia_Book_4-Final_Image-retonedsharpened_1_pix_thumb.jpg',130, 130,32,'photo_5501649.html');
												thumbnails[5516572] = new thumbnail(5516572,'310423','','Boy__Fish-1_thumb.jpg',130, 130,32,'photo_5516572.html');
												thumbnails[5528259] = new thumbnail(5528259,'313176','','Establishing_shot-Filey_Bay_thumb.jpg',130, 85,32,'photo_5528259.html');
												thumbnails[5501657] = new thumbnail(5501657,'310420','','Mongolia_Book_26-Final_Image_thumb.jpg',130, 130,32,'photo_5501657.html');
												thumbnails[5516584] = new thumbnail(5516584,'310423','','Filey_3_thumb.jpg',130, 130,32,'photo_5516584.html');
												thumbnails[5528260] = new thumbnail(5528260,'313176','','A_fragile_sea_of_souls2_thumb.jpg',130, 85,32,'photo_5528260.html');
												thumbnails[7986623] = new thumbnail(7986623,'428835','','japan_2009_final_edit-43_thumb.jpg',130, 195,32,'photo_7986623.html');
												thumbnails[5501646] = new thumbnail(5501646,'310420','','Mongolia_Tip-1-reworked_thumb.jpg',130, 130,32,'photo_5501646.html');
												thumbnails[5509302] = new thumbnail(5509302,'310423','','Keith_1990_worked_1-final_edit_thumb.jpg',130, 130,32,'photo_5509302.html');
												thumbnails[5499934] = new thumbnail(5499934,'310420','','Mongolia_Book_35-Final_Image_thumb.jpg',130, 130,32,'photo_5499934.html');
												thumbnails[5509309] = new thumbnail(5509309,'310423','','Bruce_final_edit_thumb.jpg',130, 130,32,'photo_5509309.html');
												thumbnails[7986779] = new thumbnail(7986779,'428835','','japan_2009_final_edit-34_thumb.jpg',130, 195,32,'photo_7986779.html');
												thumbnails[5508326] = new thumbnail(5508326,'310420','','Mongolia_Book_1-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508326.html');
												thumbnails[5508317] = new thumbnail(5508317,'310420','','Mongolia_Book_12-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508317.html');
												thumbnails[7986775] = new thumbnail(7986775,'428835','','japan_2009_final_edit-38_thumb.jpg',130, 195,32,'photo_7986775.html');
												thumbnails[5508316] = new thumbnail(5508316,'310420','','Mongolia_Book_13-Final_Image-reotoned_thumb.jpg',130, 130,32,'photo_5508316.html');
												thumbnails[5508309] = new thumbnail(5508309,'310420','','Mongolia_Book_18-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508309.html');
												thumbnails[7987415] = new thumbnail(7987415,'428835','','japan_2009_final_edit-56_thumb.jpg',130, 193,32,'photo_7987415.html');
												thumbnails[5499947] = new thumbnail(5499947,'310420','','Mongolia_Book_30-Final_Image_thumb.jpg',130, 130,32,'photo_5499947.html');
												thumbnails[5499950] = new thumbnail(5499950,'310420','','Mongolia_Book_29-Final_Image_thumb.jpg',130, 130,32,'photo_5499950.html');
												thumbnails[7986791] = new thumbnail(7986791,'428835','','japan_2009_final_edit-5_thumb.jpg',130, 195,32,'photo_7986791.html');
												thumbnails[5508318] = new thumbnail(5508318,'310420','','Mongolia_Book_11-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508318.html');
												thumbnails[5508313] = new thumbnail(5508313,'310420','','Mongolia_Book_14-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508313.html');
												thumbnails[7986777] = new thumbnail(7986777,'428835','','japan_2009_final_edit-37_thumb.jpg',130, 195,32,'photo_7986777.html');
												thumbnails[7986959] = new thumbnail(7986959,'313176','','Two_Pound_Frank-Safely_Anchored_thumb.jpg',130, 74,32,'photo_7986959.html');
												thumbnails[5499927] = new thumbnail(5499927,'310420','','Mongolia_Book_2-Final_Image-2-retoned_thumb.jpg',130, 130,32,'photo_5499927.html');
												thumbnails[5499938] = new thumbnail(5499938,'310420','','Mongolia_Book_34-Final_Image_thumb.jpg',130, 130,32,'photo_5499938.html');
												thumbnails[5499958] = new thumbnail(5499958,'310420','','Mongolia_Book_28-Final_Image_thumb.jpg',130, 130,32,'photo_5499958.html');
												thumbnails[5508311] = new thumbnail(5508311,'310420','','Mongolia_Book_16-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508311.html');
												thumbnails[7986746] = new thumbnail(7986746,'428835','','japan_2009_final_edit-39_thumb.jpg',130, 195,32,'photo_7986746.html');
												thumbnails[5508310] = new thumbnail(5508310,'310420','','Mongolia_Book_17-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508310.html');
												thumbnails[5508307] = new thumbnail(5508307,'310420','','Mongolia_Book_20-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508307.html');
												thumbnails[5508306] = new thumbnail(5508306,'310420','','Mongolia_Book_21-Final_Image_thumb.jpg',130, 130,32,'photo_5508306.html');
												thumbnails[5499315] = new thumbnail(5499315,'310420','','Mongolia_Book_40-Final_Image_thumb.jpg',130, 130,32,'photo_5499315.html');
												thumbnails[5508319] = new thumbnail(5508319,'310420','','Mongolia_Book_10-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508319.html');
												thumbnails[5508323] = new thumbnail(5508323,'310420','','Mongolia_Book_6-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508323.html');
												thumbnails[7986629] = new thumbnail(7986629,'428835','','japan_2009_final_edit-41_thumb.jpg',130, 195,32,'photo_7986629.html');
												thumbnails[5499937] = new thumbnail(5499937,'310420','','Mongolia_Book_36-Final_Image_thumb.jpg',130, 130,32,'photo_5499937.html');
												thumbnails[5499328] = new thumbnail(5499328,'310420','','Mongolia_Book_39-Final_Image_thumb.jpg',130, 130,32,'photo_5499328.html');
												thumbnails[5501653] = new thumbnail(5501653,'310420','','Mongolia_Book_15-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5501653.html');
												thumbnails[5508322] = new thumbnail(5508322,'310420','','Mongolia_Book_7-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508322.html');
												thumbnails[5508308] = new thumbnail(5508308,'310420','','Mongolia_Book_19-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508308.html');
												thumbnails[5508320] = new thumbnail(5508320,'310420','','Mongolia_Book_9-Final_Image-retoned_thumb.jpg',130, 130,32,'photo_5508320.html');
												thumbnails[7987345] = new thumbnail(7987345,'428835','','japan_2009_final_edit-44_thumb.jpg',130, 196,32,'photo_7987345.html');
												thumbnails[7193677] = new thumbnail(7193677,'429430','','-2_thumb.jpg',130, 87,32,'photo_7193677.html');
												thumbnails[7986939] = new thumbnail(7986939,'428835','','japan_2009_final_edit-12_thumb.jpg',130, 195,32,'photo_7986939.html');
												thumbnails[5509610] = new thumbnail(5509610,'429430','','H-pool_boxing1_thumb.jpg',130, 87,32,'photo_5509610.html');
												thumbnails[7986943] = new thumbnail(7986943,'428835','','japan_2009_final_edit-19_thumb.jpg',130, 195,32,'photo_7986943.html');
												thumbnails[7986448] = new thumbnail(7986448,'428835','','final_edit-19_thumb.jpg',130, 195,32,'photo_7986448.html');
												thumbnails[7986934] = new thumbnail(7986934,'428835','','japan_2009_final_edit-2_thumb.jpg',130, 87,32,'photo_7986934.html');
												thumbnails[7986937] = new thumbnail(7986937,'428835','','japan_2009_final_edit-3_thumb.jpg',130, 87,32,'photo_7986937.html');
												thumbnails[7986940] = new thumbnail(7986940,'428835','','japan_2009_final_edit-16_thumb.jpg',130, 87,32,'photo_7986940.html');
												thumbnails[7986942] = new thumbnail(7986942,'428835','','japan_2009_final_edit-18_thumb.jpg',130, 87,32,'photo_7986942.html');
												thumbnails[7986944] = new thumbnail(7986944,'428835','','japan_2009_final_edit-20_thumb.jpg',130, 87,32,'photo_7986944.html');
												thumbnails[7986946] = new thumbnail(7986946,'428835','','japan_2009_final_edit-29_thumb.jpg',130, 87,32,'photo_7986946.html');
												thumbnails[7986947] = new thumbnail(7986947,'428835','','japan_2009_final_edit-40_thumb.jpg',130, 87,32,'photo_7986947.html');
												thumbnails[7987347] = new thumbnail(7987347,'428835','','japan_2009_final_edit-45_thumb.jpg',130, 87,32,'photo_7987347.html');
												thumbnails[7987368] = new thumbnail(7987368,'428835','','japan_2009_final_edit-461_thumb.jpg',130, 87,32,'photo_7987368.html');
												thumbnails[7987383] = new thumbnail(7987383,'428835','','japan_2009_final_edit-48_thumb.jpg',130, 87,32,'photo_7987383.html');
												thumbnails[7987386] = new thumbnail(7987386,'428835','','japan_2009_final_edit-49_thumb.jpg',130, 87,32,'photo_7987386.html');
												thumbnails[7987402] = new thumbnail(7987402,'428835','','japan_2009_final_edit-52_thumb.jpg',130, 87,32,'photo_7987402.html');
												thumbnails[7987411] = new thumbnail(7987411,'428835','','japan_2009_final_edit-54_thumb.jpg',130, 87,32,'photo_7987411.html');
												thumbnails[7987414] = new thumbnail(7987414,'428835','','japan_2009_final_edit-55_thumb.jpg',130, 87,32,'photo_7987414.html');
												thumbnails[8000742] = new thumbnail(8000742,'428835','','final-20_thumb.jpg',130, 87,32,'photo_8000742.html');
												thumbnails[8000744] = new thumbnail(8000744,'428835','','final-21_thumb.jpg',130, 87,32,'photo_8000744.html');
												thumbnails[8000746] = new thumbnail(8000746,'428835','','final-22_thumb.jpg',130, 87,32,'photo_8000746.html');
												thumbnails[8000748] = new thumbnail(8000748,'428835','','final-24_thumb.jpg',130, 87,32,'photo_8000748.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[310423] = new gallery(310423,'5516584,5516581,5516578,5516575,5516572,5516558,5509309,5509308,5509302,5509300','2 Budgies on a Plank','gallery',[5516558,5509308,5516575,5509239,5509300,5516581,5509178,5516578,5516572,5516584,5509302,5509309],0, 0, '', 'gallery_310423.html',0,0);
				  					galleries[310420] = new gallery(310420,'5508326,5508323,5508322,5508321,5508320,5508319,5508318,5508317,5508316,5508313','Lost in Transition','gallery',[5508321,5508304,5508300,5499936,5499944,5508301,5508303,5508302,5501649,5501657,5501646,5499934,5508326,5508317,5508316,5508309,5499947,5499950,5508318,5508313,5499927,5499938,5499958,5508311,5508310,5508307,5508306,5499315,5508319,5508323,5499937,5499328,5501653,5508322,5508308,5508320],0, 0, '', 'gallery_310420.html',0,0);
				  					galleries[310421] = new gallery(310421,'5523061,5523056,5523054,5523052,5523051,5523049,5508677,5508676,5508672,5508642','Collaterally Damaged','gallery',[5508628,5508631,5508642,5508672,5508676,5508677,5523049,5523051,5523052,5523054,5523056,5523061],0, 0, '', 'gallery_310421.html',0,0);
				  					galleries[310419] = new gallery(310419,'5508558,5508553,5508551,5508549,5508545,5508537,5508531,5508528,5508527,5508525','Brick Lane','gallery',[5508518,5508524,5508525,5508527,5508528,5508531,5508537,5508545,5508549,5508551,5508553,5508558],0, 0, '', 'gallery_310419.html',0,0);
				  					galleries[428842] = new gallery(428842,'8012698,8011791,7983760,5498472,5497622,5497592,5497583,5497575,5497541,5497540','Metamorphosis','gallery',[5497540,5497541,5497575,5497583,5497592,5497622,5498472,7983760,8011791,8012698],0, 0, '', 'gallery_428842.html',0,0);
				  					galleries[313176] = new gallery(313176,'7986959,5528286,5528260,5528259,5528258,5528212,5528210,5528207,5528205,5528201','20 years after','gallery',[5509396,5528207,5528212,5528205,5528201,5528210,5528258,5528286,5528259,5528260,7986959],0, 0, '', 'gallery_313176.html',0,0);
				  					galleries[345993] = new gallery(345993,'6221962,6221947,6221879,6221674,6198863,6198808,6198791,6198456,6198195','An-Ger-Land','gallery',[6198195,6198456,6198791,6198808,6198863,6221674,6221879,6221947,6221962],0, 0, '', 'gallery_345993.html',0,0);
				  					galleries[428835] = new gallery(428835,'8000748,8000746,8000744,8000742,7987423,7987416,7987415,7987414,7987411,7987402','Tokyo Diaries','gallery',[7986417,7986437,7986440,7986441,7986443,7986444,7986445,7986446,7986449,7986450,7986451,7986452,7986495,7986793,7987371,7987400,7987416,7987423,7986623,7986779,7986775,7987415,7986791,7986777,7986746,7986629,7987345,7986939,7986943,7986448,7986934,7986937,7986940,7986942,7986944,7986946,7986947,7987347,7987368,7987383,7987386,7987402,7987411,7987414,8000742,8000744,8000746,8000748],0, 0, '', 'gallery_428835.html',0,0);
				  					galleries[429430] = new gallery(429430,'8011005,8011003,8009381,8009367,8009364,8009345,8009332,7987862,7987860,7987857','Hartlepool Amateur Boxing','gallery',[7987857,7987860,7987862,8009332,8009345,8009364,8009367,8009381,8011003,8011005,7193677,5509610],0, 0, '', 'gallery_429430.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '6198456,5528286,5528258,5516572,5509610,5509300,5508545,5508518,5508321,5508320,5508309,5501657,5501653,5501646,5499934,5499927,5497592,5497575,5497540';
imageSets[3] = '5557776,5557577,5550807';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/richwhitehead/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/richwhitehead/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Richard Whitehead-PHOTOGRAPHER- +44(0)7835 719056 : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							temp = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

