window.thumbnails = new Object();
												thumbnails[372663] = new thumbnail(372663,'30485','Blue Squares I','A10 Blue Squares I_thumb.jpg',130, 172,1,'photo_372663.html');
												thumbnails[372665] = new thumbnail(372665,'30485','Brown Squares V','A13 Brown Squares V_thumb.jpg',130, 177,1,'photo_372665.html');
												thumbnails[372676] = new thumbnail(372676,'30485','Squares IV','A16 Squares IIII_thumb.jpg',130, 130,1,'photo_372676.html');
												thumbnails[372681] = new thumbnail(372681,'30488','Brown Circles I','A8 Brown Circles_thumb.jpg',130, 128,1,'photo_372681.html');
												thumbnails[372682] = new thumbnail(372682,'30488','Blue Circles I','A9 Blue Circles_thumb.jpg',130, 104,1,'photo_372682.html');
												thumbnails[372683] = new thumbnail(372683,'30488','Bubbles in Blue I','A9a Bubbles in Blue I_thumb.jpg',130, 103,1,'photo_372683.html');
												thumbnails[372684] = new thumbnail(372684,'30488','Brown Circles II','Brown Circles II_thumb.jpg',130, 129,1,'photo_372684.html');
												thumbnails[372685] = new thumbnail(372685,'30490','Abstract Blue Waves (With process magenta)','A2_thumb.Abstract Blue Waves (With process magenta).jpg',130, 173,1,'photo_372685.html');
												thumbnails[372726] = new thumbnail(372726,'30490','Abstract Blue Waves With Process Magenta-Dance','A3 Abstract Blue Waves With Process Magenta-Dance_thumb.jpg',130, 178,1,'photo_372726.html');
												thumbnails[372729] = new thumbnail(372729,'30490','Rain <br>\r\n(The \'Chinese\' symbol for \'Rain\')','A4 Rain_thumb.jpg',130, 171,1,'photo_372729.html');
												thumbnails[372794] = new thumbnail(372794,'30502','Clifford Brown','A52 Clifford_thumb.jpg',130, 129,1,'photo_372794.html');
												thumbnails[372797] = new thumbnail(372797,'30502','Nude Study I','A54 Nude Study I_thumb.jpg',130, 176,1,'photo_372797.html');
												thumbnails[372801] = new thumbnail(372801,'30502','Nude Study II','A55 Nude Study II_thumb.jpg',130, 173,1,'photo_372801.html');
												thumbnails[372812] = new thumbnail(372812,'30504','Red Sunset Palm II','A35 Sunset Palm Small_thumb.jpg',130, 173,1,'photo_372812.html');
												thumbnails[372815] = new thumbnail(372815,'30504','Blue Sunset Palm','A36 Blue Sunset Palm_thumb.jpg',130, 172,1,'photo_372815.html');
												thumbnails[389264] = new thumbnail(389264,'30488','Bubbles in Brown I','Bubbles in Brown I_thumb.jpg',130, 104,1,'photo_389264.html');
												thumbnails[418310] = new thumbnail(418310,'30488','Bubles in Brown - Section I','Bubbles in Brown - Section I_thumb.jpg',130, 280,1,'photo_418310.html');
												thumbnails[580712] = new thumbnail(580712,'30504','Red Sunset Palms','A34 Sunset Palm Large1_thumb.jpg',130, 178,1,'photo_580712.html');
												thumbnails[580737] = new thumbnail(580737,'30504','Starlit Sunset','Starlit Sunset_thumb.jpg',130, 165,1,'photo_580737.html');
												thumbnails[580743] = new thumbnail(580743,'30490','Tropical Shower','A51 Tropical Shower1_thumb.jpg',130, 129,1,'photo_580743.html');
												thumbnails[580752] = new thumbnail(580752,'30504','Ibiza Sunset III','Melissa on stall 4_thumb.jpg',130, 173,1,'photo_580752.html');
												thumbnails[818276] = new thumbnail(818276,'30500','Coffee for Three (a & b)','Tea for 3 a & b_thumb.jpg',130, 79,1,'photo_818276.html');
												thumbnails[818298] = new thumbnail(818298,'30500','Mocha','Mocha_thumb.jpg',130, 165,1,'photo_818298.html');
												thumbnails[818400] = new thumbnail(818400,'30500','Steam Abstract','Steam Abstract_thumb.jpg',130, 104,1,'photo_818400.html');
												thumbnails[818405] = new thumbnail(818405,'30500','Coffee For Two, Abstract','Coffee for two abstrect_thumb.jpg',130, 104,1,'photo_818405.html');
												thumbnails[818407] = new thumbnail(818407,'30500','Cappuccino','Cappuccino_thumb.jpg',130, 165,1,'photo_818407.html');
												thumbnails[818409] = new thumbnail(818409,'30500','Latte','Latte_thumb.jpg',130, 166,1,'photo_818409.html');
												thumbnails[818415] = new thumbnail(818415,'30500','Tea For Two, Abstract','Coffee For Two_thumb.jpg',130, 101,1,'photo_818415.html');
												thumbnails[818419] = new thumbnail(818419,'30500','Coffee, Sir?','Coffee Sir_thumb.jpg',130, 159,1,'photo_818419.html');
												thumbnails[818425] = new thumbnail(818425,'30500','Coffee','Coffee_thumb.jpg',130, 165,1,'photo_818425.html');
												thumbnails[818429] = new thumbnail(818429,'30500','Espresso','Espresso_thumb.jpg',130, 163,1,'photo_818429.html');
												thumbnails[1078219] = new thumbnail(1078219,'30490','Aztec Abstract','Abstract Aztec  14_thumb.12.06.jpg',130, 64,1,'photo_1078219.html');
												thumbnails[2772794] = new thumbnail(2772794,'173728','Retina & the Fertalised Egg','130920083155_thumb.jpg',130, 363,1,'photo_2772794.html');
												thumbnails[2772796] = new thumbnail(2772796,'173728','Touch','130920083157_thumb.jpg',130, 357,1,'photo_2772796.html');
												thumbnails[2772880] = new thumbnail(2772880,'30490','Aquatic Abstract','Aquatic Abstract_thumb.jpg',130, 128,1,'photo_2772880.html');
												thumbnails[2773074] = new thumbnail(2773074,'173740','Wire For Sale','Birds On a Wire - Wire For Sale1_thumb.jpg',130, 132,1,'photo_2773074.html');
												thumbnails[2773085] = new thumbnail(2773085,'173740','The Red Umbrella','Birds On a Wire - Shelter from Rain1_thumb.jpg',130, 123,1,'photo_2773085.html');
												thumbnails[2773087] = new thumbnail(2773087,'30499','The Humming Birds','130920083160_thumb.jpg',130, 266,1,'photo_2773087.html');
												thumbnails[2773100] = new thumbnail(2773100,'30490','BS Mini - Mars','Brown Square Mini - Mini Mars1_thumb.jpg',130, 131,1,'photo_2773100.html');
												thumbnails[2773102] = new thumbnail(2773102,'30490','Starburst','Starburst Abstract_thumb.jpg',130, 172,1,'photo_2773102.html');
												thumbnails[2773104] = new thumbnail(2773104,'30499','Humming Bird','Humming Bird1_thumb.jpg',130, 130,1,'photo_2773104.html');
												thumbnails[4206730] = new thumbnail(4206730,'30499','The Fantail I','Fantail_1_thumb.JPG',130, 129,1,'photo_4206730.html');
												thumbnails[4206826] = new thumbnail(4206826,'30499','Into The Unknown','Into_the_Unknown_thumb.JPG',130, 130,1,'photo_4206826.html');
												thumbnails[4206832] = new thumbnail(4206832,'173740','Birds on a Wire:<br>\r\nLesson 1, CAT','Birds_on_a_Wire_-_Lesson_1_CAT_thumb.JPG',130, 92,1,'photo_4206832.html');
												thumbnails[5384098] = new thumbnail(5384098,'173728','The Journey','The_Journey1._thumb.JPG',130, 45,1,'photo_5384098.html');
												thumbnails[5384103] = new thumbnail(5384103,'173740','Lesson 2 - Dogs','Lesson_2_-_Dogs_thumb.JPG',130, 50,1,'photo_5384103.html');
												thumbnails[5384133] = new thumbnail(5384133,'173740','Midnight Sweethearts','Midnight_Sweethearts_thumb.JPG',130, 130,1,'photo_5384133.html');
												thumbnails[5384134] = new thumbnail(5384134,'30500','Beer - Blond','Beer_Blond_thumb.JPG',130, 262,1,'photo_5384134.html');
												thumbnails[5384143] = new thumbnail(5384143,'30500','Beer Glass I','Beer_Glass_1_thumb.JPG',130, 132,1,'photo_5384143.html');
												thumbnails[5384147] = new thumbnail(5384147,'30500','Vin','VIN_thumb.JPG',130, 268,1,'photo_5384147.html');
												thumbnails[5384148] = new thumbnail(5384148,'30500','Vin Rouge, Rose ou Blanc','Vin_Rouge_Rose_ou_Blanc_thumb.JPG',130, 258,1,'photo_5384148.html');
												thumbnails[5384151] = new thumbnail(5384151,'30500','Vin Rouge','Vin_Rouge_thumb.JPG',130, 129,1,'photo_5384151.html');
												thumbnails[7495249] = new thumbnail(7495249,'30499','Coupling','Coupling_thumb.JPG',130, 130,1,'photo_7495249.html');
												thumbnails[7495260] = new thumbnail(7495260,'30499','The Jellyfish','The_Jellyfish_thumb.JPG',130, 131,1,'photo_7495260.html');
												thumbnails[7495826] = new thumbnail(7495826,'30490','Brown Textured Abstract ~ Strata','Brown_Textured_Abstract_-_Strata_I_thumb.jpg',130, 364,1,'photo_7495826.html');
												thumbnails[7495847] = new thumbnail(7495847,'30500','Coffee & Cocoa','coffee_cocoa_thumb.JPG',130, 65,1,'photo_7495847.html');
												thumbnails[7495979] = new thumbnail(7495979,'30499','Ride Out','Ride_out_triptych_thumb.JPG',130, 43,1,'photo_7495979.html');
												thumbnails[7495989] = new thumbnail(7495989,'30490','Textured Brown & Gold Panel','Textured_Brown__Gold_Panal_thumb.JPG',130, 130,1,'photo_7495989.html');
												thumbnails[7496051] = new thumbnail(7496051,'30490','Mars II','Mars_II_thumb.JPG',130, 129,1,'photo_7496051.html');
												thumbnails[7496253] = new thumbnail(7496253,'30492','Lightning','Lightning_small1_thumb.JPG',130, 336,1,'photo_7496253.html');
												thumbnails[7496366] = new thumbnail(7496366,'406430','Strictly Beatdown Miami Sampler 2010','WMC_Sampler_2010_thumb.jpg',130, 130,1,'photo_7496366.html');
												thumbnails[7498734] = new thumbnail(7498734,'406430','MAQman EP Nightlife','MAQman_EP_copy_thumb.jpg',130, 130,1,'photo_7498734.html');
												thumbnails[7498741] = new thumbnail(7498741,'406430','Motown Millenium EP','SBR1102_400_x_400_mpl_thumb.jpg',130, 130,1,'photo_7498741.html');
												thumbnails[372833] = new thumbnail(372833,'30505','Egyptian Plaque I','A21 Egyptian Plaque I_thumb.jpg',130, 165,1,'photo_372833.html');
												thumbnails[580756] = new thumbnail(580756,'30505','Egyptian plaque II','A20 egyptian plaque II1_thumb.jpg',130, 171,1,'photo_580756.html');
												thumbnails[372840] = new thumbnail(372840,'30505','Blossom & the Four Seasons','A28 BLOSSOM & THE FOUR SEASONS_thumb... (2).jpg',130, 152,1,'photo_372840.html');
												thumbnails[372843] = new thumbnail(372843,'30505','Steady Steps to Clear Sky','A29 steady steps to clear sky_thumb.jpg',130, 138,1,'photo_372843.html');
												thumbnails[418359] = new thumbnail(418359,'30505','Bamboo - in Gold Leaf','Bamboo - in Gold Leaf_thumb.jpg',130, 306,1,'photo_418359.html');
												thumbnails[372835] = new thumbnail(372835,'30505','Chinese Blossom','A23a Chinese Blossom_thumb.jpg',130, 313,1,'photo_372835.html');
												thumbnails[580723] = new thumbnail(580723,'30505','Indian Sari','A24 Indian Sari1_thumb.jpg',130, 129,1,'photo_580723.html');
												thumbnails[2806758] = new thumbnail(2806758,'30499','Private Commission','Gallop through the surf_thumb.jpg',130, 87,1,'photo_2806758.html');
												thumbnails[7508411] = new thumbnail(7508411,'30499','\'Knowhere\' on the Gallops with stable companion, Private Commission','KNOWHERE_ON_THE_GALLOPS_thumb.jpg',130, 98,1,'photo_7508411.html');
												thumbnails[580728] = new thumbnail(580728,'30505','Chinese Pattern II','A27 Chinese Pattern II1_thumb.jpg',130, 128,1,'photo_580728.html');
												thumbnails[2806761] = new thumbnail(2806761,'30499','Pet Portrait, Private Commission','Pet Portraits_thumb.jpg',130, 85,1,'photo_2806761.html');
												thumbnails[580767] = new thumbnail(580767,'30505','Chinese Pattern I','A25 CHINESE BLOSSOM PATTERN (2)1_thumb.jpg',130, 130,1,'photo_580767.html');
												thumbnails[1078221] = new thumbnail(1078221,'30499','Stride Out','Stride Out_thumb.jpg',130, 86,1,'photo_1078221.html');
												thumbnails[372748] = new thumbnail(372748,'30504','North Star I','A39 North Star_thumb.jpg',130, 46,1,'photo_372748.html');
												thumbnails[6306361] = new thumbnail(6306361,'30499','Red Indian Sunrise','Red_Indian_Sunrise_thumb.JPG',130, 86,1,'photo_6306361.html');
												thumbnails[372767] = new thumbnail(372767,'30499','Elephants','A44 Elephants cropped_thumb.jpg',130, 106,1,'photo_372767.html');
												thumbnails[6306277] = new thumbnail(6306277,'30504','Red Sunset Palms Triptych','Red_sunset_palm_triptych_thumb.JPG',130, 47,1,'photo_6306277.html');
												thumbnails[7496016] = new thumbnail(7496016,'30499','Riders at Dawn - Private Commission','riders_at_dawn_small_thumb.JPG',130, 66,1,'photo_7496016.html');
												thumbnails[7495975] = new thumbnail(7495975,'30492','Island Minis','Island_Minis_thumb.JPG',130, 127,1,'photo_7495975.html');
												thumbnails[372759] = new thumbnail(372759,'30492','Island Solitude','Island Solitude_thumb.jpg',130, 127,1,'photo_372759.html');
												thumbnails[372744] = new thumbnail(372744,'30492','Beyond The Beach','A32 Beyond The Beach_thumb.jpg',130, 96,1,'photo_372744.html');
												thumbnails[818272] = new thumbnail(818272,'30492','Boat in Mooring','Boat in Mooring_thumb.jpg',130, 104,1,'photo_818272.html');
												thumbnails[1701401] = new thumbnail(1701401,'30492','Seascape in Blue','Seascape in Blue I_thumb.jpg',130, 134,1,'photo_1701401.html');
												thumbnails[372750] = new thumbnail(372750,'30492','Moonlit Sea Central Panel','A40 Moonlit sea Central Panal_thumb.jpg',130, 98,1,'photo_372750.html');
												thumbnails[1078223] = new thumbnail(1078223,'30492','Moonlit Kiss','Moonlit Kiss I1_thumb.jpg',130, 46,1,'photo_1078223.html');
												thumbnails[5384157] = new thumbnail(5384157,'30492','Sunset Romance','Sunset_Romance_thumb.JPG',130, 49,1,'photo_5384157.html');
												thumbnails[372742] = new thumbnail(372742,'30492','Dominican Kiss','Dominican_Republic_Lovers_thumb.JPG',130, 38,1,'photo_372742.html');
												thumbnails[372764] = new thumbnail(372764,'30492','Mediterranean Landscape','Mediterranean Landscape_thumb.jpg',130, 102,1,'photo_372764.html');
												thumbnails[7495972] = new thumbnail(7495972,'30492','The Cottage','cottage_thumb.JPG',130, 128,1,'photo_7495972.html');
												thumbnails[818431] = new thumbnail(818431,'63450','Coffee Arrangement','Coffee Arrangement_thumb.jpg',130, 267,1,'photo_818431.html');
												thumbnails[818440] = new thumbnail(818440,'63450','The Slender Vase','The Slender Vase_thumb.jpg',130, 266,1,'photo_818440.html');
												thumbnails[818447] = new thumbnail(818447,'63450','Cream Arrangement','Cream arrangement_thumb.jpg',130, 265,1,'photo_818447.html');
												thumbnails[818450] = new thumbnail(818450,'63450','A Cosy Arrangement','A cozy arrangement_thumb.jpg',130, 266,1,'photo_818450.html');
												thumbnails[818460] = new thumbnail(818460,'63450','Wisteria Diptych','Whisteria Diptych_thumb.jpg',130, 253,1,'photo_818460.html');
												thumbnails[7495786] = new thumbnail(7495786,'63450','Abstract Lillies & Gold','Abstract_Lillies_in_Brown__Gold_thumb.JPG',130, 348,1,'photo_7495786.html');
												thumbnails[7495795] = new thumbnail(7495795,'63450','Flower Arrangement I','Flower_Arrangement_I_thumb.JPG',130, 269,1,'photo_7495795.html');
												thumbnails[7495789] = new thumbnail(7495789,'63450','Lillies & Gold','Lillies__Gold_thumb.JPG',130, 131,1,'photo_7495789.html');
												thumbnails[372732] = new thumbnail(372732,'173731','Latitude or Longitude ','A6 Latitude or Longitude b_thumb.jpg',130, 34,1,'photo_372732.html');
												thumbnails[2772831] = new thumbnail(2772831,'173731','Surfing the Current','Surfing the Current_thumb.jpg',130, 44,1,'photo_2772831.html');
												thumbnails[6306228] = new thumbnail(6306228,'173731','Lavender Triptych','Lavander_Triptych_thumb.JPG',130, 37,1,'photo_6306228.html');
												thumbnails[7495819] = new thumbnail(7495819,'173731','Brown & Gold Triptych','Brown__Gold_Triptych_thumb.JPG',130, 37,1,'photo_7495819.html');
												thumbnails[2773092] = new thumbnail(2773092,'173731','BS Minis - Triptych','Brown Square Mini - 2 x mars 1 x feathered_thumb.jpg',130, 42,1,'photo_2773092.html');
												thumbnails[2772832] = new thumbnail(2772832,'173731','Brown & Gold Textured Abstract','B & G Textured Abstract MHM0_thumb.jpg',130, 37,1,'photo_2772832.html');
												thumbnails[6306259] = new thumbnail(6306259,'173731','Red Orient Triptych','Red_Triptych_thumb.JPG',130, 52,1,'photo_6306259.html');
												thumbnails[2772830] = new thumbnail(2772830,'173731','Verte a Trois','Verte a trois_thumb.jpg',130, 31,1,'photo_2772830.html');
												thumbnails[7496028] = new thumbnail(7496028,'173731','Wood & Fire Triptych ','Wood__Fire_Triptych_thumb.JPG',130, 44,1,'photo_7496028.html');
												thumbnails[7495822] = new thumbnail(7495822,'173731','Brown Squares Mini ~ Abstract Triptych','Brown_Square_Mini_-_Abstracts_thumb.JPG',130, 380,1,'photo_7495822.html');
												thumbnails[7496078] = new thumbnail(7496078,'30485','Steady Steps to Clear Sky','MHM0320_Steady_Steps_to_Clear_Sky_Squares_thumb.JPG',130, 54,1,'photo_7496078.html');
												thumbnails[818454] = new thumbnail(818454,'30485','Romancing The Orient','Romancing the Orient_thumb.jpg',130, 51,1,'photo_818454.html');
												thumbnails[1047232] = new thumbnail(1047232,'30485','Eastern Surprise','Eastern Surprise_thumb.jpg',130, 53,1,'photo_1047232.html');
												thumbnails[372672] = new thumbnail(372672,'30485','3 Squared in Brown I','A13a 3 Squared in Brown I_thumb.jpg',130, 129,1,'photo_372672.html');
												thumbnails[580726] = new thumbnail(580726,'30485','3 Squared in Brown XVII','3 Squared in Brown XVII_thumb.jpg',130, 129,1,'photo_580726.html');
												thumbnails[7495773] = new thumbnail(7495773,'30485','3 Squared in Brown - Longlife','mhm0146_thumb.jpg',130, 133,1,'photo_7495773.html');
												thumbnails[2773033] = new thumbnail(2773033,'30485','5 Squared Multi-Colour','4 Squared Multi-Clour Commission1_thumb.jpg',130, 129,1,'photo_2773033.html');
												thumbnails[372668] = new thumbnail(372668,'30485','3 Squared Multi-Colour, Bird on a Wire','A13 b 3 Squared Multi-Colour, Bird on a Wire_thumb.jpg',130, 129,1,'photo_372668.html');
												thumbnails[372654] = new thumbnail(372654,'30485','3 Squared Multi Colour - Boat','3 Squared Multi Colour-Boat_thumb.jpg',130, 129,1,'photo_372654.html');
												thumbnails[2773030] = new thumbnail(2773030,'30485','3 Squared in Blue','3 Squared in Blue_thumb.jpg',130, 131,1,'photo_2773030.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[30490] = new gallery(30490,'7496051,7495989,7495826,2773102,2773100,2772880,1078219,580743,372729,372726','Abstract','gallery',[372685,372726,372729,580743,1078219,2772880,2773100,2773102,7495826,7495989,7496051],0, 0, '', 'gallery_30490.html',0,0);
				  					galleries[173731] = new gallery(173731,'7496028,7495822,7495819,6306259,6306228,2773092,2772832,2772831,2772830,372732','Abstract Triptychs','gallery',[372732,2772831,6306228,7495819,2773092,2772832,6306259,2772830,7496028,7495822],0, 0, '', 'gallery_173731.html',0,0);
				  					galleries[406430] = new gallery(406430,'7498741,7498734,7496366','Commercial Design','gallery',[7496366,7498734,7498741],0, 0, '', 'gallery_406430.html',0,0);
				  					galleries[173728] = new gallery(173728,'5384098,2772796,2772794','Conceptual','gallery',[2772794,2772796,5384098],0, 0, '', 'gallery_173728.html',0,0);
				  					galleries[30500] = new gallery(30500,'7495847,5384151,5384148,5384147,5384143,5384134,818429,818425,818419,818415','Contemporary Café','gallery',[818276,818298,818400,818405,818407,818409,818415,818419,818425,818429,5384134,5384143,5384147,5384148,5384151,7495847],0, 0, '', 'gallery_30500.html',0,0);
				  					galleries[30499] = new gallery(30499,'7508411,7496016,7495979,7495260,7495249,6306361,4206826,4206730,2806761,2806758','Contemporary Wildlife','gallery',[2773087,2773104,4206730,4206826,7495249,7495260,7495979,2806758,7508411,2806761,1078221,6306361,372767,7496016],0, 0, '', 'gallery_30499.html',0,0);
				  					galleries[30505] = new gallery(30505,'580767,580756,580728,580723,418359,372843,372840,372835,372833','Cultural','gallery',[372833,580756,372840,372843,418359,372835,580723,580728,580767],0, 0, '', 'gallery_30505.html',0,0);
				  					galleries[30502] = new gallery(30502,'372801,372797,372794','Figurative','gallery',[372794,372797,372801],0, 0, '', 'gallery_30502.html',0,0);
				  					galleries[173740] = new gallery(173740,'5384133,5384103,4206832,2773085,2773074','Humour','gallery',[2773074,2773085,4206832,5384103,5384133],0, 0, '', 'gallery_173740.html',0,0);
				  					galleries[30492] = new gallery(30492,'7496253,7495975,7495972,5384157,1701401,1078223,818272,372764,372759,372750','Land/Sea scape','gallery',[7496253,7495975,372759,372744,818272,1701401,372750,1078223,5384157,372742,372764,7495972],0, 0, '', 'gallery_30492.html',0,0);
				  					galleries[30504] = new gallery(30504,'6306277,580752,580737,580712,372815,372812,372748','Sunsets','gallery',[372812,372815,580712,580737,580752,372748,6306277],0, 0, '', 'gallery_30504.html',0,0);
				  					galleries[30488] = new gallery(30488,'418310,389264,372684,372683,372682,372681','Circles','gallery',[372681,372682,372683,372684,389264,418310],0, 0, '', 'gallery_30488.html',0,0);
				  					galleries[63450] = new gallery(63450,'7495795,7495789,7495786,818460,818450,818447,818440,818431','Still Life','gallery',[818431,818440,818447,818450,818460,7495786,7495795,7495789],0, 0, '', 'gallery_63450.html',0,0);
				  					galleries[30485] = new gallery(30485,'7496078,7495773,2773033,2773030,1047232,818454,580726,372676,372672,372668','Squares','gallery',[372663,372665,372676,7496078,818454,1047232,372672,580726,7495773,2773033,372668,372654,2773030],0, 0, '', 'gallery_30485.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '580767,580737,580728,580723,580712';
imageSets[3] = '7508411,7498741,7498734,7496366,7496253,7496078,7496051,7496028,7496016,7495989,7495979,7495975,7495972,7495847,7495826,7495822,7495819,7495795,7495789,7495786,7495773,7495260,7495249,6306361,6306277,6306259,6306228,5384157,5384151,5384148,5384147,5384143,5384134,5384133,5384103,5384098,4206832,4206826,4206730,2806761,2806758,2773104,2773102,2773100,2773092,2773087,2773085,2773074,2773033,2773030';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Melissa/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Melissa/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Melissa/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Melissa/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Melissa/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Melissa/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 = 'Melissaart.co.uk: ' + 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> ' + (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 + '<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;
	}
}

			

