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[4749412]=new thumbnail(4749412,"259609","smoose","smoose_thumb.jpg",130,87,18);thumbnails[4841813]=new thumbnail(4841813,"276454","iice1","iice1_thumb.jpg",130,87,2);thumbnails[4749413]=new thumbnail(4749413,"259601","ssnow","ssnow_thumb.jpg",130,195,18);thumbnails[4841814]=new thumbnail(4841814,"276454","iice2","iice2_thumb.jpg",130,87,2);thumbnails[4749414]=new thumbnail(4749414,"259609","ssquirell","ssquirell_thumb.jpg",130,87,18);thumbnails[4841815]=new thumbnail(4841815,"276454","iice3","iice3_thumb.jpg",130,87,2);thumbnails[4841816]=new thumbnail(4841816,"276454","iice4","iice4_thumb.jpg",130,87,2);thumbnails[4841817]=new thumbnail(4841817,"276454","iice7","iice7_thumb.jpg",130,78,2);thumbnails[4841818]=new thumbnail(4841818,"276454","iice9","iice9_thumb.jpg",130,119,2);thumbnails[4841819]=new thumbnail(4841819,"276454","iiceb","iiceb_thumb.jpg",130,195,2);thumbnails[4841820]=new thumbnail(4841820,"276454","iiceboots","iiceboots_thumb.jpg",130,195,2);thumbnails[4841821]=new thumbnail(4841821,"276454","iiceheli","iiceheli_thumb.jpg",130,87,2);thumbnails[4841822]=new thumbnail(4841822,"276454","iicepeng","iicepeng_thumb.jpg",130,87,2);thumbnails[4841823]=new thumbnail(4841823,"276454","iicepeng2","iicepeng2_thumb.jpg",130,195,2);thumbnails[4841824]=new thumbnail(4841824,"276454","iicepeng3","iicepeng3_thumb.jpg",130,195,2);thumbnails[4841825]=new thumbnail(4841825,"276454","iicepeople","iicepeople_thumb.jpg",130,87,2);thumbnails[4841826]=new thumbnail(4841826,"276454","iicesafe","iicesafe_thumb.jpg",130,87,2);thumbnails[4841827]=new thumbnail(4841827,"276454","ipeng","ipeng_thumb.jpg",130,87,2);thumbnails[4743192]=new thumbnail(4743192,"259567","ngaruroa","s6_back_thumb.jpg",130,87,18);thumbnails[4743193]=new thumbnail(4743193,"259567","s6 branhes good","s6_branhes_good_thumb.jpg",130,87,18);thumbnails[4743194]=new thumbnail(4743194,"259567","s6","s6_thumb.jpg",130,87,18);thumbnails[4749391]=new thumbnail(4749391,"259572","s17-1","s17-1_thumb.jpg",130,87,18);thumbnails[4749392]=new thumbnail(4749392,"272097","s333c","s333c_thumb.jpg",130,195,18);thumbnails[4821690]=new thumbnail(4821690,"272097","a333","a333_thumb.jpg",130,87,18);thumbnails[4749409]=new thumbnail(4749409,"272395","scrash","scrash1_thumb.jpg",130,195,18);thumbnails[4749410]=new thumbnail(4749410,"272395","scrash","scrash2_thumb.jpg",130,98,18);thumbnails[4821860]=new thumbnail(4821860,"272097","a333b","a333b_thumb.jpg",130,195,18);thumbnails[4749411]=new thumbnail(4749411,"272395","scrash","scrash3_thumb.jpg",130,87,18);thumbnails[4821697]=new thumbnail(4821697,"272096","a399","a399_thumb.jpg",130,87,18);thumbnails[4821868]=new thumbnail(4821868,"272096","a399a","a399a_thumb.jpg",130,87,18);thumbnails[4821707]=new thumbnail(4821707,"259567","s6 back","s6_back1_thumb.jpg",130,87,18);thumbnails[4743195]=new thumbnail(4743195,"259578","bonnar","s7_thumb.jpg",130,87,18);thumbnails[4743196]=new thumbnail(4743196,"259578","s7a-1","s7a-1_thumb.jpg",130,87,18);thumbnails[4821696]=new thumbnail(4821696,"272095","a388","a388_thumb.jpg",130,87,18);thumbnails[4821684]=new thumbnail(4821684,"259570","a10","a10_thumb.jpg",130,195,18);thumbnails[4821845]=new thumbnail(4821845,"259570","a10a","a10a_thumb.jpg",130,87,18);thumbnails[4821846]=new thumbnail(4821846,"259570","a10b","a10b_thumb.jpg",130,87,18);thumbnails[4821852]=new thumbnail(4821852,"272072","a25a","a25a_thumb.jpg",130,87,18);thumbnails[4821853]=new thumbnail(4821853,"272072","a25b","a25b_thumb.jpg",130,195,18);thumbnails[4821854]=new thumbnail(4821854,"272072","a25c","a25c_thumb.jpg",130,87,18);thumbnails[4821689]=new thumbnail(4821689,"272082","a33","a33_thumb.jpg",130,84,18);thumbnails[4388898]=new thumbnail(4388898,"257531","35 Waitaki 7/09","clik_test_thumb.jpg",130,87,18);thumbnails[4821691]=new thumbnail(4821691,"257531","a35-5","a35-5_thumb.jpg",130,87,18);thumbnails[4821692]=new thumbnail(4821692,"257531","a35","a35_thumb.jpg",130,87,18);thumbnails[4821695]=new thumbnail(4821695,"272086","a36","a36_thumb.jpg",130,195,18);thumbnails[4821863]=new thumbnail(4821863,"257531","a35a","a35a_thumb.jpg",130,87,18);thumbnails[4821867]=new thumbnail(4821867,"272086","a36a","a36a_thumb.jpg",130,87,18);thumbnails[4821869]=new thumbnail(4821869,"259583","a41a","a41a_thumb.jpg",130,195,18);thumbnails[4821870]=new thumbnail(4821870,"259583","a41b","a41b_thumb.jpg",130,87,18);thumbnails[4749396]=new thumbnail(4749396,"272101","s44","s44_thumb.jpg",130,87,18);thumbnails[4749397]=new thumbnail(4749397,"272098","s45-bow","s45-bow_thumb.jpg",130,195,18);thumbnails[4749398]=new thumbnail(4749398,"272102","s48 side","s48_side_thumb.jpg",130,87,18);thumbnails[4821698]=new thumbnail(4821698,"272077","a46","a46_thumb.jpg",130,87,18);thumbnails[4821873]=new thumbnail(4821873,"272077","a46a","a46a_thumb.jpg",130,85,18);thumbnails[4749399]=new thumbnail(4749399,"272070","s52 crash more","s52_crash_more_thumb.jpg",130,195,18);thumbnails[4749400]=new thumbnail(4749400,"272070","s52 crash start","s52_crash_start_thumb.jpg",130,195,18);thumbnails[4821700]=new thumbnail(4821700,"272070","a52","a52_thumb.jpg",130,87,18);thumbnails[4821875]=new thumbnail(4821875,"272070","a52a","a52a_thumb.jpg",130,87,18);thumbnails[4821876]=new thumbnail(4821876,"272084","a56a","a56a_thumb.jpg",130,87,18);thumbnails[4821881]=new thumbnail(4821881,"272075","a66a","a66a_thumb.jpg",130,87,18);thumbnails[4749404]=new thumbnail(4749404,"272103","s67","s67_thumb.jpg",130,87,18);thumbnails[4821703]=new thumbnail(4821703,"259585","a70","a70_thumb.jpg",130,87,18);thumbnails[4821883]=new thumbnail(4821883,"259585","a70a","a70a_thumb.jpg",130,87,18);thumbnails[4821704]=new thumbnail(4821704,"272094","a76","a76_thumb.jpg",130,87,18);thumbnails[4749406]=new thumbnail(4749406,"272069","s83","s83_thumb.jpg",130,87,18);thumbnails[4749407]=new thumbnail(4749407,"272069","s83close","s83close_thumb.jpg",130,87,18);thumbnails[4749408]=new thumbnail(4749408,"272069","s83rapidss","s83rapidss_thumb.jpg",130,87,18);thumbnails[4821864]=new thumbnail(4821864,"272069","83b","a35b_thumb.jpg",130,87,18);thumbnails[4821706]=new thumbnail(4821706,"272069","a83","a83_thumb.jpg",130,195,18);thumbnails[4821886]=new thumbnail(4821886,"272069","a83a","a83a_thumb.jpg",130,87,18);thumbnails[4749383]=new thumbnail(4749383,"272081","s107","s107_thumb.jpg",130,87,18);thumbnails[4821843]=new thumbnail(4821843,"272081","a107a","a107a_thumb.jpg",130,195,18);thumbnails[4821844]=new thumbnail(4821844,"259586","a109a","a109a_thumb.jpg",130,87,18);thumbnails[4821685]=new thumbnail(4821685,"272076","a115","a115_thumb.jpg",130,87,18);thumbnails[4749384]=new thumbnail(4749384,"272106","s122-10","s122-10_thumb.jpg",130,87,18);thumbnails[4749385]=new thumbnail(4749385,"272106","s122-5","s122-5_thumb.jpg",130,195,18);thumbnails[4749388]=new thumbnail(4749388,"272107","s131-1","s131-1_thumb.jpg",130,195,18);thumbnails[4749389]=new thumbnail(4749389,"272107","s131-3","s131-3_thumb.jpg",130,87,18);thumbnails[4749390]=new thumbnail(4749390,"272107","s131top air","s131top_air_thumb.jpg",130,195,18);thumbnails[4821847]=new thumbnail(4821847,"272088","a150a","a150a_thumb.jpg",130,195,18);thumbnails[4821848]=new thumbnail(4821848,"272088","a150b","a150b_thumb.jpg",130,87,18);thumbnails[4821686]=new thumbnail(4821686,"272068","a216","a216_thumb.jpg",130,87,18);thumbnails[4821849]=new thumbnail(4821849,"272068","a216a","a216a_thumb.jpg",130,87,18);thumbnails[4821850]=new thumbnail(4821850,"272068","a216b","a216b_thumb.jpg",130,87,18);thumbnails[4821851]=new thumbnail(4821851,"272068","a216c","a216c_thumb.jpg",130,87,18);thumbnails[4821855]=new thumbnail(4821855,"272085","a301a","a301a_thumb.jpg",130,87,18);thumbnails[4821856]=new thumbnail(4821856,"272085","a301b","a301b_thumb.jpg",130,195,18);thumbnails[4821857]=new thumbnail(4821857,"272085","a301c","a301c_thumb.jpg",130,87,18);thumbnails[4821858]=new thumbnail(4821858,"272085","a301d","a301d_thumb.jpg",130,87,18);thumbnails[4821688]=new thumbnail(4821688,"272083","a311","a311_thumb.jpg",130,87,18);thumbnails[4821859]=new thumbnail(4821859,"272083","a311a","a311a_thumb.jpg",130,87,18);thumbnails[4821687]=new thumbnail(4821687,"272089","a307","a307_thumb.jpg",130,87,18);thumbnails[4388903]=new thumbnail(4388903,"257533","","nz-3_thumb.JPG",130,87,18);thumbnails[4388904]=new thumbnail(4388904,"257533","","nz-4_thumb.JPG",130,87,18);thumbnails[4388901]=new thumbnail(4388901,"257533","","nz-1_thumb.JPG",130,87,18);thumbnails[4388902]=new thumbnail(4388902,"257533","","nz-2_thumb.jpg",130,195,18);thumbnails[4749393]=new thumbnail(4749393,"257533","s353","s3534_thumb.jpg",130,80,18);thumbnails[4749394]=new thumbnail(4749394,"257533","s353","s353_thumb.jpg",130,87,18);thumbnails[4821693]=new thumbnail(4821693,"257533","a353","a353_thumb.jpg",130,87,18);thumbnails[4821861]=new thumbnail(4821861,"257533","a353a","a353a_thumb.jpg",130,87,18);thumbnails[4821865]=new thumbnail(4821865,"272087","a367b","a367b_thumb.jpg",130,195,18);thumbnails[4821866]=new thumbnail(4821866,"272087","a367c","a367c_thumb.jpg",130,87,18);thumbnails[4821871]=new thumbnail(4821871,"272078","a454a","a454a_thumb.jpg",130,195,18);thumbnails[4821872]=new thumbnail(4821872,"272078","a454b","a454b_thumb.jpg",130,87,18);thumbnails[4749395]=new thumbnail(4749395,"272092","s354-airtop","s354-airtop_thumb.jpg",130,195,18);thumbnails[4821694]=new thumbnail(4821694,"272092","a354","a354_thumb.jpg",130,87,18);thumbnails[4821862]=new thumbnail(4821862,"272092","a354a","a354a_thumb.jpg",130,195,18);thumbnails[4821699]=new thumbnail(4821699,"272074","a514","a514_thumb.jpg",130,195,18);thumbnails[4821874]=new thumbnail(4821874,"272074","a514a","a514a_thumb.jpg",130,87,18);thumbnails[4821701]=new thumbnail(4821701,"272073","a624","a624_thumb.jpg",130,87,18);thumbnails[4821877]=new thumbnail(4821877,"272073","a624a","a624a_thumb.jpg",130,87,18);thumbnails[4821882]=new thumbnail(4821882,"272073","a6724a","a6724a_thumb.jpg",130,195,18);thumbnails[4749386]=new thumbnail(4749386,"272091","s128","s128_thumb.jpg",130,87,18);thumbnails[4749401]=new thumbnail(4749401,"272091","s626 air good","s626_air_good_thumb.jpg",130,195,18);thumbnails[4749402]=new thumbnail(4749402,"272091","s626-cras","s626-cras_thumb.jpg",130,87,18);thumbnails[4749403]=new thumbnail(4749403,"272091","s626","s626_thumb.jpg",130,195,18);thumbnails[4821702]=new thumbnail(4821702,"272079","a650","a650_thumb.jpg",130,87,18);thumbnails[4821878]=new thumbnail(4821878,"259566","a638a","a638a_thumb.jpg",130,87,18);thumbnails[4821879]=new thumbnail(4821879,"259566","a638b","a638b_thumb.jpg",130,195,18);thumbnails[4821880]=new thumbnail(4821880,"272079","a650a","a650a_thumb.jpg",130,87,18);thumbnails[4749405]=new thumbnail(4749405,"272108","s680a","s680a_thumb.jpg",130,87,18);thumbnails[4821705]=new thumbnail(4821705,"272090","a777","a777_thumb.jpg",130,87,18);thumbnails[4821884]=new thumbnail(4821884,"272090","a777a","a777a_thumb.jpg",130,195,18);thumbnails[4821885]=new thumbnail(4821885,"272090","a777b","a777b_thumb.jpg",130,87,18);var galleries=new Object();galleries[259609]=new gallery(259609,"4749414,4749412","Animals ","gallery",[4749412,4749414]);galleries[259610]=new gallery(259610,"","Birds","gallery",[]);galleries[259579]=new gallery(259579,"","Boat 09","gallery",[]);galleries[276454]=new gallery(276454,"4841827,4841826,4841825,4841824,4841823,4841822,4841821,4841820,4841819,4841818,4841817,4841816,4841815,4841814,4841813","ice bergs","gallery",[4841813,4841814,4841815,4841816,4841817,4841818,4841819,4841820,4841821,4841822,4841823,4841824,4841825,4841826,4841827]);galleries[259603]=new gallery(259603,"","Icebergs ","gallery",[]);galleries[259611]=new gallery(259611,"","Insects","gallery",[]);galleries[259604]=new gallery(259604,"","Lighthouses ","gallery",[]);galleries[259600]=new gallery(259600,"","Old Sheds and Buildings of New Zealand","gallery",[]);galleries[259599]=new gallery(259599,"","Rivers of New Zealand","gallery",[]);galleries[259606]=new gallery(259606,"","Scenery from Around the World ","gallery",[]);galleries[259605]=new gallery(259605,"","Scenery of Australia","gallery",[]);galleries[259590]=new gallery(259590,"","Scenery of New Zealand","gallery",[]);galleries[259601]=new gallery(259601,"4749413","Snow Scenes and Glaciers","gallery",[4749413]);galleries[259607]=new gallery(259607,"","Sunsets ","gallery",[]);galleries[259567]=new gallery(259567,"4821707,4743194,4743193,4743192","Boat 06","gallery",[4743192,4743193,4743194,4821707]);galleries[259571]=new gallery(259571,"","Boat 16","gallery",[]);galleries[259572]=new gallery(259572,"4749391","Boat 17","gallery",[4749391]);galleries[272097]=new gallery(272097,"4821860,4821690,4749392","boat 333","gallery",[4749392,4821690,4821860]);galleries[272096]=new gallery(272096,"4821868,4821697","boat 399","gallery",[4821697,4821868]);galleries[272395]=new gallery(272395,"4749411,4749410,4749409","jet boat crashes","gallery",[4749409,4749410,4749411]);galleries[257532]=new gallery(257532,"4821886,4821885,4821884,4821883,4821882,4821881,4821880,4821879,4821878,4821877,4821876,4821875,4821874,4821873,4821872,4821871,4821870,4821869,4821867,4821866,4821865,4821864,4821863,4821862,4821861,4821859,4821858,4821857,4821856,4821855,4821854,4821853,4821852,4821851,4821850,4821849,4821848,4821847,4821846,4821845,4821844,4821843,4821707,4821706,4821705,4821704,4821703,4821702,4821701,4821700,4821699,4821698,4821695,4821694,4821693,4821692,4821691,4821689,4821688,4821687,4821686,4821685,4821684,4749408,4749407,4749406,4749405,4749404,4749403,4749402,4749401,4749400,4749399,4749398,4749397,4749396,4749395,4749394,4749393,4749391,4749390,4749389,4749388,4749386,4749385,4749384,4749383,4743196,4743195,4743194,4743193,4743192,4388904,4388903,4388902,4388901,4388898","New Zealand Jet Boats","gallery",[]);galleries[259578]=new gallery(259578,"4743196,4743195","Boat 07","gallery",[4743195,4743196]);galleries[272095]=new gallery(272095,"4821696","boat 388","gallery",[4821696]);galleries[259576]=new gallery(259576,"4821868,4821860,4821697,4821696,4821690,4749392","Overseas Jet Boats ","gallery",[]);galleries[259608]=new gallery(259608,"4749414,4749412","Animals, Birds and Insects","gallery",[]);galleries[259570]=new gallery(259570,"4821846,4821845,4821684","Boat 10","gallery",[4821684,4821845,4821846]);galleries[272099]=new gallery(272099,"","boat 17","gallery",[]);galleries[259613]=new gallery(259613,"","People ","gallery",[]);galleries[272072]=new gallery(272072,"4821854,4821853,4821852","boat 25","gallery",[4821852,4821853,4821854]);galleries[259589]=new gallery(259589,"4749413","Scenery ","gallery",[]);galleries[272082]=new gallery(272082,"4821689","boat 33","gallery",[4821689]);galleries[257531]=new gallery(257531,"4821863,4821692,4821691,4388898","Boat 35","gallery",[4388898,4821691,4821692,4821863]);galleries[272086]=new gallery(272086,"4821867,4821695","boat 36","gallery",[4821695,4821867]);galleries[272100]=new gallery(272100,"","boat 37","gallery",[]);galleries[259583]=new gallery(259583,"4821870,4821869","Boat 41","gallery",[4821869,4821870]);galleries[272101]=new gallery(272101,"4749396","boat 44","gallery",[4749396]);galleries[272098]=new gallery(272098,"4749397","boat 45","gallery",[4749397]);galleries[272102]=new gallery(272102,"4749398","boat 48","gallery",[4749398]);galleries[272077]=new gallery(272077,"4821873,4821698","boat 46","gallery",[4821698,4821873]);galleries[272070]=new gallery(272070,"4821875,4821700,4749400,4749399","boat 52","gallery",[4749399,4749400,4821700,4821875]);galleries[272084]=new gallery(272084,"4821876","boat 56","gallery",[4821876]);galleries[272075]=new gallery(272075,"4821881","boat 66","gallery",[4821881]);galleries[272103]=new gallery(272103,"4749404","boat 67","gallery",[4749404]);galleries[259585]=new gallery(259585,"4821883,4821703","Boat 70","gallery",[4821703,4821883]);galleries[272094]=new gallery(272094,"4821704","boat 76","gallery",[4821704]);galleries[272104]=new gallery(272104,"","boat 77","gallery",[]);galleries[272069]=new gallery(272069,"4821886,4821864,4821706,4749408,4749407,4749406","boat 83","gallery",[4749406,4749407,4749408,4821864,4821706,4821886]);galleries[272105]=new gallery(272105,"","boat 105","gallery",[]);galleries[272081]=new gallery(272081,"4821843,4749383","boat 107","gallery",[4749383,4821843]);galleries[259586]=new gallery(259586,"4821844","Boat 109","gallery",[4821844]);galleries[272076]=new gallery(272076,"4821685","boat 115","gallery",[4821685]);galleries[272106]=new gallery(272106,"4749385,4749384","boat 122","gallery",[4749384,4749385]);galleries[272107]=new gallery(272107,"4749390,4749389,4749388","boat 131","gallery",[4749388,4749389,4749390]);galleries[272088]=new gallery(272088,"4821848,4821847","boat 150","gallery",[4821847,4821848]);galleries[272068]=new gallery(272068,"4821851,4821850,4821849,4821686","Boat 216","gallery",[4821686,4821849,4821850,4821851]);galleries[272085]=new gallery(272085,"4821858,4821857,4821856,4821855","boat 301","gallery",[4821855,4821856,4821857,4821858]);galleries[272083]=new gallery(272083,"4821859,4821688","boat 311","gallery",[4821688,4821859]);galleries[272089]=new gallery(272089,"4821687","boat 307","gallery",[4821687]);galleries[257533]=new gallery(257533,"4821861,4821693,4749394,4749393,4388904,4388903,4388902,4388901","Boat 353 (NZ1)","gallery",[4388903,4388904,4388901,4388902,4749393,4749394,4821693,4821861]);galleries[272087]=new gallery(272087,"4821866,4821865","boat 367","gallery",[4821865,4821866]);galleries[272078]=new gallery(272078,"4821872,4821871","boat 454","gallery",[4821871,4821872]);galleries[272092]=new gallery(272092,"4821862,4821694,4749395","boat 354","gallery",[4749395,4821694,4821862]);galleries[272074]=new gallery(272074,"4821874,4821699","boat 514","gallery",[4821699,4821874]);galleries[272073]=new gallery(272073,"4821882,4821877,4821701","boat 624","gallery",[4821701,4821877,4821882]);galleries[272091]=new gallery(272091,"4749403,4749402,4749401,4749386","boat 626","gallery",[4749386,4749401,4749402,4749403]);galleries[259566]=new gallery(259566,"4821879,4821878","Boat 638","gallery",[4821878,4821879]);galleries[272079]=new gallery(272079,"4821880,4821702","boat 650","gallery",[4821702,4821880]);galleries[272108]=new gallery(272108,"4749405","boat 680","gallery",[4749405]);galleries[257539]=new gallery(257539,"","Boat 700","gallery",[]);galleries[272090]=new gallery(272090,"4821885,4821884,4821705","boat 777","gallery",[4821705,4821884,4821885]);var imageSets=new Object();imageSets[1]="4841827,4841826,4841825,4841824,4841823,4841822,4841821,4841820,4841819,4841818,4841817,4841816,4841815,4841814,4841813,4821886,4821885,4821884,4821883,4821882,4821881,4821880,4821879,4821878,4821877,4821876,4821875,4821874,4821873,4821872,4821871,4821870,4821869,4821868,4821867,4821866,4821865,4821864,4821863,4821862,4821861,4821860,4821859,4821858,4821857,4821856,4821855,4821854,4821853,4821852,4821851,4821850,4821849,4821848,4821847,4821846,4821845,4821844,4821843,4821707,4821706,4821705,4821704,4821703,4821702,4821701,4821700,4821699,4821698,4821697,4821696,4821695,4821694,4821692,4821691,4821690,4821689,4821688,4821687,4821686,4821685,4821684,4749414,4749413,4749412,4749411,4749410,4749409,4749408,4749407,4749406,4749405,4749404,4749403,4749402,4749401,4749400,4749399,4749398,4749397,4749396,4749395,4749394,4749393,4749392,4749391,4749390,4749389,4749388,4749386,4749385,4749384,4749383,4743196,4743195,4743194,4743193,4743192,4388904,4388903,4388902,4388901,4388898";imageSets[2]="4841827,4841826,4841825,4841824,4841823,4841822,4841821,4841820,4841819,4841818,4841817,4841816,4841815,4841814,4841813,4821886,4821885,4821884,4821883,4821882,4821881,4821880,4821879,4821878,4821877,4821876,4821875,4821874,4821873,4821872,4821871,4821870,4821869,4821868,4821867,4821866,4821865,4821864,4821863,4821862,4821861,4821860,4821859,4821858,4821857,4821856,4821855,4821854,4821853,4821852,4821851,4821850,4821849,4821848,4821847,4821846,4821845,4821844,4821843,4821707,4821706,4821705,4821704,4821703,4821702,4821701,4821700,4821699,4821698,4821697,4821696,4821695,4821694,4821693,4821692,4821691,4821690,4821689,4821688,4821687,4821686,4821685,4821684,4749414,4749413,4749412,4749411,4749410,4749409,4749408,4749407,4749406,4749405,4749404,4749403,4749402,4749401,4749400,4749399,4749398,4749397,4749396,4749395,4749394,4749393,4749392,4749391,4749390,4749389,4749388,4749386,4749385,4749384,4749383,4743196,4743195,4743194,4743193,4743192,4388904,4388903,4388902,4388901,4388898";imageSets[3]="4841827,4841826,4841825,4841824,4841823,4841822,4841821,4841820,4841819,4841818,4841817,4841816,4841815,4841814,4841813,4821886,4821885,4821884,4821883,4821882,4821881,4821880,4821879,4821878,4821877,4821876,4821875,4821874,4821873,4821872,4821871,4821870,4821869,4821868,4821867,4821866,4821865,4821864,4821863,4821862,4821861,4821860,4821859,4821858,4821857,4821856,4821855,4821854,4821853,4821852,4821851,4821850,4821849,4821848,4821847,4821846,4821845,4821844,4821843,4821707,4821706,4821705,4821704,4821703,4821702,4821701,4821700,4821699,4821698,4821697,4821696,4821695,4821694,4821693,4821692,4821691,4821690,4821689,4821688,4821687,4821686,4821685,4821684,4749414,4749413,4749412,4749411,4749410,4749409,4749408,4749407,4749406,4749405,4749404,4749403,4749402,4749401,4749400,4749399,4749398,4749397,4749396,4749395,4749394,4749393,4749392,4749391,4749390,4749389,4749388,4749386,4749385,4749384,4749383,4743196,4743195,4743194,4743193,4743192,4388904,4388903,4388902,4388901,4388898";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/photosofnz/images";break}switch(a){case 1:b="http://www1.clikpic.com/photosofnz/images";break}switch(a){case 2:b="http://admin.clikpic.com/photosofnz/images";break}switch(a){case 4:b="http://www.clikchurch.com/photosofnz/images";break}switch(a){case 5:b="http://www2.clikpic.com/photosofnz/images";break}switch(a){case 15:b="http://www3.clikpic.com/photosofnz/images";break}switch(a){case 21:b="http://www6.clikpic.com/photosofnz/images";break}switch(a){case 18:b="http://www4.clikpic.com/photosofnz/images";break}switch(a){case 19:b="http://www5.clikpic.com/photosofnz/images";break}switch(a){case 22:b="http://tpc5/clikpic/photosofnz/images";break}switch(a){case 23:b="http://tpc10/clikpic/photosofnz/images";break}switch(a){case 24:b="http://tpc15/clikpic/photosofnz/images";break}switch(a){case 25:b="http://tpc16/clikpic/photosofnz/images";break}switch(a){case 31:b="http://www7.clikpic.com/photosofnz/images";break}switch(a){case 32:b="http://admin2.clikpic.com/photosofnz/images";break}switch(a){case 33:b="http://www8.clikpic.com/photosofnz/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=photos[f].caption+": Photos of NZ ";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>"}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>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				NZ$"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="PHOTOSOFNZ">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};
