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[3213249]=new thumbnail(3213249,"169345","","_MG_0043R_thumb.jpg",130,171,1);thumbnails[3213615]=new thumbnail(3213615,"169345","","_MG_0712_thumb.jpg",130,179,1);thumbnails[3213635]=new thumbnail(3213635,"169345","","12_thumb.jpg",130,88,1);thumbnails[3213640]=new thumbnail(3213640,"169345","","15_thumb.jpg",130,181,1);thumbnails[3213643]=new thumbnail(3213643,"169345","","17_thumb.jpg",130,173,1);thumbnails[3213644]=new thumbnail(3213644,"169345","","18_thumb.jpg",130,166,1);thumbnails[3213652]=new thumbnail(3213652,"169345","","CONFUSION COTIDIANA_thumb.jpg",130,187,1);thumbnails[3213654]=new thumbnail(3213654,"169345","","EVA2_thumb.jpg",130,178,1);thumbnails[3213655]=new thumbnail(3213655,"169345","","EVE'S APLE1_thumb.jpg",130,125,1);thumbnails[3213663]=new thumbnail(3213663,"49942","","L_thumb.jpg",130,91,1);thumbnails[3213664]=new thumbnail(3213664,"169345","","PAN_thumb.jpg",130,94,1);thumbnails[3213670]=new thumbnail(3213670,"49942","","XX_thumb.jpg",130,99,1);thumbnails[3213675]=new thumbnail(3213675,"49942","","2006_0508 LA CASCADA2_thumb.jpg",130,93,1);thumbnails[3213694]=new thumbnail(3213694,"169345","","388433_21_thumb.jpg",130,97,1);thumbnails[3213695]=new thumbnail(3213695,"169345","","BELLE DURMIENTE_thumb.jpg",130,97,1);thumbnails[3213696]=new thumbnail(3213696,"169345","","descanso diario_thumb.jpg",130,82,1);thumbnails[3213697]=new thumbnail(3213697,"169345","","SUBIENDO AL CIELO1_thumb.jpg",130,92,1);thumbnails[3213698]=new thumbnail(3213698,"49942","","2006_0805 LA CIUDAD-M_thumb.jpg",130,96,1);thumbnails[3213702]=new thumbnail(3213702,"49942","","289337_18_thumb.jpg",130,90,1);thumbnails[3213703]=new thumbnail(3213703,"49942","","304946_34_thumb.jpg",130,168,1);thumbnails[3213710]=new thumbnail(3213710,"49942","","BARRS_thumb.jpg",130,171,1);thumbnails[3213721]=new thumbnail(3213721,"49926","","2006_0620 LAS 4 GAVIOTAS_thumb.JPG",130,165,1);thumbnails[3213723]=new thumbnail(3213723,"49926","","2006_0420BARCA_thumb.JPG",130,100,1);thumbnails[3213725]=new thumbnail(3213725,"49926","","2006_0617 SOMBRAS_thumb.JPG",130,93,1);thumbnails[3213727]=new thumbnail(3213727,"49926","","2006_0915 FARO 1_thumb.JPG",130,103,1);thumbnails[3213729]=new thumbnail(3213729,"49926","","2006_1002 FARO 2_thumb.JPG",130,92,1);thumbnails[3213732]=new thumbnail(3213732,"49926","","2006_1008 FARO 3_thumb.JPG",130,104,1);thumbnails[3213733]=new thumbnail(3213733,"49926","","2006_1014 FARO 4_thumb.JPG",130,99,1);thumbnails[3213735]=new thumbnail(3213735,"49926","","2006_1110 BARCOS PESQUEROS_thumb.JPG",130,101,1);thumbnails[3213737]=new thumbnail(3213737,"49926","","2006_1114 VUELTA A PUERTO_thumb.JPG",130,92,1);thumbnails[3213739]=new thumbnail(3213739,"49926","","2006_1118 EL PESCADOR_thumb.JPG",130,101,1);thumbnails[3213741]=new thumbnail(3213741,"49926","","2007_0202 VIENTO_thumb.jpg",130,90,1);thumbnails[3213743]=new thumbnail(3213743,"49926","","2007_0322 SIEMPRE TARDE (ALWAYS LATE)2_thumb.jpg",130,93,1);thumbnails[3213745]=new thumbnail(3213745,"49926","","2007_0329 CREPUSCULO_thumb.jpg",130,105,1);thumbnails[3213748]=new thumbnail(3213748,"49926","","AlbertsBoat_thumb.jpg",130,100,1);thumbnails[3213755]=new thumbnail(3213755,"49926","","CaneGardenBay-Swing_thumb.jpg",130,99,1);thumbnails[3213756]=new thumbnail(3213756,"49926","","CowWreckCabana8x10_thumb.jpg",130,102,1);thumbnails[3213757]=new thumbnail(3213757,"49926","","Dinghy-8x10_thumb.jpg",130,99,1);thumbnails[3213766]=new thumbnail(3213766,"49926","","Surfergirls_thumb.jpg",130,98,1);thumbnails[3213784]=new thumbnail(3213784,"49922","","2006_0616 CONFUSION_thumb.JPG",130,187,1);thumbnails[3213785]=new thumbnail(3213785,"49922","","2006_0907 CRUZ_thumb.JPG",130,87,1);thumbnails[3213791]=new thumbnail(3213791,"49922","","2007_0110 SNOW IN THE FOREST_thumb.jpg",130,92,1);thumbnails[3213792]=new thumbnail(3213792,"49922","","2007_0123 WOLF & EAGLE_thumb.JPG",130,163,1);thumbnails[3213798]=new thumbnail(3213798,"49922","","2007_0716 PARADA EN EL CAMINO_thumb.jpg",130,92,1);thumbnails[3213804]=new thumbnail(3213804,"49922","","EL PASEO_thumb.jpg",130,95,1);thumbnails[3213812]=new thumbnail(3213812,"51665","","2006_0410 LECTURA-M_thumb.jpg",130,174,1);thumbnails[3213813]=new thumbnail(3213813,"51665","","2006_0511 LA VENTANA-M_thumb.jpg",130,130,1);thumbnails[3213816]=new thumbnail(3213816,"51665","","2006_0514 LOCURA-M_thumb.jpg",130,174,1);thumbnails[3213817]=new thumbnail(3213817,"51665","","2006_0519 VIDA 70_thumb.JPG",130,168,1);thumbnails[3213845]=new thumbnail(3213845,"51665","","2006_0520 CONTEMPLACION_thumb.JPG",130,177,1);thumbnails[3213846]=new thumbnail(3213846,"51665","","2006_0528 SOMBRERO_thumb.JPG",130,173,1);thumbnails[3213847]=new thumbnail(3213847,"51665","","2006_0610 GUITARRA_thumb.JPG",130,164,1);thumbnails[3213848]=new thumbnail(3213848,"51665","","2006_0615 LAS PLAYERAS-M_thumb.jpg",130,176,1);thumbnails[3213850]=new thumbnail(3213850,"51665","","2006_0710 LOS MUSICOS_thumb.JPG",130,194,1);thumbnails[3213854]=new thumbnail(3213854,"51665","","2006_1221 LAS AMAPOLAS_thumb.JPG",130,166,1);thumbnails[3213856]=new thumbnail(3213856,"51665","","2006_1222 EL ASEO_thumb.JPG",130,157,1);thumbnails[3213858]=new thumbnail(3213858,"51665","","2006_1226 CASCADA IN RED_thumb.JPG",130,182,1);thumbnails[3213859]=new thumbnail(3213859,"51665","","2006_1227 CASCADA IN BLUE_thumb.JPG",130,173,1);thumbnails[3213862]=new thumbnail(3213862,"51665","","2007_0103 SUN FLOWERS2_thumb.jpg",130,178,1);thumbnails[3213864]=new thumbnail(3213864,"51665","","2007_0222 PRELUDIO_thumb.JPG",130,93,1);thumbnails[3213867]=new thumbnail(3213867,"51665","","2007_0227 PRELUDIO 2_thumb.JPG",130,162,1);thumbnails[3213869]=new thumbnail(3213869,"51665","","2007_0305 CAMPANAS_thumb.JPG",130,173,1);thumbnails[3213870]=new thumbnail(3213870,"51665","","2007_0306 EVOLUCION_thumb.JPG",130,173,1);thumbnails[3213871]=new thumbnail(3213871,"51665","","2007_0307 EVOLUCION2_thumb.JPG",130,176,1);thumbnails[3213872]=new thumbnail(3213872,"51665","","ANOCHECER 29-11-08_thumb.jpg",130,158,1);thumbnails[3213875]=new thumbnail(3213875,"49942","","Halyconia021_thumb.jpg",130,163,1);thumbnails[3213876]=new thumbnail(3213876,"51665","","POPI2_thumb.jpg",130,159,1);thumbnails[3213877]=new thumbnail(3213877,"49942","","RONDEANDO EL MUNDO_thumb.jpg",130,98,1);thumbnails[3213878]=new thumbnail(3213878,"51665","","TANIA Y NOAH_thumb.jpg",130,103,1);thumbnails[3213879]=new thumbnail(3213879,"51665","","the city_thumb.jpg",130,92,1);thumbnails[3213883]=new thumbnail(3213883,"49922","","un paseo_thumb.jpg",130,89,1);thumbnails[3213884]=new thumbnail(3213884,"51665","","Un recuerdo1_thumb.jpg",130,161,1);thumbnails[3213893]=new thumbnail(3213893,"51665","","temeridad del cuervo_thumb.jpg",130,195,1);thumbnails[3214509]=new thumbnail(3214509,"49942","","2007_0313 ORBITAL2_thumb.JPG",130,130,1);thumbnails[3214608]=new thumbnail(3214608,"63866","EFELANT","2007_0308 EFELANT_thumb.JPG",130,130,1);thumbnails[3214612]=new thumbnail(3214612,"63866","HARRR","2007_0309 HARRR_thumb.JPG",130,130,1);thumbnails[3214615]=new thumbnail(3214615,"63866","WHAT A DAY  / QUE DIA!","2007_0317 WHAT A DAY (QUE DIA!)_thumb.JPG",130,130,1);thumbnails[3214617]=new thumbnail(3214617,"63866","MUUU","2007_0318 MUU_thumb.JPG",130,131,1);thumbnails[3214619]=new thumbnail(3214619,"63866","FROGY","2007_0319 FROGY_thumb.JPG",130,130,1);thumbnails[3214622]=new thumbnail(3214622,"63866","COOL / FRESQUITO","2007_0320 COOL (FRESQUITO)_thumb.JPG",130,157,1);thumbnails[3214628]=new thumbnail(3214628,"63866","GYRY","2007_0321 GIRY2_thumb.JPG",130,155,1);thumbnails[3214630]=new thumbnail(3214630,"63866","GORILLI","GORILI_thumb.jpg",130,172,1);thumbnails[3218055]=new thumbnail(3218055,"169345","","FOTO MONTAJE2_thumb.jpg",130,196,1);thumbnails[3453588]=new thumbnail(3453588,"169345","MARGARITAS","margaritas_thumb.jpg",130,91,1);thumbnails[3453589]=new thumbnail(3453589,"49942","CONVOLUCION","convolucion_thumb.jpg",130,192,1);thumbnails[3453592]=new thumbnail(3453592,"169345","MELANGE","melange_thumb.jpg",130,89,1);thumbnails[6213375]=new thumbnail(6213375,"169345","","2_CON_ROSAS_web2_thumb.jpg",130,99,1);thumbnails[6213376]=new thumbnail(6213376,"169345","","3_RUBIAS_WEB_thumb.jpg",130,170,1);thumbnails[6213380]=new thumbnail(6213380,"169345","","bailarina_copy_thumb.jpg",130,188,1);thumbnails[6213382]=new thumbnail(6213382,"169345","","bonita1_thumb.jpg",130,168,1);thumbnails[6213383]=new thumbnail(6213383,"169345","","bonita2_thumb.jpg",130,178,1);thumbnails[6213384]=new thumbnail(6213384,"169345","","chinita_thumb.jpg",130,166,1);thumbnails[6213385]=new thumbnail(6213385,"169345","","daniela_WEB_thumb.jpg",130,178,1);thumbnails[6213386]=new thumbnail(6213386,"169345","","diabolo_web_thumb.jpg",130,169,1);thumbnails[6213387]=new thumbnail(6213387,"169345","","el_recuadro_web_thumb.jpg",130,185,1);thumbnails[6213388]=new thumbnail(6213388,"169345","","en_rojo_web_thumb.jpg",130,179,1);thumbnails[6213390]=new thumbnail(6213390,"169345","","ORQUIDEAS_copy_thumb.jpg",130,166,1);thumbnails[6213391]=new thumbnail(6213391,"169345","","rubia_con_setas_copy_thumb.jpg",130,93,1);thumbnails[6213392]=new thumbnail(6213392,"169345","","RUBIA_RECOSTADA_copy_thumb.jpg",130,99,1);thumbnails[6213393]=new thumbnail(6213393,"169345","","tormernto_thumb.jpg",130,94,1);thumbnails[6213394]=new thumbnail(6213394,"169345","","travesti_festero_copy_thumb.jpg",130,182,1);thumbnails[6213395]=new thumbnail(6213395,"169345","","trio_thumb.jpg",130,103,1);thumbnails[6213397]=new thumbnail(6213397,"169345","","web_thumb.jpg",130,96,1);var galleries=new Object();galleries[49942]=new gallery(49942,"3453589,3214509,3213877,3213875,3213710,3213703,3213702,3213698,3213675,3213670","ABSTRACT","gallery",[3213663,3213670,3213675,3213698,3213702,3213703,3213710,3213875,3213877,3214509,3453589]);galleries[63866]=new gallery(63866,"3214630,3214628,3214622,3214619,3214617,3214615,3214612,3214608","BABY SECTION","gallery",[3214608,3214612,3214615,3214617,3214619,3214622,3214628,3214630]);galleries[49922]=new gallery(49922,"3213883,3213804,3213798,3213792,3213791,3213785,3213784","LANDSCAPES","gallery",[3213784,3213785,3213791,3213792,3213798,3213804,3213883]);galleries[51665]=new gallery(51665,"3213893,3213884,3213879,3213878,3213876,3213872,3213871,3213870,3213869,3213867","MODERN","gallery",[3213812,3213813,3213816,3213817,3213845,3213846,3213847,3213848,3213850,3213854,3213856,3213858,3213859,3213862,3213864,3213867,3213869,3213870,3213871,3213872,3213876,3213878,3213879,3213884,3213893]);galleries[169345]=new gallery(169345,"6213397,6213395,6213394,6213393,6213392,6213391,6213390,6213388,6213387,6213386","PHOTO TRICK","gallery",[3213249,3213615,3213635,3213640,3213643,3213644,3213652,3213654,3213655,3213664,3213694,3213695,3213696,3213697,3218055,3453588,3453592,6213375,6213376,6213380,6213382,6213383,6213384,6213385,6213386,6213387,6213388,6213390,6213391,6213392,6213393,6213394,6213395,6213397]);galleries[49926]=new gallery(49926,"3213766,3213757,3213756,3213755,3213748,3213745,3213743,3213741,3213739,3213737","SEA SCAPES ","gallery",[3213721,3213723,3213725,3213727,3213729,3213732,3213733,3213735,3213737,3213739,3213741,3213743,3213745,3213748,3213755,3213756,3213757,3213766]);var imageSets=new Object();imageSets[1]="6213397,6213395,6213394,6213393,6213392,6213391,6213390,6213388,6213387,6213386,6213385,6213384,6213383,6213382,6213380,6213376,6213375,3453592,3453589,3453588,3218055,3214630,3214628,3214622,3214619,3214617,3214615,3214612,3214608,3214509,3213893,3213884,3213883,3213879,3213878,3213877,3213876,3213875,3213872,3213871,3213870,3213869,3213867,3213864,3213862,3213859,3213858,3213856,3213854,3213850";imageSets[3]="6213397,6213395,6213394,6213393,6213392,6213391,6213390,6213388,6213387,6213386,6213385,6213384,6213383,6213382,6213380,6213376,6213375,3453592,3453589,3453588,3218055,3214630,3214628,3214622,3214619,3214617,3214615,3214612,3214608,3214509,3213893,3213884,3213883,3213879,3213878,3213877,3213876,3213875,3213872,3213871,3213870,3213869,3213867,3213864,3213862,3213859,3213858,3213856,3213854,3213850";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/PERTEGAS/images";break}switch(a){case 1:b="http://www1.clikpic.com/PERTEGAS/images";break}switch(a){case 2:b="http://admin.clikpic.com/PERTEGAS/images";break}switch(a){case 24:b="http://tpc15/clikpic/PERTEGAS/images";break}switch(a){case 4:b="http://www.clikchurch.com/PERTEGAS/images";break}switch(a){case 5:b="http://www2.clikpic.com/PERTEGAS/images";break}switch(a){case 22:b="http://tpc5/clikpic/PERTEGAS/images";break}switch(a){case 23:b="http://tpc10/clikpic/PERTEGAS/images";break}switch(a){case 25:b="http://tpc16/clikpic/PERTEGAS/images";break}switch(a){case 15:b="http://www3.clikpic.com/PERTEGAS/images";break}switch(a){case 18:b="http://www4.clikpic.com/PERTEGAS/images";break}switch(a){case 19:b="http://www5.clikpic.com/PERTEGAS/images";break}switch(a){case 31:b="http://www7.clikpic.com/PERTEGAS/images";break}switch(a){case 32:b="http://admin2.clikpic.com/PERTEGAS/images";break}switch(a){case 33:b="http://www8.clikpic.com/PERTEGAS/images";break}switch(a){case 34:b="http://www9.clikpic.com/PERTEGAS/images";break}switch(a){case 35:b="http://admin3.clikpic.com/PERTEGAS/images";break}switch(a){case 37:b="http://admin4.clikpic.com/PERTEGAS/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="EPER-ART GALLERY: "+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>MEDIUM </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>"Artist Rick Perme" </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 Painting online</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="PERTEGAS">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to Cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View Cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};