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[6241326]=new thumbnail(6241326,"347363","","mod2_thumb.jpg",130,86,18);thumbnails[2912116]=new thumbnail(2912116,"48583","","Upernavik Mountians-5jpg_thumb.jpg",130,103,18);thumbnails[2912122]=new thumbnail(2912122,"48583","","Inuit Cemetry-Iluluisaat-2_thumb.jpg",130,79,18);thumbnails[2912143]=new thumbnail(2912143,"48583","","In Search of Ice made In Heaven-1h_thumb.jpg",130,125,18);thumbnails[2888063]=new thumbnail(2888063,"48583","","In Search of Ice made In Heaven-1dd_thumb.JPG",130,147,18);thumbnails[2803705]=new thumbnail(2803705,"48583","Ilullisat Icefjords","Ice made in Heaven-1_thumb.JPG",130,98,18);thumbnails[2803707]=new thumbnail(2803707,"48583","","Ice made in Heaven-2_thumb.JPG",130,98,18);thumbnails[180076]=new thumbnail(180076,"27233","Title :- 'Fragile Earth'- Ice Wind and Fire.<br>\r\n            based on Icelandic Landscape <br>\r\nMedium:-  Oil on Panel.<br>\r\nSize:-    120cm x 80cm<br>\r\nPrice:-   £500<br>\r\n<br>\r\n","icelandic Landscape-1bd_thumb.jpg",130,55,18);thumbnails[459833]=new thumbnail(459833,"27233","Icelandic Landscape Acrylics on canvas.<br>\r\nSize 120cm x 100cm<br>\r\n£1000","EXHIBITION5_thumb.JPG",130,87,18);thumbnails[459836]=new thumbnail(459836,"27233","Icelandic Landscape Acrylics on canvas.<br>\r\nSize 120 cm x 100cm<br>\r\nPrice £600","EXHIBTION4_thumb.JPG",130,99,18);thumbnails[459838]=new thumbnail(459838,"27233","Arctic Norway Svolvaer Acrylics on canvas.<br>\r\nSize 120cm x 100cm<br>\r\nPrice £600<br>\r\n","EXHIBTION7 NORWAY_thumb.JPG",130,90,18);thumbnails[459856]=new thumbnail(459856,"27233","Title:- After the snow melted.<br>\r\nArctic Landscape based on Tasiilaq in East Greenland. Acrylics on canvas Triptych size 460cm x 150cm.<br>\r\nPrice £3000","Greenlandic Landscape 1a jpg_thumb.jpg",130,60,18);thumbnails[459883]=new thumbnail(459883,"27233","Ittoqqortoormiit East Greenlandic Landscape Acrylics on canvas.<br>\r\nSize 120cm x 90cm<br>\r\nPrice £1000","Greenlandic Landscape-11_thumb.JPG",130,78,18);thumbnails[459884]=new thumbnail(459884,"27233","Greenlandic Landscape and Inuit Hut. <br>\r\nAcrylics on canvas <br>\r\nSize 80cm x 50cm<br>\r\nPrice £500<br>\r\n","Greenlandic Landscape and Inuit hut_thumb.JPG",130,76,18);thumbnails[459890]=new thumbnail(459890,"27233","Iceberg and Midnight sun.<br>\r\nAcrylics on canvas <br>\r\nSize 60cm x 80cm <br>\r\nNFS","Midnight sun and Iceberg_thumb.JPG",130,182,18);thumbnails[459924]=new thumbnail(459924,"27233","Arctic Landscape from the viewing it from the   sea.<br>\r\nOil on canvas <br>\r\nSize 90cm x 60cm<br>\r\nPrice £500","ArcticLandscape from the sea_thumb.JPG",130,53,18);thumbnails[589178]=new thumbnail(589178,"48583","Painting Plein Air  with the Inuit kids of <br>\r\nIttoqqortoomiit East Greenland.<br>\r\nPhoto","Painting with the Inuits children of Ittoqqortoormiit East Greenland_thumb.jpg",130,98,18);thumbnails[589189]=new thumbnail(589189,"48583","Living on the edge- Ittoqqortoormiit East Greenland","ITTOQOOROOMIIT_thumb.JPG",130,98,18);thumbnails[589276]=new thumbnail(589276,"27233","Title:-Icelandic Landscape.<br>\r\nMedium:- Oil on MDF <br>\r\nSize:-   90cm x 50cm<br>\r\nPrice:-  £300","Icelandic 2a oil_thumb.jpg",130,56,18);thumbnails[596215]=new thumbnail(596215,"48583","","2006_0820Arctic-landscape0011_thumb.JPG",130,98,18);thumbnails[596216]=new thumbnail(596216,"48583","","2006_0820Arctic-landscape0008_thumb.JPG",130,98,18);thumbnails[596217]=new thumbnail(596217,"48583","","2006_0820Arctic-landscape0022_thumb.JPG",130,98,18);thumbnails[596218]=new thumbnail(596218,"48583","Walrus bay outside the village of Ittoqqortoormiit. ","2006_0820Arctic-landscape0006_thumb.JPG",130,98,18);thumbnails[596219]=new thumbnail(596219,"48583","","2006_0410Norway-Arctic-10110_thumb.JPG",130,98,18);thumbnails[643424]=new thumbnail(643424,"27233","Arctic Landscape - Norway.","Arctic Norway 1_thumb.jpg",130,174,18);thumbnails[643429]=new thumbnail(643429,"27233","Arctic Landscape-Norway 2","Arctic Norway 2_thumb.jpg",130,163,18);thumbnails[643435]=new thumbnail(643435,"27233","Arctic Landscapew - Norway-3<br>\r\nMedium:- Acrylics on board.<br>\r\nSize:-   40cm x 30cm.<br>\r\nPrice:-  £200 ","Arctic Norway 3_thumb.jpg",130,173,18);thumbnails[643634]=new thumbnail(643634,"48583","","Greenland 4_thumb.jpg",130,98,18);thumbnails[643637]=new thumbnail(643637,"48583","","Greenland 8_thumb.jpg",130,98,18);thumbnails[643641]=new thumbnail(643641,"48583","","Greenland 3_thumb.jpg",130,98,18);thumbnails[644093]=new thumbnail(644093,"48583","","Greenland 9_thumb.jpg",130,98,18);thumbnails[644101]=new thumbnail(644101,"48583","","Greenland 15_thumb.jpg",130,98,18);thumbnails[644104]=new thumbnail(644104,"48583","","Greenland 11_thumb.jpg",130,98,18);thumbnails[644109]=new thumbnail(644109,"48583","Sophie the Husky.","Greenland 13_thumb.jpg",130,98,18);thumbnails[1003899]=new thumbnail(1003899,"27233","Portraits of Iceberg.<br>\r\nSize 60cm x 25cm ","Portraits of Icebergs_thumb..jpg",130,26,18);thumbnails[1003902]=new thumbnail(1003902,"27233","Arctic Landscape<br>\r\nSacred Landscapes - Fragile Earth<br>\r\nSize 60cm x 25cm<br>\r\nPrice £300","Arctic Landscape1_thumb.jpg",130,40,18);thumbnails[1122855]=new thumbnail(1122855,"27233","Ice-Landscape.<br>\r\nSize 40cm x 30cm<br>\r\nPrice £300","Sacred Landscapes-Fragile Earth 3a_thumb.jpg",130,98,18);thumbnails[1122862]=new thumbnail(1122862,"27233","Ice- Landscape.<br>\r\nSize 40cm x 30cm<br>\r\nPrice £300","Sacred Landscape Fragile Earth 2a_thumb.jpg",130,98,18);thumbnails[1122867]=new thumbnail(1122867,"27233","Portrait of Iceberg.","Portrait of Icaberg 1a_thumb.jpg",130,80,18);thumbnails[1214131]=new thumbnail(1214131,"27233","In search of Ice made in Heaven - Greenland.<br>\r\nOil on Mountboard.<br>\r\nSize 120cm x 80cm.<br>\r\nPrice £1200<br>\r\n","PORTRAIT OF ICEBERGS_thumb.jpg",130,65,18);thumbnails[1214242]=new thumbnail(1214242,"27233","Arctic Landscape as viewed from the ship the MS Finnmarken.<br>\r\nOil on MountBoard.Size 120cm x 90cm<br>\r\nPrice £600","Portrait - Arctic Mountains 1a_thumb.jpg",130,91,18);thumbnails[1215687]=new thumbnail(1215687,"27233","Title:- Portrait of Iceberg.<br>\r\nMedium:- Oil on Board.<br>\r\nSize:-100cm x 60cm.<br>\r\nPrice:- £1000 ","Iceberg Island 2_thumb.jpg",130,77,18);thumbnails[1215688]=new thumbnail(1215688,"27233","Title:- Portrait of Iceberg.<br>\r\nMedium:- Oil on mountboard.<br>\r\nSize:-   70cm x 20cm<br>\r\nPrice:-  £400 ","Iceberg 2_thumb.jpg",130,34,18);thumbnails[2803708]=new thumbnail(2803708,"48583","","Ice made in Heaven-3_thumb.JPG",130,98,18);thumbnails[2803710]=new thumbnail(2803710,"48583","","Ice made in Heaven-5_thumb.JPG",130,98,18);thumbnails[2803711]=new thumbnail(2803711,"48583","","Ice made in Heaven-6_thumb.JPG",130,98,18);thumbnails[2803714]=new thumbnail(2803714,"48583","","Ice in the midnight sun_thumb.JPG",130,98,18);thumbnails[2803716]=new thumbnail(2803716,"48583","","Ice made in Heaven-12_thumb.JPG",130,98,18);thumbnails[2803719]=new thumbnail(2803719,"48583","","Ice made in Heaven-16_thumb.JPG",130,98,18);thumbnails[2803720]=new thumbnail(2803720,"48583","","Ice made in Heaven-17_thumb.JPG",130,98,18);thumbnails[2803721]=new thumbnail(2803721,"48583","","Ice made in Heaven-15_thumb.JPG",130,98,18);thumbnails[2803722]=new thumbnail(2803722,"48583","","Icefjords_thumb.JPG",130,55,18);thumbnails[2851711]=new thumbnail(2851711,"48583","","Ice 1aaa_thumb.jpg",130,143,18);thumbnails[2851759]=new thumbnail(2851759,"48583","","Ice 2aa_thumb.jpg",130,62,18);thumbnails[2851812]=new thumbnail(2851812,"48583","","Painting the Icefjords_thumb.jpg",130,156,18);thumbnails[6226928]=new thumbnail(6226928,"332334","The Maltese Flag with the George Cross","Maltese_FlagA_thumb.jpg",130,196,18);thumbnails[6227524]=new thumbnail(6227524,"332334","","VallettaA_thumb.jpg",130,63,18);thumbnails[6227904]=new thumbnail(6227904,"332334","","BalconiesA1_thumb.jpg",130,196,18);thumbnails[6227907]=new thumbnail(6227907,"332334","","Birgu_Grand_Harbour_8A1_thumb.jpg",130,86,18);thumbnails[6227938]=new thumbnail(6227938,"332334","","BormlaA1_thumb.jpg",130,196,18);thumbnails[6227965]=new thumbnail(6227965,"332334","","Valletta_detailsA1_thumb.jpg",130,85,18);thumbnails[6227968]=new thumbnail(6227968,"332334","","Siesta_gossipA1_thumb.jpg",130,86,18);thumbnails[6228022]=new thumbnail(6228022,"332334","","Marsaxlokk_Fishing_boats_2A1_thumb.jpg",130,86,18);thumbnails[6228025]=new thumbnail(6228025,"332334","","Marsaxlokk_Fishing_boatsA1_thumb.jpg",130,86,18);thumbnails[6234537]=new thumbnail(6234537,"27233","","DSC_0043_thumb.JPG",130,46,18);thumbnails[6234564]=new thumbnail(6234564,"27233","","MOD4_thumb.jpg",130,81,18);thumbnails[6241325]=new thumbnail(6241325,"347363","","mod12_thumb.jpg",130,86,18);thumbnails[6241327]=new thumbnail(6241327,"347363","","mod3_803E0D85-24E8-5EC4-4F5B65F8B70B382B_thumb.jpg",130,86,18);thumbnails[6241329]=new thumbnail(6241329,"347363","","mod4_803ECD8B-24E8-5EC4-4FC47EEFEF549CE9_thumb.jpg",130,86,18);thumbnails[6241331]=new thumbnail(6241331,"347363","","mod5_803F7A95-24E8-5EC4-4F902C11E643DEB9_thumb.jpg",130,86,18);thumbnails[6241334]=new thumbnail(6241334,"347363","","mod6_80405A77-24E8-5EC4-4F1A0425B2A853D5_thumb.jpg",130,86,18);thumbnails[6241336]=new thumbnail(6241336,"347363","","mod7_8040ECA6-24E8-5EC4-4F7FC7F686E8A4F4_thumb.jpg",130,86,18);thumbnails[6241338]=new thumbnail(6241338,"347363","","mod8_80418397-24E8-5EC4-4FDBD54F1D6EF434_thumb.jpg",130,86,18);thumbnails[6241340]=new thumbnail(6241340,"347363","","mod9_thumb.jpg",130,86,18);thumbnails[6244552]=new thumbnail(6244552,"347485","Images still to load","lion_mod_A_thumb.jpg",130,86,18);thumbnails[6244700]=new thumbnail(6244700,"347485","I completed this Lion on behalf of Born Free Foundation. ","mod_lion_JU_thumb.jpg",130,86,18);thumbnails[6244708]=new thumbnail(6244708,"347485","","Mod_Lion_Ju1_thumb.jpg",130,86,18);thumbnails[6244720]=new thumbnail(6244720,"347485","My Lion in the Den, 40 were painted.","Mod_Lion_4_thumb.jpg",130,86,18);thumbnails[6244724]=new thumbnail(6244724,"347485","","Mod_lion_5_thumb.jpg",130,86,18);thumbnails[6244741]=new thumbnail(6244741,"347485","During a painting session.","Mod_Lion_A2_thumb.jpg",130,86,18);thumbnails[6281266]=new thumbnail(6281266,"347363","","mod10A_thumb.jpg",130,86,18);thumbnails[6281296]=new thumbnail(6281296,"347363","","mod8A_thumb.jpg",130,86,18);thumbnails[6281300]=new thumbnail(6281300,"347363","","mod6A_thumb.jpg",130,86,18);thumbnails[6281303]=new thumbnail(6281303,"347363","","mod7A_thumb.jpg",130,86,18);thumbnails[6281312]=new thumbnail(6281312,"27233","","mod_AA_thumb.jpg",130,166,18);thumbnails[6281316]=new thumbnail(6281316,"27233","","Upernavik_painting_thumb.jpg",130,109,18);thumbnails[6281321]=new thumbnail(6281321,"347485","","Photo03_3A_thumb.jpg",130,231,18);thumbnails[6281324]=new thumbnail(6281324,"347485","","Photo11_11A_thumb.jpg",130,134,18);thumbnails[6281325]=new thumbnail(6281325,"347485","","Photo12_12_thumb.jpg",130,73,18);thumbnails[6281326]=new thumbnail(6281326,"347485","","Photo17_17A_thumb.jpg",130,73,18);thumbnails[6281328]=new thumbnail(6281328,"347485","","SAHARA-2AA_thumb.jpg",130,73,18);thumbnails[6302612]=new thumbnail(6302612,"27233","Sedna-Mother of the Sea","mod_A_thumb.jpg",130,159,18);thumbnails[6302942]=new thumbnail(6302942,"332334","","Mod-A_thumb.jpg",130,98,18);thumbnails[6302944]=new thumbnail(6302944,"332334","","mod_f_thumb.jpg",130,87,18);thumbnails[6302949]=new thumbnail(6302949,"332334","","mod_h_thumb.jpg",130,172,18);thumbnails[6302953]=new thumbnail(6302953,"332334","","mod_e_thumb.jpg",130,95,18);thumbnails[6302954]=new thumbnail(6302954,"332334","","mod_k_thumb.jpg",130,82,18);thumbnails[6302957]=new thumbnail(6302957,"332334","","St_Publius_Church_thumb.jpg",130,128,18);thumbnails[6302959]=new thumbnail(6302959,"332334","","Mod_B_thumb.jpg",130,147,18);thumbnails[6302960]=new thumbnail(6302960,"332334","","mod_d_thumb.jpg",130,98,18);thumbnails[6234421]=new thumbnail(6234421,"16368","","DSC_0029_thumb.JPG",130,63,18);thumbnails[6234423]=new thumbnail(6234423,"16368","","MOD3_thumb.jpg",130,56,18);thumbnails[6234425]=new thumbnail(6234425,"16368","","MOD5_thumb.jpg",130,76,18);thumbnails[6234475]=new thumbnail(6234475,"16368","","MOD6_thumb.jpg",130,75,18);thumbnails[6234484]=new thumbnail(6234484,"16368","","MOD7_thumb.jpg",130,77,18);thumbnails[6234529]=new thumbnail(6234529,"16368","","MOD8_thumb.jpg",130,78,18);thumbnails[6234531]=new thumbnail(6234531,"16368","","modA_thumb.jpg",130,64,18);thumbnails[6234533]=new thumbnail(6234533,"16368","","MOD11_thumb.jpg",130,118,18);thumbnails[6234967]=new thumbnail(6234967,"16368","","DSC_0003_thumb.JPG",130,35,18);thumbnails[2825929]=new thumbnail(2825929,"176311","","Painting-Upernavik-2_thumb.jpg",130,82,18);thumbnails[2825932]=new thumbnail(2825932,"176311","","Painting-Upernavik-3_thumb.jpg",130,95,18);thumbnails[2825935]=new thumbnail(2825935,"176311","","Painting-Upernavik-5_thumb.jpg",130,89,18);thumbnails[2825942]=new thumbnail(2825942,"176311","","Painting-Upernavik-6jpg_thumb.jpg",130,93,18);thumbnails[2825944]=new thumbnail(2825944,"176311","","Painting-Upernavik-7jpg_thumb.jpg",130,87,18);thumbnails[2825947]=new thumbnail(2825947,"176311","","Painting-Upernavik-8jpg_thumb.jpg",130,85,18);thumbnails[2825950]=new thumbnail(2825950,"176311","","Painting-Upernavik-9jpg_thumb.jpg",130,88,18);thumbnails[2825952]=new thumbnail(2825952,"176311","","Painting-Upernavik-10ajpg_thumb.JPG",130,78,18);thumbnails[2825955]=new thumbnail(2825955,"176311","","Painting-Upernavik-12_thumb.jpg",130,96,18);thumbnails[2825956]=new thumbnail(2825956,"176311","","Painting-Upernavik-13_thumb.jpg",130,86,18);thumbnails[2826655]=new thumbnail(2826655,"176311","","Upernavik sketchbook-a_thumb.jpg",130,37,18);thumbnails[2826659]=new thumbnail(2826659,"176311","","Upernavik sketchbook-c_thumb.jpg",130,83,18);thumbnails[2826663]=new thumbnail(2826663,"176311","","Upernavik sketchbook-d_thumb.jpg",130,80,18);thumbnails[2826679]=new thumbnail(2826679,"176311","","Upernavik sketchbook-e_thumb.jpg",130,65,18);thumbnails[3223971]=new thumbnail(3223971,"176311","Midnight Sun","new-2_thumb.JPG",130,98,18);thumbnails[3223984]=new thumbnail(3223984,"176311","Midnight Sun Upernavik August 2008","new-3_thumb.JPG",130,98,18);thumbnails[3223985]=new thumbnail(3223985,"176311","UPERNAVIK MIDNIGHT SUN.","new-4_thumb.JPG",130,98,18);thumbnails[3223987]=new thumbnail(3223987,"176311","","new-6_thumb.JPG",130,98,18);thumbnails[3223988]=new thumbnail(3223988,"176311","","new-7_thumb.JPG",130,98,18);thumbnails[3223989]=new thumbnail(3223989,"176311","","new-8_thumb.JPG",130,98,18);thumbnails[3223992]=new thumbnail(3223992,"176311","","new-9_thumb.JPG",130,173,18);thumbnails[2825807]=new thumbnail(2825807,"176311","","Painting-Upernavik-1a_thumb.JPG",130,86,18);var galleries=new Object();galleries[27233]=new gallery(27233,"6302612,6281316,6281312,6234564,6234537,1215688,1215687,1214242,1214131,1122867","Gallery 2 Arctic Landscape","gallery",[180076,459833,459836,459838,459856,459883,459884,459890,459924,589276,643424,643429,643435,1003899,1003902,1122855,1122862,1122867,1214131,1214242,1215687,1215688,6234537,6234564,6281312,6281316,6302612]);galleries[48583]=new gallery(48583,"2912143,2912122,2912116,2888063,2851812,2851759,2851711,2803722,2803721,2803720","Gallery 3","gallery",[2912116,2912122,2912143,2888063,2803705,2803707,589178,589189,596215,596216,596217,596218,596219,643634,643637,643641,644093,644101,644104,644109,2803708,2803710,2803711,2803714,2803716,2803719,2803720,2803721,2803722,2851711,2851759,2851812]);galleries[332334]=new gallery(332334,"6302960,6302959,6302957,6302954,6302953,6302949,6302944,6302942,6228025,6228022","Gallery 4-Malta","gallery",[6226928,6227524,6227904,6227907,6227938,6227965,6227968,6228022,6228025,6302942,6302944,6302949,6302953,6302954,6302957,6302959,6302960]);galleries[347363]=new gallery(347363,"6281303,6281300,6281296,6281266,6241340,6241338,6241336,6241334,6241331,6241329","Gallery 5 Norway","gallery",[6241326,6241325,6241327,6241329,6241331,6241334,6241336,6241338,6241340,6281266,6281296,6281300,6281303]);galleries[347485]=new gallery(347485,"6281328,6281326,6281325,6281324,6281321,6244741,6244724,6244720,6244708,6244700","Gallery 6 General Art & Photography","gallery",[6244552,6244700,6244708,6244720,6244724,6244741,6281321,6281324,6281325,6281326,6281328]);galleries[16368]=new gallery(16368,"6234967,6234533,6234531,6234529,6234484,6234475,6234425,6234423,6234421","Gallery 1","gallery",[6234421,6234423,6234425,6234475,6234484,6234529,6234531,6234533,6234967]);galleries[176311]=new gallery(176311,"3223992,3223989,3223988,3223987,3223985,3223984,3223971,2826679,2826663,2826659","Upernavik North Greenland","gallery",[2825929,2825932,2825935,2825942,2825944,2825947,2825950,2825952,2825955,2825956,2826655,2826659,2826663,2826679,3223971,3223984,3223985,3223987,3223988,3223989,3223992,2825807]);var imageSets=new Object();imageSets[1]="2803705,180076";imageSets[3]="6302960,6302959,6302957,6302954,6302953,6302949,6302944,6302942,6302612,6281328,6281326,6281325,6281324,6281321,6281316,6281312,6281303,6281300,6281296,6281266,6244741,6244724,6244720,6244708,6244700,6244552,6241340,6241338,6241336,6241334,6241331,6241329,6241327,6241326,6241325,6234967,6234564,6234537,6234533,6234531,6234529,6234484,6234475,6234425,6234423,6234421,6228025,6228022,6227968,6227965";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/charlesb/images";break}switch(a){case 1:b="http://www1.clikpic.com/charlesb/images";break}switch(a){case 2:b="http://admin.clikpic.com/charlesb/images";break}switch(a){case 24:b="http://tpc15/clikpic/charlesb/images";break}switch(a){case 4:b="http://www.clikchurch.com/charlesb/images";break}switch(a){case 5:b="http://www2.clikpic.com/charlesb/images";break}switch(a){case 22:b="http://tpc5/clikpic/charlesb/images";break}switch(a){case 23:b="http://tpc10/clikpic/charlesb/images";break}switch(a){case 25:b="http://tpc16/clikpic/charlesb/images";break}switch(a){case 15:b="http://www3.clikpic.com/charlesb/images";break}switch(a){case 18:b="http://www4.clikpic.com/charlesb/images";break}switch(a){case 19:b="http://www5.clikpic.com/charlesb/images";break}switch(a){case 31:b="http://www7.clikpic.com/charlesb/images";break}switch(a){case 32:b="http://admin2.clikpic.com/charlesb/images";break}switch(a){case 33:b="http://www8.clikpic.com/charlesb/images";break}switch(a){case 34:b="http://www9.clikpic.com/charlesb/images";break}switch(a){case 35:b="http://admin3.clikpic.com/charlesb/images";break}switch(a){case 37:b="http://admin4.clikpic.com/charlesb/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="Charles Bezzina Art: "+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({centre:true});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> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="charliebezzina@hotmail.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="charliebezzina@hotmail.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};