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[44838]=new thumbnail(44838,"28293","Great Hall, British Museum","AT403Bmono_thumb.jpg",130,86,18);thumbnails[44854]=new thumbnail(44854,"28293","Eagle Owl","Owl_thumb.jpg",130,135,18);thumbnails[64739]=new thumbnail(64739,"40435","Cod liver oil capsules","AAKM3F_thumb.jpg",130,86,18);thumbnails[96714]=new thumbnail(96714,"28293","Classic car","ClassicCar_thumb.D1378.jpg",130,199,18);thumbnails[96721]=new thumbnail(96721,"40435","Numberpad","DECTphone_thumb.D0058.jpg",130,86,18);thumbnails[106205]=new thumbnail(106205,"28293","David","DavidStatue_thumb.A.jpg",130,197,18);thumbnails[191051]=new thumbnail(191051,"40435","All Sorts","Allsorts_thumb.d5485.jpg",130,195,18);thumbnails[191056]=new thumbnail(191056,"40441","Fire eater","FireEater_thumb.d4540.jpg",130,137,18);thumbnails[191057]=new thumbnail(191057,"40441","Merry-go-round","MerryGoRound_thumb.d4525.jpg",130,86,18);thumbnails[337561]=new thumbnail(337561,"28293","Ullswater","Final_thumb.1016.jpg",130,199,18);thumbnails[337562]=new thumbnail(337562,"28293","Zebra","ZebraPattern_thumb.jpg",130,193,18);thumbnails[337566]=new thumbnail(337566,"28293","Nepalese woman","Duotone_thumb.654.jpg",130,169,18);thumbnails[475388]=new thumbnail(475388,"37520","Shutters 2","PICT6490a_thumb.jpg",130,86,18);thumbnails[475389]=new thumbnail(475389,"37520","Shutters 1","PICT6489a_thumb.jpg",130,86,18);thumbnails[475390]=new thumbnail(475390,"37520","No Ball Games","PICT6487a_thumb.jpg",130,86,18);thumbnails[475391]=new thumbnail(475391,"37520","Lavender","PICT6447a_thumb.jpg",130,86,18);thumbnails[475392]=new thumbnail(475392,"37520","Oignons","PICT6459a_thumb.jpg",130,86,18);thumbnails[475393]=new thumbnail(475393,"37520","Olives","PICT6467a_thumb.jpg",130,178,18);thumbnails[475394]=new thumbnail(475394,"37520","Cartes postales","PICT6486a_thumb.jpg",130,195,18);thumbnails[523476]=new thumbnail(523476,"40435","Box of tissues","PICT7620_thumb.jpg",130,159,18);thumbnails[523477]=new thumbnail(523477,"40435","Tennis balls","PICT7585_thumb.jpg",130,246,18);thumbnails[523482]=new thumbnail(523482,"28293","Splash","PICT6897_thumb.jpg",130,161,18);thumbnails[523483]=new thumbnail(523483,"40435","Wine spill","Wine_thumb.6849.jpg",130,135,18);thumbnails[523485]=new thumbnail(523485,"40435","Microscope","Microscope_thumb.7461.jpg",130,195,18);thumbnails[523491]=new thumbnail(523491,"40435","Mobile TV","PICT7544_thumb.jpg",130,95,18);thumbnails[523495]=new thumbnail(523495,"40441","Big surf","BigSurf_thumb.243.jpg",130,66,18);thumbnails[523527]=new thumbnail(523527,"28293","Bluebells","Bluebell_thumb.206.jpg",130,85,18);thumbnails[523528]=new thumbnail(523528,"28293","White out","631_thumb.jpg",130,150,18);thumbnails[523530]=new thumbnail(523530,"40441","Dribbling","464_thumb.jpg",130,79,18);thumbnails[523584]=new thumbnail(523584,"40435","Mobile","A4KM47_thumb.jpg",130,92,18);thumbnails[523588]=new thumbnail(523588,"40441","Showjumping","AT404E_thumb.jpg",130,97,18);thumbnails[523887]=new thumbnail(523887,"28293","Cherhill","162_thumb.jpg",130,194,18);thumbnails[523891]=new thumbnail(523891,"28293","Royal Crescent","509_thumb.jpg",130,76,18);thumbnails[523894]=new thumbnail(523894,"40441","Thai boxing","958_thumb.jpg",130,109,18);thumbnails[855111]=new thumbnail(855111,"40435","Splash!","PICT6893_thumb.jpg",130,196,18);thumbnails[855217]=new thumbnail(855217,"40441","Drummers drumming","Trooping_thumb.1107.jpg",130,86,18);thumbnails[855218]=new thumbnail(855218,"40441","Rowing","723_thumb.jpg",130,85,18);thumbnails[915604]=new thumbnail(915604,"69638","","PICT9487_thumb.jpg",130,87,18);thumbnails[915607]=new thumbnail(915607,"69638","","HarryDracula_thumb.625.jpg",130,87,18);thumbnails[915609]=new thumbnail(915609,"69638","","PICT9258_thumb.jpg",130,87,18);thumbnails[915611]=new thumbnail(915611,"69638","","PICT8628_thumb.jpg",130,195,18);thumbnails[915613]=new thumbnail(915613,"69638","","PICT10463_thumb.jpg",130,195,18);thumbnails[915615]=new thumbnail(915615,"69638","","PICT1225_thumb.jpg",130,195,18);thumbnails[915617]=new thumbnail(915617,"69638","","WithHairlight9303_thumb.jpg",130,195,18);thumbnails[915623]=new thumbnail(915623,"69638","","PICT8755Grey_thumb.jpg",130,87,18);thumbnails[915625]=new thumbnail(915625,"69638","","KissDJ_thumb.10357.jpg",130,87,18);thumbnails[915632]=new thumbnail(915632,"69638","","WithH-S9002_thumb.jpg",130,87,18);thumbnails[916048]=new thumbnail(916048,"40435","Watermelon","PICT108111_thumb.jpg",130,91,18);thumbnails[916081]=new thumbnail(916081,"40441","","PICT6759 copy_thumb.jpg",130,86,18);thumbnails[916080]=new thumbnail(916080,"40435","","PICT8878_thumb.jpg",130,196,18);thumbnails[916077]=new thumbnail(916077,"40435","","Stereo@f22_thumb.1020.jpg",130,87,18);thumbnails[916076]=new thumbnail(916076,"40435","","PICT0234_thumb.jpg",130,102,18);thumbnails[44848]=new thumbnail(44848,"4617","Marble Temple, Bangkok","AH909B_thumb.jpg",130,198,18);thumbnails[44855]=new thumbnail(44855,"4617","Himalayan terraces","Terraces_thumb.jpg",130,197,18);thumbnails[44858]=new thumbnail(44858,"4617","Woman and child","NepalBaby_thumb.jpg",130,198,18);thumbnails[44862]=new thumbnail(44862,"4617","Pisa","Pisa_thumb.jpg",130,198,18);thumbnails[44866]=new thumbnail(44866,"4617","Lake Phewa, Nepal","LakePhewa1_thumb.jpg",130,92,18);thumbnails[64731]=new thumbnail(64731,"4617","Camels crossing river, Agra","099_thumb.jpg",130,188,18);thumbnails[64734]=new thumbnail(64734,"4617","Belly dancer costumes","3441_thumb.jpg",130,86,18);thumbnails[111239]=new thumbnail(111239,"4617","Belly dancing","PICT32221_thumb.jpg",130,196,18);thumbnails[523484]=new thumbnail(523484,"4617","Smoothie stall","Bangkok_thumb.1094.jpg",130,199,18);thumbnails[523488]=new thumbnail(523488,"4617","Floating market","Damnoen_thumb.614.jpg",130,215,18);thumbnails[523494]=new thumbnail(523494,"4617","Shell hunter","Sarawak_thumb.555.jpg",130,173,18);thumbnails[523883]=new thumbnail(523883,"4617","Man & prayer wheel","091_thumb.jpg",130,181,18);thumbnails[523885]=new thumbnail(523885,"4617","Agra","0991_thumb.jpg",130,192,18);thumbnails[523918]=new thumbnail(523918,"4617","Floating market","FloatMarket1_thumb.jpg",130,196,18);thumbnails[855113]=new thumbnail(855113,"4617","Grand Palace, Bangkok","Guard_thumb.1095.jpg",130,199,18);thumbnails[523601]=new thumbnail(523601,"4617","Banana boat","Damnoen_thumb.110.jpg",130,197,18);thumbnails[44859]=new thumbnail(44859,"4613","Westminster at night","Westminster_thumb.jpg",130,85,18);thumbnails[44863]=new thumbnail(44863,"4613","London Eye","BigBen_thumb.jpg",130,91,18);thumbnails[44864]=new thumbnail(44864,"4613","Nelson Mandela","Mandela_thumb.jpg",130,129,18);thumbnails[44867]=new thumbnail(44867,"4613","South Bank Centre","NatTheatre1_thumb.jpg",130,85,18);thumbnails[44871]=new thumbnail(44871,"4613","Big Ben","AJ81732_thumb.jpg",130,206,18);thumbnails[64729]=new thumbnail(64729,"4613","Great Hall, British Museum","479_thumb.jpg",130,86,18);thumbnails[64733]=new thumbnail(64733,"4613","Swiss Re building & Tower of London","134_thumb.jpg",130,88,18);thumbnails[208138]=new thumbnail(208138,"4613","BT Tower","POTower_thumb.d5365.jpg",130,86,18);thumbnails[208139]=new thumbnail(208139,"4613","Langham Place","LanghamPlace_thumb.d5388.jpg",130,196,18);thumbnails[523913]=new thumbnail(523913,"4613","Charing Cross","CharingX_thumb.Dawn.155.jpg",130,185,18);thumbnails[44844]=new thumbnail(44844,"4616","Pig in muck","AD62EB_thumb.jpg",130,85,18);thumbnails[44850]=new thumbnail(44850,"4616","Sunflowers","AD62F5_thumb.jpg",130,85,18);thumbnails[44851]=new thumbnail(44851,"4616","Grey seal","AD63021_thumb.jpg",130,85,18);thumbnails[103363]=new thumbnail(103363,"4616","Bearcat","Bearcat_thumb.D2446.jpg",130,184,18);thumbnails[103365]=new thumbnail(103365,"4616","Gorilla","Gorilla_thumb.D2420a.jpg",130,175,18);thumbnails[103366]=new thumbnail(103366,"4616","Leopard","Leopard_thumb.d2456.jpg",130,196,18);thumbnails[106195]=new thumbnail(106195,"4616","Wallaby","Wallaby_thumb.D2719.jpg",130,183,18);thumbnails[523493]=new thumbnail(523493,"4616","Red Breasted Goose","RedBreastedGoose_thumb.D0714.jpg",130,168,18);thumbnails[523888]=new thumbnail(523888,"4616","Blue zoom","191_thumb.jpg",130,84,18);thumbnails[855115]=new thumbnail(855115,"4616","White on white","6311_thumb.jpg",130,150,18);thumbnails[44843]=new thumbnail(44843,"4615","Pumpkins, Vermont","AB1264_thumb.jpg",130,86,18);thumbnails[44852]=new thumbnail(44852,"4615","Fall foliage","Fall_thumb.jpg",130,83,18);thumbnails[191054]=new thumbnail(191054,"4615","Fall color","fallcolor_thumb.jpg",130,84,18);thumbnails[191072]=new thumbnail(191072,"4615","Sturbridge","Sturbridge_thumb.jpg",130,90,18);thumbnails[337544]=new thumbnail(337544,"4615","Middlebury, VT","middlebury01_thumb.jpg",130,181,18);thumbnails[523480]=new thumbnail(523480,"4615","Zoom burst, autumn","FallZoomburst_thumb.946.jpg",130,83,18);thumbnails[44856]=new thumbnail(44856,"4614","Thai Roses","Roses_thumb.jpg",130,79,18);thumbnails[44861]=new thumbnail(44861,"4614","Orange tulips","Tulips_thumb.jpg",130,84,18);thumbnails[44868]=new thumbnail(44868,"4614","Chains","Chains2_thumb.jpg",130,88,18);thumbnails[191060]=new thumbnail(191060,"4614","Snowdrop","Snowdrops_thumb.d4803.jpg",130,178,18);thumbnails[337563]=new thumbnail(337563,"4614","Winter","kWh_thumb.d5492.jpg",130,86,18);thumbnails[523486]=new thumbnail(523486,"4614","Gonks","ISO100_thumb.1285.jpg",130,86,18);thumbnails[523490]=new thumbnail(523490,"4614","Stamps","Stamps_thumb.7454.jpg",130,89,18);thumbnails[523890]=new thumbnail(523890,"4614","Jetsam","476 copy_thumb.jpg",130,85,18);thumbnails[523916]=new thumbnail(523916,"4614","Deckchairs","Deckchair_thumb.jpg",130,90,18);thumbnails[855116]=new thumbnail(855116,"4614","Flip Flops","PICT7063_thumb.jpg",130,86,18);thumbnails[907537]=new thumbnail(907537,"4614","Watermelon","PICT10811_thumb.jpg",130,91,18);thumbnails[96715]=new thumbnail(96715,"4614","Peppers","Peppers_thumb.D1263.jpg",130,196,18);thumbnails[96716]=new thumbnail(96716,"4614","Kettle","PICT0457_thumb.MRW.jpg",130,196,18);thumbnails[96718]=new thumbnail(96718,"4614","Hellebore","HelleboreO_thumb.D0341.jpg",130,201,18);thumbnails[44873]=new thumbnail(44873,"4614","Pimentoes","A36N66_thumb.jpg",130,193,18);thumbnails[44874]=new thumbnail(44874,"4614","Raspberries","AAKM6C_thumb.jpg",130,127,18);var galleries=new Object();galleries[40441]=new gallery(40441,"191056","Action","gallery",[191056,191057,523495,523530,523588,523894,855217,855218,916081]);galleries[28293]=new gallery(28293,"106205,44854,44838","Monochrome","gallery",[44838,44854,96714,106205,337561,337562,337566,523482,523527,523528,523887,523891]);galleries[37520]=new gallery(37520,"475390","Nice 2006","gallery",[475388,475389,475390,475391,475392,475393,475394]);galleries[69638]=new gallery(69638,"915632","Portraits","gallery",[915604,915607,915609,915611,915613,915615,915617,915623,915625,915632]);galleries[40435]=new gallery(40435,"523483,191051,96721,64739","Product photography","gallery",[64739,96721,191051,523476,523477,523483,523485,523491,523584,855111,916048,916080,916077,916076]);galleries[40442]=new gallery(40442,"523918,523494,475390,191054,64731,44871,44863,44855,44852,44843","Travel ","gallery",[]);galleries[4617]=new gallery(4617,"523918,523494,64731,44855","Heading East","gallery",[44848,44855,44858,44862,44866,64731,64734,111239,523484,523488,523494,523883,523885,523918,855113,523601]);galleries[4613]=new gallery(4613,"44871,44863","London architecture","gallery",[44859,44863,44864,44867,44871,64729,64733,208138,208139,523913]);galleries[4616]=new gallery(4616,"523888,106195,103365,44844","Wildlife","gallery",[44844,44850,44851,103363,103365,103366,106195,523493,523888,855115]);galleries[4615]=new gallery(4615,"191054,44852,44843","New England","gallery",[44843,44852,191054,191072,337544,523480]);galleries[4614]=new gallery(4614,"191060,96718,96715,44874,44868,44856","Still life","gallery",[44856,44861,44868,191060,337563,523486,523490,523890,523916,855116,907537,96715,96716,96718,44873,44874]);var imageSets=new Object();imageSets[1]="523888,523527,475390,337561,191056,191051,96718,64733,44874,44838";imageSets[2]="915632,523918,523888,523494,523483,475390,191060,191056,191054,191051,106205,106195,103365,96721,96718,96715,64739,64731,44874,44871,44868,44863,44856,44855,44854,44852,44844,44843,44838";imageSets[3]="916081,916080,916077,916076,916048,915632,915625,915623,915617,915615,915613,915611,915609,915607,915604,907537,855218,855217,855116,855115,855113,855111,523918,523916,523913,523894,523891,523890,523888,523887,523885,523883,523601,523588,523584,523530,523528,523527,523495,523494,523493,523491,523490,523488,523486,523485,523484,523483,523482,523480";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 34:b="http://www9.clikpic.com/chrisgeorge/images";break}switch(a){case 1:b="http://www1.clikpic.com/chrisgeorge/images";break}switch(a){case 2:b="http://admin.clikpic.com/chrisgeorge/images";break}switch(a){case 4:b="http://www.clikchurch.com/chrisgeorge/images";break}switch(a){case 5:b="http://www2.clikpic.com/chrisgeorge/images";break}switch(a){case 15:b="http://www3.clikpic.com/chrisgeorge/images";break}switch(a){case 21:b="http://www6.clikpic.com/chrisgeorge/images";break}switch(a){case 18:b="http://www4.clikpic.com/chrisgeorge/images";break}switch(a){case 19:b="http://www5.clikpic.com/chrisgeorge/images";break}switch(a){case 22:b="http://tpc5/clikpic/chrisgeorge/images";break}switch(a){case 23:b="http://tpc10/clikpic/chrisgeorge/images";break}switch(a){case 24:b="http://tpc15/clikpic/chrisgeorge/images";break}switch(a){case 25:b="http://tpc16/clikpic/chrisgeorge/images";break}switch(a){case 31:b="http://www7.clikpic.com/chrisgeorge/images";break}switch(a){case 32:b="http://admin2.clikpic.com/chrisgeorge/images";break}switch(a){case 33:b="http://www8.clikpic.com/chrisgeorge/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="Chris George 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>"}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="chrisgeorge@compuserve.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="chrisgeorge@compuserve.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+'")'})}}};