window.thumbnails = {};
															thumbnails[749325] = clik.newPhoto({"id":749325,"src":"200202_thumb.jpg","galleries_id":57803,"server_id":18,"link":"photo_749325.html","width":130,"caption":"20 x 23 cm","height":108});
															thumbnails[749498] = clik.newPhoto({"id":749498,"src":"199102_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_749498.html","width":130,"caption":1992.0,"height":93});
															thumbnails[749502] = clik.newPhoto({"id":749502,"src":"1991031_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_749502.html","width":130,"caption":1992.0,"height":93});
															thumbnails[749506] = clik.newPhoto({"id":749506,"src":"199104_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_749506.html","width":130,"caption":1992.0,"height":94});
															thumbnails[751398] = clik.newPhoto({"id":751398,"src":"199901_thumb.jpg","galleries_id":57807,"server_id":18,"link":"photo_751398.html","width":130,"caption":"50 x 50 cm","height":122});
															thumbnails[751403] = clik.newPhoto({"id":751403,"src":"199902_thumb.jpg","galleries_id":57807,"server_id":18,"link":"photo_751403.html","width":130,"caption":"50 x 50 cm","height":126});
															thumbnails[751417] = clik.newPhoto({"id":751417,"src":"199903_thumb.jpg","galleries_id":57807,"server_id":18,"link":"photo_751417.html","width":130,"caption":"85 x 66 cm","height":167});
															thumbnails[751419] = clik.newPhoto({"id":751419,"src":"199904_thumb.jpg","galleries_id":57807,"server_id":18,"link":"photo_751419.html","width":130,"caption":"140 x 73 cm","height":250});
															thumbnails[751422] = clik.newPhoto({"id":751422,"src":"199905_thumb.jpg","galleries_id":57807,"server_id":18,"link":"photo_751422.html","width":130,"caption":"140 x 73 cm","height":243});
															thumbnails[751423] = clik.newPhoto({"id":751423,"src":"200101_thumb.jpg","galleries_id":57611,"server_id":18,"link":"photo_751423.html","width":130,"caption":"32 x 82 cm","height":47});
															thumbnails[751425] = clik.newPhoto({"id":751425,"src":"200102_thumb.jpg","galleries_id":57611,"server_id":18,"link":"photo_751425.html","width":130,"caption":"32 x 82 cm","height":45});
															thumbnails[751428] = clik.newPhoto({"id":751428,"src":"200103_thumb.jpg","galleries_id":57611,"server_id":18,"link":"photo_751428.html","width":130,"caption":"32 x 82 cm","height":48});
															thumbnails[751439] = clik.newPhoto({"id":751439,"src":"2002021_thumb.jpg","galleries_id":57803,"server_id":18,"link":"photo_751439.html","width":130,"caption":"35 x 34,5 cm","height":132});
															thumbnails[751447] = clik.newPhoto({"id":751447,"src":"200204_thumb.jpg","galleries_id":57803,"server_id":18,"link":"photo_751447.html","width":130,"caption":"41,5 x 39 cm","height":133});
															thumbnails[751459] = clik.newPhoto({"id":751459,"src":"200401_thumb.jpg","galleries_id":57804,"server_id":18,"link":"photo_751459.html","width":130,"caption":"90 x 48 cm","height":243});
															thumbnails[751463] = clik.newPhoto({"id":751463,"src":"200402_thumb.jpg","galleries_id":57804,"server_id":18,"link":"photo_751463.html","width":130,"caption":"34 x 70 cm","height":67});
															thumbnails[751467] = clik.newPhoto({"id":751467,"src":"200403_thumb.jpg","galleries_id":57804,"server_id":18,"link":"photo_751467.html","width":130,"caption":"90 x 47,5 cm","height":67});
															thumbnails[751470] = clik.newPhoto({"id":751470,"src":"200404_thumb.jpg","galleries_id":57804,"server_id":18,"link":"photo_751470.html","width":130,"caption":"48 x 75 cm","height":82});
															thumbnails[751474] = clik.newPhoto({"id":751474,"src":"200405_thumb.jpg","galleries_id":57804,"server_id":18,"link":"photo_751474.html","width":130,"caption":"90 x 48 cm","height":245});
															thumbnails[751491] = clik.newPhoto({"id":751491,"src":"200603_thumb.jpg","galleries_id":57805,"server_id":18,"link":"photo_751491.html","width":130,"caption":"17 x 24 cm","height":95});
															thumbnails[751502] = clik.newPhoto({"id":751502,"src":"200604_thumb.jpg","galleries_id":57805,"server_id":18,"link":"photo_751502.html","width":130,"caption":"18 x 25 cm","height":91});
															thumbnails[751509] = clik.newPhoto({"id":751509,"src":"200605_thumb.jpg","galleries_id":57805,"server_id":18,"link":"photo_751509.html","width":130,"caption":"17 x 25 cm","height":92});
															thumbnails[751514] = clik.newPhoto({"id":751514,"src":"200701_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_751514.html","width":130,"caption":"22,5 x 29 cm","height":105});
															thumbnails[754750] = clik.newPhoto({"id":754750,"src":"198701_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754750.html","width":130,"caption":1987.0,"height":190});
															thumbnails[754796] = clik.newPhoto({"id":754796,"src":"198702_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754796.html","width":130,"caption":1987.0,"height":187});
															thumbnails[754798] = clik.newPhoto({"id":754798,"src":"198703_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754798.html","width":130,"caption":1987.0,"height":216});
															thumbnails[754800] = clik.newPhoto({"id":754800,"src":"198801_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754800.html","width":130,"caption":1988.0,"height":127});
															thumbnails[754817] = clik.newPhoto({"id":754817,"src":"198802_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754817.html","width":130,"caption":1988.0,"height":125});
															thumbnails[754819] = clik.newPhoto({"id":754819,"src":"198803_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754819.html","width":130,"caption":1988.0,"height":125});
															thumbnails[754821] = clik.newPhoto({"id":754821,"src":"198901_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754821.html","width":130,"caption":1989.0,"height":95});
															thumbnails[754825] = clik.newPhoto({"id":754825,"src":"198902_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754825.html","width":130,"caption":1989.0,"height":123});
															thumbnails[754830] = clik.newPhoto({"id":754830,"src":"198903_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754830.html","width":130,"caption":1989.0,"height":126});
															thumbnails[754832] = clik.newPhoto({"id":754832,"src":"199002_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754832.html","width":130,"caption":1990.0,"height":134});
															thumbnails[754852] = clik.newPhoto({"id":754852,"src":"199003_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754852.html","width":130,"caption":1990.0,"height":200});
															thumbnails[754869] = clik.newPhoto({"id":754869,"src":"199004_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754869.html","width":130,"caption":1990.0,"height":207});
															thumbnails[754871] = clik.newPhoto({"id":754871,"src":"199301_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754871.html","width":130,"caption":1993.0,"height":91});
															thumbnails[754875] = clik.newPhoto({"id":754875,"src":"199302_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754875.html","width":130,"caption":1993.0,"height":93});
															thumbnails[754878] = clik.newPhoto({"id":754878,"src":"199303_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754878.html","width":130,"caption":1993.0,"height":91});
															thumbnails[754880] = clik.newPhoto({"id":754880,"src":"199401_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754880.html","width":130,"caption":1994.0,"height":189});
															thumbnails[754884] = clik.newPhoto({"id":754884,"src":"199402_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754884.html","width":130,"caption":1994.0,"height":149});
															thumbnails[754887] = clik.newPhoto({"id":754887,"src":"199403_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754887.html","width":130,"caption":1994.0,"height":295});
															thumbnails[755020] = clik.newPhoto({"id":755020,"src":"199804_thumb.jpg","galleries_id":58307,"server_id":18,"link":"photo_755020.html","width":130,"caption":1998.0,"height":303});
															thumbnails[1058519] = clik.newPhoto({"id":1058519,"src":"DSCF3416_thumb.jpg","galleries_id":58307,"server_id":18,"link":"photo_1058519.html","width":130,"caption":"130 x 70 cm","height":68});
															thumbnails[1058522] = clik.newPhoto({"id":1058522,"src":"DSCF3422_thumb.jpg","galleries_id":58307,"server_id":18,"link":"photo_1058522.html","width":130,"caption":"40 x 70 cm","height":199});
															thumbnails[1215248] = clik.newPhoto({"id":1215248,"src":"DSCF3673_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_1215248.html","width":130,"caption":"95 x 35 cm","height":40});
															thumbnails[1215251] = clik.newPhoto({"id":1215251,"src":"DSCF3674_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_1215251.html","width":130,"caption":"95 x 35 cm","height":43});
															thumbnails[4850457] = clik.newPhoto({"id":4850457,"src":"DSCF7963_thumb.jpg","galleries_id":222514,"server_id":18,"link":"photo_4850457.html","width":130,"caption":"","height":68});
															thumbnails[4850464] = clik.newPhoto({"id":4850464,"src":"DSCF8009_thumb.jpg","galleries_id":222514,"server_id":18,"link":"photo_4850464.html","width":130,"caption":"","height":253});
															thumbnails[4850467] = clik.newPhoto({"id":4850467,"src":"DSCF8021_thumb.jpg","galleries_id":222514,"server_id":18,"link":"photo_4850467.html","width":130,"caption":"","height":256});
															thumbnails[6937663] = clik.newPhoto({"id":6937663,"src":"DSCF9712_thumb.jpg","galleries_id":376285,"server_id":18,"link":"photo_6937663.html","width":130,"caption":"","height":98});
															thumbnails[6937667] = clik.newPhoto({"id":6937667,"src":"DSCF9707_thumb.jpg","galleries_id":376285,"server_id":18,"link":"photo_6937667.html","width":130,"caption":"","height":88});
															thumbnails[6937673] = clik.newPhoto({"id":6937673,"src":"DSCF9694_thumb.jpg","galleries_id":376285,"server_id":18,"link":"photo_6937673.html","width":130,"caption":"","height":95});
															thumbnails[6937675] = clik.newPhoto({"id":6937675,"src":"DSCF9681_thumb.jpg","galleries_id":376285,"server_id":18,"link":"photo_6937675.html","width":130,"caption":"","height":87});
															thumbnails[6937677] = clik.newPhoto({"id":6937677,"src":"DSCF9680_thumb.jpg","galleries_id":376285,"server_id":18,"link":"photo_6937677.html","width":130,"caption":"","height":98});
															thumbnails[6937696] = clik.newPhoto({"id":6937696,"src":"DSCF9729_thumb.jpg","galleries_id":376287,"server_id":18,"link":"photo_6937696.html","width":130,"caption":"","height":98});
															thumbnails[6937697] = clik.newPhoto({"id":6937697,"src":"DSCF9733_thumb.jpg","galleries_id":376287,"server_id":18,"link":"photo_6937697.html","width":130,"caption":"","height":108});
															thumbnails[6937698] = clik.newPhoto({"id":6937698,"src":"DSCF9734_thumb.jpg","galleries_id":376287,"server_id":18,"link":"photo_6937698.html","width":130,"caption":"","height":98});
															thumbnails[8560408] = clik.newPhoto({"id":8560408,"src":"DSCF0885_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_8560408.html","width":130,"caption":"","height":132});
															thumbnails[8560407] = clik.newPhoto({"id":8560407,"src":"DSCF0884_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_8560407.html","width":130,"caption":"","height":132});
															thumbnails[8560404] = clik.newPhoto({"id":8560404,"src":"DSCF0881_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_8560404.html","width":130,"caption":"","height":400});
															thumbnails[8560411] = clik.newPhoto({"id":8560411,"src":"DSCF0882_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_8560411.html","width":130,"caption":"","height":66});
															thumbnails[7904406] = clik.newPhoto({"id":7904406,"src":"DSCF0119_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_7904406.html","width":130,"caption":"SHU, 70 x 36 cm (Chinese Calligraphy)","height":257});
															thumbnails[7904438] = clik.newPhoto({"id":7904438,"src":"DSCF0122_thumb.jpg","galleries_id":426350,"server_id":18,"link":"photo_7904438.html","width":130,"caption":"SHU WEI, 80 x 36 cm (Chinese Calligraphy)","height":275});
															thumbnails[754892] = clik.newPhoto({"id":754892,"src":"199501_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754892.html","width":130,"caption":1995.0,"height":176});
															thumbnails[2777121] = clik.newPhoto({"id":2777121,"src":"DSCF1300_thumb.jpg","galleries_id":174026,"server_id":18,"link":"photo_2777121.html","width":130,"caption":"82 x 25 cm","height":436});
															thumbnails[754893] = clik.newPhoto({"id":754893,"src":"199503_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754893.html","width":130,"caption":1995.0,"height":191});
															thumbnails[754895] = clik.newPhoto({"id":754895,"src":"199504_thumb.jpg","galleries_id":58283,"server_id":18,"link":"photo_754895.html","width":130,"caption":1995.0,"height":87});
															thumbnails[2777148] = clik.newPhoto({"id":2777148,"src":"DSCF1330_thumb.jpg","galleries_id":174026,"server_id":18,"link":"photo_2777148.html","width":130,"caption":"300 x 32 cm","height":98});
															thumbnails[3640397] = clik.newPhoto({"id":3640397,"src":"DSCF1684_thumb.jpg","galleries_id":174026,"server_id":18,"link":"photo_3640397.html","width":130,"caption":"Susak workshop","height":98});
															thumbnails[1492360] = clik.newPhoto({"id":1492360,"src":"DSCF3333_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_1492360.html","width":130,"caption":"17 x 64 cm","height":599});
															thumbnails[1492384] = clik.newPhoto({"id":1492384,"src":"DSCF3500_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_1492384.html","width":130,"caption":"kaligrafija\/calligraphy: shiyi, 37 x 24 cm","height":204});
															thumbnails[1492390] = clik.newPhoto({"id":1492390,"src":"DSCF3498_thumb.jpg","galleries_id":57806,"server_id":18,"link":"photo_1492390.html","width":130,"caption":"kaligrafija\/calligraphy: shudao, 39 x 25 cm","height":206});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[426350] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2011.0,"link":"gallery_426350.html","maxRecords":0.0,"photoIDs":[8560408.0,8560407.0,8560404.0,8560411.0,7904406.0,7904438.0],"skipIndex":0,"section_code":"gallery","featured_images":"8560411,8560408,8560407,8560404,7904438,7904406","id":426350,"singleSection":false});				  						galleries[376285] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2010.0,"link":"gallery_376285.html","maxRecords":0.0,"photoIDs":[6937663.0,6937667.0,6937673.0,6937675.0,6937677.0],"skipIndex":0,"section_code":"gallery","featured_images":"6937677,6937675,6937673,6937667,6937663","id":376285,"singleSection":false});				  						galleries[222514] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2009.0,"link":"gallery_222514.html","maxRecords":0.0,"photoIDs":[4850457.0,4850464.0,4850467.0],"skipIndex":0,"section_code":"gallery","featured_images":"4850467,4850464,4850457","id":222514,"singleSection":false});				  						galleries[174026] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2008.0,"link":"gallery_174026.html","maxRecords":0.0,"photoIDs":[2777121.0,2777148.0,3640397.0],"skipIndex":0,"section_code":"gallery","featured_images":"3640397,2777148,2777121","id":174026,"singleSection":false});				  						galleries[57806] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2007.0,"link":"gallery_57806.html","maxRecords":0.0,"photoIDs":[751514.0,1215248.0,1215251.0,1492360.0,1492384.0,1492390.0],"skipIndex":0,"section_code":"gallery","featured_images":751514.0,"id":57806,"singleSection":false});				  						galleries[57805] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2006.0,"link":"gallery_57805.html","maxRecords":0.0,"photoIDs":[751491.0,751502.0,751509.0],"skipIndex":0,"section_code":"gallery","featured_images":751491.0,"id":57805,"singleSection":false});				  						galleries[376287] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2005.0,"link":"gallery_376287.html","maxRecords":0.0,"photoIDs":[6937696.0,6937697.0,6937698.0],"skipIndex":0,"section_code":"gallery","featured_images":"6937698,6937697,6937696","id":376287,"singleSection":false});				  						galleries[57804] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2004.0,"link":"gallery_57804.html","maxRecords":0.0,"photoIDs":[751459.0,751463.0,751467.0,751470.0,751474.0],"skipIndex":0,"section_code":"gallery","featured_images":751459.0,"id":57804,"singleSection":false});				  						galleries[57803] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2002.0,"link":"gallery_57803.html","maxRecords":0.0,"photoIDs":[749325.0,751439.0,751447.0],"skipIndex":0,"section_code":"gallery","featured_images":749325.0,"id":57803,"singleSection":false});				  						galleries[57611] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2001.0,"link":"gallery_57611.html","maxRecords":0.0,"photoIDs":[751423.0,751425.0,751428.0],"skipIndex":0,"section_code":"gallery","featured_images":751423.0,"id":57611,"singleSection":false});				  						galleries[57807] = clik.newGallery({"parentGallery":"","usePopups":false,"title":1999.0,"link":"gallery_57807.html","maxRecords":0.0,"photoIDs":[751398.0,751403.0,751417.0,751419.0,751422.0],"skipIndex":0,"section_code":"gallery","featured_images":751422.0,"id":57807,"singleSection":false});				  						galleries[58307] = clik.newGallery({"parentGallery":"","usePopups":false,"title":1998.0,"link":"gallery_58307.html","maxRecords":0.0,"photoIDs":[755020.0,1058519.0,1058522.0],"skipIndex":0,"section_code":"gallery","featured_images":"1058522,1058519,755020","id":58307,"singleSection":false});				  						galleries[58283] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"1987-1995","link":"gallery_58283.html","maxRecords":0.0,"photoIDs":[749498.0,749502.0,749506.0,754750.0,754796.0,754798.0,754800.0,754817.0,754819.0,754821.0,754825.0,754830.0,754832.0,754852.0,754869.0,754871.0,754875.0,754878.0,754880.0,754884.0,754887.0,754892.0,754893.0,754895.0],"skipIndex":0,"section_code":"gallery","featured_images":"754895,754893,754892,754887,754884,754880,754878,754875,754871,754869","id":58283,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8560411,8560408,8560407,8560404,7904438,7904406,6937698,6937697,6937696,6937677,6937675,6937673,6937667,6937663,4850467,4850464,4850457,3640397,2777148,2777121,1492390,1492384,1492360,1215251,1215248,1058522,1058519,755020,754895,754893,754892,754887,754884,754880,754878,754875,754871,754869,754852,754832,754830,754825,754821,754819,754817,754800,754798,754796,754750,751514';
imageSets[2] = '751514,751491,751459,751423,751422,749325';
imageSets[3] = '8560411,8560408,8560407,8560404,7904438,7904406,6937698,6937697,6937696,6937677,6937675,6937673,6937667,6937663,4850467,4850464,4850457,3640397,2777148,2777121,1492390,1492384,1492360,1215251,1215248,1058522,1058519,755020,754895,754893,754892,754887,754884,754880,754878,754875,754871,754869,754852,754832,754830,754825,754821,754819,754817,754800,754798,754796,754750,751514';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ivavalentic/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ivavalentic/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 = 'Iva Valentic Art: ' + 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> ' + (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 += '<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;
	}
}

			

