function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[4463504]=new thumbnail(4463504,"","Boots Band","The_Blues_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[4463516]=new thumbnail(4463516,"","West One","West_One_thumb.jpg",130,86,15);thumbnails[4463486]=new thumbnail(4463486,"","Moneypenny","Moneypenny_1_by_Red_Camera_thumb.jpg",120,195,15);thumbnails[4463505]=new thumbnail(4463505,"","Ansel Who?","Ansel_Who__by_Red_Camera_thumb.jpg",130,160,15);thumbnails[4463514]=new thumbnail(4463514,"","Calenders","2009_Calender_Flat_thumb.jpg",130,193,15);thumbnails[4463515]=new thumbnail(4463515,"","Styles","Photo_Modernity_11_by_Red_Camera_1_thumb.jpg",130,194,15);thumbnails[3523994]=new thumbnail(3523994,"202586","Fibonacci 1","Fibonacci1_thumb.jpg",130,130,15);thumbnails[3523995]=new thumbnail(3523995,"202586","Fibonacci 2","Fibonacci2_thumb.jpg",130,130,15);thumbnails[3523996]=new thumbnail(3523996,"202586","Fibonacci 3","Fibonacci_3_in_Black_and_White_thumb.jpg",130,130,15);thumbnails[3523997]=new thumbnail(3523997,"202586","Fibonacci 4","Fibonacci4_thumb.jpg",130,130,15);thumbnails[3524002]=new thumbnail(3524002,"202586","Fibonacci 5","Fibonacci5_thumb.jpg",130,130,15);thumbnails[3524004]=new thumbnail(3524004,"202586","Fibonacci 6","Mandella_thumb.jpg",130,116,15);thumbnails[3524005]=new thumbnail(3524005,"202586","Fibonacci 7","Fibonacci7_thumb.jpg",130,130,15);thumbnails[3524006]=new thumbnail(3524006,"202586","Fibonacci 8","Fibonacci8_thumb.jpg",125,156,15);thumbnails[4080484]=new thumbnail(4080484,"245288","War on the Line 1","War_on_the_Line_1_by_Red_Camera_thumb.jpg",130,105,15);thumbnails[4080765]=new thumbnail(4080765,"245306","Moments in Time 1","Moments_in_Time_1_by_Red_Camera_thumb.jpg",130,162,15);thumbnails[4080828]=new thumbnail(4080828,"245306","Moments in Time 5","Moments_in_Time_5_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[4080488]=new thumbnail(4080488,"245288","War on the Line 2","War_On_the_Line_2_by_Red_Camera_thumb.jpg",130,186,15);thumbnails[4080771]=new thumbnail(4080771,"245306","Moments in Time 2","Moments_in_Time_2_by_Red_Camera_thumb.jpg",130,153,15);thumbnails[4080491]=new thumbnail(4080491,"245288","War on the Line 3","War_On_the_Line_3_by_Red_Camera_thumb.jpg",130,172,15);thumbnails[4080774]=new thumbnail(4080774,"245306","Moments in Time 3","Moments_in_Time_3_by_Red_Camera_thumb.jpg",130,91,15);thumbnails[4080494]=new thumbnail(4080494,"245288","War on the Line 4","War_on_the_Line_4_by_Red_Camera_thumb.jpg",130,187,15);thumbnails[4080778]=new thumbnail(4080778,"245306","Moments in Time 4","Walking_Back_by_Red_Camera_thumb.jpg",130,87,15);thumbnails[4080495]=new thumbnail(4080495,"245288","War on the Line 5","War_on_the_Line_5_by_Red_Camera_thumb.jpg",130,151,15);thumbnails[4080496]=new thumbnail(4080496,"245288","War on the Line 6","War_on_the_Line_6_bw_by_Red_Camera_thumb.jpg",130,190,15);thumbnails[4080830]=new thumbnail(4080830,"245306","Moments in Time 6","A_Day_in_a_Garden_16_by_Red_Camera_thumb.jpg",130,103,15);thumbnails[4080497]=new thumbnail(4080497,"245288","ar on the Line 7","War_on_the_Line_7_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[4080498]=new thumbnail(4080498,"245288","War on the line 8","War_on_the_Line_8_by_Red_Camera_thumb.jpg",82,195,15);thumbnails[4080525]=new thumbnail(4080525,"245288","War on the Line 9","War_on_the_Line_9_by_Red_Camera_thumb.jpg",130,178,15);thumbnails[4080500]=new thumbnail(4080500,"245288","War on the Line 10","War_on_the_Line_10_by_Red_Camera_thumb.jpg",130,185,15);thumbnails[4080842]=new thumbnail(4080842,"202586","Fibonacci 9","fibonacci_9_thumb.jpg",130,130,15);thumbnails[3524007]=new thumbnail(3524007,"202586","Spiral 1","Fibonacci9_thumb.jpg",130,130,15);thumbnails[4080502]=new thumbnail(4080502,"245288","War on the Line 11","War_on_the_Line_11_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[4080504]=new thumbnail(4080504,"245288","War on the Line 12","War_on_the_Line_12_by_Red_Camera1_thumb.jpg",130,195,15);thumbnails[4080845]=new thumbnail(4080845,"202586","Spiral 2","Black_and_White_Spiral_by_Red_Camera_thumb.jpg",130,124,15);thumbnails[4080510]=new thumbnail(4080510,"245288","War on the Line 13","War_on_the_Line_13_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[4080846]=new thumbnail(4080846,"202586","Spiral 3","White_Spiral_by_Red_Camera_thumb.jpg",130,106,15);thumbnails[4080515]=new thumbnail(4080515,"245288","War on the Line 14","War_on_the_Line_14_by_Red_Camera_thumb.jpg",130,86,15);thumbnails[4080848]=new thumbnail(4080848,"202586","Star Fish 1","Star_Fish_1_by_Red_Camera_thumb.jpg",130,128,15);thumbnails[4080851]=new thumbnail(4080851,"202586","Spiral 4","Fossil_Spiral_by_Red_Camera_thumb.jpg",130,117,15);thumbnails[4080520]=new thumbnail(4080520,"245288","War on the Line 15","War_on_the_Line_15_by_Red_Camera_thumb.jpg",125,195,15);thumbnails[4080855]=new thumbnail(4080855,"202586","Spiral Stairs","Spiral_Stairs_by_Red_Camera_thumb.jpg",130,194,15);thumbnails[4463019]=new thumbnail(4463019,"260668","Stones 1","Abstraction_1_thumb.jpg",130,86,15);thumbnails[4463021]=new thumbnail(4463021,"260668","Stones 2","Absrtaction_in_the_Landscape_3_by_Red_Camera_thumb.jpg",130,88,15);thumbnails[4463022]=new thumbnail(4463022,"260668","Stones 3","Abstraction_2_thumb.jpg",130,86,15);thumbnails[4463024]=new thumbnail(4463024,"260668","Stones 4","stones_ecflay_thumb.jpg",130,192,15);thumbnails[4463027]=new thumbnail(4463027,"260668","Stones 5","Abstraction_4_thumb.jpg",130,193,15);thumbnails[4463028]=new thumbnail(4463028,"260668","Stones 6","Abstraction_3_thumb.jpg",130,195,15);thumbnails[4463029]=new thumbnail(4463029,"260668","Stones 7","stones_1_thumb.jpg",130,93,15);thumbnails[4463030]=new thumbnail(4463030,"260668","Stones 8","stonese2solblack_thumb.jpg",130,86,15);thumbnails[4463031]=new thumbnail(4463031,"260668","Stones 9","p1010396_thumb.jpg",130,95,15);thumbnails[4463033]=new thumbnail(4463033,"260668","Stones 10","stoned_thumb.jpg",130,173,15);thumbnails[4463151]=new thumbnail(4463151,"260669","Grand Canyon 1","asl12_thumb.jpg",130,193,15);thumbnails[4463174]=new thumbnail(4463174,"260669","Grand Canyon 2","asl11_thumb.jpg",130,194,15);thumbnails[4463178]=new thumbnail(4463178,"260669","Grand Canyon 3","dsc_2363b_thumb.jpg",130,195,15);thumbnails[4463180]=new thumbnail(4463180,"260669","Grand Canyon 4","asl10_thumb.jpg",130,85,15);thumbnails[4463041]=new thumbnail(4463041,"260670","Mod 1","Modernity_3_New_23cm_thumb.jpg",130,195,15);thumbnails[4463044]=new thumbnail(4463044,"260670","Mod 2","ray_1_thumb.jpg",130,162,15);thumbnails[4463049]=new thumbnail(4463049,"260670","Mod 3","ray_1neg_thumb.jpg",130,162,15);thumbnails[4463052]=new thumbnail(4463052,"260670","Mod 4","Modernity_6_thumb.jpg",130,88,15);thumbnails[4463054]=new thumbnail(4463054,"260670","Mod 5","shell_r_thumb.jpg",130,169,15);thumbnails[4463056]=new thumbnail(4463056,"260670","Shell 6","shell_thumb.jpg",130,169,15);thumbnails[4463058]=new thumbnail(4463058,"260670","Mod 7","pos_and_neg2_copy_thumb.jpg",130,88,15);thumbnails[4463060]=new thumbnail(4463060,"260670","Mod 8","leaf_r_thumb.jpg",130,118,15);thumbnails[4463061]=new thumbnail(4463061,"260670","Mod 9","leaf_thumb.jpg",130,118,15);thumbnails[4463125]=new thumbnail(4463125,"260673","Mod 10","cr_bu3flat1_thumb.jpg",81,195,15);thumbnails[4463112]=new thumbnail(4463112,"260673","Mod 11","cr2008flat_thumb.jpg",81,195,15);thumbnails[4463114]=new thumbnail(4463114,"260673","Mod 12","crys2007flat_copy_thumb.jpg",78,195,15);thumbnails[4463116]=new thumbnail(4463116,"260673","Mod 13","manhatten_copy_thumb.jpg",130,186,15);thumbnails[4463118]=new thumbnail(4463118,"260673","Mod 14","rimg0081_thumb.jpg",130,173,15);thumbnails[4463122]=new thumbnail(4463122,"260673","Mod 15","NY_thumb.jpg",112,195,15);thumbnails[3526813]=new thumbnail(3526813,"202587","Piano Bar 1","Piano_Bar_by_Red_Camera_thumb.jpg",130,84,15);thumbnails[3527114]=new thumbnail(3527114,"202587","Piano Bar 2","Piano_Bar_2_by_Red_Camera_thumb.jpg",130,80,15);thumbnails[3527120]=new thumbnail(3527120,"202587","Piano Bar 3","Piano_Bar_4_by_Red_Camera_thumb.jpg",130,80,15);thumbnails[3527118]=new thumbnail(3527118,"202587","Piano Bar 4","Piano_Bar_3_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527122]=new thumbnail(3527122,"202587","Piano Bar 5","Piano_Bar_5_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527123]=new thumbnail(3527123,"202587","Piano Bar Looking Up","Piano_Bar_Looking_Up_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527126]=new thumbnail(3527126,"202587","Guggenheim 1","Guggenheim_by_Red_Camera_thumb.jpg",130,105,15);thumbnails[3527128]=new thumbnail(3527128,"202587","Guggenheim 2","Guggenheim_2_by_Red_Camera_thumb.jpg",130,164,15);thumbnails[3527129]=new thumbnail(3527129,"202587","Guggenheim 3","Looking_Down_by_Red_Camera_thumb.jpg",130,104,15);thumbnails[3527139]=new thumbnail(3527139,"202587","Bellagio 18","Bellagio_18_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527157]=new thumbnail(3527157,"202587","Winchester Cathedral 1","Winchester_1_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527158]=new thumbnail(3527158,"202587","Winchester Cathedral 2","Winchester_2_by_Red_Camera_thumb.jpg",130,195,15);thumbnails[3527147]=new thumbnail(3527147,"202587","British Library 1","British_Museum_by_Red_Camera_thumb.jpg",130,79,15);thumbnails[3527135]=new thumbnail(3527135,"202587","Guggenheim Looking Up","Looking_up_in_black_and_white_by_Red_Camera_thumb.jpg",130,163,15);thumbnails[3527150]=new thumbnail(3527150,"202587","British Library 2","The_British_Library_by_Red_Camera_thumb.jpg",130,74,15);thumbnails[4463279]=new thumbnail(4463279,"260680","Mark Wrigley BSC, MSC, LRPS","SAVE0048smallest_thumb.jpg",130,164,15);thumbnails[4462953]=new thumbnail(4462953,"260680","Sorry this item is not for sale. See links.","Untitled-1_copy_thumb.jpg",130,165,15);thumbnails[3527977]=new thumbnail(3527977,"215900","Deco 1","Deco_B_by_Red_Camera_thumb.jpg",130,146,15);thumbnails[3527978]=new thumbnail(3527978,"215900","Deco 2","Deco_thumb.jpg",130,111,15);thumbnails[3527981]=new thumbnail(3527981,"215900","Deco 3","RIMG0071_thumb.jpg",130,173,15);thumbnails[3527983]=new thumbnail(3527983,"215900","Deco 4","Photo_Modernity_1_by_Red_Camera_thumb.jpg",130,101,15);thumbnails[3527985]=new thumbnail(3527985,"215900","Deco 5","Aerodrome_by_Red_Camera_thumb.jpg",130,86,15);thumbnails[3527989]=new thumbnail(3527989,"215900","Deco 6","Stella_by_Red_Camera_thumb.jpg",130,96,15);thumbnails[3527991]=new thumbnail(3527991,"215900","Deco 7","Bellagio_14_by_Red_Camera_thumb.jpg",130,167,15);thumbnails[3528004]=new thumbnail(3528004,"215900","Deco 8","Photo_Modernity_5_by_Red_Camera_thumb.jpg",81,195,15);thumbnails[3528007]=new thumbnail(3528007,"215900","Deco 9","Universal_by_Red_Camera_thumb.jpg",130,173,15);thumbnails[3536448]=new thumbnail(3536448,"216483","Man Ray ","Man_Ray_by_Red_Camera_thumb.jpg",130,163,15);thumbnails[3536454]=new thumbnail(3536454,"216483","Solorisation 1","Photo_Modernity_12_by_Red_Camera_thumb.jpg",130,88,15);thumbnails[3536455]=new thumbnail(3536455,"216483","Solorisation 2","Photo_Modernity_11_by_Red_Camera_thumb.jpg",130,194,15);thumbnails[3536459]=new thumbnail(3536459,"216483","Rayogram 1","Photo_Modernity_7_by_Red_Camera_thumb.jpg",130,162,15);thumbnails[3536461]=new thumbnail(3536461,"216483","Rayogram 2","Photo_Modernity_6_by_Red_Camera_thumb.jpg",130,162,15);thumbnails[3528738]=new thumbnail(3528738,"215901","Monolith 1","Absrtaction_in__Landscape_10_by_Red_Camera_thumb.jpg",130,193,15);thumbnails[3528792]=new thumbnail(3528792,"215901","Stone Circle 1","Return_to_the_Stones_5_by_Red_Camera_thumb.jpg",129,195,15);thumbnails[3528743]=new thumbnail(3528743,"215901","Monolith 2","Absrtaction_in_the_Landscape_5_by_Red_Camera_thumb.jpg",125,195,15);thumbnails[3528788]=new thumbnail(3528788,"215901","Monolith 3","Absrtaction_in_the_Landscape_3_by_Red_Camera1_thumb.jpg",130,88,15);thumbnails[3528795]=new thumbnail(3528795,"215901","Stone Circle 2","Absrtaction_in_the_Landscape_4_by_Red_Camera_thumb.jpg",130,86,15);thumbnails[3528742]=new thumbnail(3528742,"215901","Stone Circle 3","Absrtaction_in_the_Landscape_1_by_Red_Camera_thumb.jpg",130,86,15);thumbnails[3528796]=new thumbnail(3528796,"215901","Stone Circle 4","Return_to_the_Stones_9_by_Red_Camera_thumb.jpg",130,95,15);thumbnails[3528797]=new thumbnail(3528797,"215901","Stone Circle 5","Return_to_the_Stones_1_by_Red_Camera_thumb.jpg",130,98,15);thumbnails[3528790]=new thumbnail(3528790,"215901","Human Circle 1","Return_to_the_Stones_2_by_Red_Camera_thumb.jpg",130,88,15);thumbnails[3528746]=new thumbnail(3528746,"215901","Stone Circle 6","Colour_More_Stones_2_by_Red_Camera_thumb.jpg",130,97,15);thumbnails[3528744]=new thumbnail(3528744,"215901","Monolith 4","Colour_More_Stones_3_by_Red_Camera_thumb.jpg",130,173,15);thumbnails[3528748]=new thumbnail(3528748,"215901","Stone Circle 7","Return_to_the_Stones_8_by_Red_Camera_thumb.jpg",130,98,15);thumbnails[3621930]=new thumbnail(3621930,"221567","Limes in Blue","The_Woods_in_Blue_by_Red_Camera_thumb.jpg",130,117,15);thumbnails[3675176]=new thumbnail(3675176,"221567","Winter Limes","If_you_go_down_in_the_woods____by_Red_Camera_thumb.jpg",130,94,15);thumbnails[3675177]=new thumbnail(3675177,"221567","Avenue of Limes","If_you_go_down_in_the_woods_4_by_Red_Camera_thumb.jpg",130,107,15);thumbnails[3675178]=new thumbnail(3675178,"221567","Lost in Limes","If_you_go_down_in_the_woods_2_by_Red_Camera4_thumb.jpg",130,191,15);thumbnails[4080565]=new thumbnail(4080565,"221567","Spring Limes","A_Day_in_a_Garden_12_by_Red_Camera_thumb.jpg",130,131,15);thumbnails[4080609]=new thumbnail(4080609,"221567","Spring Limes 2","A_Day_in_a_Garden_13_by_Red_Camera_thumb.jpg",130,173,15);thumbnails[4080529]=new thumbnail(4080529,"245296","A Day in a Garden 1","A_Day_in_a_Garden_1_by_Red_Camera_thumb.jpg",130,129,15);thumbnails[4080531]=new thumbnail(4080531,"245296","A Day in a Garden 2","A_Day_in_a_Garden_2_by_Red_Camera_thumb.jpg",130,126,15);thumbnails[4080537]=new thumbnail(4080537,"245296","A Day in a Garden 4","A_Day_in_a_Garden_4_by_Red_Camera_thumb.jpg",130,114,15);thumbnails[4080532]=new thumbnail(4080532,"245296","A Day in a Garden 3","A_Day_in_a_Garden_3_by_Red_Camera_thumb.jpg",108,195,15);thumbnails[4080544]=new thumbnail(4080544,"245296","A Day in a Garden 5","A_Day_in_a_Garden_5_by_Red_Camera_thumb.jpg",130,194,15);thumbnails[4080549]=new thumbnail(4080549,"245296","A Day in a Garden 6","A_Day_in_a_Garden_6_by_Red_Camera_thumb.jpg",130,187,15);thumbnails[4080551]=new thumbnail(4080551,"245296","A Day in a Garden 7","A_Day_in_a_Garden_7_by_Red_Camera_thumb.jpg",130,107,15);thumbnails[4080554]=new thumbnail(4080554,"245296","A Day in a Garden 8","A_Day_in_a_Garden_8_by_Red_Camera_thumb.jpg",130,97,15);thumbnails[4080555]=new thumbnail(4080555,"245296","A Day in a Garden 9","A_Day_in_a_Garden_9_by_Red_Camera_thumb.jpg",130,121,15);thumbnails[4080558]=new thumbnail(4080558,"245296","A Day in a Garden 10","A_Day_in_a_Garden_10_by_Red_Camera_thumb.jpg",130,135,15);thumbnails[4080562]=new thumbnail(4080562,"245296","A Day in a Garden 11","A_Day_in_a_Garden_11_by_Red_Camera_thumb.jpg",130,121,15);thumbnails[4080715]=new thumbnail(4080715,"245296","A Day in a Garden 12","Petal_3_by_Red_Camera_thumb.jpg",130,130,15);thumbnails[4080728]=new thumbnail(4080728,"245296","A Day in a Garden 13","Petal_by_Red_Camera_thumb.jpg",130,134,15);thumbnails[4080614]=new thumbnail(4080614,"245296","A Day in a Garden 14","A_Day_in_a_Garden_14_by_Red_Camera_thumb.jpg",130,146,15);thumbnails[4080617]=new thumbnail(4080617,"245296","A Day in a Garden 15","A_Day_in_a_Garden_15_by_Red_Camera_thumb.jpg",130,188,15);thumbnails[4080623]=new thumbnail(4080623,"245296","A Day in a Garden 16","A_Day_in_a_Garden_17_by_Red_Camera_thumb.jpg",130,98,15);var galleries=new Object();galleries[202586]=new gallery(202586,"3523996","Fibonacci","section314417",[3523994,3523995,3523996,3523997,3524002,3524004,3524005,3524006,4080842,3524007,4080845,4080846,4080848,4080851,4080855]);galleries[245306]=new gallery(245306,"4080765","Moments in Time","gallery",[4080765,4080828,4080771,4080774,4080778,4080830]);galleries[245288]=new gallery(245288,"4080515","War on the Line","gallery",[4080484,4080488,4080491,4080494,4080495,4080496,4080497,4080498,4080525,4080500,4080502,4080504,4080510,4080515,4080520]);galleries[260665]=new gallery(260665,"4463180,4463178,4463174,4463151,4463033,4463031,4463030,4463029,4463028,4463027","Abstraction in the Landscpe","section314417",[]);galleries[260666]=new gallery(260666,"4463041","Photo Modernity","section314417",[]);galleries[260668]=new gallery(260668,"4463033,4463031,4463030,4463029,4463028,4463027,4463024,4463022,4463021,4463019","Stones o' Strenness","section314417",[4463019,4463021,4463022,4463024,4463027,4463028,4463029,4463030,4463031,4463033]);galleries[260669]=new gallery(260669,"4463180,4463178,4463174,4463151","The Grand Canyon","section314417",[4463151,4463174,4463178,4463180]);galleries[260670]=new gallery(260670,"4463041","Solorisation and Ray-o-grams","section314417",[4463041,4463044,4463049,4463052,4463054,4463056,4463058,4463060,4463061]);galleries[260673]=new gallery(260673,"4463125,4463122,4463118,4463116,4463114,4463112","Stitching up the Chrysler","section314417",[4463125,4463112,4463114,4463116,4463118,4463122]);galleries[202587]=new gallery(202587,"3527126","Interior Spaces","gallery",[3526813,3527114,3527120,3527118,3527122,3527123,3527126,3527128,3527129,3527139,3527157,3527158,3527147,3527135,3527150]);galleries[260680]=new gallery(260680,"4462953","Black and White Photography and the Author ","section314417",[4463279,4462953]);galleries[215900]=new gallery(215900,"3527978","Photo Modernity","gallery",[3527977,3527978,3527981,3527983,3527985,3527989,3527991,3528004,3528007]);galleries[216483]=new gallery(216483,"3536448","Man Ray","gallery",[3536448,3536454,3536455,3536459,3536461]);galleries[215901]=new gallery(215901,"3528742","Neolthic Whisky Run","gallery",[3528738,3528792,3528743,3528788,3528795,3528742,3528796,3528797,3528790,3528746,3528744,3528748]);galleries[221567]=new gallery(221567,"4080609,4080565,3675178,3675177,3675176,3621930","Lime Grove","gallery",[3621930,3675176,3675177,3675178,4080565,4080609]);galleries[245296]=new gallery(245296,"4080555","A Day in a Garden","gallery",[4080529,4080531,4080537,4080532,4080544,4080549,4080551,4080554,4080555,4080558,4080562,4080715,4080728,4080614,4080617,4080623]);var imageSets=new Object();imageSets[1]="4462953";imageSets[2]="4463041,4462953,4080765,4080555,4080515,3536448,3528742,3527978,3527126,3523996";imageSets[3]="4463516,4463504";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 34:b="http://www9.clikpic.com/markwrig/images";break}switch(a){case 1:b="http://www1.clikpic.com/markwrig/images";break}switch(a){case 2:b="http://admin.clikpic.com/markwrig/images";break}switch(a){case 4:b="http://www.clikchurch.com/markwrig/images";break}switch(a){case 5:b="http://www2.clikpic.com/markwrig/images";break}switch(a){case 15:b="http://www3.clikpic.com/markwrig/images";break}switch(a){case 21:b="http://www6.clikpic.com/markwrig/images";break}switch(a){case 18:b="http://www4.clikpic.com/markwrig/images";break}switch(a){case 19:b="http://www5.clikpic.com/markwrig/images";break}switch(a){case 22:b="http://tpc5/clikpic/markwrig/images";break}switch(a){case 23:b="http://tpc10/clikpic/markwrig/images";break}switch(a){case 24:b="http://tpc15/clikpic/markwrig/images";break}switch(a){case 25:b="http://tpc16/clikpic/markwrig/images";break}switch(a){case 31:b="http://www7.clikpic.com/markwrig/images";break}switch(a){case 32:b="http://admin2.clikpic.com/markwrig/images";break}switch(a){case 33:b="http://www8.clikpic.com/markwrig/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("section314417"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section314417.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+backgrounds[imageID].caption+'" border="0">';if("section314417"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="Lazy-Photon: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#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,photos,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()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<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);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="Red.Camera@hotmail.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="Red.Camera@hotmail.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};