window.thumbnails = {};
															thumbnails[9091782] = clik.newPhoto({"id":9091782,"src":"Chris_Library_235_thumb.jpg","galleries_id":"","server_id":37,"link":"#","width":130,"caption":"","height":98});
															thumbnails[7283765] = clik.newPhoto({"id":7283765,"src":"makemepretty2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7283765.html","width":130,"caption":"MAKE ME PRETTY","height":127});
															thumbnails[6317282] = clik.newPhoto({"id":6317282,"src":"Necrosatyr2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6317282.html","width":130,"caption":"NECROSATYR<BR><br>\r\n22\" X 28\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":173});
															thumbnails[5098256] = clik.newPhoto({"id":5098256,"src":"juxtaposition_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098256.html","width":130,"caption":"JUXTAPOSITION<BR> <br>\r\n20\" X 24\"<BR> <br>\r\nAcrylic On Canvas<BR> <br>\r\n2009","height":171});
															thumbnails[5098257] = clik.newPhoto({"id":5098257,"src":"dinnerfor2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098257.html","width":130,"caption":"DINNER FOR TWO<BR><br>\r\n24\" X 30\"<BR><br>\r\nAcrylic On Canvas<BR> <br>\r\n2009 ","height":173});
															thumbnails[5098269] = clik.newPhoto({"id":5098269,"src":"iudico_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098269.html","width":130,"caption":"IUDICO<BR><br>\r\n24\" X 24\"<BR> <br>\r\nAcrylic On Canvas<BR> <br>\r\n2009","height":128});
															thumbnails[5098271] = clik.newPhoto({"id":5098271,"src":"purgatory_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098271.html","width":130,"caption":"PURGATORY<BR><br>\r\n20\" X 24\"<BR> <br>\r\nAcrylic On Canvas<BR><br>\r\n2009","height":98});
															thumbnails[5098273] = clik.newPhoto({"id":5098273,"src":"rest_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098273.html","width":130,"caption":"REST<BR><br>\r\n14\" X 18\"<BR> <br>\r\nAcrylic On Canvas<BR> <br>\r\n2009","height":177});
															thumbnails[5098277] = clik.newPhoto({"id":5098277,"src":"heresay_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098277.html","width":130,"caption":"HERESAY IN RACALMUTO<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2009","height":123});
															thumbnails[5098283] = clik.newPhoto({"id":5098283,"src":"silenttreatment_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098283.html","width":130,"caption":"SILENT TREATMENT<BR><br>\r\n18\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2009","height":177});
															thumbnails[5098502] = clik.newPhoto({"id":5098502,"src":"one_eighteen_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5098502.html","width":130,"caption":"ONE EIGHTEEN<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2009","height":116});
															thumbnails[5099073] = clik.newPhoto({"id":5099073,"src":"winter_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5099073.html","width":130,"caption":"AWAKENING<BR><br>\r\n14\" X 17\"<BR><br>\r\nWatercolour on Arches<BR><br>\r\n2003","height":92});
															thumbnails[5099082] = clik.newPhoto({"id":5099082,"src":"nude2_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5099082.html","width":130,"caption":"VIVIAN<BR><br>\r\n5 minute life-drawing<BR><br>\r\n\"18\" X 24\"<BR><br>\r\nConte on Newsprint<BR> <br>\r\n2009","height":180});
															thumbnails[5212359] = clik.newPhoto({"id":5212359,"src":"08192009436_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5212359.html","width":130,"caption":"MEANS TO AN END<BR><br>\r\n4\" X 8\" Sketch<BR><br>\r\nPencil On Paper<BR><br>\r\n2009","height":173});
															thumbnails[5363059] = clik.newPhoto({"id":5363059,"src":"walk_away_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5363059.html","width":130,"caption":"WALK AWAY<BR><br>\r\n8\" X 10\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010<br>\r\n","height":170});
															thumbnails[5387573] = clik.newPhoto({"id":5387573,"src":"proposal_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5387573.html","width":130,"caption":"THE PROPOSAL<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":124});
															thumbnails[5476147] = clik.newPhoto({"id":5476147,"src":"nobody_home2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5476147.html","width":130,"caption":"NOBODY'S HOME<BR><br>\r\n18\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":170});
															thumbnails[5493808] = clik.newPhoto({"id":5493808,"src":"OmniaVanitas2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5493808.html","width":130,"caption":"OMNIA VANITAS<BR><br>\r\n22\" X 28\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":174});
															thumbnails[5527235] = clik.newPhoto({"id":5527235,"src":"number82_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5527235.html","width":130,"caption":"UNTITLED<BR> <br>\r\nNUMBER EIGHT<BR> <br>\r\n24\" X 24\"<BR> <br>\r\nAcrylic On Canvas<BR> <br>\r\n2010","height":123});
															thumbnails[5541799] = clik.newPhoto({"id":5541799,"src":"domesticated3_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5541799.html","width":130,"caption":"DOMESTICATED<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":131});
															thumbnails[5559836] = clik.newPhoto({"id":5559836,"src":"Prom_Queen2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5559836.html","width":130,"caption":"PROM QUEEN<BR><br>\r\n20\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":164});
															thumbnails[5568503] = clik.newPhoto({"id":5568503,"src":"depreciated_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5568503.html","width":130,"caption":"DEPRECIATED<BR><br>\r\n24\" X 24\"<br><br>\r\nAcrylic On Canvas<br><br>\r\n2010","height":128});
															thumbnails[5582850] = clik.newPhoto({"id":5582850,"src":"lostintranslation2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5582850.html","width":130,"caption":"LOST IN TRANSLATION<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":130});
															thumbnails[5620310] = clik.newPhoto({"id":5620310,"src":"Ballerina_Tea2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5620310.html","width":130,"caption":"BALLERINA TEA<BR><br>\r\n24\" X 36\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":193});
															thumbnails[5644552] = clik.newPhoto({"id":5644552,"src":"tarnished2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5644552.html","width":130,"caption":"TARNISHED<BR><br>\r\n22\" X 28\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":166});
															thumbnails[5658296] = clik.newPhoto({"id":5658296,"src":"Emmanuel2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5658296.html","width":130,"caption":"EMMANUEL<BR><br>\r\n20\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":173});
															thumbnails[5670131] = clik.newPhoto({"id":5670131,"src":"The_Closet2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5670131.html","width":130,"caption":"THE CLOSET<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":128});
															thumbnails[5723502] = clik.newPhoto({"id":5723502,"src":"Correction2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5723502.html","width":130,"caption":"CORRECTION<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":129});
															thumbnails[5745568] = clik.newPhoto({"id":5745568,"src":"Black_Widow2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5745568.html","width":130,"caption":"BLACK WIDOW<BR><br>\r\n18\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":173});
															thumbnails[5828501] = clik.newPhoto({"id":5828501,"src":"After_the_storm2_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5828501.html","width":130,"caption":"AFTER THE STORM<BR><br>\r\n30\" X 48\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":86});
															thumbnails[5908177] = clik.newPhoto({"id":5908177,"src":"venari2_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5908177.html","width":130,"caption":"VENARI<BR><br>\r\n24\" X 30\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":172});
															thumbnails[5979790] = clik.newPhoto({"id":5979790,"src":"selvaggio2_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_5979790.html","width":130,"caption":"SELVAGGIO<BR><br>\r\n24\" X 30\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":104});
															thumbnails[6107472] = clik.newPhoto({"id":6107472,"src":"violepsy2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6107472.html","width":130,"caption":"VIOLEPSY<BR><br>\r\n18\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":95});
															thumbnails[6107498] = clik.newPhoto({"id":6107498,"src":"necrolift2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6107498.html","width":130,"caption":"NECROLIFT<BR><br>\r\n24\" X 30\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":171});
															thumbnails[6191329] = clik.newPhoto({"id":6191329,"src":"Necrovitreus2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6191329.html","width":130,"caption":"NECROVITREUS<BR><br>\r\n24\" X 30\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":173});
															thumbnails[6228867] = clik.newPhoto({"id":6228867,"src":"AnoBulepsy2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6228867.html","width":130,"caption":"ANOBULEPSY<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":122});
															thumbnails[6434719] = clik.newPhoto({"id":6434719,"src":"Chiarolepsy2_thumb.jpg","galleries_id":342403,"server_id":5,"link":"photo_6434719.html","width":130,"caption":"CHIAROLEPSY<BR><br>\r\n20\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":100});
															thumbnails[7085143] = clik.newPhoto({"id":7085143,"src":"Tobacculosis2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7085143.html","width":130,"caption":"TOBACCULOSIS","height":176});
															thumbnails[7104599] = clik.newPhoto({"id":7104599,"src":"eldelerious2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7104599.html","width":130,"caption":"ELDELERIOUS","height":121});
															thumbnails[7154809] = clik.newPhoto({"id":7154809,"src":"onemansconfection2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7154809.html","width":130,"caption":"ONE MAN'S CONFECTION","height":124});
															thumbnails[7335919] = clik.newPhoto({"id":7335919,"src":"confession2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7335919.html","width":130,"caption":"FLAGRUM","height":128});
															thumbnails[7339721] = clik.newPhoto({"id":7339721,"src":"royalflush2_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_7339721.html","width":130,"caption":"ROYAL FLUSH","height":127});
															thumbnails[7360008] = clik.newPhoto({"id":7360008,"src":"compromising2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7360008.html","width":130,"caption":"COMPROMISING","height":120});
															thumbnails[7472643] = clik.newPhoto({"id":7472643,"src":"thefirststone2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7472643.html","width":130,"caption":"THE FIRST STONE","height":173});
															thumbnails[7505664] = clik.newPhoto({"id":7505664,"src":"inconfidence2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7505664.html","width":130,"caption":"IN CONFIDENCE","height":98});
															thumbnails[7644566] = clik.newPhoto({"id":7644566,"src":"acquisition_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7644566.html","width":130,"caption":"ACQUISITON","height":128});
															thumbnails[7644567] = clik.newPhoto({"id":7644567,"src":"thecollector2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7644567.html","width":130,"caption":"THE COLLECTOR","height":124});
															thumbnails[7693709] = clik.newPhoto({"id":7693709,"src":"nuntheless2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7693709.html","width":130,"caption":"NUN THE LESS","height":124});
															thumbnails[7693714] = clik.newPhoto({"id":7693714,"src":"chiarolepsy_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_7693714.html","width":130,"caption":"CHIAROLEPSY","height":100});
															thumbnails[7801708] = clik.newPhoto({"id":7801708,"src":"absolution2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7801708.html","width":130,"caption":"ABSOLUTION","height":98});
															thumbnails[7821162] = clik.newPhoto({"id":7821162,"src":"secrets2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7821162.html","width":130,"caption":"SECRETS","height":121});
															thumbnails[7845832] = clik.newPhoto({"id":7845832,"src":"thehearing2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7845832.html","width":130,"caption":"THE HEARING","height":127});
															thumbnails[7848255] = clik.newPhoto({"id":7848255,"src":"Annointment2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7848255.html","width":130,"caption":"ANNOINTMENT","height":122});
															thumbnails[7856995] = clik.newPhoto({"id":7856995,"src":"Drag2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7856995.html","width":130,"caption":"DRAG","height":108});
															thumbnails[7868441] = clik.newPhoto({"id":7868441,"src":"Negotiation2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7868441.html","width":130,"caption":"NEGOTIATION","height":115});
															thumbnails[7889833] = clik.newPhoto({"id":7889833,"src":"American_Dream2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7889833.html","width":130,"caption":"AMERICAN DREAM","height":127});
															thumbnails[7931402] = clik.newPhoto({"id":7931402,"src":"pension1_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7931402.html","width":130,"caption":"LADY PENSION","height":128});
															thumbnails[7968675] = clik.newPhoto({"id":7968675,"src":"FaithAgnosticaIII2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7968675.html","width":130,"caption":"FAITH AGNOSTICA III","height":126});
															thumbnails[8029320] = clik.newPhoto({"id":8029320,"src":"Devotion2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_8029320.html","width":130,"caption":"DEVOTION","height":163});
															thumbnails[8728488] = clik.newPhoto({"id":8728488,"src":"mirroredworld_thumb.jpg","galleries_id":287936,"server_id":5,"link":"photo_8728488.html","width":130,"caption":"MIRRORED WORLD","height":103});
															thumbnails[7770207] = clik.newPhoto({"id":7770207,"src":"thecounsellor2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7770207.html","width":130,"caption":"THE COUNSELLOR","height":173});
															thumbnails[5552007] = clik.newPhoto({"id":5552007,"src":"objectify2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5552007.html","width":130,"caption":"OBJECTIFY<BR><br>\r\n24\" X 24\"<BR><br>\r\nAcrylic On Canvas<BR><br>\r\n2010","height":129});
															thumbnails[7770208] = clik.newPhoto({"id":7770208,"src":"lastcall2_thumb.jpg","galleries_id":419872,"server_id":5,"link":"photo_7770208.html","width":130,"caption":"LAST CALL","height":107});
															thumbnails[5354947] = clik.newPhoto({"id":5354947,"src":"blind_date2_thumb.jpg","galleries_id":287935,"server_id":5,"link":"photo_5354947.html","width":130,"caption":"BLIND DATE<BR><br>\r\n30\" X 36\"<BR><br>\r\nOil On Canvas<BR><br>\r\n2010","height":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[474832] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spatial Traditions","link":"gallery_474832.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":474832,"singleSection":false});				  						galleries[419872] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Twelve Steps To Immortality","link":"gallery_419872.html","maxRecords":0.0,"photoIDs":[7801708.0,7821162.0,7845832.0,7848255.0,7856995.0,7868441.0,7889833.0,7931402.0,7968675.0,8029320.0,7770207.0,7770208.0],"skipIndex":0,"section_code":"gallery","featured_images":"8029320,7968675,7931402,7889833,7868441,7856995,7848255,7845832,7821162,7801708","id":419872,"singleSection":false});				  						galleries[287935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Hypnagogia Series 2009-2011","link":"gallery_287935.html","maxRecords":0.0,"photoIDs":[7283765.0,5098256.0,5098257.0,5098269.0,5098271.0,5098273.0,5098277.0,5098283.0,5098502.0,5363059.0,5387573.0,5476147.0,5493808.0,5527235.0,5559836.0,5568503.0,5582850.0,5620310.0,5644552.0,5658296.0,5670131.0,5723502.0,5745568.0,7085143.0,7104599.0,7154809.0,7335919.0,7360008.0,7472643.0,7505664.0,7644566.0,7644567.0,7693709.0,7693714.0,5552007.0,5354947.0],"skipIndex":0,"section_code":"gallery","featured_images":"7693714,7693709,7644567,7644566,7505664,7472643,7360008,7335919,7283765,7154809","id":287935,"singleSection":false});				  						galleries[287936] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Drawings and Paintings","link":"gallery_287936.html","maxRecords":0.0,"photoIDs":[5099073.0,5099082.0,5212359.0,5541799.0,5828501.0,5908177.0,5979790.0,7339721.0,8728488.0],"skipIndex":0,"section_code":"gallery","featured_images":"8728488,7339721,5979790,5908177,5828501,5541799,5212359,5099082,5099073","id":287936,"singleSection":false});				  						galleries[342403] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Necrolepsy","link":"gallery_342403.html","maxRecords":0.0,"photoIDs":[6317282.0,6107472.0,6107498.0,6191329.0,6228867.0,6434719.0],"skipIndex":0,"section_code":"gallery","featured_images":"6434719,6317282,6228867,6191329,6107498,6107472","id":342403,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '9091782,8728488,8029320,7968675,7931402,7889833,7868441,7856995,7848255,7845832,7821162,7801708,7770208,7770207,7693714,7693709,7644567,7644566,7505664,7472643,7360008,7339721,7335919,7283765,7154809,7104599,7085143,6434719,6317282,6228867,6191329,6107498,6107472,5979790,5908177,5828501,5745568,5723502,5670131,5658296,5644552,5620310,5582850,5568503,5559836,5552007,5541799,5527235,5493808,5476147';
imageSets[1] = '9091782';
imageSets[236085] = '6434719,6317282,6228867,6191329,6107498,6107472';
imageSets[241849] = '8029320,7968675,7931402,7889833,7868441,7856995,7848255,7845832,7821162,7801708,7770207,7770208';
imageSets[233396] = '7693714,7693709,7644567,7644566,7505664,7472643,7360008,7335919,7283765,7154809,7104599,7085143,5745568,5723502,5670131,5658296,5644552,5620310,5582850,5568503,5559836,5527235,5493808,5476147,5387573,5363059,5098502,5098283,5098277,5098273,5098271,5098269,5098257,5098256,5552007,5354947';
imageSets[233397] = '8728488,7339721,5979790,5908177,5828501,5541799,5212359,5099082,5099073';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chrisohoski/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chrisohoski/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 = 'Chris O\'Hoski: ' + 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;
	}
}

			

