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[1478315]=new thumbnail(1478315,"84015","Bluebell Woods","IMG_1936b_thumb.JPG",130,40,15);thumbnails[3192045]=new thumbnail(3192045,"84677","The Sage 1","IMG_9462b_thumb.JPG",130,50,15);thumbnails[3192048]=new thumbnail(3192048,"84677","The Sage 2","IMG_9462c_thumb.JPG",130,50,15);thumbnails[3192050]=new thumbnail(3192050,"84677","The Sage 3","IMG_9462d_thumb.JPG",130,50,15);thumbnails[3192195]=new thumbnail(3192195,"84677","The Sage 4","IMG_9453c_thumb.JPG",130,85,15);thumbnails[3192208]=new thumbnail(3192208,"84677","Millennium Bridge 1","IMG_9411c_thumb.JPG",130,178,15);thumbnails[3192211]=new thumbnail(3192211,"84677","Millennium Bridge 2","IMG_9406b_thumb.JPG",130,80,15);thumbnails[3192215]=new thumbnail(3192215,"195135","At night","IMG_9619b_thumb.JPG",130,71,15);thumbnails[3192579]=new thumbnail(3192579,"195193","Room with a view...!","IMG_8829a_thumb.JPG",130,61,15);thumbnails[3192583]=new thumbnail(3192583,"195193","","IMG_8826a_thumb.JPG",130,95,15);thumbnails[3192587]=new thumbnail(3192587,"195193","","IMG_8862a_thumb.JPG",130,67,15);thumbnails[3192591]=new thumbnail(3192591,"195193","","IMG_8867a_thumb.JPG",130,37,15);thumbnails[3192596]=new thumbnail(3192596,"195193","","IMG_8887a_thumb.JPG",130,89,15);thumbnails[3192605]=new thumbnail(3192605,"195193","On the train....","IMG_8899a_thumb.JPG",130,78,15);thumbnails[3192617]=new thumbnail(3192617,"195193","","IMG_8937a_thumb.JPG",130,68,15);thumbnails[3193075]=new thumbnail(3193075,"195193","","IMG_9061a_thumb.JPG",130,189,15);thumbnails[3193123]=new thumbnail(3193123,"195193","","IMG_9040a_thumb.JPG",130,68,15);thumbnails[3193142]=new thumbnail(3193142,"195193","","IMG_9056a_thumb.JPG",130,60,15);thumbnails[3193186]=new thumbnail(3193186,"195193","","IMG_9087a_thumb.JPG",130,83,15);thumbnails[3193209]=new thumbnail(3193209,"195193","","IMG_9088a_thumb.JPG",130,91,15);thumbnails[3193214]=new thumbnail(3193214,"195193","","IMG_9100a_thumb.JPG",130,76,15);thumbnails[3193215]=new thumbnail(3193215,"195193","","IMG_9113a_thumb.JPG",130,80,15);thumbnails[3193224]=new thumbnail(3193224,"195193","","IMG_9125a_thumb.JPG",130,49,15);thumbnails[3193228]=new thumbnail(3193228,"195193","","IMG_8817a_thumb.JPG",130,87,15);thumbnails[3864928]=new thumbnail(3864928,"237075","","IMG_0674acc_thumb.JPG",130,50,15);thumbnails[3872237]=new thumbnail(3872237,"235356","","New_York_001ac_thumb.jpg",130,85,15);thumbnails[3872238]=new thumbnail(3872238,"235356","","New_York_019ac_thumb.jpg",130,117,15);thumbnails[3904309]=new thumbnail(3904309,"237075","","IMG_0921c_thumb.JPG",130,87,15);thumbnails[3904311]=new thumbnail(3904311,"237075","","IMG_0935cc_thumb.JPG",130,92,15);thumbnails[3904707]=new thumbnail(3904707,"237075","","IMG_0484cc_thumb.JPG",130,119,15);thumbnails[3904757]=new thumbnail(3904757,"237075","","IMG_0617cc_thumb.JPG",130,101,15);thumbnails[3904760]=new thumbnail(3904760,"237075","","IMG_0615cc_thumb.JPG",130,141,15);thumbnails[3904764]=new thumbnail(3904764,"237075","","IMG_0854cc_thumb.JPG",130,87,15);thumbnails[3954668]=new thumbnail(3954668,"237075","","IMG_0618cc_thumb.JPG",130,94,15);thumbnails[3954671]=new thumbnail(3954671,"237075","","IMG_0616cc_thumb.JPG",130,92,15);thumbnails[1182514]=new thumbnail(1182514,"84679","Tapas Bar","IMG_3278a_thumb.JPG",130,87,15);thumbnails[1186646]=new thumbnail(1186646,"84677","Lock","IMG_5028a_thumb.JPG",130,80,15);thumbnails[1186678]=new thumbnail(1186678,"84678","Very early @ Lake Matheson","IMG_1053a_thumb.jpg",130,87,15);thumbnails[1186723]=new thumbnail(1186723,"85306","Centre Point 1","Picture 059a_thumb.jpg",130,195,15);thumbnails[1186867]=new thumbnail(1186867,"84015","Water droplets","IMG_5436_thumb.JPG",130,99,15);thumbnails[1190461]=new thumbnail(1190461,"83404","Patitiri Harbour","IMG_6432a_thumb.JPG",130,87,15);thumbnails[1221251]=new thumbnail(1221251,"84677","Mother & daughter....","IMG_5081web_thumb.jpg",130,168,15);thumbnails[3945557]=new thumbnail(3945557,"235006","","IMG_0257_resized_501_thumb.JPG",130,62,15);thumbnails[3955351]=new thumbnail(3955351,"236032","","IMG_1072ac_thumb.JPG",130,195,15);thumbnails[3955702]=new thumbnail(3955702,"239606","","IMG_0168acc_thumb.JPG",130,68,15);thumbnails[1182513]=new thumbnail(1182513,"84679","Street Scene","IMG_3286a_thumb.JPG",130,116,15);thumbnails[1186698]=new thumbnail(1186698,"84678","South Island Scenic Drive...","IMG_0482a_thumb.JPG",130,87,15);thumbnails[1186734]=new thumbnail(1186734,"85306","Centre Point 2","Picture 060a_thumb.jpg",130,195,15);thumbnails[1186870]=new thumbnail(1186870,"84677","Water balls...","IMG_5229a_thumb.JPG",130,64,15);thumbnails[1190537]=new thumbnail(1190537,"83404","Scarves","IMG_6653a_thumb.JPG",130,173,15);thumbnails[1190646]=new thumbnail(1190646,"84015","Something yellow!","IMG_4775a_thumb.JPG",130,87,15);thumbnails[3864445]=new thumbnail(3864445,"235006","","IMG_0276acc_thumb.JPG",130,99,15);thumbnails[3886583]=new thumbnail(3886583,"236032","","IMG_1074c_thumb.JPG",130,87,15);thumbnails[3955632]=new thumbnail(3955632,"239606","","IMG_0173ac_thumb.JPG",130,87,15);thumbnails[1182511]=new thumbnail(1182511,"84679","Slippers....","Img_3289a_thumb.jpg",130,189,15);thumbnails[1186644]=new thumbnail(1186644,"84015","Rose","IMG_5161_thumb.JPG",130,87,15);thumbnails[1186741]=new thumbnail(1186741,"85306","Guess where?!","Picture 051a_thumb.jpg",130,153,15);thumbnails[1190394]=new thumbnail(1190394,"84677","...and by night","IMG_5315a_thumb.JPG",130,90,15);thumbnails[1190547]=new thumbnail(1190547,"83404","More Scarves","IMG_6650a_thumb.JPG",130,95,15);thumbnails[3864452]=new thumbnail(3864452,"235006","","IMG_0277acc_thumb.JPG",130,87,15);thumbnails[3955373]=new thumbnail(3955373,"236032","","IMG_1075c_thumb.JPG",130,87,15);thumbnails[3955730]=new thumbnail(3955730,"239606","","IMG_0174ccw_thumb.JPG",130,163,15);thumbnails[1182512]=new thumbnail(1182512,"84679","....and again, with a twist!","IMG_3289b_thumb.jpg",130,170,15);thumbnails[1186747]=new thumbnail(1186747,"85306","Somewhere underground...!","Picture 054a_thumb.jpg",130,95,15);thumbnails[1190463]=new thumbnail(1190463,"84677","Patitiri street","IMG_6436a_thumb.JPG",130,195,15);thumbnails[1190637]=new thumbnail(1190637,"83404","No, not more scarves...!!","IMG_6634b_thumb.JPG",130,195,15);thumbnails[1190650]=new thumbnail(1190650,"84015","","IMG_4768a_thumb.JPG",130,93,15);thumbnails[3864458]=new thumbnail(3864458,"235006","","IMG_0281ac_thumb.JPG",130,87,15);thumbnails[3886574]=new thumbnail(3886574,"236032","","IMG_1070c_thumb.JPG",130,87,15);thumbnails[3955798]=new thumbnail(3955798,"239606","","IMG_0179cc_thumb.JPG",130,83,15);thumbnails[1182510]=new thumbnail(1182510,"84679","Running","IMG_3314a_thumb.JPG",130,87,15);thumbnails[1186869]=new thumbnail(1186869,"84677","Dallas Museum 1","IMG_6068a_thumb.JPG",130,195,15);thumbnails[1190524]=new thumbnail(1190524,"83404","Patitiri Old Town","IMG_7030a_thumb.JPG",130,170,15);thumbnails[3864463]=new thumbnail(3864463,"235006","","IMG_0282acc_thumb.JPG",130,54,15);thumbnails[3885845]=new thumbnail(3885845,"236032","","IMG_1085c_thumb.JPG",130,87,15);thumbnails[3955806]=new thumbnail(3955806,"239606","","IMG_0182acc_thumb.JPG",130,94,15);thumbnails[1182516]=new thumbnail(1182516,"84679","Fountain","IMG_3347a1_thumb.JPG",130,160,15);thumbnails[1186750]=new thumbnail(1186750,"83404","","P5160005a_thumb.JPG",130,98,15);thumbnails[1186868]=new thumbnail(1186868,"84677","Dallas Museum 2","IMG_6078a_thumb.JPG",130,78,15);thumbnails[3864469]=new thumbnail(3864469,"235006","","IMG_0288accw_thumb.JPG",130,200,15);thumbnails[3955348]=new thumbnail(3955348,"236032","","IMG_1071bwacc_thumb.JPG",130,65,15);thumbnails[3955808]=new thumbnail(3955808,"239606","","IMG_0187cw_thumb.JPG",130,195,15);thumbnails[1186782]=new thumbnail(1186782,"83404","","IMG_6792a_thumb.JPG",130,237,15);thumbnails[1190586]=new thumbnail(1190586,"84677","Ant","IMG_6460a_thumb.JPG",130,76,15);thumbnails[3864481]=new thumbnail(3864481,"235006","","IMG_0290acc_thumb.JPG",130,72,15);thumbnails[3885846]=new thumbnail(3885846,"236032","","IMG_1090c_thumb.JPG",130,87,15);thumbnails[3955845]=new thumbnail(3955845,"239606","","IMG_0189cw_thumb.JPG",130,195,15);thumbnails[1221236]=new thumbnail(1221236,"84677","Dragon 1","Picture 037a_thumb.jpg",130,189,15);thumbnails[3865060]=new thumbnail(3865060,"235006","","IMG_0368acc_thumb.JPG",130,70,15);thumbnails[3886601]=new thumbnail(3886601,"236032","","IMG_1100c_thumb.JPG",130,87,15);thumbnails[3955854]=new thumbnail(3955854,"239606","","IMG_0194cc_thumb.JPG",130,83,15);thumbnails[1221244]=new thumbnail(1221244,"84677","Dragon 2","Picture 039a_thumb.jpg",130,195,15);thumbnails[3864501]=new thumbnail(3864501,"235006","","IMG_0370acc_thumb.JPG",130,68,15);thumbnails[3892669]=new thumbnail(3892669,"236032","","IMG_1094c_thumb.JPG",130,104,15);thumbnails[3955881]=new thumbnail(3955881,"239606","","IMG_0196cc_thumb.JPG",130,81,15);thumbnails[1190653]=new thumbnail(1190653,"84677","Sunglasses","Picture 041a_thumb.jpg",130,195,15);thumbnails[3864508]=new thumbnail(3864508,"235006","","IMG_0378acc_thumb.JPG",130,101,15);thumbnails[3955330]=new thumbnail(3955330,"236032","","IMG_1104cc_thumb.JPG",130,97,15);thumbnails[3955900]=new thumbnail(3955900,"239606","","IMG_0197cc_thumb.JPG",130,75,15);thumbnails[4004593]=new thumbnail(4004593,"237075","","IMG_0441acc_thumb.JPG",130,69,15);thumbnails[1186707]=new thumbnail(1186707,"84677","Guinness","IMG_1512a_thumb.JPG",130,87,15);thumbnails[3864525]=new thumbnail(3864525,"235006","","IMG_0388acc_thumb.JPG",130,85,15);thumbnails[3955083]=new thumbnail(3955083,"236032","","IMG_1106cc_thumb.JPG",130,94,15);thumbnails[3955911]=new thumbnail(3955911,"239606","","IMG_0201cc_thumb.JPG",130,88,15);thumbnails[4004604]=new thumbnail(4004604,"237075","","IMG_0598acc_thumb.JPG",130,92,15);thumbnails[3864587]=new thumbnail(3864587,"235006","","IMG_0391acc_thumb.JPG",130,91,15);thumbnails[3955333]=new thumbnail(3955333,"236032","","IMG_1111c_thumb.JPG",130,87,15);thumbnails[4004629]=new thumbnail(4004629,"237075","","IMG_0641cc_thumb.JPG",130,115,15);thumbnails[1190645]=new thumbnail(1190645,"84677","Marquee","IMG_4764a_thumb.JPG",130,62,15);thumbnails[3864612]=new thumbnail(3864612,"235006","","IMG_0393acc_thumb.JPG",130,89,15);thumbnails[3955567]=new thumbnail(3955567,"236032","","IMG_1114c_thumb.JPG",130,87,15);thumbnails[4004698]=new thumbnail(4004698,"237075","","IMG_0668cc_thumb.JPG",130,251,15);thumbnails[1453822]=new thumbnail(1453822,"84677","Window Pane Rain","IMG_7514web_thumb.JPG",130,195,15);thumbnails[3864615]=new thumbnail(3864615,"235006","","IMG_0394acc_thumb.JPG",130,68,15);thumbnails[3955594]=new thumbnail(3955594,"236032","","IMG_1118cc_thumb.JPG",130,180,15);thumbnails[4004713]=new thumbnail(4004713,"237075","","IMG_0645cc_thumb.JPG",130,93,15);thumbnails[3864674]=new thumbnail(3864674,"235006","","IMG_0451acc_thumb.JPG",130,85,15);thumbnails[3955573]=new thumbnail(3955573,"236032","","IMG_1122c_thumb.JPG",130,87,15);thumbnails[4004732]=new thumbnail(4004732,"237075","","IMG_0694cc_thumb.JPG",130,69,15);thumbnails[3864756]=new thumbnail(3864756,"235006","","IMG_0458acc_thumb.JPG",130,63,15);thumbnails[3955614]=new thumbnail(3955614,"236032","","IMG_1123bwacc_thumb.JPG",130,67,15);thumbnails[4004746]=new thumbnail(4004746,"237075","","IMG_0715cc_thumb.JPG",130,55,15);thumbnails[3865138]=new thumbnail(3865138,"235006","","IMG_0560ac_thumb.JPG",130,87,15);thumbnails[3865130]=new thumbnail(3865130,"235006","","IMG_0535ac_thumb.JPG",130,87,15);thumbnails[3864819]=new thumbnail(3864819,"235006","","IMG_0632cc_thumb.JPG",130,84,15);thumbnails[3864820]=new thumbnail(3864820,"235006","","IMG_0638acc_thumb.JPG",130,218,15);thumbnails[3864914]=new thumbnail(3864914,"235006","","IMG_0657acc_thumb.JPG",130,66,15);thumbnails[3864917]=new thumbnail(3864917,"235006","","IMG_0661acc_thumb.JPG",130,61,15);thumbnails[3865053]=new thumbnail(3865053,"235006","","IMG_0360cc-1_thumb.JPG",130,56,15);thumbnails[3865056]=new thumbnail(3865056,"235006","","IMG_0360cc-2_thumb.JPG",130,167,15);thumbnails[3893656]=new thumbnail(3893656,"235006","","IMG_0252acc_thumb.JPG",130,93,15);thumbnails[3893979]=new thumbnail(3893979,"235006","","IMG_1278acc_thumb.JPG",130,101,15);thumbnails[3894005]=new thumbnail(3894005,"235006","","IMG_1383acc_thumb.JPG",130,69,15);thumbnails[3894007]=new thumbnail(3894007,"235006","","IMG_1385acc_thumb.JPG",130,88,15);thumbnails[3894010]=new thumbnail(3894010,"235006","","IMG_1389acc_thumb.JPG",130,80,15);thumbnails[3894015]=new thumbnail(3894015,"235006","","IMG_1370acc_thumb.JPG",130,86,15);thumbnails[3894017]=new thumbnail(3894017,"235006","","IMG_1353acc_thumb.JPG",130,94,15);thumbnails[3894027]=new thumbnail(3894027,"235006","","IMG_1339acc_thumb.JPG",130,70,15);thumbnails[3894097]=new thumbnail(3894097,"235006","","IMG_1402acc_thumb.JPG",130,73,15);thumbnails[3893740]=new thumbnail(3893740,"235006","","IMG_1219acc_thumb.JPG",130,91,15);thumbnails[3954740]=new thumbnail(3954740,"235006","","IMG_0974bwac_thumb.JPG",130,87,15);thumbnails[3956019]=new thumbnail(3956019,"235006","","IMG_1435acc_thumb.JPG",130,74,15);thumbnails[3956029]=new thumbnail(3956029,"235006","","IMG_1417ac_thumb.JPG",130,87,15);thumbnails[3956057]=new thumbnail(3956057,"235006","","IMG_1420cc_thumb.JPG",130,67,15);thumbnails[4004583]=new thumbnail(4004583,"235006","","IMG_0248a_thumb.JPG",130,41,15);var galleries=new Object();galleries[84677]=new gallery(84677,"3192211,3192208,3192195,3192050,3192048,3192045,1453822,1221251,1221244,1221236","Abstract","gallery",[3192045,3192048,3192050,3192195,3192208,3192211,1186646,1221251,1186870,1190394,1190463,1186869,1186868,1190586,1221236,1221244,1190653,1186707,1190645,1453822]);galleries[84679]=new gallery(84679,"1182516,1182514,1182513,1182512,1182511,1182510","Andalucia","gallery",[1182514,1182513,1182511,1182512,1182510,1182516]);galleries[237075]=new gallery(237075,"4004746,4004732,4004713,4004698,4004629,4004604,4004593,3954671,3954668,3904764","Caudwell Xtreme Everest 09","gallery",[3864928,3904309,3904311,3904707,3904757,3904760,3904764,3954668,3954671,4004593,4004604,4004629,4004698,4004713,4004732,4004746]);galleries[239605]=new gallery(239605,"3955911,3955900,3955881,3955854,3955845,3955808,3955806,3955798,3955730,3955702","Cities","gallery",[]);galleries[239606]=new gallery(239606,"3955911,3955900,3955881,3955854,3955845,3955808,3955806,3955798,3955730,3955702","Delhi","gallery",[3955702,3955632,3955730,3955798,3955806,3955808,3955845,3955854,3955881,3955900,3955911]);galleries[84015]=new gallery(84015,"1478315,1190650,1190646,1186867,1186644","Flora","gallery",[1478315,1186867,1190646,1186644,1190650]);galleries[195135]=new gallery(195135,"3192215","Florence","gallery",[3192215]);galleries[83404]=new gallery(83404,"1190637,1190547,1190537,1190524,1190461,1186782,1186750","Greece","gallery",[1190461,1190537,1190547,1190637,1190524,1186750,1186782]);galleries[236032]=new gallery(236032,"3955614,3955594,3955573,3955567,3955373,3955351,3955348,3955333,3955330,3955083","Island Peak","gallery",[3955351,3886583,3955373,3886574,3885845,3955348,3885846,3886601,3892669,3955330,3955083,3955333,3955567,3955594,3955573,3955614]);galleries[85306]=new gallery(85306,"1186747,1186741,1186734,1186723","London","gallery",[1186723,1186734,1186741,1186747]);galleries[236031]=new gallery(236031,"4004746,4004732,4004713,4004698,4004629,4004604,4004593,3955614,3955594,3955573","Mountaineering / Trekking","gallery",[]);galleries[195193]=new gallery(195193,"3193228,3193224,3193215,3193214,3193209,3193186,3193142,3193123,3193075,3192617","Mumbai","gallery",[3192579,3192583,3192587,3192591,3192596,3192605,3192617,3193075,3193123,3193142,3193186,3193209,3193214,3193215,3193224,3193228]);galleries[235006]=new gallery(235006,"4004583,3956057,3956029,3956019,3954740,3945557,3894097,3894027,3894017,3894015","Nepal","gallery",[3945557,3864445,3864452,3864458,3864463,3864469,3864481,3865060,3864501,3864508,3864525,3864587,3864612,3864615,3864674,3864756,3865138,3865130,3864819,3864820,3864914,3864917,3865053,3865056,3893656,3893979,3894005,3894007,3894010,3894015,3894017,3894027,3894097,3893740,3954740,3956019,3956029,3956057,4004583]);galleries[235356]=new gallery(235356,"3872238,3872237","New York","gallery",[3872237,3872238]);galleries[84678]=new gallery(84678,"1186698,1186678","New Zealand","gallery",[1186678,1186698]);galleries[84676]=new gallery(84676,"4004583,3956057,3956029,3956019,3954740,3945557,3894097,3894027,3894017,3894015","Travel","gallery",[]);var imageSets=new Object();imageSets[1]="4004746,4004732,4004713,4004698,4004629,4004604,4004593,4004583,3956057,3956029,3956019,3955911,3955900,3955881,3955854,3955845,3955808,3955806,3955798,3955730,3955702,3955632,3955614,3955594,3955573,3955567,3955373,3955351,3955348,3955333,3955330,3955083,3954740,3954671,3954668,3945557,3904764,3904760,3904757,3904707,3904311,3904309,3894097,3894027,3894017,3894015,3894010,3894007,3894005,3893979";imageSets[3]="4004746,4004732,4004713,4004698,4004629,4004604,4004593,4004583,3956057,3956029,3956019,3955911,3955900,3955881,3955854,3955845,3955808,3955806,3955798,3955730,3955702,3955632,3955614,3955594,3955573,3955567,3955373,3955351,3955348,3955333,3955330,3955083,3954740,3954671,3954668,3945557,3904764,3904760,3904757,3904707,3904311,3904309,3894097,3894027,3894017,3894015,3894010,3894007,3894005,3893979";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/jrowley/images";break}switch(a){case 1:b="http://www1.clikpic.com/jrowley/images";break}switch(a){case 2:b="http://admin.clikpic.com/jrowley/images";break}switch(a){case 24:b="http://tpc15/clikpic/jrowley/images";break}switch(a){case 4:b="http://www.clikchurch.com/jrowley/images";break}switch(a){case 5:b="http://www2.clikpic.com/jrowley/images";break}switch(a){case 22:b="http://tpc5/clikpic/jrowley/images";break}switch(a){case 23:b="http://tpc10/clikpic/jrowley/images";break}switch(a){case 25:b="http://tpc16/clikpic/jrowley/images";break}switch(a){case 15:b="http://www3.clikpic.com/jrowley/images";break}switch(a){case 18:b="http://www4.clikpic.com/jrowley/images";break}switch(a){case 19:b="http://www5.clikpic.com/jrowley/images";break}switch(a){case 31:b="http://www7.clikpic.com/jrowley/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jrowley/images";break}switch(a){case 33:b="http://www8.clikpic.com/jrowley/images";break}switch(a){case 34:b="http://www9.clikpic.com/jrowley/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jrowley/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jrowley/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="Jeremy Rowley 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> 				&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="jeremy.rowley@varian.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="jeremy.rowley@varian.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(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+'")'})}}};
