window.thumbnails = {};
															thumbnails[6508495] = clik.newPhoto({"id":6508495,"src":"IMG_93141_thumb.jpg","galleries_id":358103,"server_id":18,"link":"photo_6508495.html","width":130,"caption":"","height":87});
															thumbnails[6508503] = clik.newPhoto({"id":6508503,"src":"IMG_9689_thumb.jpg","galleries_id":358103,"server_id":18,"link":"photo_6508503.html","width":87,"caption":"","height":130});
															thumbnails[6508505] = clik.newPhoto({"id":6508505,"src":"IMG_9322_thumb.jpg","galleries_id":358103,"server_id":18,"link":"photo_6508505.html","width":87,"caption":"","height":130});
															thumbnails[6508506] = clik.newPhoto({"id":6508506,"src":"IMG_9696_thumb.jpg","galleries_id":358103,"server_id":18,"link":"photo_6508506.html","width":130,"caption":"","height":87});
															thumbnails[6508742] = clik.newPhoto({"id":6508742,"src":"Multigraphias01_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508742.html","width":130,"caption":"","height":97});
															thumbnails[6508744] = clik.newPhoto({"id":6508744,"src":"Multigraphias02_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508744.html","width":130,"caption":"","height":65});
															thumbnails[6508745] = clik.newPhoto({"id":6508745,"src":"Multigraphias03_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508745.html","width":130,"caption":"","height":66});
															thumbnails[6508746] = clik.newPhoto({"id":6508746,"src":"Multigraphias04_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508746.html","width":130,"caption":"","height":87});
															thumbnails[6508747] = clik.newPhoto({"id":6508747,"src":"Multigraphias05_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508747.html","width":130,"caption":"","height":95});
															thumbnails[6508748] = clik.newPhoto({"id":6508748,"src":"Multigraphias06_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6508748.html","width":130,"caption":"","height":100});
															thumbnails[6508757] = clik.newPhoto({"id":6508757,"src":"Senses01_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508757.html","width":87,"caption":"","height":130});
															thumbnails[6508758] = clik.newPhoto({"id":6508758,"src":"Senses02_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508758.html","width":130,"caption":"","height":87});
															thumbnails[6508759] = clik.newPhoto({"id":6508759,"src":"Senses03_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508759.html","width":130,"caption":"","height":87});
															thumbnails[6508760] = clik.newPhoto({"id":6508760,"src":"Senses04_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508760.html","width":130,"caption":"","height":87});
															thumbnails[6508761] = clik.newPhoto({"id":6508761,"src":"Senses05_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508761.html","width":130,"caption":"","height":87});
															thumbnails[6508762] = clik.newPhoto({"id":6508762,"src":"Senses06_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508762.html","width":130,"caption":"","height":87});
															thumbnails[6508763] = clik.newPhoto({"id":6508763,"src":"Senses07_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508763.html","width":130,"caption":"","height":87});
															thumbnails[6508764] = clik.newPhoto({"id":6508764,"src":"Senses08_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508764.html","width":130,"caption":"","height":87});
															thumbnails[6508765] = clik.newPhoto({"id":6508765,"src":"Senses09_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508765.html","width":130,"caption":"","height":87});
															thumbnails[6508766] = clik.newPhoto({"id":6508766,"src":"Senses10_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508766.html","width":130,"caption":"","height":87});
															thumbnails[6508767] = clik.newPhoto({"id":6508767,"src":"Senses11_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508767.html","width":87,"caption":"","height":130});
															thumbnails[6508768] = clik.newPhoto({"id":6508768,"src":"Senses12_thumb.jpg","galleries_id":357747,"server_id":18,"link":"photo_6508768.html","width":130,"caption":"","height":87});
															thumbnails[6508780] = clik.newPhoto({"id":6508780,"src":"Dungeness01_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508780.html","width":130,"caption":"","height":87});
															thumbnails[6508782] = clik.newPhoto({"id":6508782,"src":"Dungeness02_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508782.html","width":130,"caption":"","height":87});
															thumbnails[6508783] = clik.newPhoto({"id":6508783,"src":"Dungeness03_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508783.html","width":130,"caption":"","height":87});
															thumbnails[6508784] = clik.newPhoto({"id":6508784,"src":"Dungeness04_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508784.html","width":130,"caption":"","height":87});
															thumbnails[6508805] = clik.newPhoto({"id":6508805,"src":"Dungeness05_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508805.html","width":130,"caption":"","height":87});
															thumbnails[6508806] = clik.newPhoto({"id":6508806,"src":"Dungeness06_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508806.html","width":87,"caption":"","height":130});
															thumbnails[6508809] = clik.newPhoto({"id":6508809,"src":"Dungeness07_thumb.jpg","galleries_id":357803,"server_id":18,"link":"photo_6508809.html","width":130,"caption":"","height":87});
															thumbnails[6509138] = clik.newPhoto({"id":6509138,"src":"London01_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509138.html","width":130,"caption":"","height":87});
															thumbnails[6509141] = clik.newPhoto({"id":6509141,"src":"London02_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509141.html","width":130,"caption":"","height":87});
															thumbnails[6509148] = clik.newPhoto({"id":6509148,"src":"London03_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509148.html","width":87,"caption":"","height":130});
															thumbnails[6509150] = clik.newPhoto({"id":6509150,"src":"London04_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509150.html","width":130,"caption":"","height":87});
															thumbnails[6509151] = clik.newPhoto({"id":6509151,"src":"London05_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509151.html","width":87,"caption":"","height":130});
															thumbnails[6509155] = clik.newPhoto({"id":6509155,"src":"London06_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509155.html","width":130,"caption":"","height":87});
															thumbnails[6509157] = clik.newPhoto({"id":6509157,"src":"London07_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509157.html","width":130,"caption":"","height":87});
															thumbnails[6509158] = clik.newPhoto({"id":6509158,"src":"London08_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509158.html","width":87,"caption":"","height":130});
															thumbnails[6509159] = clik.newPhoto({"id":6509159,"src":"London09_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509159.html","width":87,"caption":"","height":130});
															thumbnails[6509161] = clik.newPhoto({"id":6509161,"src":"London10_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509161.html","width":130,"caption":"","height":87});
															thumbnails[6509162] = clik.newPhoto({"id":6509162,"src":"London11_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509162.html","width":130,"caption":"","height":87});
															thumbnails[6509163] = clik.newPhoto({"id":6509163,"src":"London12_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509163.html","width":87,"caption":"","height":130});
															thumbnails[6509165] = clik.newPhoto({"id":6509165,"src":"London13_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509165.html","width":87,"caption":"","height":130});
															thumbnails[6509166] = clik.newPhoto({"id":6509166,"src":"London14_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509166.html","width":130,"caption":"","height":87});
															thumbnails[6509168] = clik.newPhoto({"id":6509168,"src":"London15_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509168.html","width":130,"caption":"","height":87});
															thumbnails[6509171] = clik.newPhoto({"id":6509171,"src":"London17_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509171.html","width":87,"caption":"","height":130});
															thumbnails[6509173] = clik.newPhoto({"id":6509173,"src":"London18_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509173.html","width":130,"caption":"","height":87});
															thumbnails[6509187] = clik.newPhoto({"id":6509187,"src":"London171_thumb.jpg","galleries_id":358163,"server_id":18,"link":"photo_6509187.html","width":130,"caption":"","height":87});
															thumbnails[6509198] = clik.newPhoto({"id":6509198,"src":"Bauru011_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509198.html","width":130,"caption":"","height":92});
															thumbnails[6509200] = clik.newPhoto({"id":6509200,"src":"Bauru02_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509200.html","width":130,"caption":"","height":101});
															thumbnails[6509203] = clik.newPhoto({"id":6509203,"src":"Bauru03_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509203.html","width":130,"caption":"","height":103});
															thumbnails[6509210] = clik.newPhoto({"id":6509210,"src":"Bauru04_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509210.html","width":87,"caption":"","height":130});
															thumbnails[6509217] = clik.newPhoto({"id":6509217,"src":"Bauru06_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509217.html","width":130,"caption":"","height":87});
															thumbnails[6509226] = clik.newPhoto({"id":6509226,"src":"Bauru08_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509226.html","width":87,"caption":"","height":130});
															thumbnails[6509530] = clik.newPhoto({"id":6509530,"src":"Bauru051_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509530.html","width":130,"caption":"","height":87});
															thumbnails[6509532] = clik.newPhoto({"id":6509532,"src":"Bauru071_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6509532.html","width":87,"caption":"","height":130});
															thumbnails[6520517] = clik.newPhoto({"id":6520517,"src":"Multigraphias07_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6520517.html","width":100,"caption":"","height":130});
															thumbnails[6578936] = clik.newPhoto({"id":6578936,"src":"Bauru09_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578936.html","width":130,"caption":"","height":87});
															thumbnails[6578937] = clik.newPhoto({"id":6578937,"src":"Bauru10_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578937.html","width":130,"caption":"","height":87});
															thumbnails[6578941] = clik.newPhoto({"id":6578941,"src":"Bauru11_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578941.html","width":130,"caption":"","height":87});
															thumbnails[6578942] = clik.newPhoto({"id":6578942,"src":"Bauru12_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578942.html","width":130,"caption":"","height":87});
															thumbnails[6578943] = clik.newPhoto({"id":6578943,"src":"Bauru13_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578943.html","width":130,"caption":"","height":87});
															thumbnails[6578946] = clik.newPhoto({"id":6578946,"src":"Bauru14_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578946.html","width":130,"caption":"","height":87});
															thumbnails[6648903] = clik.newPhoto({"id":6648903,"src":"Multigraphias08_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6648903.html","width":98,"caption":"","height":130});
															thumbnails[6648906] = clik.newPhoto({"id":6648906,"src":"Multigraphias09_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6648906.html","width":130,"caption":"","height":98});
															thumbnails[6648910] = clik.newPhoto({"id":6648910,"src":"Multigraphias10_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6648910.html","width":130,"caption":"","height":46});
															thumbnails[6648951] = clik.newPhoto({"id":6648951,"src":"Multigraphias11_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6648951.html","width":130,"caption":"","height":79});
															thumbnails[6648955] = clik.newPhoto({"id":6648955,"src":"Multigraphias12_thumb.jpg","galleries_id":358114,"server_id":18,"link":"photo_6648955.html","width":66,"caption":"","height":130});
															thumbnails[6767489] = clik.newPhoto({"id":6767489,"src":"Optical_Endorphin-1_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767489.html","width":93,"caption":"","height":130});
															thumbnails[6767492] = clik.newPhoto({"id":6767492,"src":"Optical_Endorphin-2_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767492.html","width":98,"caption":"","height":130});
															thumbnails[6767493] = clik.newPhoto({"id":6767493,"src":"Optical_Endorphin-3_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767493.html","width":107,"caption":"","height":130});
															thumbnails[6767496] = clik.newPhoto({"id":6767496,"src":"Optical_Endorphin-4_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767496.html","width":98,"caption":"","height":130});
															thumbnails[6767497] = clik.newPhoto({"id":6767497,"src":"Optical_Endorphin-5_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767497.html","width":98,"caption":"","height":130});
															thumbnails[6767499] = clik.newPhoto({"id":6767499,"src":"Optical_Endorphin-6_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767499.html","width":98,"caption":"","height":130});
															thumbnails[6767501] = clik.newPhoto({"id":6767501,"src":"Optical_Endorphin-7_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767501.html","width":98,"caption":"","height":130});
															thumbnails[6767503] = clik.newPhoto({"id":6767503,"src":"Optical_Endorphin-8_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767503.html","width":102,"caption":"","height":130});
															thumbnails[6767505] = clik.newPhoto({"id":6767505,"src":"Optical_Endorphin-9_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767505.html","width":102,"caption":"","height":130});
															thumbnails[6767506] = clik.newPhoto({"id":6767506,"src":"Optical_Endorphin-10_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767506.html","width":95,"caption":"","height":130});
															thumbnails[6767507] = clik.newPhoto({"id":6767507,"src":"Optical_Endorphin-11_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767507.html","width":130,"caption":"","height":43});
															thumbnails[6767508] = clik.newPhoto({"id":6767508,"src":"Optical_Endorphin-12_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767508.html","width":107,"caption":"","height":130});
															thumbnails[6767510] = clik.newPhoto({"id":6767510,"src":"Optical_Endorphin-13_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767510.html","width":96,"caption":"","height":130});
															thumbnails[6767511] = clik.newPhoto({"id":6767511,"src":"Optical_Endorphin-14_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767511.html","width":91,"caption":"","height":130});
															thumbnails[6767512] = clik.newPhoto({"id":6767512,"src":"Optical_Endorphin-151_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767512.html","width":91,"caption":"","height":130});
															thumbnails[6767517] = clik.newPhoto({"id":6767517,"src":"Optical_Endorphin-161_thumb.jpg","galleries_id":368441,"server_id":18,"link":"photo_6767517.html","width":89,"caption":"","height":130});
															thumbnails[6578955] = clik.newPhoto({"id":6578955,"src":"Bauru18_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578955.html","width":130,"caption":"","height":87});
															thumbnails[6578956] = clik.newPhoto({"id":6578956,"src":"Bauru19_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578956.html","width":130,"caption":"","height":87});
															thumbnails[6578953] = clik.newPhoto({"id":6578953,"src":"Bauru17_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578953.html","width":130,"caption":"","height":92});
															thumbnails[6578951] = clik.newPhoto({"id":6578951,"src":"Bauru151_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578951.html","width":130,"caption":"","height":100});
															thumbnails[6578949] = clik.newPhoto({"id":6578949,"src":"Bauru16_thumb.jpg","galleries_id":358162,"server_id":18,"link":"photo_6578949.html","width":130,"caption":"","height":94});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[357747] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Senses","link":"gallery_357747.html","maxRecords":0.0,"photoIDs":[6508757.0,6508758.0,6508759.0,6508760.0,6508761.0,6508762.0,6508763.0,6508764.0,6508765.0,6508766.0,6508767.0,6508768.0],"skipIndex":0,"section_code":"gallery","featured_images":"6508768,6508765","id":357747,"singleSection":false});				  						galleries[358163] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"London","link":"gallery_358163.html","maxRecords":0.0,"photoIDs":[6509138.0,6509141.0,6509148.0,6509150.0,6509151.0,6509155.0,6509157.0,6509158.0,6509159.0,6509161.0,6509162.0,6509163.0,6509165.0,6509166.0,6509168.0,6509171.0,6509173.0,6509187.0],"skipIndex":0,"section_code":"gallery","featured_images":"6509187,6509150,6509138","id":358163,"singleSection":false});				  						galleries[357803] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dungeness - Kent","link":"gallery_357803.html","maxRecords":0.0,"photoIDs":[6508780.0,6508782.0,6508783.0,6508784.0,6508805.0,6508806.0,6508809.0],"skipIndex":0,"section_code":"gallery","featured_images":"6508809,6508782","id":357803,"singleSection":false});				  						galleries[358103] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Paraty, RJ, Brazil","link":"gallery_358103.html","maxRecords":0.0,"photoIDs":[6508495.0,6508503.0,6508505.0,6508506.0],"skipIndex":0,"section_code":"gallery","featured_images":6508495.0,"id":358103,"singleSection":false});				  						galleries[358162] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Jornal da Cidade - Brazil","link":"gallery_358162.html","maxRecords":0.0,"photoIDs":[6509198.0,6509200.0,6509203.0,6509210.0,6509217.0,6509226.0,6509530.0,6509532.0,6578936.0,6578937.0,6578941.0,6578942.0,6578943.0,6578946.0,6578955.0,6578956.0,6578953.0,6578951.0,6578949.0],"skipIndex":0,"section_code":"gallery","featured_images":6509198.0,"id":358162,"singleSection":false});				  						galleries[358114] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Multigraphias","link":"gallery_358114.html","maxRecords":0.0,"photoIDs":[6508742.0,6508744.0,6508745.0,6508746.0,6508747.0,6508748.0,6520517.0,6648903.0,6648906.0,6648910.0,6648951.0,6648955.0],"skipIndex":0,"section_code":"gallery","featured_images":"6648906,6508748,6508742","id":358114,"singleSection":false});				  						galleries[368441] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Essays","link":"gallery_368441.html","maxRecords":0.0,"photoIDs":[6767489.0,6767492.0,6767493.0,6767496.0,6767497.0,6767499.0,6767501.0,6767503.0,6767505.0,6767506.0,6767507.0,6767508.0,6767510.0,6767511.0,6767512.0,6767517.0],"skipIndex":0,"section_code":"gallery","featured_images":6767517.0,"id":368441,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6509198,6509187,6509138,6508809,6508782,6508768,6508765,6508742,6508495';
imageSets[2] = '6767517,6648906,6509198,6509187,6509150,6509138,6508809,6508782,6508768,6508765,6508748,6508742,6508495';
imageSets[3] = '6508759,6508758,6508757';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lucianafranzolin/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lucianafranzolin/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 && backgrounds[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 = 'luciana franzolin : ' + 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>All rights reserved: ©  </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="LUCIANAFRANZOLIN">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

