window.thumbnails = {};
															thumbnails[9064496] = clik.newPhoto({"id":9064496,"src":"PSJD01A_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[9064685] = clik.newPhoto({"id":9064685,"src":"PSJD01K_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[9066066] = clik.newPhoto({"id":9066066,"src":"L_001842_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_9066066.html","width":130,"caption":"","height":98});
															thumbnails[9066068] = clik.newPhoto({"id":9066068,"src":"L_001843_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_9066068.html","width":130,"caption":"","height":98});
															thumbnails[9066072] = clik.newPhoto({"id":9066072,"src":"L_001848_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_9066072.html","width":130,"caption":"","height":98});
															thumbnails[9064699] = clik.newPhoto({"id":9064699,"src":"DSC05559_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064699.html","width":130,"caption":"","height":130});
															thumbnails[9066006] = clik.newPhoto({"id":9066006,"src":"01Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066006.html","width":130,"caption":"","height":104});
															thumbnails[9067360] = clik.newPhoto({"id":9067360,"src":"DenskyAgri_01_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067360.html","width":130,"caption":"","height":104});
															thumbnails[9064497] = clik.newPhoto({"id":9064497,"src":"PSJD01B_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064497.html","width":130,"caption":"","height":130});
															thumbnails[9064702] = clik.newPhoto({"id":9064702,"src":"DSC05562_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064702.html","width":130,"caption":"","height":130});
															thumbnails[9066012] = clik.newPhoto({"id":9066012,"src":"02Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066012.html","width":130,"caption":"","height":104});
															thumbnails[9067362] = clik.newPhoto({"id":9067362,"src":"DenskyAgri_02_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067362.html","width":130,"caption":"","height":104});
															thumbnails[9064499] = clik.newPhoto({"id":9064499,"src":"PSJD01C_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064499.html","width":130,"caption":"","height":130});
															thumbnails[9064706] = clik.newPhoto({"id":9064706,"src":"DSC05582_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064706.html","width":130,"caption":"","height":130});
															thumbnails[9066014] = clik.newPhoto({"id":9066014,"src":"03Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066014.html","width":130,"caption":"","height":104});
															thumbnails[9067366] = clik.newPhoto({"id":9067366,"src":"DenskyAgri_03_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067366.html","width":130,"caption":"","height":104});
															thumbnails[9064502] = clik.newPhoto({"id":9064502,"src":"PSJD01D_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064502.html","width":130,"caption":"","height":130});
															thumbnails[9064709] = clik.newPhoto({"id":9064709,"src":"DSC05583_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064709.html","width":130,"caption":"","height":130});
															thumbnails[9066016] = clik.newPhoto({"id":9066016,"src":"04Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066016.html","width":130,"caption":"","height":87});
															thumbnails[9067369] = clik.newPhoto({"id":9067369,"src":"DenskyAgri_04_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067369.html","width":130,"caption":"","height":104});
															thumbnails[9064503] = clik.newPhoto({"id":9064503,"src":"PSJD01E_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064503.html","width":130,"caption":"","height":130});
															thumbnails[9064713] = clik.newPhoto({"id":9064713,"src":"DSC05586_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064713.html","width":130,"caption":"","height":130});
															thumbnails[9066018] = clik.newPhoto({"id":9066018,"src":"05Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066018.html","width":130,"caption":"","height":87});
															thumbnails[9067373] = clik.newPhoto({"id":9067373,"src":"DenskyAgri_05_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067373.html","width":130,"caption":"","height":104});
															thumbnails[9064504] = clik.newPhoto({"id":9064504,"src":"PSJD01F_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064504.html","width":130,"caption":"","height":130});
															thumbnails[9064717] = clik.newPhoto({"id":9064717,"src":"DSC05591_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064717.html","width":130,"caption":"","height":130});
															thumbnails[9066021] = clik.newPhoto({"id":9066021,"src":"06Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066021.html","width":130,"caption":"","height":104});
															thumbnails[9067379] = clik.newPhoto({"id":9067379,"src":"DenskyAgri_06_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067379.html","width":130,"caption":"","height":104});
															thumbnails[9064507] = clik.newPhoto({"id":9064507,"src":"PSJD01G_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064507.html","width":130,"caption":"","height":130});
															thumbnails[9064722] = clik.newPhoto({"id":9064722,"src":"DSC05602_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064722.html","width":130,"caption":"","height":130});
															thumbnails[9067382] = clik.newPhoto({"id":9067382,"src":"DenskyAgri_07_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067382.html","width":130,"caption":"","height":87});
															thumbnails[9064508] = clik.newPhoto({"id":9064508,"src":"PSJD01H_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064508.html","width":130,"caption":"","height":130});
															thumbnails[9067387] = clik.newPhoto({"id":9067387,"src":"DenskyAgri_08_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067387.html","width":130,"caption":"","height":87});
															thumbnails[9064509] = clik.newPhoto({"id":9064509,"src":"PSJD01I_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064509.html","width":130,"caption":"","height":130});
															thumbnails[9064723] = clik.newPhoto({"id":9064723,"src":"DSC05606_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064723.html","width":130,"caption":"","height":130});
															thumbnails[9066022] = clik.newPhoto({"id":9066022,"src":"09Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066022.html","width":130,"caption":"","height":104});
															thumbnails[9067392] = clik.newPhoto({"id":9067392,"src":"DenskyAgri_09_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067392.html","width":130,"caption":"","height":87});
															thumbnails[9064510] = clik.newPhoto({"id":9064510,"src":"PSJD01J_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064510.html","width":130,"caption":"","height":130});
															thumbnails[9066025] = clik.newPhoto({"id":9066025,"src":"10Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066025.html","width":130,"caption":"","height":104});
															thumbnails[9067398] = clik.newPhoto({"id":9067398,"src":"DenskyAgri_10_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067398.html","width":130,"caption":"","height":104});
															thumbnails[9066027] = clik.newPhoto({"id":9066027,"src":"11Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066027.html","width":130,"caption":"","height":104});
															thumbnails[9067404] = clik.newPhoto({"id":9067404,"src":"DenskyAgri_11_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067404.html","width":130,"caption":"","height":87});
															thumbnails[9064688] = clik.newPhoto({"id":9064688,"src":"PSJD01L_thumb.jpg","galleries_id":477998,"server_id":32,"link":"photo_9064688.html","width":130,"caption":"","height":130});
															thumbnails[9064729] = clik.newPhoto({"id":9064729,"src":"DSC05620_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064729.html","width":130,"caption":"","height":130});
															thumbnails[9066030] = clik.newPhoto({"id":9066030,"src":"12Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066030.html","width":130,"caption":"","height":104});
															thumbnails[9067411] = clik.newPhoto({"id":9067411,"src":"DenskyAgri_12_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067411.html","width":130,"caption":"","height":87});
															thumbnails[9064744] = clik.newPhoto({"id":9064744,"src":"DSC05635_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064744.html","width":130,"caption":"","height":130});
															thumbnails[9066032] = clik.newPhoto({"id":9066032,"src":"13Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066032.html","width":130,"caption":"","height":104});
															thumbnails[9067419] = clik.newPhoto({"id":9067419,"src":"DenskyAgri_13_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067419.html","width":130,"caption":"","height":87});
															thumbnails[9064752] = clik.newPhoto({"id":9064752,"src":"DSC05636_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064752.html","width":130,"caption":"","height":130});
															thumbnails[9066034] = clik.newPhoto({"id":9066034,"src":"14Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066034.html","width":130,"caption":"","height":104});
															thumbnails[9067539] = clik.newPhoto({"id":9067539,"src":"DenskyAgri_14_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067539.html","width":130,"caption":"","height":87});
															thumbnails[9064758] = clik.newPhoto({"id":9064758,"src":"DSC05638_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064758.html","width":130,"caption":"","height":130});
															thumbnails[9067546] = clik.newPhoto({"id":9067546,"src":"DenskyAgri_15_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067546.html","width":130,"caption":"","height":104});
															thumbnails[9066035] = clik.newPhoto({"id":9066035,"src":"16Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066035.html","width":130,"caption":"","height":104});
															thumbnails[9067618] = clik.newPhoto({"id":9067618,"src":"DenskyAgri_16_thumb.jpg","galleries_id":478228,"server_id":32,"link":"photo_9067618.html","width":130,"caption":"","height":87});
															thumbnails[9066038] = clik.newPhoto({"id":9066038,"src":"17Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066038.html","width":130,"caption":"","height":104});
															thumbnails[9064762] = clik.newPhoto({"id":9064762,"src":"DSC05639_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064762.html","width":130,"caption":"","height":130});
															thumbnails[9064766] = clik.newPhoto({"id":9064766,"src":"DSC05645_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064766.html","width":130,"caption":"","height":130});
															thumbnails[9066041] = clik.newPhoto({"id":9066041,"src":"19Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066041.html","width":130,"caption":"","height":104});
															thumbnails[9064773] = clik.newPhoto({"id":9064773,"src":"DSC05651_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064773.html","width":130,"caption":"","height":130});
															thumbnails[9066043] = clik.newPhoto({"id":9066043,"src":"20Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066043.html","width":130,"caption":"","height":104});
															thumbnails[9064785] = clik.newPhoto({"id":9064785,"src":"DSC05655_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064785.html","width":130,"caption":"","height":130});
															thumbnails[9066045] = clik.newPhoto({"id":9066045,"src":"21Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066045.html","width":130,"caption":"","height":104});
															thumbnails[9064791] = clik.newPhoto({"id":9064791,"src":"DSC05656_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064791.html","width":130,"caption":"","height":130});
															thumbnails[9064841] = clik.newPhoto({"id":9064841,"src":"DSC05658_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064841.html","width":130,"caption":"","height":130});
															thumbnails[8745099] = clik.newPhoto({"id":8745099,"src":"Mokoko_2011_01_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745099.html","width":130,"caption":"","height":99});
															thumbnails[9064850] = clik.newPhoto({"id":9064850,"src":"DSC05662_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064850.html","width":130,"caption":"","height":130});
															thumbnails[8745100] = clik.newPhoto({"id":8745100,"src":"Mokoko_2011_02_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745100.html","width":130,"caption":"","height":99});
															thumbnails[9064852] = clik.newPhoto({"id":9064852,"src":"DSC05669_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064852.html","width":130,"caption":"","height":130});
															thumbnails[9066048] = clik.newPhoto({"id":9066048,"src":"25Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066048.html","width":130,"caption":"","height":104});
															thumbnails[8745101] = clik.newPhoto({"id":8745101,"src":"sarajevo_01_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745101.html","width":130,"caption":"","height":99});
															thumbnails[9064853] = clik.newPhoto({"id":9064853,"src":"DSC05670_thumb_428771ED-1EC9-D45B-1C2AAEF83A372195.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064853.html","width":130,"caption":"","height":130});
															thumbnails[9064855] = clik.newPhoto({"id":9064855,"src":"DSC05677_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064855.html","width":130,"caption":"","height":130});
															thumbnails[9066052] = clik.newPhoto({"id":9066052,"src":"26Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066052.html","width":130,"caption":"","height":104});
															thumbnails[9066055] = clik.newPhoto({"id":9066055,"src":"27Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066055.html","width":130,"caption":"","height":104});
															thumbnails[8745102] = clik.newPhoto({"id":8745102,"src":"sarajevo_08_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745102.html","width":130,"caption":"","height":99});
															thumbnails[9064857] = clik.newPhoto({"id":9064857,"src":"DSC05680_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064857.html","width":130,"caption":"","height":130});
															thumbnails[9066056] = clik.newPhoto({"id":9066056,"src":"28Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066056.html","width":130,"caption":"","height":104});
															thumbnails[8745104] = clik.newPhoto({"id":8745104,"src":"sarajevo_10_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745104.html","width":130,"caption":"","height":99});
															thumbnails[9064861] = clik.newPhoto({"id":9064861,"src":"DSC05683_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064861.html","width":130,"caption":"","height":130});
															thumbnails[9066059] = clik.newPhoto({"id":9066059,"src":"29Densky_thumb.jpg","galleries_id":478121,"server_id":32,"link":"photo_9066059.html","width":130,"caption":"","height":104});
															thumbnails[8745105] = clik.newPhoto({"id":8745105,"src":"img092_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745105.html","width":130,"caption":"","height":62});
															thumbnails[8745106] = clik.newPhoto({"id":8745106,"src":"pharma103_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745106.html","width":130,"caption":"","height":64});
															thumbnails[8745109] = clik.newPhoto({"id":8745109,"src":"pharma107_thumb.jpg","galleries_id":460730,"server_id":32,"link":"photo_8745109.html","width":130,"caption":"","height":64});
															thumbnails[9064865] = clik.newPhoto({"id":9064865,"src":"DSC05688_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064865.html","width":130,"caption":"","height":130});
															thumbnails[9064881] = clik.newPhoto({"id":9064881,"src":"DSC05699_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064881.html","width":130,"caption":"","height":130});
															thumbnails[9064884] = clik.newPhoto({"id":9064884,"src":"DSC05700_2_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064884.html","width":130,"caption":"","height":130});
															thumbnails[9064888] = clik.newPhoto({"id":9064888,"src":"DSC05709_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064888.html","width":130,"caption":"","height":130});
															thumbnails[9064891] = clik.newPhoto({"id":9064891,"src":"DSC05711_2_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064891.html","width":130,"caption":"","height":130});
															thumbnails[9064896] = clik.newPhoto({"id":9064896,"src":"DSC05718_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064896.html","width":130,"caption":"","height":130});
															thumbnails[9064898] = clik.newPhoto({"id":9064898,"src":"DSC05724_2_thumb.jpg","galleries_id":477997,"server_id":32,"link":"photo_9064898.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[478228] = clik.newGallery({"parentGallery":460734,"usePopups":true,"title":"Erie","link":"gallery_478228.html","maxRecords":0.0,"photoIDs":[9067360.0,9067362.0,9067366.0,9067369.0,9067373.0,9067379.0,9067382.0,9067387.0,9067392.0,9067398.0,9067404.0,9067411.0,9067419.0,9067539.0,9067546.0,9067618.0],"skipIndex":0,"section_code":"gallery","featured_images":"9067618,9067546,9067539,9067419,9067411,9067404,9067398,9067392,9067387,9067382","id":478228,"singleSection":false});				  						galleries[477997] = clik.newGallery({"parentGallery":460734,"usePopups":true,"title":"Electro Motive","link":"gallery_477997.html","maxRecords":0.0,"photoIDs":[9064699.0,9064702.0,9064706.0,9064709.0,9064713.0,9064717.0,9064722.0,9064723.0,9064729.0,9064744.0,9064752.0,9064758.0,9064762.0,9064766.0,9064773.0,9064785.0,9064791.0,9064841.0,9064850.0,9064852.0,9064853.0,9064855.0,9064857.0,9064861.0,9064865.0,9064881.0,9064884.0,9064888.0,9064891.0,9064896.0,9064898.0],"skipIndex":0,"section_code":"gallery","featured_images":"9064898,9064896,9064891,9064888,9064884,9064881,9064865,9064861,9064857,9064855","id":477997,"singleSection":false});				  						galleries[477998] = clik.newGallery({"parentGallery":460734,"usePopups":true,"title":"Ritalin Kids","link":"gallery_477998.html","maxRecords":0.0,"photoIDs":[9064497.0,9064499.0,9064502.0,9064503.0,9064504.0,9064507.0,9064508.0,9064509.0,9064510.0,9064688.0],"skipIndex":0,"section_code":"gallery","featured_images":"9064688,9064510,9064509,9064508,9064507,9064504,9064503,9064502,9064499,9064497","id":477998,"singleSection":false});				  						galleries[460730] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"singles","link":"gallery_460730.html","maxRecords":0.0,"photoIDs":[9066066.0,9066068.0,9066072.0,8745099.0,8745100.0,8745101.0,8745102.0,8745104.0,8745105.0,8745106.0,8745109.0],"skipIndex":0,"section_code":"gallery","featured_images":"9066072,9066068,9066066,8745109,8745106,8745105,8745104,8745102,8745101,8745100","id":460730,"singleSection":false});				  						galleries[460734] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"stories ","link":"gallery_460734.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"9067618,9067546,9067539,9067419,9067411,9067404,9067398,9067392,9067387,9067382","id":460734,"singleSection":false});				  						galleries[478121] = clik.newGallery({"parentGallery":460734,"usePopups":true,"title":"Mass Urbanization of Africa","link":"gallery_478121.html","maxRecords":0.0,"photoIDs":[9066006.0,9066012.0,9066014.0,9066016.0,9066018.0,9066021.0,9066022.0,9066025.0,9066027.0,9066030.0,9066032.0,9066034.0,9066035.0,9066038.0,9066041.0,9066043.0,9066045.0,9066048.0,9066052.0,9066055.0,9066056.0,9066059.0],"skipIndex":0,"section_code":"gallery","featured_images":"9066059,9066056,9066055,9066052,9066048,9066045,9066043,9066041,9066038,9066035","id":478121,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9067618,9067546,9067539,9067419,9067411,9067404,9067398,9067392,9067387,9067382,9067379,9067373,9067369,9067366,9067362,9067360,9066072,9066068,9066066,9066059,9066056,9066055,9066052,9066048,9066045,9066043,9066041,9066038,9066035,9066034,9066032,9066030,9066027,9066025,9066022,9066021,9066018,9066016,9066014,9066012,9066006,9064898,9064896,9064891,9064888,9064884,9064881,9064865,9064861,9064857';
imageSets[3] = '9067618,9067546,9067539,9067419,9067411,9067404,9067398,9067392,9067387,9067382,9067379,9067373,9067369,9067366,9067362,9067360,9066072,9066068,9066066,9066059,9066056,9066055,9066052,9066048,9066045,9066043,9066041,9066038,9066035,9066034,9066032,9066030,9066027,9066025,9066022,9066021,9066018,9066016,9066014,9066012,9066006,9064898,9064896,9064891,9064888,9064884,9064881,9064865,9064861,9064857';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/johncd/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/johncd/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/johncd/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'GALLERY 7: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> CN$' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="emraphoto@yahoo.ca">';
					temp += '<input type="hidden" name="currency_code" value="CAD">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="emraphoto@yahoo.ca">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

