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[112067]=new thumbnail(112067,"10663","Washington Monument","web11_thumb.jpg",130,95,1);thumbnails[112068]=new thumbnail(112068,"10903","Scotts Run 1.","web02_thumb.jpg",130,94,1);thumbnails[112577]=new thumbnail(112577,"10450","Na Pali Coast from above","web03_thumb.jpg",130,198,1);thumbnails[112579]=new thumbnail(112579,"10450","Coffe Field from above","we04_thumb.jpg",130,78,1);thumbnails[114461]=new thumbnail(114461,"10663","US Capitol","web06_thumb.jpg",130,94,1);thumbnails[114462]=new thumbnail(114462,"10450","Vernal Fall","web05_thumb.jpg",130,179,1);thumbnails[116090]=new thumbnail(116090,"223163","Middle of Hiking","web14_thumb.jpg",130,90,1);thumbnails[116110]=new thumbnail(116110,"46962","Gigi's race","web12_thumb.jpg",130,98,1);thumbnails[116111]=new thumbnail(116111,"10450","The Pulpit ","web10_thumb.jpg",130,177,1);thumbnails[117372]=new thumbnail(117372,"10892","","web051_thumb.jpg",130,88,1);thumbnails[117373]=new thumbnail(117373,"10892","Leaf Pattern","web07_thumb.jpg",130,191,1);thumbnails[117474]=new thumbnail(117474,"10903","Scotts Run 2.","web01_thumb.jpg",130,89,1);thumbnails[117503]=new thumbnail(117503,"10450","El Capitan from Valley Floor","web141_thumb.jpg",130,177,1);thumbnails[117517]=new thumbnail(117517,"10450","Half Dome from Yosemite Falls","web021_thumb.jpg",130,95,1);thumbnails[117518]=new thumbnail(117518,"10450","Slip Canyon and across the Cedar Breaks to Brian Head","web09_thumb.jpg",130,93,1);thumbnails[117519]=new thumbnail(117519,"10450","Yosemite Valley from Tunnel View","web04_thumb.jpg",130,76,1);thumbnails[117520]=new thumbnail(117520,"10514","Gokart Drivers","web13_thumb.jpg",130,98,1);thumbnails[118935]=new thumbnail(118935,"10903","View from our window","web031_thumb.jpg",130,95,1);thumbnails[120127]=new thumbnail(120127,"221141","","Hungary, January 2003 096_thumb.jpg",130,173,1);thumbnails[120128]=new thumbnail(120128,"221141","","Hungary, January 2003 131_thumb.jpg",130,131,1);thumbnails[120129]=new thumbnail(120129,"221141","","web111_thumb.jpg",130,145,1);thumbnails[120130]=new thumbnail(120130,"221141","","web121_thumb.jpg",130,98,1);thumbnails[120133]=new thumbnail(120133,"221141","","web17_thumb.jpg",130,83,1);thumbnails[120134]=new thumbnail(120134,"221141","The view from The Chain Bridge","web18_thumb.jpg",130,173,1);thumbnails[121060]=new thumbnail(121060,"10663","Unfinished Church","web011_thumb.jpg",130,189,1);thumbnails[127767]=new thumbnail(127767,"10663","Cable Car and The Alcatraz on the back","web24_thumb.jpg",130,173,1);thumbnails[127768]=new thumbnail(127768,"46962","Find Me","web22_thumb.jpg",130,89,1);thumbnails[127769]=new thumbnail(127769,"10903","Where Lava meet the Ocean","ewb19_thumb.jpg",130,79,1);thumbnails[127770]=new thumbnail(127770,"10903","","web23_thumb.jpg",130,87,1);thumbnails[127771]=new thumbnail(127771,"10903","Waimea Canyon","web25_thumb.jpg",130,88,1);thumbnails[127772]=new thumbnail(127772,"46962","Almost There","web26_thumb.jpg",130,166,1);thumbnails[132122]=new thumbnail(132122,"10892","Birthday Bouquet","web27_thumb.jpg",130,97,1);thumbnails[132123]=new thumbnail(132123,"46962","","web28_thumb.jpg",130,193,1);thumbnails[132125]=new thumbnail(132125,"10663","Water front in Georgetown","web30_thumb.jpg",130,33,1);thumbnails[134602]=new thumbnail(134602,"10663","","web33_thumb.jpg",130,173,1);thumbnails[134605]=new thumbnail(134605,"12362","","web34_thumb.jpg",130,84,1);thumbnails[134607]=new thumbnail(134607,"12362","","web35_thumb.jpg",130,94,1);thumbnails[134610]=new thumbnail(134610,"12362","Farmers Market","web36_thumb.jpg",130,84,1);thumbnails[135827]=new thumbnail(135827,"12362","Pottery Market","web41_thumb.jpg",130,129,1);thumbnails[135840]=new thumbnail(135840,"12362","Byodo-In, Valley of the Temples","web40_thumb.jpg",130,95,1);thumbnails[135843]=new thumbnail(135843,"221141","Hungarian Farmers Market","web39_thumb.jpg",130,98,1);thumbnails[135916]=new thumbnail(135916,"12362","","web38_thumb.jpg",130,134,1);thumbnails[135920]=new thumbnail(135920,"10450","","web37_thumb.jpg",130,98,1);thumbnails[136791]=new thumbnail(136791,"12362","Bakery in 1990","web43_thumb.jpg",130,88,1);thumbnails[136792]=new thumbnail(136792,"12362","Water-melon for Sale","web42_thumb.jpg",130,103,1);thumbnails[157253]=new thumbnail(157253,"","","web12_300_thumb.jpg",130,106,1);thumbnails[202667]=new thumbnail(202667,"10892","","web48_thumb.jpg",130,98,1);thumbnails[202668]=new thumbnail(202668,"10892","Bird in the Center","web49_thumb.jpg",130,98,1);thumbnails[236325]=new thumbnail(236325,"10903","","WEB50_thumb.jpg",130,96,1);thumbnails[267385]=new thumbnail(267385,"223163","","WEB54_thumb.jpg",130,133,1);thumbnails[267415]=new thumbnail(267415,"10903","","WEB67_thumb.jpg",130,173,1);thumbnails[267416]=new thumbnail(267416,"10903","","WEB68_thumb.jpg",130,173,1);thumbnails[267417]=new thumbnail(267417,"10903","","WEB64_thumb.jpg",130,97,1);thumbnails[267418]=new thumbnail(267418,"10903","","WEB65_thumb.jpg",130,98,1);thumbnails[267419]=new thumbnail(267419,"10903","","WEB60_thumb.jpg",130,98,1);thumbnails[267420]=new thumbnail(267420,"10903","","WEB63_thumb.jpg",130,98,1);thumbnails[267421]=new thumbnail(267421,"10903","","WEB62_thumb.jpg",130,94,1);thumbnails[287328]=new thumbnail(287328,"10663","Golden Gate Bridge","WEB041_thumb.jpg",130,51,1);thumbnails[287331]=new thumbnail(287331,"223163","When the Sun Goes Down","WEB023_thumb.jpg",130,59,1);thumbnails[293728]=new thumbnail(293728,"10903","","WEB062_thumb.jpg",130,104,1);thumbnails[293732]=new thumbnail(293732,"10663","July 4. ","WEB73_thumb.jpg",130,142,1);thumbnails[293734]=new thumbnail(293734,"10663","July 4.","WEB72_thumb.jpg",130,147,1);thumbnails[293735]=new thumbnail(293735,"10663","Hammamet from above","WEB301_thumb.jpg",130,163,1);thumbnails[316143]=new thumbnail(316143,"10450","","WEB052_thumb.jpg",130,179,1);thumbnails[316144]=new thumbnail(316144,"10450","","WEB70_thumb.jpg",130,178,1);thumbnails[316145]=new thumbnail(316145,"10450","Sunrise in The Canyon","WEB741_thumb.jpg",130,86,1);thumbnails[316146]=new thumbnail(316146,"10450","EL Capitan","WEB79_thumb.jpg",130,173,1);thumbnails[335456]=new thumbnail(335456,"46962","","WEB83_thumb.jpg",130,111,1);thumbnails[335514]=new thumbnail(335514,"10450","The Nose","WEB791_thumb.jpg",130,173,1);thumbnails[335520]=new thumbnail(335520,"10450","Upper Yosemite Falls","WEB82_thumb.jpg",130,163,1);thumbnails[612678]=new thumbnail(612678,"46962","","DSC_0073web_thumb.jpg",130,87,1);thumbnails[628331]=new thumbnail(628331,"10903","","WEB81_thumb.jpg",130,98,1);thumbnails[628332]=new thumbnail(628332,"10450","","WEB61_thumb.jpg",130,104,1);thumbnails[628333]=new thumbnail(628333,"10903","The Art of Nature","WEB80_thumb.jpg",130,163,1);thumbnails[628334]=new thumbnail(628334,"10903","Sunset Somewhere in Arizona","WEB71_thumb.jpg",130,78,1);thumbnails[1126013]=new thumbnail(1126013,"46962","","WV1_0254 copy_thumb.jpg",130,104,1);thumbnails[1126025]=new thumbnail(1126025,"46962","","WV1_0070 copy_thumb.jpg",130,104,1);thumbnails[1661312]=new thumbnail(1661312,"46962","","WV1_0078 copy copy1_thumb.jpg",130,161,1);thumbnails[1661316]=new thumbnail(1661316,"46962","","DSC_0132 copy copy1_thumb.jpg",130,102,1);thumbnails[1661326]=new thumbnail(1661326,"12362","","Girls by the wall_thumb.jpg",130,112,1);thumbnails[3207861]=new thumbnail(3207861,"195978","Potomac River Gorge Panoramic view ","Panorama1_thumb.jpg",130,46,1);thumbnails[3217383]=new thumbnail(3217383,"195978","Arlington National Cemetery","ArlingtonCem_thumb.Pano..jpg",130,64,1);thumbnails[3217384]=new thumbnail(3217384,"195978","Mickey's Toontown","DisneyLand_thumb.jpg",130,36,1);thumbnails[3217385]=new thumbnail(3217385,"195978","Mommy with Baby","3355_thumb.jpg",130,102,1);thumbnails[3256884]=new thumbnail(3256884,"195978","Monument Valley","Monument Valley Panorama3_thumb.jpg",130,45,1);thumbnails[3256899]=new thumbnail(3256899,"195978","Monument Valley","Monument Valley Panorama1_thumb.jpg",130,41,1);thumbnails[3604873]=new thumbnail(3604873,"195978","","DSC_0220edited96_thumb.jpg",130,87,1);thumbnails[3604880]=new thumbnail(3604880,"195978","","WWIIMemorialPano_thumb.jpg",130,25,1);thumbnails[259000]=new thumbnail(259000,"10903","WEB66","WEB661_thumb.jpg",130,87,1);thumbnails[267386]=new thumbnail(267386,"10450","Napali Coast from above","WEB57_thumb.jpg",130,190,1);thumbnails[267387]=new thumbnail(267387,"10892","Bird of Paradise","WEB58_thumb.jpg",130,88,1);thumbnails[259001]=new thumbnail(259001,"10903","WEB69","WEB69_thumb.jpg",130,98,1);var galleries=new Object();galleries[10663]=new gallery(10663,"293735,293734,293732,287328,134602,132125,127767,121060,114461,112067","| Cityscapes","gallery",[112067,114461,121060,127767,132125,134602,287328,293732,293734,293735]);galleries[221141]=new gallery(221141,"135843,120134,120133,120130,120129,120128,120127","| Cityscapes","gallery",[120127,120128,120129,120130,120133,120134,135843]);galleries[46962]=new gallery(46962,"1661316,1661312,1126025,1126013,612678,335456,132123,127772,127768,116110","| Family","gallery",[116110,127768,127772,132123,335456,612678,1126013,1126025,1661312,1661316]);galleries[10892]=new gallery(10892,"267387,202668,202667,132122,117373,117372","| Flowers","gallery",[117372,117373,132122,202667,202668,267387]);galleries[10514]=new gallery(10514,"117520","| Fun","gallery",[117520]);galleries[10450]=new gallery(10450,"628332,335520,335514,316146,316145,316144,316143,267386,135920,117519","| Landscape","gallery",[112577,112579,114462,116111,117503,117517,117518,117519,135920,316143,316144,316145,316146,335514,335520,628332,267386]);galleries[223163]=new gallery(223163,"287331,267385,116090","| Landscape","gallery",[116090,267385,287331]);galleries[10903]=new gallery(10903,"628334,628333,628331,293728,267421,267420,267419,267418,267417,267416","| Nature","gallery",[112068,117474,118935,127769,127770,127771,236325,267415,267416,267417,267418,267419,267420,267421,293728,628331,628333,628334,259000,259001]);galleries[12362]=new gallery(12362,"1661326,136792,136791,135916,135840,135827,134610,134607,134605","| Travel","gallery",[134605,134607,134610,135827,135840,135916,136791,136792,1661326]);galleries[138391]=new gallery(138391,"","ASIA, AFRICA","gallery",[]);galleries[138392]=new gallery(138392,"287331,267385,135843,120134,120133,120130,120129,120128,120127,116090","EUROPE","gallery",[]);galleries[195978]=new gallery(195978,"3604880,3604873,3256899,3256884,3217385,3217384,3217383,3207861","NEW RELEASES","gallery",[3207861,3217383,3217384,3217385,3256884,3256899,3604873,3604880]);galleries[138387]=new gallery(138387,"628332,335520,335514,316146,316145,316144,316143,293735,293734,293732","NORTH AMERICA","gallery",[]);var imageSets=new Object();imageSets[1]="3256899,3256884,3217384,3217383,3207861";imageSets[3]="3604880,3604873,3256899,3256884,3217385,3217384,3217383,3207861,1661326,1661316,1661312,1126025,1126013,628334,628333,628332,628331,612678,335520,335514,335456,316146,316145,316144,316143,293735,293734,293732,293728,287331,287328,267421,267420,267419,267418,267417,267416,267415,267387,267386,267385,259001,259000,236325,202668,202667,157253,136792,136791,135920";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/domagallery/images";break}switch(a){case 1:b="http://www1.clikpic.com/domagallery/images";break}switch(a){case 2:b="http://admin.clikpic.com/domagallery/images";break}switch(a){case 4:b="http://www.clikchurch.com/domagallery/images";break}switch(a){case 5:b="http://www2.clikpic.com/domagallery/images";break}switch(a){case 15:b="http://www3.clikpic.com/domagallery/images";break}switch(a){case 21:b="http://www6.clikpic.com/domagallery/images";break}switch(a){case 18:b="http://www4.clikpic.com/domagallery/images";break}switch(a){case 19:b="http://www5.clikpic.com/domagallery/images";break}switch(a){case 22:b="http://tpc5/clikpic/domagallery/images";break}switch(a){case 23:b="http://tpc10/clikpic/domagallery/images";break}switch(a){case 24:b="http://tpc15/clikpic/domagallery/images";break}switch(a){case 25:b="http://tpc16/clikpic/domagallery/images";break}switch(a){case 31:b="http://www7.clikpic.com/domagallery/images";break}switch(a){case 32:b="http://admin2.clikpic.com/domagallery/images";break}switch(a){case 33:b="http://www8.clikpic.com/domagallery/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="domagallery.com: "+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+'")'})}}};