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[4224241]=new thumbnail(4224241,"250521","BOTANICUS","Botanicus-copy_resize_thumb.jpg",130,92,15);thumbnails[4224312]=new thumbnail(4224312,"250521","NEWCASTLE HERO","Newcastle-Hero_resize_thumb.jpg",130,171,15);thumbnails[4224376]=new thumbnail(4224376,"250521","GONDOLA PROWS","Gondola_Prows_resize_thumb.jpg",130,174,15);thumbnails[4225174]=new thumbnail(4225174,"250521","THE PLATFORM","The-Platform_resize_thumb.jpg",130,90,15);thumbnails[4229964]=new thumbnail(4229964,"250521","THE RED BARN DOOR","Red_Barn_Door_resize_thumb.jpg",130,187,15);thumbnails[4245980]=new thumbnail(4245980,"250521","FOR THE VELVET REVOLUTION","DSC_3181rawAnd2moreSEPIA_re_thumb.jpg",130,89,15);thumbnails[4246035]=new thumbnail(4246035,"250521","CANAL DAYS","Canal_Days_resize_thumb.jpg",130,183,15);thumbnails[5461798]=new thumbnail(5461798,"250521","ARCADE","Central_Arc_thumb.jpg",130,86,15);thumbnails[5461825]=new thumbnail(5461825,"250521","NEW AND OLD","New_and_Old_thumb.jpg",130,83,15);thumbnails[5461849]=new thumbnail(5461849,"250521","CIRCLES","RoundBalconies_thumb.jpg",130,195,15);thumbnails[5461862]=new thumbnail(5461862,"250521","SAGEMAN","Sageman_thumb.jpg",130,87,15);thumbnails[5461876]=new thumbnail(5461876,"250521","THE BRIDGE","The_Bridge_thumb.jpg",130,87,15);thumbnails[4224269]=new thumbnail(4224269,"250521","LIVING COLOUR","Living_Colour_resize1_thumb.jpg",130,195,15);thumbnails[4246039]=new thumbnail(4246039,"250521","AFTERNOONS AND COFFEESPOONS","Afternoons-and-Coffeespoons_thumb.jpg",130,169,15);thumbnails[4229331]=new thumbnail(4229331,"250521","HOTEL PARIZ","112_resize_thumb.jpg",130,187,15);thumbnails[4233318]=new thumbnail(4233318,"250521","GROSSMUNSTER, ZURICH","GrossmunsterZurich-2_resize_thumb.jpg",130,132,15);thumbnails[4317929]=new thumbnail(4317929,"250521","AS WE MOVE THROUGH LIFE","DSC_2991raw_-_CopyAnd2more_thumb.jpg",130,194,15);thumbnails[4229326]=new thumbnail(4229326,"250521","THE GREEN COBBLED YARD","114_resize_thumb.jpg",130,194,15);thumbnails[4226720]=new thumbnail(4226720,"250521","BEAUTY AND DECAY","Beauty_and_decay_by_roodpa_resize_thumb.jpg",130,98,15);thumbnails[4225176]=new thumbnail(4225176,"250909","PLATFORM SHADOWS","Platform_Shadows_resize1_thumb.jpg",130,195,15);thumbnails[4225183]=new thumbnail(4225183,"250909","ASTRO CLOCK","Astro_Clock_resize1_thumb.jpg",130,175,15);thumbnails[4226728]=new thumbnail(4226728,"250909","A RAINY DAY AT RIVER VLTAVA","A_rainy_day_at_River_Vltava_by_roodpa_copy_resize1_thumb.jpg",130,86,15);thumbnails[4230536]=new thumbnail(4230536,"250909","TRICK OF THE LIGHT","Trick_Of_Light_resize1_thumb.jpg",130,195,15);thumbnails[4317926]=new thumbnail(4317926,"250909","THE DARKENING STREETS","DSC_3014rawAnd2more_thumb.jpg",130,195,15);thumbnails[5140074]=new thumbnail(5140074,"250909","DARK HARBOUR","Dark_Harbour_resize_thumb.jpg",130,190,15);thumbnails[5461885]=new thumbnail(5461885,"250909","BLEAK BEAUTY","Bleak_thumb.jpg",130,88,15);thumbnails[4225186]=new thumbnail(4225186,"250909","TIME TRAVEL","Time_Travel_Final_resize1_thumb.jpg",130,195,15);thumbnails[4325797]=new thumbnail(4325797,"250909","UNCHANGED","Unchanged_thumb.jpg",130,87,15);thumbnails[4227414]=new thumbnail(4227414,"250909","WEEL MAY THE KEEL ROW . . .","Weel_May_The_Keel_Row_BW_resize1_thumb.jpg",130,163,15);thumbnails[4225169]=new thumbnail(4225169,"250909","MIND THE GAP","Mind_The_Gap_resize1_thumb.jpg",130,186,15);thumbnails[5461836]=new thumbnail(5461836,"250505","NO QUARTER","No_Quarter_thumb.jpg",130,99,15);thumbnails[5461844]=new thumbnail(5461844,"250505","GREEN STONES","Pebbles_thumb.jpg",130,196,15);thumbnails[5461868]=new thumbnail(5461868,"250505","SOMEWHERE, A CLOCK IS TICKING","Somewhere_A_clock_Is_Ticking_thumb.jpg",130,90,15);thumbnails[4227043]=new thumbnail(4227043,"250505","10,000 FT UP IN THE SWISS ALPS","10000_resize_thumb.jpg",130,52,15);thumbnails[4227355]=new thumbnail(4227355,"250505","THE LAST DEFENCE","The-Last-Defence_resize_thumb.jpg",130,88,15);thumbnails[4227349]=new thumbnail(4227349,"250505","CONSTANT COMPANIONS","Companions_resize_thumb.jpg",130,88,15);thumbnails[4227030]=new thumbnail(4227030,"250505","PAIRS","Pairs_resize_thumb.jpg",130,87,15);thumbnails[5140079]=new thumbnail(5140079,"250505","REVELATION","Revelation_resize_thumb.jpg",130,197,15);thumbnails[5120007]=new thumbnail(5120007,"250505","FLOW","Back_To_The_Ground_thumb.jpg",130,87,15);thumbnails[4229602]=new thumbnail(4229602,"250505","SWISS BARN","Barn_resize_thumb.jpg",130,195,15);thumbnails[4225163]=new thumbnail(4225163,"250543","ZURBAGAN","Zurbagan_resize_thumb.jpg",130,195,15);thumbnails[4230520]=new thumbnail(4230520,"250543","THE YELLOW BUOY","Yelow-Buoy_resize_thumb.jpg",130,144,15);thumbnails[4451583]=new thumbnail(4451583,"250543","TRICOLOUR DOCKSIDE","DSC_4119raw_resize_thumb.jpg",130,193,15);thumbnails[4451587]=new thumbnail(4451587,"250543","WATER LETTERS","DSC_4122raw_resize_thumb.jpg",130,75,15);thumbnails[4902952]=new thumbnail(4902952,"250543","THE CASTLE IN THE LAKE","Castle_Wurth__Scaffhausen_by_roodpa_resize_thumb.jpg",130,164,15);thumbnails[5119995]=new thumbnail(5119995,"250543","ALL AT SEA","All_At_Sea_thumb.jpg",130,87,15);thumbnails[4451809]=new thumbnail(4451809,"250504","ONE DAY MY TIME WILL COME","One_Day_thumb.jpg",130,184,15);thumbnails[4736825]=new thumbnail(4736825,"250504","ON REFLECTION","On_Reflection___resize_thumb.jpg",130,188,15);thumbnails[4902960]=new thumbnail(4902960,"250504","RUNNING ON FAITH","Running_On_Faith_by_roodpa_resize_thumb.jpg",130,95,15);thumbnails[4902969]=new thumbnail(4902969,"250504","THE FUTILITY OF AGE","The_Futility_Of_Age_by_roodpa_resize_thumb.jpg",130,101,15);thumbnails[5120517]=new thumbnail(5120517,"250504","EMBRACING CAPITALISM","Embracing_Capitalism_resize_thumb.jpg",130,163,15);thumbnails[5120580]=new thumbnail(5120580,"250504","THE ARTIST","The_Artist_thumb.jpg",130,196,15);thumbnails[5120581]=new thumbnail(5120581,"250504","THE LONG SHADOWS OF TOURISM","The_Long_Shadows_Of_Tourism_thumb.jpg",130,187,15);thumbnails[5461793]=new thumbnail(5461793,"250504","FUNKY BUSKER","Bass_Busker_thumb.jpg",130,91,15);thumbnails[5461801]=new thumbnail(5461801,"250504","THE BIG ISSUE SELLERS FRIEND","DSC_3092RAW_thumb.jpg",130,195,15);thumbnails[5461812]=new thumbnail(5461812,"250504",'GO ON, ASK HIM "WHY ME?"',"DSC_3095RAW_thumb.jpg",130,169,15);thumbnails[5461820]=new thumbnail(5461820,"250504","LIKELY LADS","Likely_Lads_thumb.jpg",130,162,15);thumbnails[5461826]=new thumbnail(5461826,"250504","NEWCASTLE'S FINEST","Newcastles_Finest_thumb.jpg",130,169,15);thumbnails[4369406]=new thumbnail(4369406,"250504","A CONTRAST IN BODIES","A_Contrast_in_Bodies_thumb.jpg",130,100,15);thumbnails[4560196]=new thumbnail(4560196,"250504","SHADOW SHOPPING","Shadow_Shopping_by_roodpa1_thumb.jpg",130,209,15);thumbnails[4229606]=new thumbnail(4229606,"250504","I ONLY HAVE EYES FOR YOU","Eyes_For_You_resize_thumb.jpg",130,179,15);thumbnails[4224395]=new thumbnail(4224395,"293798","TIME WAS","Time-Was_resize_thumb.jpg",130,88,15);thumbnails[4227347]=new thumbnail(4227347,"293798","THE FLUFFY STUFF","Fluffy_resize_thumb.jpg",130,88,15);thumbnails[4902956]=new thumbnail(4902956,"293798","MOOD FOR A DAY","Mood_For_A_Day_by_roodpa_resize_thumb.jpg",130,87,15);thumbnails[4902963]=new thumbnail(4902963,"293798","THE COMING DAY","The_Coming_Day_by_roodpa_resize_thumb.jpg",130,85,15);thumbnails[5204363]=new thumbnail(5204363,"293798","REIVERS RETREAT","Reivers_Retreat_thumb.jpg",130,87,15);thumbnails[5461785]=new thumbnail(5461785,"293798","AFRICAN SUN","African_Sun_thumb.jpg",130,86,15);thumbnails[4902959]=new thumbnail(4902959,"293798","PURPLE HAZE","Purple_Haze_resize1_thumb.jpg",130,84,15);thumbnails[4229356]=new thumbnail(4229356,"293794","SEAFIELD HOUSE COTTAGE","Seafield-House-Cottage_resi_thumb.jpg",130,195,15);thumbnails[5120519]=new thumbnail(5120519,"293794","PASSING GHOSTS","Passing_Ghosts_thumb.jpg",130,86,15);thumbnails[5120619]=new thumbnail(5120619,"293794","THE SHED ll","The_Shed_ll_thumb.jpg",130,91,15);thumbnails[5203925]=new thumbnail(5203925,"293794","IN CROMWELLS SHADOW","In_Cromwells_Shadow_thumb.jpg",130,86,15);thumbnails[5204361]=new thumbnail(5204361,"293794"," A PLACE IN THE SUN","A_Place_In_The_Sun_thumb.jpg",130,95,15);thumbnails[5241845]=new thumbnail(5241845,"293794","A SEAT IN THE LIGHT","A_Seat_In_The_Light_thumb.jpg",130,86,15);thumbnails[5241848]=new thumbnail(5241848,"293794","DARKNESS APPROACHES","Darkness_Approaches_thumb.jpg",130,197,15);thumbnails[4492665]=new thumbnail(4492665,"293794","THE SUN INN","DSC_1699And2moreA_resize_thumb.jpg",130,197,15);thumbnails[4224387]=new thumbnail(4224387,"293825","ISMAEL","Ismael-2_resize_thumb.jpg",130,105,15);thumbnails[5204359]=new thumbnail(5204359,"293825","JUST DO IT","Just_Do_It_thumb.jpg",130,79,15);thumbnails[4225175]=new thumbnail(4225175,"293825","COLOUR ME FAST","Colour-Me-Fast-2_resize_thumb.jpg",130,105,15);thumbnails[4223722]=new thumbnail(4223722,"250930","MAN OF LETTERS","Man_Letters_resize_thumb.jpg",130,159,15);thumbnails[4223738]=new thumbnail(4223738,"250930","CAUGHT SNAPPING","Caught-Snapping_resize_thumb.jpg",130,111,15);thumbnails[4224381]=new thumbnail(4224381,"250930","THE EXTROVERT","Extrovert_resize_thumb.jpg",130,105,15);thumbnails[4224401]=new thumbnail(4224401,"276270","PUERTO BANUS","Puerto-Banus_resize_thumb.jpg",130,88,15);thumbnails[4224458]=new thumbnail(4224458,"276270","PUERTO CABOPINO","Puerto-Cabopino-1_resize_thumb.jpg",130,94,15);thumbnails[4226705]=new thumbnail(4226705,"250930","THE BLUE BALLOON","Blue_Balloon_resize_thumb.jpg",130,106,15);thumbnails[4227024]=new thumbnail(4227024,"276270","ONCE UPON A TIME . . .","Once_upon_a_time____resize_thumb.jpg",130,88,15);thumbnails[4227361]=new thumbnail(4227361,"250930","RECYCLE","Recycle_resize_thumb.jpg",130,144,15);thumbnails[4227363]=new thumbnail(4227363,"250930","VINO TINTO","Red_Wine_resize_thumb.jpg",130,117,15);thumbnails[4229332]=new thumbnail(4229332,"276270","MARBELLA OLD TOWN","Lane_resize_thumb.jpg",130,188,15);thumbnails[4229589]=new thumbnail(4229589,"276270","A MAN NEEDS A MAID","A_Man_Needs_A_Maid_resize_thumb.jpg",130,87,15);thumbnails[4230489]=new thumbnail(4230489,"276270","MOUNTAIN MOORINGS","Mountain-Moorings_resize_thumb.jpg",130,85,15);thumbnails[4230494]=new thumbnail(4230494,"276270","SPRING BLUE","Spring_Blue_resize1_thumb.jpg",130,195,15);thumbnails[4736820]=new thumbnail(4736820,"276270","DARK DAYS","DSC_0914HDR_resize_thumb.jpg",130,84,15);thumbnails[5120633]=new thumbnail(5120633,"276270","UNDER THE ALHAMBRA","Under_The_Alhambra_thumb.jpg",130,196,15);thumbnails[4223932]=new thumbnail(4223932,"276270","COSTA BEACH LIFE","Costa-Beach-Life_resize_thumb.jpg",130,106,15);thumbnails[4233575]=new thumbnail(4233575,"276270","MAN'S BUILDING, GOD'S SKY","Mans_Building_resize1_thumb.jpg",130,188,15);thumbnails[4224206]=new thumbnail(4224206,"250523","PEARL OF THE QUARTER","Pearl_Of_The_Quarter_resize_thumb.jpg",130,100,15);thumbnails[4224211]=new thumbnail(4224211,"250523","PURPLE PROFUSION","Purple-Profusion_resize_thumb.jpg",130,88,15);thumbnails[4224219]=new thumbnail(4224219,"250523","ZEBRA SWALLOWTAIL BUTTERFLY","Zebra-Swallowtail_resize_thumb.jpg",130,103,15);thumbnails[4229563]=new thumbnail(4229563,"250523","IT'S A TOUGH LIFE!","DSC01190_resize_thumb.JPG",130,111,15);var galleries=new Object();galleries[250521]=new gallery(250521,"5461876,5461862,5461849,5461825,5461798,4317929,4246039,4246035,4245980,4233318,4229964,4229331,4229326,4226720,4225174,4224376,4224312,4224269,4224241","Cities/Towns","gallery",[4224241,4224312,4224376,4225174,4229964,4245980,4246035,5461798,5461825,5461849,5461862,5461876,4224269,4246039,4229331,4233318,4317929,4229326,4226720]);galleries[250909]=new gallery(250909,"5461885,5140074,4325797,4317926,4230536,4225186,4225183,4225176,4225169","Monochrome","gallery",[4225176,4225183,4226728,4230536,4317926,5140074,5461885,4225186,4325797,4227414,4225169]);galleries[250505]=new gallery(250505,"5461868,5461844,5461836,5140079,5120007,4229602,4227355,4227349,4227043,4227030","Landscapes","gallery",[5461836,5461844,5461868,4227043,4227355,4227349,4227030,5140079,5120007,4229602]);galleries[250543]=new gallery(250543,"5119995,4902952,4451583,4230520,4225163","Waterscapes","gallery",[4225163,4230520,4451583,4451587,4902952,5119995]);galleries[250504]=new gallery(250504,"5461826,5461820,5461812,5461801,5461793,5120581,5120580,5120517,4902969,4902960,4736825,4560196,4451809,4369406,4229606","Street/People","gallery",[4451809,4736825,4902960,4902969,5120517,5120580,5120581,5461793,5461801,5461812,5461820,5461826,4369406,4560196,4229606]);galleries[293798]=new gallery(293798,"5461785,5204363,4902963,4902959,4902956,4227347,4224395","Skyscapes","gallery",[4224395,4227347,4902956,4902963,5204363,5461785,4902959]);galleries[293794]=new gallery(293794,"5241848,5241845,5204361,5203925,5120619,5120519,4492665,4229356","Country Life","gallery",[4229356,5120519,5120619,5203925,5204361,5241845,5241848,4492665]);galleries[293825]=new gallery(293825,"5204359,4225175,4224387","Two Wheels","gallery",[4224387,5204359,4225175]);galleries[276270]=new gallery(276270,"5120633,4736820,4233575,4230494,4230489,4229589,4229332,4227024,4224458,4224401,4223932","Andalucia","gallery",[4224401,4224458,4227024,4229332,4229589,4230489,4230494,4736820,5120633,4223932,4233575]);galleries[250930]=new gallery(250930,"4227363,4227361,4226705,4224381,4223738,4223722","Spot Colour","gallery",[4223722,4223738,4224381,4226705,4227361,4227363]);galleries[250523]=new gallery(250523,"4224219,4224211,4224206","Nature/Animals","gallery",[4224206,4224211,4224219,4229563]);var imageSets=new Object();imageSets[1]="5461885,5461876,5461868,5461862,5461849,5461844,5461836,5461826,5461825,5461820,5461812,5461801,5461798,5461793,5461785,5241848,5241845,5204363,5204361,5204359,5203925,5140079,5140074,5120633,5120619,5120581,5120580,5120519,5120517,5120007,5119995,4902969,4902963,4902960,4902959,4902956,4902952,4736825,4736820,4560196,4492665,4451809,4451583,4369406,4325797,4317929,4317926,4246039,4246035,4245980,4233575,4233318,4230536,4230520,4230494,4230489,4229964,4229606,4229602,4229589,4229563,4229356,4229332,4229331,4229326,4227414,4227363,4227361,4227355,4227349,4227347,4227043,4227030,4227024,4226728,4226720,4226705,4225186,4225183,4225176,4225175,4225174,4225169,4225163,4224458,4224401,4224395,4224387,4224381,4224376,4224312,4224269,4224241,4224219,4224211,4224206,4223932,4223738,4223722";imageSets[2]="5461885,5461876,5461868,5461862,5461849,5461844,5461836,5461826,5461825,5461820,5461812,5461801,5461798,5461793,5461785,5241848,5241845,5204363,5204361,5204359,5203925,5140079,5140074,5120633,5120619,5120581,5120580,5120519,5120517,5120007,5119995,4902969,4902963,4902960,4902959,4902956,4902952,4736825,4736820,4560196,4492665,4451809,4451583,4369406,4325797,4317929,4317926,4246039,4246035,4245980,4233575,4233318,4230536,4230520,4230494,4230489,4229964,4229606,4229602,4229589,4229356,4229332,4229331,4229326,4227363,4227361,4227355,4227349,4227347,4227043,4227030,4227024,4226720,4226705,4225186,4225183,4225176,4225175,4225174,4225169,4225163,4224458,4224401,4224395,4224387,4224381,4224376,4224312,4224269,4224241,4224219,4224211,4224206,4223932,4223738,4223722";imageSets[3]="5461885,5461876,5461868,5461862,5461849,5461844,5461836,5461826,5461825,5461820,5461812,5461801,5461798,5461793,5461785,5241848,5241845,5204363,5204361,5204359,5203925,5140079,5140074,5120633,5120619,5120581,5120580,5120519,5120517,5120007,5119995,4736825,4736820,4560196,4492665,4451809,4451587,4451583,4369406,4325797,4317929,4317926,4246039,4246035,4245980,4233575,4233318,4230536,4230520,4230494,4230489,4229964,4229606,4229602,4229589,4229563,4229356,4229332,4229331,4229326,4227363,4227361,4227355,4227349,4227347,4227043,4227030,4227024,4226720,4226705,4225186,4225183,4225176,4225175,4225174,4225169,4225163,4224458,4224401,4224395,4224387,4224381,4224376,4224312,4224269,4224241,4224219,4224211,4224206,4223932,4223738,4223722";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/roodpa/images";break}switch(a){case 1:b="http://www1.clikpic.com/roodpa/images";break}switch(a){case 2:b="http://admin.clikpic.com/roodpa/images";break}switch(a){case 24:b="http://tpc15/clikpic/roodpa/images";break}switch(a){case 4:b="http://www.clikchurch.com/roodpa/images";break}switch(a){case 5:b="http://www2.clikpic.com/roodpa/images";break}switch(a){case 22:b="http://tpc5/clikpic/roodpa/images";break}switch(a){case 23:b="http://tpc10/clikpic/roodpa/images";break}switch(a){case 25:b="http://tpc16/clikpic/roodpa/images";break}switch(a){case 15:b="http://www3.clikpic.com/roodpa/images";break}switch(a){case 18:b="http://www4.clikpic.com/roodpa/images";break}switch(a){case 19:b="http://www5.clikpic.com/roodpa/images";break}switch(a){case 31:b="http://www7.clikpic.com/roodpa/images";break}switch(a){case 32:b="http://admin2.clikpic.com/roodpa/images";break}switch(a){case 33:b="http://www8.clikpic.com/roodpa/images";break}switch(a){case 34:b="http://www9.clikpic.com/roodpa/images";break}switch(a){case 35:b="http://admin3.clikpic.com/roodpa/images";break}switch(a){case 37:b="http://admin4.clikpic.com/roodpa/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="LAB-Digital    : "+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;resizePhotoInfo();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> 				&euro;"+(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="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="ROODPA">';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+'")'})}}};
