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[5371258]=new thumbnail(5371258,"275399","","_DSC0031_thumb.jpg",130,196,15);thumbnails[5371261]=new thumbnail(5371261,"275399","","_DSC01491_thumb.jpg",130,196,15);thumbnails[5371262]=new thumbnail(5371262,"275399","","_DSC03541_thumb.jpg",130,196,15);thumbnails[5371319]=new thumbnail(5371319,"","","_DSC0012d1_thumb.jpg",130,86,15);thumbnails[5475288]=new thumbnail(5475288,"","","DSC_0149_thumb.jpg",130,97,15);thumbnails[5475295]=new thumbnail(5475295,"","","DSC_0220bw_thumb.jpg",130,134,15);thumbnails[5475298]=new thumbnail(5475298,"","","DSC_0259_thumb.jpg",130,209,15);thumbnails[5475309]=new thumbnail(5475309,"309810","","DSC_0162bw_thumb.jpg",130,86,15);thumbnails[5493204]=new thumbnail(5493204,"309827","","DSC_0106b_thumb.jpg",130,85,15);thumbnails[5493207]=new thumbnail(5493207,"309826","","DSC_0172_thumb.jpg",130,86,15);thumbnails[5493209]=new thumbnail(5493209,"309826","","DSC_0182c_thumb.jpg",130,86,15);thumbnails[5493210]=new thumbnail(5493210,"309826","","DSC_0206_thumb.jpg",130,86,15);thumbnails[5493211]=new thumbnail(5493211,"309826","","DSC_0212_thumb.jpg",130,86,15);thumbnails[5427198]=new thumbnail(5427198,"306154","","DSC_0549b_thumb.jpg",130,86,15);thumbnails[5427262]=new thumbnail(5427262,"306154","","DSC_0740_7231A91B-1D09-001F-998FC56A1E675DB1_thumb.jpg",130,86,15);thumbnails[4339242]=new thumbnail(4339242,"","","DSC_12991_thumb.jpg",130,195,15);thumbnails[5263818]=new thumbnail(5263818,"260187","","10844_320724735651_576040651_9310168_5431639_n1_thumb.jpg",130,100,15);thumbnails[5443564]=new thumbnail(5443564,"","","DSC_0820web_thumb.jpg",130,81,15);thumbnails[5263820]=new thumbnail(5263820,"260187","","16532_323042325651_576040651_9343657_7828459_n2_thumb.jpg",130,100,15);thumbnails[5263824]=new thumbnail(5263824,"260187","","16532_324722260651_576040651_9364312_5197239_n_thumb.jpg",130,100,15);thumbnails[4451076]=new thumbnail(4451076,"260187","","forweb_thumb.jpg",130,90,15);thumbnails[5263740]=new thumbnail(5263740,"260187","","16532_324856235651_576040651_9365678_6670751_n_thumb.jpg",130,127,15);thumbnails[5263741]=new thumbnail(5263741,"260187","","16532_323042315651_576040651_9343656_7495794_n_thumb.jpg",130,100,15);thumbnails[5443561]=new thumbnail(5443561,"","","DSC_0213_thumb.jpg",130,196,15);thumbnails[4339244]=new thumbnail(4339244,"","","DSC_12862_thumb.jpg",130,195,15);thumbnails[5443562]=new thumbnail(5443562,"","","DSC_0789web_thumb.jpg",130,228,15);thumbnails[4339246]=new thumbnail(4339246,"","","DSC_13021_thumb.jpg",130,195,15);thumbnails[5427392]=new thumbnail(5427392,"306154","","DSC_0311bwebsite_thumb.jpg",130,194,15);thumbnails[5493215]=new thumbnail(5493215,"306679","","DSC_01721_thumb.jpg",130,86,15);thumbnails[5493216]=new thumbnail(5493216,"306679","","DSC_0182c1_thumb.jpg",130,86,15);thumbnails[5493217]=new thumbnail(5493217,"306679","","DSC_02061_BEA9A42E-1D09-001F-99FECEC0A226F29D_thumb.jpg",130,86,15);thumbnails[5493218]=new thumbnail(5493218,"306679","","DSC_02121_thumb.jpg",130,86,15);thumbnails[5475297]=new thumbnail(5475297,"306679","","DSC_0244_thumb.jpg",130,195,15);thumbnails[5427389]=new thumbnail(5427389,"306679","","DSC_0639website_thumb.jpg",130,92,15);thumbnails[5443565]=new thumbnail(5443565,"306679","","DSC_03061cweb1_thumb.jpg",130,155,15);thumbnails[5371096]=new thumbnail(5371096,"241928","","_DSC0084b_thumb.jpg",130,99,15);thumbnails[5443559]=new thumbnail(5443559,"306155","","-1bweb_thumb.jpg",130,91,15);thumbnails[5418193]=new thumbnail(5418193,"306155","","DSC_0770_thumb.jpg",130,86,15);thumbnails[5371058]=new thumbnail(5371058,"242745","","EDIT-FOR-POSTCARD_thumb.jpg",130,195,15);thumbnails[5371072]=new thumbnail(5371072,"302816","","_DSC0012d_thumb.jpg",130,86,15);thumbnails[5371073]=new thumbnail(5371073,"302816","","_DSC0020_thumb.jpg",130,86,15);thumbnails[5371074]=new thumbnail(5371074,"302816","","_DSC0069_thumb.jpg",130,81,15);thumbnails[5371075]=new thumbnail(5371075,"302816","","_DSC0072b_thumb.jpg",130,86,15);thumbnails[5371076]=new thumbnail(5371076,"302816","","_DSC0149_thumb.jpg",130,86,15);thumbnails[5371077]=new thumbnail(5371077,"302816","","_DSC0149c_thumb.jpg",130,86,15);thumbnails[5371078]=new thumbnail(5371078,"302816","","_DSC0325_thumb.jpg",130,86,15);thumbnails[5443560]=new thumbnail(5443560,"255488","","DSC_0124hdPSbweb_thumb.jpg",130,196,15);thumbnails[5512760]=new thumbnail(5512760,"255488","","HSBweb_thumb.jpg",130,75,15);thumbnails[4022965]=new thumbnail(4022965,"242745","","LC4_thumb.jpg",130,195,15);thumbnails[5371136]=new thumbnail(5371136,"255488","","_DSC00062_thumb.jpg",130,194,15);thumbnails[4353377]=new thumbnail(4353377,"255488","","DSC_1437-1_thumb.jpg",130,195,15);thumbnails[5371064]=new thumbnail(5371064,"255488","","Katie-Green-Edit-1_thumb.jpg",130,194,15);thumbnails[4022964]=new thumbnail(4022964,"242745","","LC3_thumb.jpg",130,86,15);thumbnails[4341633]=new thumbnail(4341633,"255494","","DSC_9096_thumb.jpg",130,86,15);thumbnails[4341635]=new thumbnail(4341635,"255494","","DSC_9109_thumb.jpg",130,86,15);thumbnails[4341636]=new thumbnail(4341636,"255494","","DSC_9142_thumb.jpg",130,86,15);thumbnails[4341637]=new thumbnail(4341637,"255494","","DSC_9156_thumb.jpg",130,86,15);thumbnails[4341595]=new thumbnail(4341595,"255494","","n576040651_2691118_4461-1_thumb.jpg",130,87,15);thumbnails[4341596]=new thumbnail(4341596,"255494","","n576040651_3557769_7268_thumb.jpg",130,87,15);thumbnails[4341597]=new thumbnail(4341597,"255494","","DSC_4061_thumb.JPG",130,145,15);thumbnails[4341585]=new thumbnail(4341585,"255494","","n576040651_3535794_3135_thumb.jpg",130,86,15);thumbnails[4341575]=new thumbnail(4341575,"255494","","_DSC0018_thumb.jpg",130,89,15);thumbnails[4341576]=new thumbnail(4341576,"255494","","_DSC0039cr_thumb.jpg",130,91,15);thumbnails[4341580]=new thumbnail(4341580,"255494","","_DSC0093_thumb.jpg",130,87,15);thumbnails[4341644]=new thumbnail(4341644,"255498","","W_hall_thumb.jpg",130,86,15);thumbnails[5371157]=new thumbnail(5371157,"255498","","_DSC0295b_thumb.jpg",130,87,15);thumbnails[5371213]=new thumbnail(5371213,"255498","","IMG_0031-1_thumb.jpg",130,87,15);thumbnails[5371214]=new thumbnail(5371214,"255498","","DSC_37641_thumb.jpg",130,86,15);thumbnails[5373593]=new thumbnail(5373593,"255493","","DSC_5336_2_thumb.jpg",130,86,15);thumbnails[5371047]=new thumbnail(5371047,"241915","","_DSC03292_thumb.jpg",130,194,15);thumbnails[5371048]=new thumbnail(5371048,"241915","","_DSC0340_thumb.jpg",130,87,15);thumbnails[5371049]=new thumbnail(5371049,"241915","","_DSC0354_thumb.jpg",130,194,15);thumbnails[5371050]=new thumbnail(5371050,"241915","","_DSC0361_thumb.jpg",130,58,15);thumbnails[5371051]=new thumbnail(5371051,"241915","","_DSC0368_thumb.jpg",130,71,15);thumbnails[5371052]=new thumbnail(5371052,"241915","","_DSC0370_thumb.jpg",130,194,15);thumbnails[5371053]=new thumbnail(5371053,"241915","","_DSC0384b_thumb.jpg",130,56,15);thumbnails[5371054]=new thumbnail(5371054,"241915","","_DSC0396_thumb.jpg",130,194,15);thumbnails[5371055]=new thumbnail(5371055,"241915","","_DSC0413_thumb.jpg",130,87,15);thumbnails[5371081]=new thumbnail(5371081,"258209","","DSC_1859_thumb.jpg",130,86,15);thumbnails[5371082]=new thumbnail(5371082,"258209","","DSC_1874_thumb.jpg",130,86,15);thumbnails[5371083]=new thumbnail(5371083,"258209","","DSC_1898_thumb.jpg",130,86,15);thumbnails[5371059]=new thumbnail(5371059,"255489","","_DSC0026_thumb.jpg",130,196,15);thumbnails[5371060]=new thumbnail(5371060,"255489","","_DSC0301_thumb.jpg",130,194,15);thumbnails[5371061]=new thumbnail(5371061,"255489","","_DSC00511_thumb.jpg",130,231,15);thumbnails[5371065]=new thumbnail(5371065,"241929","","_DSC0081b_thumb.jpg",130,87,15);thumbnails[5371067]=new thumbnail(5371067,"241929","","_DSC0121_thumb.jpg",130,149,15);thumbnails[5371068]=new thumbnail(5371068,"241929","","_DSC0160_thumb.jpg",130,140,15);thumbnails[5371069]=new thumbnail(5371069,"241929","","_DSC0215_thumb.jpg",130,192,15);thumbnails[5371113]=new thumbnail(5371113,"257136","","DSC_1782_thumb.jpg",130,86,15);thumbnails[5371114]=new thumbnail(5371114,"257136","","DSC_1783_thumb.jpg",130,86,15);thumbnails[5371116]=new thumbnail(5371116,"255489","","41_thumb.jpg",130,194,15);thumbnails[5371071]=new thumbnail(5371071,"241931","","DSC_8796_thumb.jpg",130,86,15);thumbnails[5371108]=new thumbnail(5371108,"241931","","_DSC0570_thumb.jpg",130,194,15);thumbnails[5371110]=new thumbnail(5371110,"241931","","_DSC00871_thumb.jpg",130,194,15);thumbnails[5371111]=new thumbnail(5371111,"241931","","_DSC0638_thumb.jpg",130,87,15);var galleries=new Object();galleries[309827]=new gallery(309827,"5493204","Aesthetic Reality in Retrospect ","section362387",[5493204]);galleries[260187]=new gallery(260187,"5263824,5263820,5263818,5263741,5263740,4451076","Astrophotography ","gallery",[5263818,5263820,5263824,4451076,5263740,5263741]);galleries[306154]=new gallery(306154,"5427262,5427198","Darkened Purity","section362387",[5427198,5427262,5427392]);galleries[309826]=new gallery(309826,"5493211,5493210,5493209,5493207","Impression of Conceptual Creation","section362387",[5493207,5493209,5493210,5493211]);galleries[275399]=new gallery(275399,"5371258","New York City (2009)","gallery",[5371258,5371261,5371262]);galleries[309810]=new gallery(309810,"5475309","Suspicious Ego of Dreams","section362387",[5475309]);galleries[306679]=new gallery(306679,"5493218,5493217,5493216,5493215,5475297,5443565,5427389","Artistic Nude","gallery",[5493215,5493216,5493217,5493218,5475297,5427389,5443565]);galleries[241928]=new gallery(241928,"5371096","Étienne de Silhouette","gallery",[5371096]);galleries[306155]=new gallery(306155,"5443559,5418193","Intimate Continuation","gallery",[5443559,5418193]);galleries[242745]=new gallery(242745,"5371058","American Band: Living Colour","gallery",[5371058,4022965,4022964]);galleries[302816]=new gallery(302816,"5371072","Metaphysical Projection","section362387",[5371072,5371073,5371074,5371075,5371076,5371077,5371078]);galleries[255488]=new gallery(255488,"5371136","Portraiture","gallery",[5443560,5512760,5371136,4353377,5371064]);galleries[255494]=new gallery(255494,"4341637,4341636,4341635,4341633,4341597,4341596,4341595,4341585,4341580,4341576","Wildlife","gallery",[4341633,4341635,4341636,4341637,4341595,4341596,4341597,4341585,4341575,4341576,4341580]);galleries[255498]=new gallery(255498,"5371157","Commercial","gallery",[4341644,5371157,5371213,5371214]);galleries[255493]=new gallery(255493,"5373593","Wedding","gallery",[5373593]);galleries[258209]=new gallery(258209,"5371083,5371082,5371081","Daguerréotype","gallery",[5371081,5371082,5371083]);galleries[241915]=new gallery(241915,"5371050","Idealism of Desire 1975","section362387",[5371047,5371048,5371049,5371050,5371051,5371052,5371053,5371054,5371055]);galleries[255489]=new gallery(255489,"5371116","Fashion","gallery",[5371059,5371060,5371061,5371116]);galleries[257136]=new gallery(257136,"5371114,5371113","Incoherent Philosophy","gallery",[5371113,5371114]);galleries[241929]=new gallery(241929,"5371067","Moulin Rouge '07","gallery",[5371065,5371067,5371068,5371069]);galleries[255490]=new gallery(255490,"5371096","Fine Art","gallery",[]);galleries[241931]=new gallery(241931,"5371110","Mixed","gallery",[5371071,5371108,5371110,5371111]);galleries[264734]=new gallery(264734,"5371258,5371110,5371067,5371058","Projects","gallery",[]);galleries[255492]=new gallery(255492,"5371157","Other","gallery",[]);var imageSets=new Object();imageSets[1]="5371319";imageSets[2]="5475288,5427262,5427198,5371258,5371157,5371136,5371116,5371110,5371096,5371072,5371067,5371058,5371050,4339246";imageSets[3]="5443559";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/chatsworth/images";break}switch(a){case 1:b="http://www1.clikpic.com/chatsworth/images";break}switch(a){case 2:b="http://admin.clikpic.com/chatsworth/images";break}switch(a){case 24:b="http://tpc15/clikpic/chatsworth/images";break}switch(a){case 4:b="http://www.clikchurch.com/chatsworth/images";break}switch(a){case 5:b="http://www2.clikpic.com/chatsworth/images";break}switch(a){case 22:b="http://tpc5/clikpic/chatsworth/images";break}switch(a){case 23:b="http://tpc10/clikpic/chatsworth/images";break}switch(a){case 25:b="http://tpc16/clikpic/chatsworth/images";break}switch(a){case 15:b="http://www3.clikpic.com/chatsworth/images";break}switch(a){case 18:b="http://www4.clikpic.com/chatsworth/images";break}switch(a){case 19:b="http://www5.clikpic.com/chatsworth/images";break}switch(a){case 31:b="http://www7.clikpic.com/chatsworth/images";break}switch(a){case 32:b="http://admin2.clikpic.com/chatsworth/images";break}switch(a){case 33:b="http://www8.clikpic.com/chatsworth/images";break}switch(a){case 34:b="http://www9.clikpic.com/chatsworth/images";break}switch(a){case 35:b="http://admin3.clikpic.com/chatsworth/images";break}switch(a){case 37:b="http://admin4.clikpic.com/chatsworth/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("section362386"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section362386.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("section362386"!=""){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="Carl Lewis Fine Art 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(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="carlsmusic@hotmail.com">';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="carlsmusic@hotmail.com">';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+'")'})}}};