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[6191088]=new thumbnail(6191088,"352074","At Night on the High Seas, No. 1","Hesse_1_thumb.JPG",130,170,1);thumbnails[6356890]=new thumbnail(6356890,"352074","At Night on the High Seas, No. 2","Hesse_2_thumb.jpg",130,156,1);thumbnails[6191093]=new thumbnail(6191093,"352074","At Night on the High Seas, No. 3","Hesse_3_thumb.jpg",130,164,1);thumbnails[6191097]=new thumbnail(6191097,"352074","At Night on the High Seas, No. 4","Hesse_4_thumb.jpg",130,173,1);thumbnails[6191090]=new thumbnail(6191090,"352074","At Night on the High Seas, No. 5","Hesse_5_thumb.JPG",130,144,1);thumbnails[6357551]=new thumbnail(6357551,"352074","At Night on the High Seas, No. 6","Hesse_6_thumb.jpg",130,166,1);thumbnails[6357568]=new thumbnail(6357568,"352074","At Night on the High Seas, No. 7","Hesse_7_thumb.jpg",130,158,1);thumbnails[6357570]=new thumbnail(6357570,"352074","At Night on the High Seas, No. 8","Hesse_8_thumb.jpg",130,217,1);thumbnails[6356588]=new thumbnail(6356588,"352074","At Night on the High Seas, No. 9","Hesse_9_thumb.jpg",130,156,1);thumbnails[5509666]=new thumbnail(5509666,"352075","Kew Gardens, Midsummer ","SSL20572_thumb.JPG",130,113,1);thumbnails[5863326]=new thumbnail(5863326,"352075","The Young Mother","large1_thumb.jpg",130,171,1);thumbnails[5863375]=new thumbnail(5863375,"352075","Our Dream of Phaistos ","Phaistos_thumb.jpg",130,172,1);thumbnails[5863402]=new thumbnail(5863402,"352075","After Walking in the Garden (Mother and Daughter)","Mother_and_Daughter_thumb.jpg",130,129,1);thumbnails[5867894]=new thumbnail(5867894,"352075","In a Garden Without Animals","In_a_Garden_Without_Animals_thumb.jpg",130,173,1);thumbnails[5319322]=new thumbnail(5319322,"352075","Dark and Bloody Ground","Dark_and_Bloody_Ground_thumb.JPG",130,172,1);thumbnails[5246118]=new thumbnail(5246118,"352075","Sandhamn Shore","Sandhamn_Shore_thumb.JPG",130,99,1);thumbnails[5386206]=new thumbnail(5386206,"352075","Mourner","003_thumb.JPG",130,173,1);thumbnails[5238098]=new thumbnail(5238098,"352075","A Night of Little Darknesses ","Night_of_Little_Darknesses_thumb.JPG",130,171,1);thumbnails[5868712]=new thumbnail(5868712,"352075","Aerial Man","Aerial_thumb.jpg",130,173,1);thumbnails[5157142]=new thumbnail(5157142,"352075","Processional ","Processional_thumb.JPG",130,171,1);thumbnails[5238104]=new thumbnail(5238104,"352075","Umgekehrt Kerl","umgekehrt_kerl_thumb.JPG",130,173,1);thumbnails[5157140]=new thumbnail(5157140,"352075","Two Lovers Return","Two_Lovers_2_thumb.JPG",130,173,1);thumbnails[3632695]=new thumbnail(3632695,"352075","Poem to Le Corbusier","Poem_to_Le_Corbusier_thumb.JPG",130,173,1);thumbnails[3694414]=new thumbnail(3694414,"352075","German Flag Bearer (Waldemar)","German_Flag_Bearer_thumb.JPG",130,170,1);thumbnails[3694410]=new thumbnail(3694410,"352075","Self Portrait as King of Berlin","self_portrait_as_king_of_berlin_thumb.JPG",130,173,1);thumbnails[3463937]=new thumbnail(3463937,"352075","What You Saw When You Told My Fortune","What You Saw When You Told My Fortune_thumb.JPG",130,170,1);thumbnails[3463975]=new thumbnail(3463975,"352075","The Night Death Did Not Come For You","The Night Death Didn't Come For You_thumb.JPG",130,173,1);thumbnails[3463977]=new thumbnail(3463977,"352075","Olson House Interior","tete a tete_thumb.JPG",130,173,1);thumbnails[3501246]=new thumbnail(3501246,"352075","Balos ","Balos Beach_thumb.JPG",130,171,1);thumbnails[3501595]=new thumbnail(3501595,"352075","I Have Not Been Led Into the Desert","I have not been led into the desert_thumb.JPG",130,173,1);thumbnails[2548522]=new thumbnail(2548522,"352075","Hampstead White Woman","hampstead white woman_thumb.JPG",130,177,1);thumbnails[5951642]=new thumbnail(5951642,"335866","A Country of Character","A_Country_of_Character_thumb.jpg",130,185,1);thumbnails[5951666]=new thumbnail(5951666,"335866","Landscape that Shapes a People","Landscape_that_Shapes_a_People1_thumb.jpg",130,185,1);thumbnails[5951675]=new thumbnail(5951675,"335866","Forging the Modern Nation","Forging_the_Modern_Nation_thumb.jpg",130,185,1);thumbnails[5951737]=new thumbnail(5951737,"335866","A Culture Born of Barbarism","A_Culture_Born_of_Barbarism1_thumb.jpg",130,185,1);thumbnails[5951746]=new thumbnail(5951746,"335866","A Painful Decline in Power","A_Painful_Decline_in_Power1_thumb.jpg",130,185,1);thumbnails[5951761]=new thumbnail(5951761,"335866","The Surge and Ebb of Empire","The_Surge_and_Ebb_of_Empire123_thumb.jpg",130,185,1);thumbnails[5951767]=new thumbnail(5951767,"335866","An Oddly Efficient Government","An_Oddly_Efficient_Government1_thumb.jpg",130,185,1);thumbnails[5951772]=new thumbnail(5951772,"335866","A Love of Pomp and Pageant","A_Love_of_Pomp_and_Pageant1_thumb.jpg",130,185,1);thumbnails[5951882]=new thumbnail(5951882,"335866","A Flexibility of Control","A_Flexibility_of_Control1_thumb.jpg",130,185,1);thumbnails[5951884]=new thumbnail(5951884,"335866","Social Welfare - and Profit Too","Social_Welfare_-_and_Profit_Too1_thumb.jpg",130,185,1);thumbnails[5951885]=new thumbnail(5951885,"335866","The Happy Birds","The_Happy_Birds1_thumb.jpg",130,185,1);thumbnails[5951886]=new thumbnail(5951886,"335866","The New Affluence","The_New_Affluence_thumb.jpg",130,185,1);thumbnails[5951887]=new thumbnail(5951887,"335866","A Narrowing of the Social Gap","a_narrowing_of_the_social_gap1_thumb.jpg",130,185,1);thumbnails[5951998]=new thumbnail(5951998,"335866","The Joys of Leisure","The_Joys_of_Leisure_thumb.jpg",130,185,1);thumbnails[5952006]=new thumbnail(5952006,"335866","The Cultural Ferment","the_cultural_ferment_thumb.jpg",130,185,1);thumbnails[5952015]=new thumbnail(5952015,"335866","A New Distinction in the Arts","A_New_Distinction_in_the_Arts1_thumb.jpg",130,185,1);thumbnails[5952023]=new thumbnail(5952023,"335866","Education: Mirror of a Society","Education-_Mirror_of_a_Society12_thumb.jpg",130,185,1);thumbnails[5952042]=new thumbnail(5952042,"335866","The Quest for the Good Mind","The_Quest_for_the_Good_Mind_thumb.jpg",130,185,1);thumbnails[5952046]=new thumbnail(5952046,"335866","A Unique and Lasting Strength","A_Unique_and_Lasting_Strength1_thumb.jpg",130,185,1);thumbnails[5943875]=new thumbnail(5943875,"352072","Woman Thinks of Tomorrow","Woman_Thinks_of_Tomorrow_thumb.jpg",130,183,1);thumbnails[5951092]=new thumbnail(5951092,"352072","Man and Woman Revealed","Man_and_Woman_Revealed_thumb.jpg",130,176,1);thumbnails[6191103]=new thumbnail(6191103,"352072","Man in Disguise","Man_in_Disguise_thumb.jpg",130,173,1);thumbnails[6191107]=new thumbnail(6191107,"352072","Man and Woman Electioneering","Man_and_Woman_Electioneering_thumb.jpg",130,173,1);thumbnails[6191114]=new thumbnail(6191114,"352072","Man as Something Other than Himself","Man_as_Something_Other_than_Himself_thumb.jpg",130,173,1);thumbnails[6191117]=new thumbnail(6191117,"352072","Woman at Odds with Herself","Woman_at_Odds_With_Herself_thumb.jpg",130,172,1);thumbnails[6191119]=new thumbnail(6191119,"352072","Man as King of Birds","Man_as_King_of_Birds_thumb.jpg",130,193,1);thumbnails[6191120]=new thumbnail(6191120,"352072","Man as Dream of David Hockney","Man_as_a_Dream_of_David_Hockney_thumb.jpg",130,174,1);thumbnails[6191121]=new thumbnail(6191121,"352072","Man in Search of Something like Fred C. Dobbs Was in Search of Something","Man_in_Search_of_Something_like_Fred_C_Dobbs_was_in_Search_of_Something_thumb.jpg",130,186,1);thumbnails[5943868]=new thumbnail(5943868,"352072","Woman as Originator","Woman_as_Originator_thumb.jpg",130,183,1);thumbnails[5951179]=new thumbnail(5951179,"352072","Man at Seaside","Man_at_Seaside_thumb.jpg",130,173,1);thumbnails[5943935]=new thumbnail(5943935,"352072","Woman as Receptacle","Woman_as_Receptacle_thumb.jpg",130,183,1);thumbnails[5951194]=new thumbnail(5951194,"352072","Man of Some Considerable Strength","Man_of_Some_Considerable_Strength1_thumb.jpg",130,171,1);thumbnails[5943938]=new thumbnail(5943938,"352072","Woman as Jungle Notion","Woman_as_Jungle_Notion_thumb.jpg",130,183,1);thumbnails[5951197]=new thumbnail(5951197,"352072","Man in Turmoil","Man_in_turmoil_thumb.jpg",130,175,1);thumbnails[5943939]=new thumbnail(5943939,"352072","Woman Entangled","Woman_Entangled_thumb.jpg",130,183,1);thumbnails[5951202]=new thumbnail(5951202,"352072","Man of the Spanish Sea","Man_of_the_Sea1_thumb.jpg",130,173,1);thumbnails[5943941]=new thumbnail(5943941,"352072","Woman with a Head Full of Ideas","Woman_With_a_Head_Full_of_Ideas_thumb.jpg",130,183,1);thumbnails[5950415]=new thumbnail(5950415,"352072","Woman as Acrobat","Woman_as_Acrobat_thumb.jpg",130,183,1);thumbnails[5950426]=new thumbnail(5950426,"352072","Woman of the Woods","Woman_of_the_Woods_thumb.jpg",130,183,1);thumbnails[5950428]=new thumbnail(5950428,"352072","Woman at the Mercy of the Past","Woman_at_the_Mercy_of_the_Past_thumb.jpg",130,183,1);thumbnails[5950433]=new thumbnail(5950433,"352072","Woman at the Mercy of the Future","Woman_at_the_Mercy_of_the_Future_thumb.jpg",130,183,1);thumbnails[5950436]=new thumbnail(5950436,"352072","Man Remembers","A_Man_Remembers_thumb.jpg",130,183,1);thumbnails[5950439]=new thumbnail(5950439,"352072","Man and the Sea are Lovers","Man_and_the_Sea_thumb.jpg",130,183,1);thumbnails[5950440]=new thumbnail(5950440,"352072","Man with Strange Ideas","Man_with_Strange_Ideas_thumb.jpg",130,183,1);thumbnails[5951219]=new thumbnail(5951219,"352072","Jung Mann","Jung_Mann_thumb.jpg",130,176,1);thumbnails[2020958]=new thumbnail(2020958,"352098","Erik in White Shirt","Erik in White Shirt_thumb.JPG",130,181,1);thumbnails[4103342]=new thumbnail(4103342,"352098","Your Ghost","Your_Ghost_3_thumb.JPG",130,181,1);thumbnails[5238115]=new thumbnail(5238115,"352098","Olivia No. 1","Olivia_No_1_thumb.JPG",130,176,1);thumbnails[3874841]=new thumbnail(3874841,"352098","What it Means to Him to Be a Useful Man","What_it_Means_to_Be_a_Useful_Man_thumb.JPG",130,173,1);thumbnails[5238116]=new thumbnail(5238116,"352098","Olivia No. 2","Olivia_No_2_thumb.JPG",130,187,1);thumbnails[3696983]=new thumbnail(3696983,"352098","The Judgment","The_Judgment_thumb.JPG",130,185,1);thumbnails[5238117]=new thumbnail(5238117,"352098","Olivia No. 3","Olivia_No_3_thumb.JPG",130,185,1);thumbnails[2182199]=new thumbnail(2182199,"352098","Alison I","alison 1_thumb.JPG",130,195,1);thumbnails[3918853]=new thumbnail(3918853,"352098","Self Portrait with Sister Delores Gohs","Sister_Delores_Gohs_thumb.JPG",130,224,1);thumbnails[2024454]=new thumbnail(2024454,"352098","The Owl Wonders If","The Owl Wonders If_thumb.JPG",130,184,1);thumbnails[2018193]=new thumbnail(2018193,"352098","Woman with Floorboards","Woman with Floorboards_thumb.JPG",130,187,1);thumbnails[3167112]=new thumbnail(3167112,"352098","D. Earl Griffin, Atlantic coast","D_thumb. Earl Griffin.JPG",130,193,1);thumbnails[2020985]=new thumbnail(2020985,"352098","The Red Man of Vienna","Red Man of Vienna_thumb.JPG",130,188,1);thumbnails[3918894]=new thumbnail(3918894,"352098","Olga No. 5","Olga_No_5_thumb.JPG",130,184,1);thumbnails[2018114]=new thumbnail(2018114,"352098","Matisse, I Did Not Expect to Find You in Berlin","Matisse, I Did Not Expect to Find You in Berlin_thumb.JPG",130,191,1);thumbnails[2202968]=new thumbnail(2202968,"352098","The Two Men","two men_thumb.JPG",130,192,1);thumbnails[2017620]=new thumbnail(2017620,"352098","Woman","woman_thumb.JPG",130,174,1);thumbnails[3633503]=new thumbnail(3633503,"352098","I Had a Dream","I_Had_a_Dream_thumb.JPG",130,94,1);thumbnails[3633479]=new thumbnail(3633479,"352098","Dean as Icarus (Warnemunde)","Dean_as_Icarus_Warnemunde_thumb.JPG",130,84,1);thumbnails[3633269]=new thumbnail(3633269,"352098","Colossuses of Warnemunde","Unswum_Baltic_thumb.JPG",130,202,1);thumbnails[5238107]=new thumbnail(5238107,"352098","Boy in Helmet No. 1","Boy_in_Helmet_No_1_thumb.JPG",130,170,1);thumbnails[5238108]=new thumbnail(5238108,"352098","Boy in Helmet No. 2","Boy_in_Helmet_No_2_thumb.JPG",130,178,1);thumbnails[5238109]=new thumbnail(5238109,"352098","December Head and Torso","December_Torso_thumb.JPG",130,173,1);thumbnails[2018227]=new thumbnail(2018227,"352098","Nadia I","Nadia I_thumb.JPG",130,180,1);var galleries=new Object();galleries[352074]=new gallery(352074,"6357570,6357568,6357551,6356890,6356588,6191097,6191093,6191090,6191088","At Night on the High Seas","gallery",[6191088,6356890,6191093,6191097,6191090,6357551,6357568,6357570,6356588]);galleries[352075]=new gallery(352075,"5868712,5867894,5863402,5863375,5863326,5509666,5386206,5319322,5246118,5238104","Not All the Way to the Tigers ","gallery",[5509666,5863326,5863375,5863402,5867894,5319322,5246118,5386206,5238098,5868712,5157142,5238104,5157140,3632695,3694414,3694410,3463937,3463975,3463977,3501246,3501595,2548522]);galleries[335866]=new gallery(335866,"5952046,5952042,5952023,5952015,5952006,5951998,5951887,5951886,5951885,5951884","Tell Daddy We are All Happy Under British Rule","gallery",[5951642,5951666,5951675,5951737,5951746,5951761,5951767,5951772,5951882,5951884,5951885,5951886,5951887,5951998,5952006,5952015,5952023,5952042,5952046]);galleries[352072]=new gallery(352072,"6191121,6191120,6191119,6191117,6191114,6191107,6191103,5951219,5951202,5951197","Man and Woman Revealed","gallery",[5943875,5951092,6191103,6191107,6191114,6191117,6191119,6191120,6191121,5943868,5951179,5943935,5951194,5943938,5951197,5943939,5951202,5943941,5950415,5950426,5950428,5950433,5950436,5950439,5950440,5951219]);galleries[352098]=new gallery(352098,"5238117,5238116,5238115,5238109,5238108,5238107,4103342,3918894,3918853,3874841","Other Work","gallery",[2020958,4103342,5238115,3874841,5238116,3696983,5238117,2182199,3918853,2024454,2018193,3167112,2020985,3918894,2018114,2202968,2017620,3633503,3633479,3633269,5238107,5238108,5238109,2018227]);var imageSets=new Object();imageSets[1]="5238108";imageSets[3]="3633503,3633479,3633269";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/johnebrooks/images";break}switch(a){case 1:b="http://www1.clikpic.com/johnebrooks/images";break}switch(a){case 2:b="http://admin.clikpic.com/johnebrooks/images";break}switch(a){case 24:b="http://tpc15/clikpic/johnebrooks/images";break}switch(a){case 4:b="http://www.clikchurch.com/johnebrooks/images";break}switch(a){case 5:b="http://www2.clikpic.com/johnebrooks/images";break}switch(a){case 22:b="http://tpc5/clikpic/johnebrooks/images";break}switch(a){case 23:b="http://tpc10/clikpic/johnebrooks/images";break}switch(a){case 25:b="http://tpc16/clikpic/johnebrooks/images";break}switch(a){case 15:b="http://www3.clikpic.com/johnebrooks/images";break}switch(a){case 18:b="http://www4.clikpic.com/johnebrooks/images";break}switch(a){case 19:b="http://www5.clikpic.com/johnebrooks/images";break}switch(a){case 31:b="http://www7.clikpic.com/johnebrooks/images";break}switch(a){case 32:b="http://admin2.clikpic.com/johnebrooks/images";break}switch(a){case 33:b="http://www8.clikpic.com/johnebrooks/images";break}switch(a){case 34:b="http://www9.clikpic.com/johnebrooks/images";break}switch(a){case 35:b="http://admin3.clikpic.com/johnebrooks/images";break}switch(a){case 37:b="http://admin4.clikpic.com/johnebrooks/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="John Edward Brooks: "+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<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+'")'})}}};