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[2562158]=new thumbnail(2562158,"163628","","505625840_8ada425b41_o_thumb.jpg",130,193,32);thumbnails[2562159]=new thumbnail(2562159,"163615","","537473405_25156f080d_o_thumb.jpg",130,99,32);thumbnails[2562749]=new thumbnail(2562749,"","","1495674975_17be48347e_o_thumb.jpg",130,195,32);thumbnails[2562751]=new thumbnail(2562751,"","","1495724901_9ca8069d54_o2_thumb.jpg",130,147,32);thumbnails[2562811]=new thumbnail(2562811,"163615","","2078456678_9b0ad485cb_o_thumb.jpg",130,90,32);thumbnails[2562870]=new thumbnail(2562870,"163615","","2335080161_3618c357f2_o_thumb.jpg",130,88,32);thumbnails[2562872]=new thumbnail(2562872,"163615","","2335080383_019f24e64b_o_thumb.jpg",130,104,32);thumbnails[2562873]=new thumbnail(2562873,"163615","","2337459311_d03f24c5e3_o_thumb.jpg",130,96,32);thumbnails[2562874]=new thumbnail(2562874,"163615","","2392216775_2ba42b9fba_o_thumb.jpg",130,93,32);thumbnails[2562875]=new thumbnail(2562875,"163615","","2393049758_ed486239b5_o_thumb.jpg",130,96,32);thumbnails[2562876]=new thumbnail(2562876,"163628","","2403955426_a44ab14719_o_thumb.jpg",130,88,32);thumbnails[2562935]=new thumbnail(2562935,"163615","","2503242364_a6a4972e84_o_thumb.jpg",130,88,32);thumbnails[2562945]=new thumbnail(2562945,"163615","","2613248419_ac2203dab4_o_thumb.jpg",130,143,32);thumbnails[2562949]=new thumbnail(2562949,"163615","","2614080974_18b7860c15_o_thumb.jpg",130,94,32);thumbnails[2612245]=new thumbnail(2612245,"163615","","527865723_6925e1bce0_b_thumb.jpg",130,100,32);thumbnails[2612249]=new thumbnail(2612249,"","","1497459888_05b158f4f5_b_thumb.jpg",130,138,32);thumbnails[2612255]=new thumbnail(2612255,"163615","","1558721187_6d01ff3934_o_thumb.jpg",130,94,32);thumbnails[2612258]=new thumbnail(2612258,"163628","","2388124842_6b7c075d62_b_thumb.jpg",130,98,32);thumbnails[2712754]=new thumbnail(2712754,"163615","","dai_profile_hand_thumb.jpg",130,166,32);thumbnails[3864817]=new thumbnail(3864817,"252809","","noriko_april09_12_thumb.jpg",130,124,32);thumbnails[3930226]=new thumbnail(3930226,"252809","","noriko_piano_may09_02smaller_thumb.jpg",130,225,32);thumbnails[3930227]=new thumbnail(3930227,"252809","","noriko_piano_may09_04smaller_thumb.jpg",130,87,32);thumbnails[3930230]=new thumbnail(3930230,"252809","","noriko_piano_may09_08smaller_thumb.jpg",130,207,32);thumbnails[4280671]=new thumbnail(4280671,"252809","","noriko_piano_may09_14_smaller_thumb.jpg",130,133,32);thumbnails[4280673]=new thumbnail(4280673,"252809","","noriko_piano_may09_19_smaller_thumb.jpg",130,201,32);thumbnails[5007984]=new thumbnail(5007984,"163615","","milena_Oct09_thumb.jpg",130,124,32);thumbnails[5078054]=new thumbnail(5078054,"163615","","Theo_red_hat_nov09_thumb.jpg",130,130,32);thumbnails[6598922]=new thumbnail(6598922,"163615","","4128827058_8c7a380d6f_z_thumb.jpg",130,109,32);thumbnails[6598923]=new thumbnail(6598923,"163615","","4559629165_588ee9aaf6_z_thumb.jpg",130,130,32);thumbnails[6598929]=new thumbnail(6598929,"163615","","3788774739_4e17f904a3_z_thumb.jpg",130,92,32);thumbnails[2562809]=new thumbnail(2562809,"163204","","1859280103_519705e83e_o_1_thumb.jpg",130,100,32);thumbnails[2562857]=new thumbnail(2562857,"163204","","2130901261_aa4d9ea4b3_o_thumb.jpg",130,127,32);thumbnails[2562866]=new thumbnail(2562866,"163204","","2288497337_a447e3668a_o-1_thumb.jpg",130,135,32);thumbnails[2562939]=new thumbnail(2562939,"163204","","2561452359_d1a00bbd50_o_thumb.jpg",130,189,32);thumbnails[2562981]=new thumbnail(2562981,"163204","","2304717776_4b21edff18_o_thumb.jpg",130,92,32);thumbnails[2562994]=new thumbnail(2562994,"163204","","2710032096_9f420a591a_o_thumb.jpg",130,98,32);thumbnails[2612257]=new thumbnail(2612257,"163204","","1859461963_1c46862b76_b_thumb.jpg",130,195,32);thumbnails[5007921]=new thumbnail(5007921,"163204","","sunbeams_over_the_sea_thumb.jpg",130,86,32);thumbnails[5007928]=new thumbnail(5007928,"163204","","inviting_sea_thumb.jpg",130,126,32);thumbnails[5007996]=new thumbnail(5007996,"163204","","autumn_bath_thumb.jpg",130,90,32);thumbnails[5278779]=new thumbnail(5278779,"163204","","nordic_sunrise_thumb.jpg",130,84,32);thumbnails[2562752]=new thumbnail(2562752,"163205","","1790595981_c7fb8d46fe_o_thumb.jpg",130,194,32);thumbnails[2562858]=new thumbnail(2562858,"163205","","2139261824_5e54719359_o_thumb.jpg",130,205,32);thumbnails[2562860]=new thumbnail(2562860,"163205","","2140959041_eed6006356_o_thumb.jpg",130,196,32);thumbnails[2562861]=new thumbnail(2562861,"163205","","2140959391_efa0c8185b_o_thumb.jpg",130,140,32);thumbnails[2562863]=new thumbnail(2562863,"163205","","2187003701_54662b2a1d_o_thumb.jpg",130,159,32);thumbnails[2562864]=new thumbnail(2562864,"163205","","2203776527_8d198254f9_o_thumb.jpg",130,123,32);thumbnails[2562865]=new thumbnail(2562865,"163205","","2223752116_3d42052883_o_thumb.jpg",130,123,32);thumbnails[2562868]=new thumbnail(2562868,"163205","","2303903399_aa0970d1b6_o_thumb.jpg",130,88,32);thumbnails[2562878]=new thumbnail(2562878,"163205","","2414540532_146c65efa7_o_1_thumb.jpg",130,95,32);thumbnails[2562879]=new thumbnail(2562879,"163205","","2456765249_b285ee0f2f_o_thumb.jpg",130,194,32);thumbnails[2562930]=new thumbnail(2562930,"163205","","2468343513_b434f6fd98_o_thumb.jpg",130,107,32);thumbnails[2562933]=new thumbnail(2562933,"163205","","2489992721_e31d5a8f24_o_thumb.jpg",130,103,32);thumbnails[2562936]=new thumbnail(2562936,"163205","","2525675652_4bed605b33_o-1_thumb.jpg",130,129,32);thumbnails[2562943]=new thumbnail(2562943,"163205","","2599983825_f9cab1265f_o_thumb.jpg",130,157,32);thumbnails[2562983]=new thumbnail(2562983,"163205","","2489992387_abf2d1c4e1_o_thumb.jpg",130,122,32);thumbnails[2562984]=new thumbnail(2562984,"163205","","1793638782_5e8e495351_o_thumb.jpg",130,195,32);thumbnails[2562986]=new thumbnail(2562986,"163205","","1842966988_41c7a1ed4c_o_thumb.jpg",130,87,32);thumbnails[2562987]=new thumbnail(2562987,"163205","","2059072869_d533ef4e36_o_1_thumb.jpg",130,179,32);thumbnails[2562992]=new thumbnail(2562992,"163205","","2459714138_035dcf5d65_o_1_thumb.jpg",130,193,32);thumbnails[2712743]=new thumbnail(2712743,"163205","","brittle_dreams_thumb.jpg",130,87,32);thumbnails[2923717]=new thumbnail(2923717,"163205","","time_travel_thumb.jpg",130,138,32);thumbnails[2923719]=new thumbnail(2923719,"163205","","flat_liner_thumb.jpg",130,121,32);thumbnails[3239669]=new thumbnail(3239669,"163205","","3047191145_3ebb84e914_b_thumb.jpg",130,195,32);thumbnails[3239671]=new thumbnail(3239671,"163205","","3071363932_aa322f1416_b_thumb.jpg",130,147,32);thumbnails[3239674]=new thumbnail(3239674,"163205","","3088713635_311e52d0b9_b_thumb.jpg",130,130,32);thumbnails[3512439]=new thumbnail(3512439,"163205","","embers_thumb.jpg",130,135,32);thumbnails[3864911]=new thumbnail(3864911,"163205","","space_management_thumb.jpg",130,94,32);thumbnails[5007943]=new thumbnail(5007943,"163205","","waves_above_thumb.jpg",130,195,32);thumbnails[5007959]=new thumbnail(5007959,"163205","","imperfections_thumb.jpg",130,141,32);thumbnails[5078040]=new thumbnail(5078040,"163205","","ripple_blue_thumb.jpg",130,131,32);thumbnails[5078048]=new thumbnail(5078048,"163205","","abstract_waves_thumb.jpg",130,130,32);thumbnails[5078183]=new thumbnail(5078183,"163205","","changes_begin_from_within_thumb.jpg",130,121,32);thumbnails[5078212]=new thumbnail(5078212,"163205","","seven_thumb.jpg",130,139,32);thumbnails[5278772]=new thumbnail(5278772,"163205","","the_silken_tie_thumb.jpg",130,204,32);thumbnails[5325908]=new thumbnail(5325908,"163205","","sunshine_thumb.jpg",130,144,32);thumbnails[5325936]=new thumbnail(5325936,"163205","","golden_curves_thumb.jpg",130,195,32);thumbnails[5611886]=new thumbnail(5611886,"163205","","4341161735_a25e3b01fb_b_thumb.jpg",130,130,32);thumbnails[5611891]=new thumbnail(5611891,"163205","","4348435227_21c6df017e_b-1_thumb.jpg",130,130,32);thumbnails[5611893]=new thumbnail(5611893,"163205","","4351324730_39d2958c4a_b_thumb.jpg",130,85,32);thumbnails[5611895]=new thumbnail(5611895,"163205","","4356345254_f30f81511f_b_thumb.jpg",130,130,32);thumbnails[5611905]=new thumbnail(5611905,"163205","","4349183206_82235c7bec_o_thumb.jpg",130,130,32);thumbnails[5611908]=new thumbnail(5611908,"163205","","4385836460_8c49e139f4_b_thumb.jpg",130,130,32);thumbnails[5611910]=new thumbnail(5611910,"163205","","4394827356_acf9232ace_b_thumb.jpg",130,130,32);thumbnails[6598885]=new thumbnail(6598885,"163205","","stratum_for_clickpic1_thumb.jpg",130,130,32);thumbnails[6598913]=new thumbnail(6598913,"163205","","4888158893_9a4eed8645_z_thumb.jpg",130,131,32);thumbnails[6598915]=new thumbnail(6598915,"163205","","4910141739_91810e9353_z_thumb.jpg",130,130,32);thumbnails[6598917]=new thumbnail(6598917,"163205","","4910744092_fe9eb09e48_thumb.jpg",130,155,32);var galleries=new Object();galleries[252809]=new gallery(252809,"4280673,4280671,3930230,3930227,3930226,3864817","Commissions","gallery",[3864817,3930226,3930227,3930230,4280671,4280673]);galleries[163628]=new gallery(163628,"2612258,2562876,2562158","Paris","gallery",[2562158,2562876,2612258]);galleries[163615]=new gallery(163615,"6598929,6598923,6598922,5078054,5007984,2712754,2612255,2612245,2562949,2562945","portrait","gallery",[2562159,2562811,2562870,2562872,2562873,2562874,2562875,2562935,2562945,2562949,2612245,2612255,2712754,5007984,5078054,6598922,6598923,6598929]);galleries[163204]=new gallery(163204,"5278779,5007996,5007928,5007921,2612257,2562994,2562981,2562939,2562866,2562857","Nature","gallery",[2562809,2562857,2562866,2562939,2562981,2562994,2612257,5007921,5007928,5007996,5278779]);galleries[163205]=new gallery(163205,"6598917,6598915,6598913,6598885,5611910,5611908,5611905,5611895,5611893,5611891","Abstract","gallery",[2562752,2562858,2562860,2562861,2562863,2562864,2562865,2562868,2562878,2562879,2562930,2562933,2562936,2562943,2562983,2562984,2562986,2562987,2562992,2712743,2923717,2923719,3239669,3239671,3239674,3512439,3864911,5007943,5007959,5078040,5078048,5078183,5078212,5278772,5325908,5325936,5611886,5611891,5611893,5611895,5611905,5611908,5611910,6598885,6598913,6598915,6598917]);var imageSets=new Object();imageSets[1]="6598929,6598923,6598922,6598917,6598915,6598913,6598885,5611910,5611908,5611905,5611895,5611893,5611891,5611886,5325936,5325908,5278779,5278772,5078212,5078183,5078054,5078048,5078040,5007996,5007984,5007959,5007943,5007928,5007921,4280673,4280671,3930230,3930227,3930226,3864911,3864817,3512439,3239674,3239671,3239669,2923719,2923717,2712754,2712743,2612258,2612257,2612255,2612249,2612245,2562994";imageSets[3]="6598929,6598923,6598922,6598917,6598915,6598913,6598885,5611910,5611908,5611905,5611895,5611893,5611891,5611886,5325936,5325908,5278779,5278772,5078212,5078183,5078054,5078048,5078040,5007996,5007984,5007959,5007943,5007928,5007921,4280673,4280671,3930230,3930227,3930226,3864911,3864817,3512439,3239674,3239671,3239669,2923719,2923717,2712754,2712743,2612258,2612257,2612255,2612249,2612245,2562994";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/milenamihaylova/images";break}switch(a){case 1:b="http://www1.clikpic.com/milenamihaylova/images";break}switch(a){case 2:b="http://admin.clikpic.com/milenamihaylova/images";break}switch(a){case 24:b="http://tpc15/clikpic/milenamihaylova/images";break}switch(a){case 4:b="http://www.clikchurch.com/milenamihaylova/images";break}switch(a){case 5:b="http://www2.clikpic.com/milenamihaylova/images";break}switch(a){case 22:b="http://tpc5/clikpic/milenamihaylova/images";break}switch(a){case 23:b="http://tpc10/clikpic/milenamihaylova/images";break}switch(a){case 25:b="http://tpc16/clikpic/milenamihaylova/images";break}switch(a){case 15:b="http://www3.clikpic.com/milenamihaylova/images";break}switch(a){case 18:b="http://www4.clikpic.com/milenamihaylova/images";break}switch(a){case 19:b="http://www5.clikpic.com/milenamihaylova/images";break}switch(a){case 31:b="http://www7.clikpic.com/milenamihaylova/images";break}switch(a){case 32:b="http://admin2.clikpic.com/milenamihaylova/images";break}switch(a){case 33:b="http://www8.clikpic.com/milenamihaylova/images";break}switch(a){case 34:b="http://www9.clikpic.com/milenamihaylova/images";break}switch(a){case 35:b="http://admin3.clikpic.com/milenamihaylova/images";break}switch(a){case 37:b="http://admin4.clikpic.com/milenamihaylova/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="'+escape(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="Milena Mihaylova 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>"}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+'")'})}}};