function photo(j,c,p,t,d,k,h,r,v,o,m,s,a,n,g,l,b,u,q,f,e){this.id=j;this.galleries_id=c;this.photo_ref=p;this.section_code=t;this.src=d;this.width=k;this.height=h;this.caption=r;this.thumbnail=v;this.thumbnail_width=o;this.thumbnail_height=m;this.home=s;this.gallery=a;this.description=n;this.takendate=g;this.photographer=l;this.location=b;this.item_price=u;this.purchase_instruction=q;this.payment_groups_id=f;this.server_id=e;this.src=getServerPath(this.server_id)+"/"+this.src;this.thumbnail=getServerPath(this.server_id)+"/"+this.thumbnail}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}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 photos=new Object();photos[843528]=new photo(843528,"","","","Scrumpies.jpg",600,417,"","Scrumpies_thumb.jpg",130,90,0,0,"","","","","","","",1);photos[883672]=new photo(883672,"","","","Directing Taxis2.jpg",600,494,"","Directing Taxis2_thumb.jpg",130,107,0,1,"","","","","","","",1);photos[2727023]=new photo(2727023,"","","","ARPŠ Net Therapy003.JPG",600,400,"","ARPŠ Net Therapy003_thumb.JPG",130,87,0,0,"","","","","","","",1);photos[1327236]=new photo(1327236,"","","","dance.jpg",600,400,"","dance_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[1324249]=new photo(1324249,"","","","monaco casino architecture.jpg",600,400,"","monaco casino architecture_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[1324441]=new photo(1324441,"","","","nice b-w.jpg",600,418,"","nice b-w_thumb.jpg",130,91,0,0,"","","","","","","",1);photos[1325340]=new photo(1325340,"","","","casino night.jpg",600,400,"","casino night_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[652497]=new photo(652497,"","","","Cable Car.jpg",600,389,"","Cable Car_thumb.jpg",130,84,0,0,"","","","","","","",1);photos[837666]=new photo(837666,"","","","people-mono.gif",600,360,"","people-mono_thumb.gif",130,78,0,0,"","","","","","","",1);photos[2751719]=new photo(2751719,"","","","ARPŠ Net Therapy028.JPG",600,400,"","ARPŠ Net Therapy028_thumb.JPG",130,87,0,0,"","","","","","","",1);photos[652373]=new photo(652373,"64534","","gallery","Binoculars2.jpg",600,454,"","Binoculars2_thumb.jpg",130,98,1,1,"","","","","","","",1);photos[2695849]=new photo(2695849,"170127","","gallery","Akpo Ground Exterior.jpg",420,600,"","Akpo Ground Exterior_thumb.jpg",91,130,1,1,"","","","","","","",1);photos[2696835]=new photo(2696835,"64534","","gallery","Re-fuel.jpg",600,392,"","Re-fuel_thumb.jpg",130,85,0,1,"","","","","","","",1);photos[4222535]=new photo(4222535,"170127","","gallery","Jessica074.JPG",400,600,"","Jessica074_thumb.JPG",87,130,1,1,"","","","","","","",1);photos[2835234]=new photo(2835234,"170127","","gallery","Ross the Boss1.jpg",400,600,"","Ross the Boss1_thumb.jpg",87,130,0,1,"","","","","","","",1);photos[2696152]=new photo(2696152,"170127","","gallery","Diving.jpg",400,600,"","Diving_thumb.jpg",87,130,1,1,"","","","","","","",1);photos[652319]=new photo(652319,"64534","","gallery","Yellow Cabs3.jpg",429,600,"","Yellow Cabs3_thumb.jpg",93,130,0,0,"","","","","","","",1);photos[1299881]=new photo(1299881,"64534","","gallery","night at nice.jpg",600,400,"","night at nice_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[1324316]=new photo(1324316,"64534","","gallery","montecarlo architecture.jpg",600,400,"","montecarlo architecture_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[4222539]=new photo(4222539,"170127","","gallery","Nicky_Yates44.JPG",600,400,"","Nicky_Yates44_thumb.JPG",130,87,0,1,"","","","","","","",1);photos[1324320]=new photo(1324320,"64534","","gallery","hermitage.jpg",600,409,"","hermitage_thumb.jpg",130,89,0,0,"","","","","","","",1);photos[1324458]=new photo(1324458,"64534","","gallery","night bin.jpg",600,400,"","night bin_thumb.jpg",130,87,1,1,"","","","","","","",1);photos[4222897]=new photo(4222897,"64534","","gallery","Paul_Blackburn092.jpg",600,400,"","Paul_Blackburn092_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[2696785]=new photo(2696785,"170127","","gallery","Jo music poster.jpg",600,450,"","Jo music poster_thumb.jpg",130,98,0,1,"","","","","","","",1);photos[2696886]=new photo(2696886,"64534","","gallery","The Voyuer2.jpg",600,415,"","The Voyuer2_thumb.jpg",130,90,0,1,"","","","","","","",1);photos[765884]=new photo(765884,"64534","","gallery","Chroma Car2.jpg",600,400,"","Chroma Car2_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[2696833]=new photo(2696833,"170127","","gallery","scott013.jpg",600,400,"","scott013_thumb.jpg",130,87,0,1,"","","","","","","",1);photos[4222532]=new photo(4222532,"170127","","gallery","Jessica020.JPG",400,600,"","Jessica020_thumb.JPG",87,130,0,1,"","","","","","","",1);photos[4231993]=new photo(4231993,"64534","","gallery","the_birds.jpg",448,299,"","the_birds_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[1250926]=new photo(1250926,"64534","","gallery","Red Angel.jpg",600,400,"","Red Angel_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[1324540]=new photo(1324540,"64534","","gallery","monaco tower.jpg",400,600,"","monaco tower_thumb.jpg",87,130,0,0,"","","","","","","",1);photos[1325130]=new photo(1325130,"64534","","gallery","arrow.jpg",600,400,"","arrow_thumb.jpg",130,87,0,1,"","","","","","","",1);photos[2696865]=new photo(2696865,"170127","","gallery","Nephu Huzzband.jpg",600,400,"","Nephu Huzzband_thumb.jpg",130,87,0,1,"","","","","","","",1);photos[4222530]=new photo(4222530,"170127","","gallery","Amy006.JPG",600,400,"","Amy006_thumb.JPG",130,87,1,1,"","","","","","","",1);photos[4222537]=new photo(4222537,"170127","","gallery","Nicky_Yates28.JPG",400,600,"","Nicky_Yates28_thumb.JPG",87,130,0,0,"","","","","","","",1);photos[4222871]=new photo(4222871,"64534","","gallery","003.jpg",600,400,"","003_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[4232008]=new photo(4232008,"170127","","gallery","IMG_2123-2.jpg",400,600,"","IMG_2123-2_thumb.jpg",87,130,0,0,"","","","","","","",1);photos[2751714]=new photo(2751714,"64534","","gallery","ARPŠ Net Therapy026.JPG",600,400,"","ARPŠ Net Therapy026_thumb.JPG",130,87,0,0,"","","","","","","",1);photos[1267117]=new photo(1267117,"64534","","gallery","NYC block.jpg",600,450,"","NYC block_thumb.jpg",130,98,0,0,"","","","","","","",1);photos[608120]=new photo(608120,"64534","","gallery","Brooklyn Lights.jpg",600,450,"","Brooklyn Lights_thumb.jpg",130,98,0,0,"","","","",20,"Brooklyn Lights","",1);photos[652431]=new photo(652431,"170127","","gallery","Jo ESB.jpg",600,450,"","Jo ESB_thumb.jpg",130,98,1,1,"","","","","","","",1);photos[1327240]=new photo(1327240,"64534","","gallery","learn direct1.jpg",600,404,"","learn direct1_thumb.jpg",130,88,0,0,"","","","","","","",1);photos[2696802]=new photo(2696802,"64534","","gallery","30 seconds in Paris II.jpg",600,382,"","30 seconds in Paris II_thumb.jpg",130,83,0,0,"","","","","","","",1);photos[1325243]=new photo(1325243,"64534","","gallery","light.jpg",600,400,"","light_thumb.jpg",130,87,0,0,"","","","","","","",1);photos[2696645]=new photo(2696645,"170127","","gallery","hdr swimming 2.jpg",600,400,"","hdr swimming 2_thumb.jpg",130,87,1,0,"","","","","","","",1);photos[835278]=new photo(835278,"64534","","gallery","Moulin-Rouge.gif",600,392,"","Moulin-Rouge_thumb.gif",130,85,0,0,"","","","","","","",1);photos[4231713]=new photo(4231713,"64534","","gallery","Morning_Commute.jpg",600,600,"","Morning_Commute_thumb.jpg",130,130,1,0,"","","","","","","",1);photos[835285]=new photo(835285,"64534","","gallery","Sacracuer3.gif",600,407,"","Sacracuer3_thumb.gif",130,88,0,0,"","","","","","","",1);photos[2699684]=new photo(2699684,"77164","","gallery","1st selection edited147.jpg",400,600,"","1st selection edited147_thumb.jpg",87,130,0,1,"","","","","","","",1);photos[1034274]=new photo(1034274,"77164","","gallery","Graham & Emma021.2.jpg",600,351,"","Graham & Emma021_thumb.2.jpg",130,76,0,0,"","","","","","","",1);photos[1034278]=new photo(1034278,"77164","","gallery","Graham & Emma148.jpg",400,600,"","Graham & Emma148_thumb.jpg",87,130,0,1,"","","","","","","",1);photos[2704090]=new photo(2704090,"77164","","gallery","Wedding165.jpg",600,497,"","Wedding165_thumb.jpg",130,108,0,0,"","","","","","","",1);photos[1034279]=new photo(1034279,"77164","","gallery","Graham & Emma106 copy.jpg",600,367,"","Graham & Emma106 copy_thumb.jpg",130,80,0,1,"","","","","","","",1);photos[1034284]=new photo(1034284,"77164","","gallery","Graham & Emma164.2.jpg",600,458,"","Graham & Emma164_thumb.2.jpg",130,99,0,0,"","","","","","","",1);photos[2696758]=new photo(2696758,"77164","","gallery","1st selection edited128.jpg",600,418,"","1st selection edited128_thumb.jpg",130,91,0,1,"","","","","","","",1);photos[2704055]=new photo(2704055,"77164","","gallery","Graham & Michelle0167.jpg",600,400,"","Graham & Michelle0167_thumb.jpg",130,87,0,1,"","","","","","","",1);photos[2699570]=new photo(2699570,"77164","","gallery","kathryn5.jpg",400,600,"","kathryn5_thumb.jpg",87,130,0,0,"","","","","","","",1);photos[2703962]=new photo(2703962,"77164","","gallery","edited colour.jpg",480,600,"","edited colour_thumb.jpg",104,130,0,0,"","","","","","","",1);photos[2704092]=new photo(2704092,"77164","","gallery","Wedding191.jpg",600,546,"","Wedding191_thumb.jpg",130,118,0,0,"","","","","","","",1);photos[4258488]=new photo(4258488,"77164","","gallery","Lee__Claire056-2.jpg",600,600,"","Lee__Claire056-2_thumb.jpg",130,130,0,0,"","","","","","","",2);photos[1034286]=new photo(1034286,"77164","","gallery","Graham & Emma225.jpg",600,441,"","Graham & Emma225_thumb.jpg",130,96,0,0,"","","","","","","",1);photos[1034289]=new photo(1034289,"77164","","gallery","Graham & Emma248.6.jpg",600,435,"","Graham & Emma248_thumb.6.jpg",130,94,0,0,"","","","","","","",1);photos[2699696]=new photo(2699696,"77164","","gallery","1st selection edited130.jpg",600,400,"","1st selection edited130_thumb.jpg",130,87,0,1,"","","","","","","",1);photos[1034292]=new photo(1034292,"77164","","gallery","Graham & Emma242.3.jpg",600,422,"","Graham & Emma242_thumb.3.jpg",130,91,0,0,"","","","","","","",1);photos[1034293]=new photo(1034293,"77164","","gallery","Graham & Emma268.jpg",422,600,"","Graham & Emma268_thumb.jpg",91,130,0,0,"","","","","","","",1);photos[2704025]=new photo(2704025,"77164","","gallery","Docks edited 2.jpg",600,400,"","Docks edited 2_thumb.jpg",130,87,0,0,"","","","","","","",1);var thumbnails=new Object();thumbnails[843528]=new thumbnail(843528,"","","Scrumpies_thumb.jpg",130,90,1);thumbnails[883672]=new thumbnail(883672,"","","Directing Taxis2_thumb.jpg",130,107,1);thumbnails[2727023]=new thumbnail(2727023,"","","ARPŠ Net Therapy003_thumb.JPG",130,87,1);thumbnails[1327236]=new thumbnail(1327236,"","","dance_thumb.jpg",130,87,1);thumbnails[1324249]=new thumbnail(1324249,"","","monaco casino architecture_thumb.jpg",130,87,1);thumbnails[1324441]=new thumbnail(1324441,"","","nice b-w_thumb.jpg",130,91,1);thumbnails[1325340]=new thumbnail(1325340,"","","casino night_thumb.jpg",130,87,1);thumbnails[652497]=new thumbnail(652497,"","","Cable Car_thumb.jpg",130,84,1);thumbnails[837666]=new thumbnail(837666,"","","people-mono_thumb.gif",130,78,1);thumbnails[2751719]=new thumbnail(2751719,"","","ARPŠ Net Therapy028_thumb.JPG",130,87,1);thumbnails[652373]=new thumbnail(652373,"64534","","Binoculars2_thumb.jpg",130,98,1);thumbnails[2695849]=new thumbnail(2695849,"170127","","Akpo Ground Exterior_thumb.jpg",91,130,1);thumbnails[2696835]=new thumbnail(2696835,"64534","","Re-fuel_thumb.jpg",130,85,1);thumbnails[4222535]=new thumbnail(4222535,"170127","","Jessica074_thumb.JPG",87,130,1);thumbnails[2835234]=new thumbnail(2835234,"170127","","Ross the Boss1_thumb.jpg",87,130,1);thumbnails[2696152]=new thumbnail(2696152,"170127","","Diving_thumb.jpg",87,130,1);thumbnails[652319]=new thumbnail(652319,"64534","","Yellow Cabs3_thumb.jpg",93,130,1);thumbnails[1299881]=new thumbnail(1299881,"64534","","night at nice_thumb.jpg",130,87,1);thumbnails[1324316]=new thumbnail(1324316,"64534","","montecarlo architecture_thumb.jpg",130,87,1);thumbnails[4222539]=new thumbnail(4222539,"170127","","Nicky_Yates44_thumb.JPG",130,87,1);thumbnails[1324320]=new thumbnail(1324320,"64534","","hermitage_thumb.jpg",130,89,1);thumbnails[1324458]=new thumbnail(1324458,"64534","","night bin_thumb.jpg",130,87,1);thumbnails[4222897]=new thumbnail(4222897,"64534","","Paul_Blackburn092_thumb.jpg",130,87,1);thumbnails[2696785]=new thumbnail(2696785,"170127","","Jo music poster_thumb.jpg",130,98,1);thumbnails[2696886]=new thumbnail(2696886,"64534","","The Voyuer2_thumb.jpg",130,90,1);thumbnails[765884]=new thumbnail(765884,"64534","","Chroma Car2_thumb.jpg",130,87,1);thumbnails[2696833]=new thumbnail(2696833,"170127","","scott013_thumb.jpg",130,87,1);thumbnails[4222532]=new thumbnail(4222532,"170127","","Jessica020_thumb.JPG",87,130,1);thumbnails[4231993]=new thumbnail(4231993,"64534","","the_birds_thumb.jpg",130,87,1);thumbnails[1250926]=new thumbnail(1250926,"64534","","Red Angel_thumb.jpg",130,87,1);thumbnails[1324540]=new thumbnail(1324540,"64534","","monaco tower_thumb.jpg",87,130,1);thumbnails[1325130]=new thumbnail(1325130,"64534","","arrow_thumb.jpg",130,87,1);thumbnails[2696865]=new thumbnail(2696865,"170127","","Nephu Huzzband_thumb.jpg",130,87,1);thumbnails[4222530]=new thumbnail(4222530,"170127","","Amy006_thumb.JPG",130,87,1);thumbnails[4222537]=new thumbnail(4222537,"170127","","Nicky_Yates28_thumb.JPG",87,130,1);thumbnails[4222871]=new thumbnail(4222871,"64534","","003_thumb.jpg",130,87,1);thumbnails[4232008]=new thumbnail(4232008,"170127","","IMG_2123-2_thumb.jpg",87,130,1);thumbnails[2751714]=new thumbnail(2751714,"64534","","ARPŠ Net Therapy026_thumb.JPG",130,87,1);thumbnails[1267117]=new thumbnail(1267117,"64534","","NYC block_thumb.jpg",130,98,1);thumbnails[608120]=new thumbnail(608120,"64534","","Brooklyn Lights_thumb.jpg",130,98,1);thumbnails[652431]=new thumbnail(652431,"170127","","Jo ESB_thumb.jpg",130,98,1);thumbnails[1327240]=new thumbnail(1327240,"64534","","learn direct1_thumb.jpg",130,88,1);thumbnails[2696802]=new thumbnail(2696802,"64534","","30 seconds in Paris II_thumb.jpg",130,83,1);thumbnails[1325243]=new thumbnail(1325243,"64534","","light_thumb.jpg",130,87,1);thumbnails[2696645]=new thumbnail(2696645,"170127","","hdr swimming 2_thumb.jpg",130,87,1);thumbnails[835278]=new thumbnail(835278,"64534","","Moulin-Rouge_thumb.gif",130,85,1);thumbnails[4231713]=new thumbnail(4231713,"64534","","Morning_Commute_thumb.jpg",130,130,1);thumbnails[835285]=new thumbnail(835285,"64534","","Sacracuer3_thumb.gif",130,88,1);thumbnails[2699684]=new thumbnail(2699684,"77164","","1st selection edited147_thumb.jpg",87,130,1);thumbnails[1034274]=new thumbnail(1034274,"77164","","Graham & Emma021_thumb.2.jpg",130,76,1);thumbnails[1034278]=new thumbnail(1034278,"77164","","Graham & Emma148_thumb.jpg",87,130,1);thumbnails[2704090]=new thumbnail(2704090,"77164","","Wedding165_thumb.jpg",130,108,1);thumbnails[1034279]=new thumbnail(1034279,"77164","","Graham & Emma106 copy_thumb.jpg",130,80,1);thumbnails[1034284]=new thumbnail(1034284,"77164","","Graham & Emma164_thumb.2.jpg",130,99,1);thumbnails[2696758]=new thumbnail(2696758,"77164","","1st selection edited128_thumb.jpg",130,91,1);thumbnails[2704055]=new thumbnail(2704055,"77164","","Graham & Michelle0167_thumb.jpg",130,87,1);thumbnails[2699570]=new thumbnail(2699570,"77164","","kathryn5_thumb.jpg",87,130,1);thumbnails[2703962]=new thumbnail(2703962,"77164","","edited colour_thumb.jpg",104,130,1);thumbnails[2704092]=new thumbnail(2704092,"77164","","Wedding191_thumb.jpg",130,118,1);thumbnails[4258488]=new thumbnail(4258488,"77164","","Lee__Claire056-2_thumb.jpg",130,130,2);thumbnails[1034286]=new thumbnail(1034286,"77164","","Graham & Emma225_thumb.jpg",130,96,1);thumbnails[1034289]=new thumbnail(1034289,"77164","","Graham & Emma248_thumb.6.jpg",130,94,1);thumbnails[2699696]=new thumbnail(2699696,"77164","","1st selection edited130_thumb.jpg",130,87,1);thumbnails[1034292]=new thumbnail(1034292,"77164","","Graham & Emma242_thumb.3.jpg",130,91,1);thumbnails[1034293]=new thumbnail(1034293,"77164","","Graham & Emma268_thumb.jpg",91,130,1);thumbnails[2704025]=new thumbnail(2704025,"77164","","Docks edited 2_thumb.jpg",130,87,1);var galleries=new Object();galleries[170127]=new gallery(170127,"4222539,4222535,4222532,4222530,2835234,2696865,2696833,2696785,2696152,2695849,652431","People","gallery",[2695849,4222535,2835234,2696152,4222539,2696785,2696833,4222532,2696865,4222530,4222537,4232008,652431,2696645]);galleries[64534]=new gallery(64534,"2696886,2696835,1325130,1324458,652373","Places","gallery",[652373,2696835,652319,1299881,1324316,1324320,1324458,4222897,2696886,765884,4231993,1250926,1324540,1325130,4222871,2751714,1267117,608120,1327240,2696802,1325243,835278,4231713,835285]);galleries[77164]=new gallery(77164,"2704055,2699696,2699684,2696758,1034279,1034278","Weddings","gallery",[2699684,1034274,1034278,2704090,1034279,1034284,2696758,2704055,2699570,2703962,2704092,4258488,1034286,1034289,2699696,1034292,1034293,2704025]);var imageSets=new Object();imageSets[1]="4231713,4222535,4222530,2696645,2696152,2695849,1324458,652431,652373";imageSets[2]="4222539,4222535,4222532,4222530,2835234,2704055,2699696,2699684,2696886,2696865,2696835,2696833,2696785,2696758,2696152,2695849,1325130,1324458,1034279,1034278,883672,652431,652373";imageSets[3]="4258488,4232008,4231993,4231713,4222897,4222871,4222539,4222537,4222535,4222532,4222530,2835234,2751719,2751714,2727023,2704092,2704090,2704055,2704025,2703962,2699696,2699684,2699570,2696886,2696865,2696835,2696833,2696802,2696785,2696758,2696645,2696152,2695849,1327240,1327236,1325340,1325243,1325130,1324540,1324458,1324441,1324320,1324316,1324249,1299881,1267117,1250926,1034293,1034292,1034289";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 1:b="http://www1.clikpic.com/lifestylephotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/lifestylephotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/lifestylephotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/lifestylephotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/lifestylephotography/images";break}switch(a){case 21:b="http://www6.clikpic.com/lifestylephotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/lifestylephotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/lifestylephotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/lifestylephotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/lifestylephotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/lifestylephotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/lifestylephotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/lifestylephotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/lifestylephotography/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("gallery"!=""){if(photos[imageID].galleries_id!=""){html+='<a href="'+photos[imageID].section_code+"_"+photos[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+photos[imageID].src+'" width="'+photos[imageID].width+'" height="'+photos[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+photos[imageID].caption+'" border="0">';if("gallery"!=""){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").text(photos[f].caption);document.title="Adrian Richardson Photography: "+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(){if(addItemToBasket(document.getElementById("paymentForm"))){if($.browser.msie){$("#paymentConfirm").show()}else{$("#paymentConfirm").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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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];var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}else{}}if(c.item_price!==""||c.payment_groups_id!==""){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.parent(".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=photos[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};