window.thumbnails = {};
															thumbnails[136130] = clik.newPhoto({"id":136130,"src":"Copy of Lisa Welsh Girl_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136130.html","width":130,"caption":"One of my favourites and a Fuji Film Merit Award winner. ","height":89});
															thumbnails[136132] = clik.newPhoto({"id":136132,"src":"!PO10NAM_thumb.JPG","galleries_id":12517,"server_id":15,"link":"photo_136132.html","width":130,"caption":"A woman admires a wall of names beamed onto the Oriel 31 gallery in Newtown. ","height":85});
															thumbnails[136133] = clik.newPhoto({"id":136133,"src":"2 Fuji entry_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136133.html","width":130,"caption":"A little girl and her pet fox. The fox was very shy at first but soon got used to having a photographer in his pen.","height":94});
															thumbnails[136134] = clik.newPhoto({"id":136134,"src":"3 Fuji entry_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136134.html","width":130,"caption":"The beautiful staircase at Moccas Court in Herefordshire. A Fuji Film Merit Award Winner.","height":198});
															thumbnails[136135] = clik.newPhoto({"id":136135,"src":"4 Fuji entry_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136135.html","width":130,"caption":"The Bishop of Hereford is rescued by firefighters during an exercise to test the emergency services at Hereford Cathedral","height":85});
															thumbnails[136137] = clik.newPhoto({"id":136137,"src":"Copy of Girlsunset_thumb.JPG","galleries_id":12517,"server_id":15,"link":"photo_136137.html","width":130,"caption":"Two young girls enjoy the sunset at Borth near Aberystwyth, Mid Wales. ","height":197});
															thumbnails[136139] = clik.newPhoto({"id":136139,"src":"HFD13FAIR A MAY_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136139.html","width":130,"caption":"A picture used to demonstrate the fun of the fair. I like the expressions on these two brave women as they are catapulted into the air!","height":135});
															thumbnails[136143] = clik.newPhoto({"id":136143,"src":"Jay1_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_136143.html","width":130,"caption":"Jay Brittain of the Small Breeds Farm and Owl Centre near Kington, Herefordshire helps shares an ice lolly with thirsty foal.","height":177});
															thumbnails[136144] = clik.newPhoto({"id":136144,"src":"Kaleid_thumb.JPG","galleries_id":12517,"server_id":15,"link":"photo_136144.html","width":130,"caption":"A digitally enhanced picture taken when I was new to digital photography. The picture was used on the front of the newspaper to promote a kaleidesope exhibition. ","height":204});
															thumbnails[136146] = clik.newPhoto({"id":136146,"src":"!DEADSHE_thumb.JPG","galleries_id":12516,"server_id":15,"link":"photo_136146.html","width":130,"caption":"One of my first most dramatic encounters. Seventy two sheep killed by one bolt of lightening while sheltering under a tree!","height":84});
															thumbnails[136147] = clik.newPhoto({"id":136147,"src":"1 Fuji entry_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136147.html","width":130,"caption":"A former pupils from the Blue Coat Girls School in Hereford came to a re-union dressed as a school girl. Too good an opportunity not to miss!","height":184});
															thumbnails[136148] = clik.newPhoto({"id":136148,"src":"Bomb_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136148.html","width":130,"caption":"An Army bomb disposal expert carefully prepares these World War 2 tank bombs for safe detonation. He checked that I was insured before letting me so close!","height":91});
															thumbnails[136149] = clik.newPhoto({"id":136149,"src":"HFD8FOOLS_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136149.html","width":130,"caption":"A beautiful bride makes her way around the church to her wedding accompanied by Del Boy and Uncle Albert look alikes from Only Fools and Horses. ","height":110});
															thumbnails[136150] = clik.newPhoto({"id":136150,"src":"HFD12MAGSOPEN 3 Sept_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136150.html","width":130,"caption":"A picture used to promote a Magistrates Court open day. The magistrate in the photograph proved to be game for a laugh!","height":183});
															thumbnails[136152] = clik.newPhoto({"id":136152,"src":"HFD29COP AUGUST_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136152.html","width":130,"caption":"What better way to picture the local pre-school assistant who was leaving to join the police force!","height":186});
															thumbnails[136153] = clik.newPhoto({"id":136153,"src":"Nicked_thumb.jpg","galleries_id":12516,"server_id":15,"link":"photo_136153.html","width":130,"caption":"A football supporter is arrested during disturbances after a game in Hereford. ","height":86});
															thumbnails[136155] = clik.newPhoto({"id":136155,"src":"ASHLEY_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_136155.html","width":130,"caption":"Hundreds turned up to see this Coronation Street star as he arrived in Telford, Shropshire. ","height":85});
															thumbnails[136156] = clik.newPhoto({"id":136156,"src":"Copy of Anne1_thumb.JPG","galleries_id":12519,"server_id":15,"link":"photo_136156.html","width":130,"caption":"A close up of Princess Anne at Bala Lake, Mid Wales. I received a runners-up spot in the Martini Royal Press Photographer of the Year with this shot!","height":184});
															thumbnails[136158] = clik.newPhoto({"id":136158,"src":"Copy of Duchess1_thumb.JPG","galleries_id":12519,"server_id":15,"link":"photo_136158.html","width":130,"caption":"MAKE MY DAY.........A schoolboy is delighted when a royal visitor leans on him during a walkabout in Oswestry, Shropshire.  ","height":178});
															thumbnails[136159] = clik.newPhoto({"id":136159,"src":"Copy of Miss Disney_thumb.JPG","galleries_id":12519,"server_id":15,"link":"photo_136159.html","width":130,"caption":"The Euro Disney Ambassador, a local girl,  visited her relatives in Mid Wales and was happy to pose with these farm animals. ","height":103});
															thumbnails[136161] = clik.newPhoto({"id":136161,"src":"HFD21KEMP Nov_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_136161.html","width":130,"caption":"Eastenders star Ross Kemp acted out this arrest scene for my benefit when he visited Hereford. ","height":183});
															thumbnails[136164] = clik.newPhoto({"id":136164,"src":"Julie_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_136164.html","width":130,"caption":"Mid Wales woman Julie Davies was obviously pleased with being crowned Miss Wales!","height":93});
															thumbnails[136167] = clik.newPhoto({"id":136167,"src":"PO7LEMBIT_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_136167.html","width":130,"caption":"The first picture of former Montgomeryshire MP Lembit Opik and television weathergirl Sian Lloyd as a couple as they amble through Montgomery on the way to the shops. The happy couple stopped to look at my pictures on the back of my digital camera and ordered two copies of this photograph on the spot!","height":202});
															thumbnails[136169] = clik.newPhoto({"id":136169,"src":"Ron_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_136169.html","width":130,"caption":"MP Ron Davies is confronted by angry farmers when he visits the Elan Valley in Mid Wales.","height":191});
															thumbnails[136176] = clik.newPhoto({"id":136176,"src":"HFD2SLOP_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_136176.html","width":130,"caption":"Hereford United forward Rob Purdie celebrates scoring in a Conference match against Shrewsbury Town. Made so much better because I am a born and bred Hereford United supporter!","height":167});
															thumbnails[136183] = clik.newPhoto({"id":136183,"src":"HFD11DAZO 10_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_136183.html","width":130,"caption":"OUCH........Roy Rutherford lands a left hook on the nose of Dazzo Williams. Dazzo Williams is one of the best down to earth sportsmen I have ever met. A true champion!<br>\r\n","height":98});
															thumbnails[136186] = clik.newPhoto({"id":136186,"src":"HFD17DAGGERS 4 Oct_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_136186.html","width":130,"caption":"Hereford United midfielder Ben Smith celebrates scoring against Dagenham and Redbridge in the Conference. ","height":163});
															thumbnails[136188] = clik.newPhoto({"id":136188,"src":"HFD17HORSE_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_136188.html","width":130,"caption":"A jockey falls off his mount during a race at Hereford. Both horse and jockey were okay. Unfortunatley for them It was the right place at the right time for me!","height":91});
															thumbnails[136190] = clik.newPhoto({"id":136190,"src":"of Rugby1_thumb.JPG","galleries_id":12518,"server_id":15,"link":"photo_136190.html","width":130,"caption":"A Hereford rugby player is tackled by a rival from Ludlow during a cup game. One of my earlier sports photographs but I was pleased with my timing!","height":101});
															thumbnails[136201] = clik.newPhoto({"id":136201,"src":"Presteigne Footy_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_136201.html","width":130,"caption":"Good pictures can be caught even at the small sporting events. Here a player from Presteigne Reserves and a rival from Radnor Valley settle a disagreement. ","height":96});
															thumbnails[136206] = clik.newPhoto({"id":136206,"src":"5 Fuji entry_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_136206.html","width":130,"caption":"The circus offrered to supply me with some acrobats to promote their visit. I grabbed their offer with both hands but suggested the shoot should take place in Hereford High Town instead of the circus ring. Luckily they agreed!","height":76});
															thumbnails[136209] = clik.newPhoto({"id":136209,"src":"Carlsberg_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_136209.html","width":130,"caption":"A picture used to promote the Small Breeds farm and Owl Centre near Kington, Herefordshire. Some feed on the owners hat was all that was needed to encourage miniature horse Carslberg to tuck in.  ","height":92});
															thumbnails[136210] = clik.newPhoto({"id":136210,"src":"HFD27NOISE_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_136210.html","width":130,"caption":"Three willing subjects and a bit of imagination was all that was needed to promote this sponsored noise day at a local supermarket!","height":95});
															thumbnails[136212] = clik.newPhoto({"id":136212,"src":"LAUR WEDDING_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_136212.html","width":130,"caption":"A pretty girl and a wedding dress, is there a better way to promote a local dress maker\/hire shop!","height":196});
															thumbnails[136213] = clik.newPhoto({"id":136213,"src":"Lewis elan_thumb.JPG","galleries_id":12520,"server_id":15,"link":"photo_136213.html","width":130,"caption":"Taken during a commision to promote Powys. The picture depicts my son playing on a table at the Elan Valley near Rhayader, Mid Wales. ","height":99});
															thumbnails[136214] = clik.newPhoto({"id":136214,"src":"LUD11TRADE_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_136214.html","width":130,"caption":"A picture used to promote a supermarkets fair trade deal in Shropshire. ","height":185});
															thumbnails[136216] = clik.newPhoto({"id":136216,"src":"Kidsunset 1_thumb.jpg","galleries_id":12521,"server_id":15,"link":"photo_136216.html","width":130,"caption":"My fanastic three. Left to right twins Lewis and Natalie and older sister Lisa taken while enjoying a break at Abersytwyth, Mid Wales. ","height":86});
															thumbnails[136218] = clik.newPhoto({"id":136218,"src":"Copy of me and karen_thumb.jpg","galleries_id":12521,"server_id":15,"link":"photo_136218.html","width":130,"caption":"Andrew and girlfriend Karen. Karen is a reporter on the Mid Wales Journal. Its not very often we get our picture taken together as i'm mostly the other side of the camera!","height":147});
															thumbnails[177017] = clik.newPhoto({"id":177017,"src":"LUD3BEDSTONE_thumb.jpg","galleries_id":12517,"server_id":15,"link":"photo_177017.html","width":130,"caption":"Taken to promote a production of My Fair Lady","height":86});
															thumbnails[177033] = clik.newPhoto({"id":177033,"src":"HFD30OCTOBER_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_177033.html","width":130,"caption":"Promoting Cider Apples","height":98});
															thumbnails[184269] = clik.newPhoto({"id":184269,"src":"Magic Moments_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_184269.html","width":130,"caption":"GET IN THERE!","height":124});
															thumbnails[261442] = clik.newPhoto({"id":261442,"src":"Ipoua cup_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_261442.html","width":130,"caption":"","height":217});
															thumbnails[261445] = clik.newPhoto({"id":261445,"src":"Trophy winners_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_261445.html","width":130,"caption":"Hereford United win the Conference Play Off Final","height":88});
															thumbnails[989099] = clik.newPhoto({"id":989099,"src":"Kick Boxer_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_989099.html","width":130,"caption":"A pic advertising Kick Boxing Lessons in Hereford.","height":98});
															thumbnails[989104] = clik.newPhoto({"id":989104,"src":"POITSIAN_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_989104.html","width":130,"caption":"Sian lloyd enjoys a laugh with yours truly. ","height":138});
															thumbnails[3494630] = clik.newPhoto({"id":3494630,"src":"HFD4SCUDA_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_3494630.html","width":130,"caption":"","height":145});
															thumbnails[3494655] = clik.newPhoto({"id":3494655,"src":"July 2007 Extra_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_3494655.html","width":130,"caption":"","height":86});
															thumbnails[3494670] = clik.newPhoto({"id":3494670,"src":"LUD29FLOOD H_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_3494670.html","width":130,"caption":"","height":91});
															thumbnails[3494674] = clik.newPhoto({"id":3494674,"src":"The Limit enhanced_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_3494674.html","width":130,"caption":"","height":86});
															thumbnails[7242986] = clik.newPhoto({"id":7242986,"src":"Blind_2010_B_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_7242986.html","width":160,"caption":"The Brazilian team celebrate a goal against England in the Blind World Cup. ","height":126});
															thumbnails[7242992] = clik.newPhoto({"id":7242992,"src":"HFD23OLDHAM_thumb.jpg","galleries_id":12518,"server_id":15,"link":"photo_7242992.html","width":160,"caption":"","height":322});
															thumbnails[7242996] = clik.newPhoto({"id":7242996,"src":"HFD29FIRE_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_7242996.html","width":160,"caption":"Firefighters tackle a blaze in Hereford High Town","height":104});
															thumbnails[7243008] = clik.newPhoto({"id":7243008,"src":"LUD18KATE_A_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_7243008.html","width":160,"caption":"A singing Church Stretton hairdresser","height":108});
															thumbnails[7243010] = clik.newPhoto({"id":7243010,"src":"LUD21DANCE_thumb.jpg","galleries_id":12520,"server_id":15,"link":"photo_7243010.html","width":160,"caption":"Promoting a 1920's dance at Church Stretton","height":110});
															thumbnails[7243052] = clik.newPhoto({"id":7243052,"src":"MWJ13PROTEST_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_7243052.html","width":160,"caption":"Actor John Challis in a demonstration in Hereford.","height":223});
															thumbnails[7243055] = clik.newPhoto({"id":7243055,"src":"RIFLES_7_C_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_7243055.html","width":160,"caption":"The return of the Rifles to Hereford.","height":106});
															thumbnails[7243059] = clik.newPhoto({"id":7243059,"src":"Portrait_thumb.jpg","galleries_id":213387,"server_id":15,"link":"photo_7243059.html","width":160,"caption":"Two students studying","height":108});
															thumbnails[7243081] = clik.newPhoto({"id":7243081,"src":"BOCHAMPS_3DE0B85D-1EC9-D45B-1C0F448F47D5DE15_thumb.jpg","galleries_id":12519,"server_id":15,"link":"photo_7243081.html","width":160,"caption":"Ulrika Johnson and James Crossley alias the Gladiator Hunter.","height":251});
															thumbnails[8238552] = clik.newPhoto({"id":8238552,"src":"COMPO__ENTRY_2_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238552.html","width":160,"caption":"A Land Rover makes its way along a flooded A470 road near Llandrinio","height":105});
															thumbnails[8238554] = clik.newPhoto({"id":8238554,"src":"Custy_4_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238554.html","width":160,"caption":"Councillor Alan Williams in a bath of custard","height":244});
															thumbnails[8238593] = clik.newPhoto({"id":8238593,"src":"DSC_0702_thumb.JPG","galleries_id":12516,"server_id":19,"link":"photo_8238593.html","width":160,"caption":"Herefordshire anti-school cuts demo","height":106});
															thumbnails[8238596] = clik.newPhoto({"id":8238596,"src":"FIRE_OCTOBER_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238596.html","width":160,"caption":"Firefighters tackle a blaze at the Card Factory in Hereford.","height":104});
															thumbnails[8238601] = clik.newPhoto({"id":8238601,"src":"January_2007_thumb.JPG","galleries_id":12516,"server_id":19,"link":"photo_8238601.html","width":160,"caption":"Father Mark Townsend performs magic on his son","height":134});
															thumbnails[8238606] = clik.newPhoto({"id":8238606,"src":"July_2007_Extra_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238606.html","width":160,"caption":"Rotherwas Ribbon protest","height":106});
															thumbnails[8238611] = clik.newPhoto({"id":8238611,"src":"July_2007_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238611.html","width":160,"caption":"A friend gives his mate a lift through the floods in Newtown Road, Hereford.","height":106});
															thumbnails[8238612] = clik.newPhoto({"id":8238612,"src":"Piggya_8A2F0E50-1E4F-37DC-71BC92567AEF7211_thumb.jpg","galleries_id":12516,"server_id":19,"link":"photo_8238612.html","width":160,"caption":"A piggy back across the ring at the Royal Welsh Show!","height":105});
															thumbnails[8238616] = clik.newPhoto({"id":8238616,"src":"Compton_1_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238616.html","width":160,"caption":"2 Face Dance Company perform outside The Courtyard.","height":140});
															thumbnails[8238619] = clik.newPhoto({"id":8238619,"src":"LEM28PASSION_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238619.html","width":160,"caption":"Leominster Good Friday parade.","height":241});
															thumbnails[8238622] = clik.newPhoto({"id":8238622,"src":"LUD10CATCHER_A_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238622.html","width":160,"caption":"An artist and her work.","height":226});
															thumbnails[8238623] = clik.newPhoto({"id":8238623,"src":"Monroe_thumb.JPG","galleries_id":12517,"server_id":19,"link":"photo_8238623.html","width":160,"caption":"Blonde's do have more fun!","height":217});
															thumbnails[8238640] = clik.newPhoto({"id":8238640,"src":"Romance_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238640.html","width":160,"caption":"A football supporter and took his new bride to a match straight after the wedding!","height":103});
															thumbnails[8238643] = clik.newPhoto({"id":8238643,"src":"Fit_for_the_Air_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238643.html","width":160,"caption":"A promotional picture for FIT clothing.","height":203});
															thumbnails[8238644] = clik.newPhoto({"id":8238644,"src":"HFD2MONTH_May_thumb.jpg","galleries_id":12517,"server_id":19,"link":"photo_8238644.html","width":160,"caption":"A Russian Circus promotional picture in High Town, Hereford.","height":98});
															thumbnails[8238683] = clik.newPhoto({"id":8238683,"src":"Editorial_thumb.jpg","galleries_id":12518,"server_id":19,"link":"photo_8238683.html","width":160,"caption":"A Brazilian coach celebrates with one of the players after beating England in the Blind Football World Cup.","height":125});
															thumbnails[8238690] = clik.newPhoto({"id":8238690,"src":"HFD26GOINGUP_J_thumb.jpg","galleries_id":12518,"server_id":19,"link":"photo_8238690.html","width":160,"caption":"A Hereford United supporter tries to contain his emotions.","height":208});
															thumbnails[8238706] = clik.newPhoto({"id":8238706,"src":"Fit_for_the_Air1_thumb.jpg","galleries_id":12520,"server_id":19,"link":"photo_8238706.html","width":160,"caption":"A promotional shoot for Fit Clothing in Hereford.","height":203});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[213387] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent Favourites","link":"gallery_213387.html","maxRecords":0.0,"photoIDs":[3494630.0,3494655.0,3494670.0,3494674.0,7242986.0,7242996.0,7243055.0,7243059.0],"skipIndex":0,"section_code":"gallery","featured_images":"7243059,7243055,7242996,7242986,3494674,3494670,3494655,3494630","id":213387,"singleSection":false});				  						galleries[12516] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"News Pictures","link":"gallery_12516.html","maxRecords":0.0,"photoIDs":[136146.0,136147.0,136148.0,136149.0,136150.0,136152.0,136153.0,8238552.0,8238554.0,8238593.0,8238596.0,8238601.0,8238606.0,8238611.0,8238612.0],"skipIndex":0,"section_code":"gallery","featured_images":8238596.0,"id":12516,"singleSection":false});				  						galleries[12520] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PR Pictures","link":"gallery_12520.html","maxRecords":0.0,"photoIDs":[136206.0,136209.0,136210.0,136212.0,136213.0,136214.0,177033.0,989099.0,7243008.0,7243010.0,8238706.0],"skipIndex":0,"section_code":"gallery","featured_images":"8238706,7243010,7243008,989099,177033,136214,136213,136212,136210,136209","id":12520,"singleSection":false});				  						galleries[12518] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sport Pictures","link":"gallery_12518.html","maxRecords":0.0,"photoIDs":[136176.0,136183.0,136186.0,136188.0,136190.0,136201.0,184269.0,261442.0,261445.0,7242992.0,8238683.0,8238690.0],"skipIndex":0,"section_code":"gallery","featured_images":136201.0,"id":12518,"singleSection":false});				  						galleries[12519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Celebrities","link":"gallery_12519.html","maxRecords":0.0,"photoIDs":[136155.0,136156.0,136158.0,136159.0,136161.0,136164.0,136167.0,136169.0,989104.0,7243052.0,7243081.0],"skipIndex":0,"section_code":"gallery","featured_images":136164.0,"id":12519,"singleSection":false});				  						galleries[12517] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Feature Pictures","link":"gallery_12517.html","maxRecords":0.0,"photoIDs":[136130.0,136132.0,136133.0,136134.0,136135.0,136137.0,136139.0,136143.0,136144.0,177017.0,8238616.0,8238619.0,8238622.0,8238623.0,8238640.0,8238643.0,8238644.0],"skipIndex":0,"section_code":"gallery","featured_images":136134.0,"id":12517,"singleSection":false});				  						galleries[12521] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Personal Pictures","link":"gallery_12521.html","maxRecords":0.0,"photoIDs":[136216.0,136218.0],"skipIndex":0,"section_code":"gallery","featured_images":136216.0,"id":12521,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '136201,136137,136130';
imageSets[2] = '8238596,136216,136201,136164,136134';
imageSets[3] = '136152';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/andycompton/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/andycompton/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/andycompton/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/andycompton/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/andycompton/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/andycompton/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/andycompton/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Andrew Compton: ' + 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>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

