window.thumbnails = new Object();
												thumbnails[5555637] = new thumbnail(5555637,'','','brida_kiss_necklace_romance_thumb.jpg',130, 87,5,'#');
												thumbnails[5555662] = new thumbnail(5555662,'','','wedding-shoes_thumb.jpg',130, 87,5,'#');
												thumbnails[5555667] = new thumbnail(5555667,'','','wedding-shoes-quilt_thumb.jpg',130, 99,5,'#');
												thumbnails[5555672] = new thumbnail(5555672,'','','white_roses_dew_thumb.jpg',130, 87,5,'#');
												thumbnails[5571760] = new thumbnail(5571760,'','','Eternal_Weddings_Designer_Dress2_thumb.jpg',130, 87,5,'#');
												thumbnails[5571761] = new thumbnail(5571761,'','','Eternal_Weddings_Romantic_Bride_Groom_2_thumb.jpg',130, 87,5,'#');
												thumbnails[5608883] = new thumbnail(5608883,'','','Eternal_Weddings_Designer_Dress_Feather_Elegance1_thumb.jpg',130, 87,5,'#');
												thumbnails[5609118] = new thumbnail(5609118,'','','Eternal_Weddings_Designer_Dress_Lace_Dressing_thumb.jpg',130, 80,5,'#');
												thumbnails[5612442] = new thumbnail(5612442,'','','Eternal_-Weddings_Figure_Ecstacy_Limosine_thumb.jpg',130, 96,5,'#');
												thumbnails[5612792] = new thumbnail(5612792,'','','Eternal_Weddings_Bouquet_Lillies_Limousine_thumb.jpg',130, 87,5,'#');
												thumbnails[5571912] = new thumbnail(5571912,'316040','','Eternal_Weddings_Bride_Groom_Three_Kings_Shieldhill_02EP3543_thumb.jpg',130, 87,5,'photo_5571912.html');
												thumbnails[5571915] = new thumbnail(5571915,'316040','','Eternal_Weddings_Bride_Three_Kings_02EP3552_thumb.jpg',87, 130,5,'photo_5571915.html');
												thumbnails[5571917] = new thumbnail(5571917,'316040','','Eternal_Weddings_Cake_Reception_Three_Kings_02EP3617_thumb.jpg',87, 130,5,'photo_5571917.html');
												thumbnails[5571918] = new thumbnail(5571918,'316040','','Eternal_Weddings_Dress_02EP3530_thumb.jpg',87, 130,5,'photo_5571918.html');
												thumbnails[5571920] = new thumbnail(5571920,'316040','','Eternal_Weddings_Dress_Bow_Three_Kings_02EP3639_thumb.jpg',87, 130,5,'photo_5571920.html');
												thumbnails[5571921] = new thumbnail(5571921,'316040','','Eternal_Weddings_First_Dance_Reception_Three_Kings_02EP3768_thumb.jpg',87, 130,5,'photo_5571921.html');
												thumbnails[5571923] = new thumbnail(5571923,'316040','','Eternal_Weddings_First_Dance_Reception_Three_Kings_02EP3778_thumb.jpg',87, 130,5,'photo_5571923.html');
												thumbnails[5571924] = new thumbnail(5571924,'316040','','Eternal_Weddings_Flowers_Reception_Three_Kings_02EP3266_thumb.jpg',130, 87,5,'photo_5571924.html');
												thumbnails[5571927] = new thumbnail(5571927,'316040','','Eternal_Weddings_Reception_Balloons_Three_Kings_02EP3621_thumb.jpg',87, 130,5,'photo_5571927.html');
												thumbnails[5571929] = new thumbnail(5571929,'316040','','Eternal_Weddings_Table_Settings_Reception_Three_Kings_02EP3636_thumb.jpg',87, 130,5,'photo_5571929.html');
												thumbnails[5571941] = new thumbnail(5571941,'316041','','Eternal_Weddings_Beautiful_Bride_Elation_03831_thumb.jpg',130, 87,5,'photo_5571941.html');
												thumbnails[5571944] = new thumbnail(5571944,'316041','','Eternal_Weddings_Embrace_Veil_Love_Joy_0456_thumb.jpg',87, 130,5,'photo_5571944.html');
												thumbnails[5571946] = new thumbnail(5571946,'316041','','Eternal_Weddings_Groom_Dressing_Relaxed_0325_thumb.jpg',87, 130,5,'photo_5571946.html');
												thumbnails[5571948] = new thumbnail(5571948,'316041','','Eternal_Weddings_Happy_Couple_Love_0390_thumb.jpg',130, 86,5,'photo_5571948.html');
												thumbnails[5571950] = new thumbnail(5571950,'316041','','Eternal_Weddings_Happy_Smiles_Tiara_0319_thumb.jpg',130, 87,5,'photo_5571950.html');
												thumbnails[5571951] = new thumbnail(5571951,'316041','','Eternal_Weddings_Love_Kiss_Embrace_364_thumb.jpg',130, 87,5,'photo_5571951.html');
												thumbnails[5571952] = new thumbnail(5571952,'316041','','Eternal_Weddings_Loving_Embrace_0557_thumb.jpg',82, 130,5,'photo_5571952.html');
												thumbnails[5571953] = new thumbnail(5571953,'316041','','Eternal_Weddings_Necklace_Tiara_Embrace_Love_0355_thumb.jpg',130, 86,5,'photo_5571953.html');
												thumbnails[5571955] = new thumbnail(5571955,'316041','','Eternal_Weddings_Necklace_Tiara_Love_Embrace_0354_thumb.jpg',87, 130,5,'photo_5571955.html');
												thumbnails[5571956] = new thumbnail(5571956,'316041','','Eternal_Weddings_Passionate_Embrace_Joy_0444_thumb.jpg',130, 87,5,'photo_5571956.html');
												thumbnails[5571957] = new thumbnail(5571957,'316041','','Eternal_Weddings_Passionate_Embrace_Kiss_0433_thumb.jpg',130, 87,5,'photo_5571957.html');
												thumbnails[5571960] = new thumbnail(5571960,'316041','','Eternal_Weddings_Passionate_Embrace_Laughter_0436_thumb.jpg',87, 130,5,'photo_5571960.html');
												thumbnails[5571962] = new thumbnail(5571962,'316042','','Eternal_Weddings_Accessories_Corsage_02EP22651_thumb.jpg',130, 87,5,'photo_5571962.html');
												thumbnails[5572013] = new thumbnail(5572013,'316042','','Eternal_Weddings_Bridal_Shoes_Richmond_Park_Hotel_Boness_-02EP2248_thumb.jpg',87, 130,5,'photo_5572013.html');
												thumbnails[5572056] = new thumbnail(5572056,'316042','','Eternal_Weddings_Bride_Groom_Boness_02EP2672_thumb.jpg',87, 130,5,'photo_5572056.html');
												thumbnails[5572075] = new thumbnail(5572075,'316042','','Eternal_Weddings_Couple_Boness_02EP2580_thumb.jpg',87, 130,5,'photo_5572075.html');
												thumbnails[5572083] = new thumbnail(5572083,'316042','','Eternal_Weddings_Flowers_Bouquet_02EP2259_thumb.jpg',130, 87,5,'photo_5572083.html');
												thumbnails[5572084] = new thumbnail(5572084,'316042','','Eternal_Weddings_Flowers_Car_Boness_02EP2375_thumb.jpg',130, 87,5,'photo_5572084.html');
												thumbnails[5572086] = new thumbnail(5572086,'316042','','Eternal_Weddings_Jumping_capers_02EP2426_thumb.jpg',130, 87,5,'photo_5572086.html');
												thumbnails[5572087] = new thumbnail(5572087,'316042','','Eternal_Weddings_Red_Roses_Richmond_Park_Hotel_Boness_-02EP2240_thumb.jpg',87, 130,5,'photo_5572087.html');
												thumbnails[5572088] = new thumbnail(5572088,'316042','','Eternal_Weddings_Wedding_Dress_Feather_02EP2254_thumb.jpg',87, 130,5,'photo_5572088.html');
												thumbnails[5572273] = new thumbnail(5572273,'316043','','Eternal_Weddings_Admiration_Look_Couple_Camelon_Z4H51911_thumb.jpg',87, 130,5,'photo_5572273.html');
												thumbnails[5572291] = new thumbnail(5572291,'316043','','Eternal_Weddings_Beautiful_Bride_Dressing_Bodice_Z4H48771_thumb.jpg',87, 130,5,'photo_5572291.html');
												thumbnails[5572293] = new thumbnail(5572293,'316043','','Eternal_Weddings_Beautiful_Bride_Dressing_Bodice-_Z4H48751_thumb.jpg',87, 130,5,'photo_5572293.html');
												thumbnails[5572294] = new thumbnail(5572294,'316043','','Eternal_Weddings_Beautiful_Enchanting_Bride_Z4H51611_thumb.jpg',87, 130,5,'photo_5572294.html');
												thumbnails[5572296] = new thumbnail(5572296,'316043','','Eternal_Weddings_Bridal_Bouquet_Lillies_Z4H52391_thumb.jpg',130, 87,5,'photo_5572296.html');
												thumbnails[5572297] = new thumbnail(5572297,'316043','','Eternal_Weddings_Car_Departure__Z4H5245_thumb.jpg',130, 87,5,'photo_5572297.html');
												thumbnails[5572298] = new thumbnail(5572298,'316043','','Eternal_Weddings_Car_Ribbons_Figure_Z4H4892_thumb.jpg',130, 87,5,'photo_5572298.html');
												thumbnails[5572299] = new thumbnail(5572299,'316043','','Eternal_Weddings_Couple_Loving_Kiss_Z4H5222_thumb.jpg',80, 130,5,'photo_5572299.html');
												thumbnails[5572300] = new thumbnail(5572300,'316043','','Eternal_Weddings_Dance_Bride_Groom_Glenskirlie_Z4H5577_thumb.jpg',87, 130,5,'photo_5572300.html');
												thumbnails[5572301] = new thumbnail(5572301,'316043','','Eternal_Weddings_Designer_Cake_Flowers_Glenskirlie_Z4H5284_thumb.jpg',87, 130,5,'photo_5572301.html');
												thumbnails[5572303] = new thumbnail(5572303,'316043','','Eternal_Weddings_Designer_Dress_Z4H4781_thumb.jpg',130, 87,5,'photo_5572303.html');
												thumbnails[5572305] = new thumbnail(5572305,'316043','','Eternal_Weddings_Fireworks_Glenskirlie_Z4H5670_thumb.jpg',87, 130,5,'photo_5572305.html');
												thumbnails[5572306] = new thumbnail(5572306,'316043','','Eternal_Weddings_Glenskirlie_Car_Arrival_Z4H5267_thumb.jpg',130, 87,5,'photo_5572306.html');
												thumbnails[5572307] = new thumbnail(5572307,'316043','','Eternal_Weddings_Groom_Admiring_Bride_Camelon_Z4H5147_thumb.jpg',87, 130,5,'photo_5572307.html');
												thumbnails[5572308] = new thumbnail(5572308,'316043','','Eternal_Weddings_Groom_Best_Man_Z4H4922_thumb.jpg',130, 87,5,'photo_5572308.html');
												thumbnails[5572309] = new thumbnail(5572309,'316043','','Eternal_Weddings_Reception_Glenskirlie_Z4H5285_thumb.jpg',87, 130,5,'photo_5572309.html');
												thumbnails[5572310] = new thumbnail(5572310,'316043','','Eternal_Weddings_Shoes_Designer_Kiki_Jewel_Z4H4767_thumb.jpg',87, 130,5,'photo_5572310.html');
												thumbnails[5572481] = new thumbnail(5572481,'316044','','Eternal_Weddings_Bride_Elegance_Callendar_House_Falkirk_Z4H6452_thumb.jpg',130, 90,5,'photo_5572481.html');
												thumbnails[5572482] = new thumbnail(5572482,'316044','','Eternal_Weddings_Bride_Groom_Embracing_Z4H6614_thumb.jpg',80, 130,5,'photo_5572482.html');
												thumbnails[5572484] = new thumbnail(5572484,'316044','','Eternal_Weddings_Bride_Stylish_Callendar_House_Falkirk_Z4H6308_thumb.jpg',87, 130,5,'photo_5572484.html');
												thumbnails[5572486] = new thumbnail(5572486,'316044','','Eternal_Weddings_Brides_Maids_Callendar_House_Falkirk_Z4H6440_thumb.jpg',87, 130,5,'photo_5572486.html');
												thumbnails[5572487] = new thumbnail(5572487,'316044','','Eternal_Weddings_Callendar_House_Falkirk_Group_Z4H6427_thumb.jpg',87, 130,5,'photo_5572487.html');
												thumbnails[5572491] = new thumbnail(5572491,'316044','','Eternal_Weddings_ceremony_Callendar_House_Falkirk_Z4H6311_thumb.jpg',87, 130,5,'photo_5572491.html');
												thumbnails[5572494] = new thumbnail(5572494,'316044','','Eternal_Weddings_Ceremony_Callendar_House_Falkirk_Z4H6324_thumb.jpg',130, 87,5,'photo_5572494.html');
												thumbnails[5572497] = new thumbnail(5572497,'316044','','Eternal_Weddings_Flower_Girls_Callendar_House_Falkirk_Z4H6261_thumb.jpg',87, 130,5,'photo_5572497.html');
												thumbnails[5572499] = new thumbnail(5572499,'316044','','Eternal_Weddings_Flower_Girls_Callendar_House_Falkirk_Z4H6292_thumb.jpg',87, 130,5,'photo_5572499.html');
												thumbnails[5572501] = new thumbnail(5572501,'316044','','Eternal_Weddings_Flower_Girls_Z4H6578_thumb.jpg',130, 87,5,'photo_5572501.html');
												thumbnails[5572523] = new thumbnail(5572523,'316044','','Eternal_Weddings_Romantic_Bride_Groom_Callendar_House_Falkirk__Z4H6470_thumb.jpg',89, 130,5,'photo_5572523.html');
												thumbnails[5572549] = new thumbnail(5572549,'316044','','Eternal_Weddings_Romantic_Bride_Groom_Callendar_House_Falkirk_Z4H6457_thumb.jpg',87, 130,5,'photo_5572549.html');
												thumbnails[5572552] = new thumbnail(5572552,'316044','','Eternal_Weddings_Romantic_Bride_Groom_Callendar_House_Falkirk_Z4H6475_thumb.jpg',81, 130,5,'photo_5572552.html');
												thumbnails[5572555] = new thumbnail(5572555,'316044','','Eternal_Weddings_Romantic_Bride_Groom_Callendar_House_Falkirk_Z4H6478_thumb.jpg',130, 87,5,'photo_5572555.html');
												thumbnails[5572557] = new thumbnail(5572557,'316044','','Eternal_Weddings_Romantic_Bride_Groom_Callendar_House_Falkirk_Z4H6483_thumb.jpg',87, 130,5,'photo_5572557.html');
												thumbnails[5572559] = new thumbnail(5572559,'316044','','Eternal_Weddings_Romantic_Happy_Bride_Groom_Callendar_House_Falkirk__Z4H64691_thumb.jpg',81, 130,5,'photo_5572559.html');
												thumbnails[5572719] = new thumbnail(5572719,'316045','','Eternal_Weddings_Car_Beaufort_Callendar_House_Falkirk_Z4H8691_thumb.jpg',87, 130,5,'photo_5572719.html');
												thumbnails[5572720] = new thumbnail(5572720,'316045','','Eternal_Weddings_Couple_Ceremony_Callendar_House_Falkirk_Z4H8750_thumb.jpg',87, 130,5,'photo_5572720.html');
												thumbnails[5572721] = new thumbnail(5572721,'316045','','Eternal_Weddings_Couple_Stateroom_Callendar_House_Falkirk_Z4H8813_thumb.jpg',87, 130,5,'photo_5572721.html');
												thumbnails[5572722] = new thumbnail(5572722,'316045','','Eternal_Weddings_Dance_Bride_Groom_Cladhan_Hotel_Falkirk_Z4H9099_thumb.jpg',87, 130,5,'photo_5572722.html');
												thumbnails[5572723] = new thumbnail(5572723,'316045','','Eternal_Weddings_Groom_Best_Men_Callander_House_Falkirk_Z4H8624_thumb.jpg',130, 87,5,'photo_5572723.html');
												thumbnails[5572724] = new thumbnail(5572724,'316045','','Eternal_Weddings_Jack_Daniels_Flask_Callendar_House_Falkirk_Z4H8673_thumb.jpg',87, 130,5,'photo_5572724.html');
												thumbnails[5572725] = new thumbnail(5572725,'316045','','Eternal_Weddings_Just_Married_Couple_Callerdar_House_Falkirk_Z4H8917_thumb.jpg',87, 130,5,'photo_5572725.html');
												thumbnails[5572726] = new thumbnail(5572726,'316045','','Eternal_Weddings_Romantic_Couple_Callendar_House_Falkirk_Z4H8930_thumb.jpg',87, 130,5,'photo_5572726.html');
												thumbnails[5572729] = new thumbnail(5572729,'316045','','Eternal_Weddings_Bride_Father_Arrival_Callendar_House_Falkirk_Z4H86932_thumb.jpg',130, 87,5,'photo_5572729.html');
												thumbnails[5575181] = new thumbnail(5575181,'316046','','Eternal_Weddings_Couple_Callendar_Park_FalkirkCRW_5122_thumb.jpg',87, 130,5,'photo_5575181.html');
												thumbnails[5575189] = new thumbnail(5575189,'316047','','Eternal_Weddings_Couple_Evening_Sunset_FalkirkMG_1506_thumb.jpg',130, 87,5,'photo_5575189.html');
												thumbnails[5575191] = new thumbnail(5575191,'316047','','Eternal_Weddings_Couple_Location_Falkirk_MG_1466_thumb.jpg',130, 87,5,'photo_5575191.html');
												thumbnails[5575196] = new thumbnail(5575196,'316047','','Eternal_Weddings_Couple_Romantic_Falkirk_MG_1460_thumb.jpg',130, 87,5,'photo_5575196.html');
												thumbnails[5575199] = new thumbnail(5575199,'316048','','Eternal_Weddings_Couple_love_Studio_Larbert_Z4H6785_thumb.jpg',130, 87,5,'photo_5575199.html');
												thumbnails[5575203] = new thumbnail(5575203,'316048','','Eternal_Weddings_Couple_Romantic_Larbert_Studio_Z4H6871_thumb.jpg',87, 130,5,'photo_5575203.html');
												thumbnails[5575205] = new thumbnail(5575205,'316048','','Eternal_Weddings_Studio_Larbert_Couple_Romance_Z4H6865_thumb.jpg',87, 130,5,'photo_5575205.html');
												thumbnails[5575207] = new thumbnail(5575207,'316051','','Eternal_Weddings_Happy_Couple_Larbert_Studio_02EP0110_thumb.jpg',130, 87,5,'photo_5575207.html');
												thumbnails[5575209] = new thumbnail(5575209,'316051','','Eternal_Weddings_Larbert_Studio_Happy_Couple_02EP0149_thumb.jpg',130, 87,5,'photo_5575209.html');
												thumbnails[5575212] = new thumbnail(5575212,'316052','','Eternal_Weddings_Studio_Larbert_Couple_Romance_MG_1299_thumb.jpg',87, 130,5,'photo_5575212.html');
												thumbnails[5575215] = new thumbnail(5575215,'316052','','Eternal_Weddings_Larbert_Studio_Couples_Romance_IMG_1270_thumb.jpg',130, 87,5,'photo_5575215.html');
												thumbnails[5575216] = new thumbnail(5575216,'316052','','Eternal_Weddings_Romantic_Couple_location_Larbert_MG_1373_thumb.jpg',130, 87,5,'photo_5575216.html');
												thumbnails[5575218] = new thumbnail(5575218,'316052','','Eternal_Weddings_Studio_Larbert_Couple_Romance_MG_1344_thumb.jpg',87, 130,5,'photo_5575218.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[316046] = new gallery(316046,'5575181','Pre-wedding 1','section377658',[5575181],0, 0, '', 'section377658_316046.html',0,0);
				  					galleries[316047] = new gallery(316047,'5575196,5575191,5575189','Pre-wedding 2','section377658',[5575189,5575191,5575196],0, 0, '', 'section377658_316047.html',0,0);
				  					galleries[316048] = new gallery(316048,'5575205,5575203,5575199','Pre-wedding 3','section377658',[5575199,5575203,5575205],0, 0, '', 'section377658_316048.html',0,0);
				  					galleries[316051] = new gallery(316051,'5575209,5575207','Pre-wedding 4','section377658',[5575207,5575209],0, 0, '', 'section377658_316051.html',0,0);
				  					galleries[316052] = new gallery(316052,'5575218,5575216,5575215,5575212','Pre-wedding 5','section377658',[5575212,5575215,5575216,5575218],0, 0, '', 'section377658_316052.html',0,0);
				  					galleries[316053] = new gallery(316053,'','Pre-wedding 6','section377658',[],0, 0, '', 'section377658_316053.html',0,0);
				  					galleries[316040] = new gallery(316040,'5571929,5571927,5571924,5571923,5571921,5571920,5571918,5571917,5571915,5571912','Wedding 1','gallery',[5571912,5571915,5571917,5571918,5571920,5571921,5571923,5571924,5571927,5571929],0, 0, '', 'gallery_316040.html',0,0);
				  					galleries[316041] = new gallery(316041,'5571960,5571957,5571956,5571955,5571953,5571952,5571951,5571950,5571948,5571946','Wedding 2','gallery',[5571941,5571944,5571946,5571948,5571950,5571951,5571952,5571953,5571955,5571956,5571957,5571960],0, 0, '', 'gallery_316041.html',0,0);
				  					galleries[316042] = new gallery(316042,'5572088,5572087,5572086,5572084,5572083,5572075,5572056,5572013,5571962','Wedding 3','gallery',[5571962,5572013,5572056,5572075,5572083,5572084,5572086,5572087,5572088],0, 0, '', 'gallery_316042.html',0,0);
				  					galleries[316043] = new gallery(316043,'5572310,5572309,5572308,5572307,5572306,5572305,5572303,5572301,5572300,5572299','Wedding 4','gallery',[5572273,5572291,5572293,5572294,5572296,5572297,5572298,5572299,5572300,5572301,5572303,5572305,5572306,5572307,5572308,5572309,5572310],0, 0, '', 'gallery_316043.html',0,0);
				  					galleries[316044] = new gallery(316044,'5572559,5572557,5572555,5572552,5572549,5572523,5572501,5572499,5572497,5572494','Wedding 5','gallery',[5572481,5572482,5572484,5572486,5572487,5572491,5572494,5572497,5572499,5572501,5572523,5572549,5572552,5572555,5572557,5572559],0, 0, '', 'gallery_316044.html',0,0);
				  					galleries[316045] = new gallery(316045,'5572729,5572726,5572725,5572724,5572723,5572722,5572721,5572720,5572719','Wedding 6','gallery',[5572719,5572720,5572721,5572722,5572723,5572724,5572725,5572726,5572729],0, 0, '', 'gallery_316045.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5572721,5572549,5572308,5572307,5572056,5571953';
imageSets[234833] = '5612792,5612442,5609118,5608883,5571761,5571760,5555672,5555667,5555637';
imageSets[3] = '5612792,5612442,5609118,5608883,5575218,5575216,5575215,5575212,5575209,5575207,5575205,5575203,5575199,5575196,5575191,5575189,5575181,5572729,5572726,5572725,5572724,5572723,5572722,5572721,5572720,5572719,5572559,5572557,5572555,5572552,5572549,5572523,5572501,5572499,5572497,5572494,5572491,5572487,5572486,5572484,5572482,5572481,5572310,5572309,5572308,5572307,5572306,5572305,5572303,5572301';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Eternal5/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Eternal5/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 = 'Eternal Weddings: ' + 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 = 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;
	}
}

			

