window.thumbnails = {};
															thumbnails[1952309] = clik.newPhoto({"id":1952309,"src":"071020_2713-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[5888887] = clik.newPhoto({"id":5888887,"src":"4569301156_3e83e69447_o_57657BBC-1EC9-D45B-1C1A365CB30C17E7_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[3145931] = clik.newPhoto({"id":3145931,"src":"2697503928_af5ec8e0a3_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"<br>\r\n","height":193});
															thumbnails[5765221] = clik.newPhoto({"id":5765221,"src":"091111_7298_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[291742] = clik.newPhoto({"id":291742,"src":"moon003 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Tucson ","height":86});
															thumbnails[4872106] = clik.newPhoto({"id":4872106,"src":"_DSC6043-copy12_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4866712] = clik.newPhoto({"id":4866712,"src":"_DSC5603_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[763655] = clik.newPhoto({"id":763655,"src":"070122_1610_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":178});
															thumbnails[4866713] = clik.newPhoto({"id":4866713,"src":"_DSC5706_bw-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[763653] = clik.newPhoto({"id":763653,"src":"070122_1714_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[291598] = clik.newPhoto({"id":291598,"src":"sartin050614_0041co copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[299493] = clik.newPhoto({"id":299493,"src":"sartin_060422_0090 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Via Glass","height":87});
															thumbnails[478457] = clik.newPhoto({"id":478457,"src":"060914_6051_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Zion<br>\r\n<br>\r\n","height":91});
															thumbnails[752013] = clik.newPhoto({"id":752013,"src":"0018_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[763651] = clik.newPhoto({"id":763651,"src":"070112_1132_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[1232317] = clik.newPhoto({"id":1232317,"src":"060830_9467-copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Tucson","height":94});
															thumbnails[1943897] = clik.newPhoto({"id":1943897,"src":"001_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":167});
															thumbnails[2111321] = clik.newPhoto({"id":2111321,"src":"080412_1384-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":88});
															thumbnails[290521] = clik.newPhoto({"id":290521,"src":"sartin_060301_0011_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":163});
															thumbnails[291741] = clik.newPhoto({"id":291741,"src":"DSC_0307 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"San Diego Skyline","height":77});
															thumbnails[752014] = clik.newPhoto({"id":752014,"src":"0037_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[2087600] = clik.newPhoto({"id":2087600,"src":"070112_1120v2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[752015] = clik.newPhoto({"id":752015,"src":"0046_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":91});
															thumbnails[1943904] = clik.newPhoto({"id":1943904,"src":"080214_6967-copy-4_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":162});
															thumbnails[4866727] = clik.newPhoto({"id":4866727,"src":"3753657568_ee6c0527ec_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[292279] = clik.newPhoto({"id":292279,"src":"sartin_060425_0344 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Via Glass","height":87});
															thumbnails[752025] = clik.newPhoto({"id":752025,"src":"0085_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[763652] = clik.newPhoto({"id":763652,"src":"070116_1412_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":106});
															thumbnails[4866722] = clik.newPhoto({"id":4866722,"src":"3543911534_26f42faa38_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[1831826] = clik.newPhoto({"id":1831826,"src":"080108_0382_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":82});
															thumbnails[1831825] = clik.newPhoto({"id":1831825,"src":"080108_0304_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":99});
															thumbnails[4866730] = clik.newPhoto({"id":4866730,"src":"3664857670_a4579edd3d_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[291026] = clik.newPhoto({"id":291026,"src":"sartin_050527_0005_copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[292380] = clik.newPhoto({"id":292380,"src":"sartin_051213_0004_copy copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Koi Temple","height":101});
															thumbnails[395354] = clik.newPhoto({"id":395354,"src":"sartin_050812_0001_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Birds, Beach and Sunset","height":86});
															thumbnails[751995] = clik.newPhoto({"id":751995,"src":"_DSC6797-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"TORII by Louis Via","height":104});
															thumbnails[1831827] = clik.newPhoto({"id":1831827,"src":"080130_6186_2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":92});
															thumbnails[1943898] = clik.newPhoto({"id":1943898,"src":"070812_0255_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[1831824] = clik.newPhoto({"id":1831824,"src":"070329_5353_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[5890501] = clik.newPhoto({"id":5890501,"src":"4569296298_cdf5d95892_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":98});
															thumbnails[2123518] = clik.newPhoto({"id":2123518,"src":"070115_1192_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5890502] = clik.newPhoto({"id":5890502,"src":"4569296382_943b51c935_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[2123512] = clik.newPhoto({"id":2123512,"src":"070115_1161_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[5890500] = clik.newPhoto({"id":5890500,"src":"4569251288_d563d34d65_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1237946] = clik.newPhoto({"id":1237946,"src":"070418_7086_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[598057] = clik.newPhoto({"id":598057,"src":"061020_7598 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[763656] = clik.newPhoto({"id":763656,"src":"sartin_041209_0010_master-c_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[1237954] = clik.newPhoto({"id":1237954,"src":"070228_3967_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":82});
															thumbnails[1260430] = clik.newPhoto({"id":1260430,"src":"060911_5791v1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Moonscape Of The Mind","height":83});
															thumbnails[478425] = clik.newPhoto({"id":478425,"src":"060910_5684-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Shadow Crossing","height":75});
															thumbnails[763657] = clik.newPhoto({"id":763657,"src":"sartin_041209_0012_co-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[1237945] = clik.newPhoto({"id":1237945,"src":"070418_7016v1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":193});
															thumbnails[446561] = clik.newPhoto({"id":446561,"src":"sartin_060412_0020_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[446555] = clik.newPhoto({"id":446555,"src":"sartin_060412_0007_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Firefighter","height":176});
															thumbnails[1237955] = clik.newPhoto({"id":1237955,"src":"070228_3978_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":197});
															thumbnails[5838105] = clik.newPhoto({"id":5838105,"src":"beyond-the-blue-horizon-1-copyv2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[292164] = clik.newPhoto({"id":292164,"src":"prague004 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Blue in Prague","height":88});
															thumbnails[438265] = clik.newPhoto({"id":438265,"src":"sartin_060711_3203 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":105});
															thumbnails[478452] = clik.newPhoto({"id":478452,"src":"060912_9664_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Quaking Aspens","height":86});
															thumbnails[478437] = clik.newPhoto({"id":478437,"src":"060910_5742_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Grand Canyon<br>\r\n","height":87});
															thumbnails[441269] = clik.newPhoto({"id":441269,"src":"sartin_050409_0005_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[478441] = clik.newPhoto({"id":478441,"src":"060913_5974_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Sunrise","height":87});
															thumbnails[438264] = clik.newPhoto({"id":438264,"src":"sartin_050626_0069_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":146});
															thumbnails[576918] = clik.newPhoto({"id":576918,"src":"060912_9650_ir8x10-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Grand Canyon","height":104});
															thumbnails[763659] = clik.newPhoto({"id":763659,"src":"sartin_060326_0012_copy-cop_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[478455] = clik.newPhoto({"id":478455,"src":"060913_9701-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[763658] = clik.newPhoto({"id":763658,"src":"sartin_050824_0759_copy-cop_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[595537] = clik.newPhoto({"id":595537,"src":"061114_1_co_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Egret <br>\r\n","height":163});
															thumbnails[292165] = clik.newPhoto({"id":292165,"src":"prague031 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Prague","height":77});
															thumbnails[5890563] = clik.newPhoto({"id":5890563,"src":"4568613801_f611d3453d_o_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[292161] = clik.newPhoto({"id":292161,"src":"0007Maui '04 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Signs Of Life","height":175});
															thumbnails[427071] = clik.newPhoto({"id":427071,"src":"051229_5176 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Bratislava, Slovakia","height":85});
															thumbnails[2212252] = clik.newPhoto({"id":2212252,"src":"050925_006-copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":166});
															thumbnails[292162] = clik.newPhoto({"id":292162,"src":"0016Maui '04 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Koi Dance","height":165});
															thumbnails[291740] = clik.newPhoto({"id":291740,"src":"Bratislava 041 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Danube River in Bratislava Slovakia","height":74});
															thumbnails[1943937] = clik.newPhoto({"id":1943937,"src":"Beth-comp-card-front-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":201});
															thumbnails[291739] = clik.newPhoto({"id":291739,"src":"Bratislava 010 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Bratislava Slovakia","height":86});
															thumbnails[428160] = clik.newPhoto({"id":428160,"src":"danube_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Danube River in Bratislava Slovakia","height":94});
															thumbnails[2088380] = clik.newPhoto({"id":2088380,"src":"060914_6018v2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Zion National Park","height":195});
															thumbnails[292189] = clik.newPhoto({"id":292189,"src":"Vienna015 copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"St. Stephen's Cathedral Vienna","height":156});
															thumbnails[292188] = clik.newPhoto({"id":292188,"src":"l_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"St. Stephen's Cathedral","height":170});
															thumbnails[292280] = clik.newPhoto({"id":292280,"src":"sartin_060523_1580-copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Reflections","height":209});
															thumbnails[5992352] = clik.newPhoto({"id":5992352,"src":"091210_7934_web_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[2083271] = clik.newPhoto({"id":2083271,"src":"070915_4282_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":190});
															thumbnails[1237973] = clik.newPhoto({"id":1237973,"src":"061026_7982_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[1232389] = clik.newPhoto({"id":1232389,"src":"070124_0004_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Gail T. Roberts Studios","height":80});
															thumbnails[1232393] = clik.newPhoto({"id":1232393,"src":"070416_6682_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Gail T. Roberts Studios","height":87});
															thumbnails[1232390] = clik.newPhoto({"id":1232390,"src":"070209_0010_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Gail T. Roberts Studios","height":87});
															thumbnails[1232388] = clik.newPhoto({"id":1232388,"src":"070124_0001_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Gail T. Roberts Studios","height":163});
															thumbnails[1232354] = clik.newPhoto({"id":1232354,"src":"070325_5164_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Curt Brill Sculptures","height":93});
															thumbnails[1232362] = clik.newPhoto({"id":1232362,"src":"070219_0001_thumb.jpg-(select).jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Curt Brill Sculptures","height":104});
															thumbnails[1944191] = clik.newPhoto({"id":1944191,"src":"070827_0530x23_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[1232355] = clik.newPhoto({"id":1232355,"src":"070325_5213_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Curt Brill Sculptures","height":182});
															thumbnails[1943899] = clik.newPhoto({"id":1943899,"src":"Curt-Brill-ceramic-composite-sheet-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Curt Brill Sculptures","height":168});
															thumbnails[4961752] = clik.newPhoto({"id":4961752,"src":"_DSC3629_web_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":194});
															thumbnails[1122110] = clik.newPhoto({"id":1122110,"src":"_DSC1509-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":96});
															thumbnails[7573220] = clik.newPhoto({"id":7573220,"src":"jeannette_web-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":67});
															thumbnails[2718818] = clik.newPhoto({"id":2718818,"src":"web_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":192});
															thumbnails[4961751] = clik.newPhoto({"id":4961751,"src":"4002081317_web_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":163});
															thumbnails[1893248] = clik.newPhoto({"id":1893248,"src":"080224_7871-2-copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":97});
															thumbnails[1484856] = clik.newPhoto({"id":1484856,"src":"071014_6348webcopy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":88});
															thumbnails[1952313] = clik.newPhoto({"id":1952313,"src":"070703_1640_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '763656';
imageSets[2] = '763655,752013,478457,1943898,292380,291026,478437';
imageSets[3] = '7573220,5992352,5890563,5890502,5890501,5890500,5888887,5838105,5765221,4961752,4961751,4872106,4866730,4866727,4866722,4866713,4866712,3145931,2718818,2212252,2123518,2123512,2111321,2088380,2087600,2083271,1952313,1952309,1944191,1943937,1943904,1943899,1943898,1943897,1893248,1831827,1831826,1831825,1831824,1484856,1260430,1237973,1237955,1237954,1237946,1237945,1232393,1232390,1232389,1232388';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/solodogs/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/solodogs/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/solodogs/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/solodogs/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/solodogs/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/solodogs/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/solodogs/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 += '.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 && '' != '') {
					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 = 'JOHN SARTIN PHOTOGRAPHY AND DESIGN: ' + 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>';
	}
				
	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> $' + (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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="solodogs@cox.net">';
					temp += '<input type="hidden" name="currency_code" value="USD">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="solodogs@cox.net">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

