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[3952022]=new thumbnail(3952022,"149141","Heron_River_Dee","heron_dee_web_thumb.jpg",130,173,32);thumbnails[3952035]=new thumbnail(3952035,"149141","River_Dee","dee_1_thumb.jpg",130,173,32);thumbnails[3952036]=new thumbnail(3952036,"149141","River_Dee","dee_2_thumb.jpg",130,88,32);thumbnails[3952037]=new thumbnail(3952037,"149141","River_Dee","Dee_3_thumb.jpg",130,162,32);thumbnails[3952038]=new thumbnail(3952038,"149141","River_Dee","dee_4_thumb.jpg",130,173,32);thumbnails[3952043]=new thumbnail(3952043,"149141","River_Dee","dee_51_thumb.jpg",130,98,32);thumbnails[3952044]=new thumbnail(3952044,"149141","River_Dee","dee_6_thumb.jpg",130,98,32);thumbnails[3952045]=new thumbnail(3952045,"149141","River_Dee","dee_8_thumb.jpg",130,98,32);thumbnails[3952047]=new thumbnail(3952047,"149141","River_Dee","dee_9_thumb.jpg",130,98,32);thumbnails[3952048]=new thumbnail(3952048,"149141","River_Dee","dee_10_thumb.jpg",130,173,32);thumbnails[3952049]=new thumbnail(3952049,"149141","River_Dee","dee_11_thumb.jpg",130,98,32);thumbnails[3952052]=new thumbnail(3952052,"149141","River_Dee","dee_12_thumb.jpg",130,173,32);thumbnails[3952053]=new thumbnail(3952053,"149719","Liverpool","pan_thumb.jpg",130,98,32);thumbnails[3952054]=new thumbnail(3952054,"149719","Liverpool","pan_1_thumb.jpg",130,98,32);thumbnails[3952055]=new thumbnail(3952055,"149719","Liverpool","pan_2_thumb.jpg",130,98,32);thumbnails[3952058]=new thumbnail(3952058,"149719","Liverpool","pan_3_thumb.jpg",130,98,32);thumbnails[3952060]=new thumbnail(3952060,"149719","Liverpool","panoramic_hdr_thumb.jpg",130,98,32);thumbnails[2794488]=new thumbnail(2794488,"149141","Chardonnay on the Dee.","lady without bag b& w_thumb.jpg",130,130,32);thumbnails[2507344]=new thumbnail(2507344,"149719","Tall Ship_Liverpool","sratsraad lehmkuhl 1_thumb.jpg",130,98,32);thumbnails[2507338]=new thumbnail(2507338,"149719","Tall Ship_Liverpool","ejmboldt_thumb.jpg",130,98,32);thumbnails[2507396]=new thumbnail(2507396,"149719","Tall Ship_Liverpool","statsraad lehmkuhl 2_thumb.jpg",130,98,32);thumbnails[2270859]=new thumbnail(2270859,"149141","Bandstand","P5100196_thumb.JPG",130,173,32);thumbnails[2270869]=new thumbnail(2270869,"149141","River_Dee","P5100198_thumb.JPG",130,98,32);thumbnails[2270873]=new thumbnail(2270873,"149141","River_Dee","P5100209_thumb.JPG",130,98,32);thumbnails[2270879]=new thumbnail(2270879,"149141","River_Dee","P5110256_thumb.JPG",130,98,32);thumbnails[2270885]=new thumbnail(2270885,"149141","River_Dee","P5110258_thumb.JPG",130,98,32);thumbnails[2270891]=new thumbnail(2270891,"149141","Heron","P5180366_thumb.JPG",130,98,32);thumbnails[2270894]=new thumbnail(2270894,"149743","Leopard_Chester","P5210459_thumb.JPG",130,98,32);thumbnails[2270934]=new thumbnail(2270934,"149743","Leopard_Chester","P5210460_thumb.JPG",130,98,32);thumbnails[2270939]=new thumbnail(2270939,"149742","The_Cross","P5240522_thumb.JPG",130,173,32);thumbnails[2271009]=new thumbnail(2271009,"149742","Eastgate_Clock","P5240524_thumb.JPG",130,173,32);thumbnails[2271023]=new thumbnail(2271023,"149742","Eastgate_Clock","P52405261_thumb.JPG",130,173,32);thumbnails[2271048]=new thumbnail(2271048,"149742","Eastgate","P52405282_thumb.JPG",130,98,32);thumbnails[2271058]=new thumbnail(2271058,"149742","Eastgate_Clock","P5240530_thumb.JPG",130,173,32);thumbnails[2271061]=new thumbnail(2271061,"149742","The_Cross","P5240543_thumb.JPG",130,173,32);thumbnails[2271064]=new thumbnail(2271064,"149141","River Dee","P5240551_thumb.JPG",130,98,32);thumbnails[2271067]=new thumbnail(2271067,"149141","River_Dee","P5240564_thumb.JPG",130,98,32);thumbnails[2271073]=new thumbnail(2271073,"149141","River_Dee","P5240568_thumb.JPG",130,98,32);thumbnails[2271077]=new thumbnail(2271077,"149141","River_Dee","P5240571_thumb.JPG",130,98,32);thumbnails[2271081]=new thumbnail(2271081,"149141","River_Dee","P5310611_thumb.JPG",130,173,32);thumbnails[2271090]=new thumbnail(2271090,"149141","River_Dee","P5310617_thumb.JPG",130,98,32);thumbnails[2271096]=new thumbnail(2271096,"149141","River_Dee","P5310621_thumb.JPG",130,98,32);thumbnails[2271214]=new thumbnail(2271214,"149141","River_Dee","P5310629_thumb.JPG",130,98,32);thumbnails[2271225]=new thumbnail(2271225,"149141","River_Dee","P5310643_thumb.JPG",130,98,32);thumbnails[2271236]=new thumbnail(2271236,"149141","Heron","P5310686_thumb.JPG",130,98,32);thumbnails[2271260]=new thumbnail(2271260,"149141","Heron","P5310698_thumb.JPG",130,98,32);thumbnails[2271271]=new thumbnail(2271271,"149141","Heron","P5310702_thumb.JPG",130,98,32);thumbnails[2278182]=new thumbnail(2278182,"149742","Eastgate_Clock","Chester Clock1_thumb.jpg",130,173,32);thumbnails[2278185]=new thumbnail(2278185,"149742","Eastgate_Clock","Chester Clock2_thumb.jpg",130,173,32);thumbnails[2278192]=new thumbnail(2278192,"149742","Eastgate_Clock","Chester clock4_thumb.jpg",130,98,32);thumbnails[2278195]=new thumbnail(2278195,"149742","Eastgate_Clock","Chester Clockbw5_thumb.jpg",130,173,32);thumbnails[2278217]=new thumbnail(2278217,"149719","Waterfront","Lpool1_thumb.jpg",130,98,32);thumbnails[2278220]=new thumbnail(2278220,"149719","Waterfront","Lpool2_thumb.jpg",130,98,32);thumbnails[2278222]=new thumbnail(2278222,"149719","Waterfront","Lppol3_thumb.jpg",130,98,32);thumbnails[2278224]=new thumbnail(2278224,"149719","Liver_Building","Church41_thumb.jpg",130,98,32);thumbnails[2278235]=new thumbnail(2278235,"149719","Christ_The_King","Church1_thumb.jpg",130,98,32);thumbnails[2278244]=new thumbnail(2278244,"149719","Anglican_Cathedral","Church2_thumb.jpg",130,173,32);thumbnails[2278255]=new thumbnail(2278255,"149719","Anglican_Cathedral","Church3_thumb.jpg",130,98,32);thumbnails[2278264]=new thumbnail(2278264,"149742","Town_Hall","Town hall1_thumb.jpg",130,98,32);thumbnails[2278266]=new thumbnail(2278266,"149742","Town_Hall","Town Hall2_thumb.jpg",130,173,32);thumbnails[2285132]=new thumbnail(2285132,"149719","Ferry_Liverpool","liver ferry_thumb.jpg",130,98,32);thumbnails[2285190]=new thumbnail(2285190,"149719","Liverpool_Ark_Royal","liver ferry2_thumb.jpg",130,71,32);thumbnails[2297087]=new thumbnail(2297087,"149719","Liverpool_Grand_Princess","carnival lpool_thumb.jpg",130,98,32);thumbnails[2309371]=new thumbnail(2309371,"149141","River_Dee","Dee 1406081_thumb.jpg",130,98,32);thumbnails[5271661]=new thumbnail(5271661,"149742","The_Cross","chester_snow_amm_6_thumb.jpg",130,98,32);thumbnails[5271684]=new thumbnail(5271684,"149742","The Cross_Chester","chester_snow_amm_7_thumb.jpg",130,98,32);thumbnails[5271690]=new thumbnail(5271690,"149141","River Dee_Chester","chester_snow_amm_8_thumb.jpg",130,98,32);thumbnails[5271694]=new thumbnail(5271694,"149141","River_Dee,Chester","chester_snow_amm_9_thumb.jpg",130,98,32);thumbnails[5271697]=new thumbnail(5271697,"149141","River_Dee,Chester","chester_snow_amm_10_thumb.jpg",130,173,32);thumbnails[2378648]=new thumbnail(2378648,"149139","Birkenhead_Park","bhead park swiss bridge_thumb.jpg",130,98,32);thumbnails[2278202]=new thumbnail(2278202,"149139","Kites_New_Brighton","Kite2_thumb.jpg",130,98,32);thumbnails[2278213]=new thumbnail(2278213,"149139","Kites_New_Brighton","Kite11_thumb.jpg",130,173,32);thumbnails[2278259]=new thumbnail(2278259,"149139","Kites_New_Brighton","Panda_thumb.jpg",130,173,32);thumbnails[2288527]=new thumbnail(2288527,"149139","New_Brighton","Nbrig1_thumb.jpg",130,98,32);thumbnails[2288528]=new thumbnail(2288528,"149139","New_Brighton","Nbrig2_thumb.jpg",130,98,32);thumbnails[2288529]=new thumbnail(2288529,"149139","Hamilton_Square","Hamsq1_thumb.jpg",130,98,32);thumbnails[2288530]=new thumbnail(2288530,"149139","Hamilton_Square","hamsq2_thumb.jpg",130,98,32);thumbnails[2288531]=new thumbnail(2288531,"149139","Hamilton_Square","hamsq3_thumb.jpg",130,98,32);thumbnails[2288532]=new thumbnail(2288532,"149139","Hamilton_Square","hamsq4_thumb.jpg",130,173,32);thumbnails[2288534]=new thumbnail(2288534,"149139","Port_Sunlight","psun1_thumb.jpg",130,98,32);thumbnails[2288540]=new thumbnail(2288540,"149139","Port_Sunlight","psun2_thumb.jpg",130,98,32);thumbnails[2309362]=new thumbnail(2309362,"149139","Birkenhead_Priory","Bheadpriory3_thumb.jpg",130,98,32);var galleries=new Object();galleries[149742]=new gallery(149742,"5271684,5271661,2278266,2278264,2278195,2278192,2278185,2278182,2271061,2271058","Chester","gallery",[2270939,2271009,2271023,2271048,2271058,2271061,2278182,2278185,2278192,2278195,2278264,2278266,5271661,5271684]);galleries[149743]=new gallery(149743,"2270934,2270894","Chester Zoo","gallery",[2270894,2270934]);galleries[149719]=new gallery(149719,"3952060,3952058,3952055,3952054,3952053,2507396,2507344,2507338,2297087,2285190","Liverpool","gallery",[3952053,3952054,3952055,3952058,3952060,2507344,2507338,2507396,2278217,2278220,2278222,2278224,2278235,2278244,2278255,2285132,2285190,2297087]);galleries[149141]=new gallery(149141,"5271697,5271694,5271690,3952052,3952049,3952048,3952047,3952045,3952044,3952043","River Dee,Chester","gallery",[3952022,3952035,3952036,3952037,3952038,3952043,3952044,3952045,3952047,3952048,3952049,3952052,2794488,2270859,2270869,2270873,2270879,2270885,2270891,2271064,2271067,2271073,2271077,2271081,2271090,2271096,2271214,2271225,2271236,2271260,2271271,2309371,5271690,5271694,5271697]);galleries[149139]=new gallery(149139,"2378648,2309362,2288540,2288534,2288532,2288531,2288530,2288529,2288528,2288527","Wirral","gallery",[2378648,2278202,2278213,2278259,2288527,2288528,2288529,2288530,2288531,2288532,2288534,2288540,2309362]);var imageSets=new Object();imageSets[1]="5271697,5271694,5271690,5271684,5271661,3952060,3952058,3952055,3952054,3952053,3952052,3952049,3952048,3952047,3952045,3952044,3952043,3952038,3952037,3952036,3952035,3952022,2794488,2507396,2507344,2507338,2378648,2309371,2309362,2297087,2288540,2288534,2288532,2288531,2288530,2288529,2288528,2288527,2285190,2285132,2278266,2278264,2278259,2278255,2278244,2278235,2278224,2278222,2278220,2278217";imageSets[3]="5271697,5271694,5271690,5271684,5271661,3952060,3952058,3952055,3952054,3952053,3952052,3952049,3952048,3952047,3952045,3952044,3952043,3952038,3952037,3952036,3952035,3952022,2794488,2507396,2507344,2507338,2378648,2309371,2309362,2297087,2288540,2288534,2288532,2288531,2288530,2288529,2288528,2288527,2285190,2285132,2278266,2278264,2278259,2278255,2278244,2278235,2278224,2278222,2278220,2278217";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/cokguzel/images";break}switch(a){case 1:b="http://www1.clikpic.com/cokguzel/images";break}switch(a){case 2:b="http://admin.clikpic.com/cokguzel/images";break}switch(a){case 4:b="http://www.clikchurch.com/cokguzel/images";break}switch(a){case 5:b="http://www2.clikpic.com/cokguzel/images";break}switch(a){case 15:b="http://www3.clikpic.com/cokguzel/images";break}switch(a){case 21:b="http://www6.clikpic.com/cokguzel/images";break}switch(a){case 18:b="http://www4.clikpic.com/cokguzel/images";break}switch(a){case 19:b="http://www5.clikpic.com/cokguzel/images";break}switch(a){case 22:b="http://tpc5/clikpic/cokguzel/images";break}switch(a){case 23:b="http://tpc10/clikpic/cokguzel/images";break}switch(a){case 24:b="http://tpc15/clikpic/cokguzel/images";break}switch(a){case 25:b="http://tpc16/clikpic/cokguzel/images";break}switch(a){case 31:b="http://www7.clikpic.com/cokguzel/images";break}switch(a){case 32:b="http://admin2.clikpic.com/cokguzel/images";break}switch(a){case 33:b="http://www8.clikpic.com/cokguzel/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="Northwestern Images: "+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+'")'})}}};