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[2147162]=new thumbnail(2147162,"","","2007 Nov 11 013_edited-2_thumb.jpg",130,93,5);thumbnails[2147163]=new thumbnail(2147163,"","","2007 Nov 11 094_edited-1_thumb.jpg",130,93,5);thumbnails[2147164]=new thumbnail(2147164,"","","2007 Nov 11 010_edited-1_thumb.jpg",130,93,5);thumbnails[2147167]=new thumbnail(2147167,"151603","","2007 Nov 12 014_thumb.jpg",130,86,5);thumbnails[2148428]=new thumbnail(2148428,"151574","","Travel1_thumb.JPG",130,98,5);thumbnails[2148449]=new thumbnail(2148449,"151522","","image001_thumb.jpg",130,99,5);thumbnails[2148468]=new thumbnail(2148468,"203532","","2007 Feb 19 061_thumb.JPG",130,104,5);thumbnails[2318167]=new thumbnail(2318167,"151482","London","DSC_5787_thumb.JPG",130,53,5);thumbnails[2318261]=new thumbnail(2318261,"151482","","DSC_5785_thumb.JPG",130,104,5);thumbnails[2318262]=new thumbnail(2318262,"151482","","DSC_5789_thumb.JPG",130,81,5);thumbnails[2323382]=new thumbnail(2323382,"151574","","beach pic_thumb.gif",130,141,5);thumbnails[2323387]=new thumbnail(2323387,"151522","","newmarket race_thumb.gif",130,50,5);thumbnails[2354075]=new thumbnail(2354075,"151514","","2008 Jun 20 004_thumb.JPG",130,45,5);thumbnails[2585122]=new thumbnail(2585122,"151514","","DSC_7721_thumb.JPG",130,93,5);thumbnails[2585123]=new thumbnail(2585123,"151514","","DSC_7722_thumb.JPG",130,71,5);thumbnails[2649117]=new thumbnail(2649117,"202930","","EastAnglianLimousines_04_wm_thumb.jpg",130,73,5);thumbnails[2649152]=new thumbnail(2649152,"202930","","EastAnglianLimousines3_thumb.jpg",130,73,5);thumbnails[2649161]=new thumbnail(2649161,"202930","","EastAnglianLimousinesadvert21_thumb.jpg",130,73,5);thumbnails[3328699]=new thumbnail(3328699,"202955","","2007 Nov 12 020 PINK_thumb.jpg",130,86,5);thumbnails[3328712]=new thumbnail(3328712,"203532","","wedding car_thumb.JPG",130,93,5);thumbnails[3328764]=new thumbnail(3328764,"203532","","1a_thumb.jpg",130,104,5);thumbnails[3337300]=new thumbnail(3337300,"151603","j0399268","j0399268_thumb.jpg",130,163,5);thumbnails[3337431]=new thumbnail(3337431,"151514","","j0309375_thumb.jpg",130,82,5);thumbnails[3337930]=new thumbnail(3337930,"151517","Childrens Party Norwich","j0309665_thumb.jpg",130,93,5);thumbnails[3339355]=new thumbnail(3339355,"203586","","j0216123_thumb.jpg",130,87,5);thumbnails[3341595]=new thumbnail(3341595,"203712","2008 Jun 20 006","2008 Jun 20 0061_thumb.jpg",130,104,5);thumbnails[3892634]=new thumbnail(3892634,"202930","DSC 0002","DSC_0002_thumb.jpg",130,44,5);thumbnails[3892654]=new thumbnail(3892654,"202930","","DSC_00021_thumb.jpg",130,44,5);thumbnails[4551856]=new thumbnail(4551856,"151514","","Caistor_Hall_limo_thumb.jpg",130,93,5);thumbnails[4576438]=new thumbnail(4576438,"265227","64 Hollywood%20Cinema large","64_Hollywood20Cinema_large_thumb.jpg",130,77,5);thumbnails[4576589]=new thumbnail(4576589,"265233","africa alive","africa_alive_thumb.jpg",130,18,5);thumbnails[4581704]=new thumbnail(4581704,"265412","","gobananas_thumb.gif",130,130,5);thumbnails[5432098]=new thumbnail(5432098,"151603","neonorwich","neonorwich_thumb.jpg",130,98,5);thumbnails[5432121]=new thumbnail(5432121,"203289","neonorwich","neonorwich_7A458883-2219-B5B5-4C735017A0ED726B_thumb.jpg",130,98,5);thumbnails[3337301]=new thumbnail(3337301,"203289","","j0399388_thumb.jpg",130,87,5);thumbnails[3337432]=new thumbnail(3337432,"203532","j0313820","j0313820_thumb.jpg",130,87,5);thumbnails[3337931]=new thumbnail(3337931,"151517","Ice-Skating","j0387240_thumb.jpg",130,93,5);thumbnails[3339356]=new thumbnail(3339356,"203586","","j0400107_thumb.jpg",130,87,5);thumbnails[3341405]=new thumbnail(3341405,"151482","","j0422576_thumb.jpg",130,98,5);thumbnails[4576439]=new thumbnail(4576439,"265228","","bewilderwood-logo_thumb.gif",130,52,5);thumbnails[4576590]=new thumbnail(4576590,"265232","","extreem_adventure_thumb.gif",130,111,5);thumbnails[3337302]=new thumbnail(3337302,"203532","Valentines Day","j0399586_thumb.jpg",130,163,5);thumbnails[3337433]=new thumbnail(3337433,"203532","j0341550","j0341550_thumb.jpg",130,93,5);thumbnails[3337932]=new thumbnail(3337932,"151517","Bowling","j0405096_thumb.jpg",130,87,5);thumbnails[3339357]=new thumbnail(3339357,"203586","","j04093721_thumb.jpg",130,130,5);thumbnails[3341406]=new thumbnail(3341406,"151603","j0433006","j0433006_thumb.jpg",130,89,5);thumbnails[4576440]=new thumbnail(4576440,"265229","","pleasurewood_hills_thumb.jpg",130,42,5);thumbnails[4576591]=new thumbnail(4576591,"265231","fakenham race course","fakenham_race_course_thumb.gif",130,29,5);thumbnails[3337303]=new thumbnail(3337303,"151603","j0400659","j0400659_thumb.jpg",130,163,5);thumbnails[3337434]=new thumbnail(3337434,"151574","j0399404","j0399404_thumb.jpg",130,87,5);thumbnails[3337933]=new thumbnail(3337933,"151517","Pizza","j0407468_thumb.jpg",130,132,5);thumbnails[3339358]=new thumbnail(3339358,"151574","","j0438376_thumb.jpg",130,194,5);thumbnails[3341407]=new thumbnail(3341407,"203540","j0436609","j0436609_thumb.jpg",130,87,5);thumbnails[4576441]=new thumbnail(4576441,"265226","tickred","tickred_thumb.jpg",130,14,5);thumbnails[4576592]=new thumbnail(4576592,"265234","","hilltop_thumb.jpg",130,26,5);thumbnails[3337304]=new thumbnail(3337304,"203289","","j0400749_thumb.jpg",130,195,5);thumbnails[3337934]=new thumbnail(3337934,"151517","Cinema","j0408863_thumb.jpg",130,87,5);thumbnails[3339359]=new thumbnail(3339359,"151574","","j0438386_thumb.jpg",130,195,5);thumbnails[3341408]=new thumbnail(3341408,"202955","j0438438","j04384381_thumb.jpg",130,194,5);thumbnails[3337305]=new thumbnail(3337305,"151482","j0406463","j0406463_thumb.jpg",130,104,5);thumbnails[3337436]=new thumbnail(3337436,"151603","j0407042","j0407042_thumb.jpg",130,87,5);thumbnails[3339360]=new thumbnail(3339360,"203587","j0439332","j0439332_thumb.jpg",130,87,5);thumbnails[3337306]=new thumbnail(3337306,"151482","j0422275","j0422275_thumb.jpg",130,130,5);thumbnails[3337437]=new thumbnail(3337437,"151603","j0409372","j0409372_thumb.jpg",130,130,5);thumbnails[3339361]=new thumbnail(3339361,"203712","j0439443","j0439443_thumb.jpg",130,87,5);thumbnails[3337307]=new thumbnail(3337307,"151482","j0422670","j0422670_thumb.jpg",130,88,5);thumbnails[3337438]=new thumbnail(3337438,"151514","","j04222751_thumb.jpg",130,130,5);thumbnails[3337308]=new thumbnail(3337308,"151482","","j0422871_thumb.jpg",130,132,5);thumbnails[3337439]=new thumbnail(3337439,"203532","j0422454","j0422454_thumb.jpg",130,195,5);thumbnails[3337309]=new thumbnail(3337309,"151522","","j0424435_thumb.jpg",130,87,5);thumbnails[3337440]=new thumbnail(3337440,"203540","j0422750","j0422750_thumb.jpg",130,132,5);thumbnails[3337310]=new thumbnail(3337310,"203289","","j0428639_thumb.jpg",130,87,5);thumbnails[3337441]=new thumbnail(3337441,"203289","j0423029","j0423029_thumb.jpg",130,130,5);thumbnails[3337311]=new thumbnail(3337311,"203532","j0436518","j0436518_thumb.jpg",130,108,5);thumbnails[3337442]=new thumbnail(3337442,"203289","j0430476","j0430476_thumb.jpg",130,130,5);thumbnails[3337312]=new thumbnail(3337312,"203289","","j0436535_thumb.jpg",130,87,5);thumbnails[3337443]=new thumbnail(3337443,"203289","j0430707","j0430707_thumb.jpg",130,87,5);thumbnails[3337313]=new thumbnail(3337313,"151603","j0436615","j0436615_thumb.jpg",130,194,5);thumbnails[3337444]=new thumbnail(3337444,"203540","j0432728","j0432728_thumb.jpg",130,87,5);thumbnails[3337314]=new thumbnail(3337314,"151603","j0438548","j0438548_thumb.jpg",130,103,5);thumbnails[3337446]=new thumbnail(3337446,"151603","j0438438","j0438438_thumb.jpg",130,194,5);thumbnails[3337447]=new thumbnail(3337447,"203540","","j0438736_thumb.jpg",130,98,5);var galleries=new Object();galleries[202930]=new gallery(202930,"3892654,3892634,2649161,2649152,2649117","About Us","section183757",[2649117,2649152,2649161,3892634,3892654]);galleries[265233]=new gallery(265233,"4576589","Africa Alive!","section319496",[4576589]);galleries[151574]=new gallery(151574,"3339359,3339358,3337434,2323382,2148428","Airport Transfers","section193619",[2148428,2323382,3337434,3339358,3339359]);galleries[265228]=new gallery(265228,"4576439","BeWILDerwood","section319496",[4576439]);galleries[203540]=new gallery(203540,"3337447","Corporate","section193619",[3341407,3337440,3337444,3337447]);galleries[265232]=new gallery(265232,"4576590","Extreme adventure","section319496",[4576590]);galleries[265231]=new gallery(265231,"4576591","Fakenham race course","section319496",[4576591]);galleries[203587]=new gallery(203587,"3339360","Funeral","section193619",[3339360]);galleries[265412]=new gallery(265412,"4581704","Go Bananas","section319496",[4581704]);galleries[203586]=new gallery(203586,"3339357,3339356,3339355","Hen Nights","section193619",[3339355,3339356,3339357]);galleries[265234]=new gallery(265234,"4576592","Hilltop Outdoor Centre","section319496",[4576592]);galleries[265227]=new gallery(265227,"4576438","Hollywood Cinema","section319496",[4576438]);galleries[151517]=new gallery(151517,"3337930","Kids Party Trips","section193619",[3337930,3337931,3337932,3337933,3337934]);galleries[151482]=new gallery(151482,"3337308","London Trips","section193619",[2318167,2318261,2318262,3341405,3337305,3337306,3337307,3337308]);galleries[151603]=new gallery(151603,"3337303","Night Life","section193619",[2147167,3337300,5432098,3341406,3337303,3337436,3337437,3337313,3337314,3337446]);galleries[202955]=new gallery(202955,"3341408,3328699","Party girl limo","section236097",[3328699,3341408]);galleries[265229]=new gallery(265229,"4576440","Pleasurewood Hills","section319496",[4576440]);galleries[203712]=new gallery(203712,"3341595,3339361","Prom","section193619",[3341595,3339361]);galleries[151522]=new gallery(151522,"3337309","Race Meetings","section193619",[2148449,2323387,3337309]);galleries[203532]=new gallery(203532,"3337302","Romance","section193619",[2148468,3328712,3328764,3337432,3337302,3337433,3337439,3337311]);galleries[203289]=new gallery(203289,"3337301","Stag Nights","section193619",[5432121,3337301,3337304,3337310,3337441,3337442,3337312,3337443]);galleries[265226]=new gallery(265226,"4576441","Tick Red","section319496",[4576441]);galleries[151514]=new gallery(151514,"4551856,3337438,3337431,2585123,2585122,2354075","Weddings","section193619",[2354075,2585122,2585123,3337431,4551856,3337438]);var imageSets=new Object();imageSets[1]="4551856,3892654,2649161,2649152,2649117,2147167,2147164,2147163,2147162";imageSets[2]="3337930,3337447,3337309,3337308,3337303,3337302,3337301";imageSets[3]="5432121,5432098,4581704,4576592,4576591,4576590,4576589,4576441,4576440,4576439,4576438,4551856,3892654,3892634,3341595,3341408,3341407,3341406,3341405,3339361,3339360,3339359,3339358,3339357,3339356,3339355,3337934,3337933,3337932,3337931,3337930,3337447,3337446,3337444,3337443,3337442,3337441,3337440,3337439,3337438,3337437,3337436,3337434,3337433,3337432,3337431,3337314,3337313,3337312,3337311";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/limousines/images";break}switch(a){case 1:b="http://www1.clikpic.com/limousines/images";break}switch(a){case 2:b="http://admin.clikpic.com/limousines/images";break}switch(a){case 24:b="http://tpc15/clikpic/limousines/images";break}switch(a){case 4:b="http://www.clikchurch.com/limousines/images";break}switch(a){case 5:b="http://www2.clikpic.com/limousines/images";break}switch(a){case 22:b="http://tpc5/clikpic/limousines/images";break}switch(a){case 23:b="http://tpc10/clikpic/limousines/images";break}switch(a){case 25:b="http://tpc16/clikpic/limousines/images";break}switch(a){case 15:b="http://www3.clikpic.com/limousines/images";break}switch(a){case 18:b="http://www4.clikpic.com/limousines/images";break}switch(a){case 19:b="http://www5.clikpic.com/limousines/images";break}switch(a){case 31:b="http://www7.clikpic.com/limousines/images";break}switch(a){case 32:b="http://admin2.clikpic.com/limousines/images";break}switch(a){case 33:b="http://www8.clikpic.com/limousines/images";break}switch(a){case 34:b="http://www9.clikpic.com/limousines/images";break}switch(a){case 35:b="http://admin3.clikpic.com/limousines/images";break}switch(a){case 37:b="http://admin4.clikpic.com/limousines/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("section183757"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section183757.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("section183757"!=""){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="East Anglia Limousines: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};