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[1541661]=new thumbnail(1541661,"93981","","DSC019242_thumb.JPG",130,98,1);thumbnails[1541676]=new thumbnail(1541676,"93981","","_MG_4888_thumb.jpg",130,195,1);thumbnails[1541682]=new thumbnail(1541682,"93981","","IMG_4864_thumb.jpg",130,195,1);thumbnails[1543646]=new thumbnail(1543646,"93981","","IMG_4951_thumb.jpg",130,195,1);thumbnails[1543686]=new thumbnail(1543686,"93981","","IMG_5022_thumb.jpg",130,195,1);thumbnails[1544078]=new thumbnail(1544078,"93981","","_MG_5153_thumb.jpg",130,195,1);thumbnails[1544088]=new thumbnail(1544088,"93981","","IMG_5172_thumb.jpg",130,195,1);thumbnails[1544112]=new thumbnail(1544112,"93981","","IMG_5173_thumb.jpg",130,195,1);thumbnails[1544117]=new thumbnail(1544117,"93981","","IMG_5183_thumb.jpg",130,195,1);thumbnails[1544120]=new thumbnail(1544120,"93981","","IMG_5190_thumb.jpg",130,195,1);thumbnails[1544123]=new thumbnail(1544123,"93981","","IMG_5194_thumb.jpg",130,195,1);thumbnails[1544172]=new thumbnail(1544172,"93981","","IMG_5257_thumb.jpg",130,195,1);thumbnails[1544180]=new thumbnail(1544180,"93981","","_MG_5288_thumb.jpg",130,195,1);thumbnails[1544196]=new thumbnail(1544196,"93981","","_MG_5291_thumb.jpg",130,195,1);thumbnails[1544726]=new thumbnail(1544726,"93981","","IMG_5319_thumb.jpg",130,195,1);thumbnails[1544730]=new thumbnail(1544730,"93981","","IMG_5328_thumb.jpg",130,195,1);thumbnails[1544796]=new thumbnail(1544796,"93981","","_MG_5389_thumb.jpg",130,195,1);thumbnails[1544808]=new thumbnail(1544808,"93981","","_MG_5520_thumb.jpg",130,195,1);thumbnails[1544813]=new thumbnail(1544813,"93981","","_MG_5531_thumb.jpg",130,195,1);thumbnails[1544818]=new thumbnail(1544818,"93981","","_MG_5533_thumb.jpg",130,195,1);thumbnails[1544820]=new thumbnail(1544820,"93981","","_MG_5534_thumb.jpg",130,195,1);thumbnails[1544923]=new thumbnail(1544923,"","","IMG_5065_thumb.jpg",130,195,1);thumbnails[1672760]=new thumbnail(1672760,"112847","","4754_thumb.jpg",130,163,1);thumbnails[1672763]=new thumbnail(1672763,"112847","","45281_thumb.jpg",130,163,1);thumbnails[1672766]=new thumbnail(1672766,"112847","","4817_thumb.jpg",130,163,1);thumbnails[1672780]=new thumbnail(1672780,"112847","","4791_thumb.jpg",130,163,1);thumbnails[1673104]=new thumbnail(1673104,"112847","","4823_thumb.jpg",130,163,1);thumbnails[1673105]=new thumbnail(1673105,"112847","","4840_thumb.jpg",130,163,1);thumbnails[1673106]=new thumbnail(1673106,"112847","","43991_thumb.jpg",130,163,1);thumbnails[1673111]=new thumbnail(1673111,"112847","","47631_thumb.jpg",130,163,1);thumbnails[1673166]=new thumbnail(1673166,"112874","","_MG_4163_thumb.jpg",130,195,1);thumbnails[1673171]=new thumbnail(1673171,"112874","","IMG_4223_thumb.jpg",130,87,1);thumbnails[1673177]=new thumbnail(1673177,"112874","","IMG_4229_thumb.jpg",130,195,1);thumbnails[1673178]=new thumbnail(1673178,"112874","","IMG_4232_thumb.jpg",130,195,1);thumbnails[1673181]=new thumbnail(1673181,"112874","","IMG_4183_thumb.jpg",130,195,1);thumbnails[1673182]=new thumbnail(1673182,"112874","","_MG_4323_thumb.jpg",130,195,1);thumbnails[1673183]=new thumbnail(1673183,"112874","","_MG_4774_thumb.jpg",130,195,1);thumbnails[1673186]=new thumbnail(1673186,"112874","","IMG_4387_thumb.jpg",130,195,1);thumbnails[1673189]=new thumbnail(1673189,"112874","","_MG_4683_thumb.jpg",130,195,1);thumbnails[1673198]=new thumbnail(1673198,"","","_MG_4149_thumb.jpg",130,195,1);thumbnails[1673199]=new thumbnail(1673199,"112874","","_MG_4564_thumb.jpg",130,195,1);thumbnails[1673205]=new thumbnail(1673205,"112874","","_MG_41471_thumb.jpg",130,195,1);thumbnails[1673206]=new thumbnail(1673206,"112874","","_MG_41491_thumb.jpg",130,195,1);thumbnails[1699967]=new thumbnail(1699967,"113097","","DSC019241_thumb.JPG",130,98,1);thumbnails[1699969]=new thumbnail(1699969,"113097","","DSC01928_thumb.JPG",130,173,1);thumbnails[1699971]=new thumbnail(1699971,"113097","","DSC01933_thumb.JPG",130,173,1);thumbnails[1699972]=new thumbnail(1699972,"113097","","DSC01938_thumb.JPG",130,98,1);thumbnails[1699974]=new thumbnail(1699974,"113097","","DSC01922_thumb.JPG",130,173,1);thumbnails[1699976]=new thumbnail(1699976,"113097","","DSC01892_thumb.JPG",130,173,1);thumbnails[1699983]=new thumbnail(1699983,"113097","","DSC01919_thumb.JPG",130,173,1);thumbnails[1699989]=new thumbnail(1699989,"113097","","DSC01911_thumb.JPG",130,173,1);thumbnails[1700024]=new thumbnail(1700024,"114339","","fade_thumb.JPG",130,167,1);thumbnails[1700026]=new thumbnail(1700026,"114339","","laugh1_thumb.JPG",130,165,1);thumbnails[1700031]=new thumbnail(1700031,"114339","","laugh2_thumb.JPG",130,165,1);thumbnails[1700032]=new thumbnail(1700032,"114339","","laugh3_thumb.JPG",130,165,1);thumbnails[1700034]=new thumbnail(1700034,"114339","","laugh4_thumb.JPG",130,165,1);thumbnails[1700037]=new thumbnail(1700037,"114339","","pg130_thumb.JPG",130,102,1);thumbnails[1700038]=new thumbnail(1700038,"114339","","pg100_thumb.JPG",130,165,1);thumbnails[1700039]=new thumbnail(1700039,"114339","","pg120_thumb.JPG",130,165,1);thumbnails[1700040]=new thumbnail(1700040,"114339","","IMG_9262_thumb.JPG",130,195,1);thumbnails[1700053]=new thumbnail(1700053,"114339","","18_thumb.JPG",130,165,1);thumbnails[1700059]=new thumbnail(1700059,"114344","","pg4_thumb.JPG",130,195,1);thumbnails[1700072]=new thumbnail(1700072,"114344","","pg6_thumb.JPG",130,195,1);thumbnails[1700073]=new thumbnail(1700073,"114344","","pg14_thumb.JPG",130,195,1);thumbnails[1700077]=new thumbnail(1700077,"114344","","pg31_thumb.JPG",130,195,1);thumbnails[1700080]=new thumbnail(1700080,"114344","","pg21_thumb.JPG",130,195,1);thumbnails[1700087]=new thumbnail(1700087,"114346","","_dsc0020_std_thumb.JPG",130,192,1);thumbnails[1700089]=new thumbnail(1700089,"114346","","_dsc0015_std1_thumb.JPG",130,105,1);thumbnails[1700090]=new thumbnail(1700090,"114346","","2_thumb.JPG",130,160,1);thumbnails[1700093]=new thumbnail(1700093,"114346","","dsc_5107_std_thumb.JPG",130,160,1);thumbnails[1700095]=new thumbnail(1700095,"114346","","dsc_5122_std_thumb.JPG",130,105,1);thumbnails[1700097]=new thumbnail(1700097,"114346","","dsc_5176_std_thumb.JPG",130,104,1);thumbnails[1700100]=new thumbnail(1700100,"114346","","4527_thumb.JPG",130,163,1);thumbnails[1700104]=new thumbnail(1700104,"114346","","45282_thumb.JPG",130,163,1);thumbnails[1700105]=new thumbnail(1700105,"114346","","4662_thumb.JPG",130,163,1);thumbnails[1700238]=new thumbnail(1700238,"114346","","4664_thumb.JPG",130,163,1);thumbnails[1700239]=new thumbnail(1700239,"114346","","48431_thumb.JPG",130,163,1);thumbnails[1700248]=new thumbnail(1700248,"114350","","3219_thumb.JPG",130,195,1);thumbnails[1700249]=new thumbnail(1700249,"114350","","3220_thumb.JPG",130,195,1);thumbnails[1700252]=new thumbnail(1700252,"114350","","3221_thumb.JPG",130,195,1);thumbnails[1700255]=new thumbnail(1700255,"114350","","32211_thumb.JPG",130,195,1);thumbnails[1700258]=new thumbnail(1700258,"114350","","3222_thumb.JPG",130,195,1);thumbnails[1700259]=new thumbnail(1700259,"114350","","3223_thumb.JPG",130,195,1);thumbnails[1700260]=new thumbnail(1700260,"114350","","3229_thumb.JPG",130,195,1);thumbnails[1700261]=new thumbnail(1700261,"114350","","3260_thumb.JPG",130,195,1);thumbnails[1700263]=new thumbnail(1700263,"114350","","3272_thumb.JPG",130,195,1);thumbnails[1700264]=new thumbnail(1700264,"114350","","3296_thumb.JPG",130,195,1);thumbnails[1700265]=new thumbnail(1700265,"114350","","3318_thumb.JPG",130,86,1);thumbnails[1700266]=new thumbnail(1700266,"114350","","3494_thumb.JPG",130,195,1);thumbnails[1700267]=new thumbnail(1700267,"114350","","3501_thumb.JPG",130,195,1);thumbnails[1700268]=new thumbnail(1700268,"114350","","3519_thumb.JPG",130,195,1);thumbnails[1700269]=new thumbnail(1700269,"114350","","3531_thumb.JPG",130,195,1);thumbnails[1700271]=new thumbnail(1700271,"114350","","3536_thumb.JPG",130,195,1);thumbnails[1700273]=new thumbnail(1700273,"114350","","3541_thumb.JPG",130,195,1);thumbnails[1700274]=new thumbnail(1700274,"114353","","27_thumb.JPG",130,196,1);thumbnails[1700276]=new thumbnail(1700276,"114353","","DSC01217_thumb.JPG",130,132,1);thumbnails[1700278]=new thumbnail(1700278,"114353","","DSC01224_thumb.JPG",130,135,1);thumbnails[1700280]=new thumbnail(1700280,"114353","","DSC01245_thumb.JPG",130,120,1);thumbnails[1700281]=new thumbnail(1700281,"114353","","DSC01249_thumb.JPG",130,173,1);thumbnails[1700282]=new thumbnail(1700282,"114353","","DSC01252_thumb.JPG",130,173,1);thumbnails[6318652]=new thumbnail(6318652,"349666","","IMG_9452_thumb.jpg",130,194,1);thumbnails[6318656]=new thumbnail(6318656,"349666","","IMG_94421_thumb.jpg",130,194,1);thumbnails[6318659]=new thumbnail(6318659,"349666","","IMG_9367_thumb.jpg",130,194,1);thumbnails[6318674]=new thumbnail(6318674,"349666","","IMG_9664_thumb.jpg",130,194,1);thumbnails[6318693]=new thumbnail(6318693,"349666","","IMG_9815_thumb.jpg",130,194,1);thumbnails[6318695]=new thumbnail(6318695,"349666","","IMG_9829_thumb.jpg",130,194,1);thumbnails[6318699]=new thumbnail(6318699,"349666","","IMG_9845_thumb.jpg",130,194,1);thumbnails[6318703]=new thumbnail(6318703,"349666","","IMG_9848_thumb.jpg",130,194,1);thumbnails[6318707]=new thumbnail(6318707,"349666","","IMG_9854_thumb.jpg",130,194,1);thumbnails[6318708]=new thumbnail(6318708,"349666","","IMG_9871_thumb.jpg",130,194,1);thumbnails[6318709]=new thumbnail(6318709,"349666","","IMG_9573_thumb.jpg",130,194,1);thumbnails[6318712]=new thumbnail(6318712,"349666","","IMG_9601_thumb.jpg",130,194,1);thumbnails[6318713]=new thumbnail(6318713,"349666","","_MG_9707_thumb.jpg",130,194,1);thumbnails[6318748]=new thumbnail(6318748,"349666","","_MG_9674_thumb.jpg",130,194,1);thumbnails[6318750]=new thumbnail(6318750,"349666","","_MG_9675_thumb.jpg",130,194,1);thumbnails[6318754]=new thumbnail(6318754,"349666","","_MG_9688_thumb.jpg",130,194,1);thumbnails[6318756]=new thumbnail(6318756,"349666","","_MG_9694_thumb.jpg",130,194,1);thumbnails[6318759]=new thumbnail(6318759,"349666","","_MG_9701_thumb.jpg",130,194,1);thumbnails[6318762]=new thumbnail(6318762,"349666","","_MG_9723_thumb.jpg",130,194,1);thumbnails[6318766]=new thumbnail(6318766,"349666","","_MG_9835_thumb.jpg",130,87,1);thumbnails[6318769]=new thumbnail(6318769,"349666","","IMG_9896_thumb.jpg",130,194,1);thumbnails[6318770]=new thumbnail(6318770,"349666","","IMG_9987_thumb.jpg",130,194,1);thumbnails[6318779]=new thumbnail(6318779,"349666","","_MG_96351_thumb.jpg",130,87,1);thumbnails[4629676]=new thumbnail(4629676,"267274","","IMG_8197_thumb.jpg",130,193,1);thumbnails[4629679]=new thumbnail(4629679,"267274","","IMG_8198_thumb.jpg",130,194,1);thumbnails[4629683]=new thumbnail(4629683,"267274","","IMG_8199_thumb.jpg",130,194,1);thumbnails[4629705]=new thumbnail(4629705,"267274","","IMG_8243_thumb.jpg",130,194,1);thumbnails[4629715]=new thumbnail(4629715,"267274","","IMG_8244_thumb.jpg",130,194,1);thumbnails[4629718]=new thumbnail(4629718,"267274","","IMG_8245_thumb.jpg",130,194,1);thumbnails[4629719]=new thumbnail(4629719,"267274","","IMG_8247_thumb.jpg",130,194,1);thumbnails[4629720]=new thumbnail(4629720,"267274","","IMG_8252_thumb.jpg",130,194,1);thumbnails[4629723]=new thumbnail(4629723,"267274","","_MG_82581_thumb.jpg",130,194,1);thumbnails[4629725]=new thumbnail(4629725,"267274","","IMG_8298_thumb.jpg",130,194,1);thumbnails[4629726]=new thumbnail(4629726,"267274","","IMG_8336_thumb.jpg",130,194,1);thumbnails[4629730]=new thumbnail(4629730,"267274","","IMG_8505_thumb.jpg",130,194,1);thumbnails[4629732]=new thumbnail(4629732,"267274","","IMG_8510_thumb.jpg",130,194,1);thumbnails[4629737]=new thumbnail(4629737,"267274","","IMG_8511_thumb.jpg",130,194,1);thumbnails[4629804]=new thumbnail(4629804,"267274","","_MG_8738_thumb.jpg",130,85,1);thumbnails[4629805]=new thumbnail(4629805,"267274","","_MG_8745_thumb.jpg",130,194,1);var galleries=new Object();galleries[93981]=new gallery(93981,"1544820,1544818,1544813,1544808,1544796,1544730,1544726,1544196,1544180,1544172","Galleries 1","gallery",[1541661,1541676,1541682,1543646,1543686,1544078,1544088,1544112,1544117,1544120,1544123,1544172,1544180,1544196,1544726,1544730,1544796,1544808,1544813,1544818,1544820]);galleries[112847]=new gallery(112847,"1673111,1673106,1673105,1673104,1672780,1672766,1672763,1672760","Galleries 2","gallery",[1672760,1672763,1672766,1672780,1673104,1673105,1673106,1673111]);galleries[112874]=new gallery(112874,"1673206,1673205,1673199,1673189,1673186,1673183,1673182,1673181,1673178,1673177","galleries 3","gallery",[1673166,1673171,1673177,1673178,1673181,1673182,1673183,1673186,1673189,1673199,1673205,1673206]);galleries[113097]=new gallery(113097,"1699989,1699983,1699976,1699974,1699972,1699971,1699969,1699967","galleries 4","gallery",[1699967,1699969,1699971,1699972,1699974,1699976,1699983,1699989]);galleries[114339]=new gallery(114339,"1700053,1700040,1700039,1700038,1700037,1700034,1700032,1700031,1700026,1700024","Galleries 5","gallery",[1700024,1700026,1700031,1700032,1700034,1700037,1700038,1700039,1700040,1700053]);galleries[114344]=new gallery(114344,"1700080,1700077,1700073,1700072,1700059","Galleries 6","gallery",[1700059,1700072,1700073,1700077,1700080]);galleries[114346]=new gallery(114346,"1700239,1700238,1700105,1700104,1700100,1700097,1700095,1700093,1700090,1700089","Galleries 7","gallery",[1700087,1700089,1700090,1700093,1700095,1700097,1700100,1700104,1700105,1700238,1700239]);galleries[114350]=new gallery(114350,"1700273,1700271,1700269,1700268,1700267,1700266,1700265,1700264,1700263,1700261","Galleries 8","gallery",[1700248,1700249,1700252,1700255,1700258,1700259,1700260,1700261,1700263,1700264,1700265,1700266,1700267,1700268,1700269,1700271,1700273]);galleries[114353]=new gallery(114353,"1700282,1700281,1700280,1700278,1700276,1700274","Galleries 9","gallery",[1700274,1700276,1700278,1700280,1700281,1700282]);galleries[349666]=new gallery(349666,"6318779,6318770,6318769,6318766,6318762,6318759,6318756,6318754,6318750,6318748","Gallery 11","gallery",[6318652,6318656,6318659,6318674,6318693,6318695,6318699,6318703,6318707,6318708,6318709,6318712,6318713,6318748,6318750,6318754,6318756,6318759,6318762,6318766,6318769,6318770,6318779]);galleries[267274]=new gallery(267274,"4629805,4629804,4629737,4629732,4629730,4629726,4629725,4629723,4629720,4629719","gallery 10 black and white","gallery",[4629676,4629679,4629683,4629705,4629715,4629718,4629719,4629720,4629723,4629725,4629726,4629730,4629732,4629737,4629804,4629805]);var imageSets=new Object();imageSets[1]="6318779,6318770,6318769,6318766,6318762,6318759,6318756,6318754,6318750,6318748,6318713,6318712,6318709,6318708,6318707,6318703,6318699,6318695,6318693,6318674,6318659,6318656,6318652,4629805,4629804,4629737,4629732,4629730,4629726,4629725,4629723,4629720,4629719,4629718,4629715,4629705,4629683,4629679,4629676,1700282,1700281,1700280,1700278,1700276,1700274,1700273,1700271,1700269,1700268,1700267";imageSets[3]="6318779,6318770,6318769,6318766,6318762,6318759,6318756,6318754,6318750,6318748,6318713,6318712,6318709,6318708,6318707,6318703,6318699,6318695,6318693,6318674,6318659,6318656,6318652,4629805,4629804,4629737,4629732,4629730,4629726,4629725,4629723,4629720,4629719,4629718,4629715,4629705,4629683,4629679,4629676,1700282,1700281,1700280,1700278,1700276,1700274,1700273,1700271,1700269,1700268,1700267";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 21:b="http://www6.clikpic.com/reehalharjinder/images";break}switch(a){case 1:b="http://www1.clikpic.com/reehalharjinder/images";break}switch(a){case 2:b="http://admin.clikpic.com/reehalharjinder/images";break}switch(a){case 24:b="http://tpc15/clikpic/reehalharjinder/images";break}switch(a){case 4:b="http://www.clikchurch.com/reehalharjinder/images";break}switch(a){case 5:b="http://www2.clikpic.com/reehalharjinder/images";break}switch(a){case 22:b="http://tpc5/clikpic/reehalharjinder/images";break}switch(a){case 23:b="http://tpc10/clikpic/reehalharjinder/images";break}switch(a){case 25:b="http://tpc16/clikpic/reehalharjinder/images";break}switch(a){case 15:b="http://www3.clikpic.com/reehalharjinder/images";break}switch(a){case 18:b="http://www4.clikpic.com/reehalharjinder/images";break}switch(a){case 19:b="http://www5.clikpic.com/reehalharjinder/images";break}switch(a){case 31:b="http://www7.clikpic.com/reehalharjinder/images";break}switch(a){case 32:b="http://admin2.clikpic.com/reehalharjinder/images";break}switch(a){case 33:b="http://www8.clikpic.com/reehalharjinder/images";break}switch(a){case 34:b="http://www9.clikpic.com/reehalharjinder/images";break}switch(a){case 35:b="http://admin3.clikpic.com/reehalharjinder/images";break}switch(a){case 37:b="http://admin4.clikpic.com/reehalharjinder/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(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+escape(backgrounds[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").html(photos[f].caption);document.title="Wedding Photography Bristol, Bath and Avon: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="H.Reehal@yahoo.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="H.Reehal@yahoo.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+'")'})}}};