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[6123887]=new thumbnail(6123887,"343223","","bs_bd_clair_thumb.jpg",64,64,18);thumbnails[6123889]=new thumbnail(6123889,"343223","","bs_bd_jen_thumb.jpg",64,64,18);thumbnails[6123890]=new thumbnail(6123890,"343223","","bs_bd_molly_thumb.jpg",64,64,18);thumbnails[6123891]=new thumbnail(6123891,"343223","","bs_bd_portia_thumb.jpg",64,64,18);thumbnails[6123892]=new thumbnail(6123892,"343223","","bs_bd_series_small_thumb.jpg",64,64,18);thumbnails[4664736]=new thumbnail(4664736,"268623","","bs_steph_1_thumb.jpg",64,64,18);thumbnails[4666663]=new thumbnail(4666663,"269030","","bs_driftwood_21_thumb.jpg",64,64,18);thumbnails[4706204]=new thumbnail(4706204,"269030","","bs_pilings_4_thumb.jpg",64,64,18);thumbnails[4666669]=new thumbnail(4666669,"269030","","bs_pilings_3_thumb.jpg",64,64,18);thumbnails[4664848]=new thumbnail(4664848,"268623","","bs_ry_1_thumb.jpg",64,64,18);thumbnails[4666672]=new thumbnail(4666672,"269030","","bs_wc_estuary_2_thumb.jpg",64,64,18);thumbnails[4664875]=new thumbnail(4664875,"268623","","bs_steph_2_thumb.jpg",64,64,18);thumbnails[4664878]=new thumbnail(4664878,"268623","","bs_steph_3_thumb.jpg",64,64,18);thumbnails[4666674]=new thumbnail(4666674,"269030","","bs_wc_berm_2_thumb.jpg",64,64,18);thumbnails[4748468]=new thumbnail(4748468,"269030","","bs_wall_berm_thumb.jpg",64,64,18);thumbnails[4712602]=new thumbnail(4712602,"269030","","bs_stump_1_thumb.jpg",64,64,18);thumbnails[4664881]=new thumbnail(4664881,"268623","","bs_ry_steph_thumb.jpg",64,64,18);thumbnails[4666681]=new thumbnail(4666681,"269030","","bs_wcwaves_1_thumb.jpg",64,64,18);thumbnails[4712605]=new thumbnail(4712605,"269030","","bs_driftwood_3_thumb.jpg",64,64,18);thumbnails[4666687]=new thumbnail(4666687,"269030","","bs_gimme_shelter_thumb.jpg",64,64,18);thumbnails[4706205]=new thumbnail(4706205,"269030","","bs_wcrocks_1_thumb.jpg",64,64,18);thumbnails[5151167]=new thumbnail(5151167,"291096","","bs_storm_rocks_3_thumb.jpg",64,64,18);thumbnails[5151170]=new thumbnail(5151170,"291096","","bs_storm_bw1_thumb.jpg",64,64,18);thumbnails[5151171]=new thumbnail(5151171,"291096","","bs_storm_bw2_thumb.jpg",64,64,18);thumbnails[5151172]=new thumbnail(5151172,"291096","","bs_storm_bw3_thumb.jpg",64,64,18);thumbnails[5151174]=new thumbnail(5151174,"291096","","bs_storm_rocks_1_thumb.jpg",64,64,18);thumbnails[5151177]=new thumbnail(5151177,"291096","","bs_log_collection_1_thumb.jpg",64,64,18);thumbnails[5151182]=new thumbnail(5151182,"291096","","bs_log_collection_3_thumb.jpg",64,64,18);thumbnails[4665451]=new thumbnail(4665451,"268661","","bs_jen_1_thumb.jpg",64,64,18);thumbnails[4665463]=new thumbnail(4665463,"268661","","bs_jen_5_thumb.jpg",64,64,18);thumbnails[4665464]=new thumbnail(4665464,"268661","","bs_jen_3_thumb.jpg",64,64,18);thumbnails[4665472]=new thumbnail(4665472,"268661","","bs_jen_4_thumb.jpg",64,64,18);thumbnails[4665483]=new thumbnail(4665483,"268661","","bs_jen_2_thumb.jpg",64,64,18);thumbnails[4665488]=new thumbnail(4665488,"268661","","bs_jen_6_thumb.jpg",64,64,18);thumbnails[4668456]=new thumbnail(4668456,"269127","","bs_larrie_4_thumb.jpg",64,64,18);thumbnails[4668457]=new thumbnail(4668457,"269127","","bs_larrie_1_thumb.jpg",64,64,18);thumbnails[4668458]=new thumbnail(4668458,"269127","","bs_larrie_7_thumb.jpg",64,64,18);thumbnails[4668459]=new thumbnail(4668459,"269127","","bs_larrie_3_thumb.jpg",64,64,18);thumbnails[4668460]=new thumbnail(4668460,"269127","","bs_larrie_5_thumb.jpg",64,64,18);thumbnails[4668461]=new thumbnail(4668461,"269127","","bs_larrie_2a2_thumb.jpg",64,64,18);thumbnails[4668462]=new thumbnail(4668462,"269127","","bs_larrie_6_thumb.jpg",64,64,18);thumbnails[4664900]=new thumbnail(4664900,"268662","","bs_matt_3_thumb.jpg",64,64,18);thumbnails[4664925]=new thumbnail(4664925,"268662","","bs_matt_4_thumb.jpg",64,64,18);thumbnails[4664928]=new thumbnail(4664928,"268662","","bs_matt_2_thumb.jpg",64,64,18);thumbnails[4665103]=new thumbnail(4665103,"268662","","bs_matt_5_thumb.jpg",64,64,18);thumbnails[4665130]=new thumbnail(4665130,"268662","","bs_matt_1_thumb.jpg",64,64,18);thumbnails[4693717]=new thumbnail(4693717,"270050","","bs_la_11_thumb.jpg",64,64,18);thumbnails[4693718]=new thumbnail(4693718,"270050","","bs_la_2_thumb.jpg",64,64,18);thumbnails[4693716]=new thumbnail(4693716,"270050","","bs_la_5_thumb.jpg",64,64,18);thumbnails[4693720]=new thumbnail(4693720,"270050","","bs_la_42_thumb.jpg",64,64,18);thumbnails[4693719]=new thumbnail(4693719,"270050","","bs_la_3_thumb.jpg",64,64,18);thumbnails[4814189]=new thumbnail(4814189,"275152","","bs_mich_3_thumb.jpg",64,64,18);thumbnails[4814183]=new thumbnail(4814183,"275152","","bs_mich_6_thumb.jpg",64,64,18);thumbnails[4814185]=new thumbnail(4814185,"275152","","bs_mich_4_thumb.jpg",64,64,18);thumbnails[4814186]=new thumbnail(4814186,"275152","","bs_mich_1_thumb.jpg",64,64,18);thumbnails[4814187]=new thumbnail(4814187,"275152","","bs_mich_5_thumb.jpg",64,64,18);thumbnails[4814188]=new thumbnail(4814188,"275152","","bs_mich_2_thumb.jpg",64,64,18);thumbnails[4668470]=new thumbnail(4668470,"269032","","bs_lily_1_thumb.jpg",64,64,18);thumbnails[4901679]=new thumbnail(4901679,"279362","","bs_chris_1_thumb.jpg",64,64,18);thumbnails[4901703]=new thumbnail(4901703,"279362","","bs_chris_3_thumb.jpg",64,64,18);thumbnails[5198593]=new thumbnail(5198593,"269032","","bs_sunflower_3_thumb.jpg",64,64,18);thumbnails[5198594]=new thumbnail(5198594,"269032","","bs_sunflower_2_thumb.jpg",64,64,18);thumbnails[5198595]=new thumbnail(5198595,"269032","","bs_sunflower_21_thumb.jpg",64,64,18);thumbnails[5198596]=new thumbnail(5198596,"269032","","bs_sunflower_1_thumb.jpg",64,64,18);thumbnails[4668471]=new thumbnail(4668471,"269032","","bs_hollyhock_1_thumb.jpg",64,64,18);thumbnails[4901692]=new thumbnail(4901692,"279362","","bs_chris_2_thumb.jpg",64,64,18);thumbnails[4668472]=new thumbnail(4668472,"269032","","bs_lily_2_thumb.jpg",64,64,18);thumbnails[4668473]=new thumbnail(4668473,"269032","","bs_stargazer_1_thumb.jpg",64,64,18);thumbnails[4901706]=new thumbnail(4901706,"279362","","bs_chris_6_thumb.jpg",64,64,18);thumbnails[4901708]=new thumbnail(4901708,"279362","","bs_chris_5_thumb.jpg",64,64,18);thumbnails[4668474]=new thumbnail(4668474,"269032","","bs_root_1_thumb.jpg",64,64,18);thumbnails[4901712]=new thumbnail(4901712,"279362","","bs_chris_4_thumb.jpg",64,64,18);thumbnails[4901716]=new thumbnail(4901716,"279362","","bs_chris_7_thumb.jpg",64,64,18);thumbnails[5023933]=new thumbnail(5023933,"284544","","bs_les_1_thumb.jpg",64,64,18);thumbnails[5023935]=new thumbnail(5023935,"284544","","bs_les_2_thumb.jpg",64,64,18);thumbnails[5023936]=new thumbnail(5023936,"284544","","bs_les_3_thumb.jpg",64,64,18);thumbnails[5023937]=new thumbnail(5023937,"284544","","bs_les_4_thumb.jpg",64,64,18);thumbnails[5023938]=new thumbnail(5023938,"284544","","bs_les_5_thumb.jpg",64,64,18);thumbnails[5198607]=new thumbnail(5198607,"293572","","bs_portia_1_thumb.jpg",64,64,18);thumbnails[5198619]=new thumbnail(5198619,"293572","","bs_portia_8_thumb.jpg",64,64,18);thumbnails[5198625]=new thumbnail(5198625,"293572","","bs_portia_5_thumb.jpg",64,64,18);thumbnails[5198626]=new thumbnail(5198626,"293572","","bs_portia_6_thumb.jpg",64,64,18);thumbnails[5198635]=new thumbnail(5198635,"293572","","bs_portia_2a_thumb.jpg",64,64,18);thumbnails[5517507]=new thumbnail(5517507,"317740","","bs_portia_14_thumb.jpg",64,64,18);thumbnails[5517511]=new thumbnail(5517511,"317740","","bs_portia_10_thumb.jpg",64,64,18);thumbnails[5517510]=new thumbnail(5517510,"317740","","bs_portia_11_thumb.jpg",64,64,18);thumbnails[5517509]=new thumbnail(5517509,"317740","","bs_portia_12_thumb.jpg",64,64,18);thumbnails[5517508]=new thumbnail(5517508,"317740","","bs_portia_13_thumb.jpg",64,64,18);thumbnails[5198597]=new thumbnail(5198597,"293573","","bs_sarah_5_thumb.jpg",64,64,18);thumbnails[5198598]=new thumbnail(5198598,"293573","","bs_sarah_1_thumb.jpg",64,64,18);thumbnails[5198599]=new thumbnail(5198599,"293573","","bs_sarah_3_thumb.jpg",64,64,18);thumbnails[5198600]=new thumbnail(5198600,"293573","","bs_sarah_4_thumb.jpg",64,64,18);thumbnails[5198601]=new thumbnail(5198601,"293573","","bs_sarah_8_thumb.jpg",64,64,18);thumbnails[5319542]=new thumbnail(5319542,"299491","","bs_molly_6_thumb.jpg",64,64,18);thumbnails[5319587]=new thumbnail(5319587,"299491","","bs_molly_4_thumb.jpg",64,64,18);thumbnails[5319595]=new thumbnail(5319595,"299491","","bs_molly_2_thumb.jpg",64,64,18);thumbnails[5319598]=new thumbnail(5319598,"299491","","bs_molly_7_thumb.jpg",64,64,18);thumbnails[5319604]=new thumbnail(5319604,"299491","","bs_molly_8_thumb.jpg",64,64,18);thumbnails[5319607]=new thumbnail(5319607,"299491","","bs_molly_3_thumb.jpg",64,64,18);thumbnails[5319612]=new thumbnail(5319612,"299491","","bs_molly_5_thumb.jpg",64,64,18);thumbnails[5319617]=new thumbnail(5319617,"299491","","bs_molly_1_thumb.jpg",61,64,18);thumbnails[5601556]=new thumbnail(5601556,"317741","","bs_molly_9_thumb.jpg",64,64,18);thumbnails[5601558]=new thumbnail(5601558,"317741","","bs_molly_10_thumb.jpg",64,64,18);thumbnails[5601560]=new thumbnail(5601560,"317741","","bs_molly_11_thumb.jpg",64,64,18);thumbnails[5601563]=new thumbnail(5601563,"317741","","bs_molly_12_thumb.jpg",64,64,18);thumbnails[5601565]=new thumbnail(5601565,"317741","","bs_molly_13_thumb.jpg",64,64,18);thumbnails[5601567]=new thumbnail(5601567,"317741","","bs_molly_14_thumb.jpg",64,64,18);thumbnails[5601569]=new thumbnail(5601569,"317741","","bs_molly_15_thumb.jpg",64,64,18);thumbnails[5661135]=new thumbnail(5661135,"320680","","bs_roey_border_thumb.jpg",64,64,18);thumbnails[5661134]=new thumbnail(5661134,"320680","","bs_roey_4_thumb.jpg",64,64,18);thumbnails[5661138]=new thumbnail(5661138,"320680","","bs_roey_7_thumb.jpg",64,64,18);thumbnails[5661139]=new thumbnail(5661139,"320680","","bs_roey_8_thumb.jpg",64,64,18);thumbnails[5661140]=new thumbnail(5661140,"320680","","bs_roey_9_thumb.jpg",64,64,18);thumbnails[5661141]=new thumbnail(5661141,"320680","","bs_roey_leore_bw_thumb.jpg",64,64,18);thumbnails[5735980]=new thumbnail(5735980,"324987","","bs_leore_1_thumb.jpg",64,64,18);thumbnails[5735982]=new thumbnail(5735982,"324987","","bs_leore_3_thumb.jpg",64,64,18);thumbnails[5735983]=new thumbnail(5735983,"324987","","bs_leore_4_thumb.jpg",64,64,18);thumbnails[5735984]=new thumbnail(5735984,"324987","","bs_leore_5_thumb.jpg",64,64,18);thumbnails[5735985]=new thumbnail(5735985,"324987","","bs_leore_6_thumb.jpg",64,64,18);thumbnails[5735986]=new thumbnail(5735986,"324987","","bs_leore_10_thumb.jpg",64,64,18);thumbnails[5735987]=new thumbnail(5735987,"324987","","bs_leore_11_thumb.jpg",64,64,18);thumbnails[5867859]=new thumbnail(5867859,"331576","","bs_chrisdrum_1_thumb.jpg",64,64,18);thumbnails[5867860]=new thumbnail(5867860,"331576","","bs_chrisdrum_2_thumb.jpg",64,64,18);thumbnails[5867865]=new thumbnail(5867865,"331576","","bs_chrisdrum_4_thumb.jpg",64,64,18);thumbnails[5867867]=new thumbnail(5867867,"331576","","bs_chrisdrum_6_thumb.jpg",64,64,18);thumbnails[5867899]=new thumbnail(5867899,"331576","","bs_chrisdrum_7_thumb.jpg",64,64,18);thumbnails[5867907]=new thumbnail(5867907,"331576","","bs_chrisdrum_bw2_thumb.jpg",45,64,18);thumbnails[4953663]=new thumbnail(4953663,"281747","","bs_tt_1_thumb.jpg",64,64,18);thumbnails[4953664]=new thumbnail(4953664,"281747","","bs_turkish_1_thumb.jpg",64,64,18);thumbnails[4953665]=new thumbnail(4953665,"281747","","bs_tango_2_thumb.jpg",64,64,18);thumbnails[4953667]=new thumbnail(4953667,"281747","","bs_tango_bw_thumb.jpg",64,64,18);thumbnails[4953668]=new thumbnail(4953668,"281747","","bs_tt_2_thumb.jpg",64,64,18);thumbnails[4666654]=new thumbnail(4666654,"269033","","bs_bar_1_thumb.jpg",64,64,18);thumbnails[4665858]=new thumbnail(4665858,"268663","","bs_chris_sepia_thumb.jpg",64,64,18);thumbnails[4865781]=new thumbnail(4865781,"269033","","bs_cc_salmon_thumb.jpg",64,64,18);thumbnails[4665862]=new thumbnail(4665862,"268663","","bs_bruno_1_thumb.jpg",64,64,18);thumbnails[4666694]=new thumbnail(4666694,"269033","","bs_gulls_1_thumb.jpg",64,64,18);thumbnails[4665864]=new thumbnail(4665864,"268663","","bs_kr_1_thumb.jpg",64,64,18);thumbnails[4666710]=new thumbnail(4666710,"269033","","bs_twin_falls_1_thumb.jpg",64,64,18);thumbnails[4665886]=new thumbnail(4665886,"268663","","bs_steph_wet_thumb.jpg",64,64,18);thumbnails[4668469]=new thumbnail(4668469,"269033","","bs_hwy101_11_thumb.jpg",64,64,18);thumbnails[4668465]=new thumbnail(4668465,"269033","","bs_sadie_1_thumb.jpg",64,64,18);thumbnails[4865774]=new thumbnail(4865774,"269033","","bs_db_mosaic_thumb.jpg",64,64,18);var galleries=new Object();galleries[263828]=new gallery(263828,"6123892,5867867,5735980,5661134,5601558,5517508,5319542,5198607,5198597,5023933,4953663,4814189,4693716,4668456,4665864,4665488,4665103,4664736","PEOPLE & PORTRAITS","gallery",[]);galleries[263829]=new gallery(263829,"5151171,4668470,4666663,4666654","OUTSIDE","gallery",[]);galleries[343223]=new gallery(343223,"6123892","The Black Dress Project","gallery",[6123887,6123889,6123890,6123891,6123892]);galleries[268623]=new gallery(268623,"4664736","Steph / Ry","gallery",[4664736,4664848,4664875,4664878,4664881]);galleries[269030]=new gallery(269030,"4666663","West Coast","gallery",[4666663,4706204,4666669,4666672,4666674,4748468,4712602,4666681,4712605,4666687,4706205]);galleries[291096]=new gallery(291096,"5151171","Weather","gallery",[5151167,5151170,5151171,5151172,5151174,5151177,5151182]);galleries[268661]=new gallery(268661,"4665488","Jen","gallery",[4665451,4665463,4665464,4665472,4665483,4665488]);galleries[269127]=new gallery(269127,"4668456","Larrie Cook","gallery",[4668456,4668457,4668458,4668459,4668460,4668461,4668462]);galleries[268662]=new gallery(268662,"4665103","Matt","gallery",[4664900,4664925,4664928,4665103,4665130]);galleries[270050]=new gallery(270050,"4693716","Alannah","gallery",[4693717,4693718,4693716,4693720,4693719]);galleries[275152]=new gallery(275152,"4814189","Mich","gallery",[4814189,4814183,4814185,4814186,4814187,4814188]);galleries[279362]=new gallery(279362,"4901716,4901712,4901708,4901706,4901703,4901692,4901679","Chris","gallery",[4901679,4901703,4901692,4901706,4901708,4901712,4901716]);galleries[269032]=new gallery(269032,"4668470","Vegetation","gallery",[4668470,5198593,5198594,5198595,5198596,4668471,4668472,4668473,4668474]);galleries[284544]=new gallery(284544,"5023933","The Legend","gallery",[5023933,5023935,5023936,5023937,5023938]);galleries[293572]=new gallery(293572,"5198607","Portia I","gallery",[5198607,5198619,5198625,5198626,5198635]);galleries[317740]=new gallery(317740,"5517508","Portia II","gallery",[5517507,5517511,5517510,5517509,5517508]);galleries[293573]=new gallery(293573,"5198597","Sarah","gallery",[5198597,5198598,5198599,5198600,5198601]);galleries[299491]=new gallery(299491,"5319542","Molly I","gallery",[5319542,5319587,5319595,5319598,5319604,5319607,5319612,5319617]);galleries[317741]=new gallery(317741,"5601558","Molly II","gallery",[5601556,5601558,5601560,5601563,5601565,5601567,5601569]);galleries[320680]=new gallery(320680,"5661134","The Fighter","gallery",[5661135,5661134,5661138,5661139,5661140,5661141]);galleries[324987]=new gallery(324987,"5735980","Leore","gallery",[5735980,5735982,5735983,5735984,5735985,5735986,5735987]);galleries[331576]=new gallery(331576,"5867867","The Drummer","gallery",[5867859,5867860,5867865,5867867,5867899,5867907]);galleries[281747]=new gallery(281747,"4953663","Kittens!","gallery",[4953663,4953664,4953665,4953667,4953668]);galleries[268663]=new gallery(268663,"4665864","Other","gallery",[4665858,4665862,4665864,4665886]);galleries[269033]=new gallery(269033,"4666654","Other","gallery",[4666654,4865781,4666694,4666710,4668469,4668465,4865774]);var imageSets=new Object();imageSets[1]="4666669";imageSets[2]="6123892,5867867,5735980,5661134,5601558,5517508,5319542,5198607,5198597,5151171,5023933,4953663,4814189,4693716,4668470,4668456,4666663,4666654,4665864,4665488,4665103,4664736";imageSets[3]="4666669";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/marnic/images";break}switch(a){case 1:b="http://www1.clikpic.com/marnic/images";break}switch(a){case 2:b="http://admin.clikpic.com/marnic/images";break}switch(a){case 24:b="http://tpc15/clikpic/marnic/images";break}switch(a){case 4:b="http://www.clikchurch.com/marnic/images";break}switch(a){case 5:b="http://www2.clikpic.com/marnic/images";break}switch(a){case 22:b="http://tpc5/clikpic/marnic/images";break}switch(a){case 23:b="http://tpc10/clikpic/marnic/images";break}switch(a){case 25:b="http://tpc16/clikpic/marnic/images";break}switch(a){case 15:b="http://www3.clikpic.com/marnic/images";break}switch(a){case 18:b="http://www4.clikpic.com/marnic/images";break}switch(a){case 19:b="http://www5.clikpic.com/marnic/images";break}switch(a){case 31:b="http://www7.clikpic.com/marnic/images";break}switch(a){case 32:b="http://admin2.clikpic.com/marnic/images";break}switch(a){case 33:b="http://www8.clikpic.com/marnic/images";break}switch(a){case 34:b="http://www9.clikpic.com/marnic/images";break}switch(a){case 35:b="http://admin3.clikpic.com/marnic/images";break}switch(a){case 37:b="http://admin4.clikpic.com/marnic/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="'+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="Burning Sand Photo: "+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> 							"+(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+'<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<64){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+'")'})}}};