window.thumbnails = new Object();
												thumbnails[2929926] = new thumbnail(2929926,'181157','lb00001','lb00001_thumb.jpg',130, 195,18,'photo_2929926.html');
												thumbnails[2929952] = new thumbnail(2929952,'181156','lb00002','lb00002_thumb.jpg',130, 87,18,'photo_2929952.html');
												thumbnails[2929993] = new thumbnail(2929993,'181160','lb00053','lb00053_thumb.jpg',130, 194,18,'photo_2929993.html');
												thumbnails[2930124] = new thumbnail(2930124,'181153','lb01063','lb01063_thumb.jpg',130, 194,18,'photo_2930124.html');
												thumbnails[4883120] = new thumbnail(4883120,'181150','lb01436','lb01436_thumb.jpg',130, 194,18,'photo_4883120.html');
												thumbnails[2929962] = new thumbnail(2929962,'181157','lb00047','lb00047_thumb.jpg',130, 194,18,'photo_2929962.html');
												thumbnails[2929996] = new thumbnail(2929996,'181160','lb01003','lb010032_thumb.jpg',130, 194,18,'photo_2929996.html');
												thumbnails[2929928] = new thumbnail(2929928,'181157','lb00037','lb00037_thumb.jpg',130, 194,18,'photo_2929928.html');
												thumbnails[2929953] = new thumbnail(2929953,'181156','lb00003','lb00003_thumb.jpg',130, 87,18,'photo_2929953.html');
												thumbnails[2932227] = new thumbnail(2932227,'181150','lb00297b','lb00297b_thumb.jpg',130, 194,18,'photo_2932227.html');
												thumbnails[2929965] = new thumbnail(2929965,'181157','lb01006','lb010062_thumb.jpg',130, 194,18,'photo_2929965.html');
												thumbnails[2932140] = new thumbnail(2932140,'181154','lb00547','lb00547_thumb.jpg',130, 86,18,'photo_2932140.html');
												thumbnails[2929927] = new thumbnail(2929927,'181157','lb00034','lb00034_thumb.jpg',130, 87,18,'photo_2929927.html');
												thumbnails[2929954] = new thumbnail(2929954,'181156','lb00094','lb00094_thumb.jpg',130, 87,18,'photo_2929954.html');
												thumbnails[2929995] = new thumbnail(2929995,'181160','lb01002','lb010022_thumb.jpg',130, 194,18,'photo_2929995.html');
												thumbnails[4883392] = new thumbnail(4883392,'181150','lb01487','lb01487_thumb.jpg',130, 194,18,'photo_4883392.html');
												thumbnails[2929963] = new thumbnail(2929963,'181157','lb00091','lb00091_thumb.jpg',130, 87,18,'photo_2929963.html');
												thumbnails[2929994] = new thumbnail(2929994,'181160','lb00055','lb00055_thumb.jpg',130, 194,18,'photo_2929994.html');
												thumbnails[2932141] = new thumbnail(2932141,'181154','lb00550','lb00550_thumb.jpg',130, 131,18,'photo_2932141.html');
												thumbnails[2929929] = new thumbnail(2929929,'181157','lb00045','lb00045_thumb.jpg',130, 87,18,'photo_2929929.html');
												thumbnails[2929955] = new thumbnail(2929955,'181156','lb00822','lb00822_thumb.jpg',130, 87,18,'photo_2929955.html');
												thumbnails[2930127] = new thumbnail(2930127,'181153','lb01066','lb01066_thumb.jpg',130, 194,18,'photo_2930127.html');
												thumbnails[2929964] = new thumbnail(2929964,'181157','lb00093','lb00093_thumb.jpg',130, 87,18,'photo_2929964.html');
												thumbnails[2932142] = new thumbnail(2932142,'181154','lb00551','lb00551_thumb.jpg',130, 86,18,'photo_2932142.html');
												thumbnails[2929997] = new thumbnail(2929997,'181160','lb01004','lb010041_thumb.jpg',130, 194,18,'photo_2929997.html');
												thumbnails[2930128] = new thumbnail(2930128,'181153','lb01070','lb01070_thumb.jpg',130, 194,18,'photo_2930128.html');
												thumbnails[2932240] = new thumbnail(2932240,'181150','lb00754','lb007541_thumb.jpg',130, 194,18,'photo_2932240.html');
												thumbnails[2932354] = new thumbnail(2932354,'181157','','lb00089_thumb.jpg',130, 87,18,'photo_2932354.html');
												thumbnails[2952274] = new thumbnail(2952274,'181156','lb00008','lb00008_thumb.jpg',130, 87,18,'photo_2952274.html');
												thumbnails[2932143] = new thumbnail(2932143,'181154','lb00558','lb005581_thumb.jpg',130, 86,18,'photo_2932143.html');
												thumbnails[2929998] = new thumbnail(2929998,'181160','lb01005','lb010051_thumb.jpg',130, 194,18,'photo_2929998.html');
												thumbnails[2930129] = new thumbnail(2930129,'181153','lb01073','lb01073_thumb.jpg',130, 194,18,'photo_2930129.html');
												thumbnails[6505357] = new thumbnail(6505357,'181156','','lb01321_thumb.jpg',130, 194,18,'photo_6505357.html');
												thumbnails[2932144] = new thumbnail(2932144,'181154','lb00562','lb005621_thumb.jpg',130, 196,18,'photo_2932144.html');
												thumbnails[2929999] = new thumbnail(2929999,'181160','lb01007','lb010071_thumb.jpg',130, 194,18,'photo_2929999.html');
												thumbnails[2930130] = new thumbnail(2930130,'181153','lb01076','lb01076_thumb.jpg',130, 87,18,'photo_2930130.html');
												thumbnails[6505372] = new thumbnail(6505372,'181156','','lb01320_thumb.jpg',130, 194,18,'photo_6505372.html');
												thumbnails[2932145] = new thumbnail(2932145,'181154','lb00565','lb005651_thumb.jpg',130, 93,18,'photo_2932145.html');
												thumbnails[2930000] = new thumbnail(2930000,'181160','lb01008','lb010081_thumb.jpg',130, 194,18,'photo_2930000.html');
												thumbnails[2930131] = new thumbnail(2930131,'181153','lb01087','lb01087_thumb.jpg',130, 194,18,'photo_2930131.html');
												thumbnails[6505382] = new thumbnail(6505382,'181156','','lb01324_thumb.jpg',130, 87,18,'photo_6505382.html');
												thumbnails[2932146] = new thumbnail(2932146,'181154','lb00566','lb005661_thumb.jpg',130, 93,18,'photo_2932146.html');
												thumbnails[2930001] = new thumbnail(2930001,'181160','lb01009','lb010091_thumb.jpg',130, 194,18,'photo_2930001.html');
												thumbnails[2930132] = new thumbnail(2930132,'181153','lb01092','lb01092_thumb.jpg',130, 194,18,'photo_2930132.html');
												thumbnails[2932147] = new thumbnail(2932147,'181154','lb00567','lb00567_thumb.jpg',130, 93,18,'photo_2932147.html');
												thumbnails[2930133] = new thumbnail(2930133,'181153','lb01093','lb01093_thumb.jpg',130, 194,18,'photo_2930133.html');
												thumbnails[6505325] = new thumbnail(6505325,'181160','lb01317','lb01317_thumb.jpg',130, 194,18,'photo_6505325.html');
												thumbnails[2932148] = new thumbnail(2932148,'181154','lb00570','lb00570_thumb.jpg',130, 171,18,'photo_2932148.html');
												thumbnails[2930134] = new thumbnail(2930134,'181153','lb01108','lb01108_thumb.jpg',130, 130,18,'photo_2930134.html');
												thumbnails[6505327] = new thumbnail(6505327,'181160','lb01319','lb01319_thumb.jpg',130, 194,18,'photo_6505327.html');
												thumbnails[2932149] = new thumbnail(2932149,'181154','lb00572','lb005721_thumb.jpg',130, 91,18,'photo_2932149.html');
												thumbnails[2930135] = new thumbnail(2930135,'181153','lb01116','lb01116_thumb.jpg',130, 87,18,'photo_2930135.html');
												thumbnails[2932350] = new thumbnail(2932350,'181150','lb01042','lb01042_thumb.jpg',130, 194,18,'photo_2932350.html');
												thumbnails[6505326] = new thumbnail(6505326,'181160','lb01318','lb01318_thumb.jpg',130, 87,18,'photo_6505326.html');
												thumbnails[2932150] = new thumbnail(2932150,'181154','lb00573','lb005731_thumb.jpg',130, 194,18,'photo_2932150.html');
												thumbnails[2930136] = new thumbnail(2930136,'181153','lb01119','lb01119_thumb.jpg',130, 87,18,'photo_2930136.html');
												thumbnails[2932151] = new thumbnail(2932151,'181154','lb00577','lb00577_thumb.jpg',130, 86,18,'photo_2932151.html');
												thumbnails[2930137] = new thumbnail(2930137,'181153','lb01122','lb01122_thumb.jpg',130, 87,18,'photo_2930137.html');
												thumbnails[2932329] = new thumbnail(2932329,'181150','lb01044','lb01044_thumb.jpg',130, 194,18,'photo_2932329.html');
												thumbnails[2932152] = new thumbnail(2932152,'181154','lb00584','lb005841_thumb.jpg',130, 185,18,'photo_2932152.html');
												thumbnails[2930138] = new thumbnail(2930138,'181153','lb01124','lb01124_thumb.jpg',130, 87,18,'photo_2930138.html');
												thumbnails[6505294] = new thumbnail(6505294,'181150','','lb01526_thumb.jpg',130, 194,18,'photo_6505294.html');
												thumbnails[2932138] = new thumbnail(2932138,'181154','lb00544','lb005441_thumb.jpg',130, 86,18,'photo_2932138.html');
												thumbnails[2932153] = new thumbnail(2932153,'181154','lb00591','lb005911_thumb.jpg',130, 89,18,'photo_2932153.html');
												thumbnails[2930139] = new thumbnail(2930139,'181153','lb01126','lb01126_thumb.jpg',130, 87,18,'photo_2930139.html');
												thumbnails[2932154] = new thumbnail(2932154,'181154','lb00593','lb005931_thumb.jpg',130, 89,18,'photo_2932154.html');
												thumbnails[2930140] = new thumbnail(2930140,'181153','lb01132','lb01132_thumb.jpg',130, 69,18,'photo_2930140.html');
												thumbnails[2932155] = new thumbnail(2932155,'181154','lb00595','lb00595_thumb.jpg',130, 86,18,'photo_2932155.html');
												thumbnails[2930141] = new thumbnail(2930141,'181153','lb01134','lb01134_thumb.jpg',130, 87,18,'photo_2930141.html');
												thumbnails[3635859] = new thumbnail(3635859,'181150','','lb01399_thumb.jpg',130, 130,18,'photo_3635859.html');
												thumbnails[2932156] = new thumbnail(2932156,'181154','lb00596','lb005961_thumb.jpg',130, 96,18,'photo_2932156.html');
												thumbnails[2930142] = new thumbnail(2930142,'181153','lb01137','lb01137_thumb.jpg',130, 87,18,'photo_2930142.html');
												thumbnails[2932244] = new thumbnail(2932244,'181150','lb00889','lb00889_thumb.jpg',130, 87,18,'photo_2932244.html');
												thumbnails[2932157] = new thumbnail(2932157,'181154','lb00598','lb005981_thumb.jpg',130, 109,18,'photo_2932157.html');
												thumbnails[2930143] = new thumbnail(2930143,'181153','lb01138','lb01138_thumb.jpg',130, 87,18,'photo_2930143.html');
												thumbnails[2932249] = new thumbnail(2932249,'181150','lb00988','lb00988_thumb.jpg',130, 87,18,'photo_2932249.html');
												thumbnails[2930144] = new thumbnail(2930144,'181153','lb01142','lb01142_thumb.jpg',130, 87,18,'photo_2930144.html');
												thumbnails[2932159] = new thumbnail(2932159,'181154','lb00602','lb00602_thumb.jpg',130, 83,18,'photo_2932159.html');
												thumbnails[2930145] = new thumbnail(2930145,'181153','lb01143','lb01143_thumb.jpg',130, 87,18,'photo_2930145.html');
												thumbnails[2932160] = new thumbnail(2932160,'181154','lb00603','lb00603_thumb.jpg',130, 72,18,'photo_2932160.html');
												thumbnails[2930146] = new thumbnail(2930146,'181153','lb01144','lb01144_thumb.jpg',130, 87,18,'photo_2930146.html');
												thumbnails[2932161] = new thumbnail(2932161,'181154','lb00607','lb00607_thumb.jpg',130, 91,18,'photo_2932161.html');
												thumbnails[2930147] = new thumbnail(2930147,'181153','lb01153','lb01153_thumb.jpg',130, 172,18,'photo_2930147.html');
												thumbnails[2932162] = new thumbnail(2932162,'181154','lb00608','lb00608_thumb.jpg',130, 102,18,'photo_2932162.html');
												thumbnails[2930148] = new thumbnail(2930148,'181153','lb01157','lb01157_thumb.jpg',130, 194,18,'photo_2930148.html');
												thumbnails[2932163] = new thumbnail(2932163,'181154','lb00609','lb006091_thumb.jpg',130, 92,18,'photo_2932163.html');
												thumbnails[2930149] = new thumbnail(2930149,'181153','lb01159','lb01159_thumb.jpg',130, 130,18,'photo_2930149.html');
												thumbnails[2932168] = new thumbnail(2932168,'181154','lb00619','lb00619_thumb.jpg',130, 86,18,'photo_2932168.html');
												thumbnails[2932164] = new thumbnail(2932164,'181154','lb00611','lb00611_thumb.jpg',130, 215,18,'photo_2932164.html');
												thumbnails[2930150] = new thumbnail(2930150,'181153','lb01190','lb01190_thumb.jpg',130, 194,18,'photo_2930150.html');
												thumbnails[2932165] = new thumbnail(2932165,'181154','lb00613','lb00613_thumb.jpg',130, 199,18,'photo_2932165.html');
												thumbnails[2930151] = new thumbnail(2930151,'181153','lb01197','lb01197_thumb.jpg',130, 194,18,'photo_2930151.html');
												thumbnails[2932166] = new thumbnail(2932166,'181154','lb00614','lb00614_thumb.jpg',130, 196,18,'photo_2932166.html');
												thumbnails[2930152] = new thumbnail(2930152,'181153','lb01199','lb01199_thumb.jpg',130, 194,18,'photo_2930152.html');
												thumbnails[2932167] = new thumbnail(2932167,'181154','lb00616','lb00616_thumb.jpg',130, 234,18,'photo_2932167.html');
												thumbnails[2930153] = new thumbnail(2930153,'181153','lb01212','lb01212_thumb.jpg',130, 194,18,'photo_2930153.html');
												thumbnails[2930154] = new thumbnail(2930154,'181153','lb01218','lb01218_thumb.jpg',130, 194,18,'photo_2930154.html');
												thumbnails[2932169] = new thumbnail(2932169,'181154','lb00621','lb00621_thumb.jpg',130, 220,18,'photo_2932169.html');
												thumbnails[2932170] = new thumbnail(2932170,'181154','lb00622','lb00622_thumb.jpg',130, 196,18,'photo_2932170.html');
												thumbnails[2930156] = new thumbnail(2930156,'181153','lb01224','lb01224_thumb.jpg',130, 194,18,'photo_2930156.html');
												thumbnails[2932171] = new thumbnail(2932171,'181154','lb00623','lb006231_thumb.jpg',130, 196,18,'photo_2932171.html');
												thumbnails[2930157] = new thumbnail(2930157,'181153','lb01226','lb01226_thumb.jpg',130, 194,18,'photo_2930157.html');
												thumbnails[2932172] = new thumbnail(2932172,'181154','lb00625','lb00625_thumb.jpg',130, 178,18,'photo_2932172.html');
												thumbnails[2930158] = new thumbnail(2930158,'181153','lb01227','lb01227_thumb.jpg',130, 194,18,'photo_2930158.html');
												thumbnails[2932173] = new thumbnail(2932173,'181154','lb00626','lb00626_thumb.jpg',130, 204,18,'photo_2932173.html');
												thumbnails[2930159] = new thumbnail(2930159,'181153','lb01229','lb01229_thumb.jpg',130, 130,18,'photo_2930159.html');
												thumbnails[2932174] = new thumbnail(2932174,'181154','lb00629','lb00629_thumb.jpg',130, 190,18,'photo_2932174.html');
												thumbnails[2930160] = new thumbnail(2930160,'181153','lb01233','lb01233_thumb.jpg',130, 194,18,'photo_2930160.html');
												thumbnails[2932175] = new thumbnail(2932175,'181154','lb00638','lb00638_thumb.jpg',130, 216,18,'photo_2932175.html');
												thumbnails[2930161] = new thumbnail(2930161,'181153','lb01235','lb01235_thumb.jpg',130, 194,18,'photo_2930161.html');
												thumbnails[2932139] = new thumbnail(2932139,'181154','lb00545','lb00545_thumb.jpg',130, 93,18,'photo_2932139.html');
												thumbnails[2930162] = new thumbnail(2930162,'181153','lb01238','lb01238_thumb.jpg',130, 87,18,'photo_2930162.html');
												thumbnails[2940157] = new thumbnail(2940157,'181154','lb00639','lb00639_thumb.jpg',130, 196,18,'photo_2940157.html');
												thumbnails[2930163] = new thumbnail(2930163,'181153','lb01239','lb01239_thumb.jpg',130, 130,18,'photo_2930163.html');
												thumbnails[2940158] = new thumbnail(2940158,'181154','lb00641','lb00641_thumb.jpg',130, 198,18,'photo_2940158.html');
												thumbnails[2930164] = new thumbnail(2930164,'181153','lb01241','lb01241_thumb.jpg',130, 87,18,'photo_2930164.html');
												thumbnails[2940162] = new thumbnail(2940162,'181154','lb00662','lb00662_thumb.jpg',130, 196,18,'photo_2940162.html');
												thumbnails[2940159] = new thumbnail(2940159,'181154','lb00647','lb00647_thumb.jpg',130, 169,18,'photo_2940159.html');
												thumbnails[2930165] = new thumbnail(2930165,'181153','lb01244','lb01244_thumb.jpg',130, 194,18,'photo_2930165.html');
												thumbnails[2940160] = new thumbnail(2940160,'181154','lb00650','lb00650_thumb.jpg',130, 196,18,'photo_2940160.html');
												thumbnails[2930166] = new thumbnail(2930166,'181153','lb01247','lb01247_thumb.jpg',130, 194,18,'photo_2930166.html');
												thumbnails[2940161] = new thumbnail(2940161,'181154','lb00657','lb00657_thumb.jpg',130, 82,18,'photo_2940161.html');
												thumbnails[2930167] = new thumbnail(2930167,'181153','lb01250','lb01250_thumb.jpg',130, 194,18,'photo_2930167.html');
												thumbnails[2930168] = new thumbnail(2930168,'181153','lb01251','lb01251_thumb.jpg',130, 194,18,'photo_2930168.html');
												thumbnails[2940163] = new thumbnail(2940163,'181154','lb00663','lb00663_thumb.jpg',130, 194,18,'photo_2940163.html');
												thumbnails[2930169] = new thumbnail(2930169,'181153','lb01252','lb01252_thumb.jpg',130, 87,18,'photo_2930169.html');
												thumbnails[2940164] = new thumbnail(2940164,'181154','lb00712','lb00712_thumb.jpg',130, 194,18,'photo_2940164.html');
												thumbnails[2932176] = new thumbnail(2932176,'181154','lb00748','lb00748_thumb.jpg',130, 168,18,'photo_2932176.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[181153] = new gallery(181153,'2930166','Geoff & Gemma','gallery',[2930124,2930127,2930128,2930129,2930130,2930131,2930132,2930133,2930134,2930135,2930136,2930137,2930138,2930139,2930140,2930141,2930142,2930143,2930144,2930145,2930146,2930147,2930148,2930149,2930150,2930151,2930152,2930153,2930154,2930156,2930157,2930158,2930159,2930160,2930161,2930162,2930163,2930164,2930165,2930166,2930167,2930168,2930169],0, 0, '181149', 'gallery_181153.html',0,0);
				  					galleries[181154] = new gallery(181154,'2932173,2932148','Brett & Hannah','gallery',[2932140,2932141,2932142,2932143,2932144,2932145,2932146,2932147,2932148,2932149,2932150,2932151,2932152,2932138,2932153,2932154,2932155,2932156,2932157,2932159,2932160,2932161,2932162,2932163,2932168,2932164,2932165,2932166,2932167,2932169,2932170,2932171,2932172,2932173,2932174,2932175,2932139,2940157,2940158,2940162,2940159,2940160,2940161,2940163,2940164,2932176],0, 0, '181149', 'gallery_181154.html',0,0);
				  					galleries[181149] = new gallery(181149,'2932173,2932148,2930166','Weddings','gallery',[],0, 0, '', 'gallery_181149.html',0,0);
				  					galleries[181160] = new gallery(181160,'2929996','Flowers & Plants','gallery',[2929993,2929996,2929995,2929994,2929997,2929998,2929999,2930000,2930001,6505325,6505327,6505326],0, 0, '', 'gallery_181160.html',0,0);
				  					galleries[181156] = new gallery(181156,'6505372','Scenics','gallery',[2929952,2929953,2929954,2929955,2952274,6505357,6505372,6505382],0, 0, '', 'gallery_181156.html',0,0);
				  					galleries[181157] = new gallery(181157,'2929965,2929928','Animals','gallery',[2929926,2929962,2929928,2929965,2929927,2929963,2929929,2929964,2932354],0, 0, '', 'gallery_181157.html',0,0);
				  					galleries[181150] = new gallery(181150,'6505294','Portraits','gallery',[4883120,2932227,4883392,2932240,2932350,2932329,6505294,3635859,2932244,2932249],0, 0, '', 'gallery_181150.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '6505382,6505372,6505357,6505327,6505326,6505325,6505294,4883392,4883120,3635859,2952274,2940164,2940163,2940162,2940161,2940160,2940159,2940158,2940157,2932354,2932350,2932329,2932249,2932244,2932240,2932227,2932176,2932175,2932174,2932173,2932172,2932171,2932170,2932169,2932168,2932167,2932166,2932165,2932164,2932163,2932162,2932161,2932160,2932159,2932157,2932156,2932155,2932154,2932153,2932152';
imageSets[2] = '6505372,6505294,2932173,2932148,2930166,2929996,2929965,2929928';
imageSets[3] = '6505382,6505372,6505357,6505327,6505326,6505325,6505294,4883392,4883120,3635859,2952274,2940164,2940163,2940162,2940161,2940160,2940159,2940158,2940157,2932354,2932350,2932329,2932249,2932244,2932240,2932227,2932176,2932175,2932174,2932173,2932172,2932171,2932170,2932169,2932168,2932167,2932166,2932165,2932164,2932163,2932162,2932161,2932160,2932159,2932157,2932156,2932155,2932154,2932153,2932152';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/leebrown/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/leebrown/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/leebrown/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/leebrown/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/leebrown/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/leebrown/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Lee Brown Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

