window.thumbnails = {};
															thumbnails[220377] = clik.newPhoto({"id":220377,"src":"Josh 6_thumb.jpg","galleries_id":19971,"server_id":1,"link":"photo_220377.html","width":130,"caption":"Josh","height":97});
															thumbnails[220380] = clik.newPhoto({"id":220380,"src":"Is that your car_thumb....1 .jpg","galleries_id":19971,"server_id":1,"link":"photo_220380.html","width":130,"caption":"Is that your car...?","height":97});
															thumbnails[220382] = clik.newPhoto({"id":220382,"src":"IMG_4379_thumb.JPG","galleries_id":19971,"server_id":1,"link":"photo_220382.html","width":130,"caption":"I am...","height":99});
															thumbnails[220386] = clik.newPhoto({"id":220386,"src":"Kryz 1_thumb.jpg","galleries_id":19971,"server_id":1,"link":"photo_220386.html","width":130,"caption":"Kryz","height":95});
															thumbnails[220387] = clik.newPhoto({"id":220387,"src":"How you see yourself 3_thumb.jpg","galleries_id":19971,"server_id":1,"link":"photo_220387.html","width":130,"caption":"How you see yourself....","height":175});
															thumbnails[294119] = clik.newPhoto({"id":294119,"src":"adv_thumb. portraits0001_r1_1.jpg","galleries_id":19981,"server_id":1,"link":"photo_294119.html","width":130,"caption":"\"Beau\"<br>\r\nSoft Pastels on velour<br>\r\n18\" x 24\"","height":179});
															thumbnails[294130] = clik.newPhoto({"id":294130,"src":"email advert 5_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294130.html","width":130,"caption":"\"Dee, Ozzie, Bella and Molly\"<br>\r\nOils on Canvas<br>\r\n24\" x 42\"","height":73});
															thumbnails[294131] = clik.newPhoto({"id":294131,"src":"email advert 4_thumb.JPG","galleries_id":19981,"server_id":1,"link":"photo_294131.html","width":130,"caption":"\"Freddie\"<br>\r\nCharcoal on Waterford<br>\r\n20\" x 30\"","height":98});
															thumbnails[294132] = clik.newPhoto({"id":294132,"src":"email advert 20 _thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294132.html","width":130,"caption":"\"Mistral\"<br>\r\nOil Pastels<br>\r\n18\" x 24\"","height":164});
															thumbnails[294139] = clik.newPhoto({"id":294139,"src":"email advert 81_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294139.html","width":130,"caption":"\"Shadow\"<br>\r\nOil Pastels<br>\r\n18\" x 24\"","height":97});
															thumbnails[294234] = clik.newPhoto({"id":294234,"src":"emal advert 3_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294234.html","width":130,"caption":"\"Oaten Hill\"<br>\r\nOil Pastels and Pencil Sketches<br>\r\n18\" x 24\"","height":93});
															thumbnails[294307] = clik.newPhoto({"id":294307,"src":"email advert 10_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294307.html","width":130,"caption":"\"Noggin\"<br>\r\nOil Pastels<br>\r\n16\" x 22\"","height":114});
															thumbnails[294379] = clik.newPhoto({"id":294379,"src":"Email advert 2_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294379.html","width":130,"caption":"\"Oscietra\"<br>\r\nOil Pastels<br>\r\n18\" x 24\"","height":100});
															thumbnails[294437] = clik.newPhoto({"id":294437,"src":"email advert 11_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294437.html","width":130,"caption":"\"Beatrice\"<br>\r\nOil Pastels<br>\r\n16\" x 20\"","height":160});
															thumbnails[294486] = clik.newPhoto({"id":294486,"src":"email advert 12_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294486.html","width":130,"caption":"\"Rosie\"<br>\r\nOil Pastels<br>\r\n16\" x 20\"","height":189});
															thumbnails[294505] = clik.newPhoto({"id":294505,"src":"email advert 19_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294505.html","width":130,"caption":"\"Henry\"<br>\r\nOil Pastels<br>\r\n18\" x 24\"","height":86});
															thumbnails[294512] = clik.newPhoto({"id":294512,"src":"email advert 9_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294512.html","width":130,"caption":"\"Puffy\"<br>\r\nOil Pastels<br>\r\n12\" x 10\"","height":175});
															thumbnails[294514] = clik.newPhoto({"id":294514,"src":"email advert 7_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294514.html","width":130,"caption":"\"Pip and Remy\"<br>\r\nOil Pastels<br>\r\n18\" x 24\"","height":79});
															thumbnails[294547] = clik.newPhoto({"id":294547,"src":"Heidi_0001_thumb.JPG","galleries_id":19981,"server_id":1,"link":"photo_294547.html","width":130,"caption":"\"Hiedi\"<br>\r\nOil Pastels<br>\r\n16\" x 20\"","height":173});
															thumbnails[294653] = clik.newPhoto({"id":294653,"src":"email advert 18_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_294653.html","width":130,"caption":"\"Tippo and Roly\"<br>\r\nOil Pastels and Pencil Sketches<br>\r\n18\" x 24\"","height":93});
															thumbnails[5438218] = clik.newPhoto({"id":5438218,"src":"Image2_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_5438218.html","width":130,"caption":"\"Buersche and Bergen\"<br>\r\nOil Pastels<br>\r\n20\" x 30\"","height":95});
															thumbnails[5438221] = clik.newPhoto({"id":5438221,"src":"Image5_thumb.jpg","galleries_id":19981,"server_id":1,"link":"photo_5438221.html","width":130,"caption":"","height":162});
															thumbnails[6854222] = clik.newPhoto({"id":6854222,"src":"IMG_2011_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_6854222.html","width":130,"caption":"'Mr Black leads the pack'<br>\r\nCharcoal on canson<br>\r\n20\" x 30\"","height":101});
															thumbnails[6854223] = clik.newPhoto({"id":6854223,"src":"IMG_2017_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_6854223.html","width":130,"caption":"'Exposure'<br>\r\nOils on canvas<br>\r\n16\" x 16\"","height":130});
															thumbnails[8251171] = clik.newPhoto({"id":8251171,"src":"Midday_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8251171.html","width":130,"caption":"Midday","height":96});
															thumbnails[8251174] = clik.newPhoto({"id":8251174,"src":"Truce_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8251174.html","width":130,"caption":"Truce","height":78});
															thumbnails[8442662] = clik.newPhoto({"id":8442662,"src":"IMG_3459_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8442662.html","width":130,"caption":"'Something....Chudop, Etosha Pan'","height":92});
															thumbnails[8442672] = clik.newPhoto({"id":8442672,"src":"Image1_15F7B77E-1EC9-DFB6-096181EC92B0D09D_thumb.jpg","galleries_id":350311,"server_id":1,"link":"photo_8442672.html","width":130,"caption":"'Sawtooth Sundowners'","height":108});
															thumbnails[8698364] = clik.newPhoto({"id":8698364,"src":"I_spy_print_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8698364.html","width":130,"caption":"'I Spy'","height":93});
															thumbnails[8698366] = clik.newPhoto({"id":8698366,"src":"IMG_4056_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_8698366.html","width":130,"caption":"'Billowing'","height":174});
															thumbnails[8698370] = clik.newPhoto({"id":8698370,"src":"IMG_4039_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_8698370.html","width":130,"caption":"'Proud'","height":187});
															thumbnails[8698402] = clik.newPhoto({"id":8698402,"src":"IMG_3655_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_8698402.html","width":130,"caption":"'Tumble'","height":103});
															thumbnails[8698406] = clik.newPhoto({"id":8698406,"src":"IMG_3659_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_8698406.html","width":130,"caption":"'Cross Hatch' *SOLD*","height":183});
															thumbnails[8698441] = clik.newPhoto({"id":8698441,"src":"Image2_943F9D8D-24E8-5EC4-4F56929F83F39C1C_thumb.jpg","galleries_id":350311,"server_id":1,"link":"photo_8698441.html","width":130,"caption":"'Pause'","height":93});
															thumbnails[8698449] = clik.newPhoto({"id":8698449,"src":"Shade_2_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8698449.html","width":130,"caption":"'Shade'","height":65});
															thumbnails[8791034] = clik.newPhoto({"id":8791034,"src":"Three_gulls_email_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_8791034.html","width":130,"caption":"Three Gulls, Shobrooke Park, Devon","height":178});
															thumbnails[6325714] = clik.newPhoto({"id":6325714,"src":"IMG_7352_thumb.JPG","galleries_id":350311,"server_id":1,"link":"photo_6325714.html","width":130,"caption":"'You said turn left....' 60\" x 42\"","height":90});
															thumbnails[8790820] = clik.newPhoto({"id":8790820,"src":"IMG_45081_thumb.JPG","galleries_id":462841,"server_id":1,"link":"photo_8790820.html","width":130,"caption":"One tree hill afternoon, Raddon, Mid Devon","height":94});
															thumbnails[8790831] = clik.newPhoto({"id":8790831,"src":"IMG_45111_thumb.JPG","galleries_id":462841,"server_id":1,"link":"photo_8790831.html","width":130,"caption":"One tree hill sunset, Raddon, Mid Devon","height":92});
															thumbnails[220384] = clik.newPhoto({"id":220384,"src":"How you are 2_thumb.jpg","galleries_id":19971,"server_id":1,"link":"photo_220384.html","width":130,"caption":"How you are...","height":173});
															thumbnails[220404] = clik.newPhoto({"id":220404,"src":"Doll 1_thumb.jpg","galleries_id":19971,"server_id":1,"link":"photo_220404.html","width":130,"caption":"Doll","height":98});
															thumbnails[6420154] = clik.newPhoto({"id":6420154,"src":"IMG_7388_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_6420154.html","width":130,"caption":"'Reach'","height":105});
															thumbnails[6316619] = clik.newPhoto({"id":6316619,"src":"IMG_6993_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_6316619.html","width":130,"caption":"The Racehorse *SOLD*<br>\r\nSoft Pastels<br>\r\n18\" x 24\"","height":202});
															thumbnails[6316620] = clik.newPhoto({"id":6316620,"src":"IMG_6995_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_6316620.html","width":130,"caption":"The Grey *SOLD*<br>\r\nSoft Pastels<br>\r\n12\" x 16\"","height":87});
															thumbnails[6420147] = clik.newPhoto({"id":6420147,"src":"IMG_7384_thumb.JPG","galleries_id":350312,"server_id":1,"link":"photo_6420147.html","width":130,"caption":"'Show off' *SOLD*","height":84});
															thumbnails[8791095] = clik.newPhoto({"id":8791095,"src":"Midday_email_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8791095.html","width":130,"caption":"Midday","height":96});
															thumbnails[8791146] = clik.newPhoto({"id":8791146,"src":"I_spy_email_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8791146.html","width":130,"caption":"I spy","height":93});
															thumbnails[8791162] = clik.newPhoto({"id":8791162,"src":"S_Sundown_email2_thumb.jpg","galleries_id":462864,"server_id":1,"link":"photo_8791162.html","width":130,"caption":"Sawtooth Sundowners","height":108});
															thumbnails[8791194] = clik.newPhoto({"id":8791194,"src":"Something_email_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8791194.html","width":130,"caption":"Something....Chudop, Etosha Pan NP","height":92});
															thumbnails[8791202] = clik.newPhoto({"id":8791202,"src":"Three_gulls_email1_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8791202.html","width":130,"caption":"Three Gulls, Shobrooke Park, Devon","height":178});
															thumbnails[7115821] = clik.newPhoto({"id":7115821,"src":"Aura_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115821.html","width":130,"caption":"'Aura'","height":194});
															thumbnails[8790696] = clik.newPhoto({"id":8790696,"src":"IMG_4036_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_8790696.html","width":130,"caption":"Billowing","height":176});
															thumbnails[7115826] = clik.newPhoto({"id":7115826,"src":"Fervor_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115826.html","width":130,"caption":"'Fervor'","height":197});
															thumbnails[8790689] = clik.newPhoto({"id":8790689,"src":"IMG_4040_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_8790689.html","width":130,"caption":"Proud","height":180});
															thumbnails[7115840] = clik.newPhoto({"id":7115840,"src":"Gaiety_I_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115840.html","width":130,"caption":"'Gaiety I'","height":88});
															thumbnails[8790703] = clik.newPhoto({"id":8790703,"src":"IMG_3993_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_8790703.html","width":130,"caption":"Looking on","height":93});
															thumbnails[7115848] = clik.newPhoto({"id":7115848,"src":"Gaiety_II_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115848.html","width":130,"caption":"'Gaiety II'","height":88});
															thumbnails[7115853] = clik.newPhoto({"id":7115853,"src":"Magnitude_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115853.html","width":130,"caption":"'Magnitude'","height":89});
															thumbnails[7115877] = clik.newPhoto({"id":7115877,"src":"Memo_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115877.html","width":130,"caption":"'Memo'","height":174});
															thumbnails[7115880] = clik.newPhoto({"id":7115880,"src":"Modesty_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115880.html","width":130,"caption":"'Modesty'","height":181});
															thumbnails[7115888] = clik.newPhoto({"id":7115888,"src":"Priory_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115888.html","width":130,"caption":"'Priory'","height":189});
															thumbnails[7115897] = clik.newPhoto({"id":7115897,"src":"Propriety_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115897.html","width":130,"caption":"'Propriety'","height":183});
															thumbnails[7115901] = clik.newPhoto({"id":7115901,"src":"Rabieta_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115901.html","width":130,"caption":"'Rabieta'","height":96});
															thumbnails[7115903] = clik.newPhoto({"id":7115903,"src":"Reverence_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115903.html","width":130,"caption":"'Reverence'","height":88});
															thumbnails[7115914] = clik.newPhoto({"id":7115914,"src":"Statesman_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115914.html","width":130,"caption":"'Statesman'","height":195});
															thumbnails[7115926] = clik.newPhoto({"id":7115926,"src":"Strength_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115926.html","width":130,"caption":"'Strength'","height":88});
															thumbnails[7115935] = clik.newPhoto({"id":7115935,"src":"The_Circus_Horse_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115935.html","width":130,"caption":"'The circus horse'","height":181});
															thumbnails[7115908] = clik.newPhoto({"id":7115908,"src":"Saskia_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_7115908.html","width":130,"caption":"'Saskia'","height":99});
															thumbnails[8168855] = clik.newPhoto({"id":8168855,"src":"Image1_thumb.jpg","galleries_id":384912,"server_id":1,"link":"photo_8168855.html","width":130,"caption":"'Please...!'","height":173});
															thumbnails[8168904] = clik.newPhoto({"id":8168904,"src":"IMG_2844_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_8168904.html","width":130,"caption":"'Smiler'","height":173});
															thumbnails[8168909] = clik.newPhoto({"id":8168909,"src":"IMG_2894_thumb.JPG","galleries_id":384912,"server_id":1,"link":"photo_8168909.html","width":130,"caption":"'Looking at you....'","height":101});
															thumbnails[8169055] = clik.newPhoto({"id":8169055,"src":"Spirit_1_thumb.jpeg","galleries_id":384912,"server_id":1,"link":"photo_8169055.html","width":130,"caption":"'Spirit I'","height":129});
															thumbnails[8169058] = clik.newPhoto({"id":8169058,"src":"Spirit_2_thumb.jpeg","galleries_id":384912,"server_id":1,"link":"photo_8169058.html","width":130,"caption":"'Spirit II'","height":132});
															thumbnails[8169061] = clik.newPhoto({"id":8169061,"src":"Spirit_3_thumb.jpeg","galleries_id":384912,"server_id":1,"link":"photo_8169061.html","width":130,"caption":"'Spirit III'","height":131});
															thumbnails[8790669] = clik.newPhoto({"id":8790669,"src":"IMG_4508_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8790669.html","width":130,"caption":"One tree hill afternoon, Raddon, Mid Devon","height":94});
															thumbnails[8790680] = clik.newPhoto({"id":8790680,"src":"IMG_4511_thumb.JPG","galleries_id":462864,"server_id":1,"link":"photo_8790680.html","width":130,"caption":"One tree hill sunset, Raddon, Mid Devon ","height":92});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[350311] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildlife","link":"gallery_350311.html","maxRecords":0.0,"photoIDs":[6854222.0,6854223.0,8251171.0,8251174.0,8442662.0,8442672.0,8698364.0,8698441.0,8698449.0,8791034.0,6325714.0],"skipIndex":0,"section_code":"gallery","featured_images":"8791034,8698449,8698441,8698364,8442672,8442662,8251174,8251171,6854223,6854222","id":350311,"singleSection":false});				  						galleries[350312] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Equine and animal Charcoal originals","link":"gallery_350312.html","maxRecords":0.0,"photoIDs":[8698366.0,8698370.0,8698402.0,8698406.0,6420154.0,6316619.0,6316620.0,6420147.0],"skipIndex":0,"section_code":"gallery","featured_images":"8698406,8698402,8698370,8698366,6420154,6420147,6316620,6316619","id":350312,"singleSection":false});				  						galleries[462841] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_462841.html","maxRecords":0.0,"photoIDs":[8790820.0,8790831.0],"skipIndex":0,"section_code":"gallery","featured_images":"8790831,8790820","id":462841,"singleSection":false});				  						galleries[336152] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"In the studio","link":"gallery_336152.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":336152,"singleSection":false});				  						galleries[19981] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Equine and Canine Portrait Commissions","link":"gallery_19981.html","maxRecords":0.0,"photoIDs":[294119.0,294130.0,294131.0,294132.0,294139.0,294234.0,294307.0,294379.0,294437.0,294486.0,294505.0,294512.0,294514.0,294547.0,294653.0,5438218.0,5438221.0],"skipIndex":0,"section_code":"gallery","featured_images":294547.0,"id":19981,"singleSection":false});				  						galleries[462864] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildlife and landscape limited edition prints","link":"section457777_462864.html","maxRecords":0.0,"photoIDs":[8791095.0,8791146.0,8791162.0,8791194.0,8791202.0,8790669.0,8790680.0],"skipIndex":0,"section_code":"section457777","featured_images":"8791202,8791194,8791162,8791146,8791095,8790680,8790669","id":462864,"singleSection":false});				  						galleries[384912] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Equine and canine limited edition prints","link":"section457777_384912.html","maxRecords":0.0,"photoIDs":[7115821.0,8790696.0,7115826.0,8790689.0,7115840.0,8790703.0,7115848.0,7115853.0,7115877.0,7115880.0,7115888.0,7115897.0,7115901.0,7115903.0,7115914.0,7115926.0,7115935.0,7115908.0,8168855.0,8168904.0,8168909.0,8169055.0,8169058.0,8169061.0],"skipIndex":0,"section_code":"section457777","featured_images":"8790703,8790696,8790689,8169061,8169058,8169055,8168909,8168904,8168855,7115935","id":384912,"singleSection":false});				  						galleries[19971] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Figurative charcoal","link":"gallery_19971.html","maxRecords":0.0,"photoIDs":[220377.0,220380.0,220382.0,220386.0,220387.0,220384.0,220404.0],"skipIndex":0,"section_code":"gallery","featured_images":"220404,220387,220386,220384,220382,220380,220377","id":19971,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '294379';
imageSets[2] = '294547';
imageSets[3] = '8791202,8791194,8791162,8791146,8791095,8791034,8790831,8790820,8790703,8790696,8790689,8790680,8790669,8698449,8698441,8698406,8698402,8698370,8698366,8698364,8442672,8442662,8251174,8251171,8169061,8169058,8169055,8168909,8168904,8168855,7115935,7115926,7115914,7115908,7115903,7115901,7115897,7115888,7115880,7115877,7115853,7115848,7115840,7115826,7115821,6854223,6854222,6420154,6420147,6325714';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/heatheri/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/heatheri/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/heatheri/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'irvinearts: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="HEATHERI">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

