window.thumbnails = {};
															thumbnails[4730904] = clik.newPhoto({"id":4730904,"src":"L10030051_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step1","height":87});
															thumbnails[4728717] = clik.newPhoto({"id":4728717,"src":"L10034422_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step2","height":87});
															thumbnails[4728721] = clik.newPhoto({"id":4728721,"src":"L10034472_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step3","height":87});
															thumbnails[4728719] = clik.newPhoto({"id":4728719,"src":"L10030192_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step4","height":195});
															thumbnails[4729189] = clik.newPhoto({"id":4729189,"src":"L10034242_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step5","height":87});
															thumbnails[4729193] = clik.newPhoto({"id":4729193,"src":"L10030212_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step6","height":195});
															thumbnails[4730905] = clik.newPhoto({"id":4730905,"src":"L1003441_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step7","height":87});
															thumbnails[4730906] = clik.newPhoto({"id":4730906,"src":"L1003461_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step8","height":87});
															thumbnails[4730907] = clik.newPhoto({"id":4730907,"src":"L1003445_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":87,"caption":"step9","height":130});
															thumbnails[4730908] = clik.newPhoto({"id":4730908,"src":"L10033991_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step 10","height":87});
															thumbnails[4730909] = clik.newPhoto({"id":4730909,"src":"L1003008_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"step 11","height":87});
															thumbnails[5340086] = clik.newPhoto({"id":5340086,"src":"entredeux001_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340086.html","width":130,"caption":"","height":89});
															thumbnails[1340933] = clik.newPhoto({"id":1340933,"src":"POktm003t0602_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340933.html","width":130,"caption":"kathmandu no:01","height":195});
															thumbnails[1425776] = clik.newPhoto({"id":1425776,"src":"POchgnv004t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425776.html","width":130,"caption":"parade no:04","height":194});
															thumbnails[4636084] = clik.newPhoto({"id":4636084,"src":"series_illusion_no001_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636084.html","width":130,"caption":"illusion no:001","height":195});
															thumbnails[5338237] = clik.newPhoto({"id":5338237,"src":"L1004002kare_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5338237.html","width":130,"caption":"ruveyda koyuncu colombin","height":130});
															thumbnails[1425784] = clik.newPhoto({"id":1425784,"src":"POchgnv005t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425784.html","width":130,"caption":"parade no:05","height":194});
															thumbnails[1340930] = clik.newPhoto({"id":1340930,"src":"POktm001t0602_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340930.html","width":130,"caption":"kathmandu no:02","height":195});
															thumbnails[1425781] = clik.newPhoto({"id":1425781,"src":"POchgnv002t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425781.html","width":130,"caption":"parade no:02","height":194});
															thumbnails[4636128] = clik.newPhoto({"id":4636128,"src":"series_illusion_no002_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636128.html","width":130,"caption":"illusion no:002","height":87});
															thumbnails[5340019] = clik.newPhoto({"id":5340019,"src":"ali-umut-portresb_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340019.html","width":130,"caption":"ali umut ergin","height":130});
															thumbnails[1425782] = clik.newPhoto({"id":1425782,"src":"POchgnv003t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425782.html","width":130,"caption":"parade no:03","height":194});
															thumbnails[1340924] = clik.newPhoto({"id":1340924,"src":"POips001t0410_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340924.html","width":130,"caption":"india no:03","height":195});
															thumbnails[1425779] = clik.newPhoto({"id":1425779,"src":"POchgnv001t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425779.html","width":130,"caption":"parade no:01","height":194});
															thumbnails[4636152] = clik.newPhoto({"id":4636152,"src":"series_illusion_no003_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636152.html","width":130,"caption":"illusion no:003","height":195});
															thumbnails[5340022] = clik.newPhoto({"id":5340022,"src":"gokce-celikel004_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340022.html","width":130,"caption":"gokce celikel","height":130});
															thumbnails[1425798] = clik.newPhoto({"id":1425798,"src":"POchgnv006t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425798.html","width":130,"caption":"parade no:06","height":194});
															thumbnails[1425816] = clik.newPhoto({"id":1425816,"src":"POchgnv007t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425816.html","width":130,"caption":"parade no:07","height":194});
															thumbnails[4636167] = clik.newPhoto({"id":4636167,"src":"series_illusion_no004_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636167.html","width":130,"caption":"illusion no:004","height":195});
															thumbnails[5340025] = clik.newPhoto({"id":5340025,"src":"L1004099_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340025.html","width":98,"caption":"nevhiz","height":130});
															thumbnails[1425834] = clik.newPhoto({"id":1425834,"src":"POchgnv010t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425834.html","width":130,"caption":"parade no:10","height":194});
															thumbnails[1340935] = clik.newPhoto({"id":1340935,"src":"POktm005t0602_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340935.html","width":130,"caption":"nepal no:05","height":184});
															thumbnails[1425836] = clik.newPhoto({"id":1425836,"src":"POchgnv011t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425836.html","width":130,"caption":"parade no:11","height":194});
															thumbnails[4636182] = clik.newPhoto({"id":4636182,"src":"series_illusion_no005_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636182.html","width":130,"caption":"illusion no:005","height":87});
															thumbnails[5340089] = clik.newPhoto({"id":5340089,"src":"L1004650_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340089.html","width":130,"caption":"gokce celikel","height":130});
															thumbnails[1425838] = clik.newPhoto({"id":1425838,"src":"POchgnv012t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425838.html","width":130,"caption":"parade no:12","height":194});
															thumbnails[1340917] = clik.newPhoto({"id":1340917,"src":"PLktm001t0602b_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340917.html","width":130,"caption":"kathmandu no:06","height":195});
															thumbnails[1425866] = clik.newPhoto({"id":1425866,"src":"POchgnv015t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425866.html","width":130,"caption":"parade no:15","height":194});
															thumbnails[4636194] = clik.newPhoto({"id":4636194,"src":"series_illusion_no006_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636194.html","width":130,"caption":"illusion no:006","height":86});
															thumbnails[5340091] = clik.newPhoto({"id":5340091,"src":"coskun001_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340091.html","width":130,"caption":"","height":130});
															thumbnails[1425871] = clik.newPhoto({"id":1425871,"src":"POchgnv016t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425871.html","width":130,"caption":"parade no:16","height":194});
															thumbnails[1425875] = clik.newPhoto({"id":1425875,"src":"POchgnv008t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425875.html","width":130,"caption":"parade no:08","height":87});
															thumbnails[1340928] = clik.newPhoto({"id":1340928,"src":"POiud001t0410_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340928.html","width":130,"caption":"udaipur no:07","height":195});
															thumbnails[1425880] = clik.newPhoto({"id":1425880,"src":"POchgnv009t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425880.html","width":130,"caption":"parade no:09","height":87});
															thumbnails[4636207] = clik.newPhoto({"id":4636207,"src":"series_illusion_no007_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636207.html","width":130,"caption":"illusion no:007","height":195});
															thumbnails[5340093] = clik.newPhoto({"id":5340093,"src":"L1004916_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340093.html","width":130,"caption":"erdal alantar","height":130});
															thumbnails[1425887] = clik.newPhoto({"id":1425887,"src":"POchgnv014t0707_thumb.jpg","galleries_id":98772,"server_id":18,"link":"photo_1425887.html","width":130,"caption":"parade no:14","height":87});
															thumbnails[5340095] = clik.newPhoto({"id":5340095,"src":"ody01_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340095.html","width":130,"caption":"ody saban","height":130});
															thumbnails[1340921] = clik.newPhoto({"id":1340921,"src":"POijp002t0410_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340921.html","width":130,"caption":"jaipur no:08","height":195});
															thumbnails[4636215] = clik.newPhoto({"id":4636215,"src":"series_illusion_no008_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636215.html","width":130,"caption":"illusion no:008","height":87});
															thumbnails[5340094] = clik.newPhoto({"id":5340094,"src":"L1004923_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340094.html","width":130,"caption":"erdal alantar","height":130});
															thumbnails[1340920] = clik.newPhoto({"id":1340920,"src":"POijp001t0410_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340920.html","width":130,"caption":"udaipur no:09","height":195});
															thumbnails[4636270] = clik.newPhoto({"id":4636270,"src":"series_illusion_no009_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636270.html","width":130,"caption":"illusion no:009","height":195});
															thumbnails[1340938] = clik.newPhoto({"id":1340938,"src":"POsam001t0505_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340938.html","width":130,"caption":"damacus no:10","height":195});
															thumbnails[1340937] = clik.newPhoto({"id":1340937,"src":"POpps0010310_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340937.html","width":130,"caption":"pushkar no:11","height":195});
															thumbnails[1340919] = clik.newPhoto({"id":1340919,"src":"PObyr001t0505_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340919.html","width":130,"caption":"beyrouth no:12","height":195});
															thumbnails[1340936] = clik.newPhoto({"id":1340936,"src":"POktm008t0602_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340936.html","width":130,"caption":"bhaktapur no:13","height":92});
															thumbnails[1340901] = clik.newPhoto({"id":1340901,"src":"PLips001t04105_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340901.html","width":130,"caption":"pushkar no:15","height":87});
															thumbnails[1340939] = clik.newPhoto({"id":1340939,"src":"POsam002t0505_thumb.jpg","galleries_id":93098,"server_id":18,"link":"photo_1340939.html","width":130,"caption":"damascus no:14","height":87});
															thumbnails[4636282] = clik.newPhoto({"id":4636282,"src":"series_illusion_no010_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636282.html","width":130,"caption":"illusion no:010","height":195});
															thumbnails[5340096] = clik.newPhoto({"id":5340096,"src":"utku-varlik001_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340096.html","width":130,"caption":"utku varlik","height":130});
															thumbnails[4636298] = clik.newPhoto({"id":4636298,"src":"series_illusion_no011_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636298.html","width":130,"caption":"illusion no:011","height":86});
															thumbnails[5340098] = clik.newPhoto({"id":5340098,"src":"ismail-yildirim007sb_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340098.html","width":130,"caption":"ismail yildirim","height":130});
															thumbnails[4636307] = clik.newPhoto({"id":4636307,"src":"series_illusion_no012_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636307.html","width":130,"caption":"illusion no:012","height":195});
															thumbnails[5340101] = clik.newPhoto({"id":5340101,"src":"L1004071_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340101.html","width":130,"caption":"nevhiz","height":130});
															thumbnails[4636316] = clik.newPhoto({"id":4636316,"src":"series_illusion_no013_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636316.html","width":130,"caption":"illusion no:13","height":87});
															thumbnails[5340102] = clik.newPhoto({"id":5340102,"src":"L1005127_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340102.html","width":130,"caption":"omer kalesi","height":130});
															thumbnails[4636323] = clik.newPhoto({"id":4636323,"src":"series_illusion_no014_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636323.html","width":130,"caption":"illusion no:014","height":195});
															thumbnails[4636329] = clik.newPhoto({"id":4636329,"src":"series_illusion_no015_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636329.html","width":130,"caption":"illusion no:15","height":86});
															thumbnails[5340105] = clik.newPhoto({"id":5340105,"src":"utku-varlik003_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340105.html","width":130,"caption":"utku varlik","height":130});
															thumbnails[4636333] = clik.newPhoto({"id":4636333,"src":"series_illusion_no016_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636333.html","width":130,"caption":"illusion no:016","height":195});
															thumbnails[5340106] = clik.newPhoto({"id":5340106,"src":"rubeyda001_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340106.html","width":130,"caption":"ruveyda koyuncu kolombin","height":130});
															thumbnails[4636339] = clik.newPhoto({"id":4636339,"src":"series_illusion_no017_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636339.html","width":130,"caption":"illusion no:017","height":87});
															thumbnails[4636351] = clik.newPhoto({"id":4636351,"src":"series_illusion_no018_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636351.html","width":130,"caption":"illusion no:018","height":195});
															thumbnails[5340108] = clik.newPhoto({"id":5340108,"src":"L1004879_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340108.html","width":130,"caption":"erdal alantar","height":130});
															thumbnails[4636361] = clik.newPhoto({"id":4636361,"src":"series_illusion_no019_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636361.html","width":130,"caption":"illusion no:019","height":86});
															thumbnails[5340109] = clik.newPhoto({"id":5340109,"src":"L1004734_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340109.html","width":130,"caption":"gokce celikel","height":130});
															thumbnails[4636371] = clik.newPhoto({"id":4636371,"src":"series_illusion_no020_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636371.html","width":130,"caption":"illusion no:020","height":86});
															thumbnails[5340110] = clik.newPhoto({"id":5340110,"src":"L1004821_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340110.html","width":130,"caption":"onay akbas","height":130});
															thumbnails[4636375] = clik.newPhoto({"id":4636375,"src":"series_illusion_no021_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636375.html","width":130,"caption":"illusion no:021","height":86});
															thumbnails[5340104] = clik.newPhoto({"id":5340104,"src":"ody03_thumb.jpg","galleries_id":300579,"server_id":18,"link":"photo_5340104.html","width":130,"caption":"ody saban","height":130});
															thumbnails[4636378] = clik.newPhoto({"id":4636378,"src":"series_illusion_no022_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636378.html","width":130,"caption":"illusion no:022","height":195});
															thumbnails[4636383] = clik.newPhoto({"id":4636383,"src":"series_illusion_no023_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636383.html","width":130,"caption":"illusion no:023","height":195});
															thumbnails[4636390] = clik.newPhoto({"id":4636390,"src":"series_illusion_no024_thumb.jpg","galleries_id":267545,"server_id":18,"link":"photo_4636390.html","width":130,"caption":"illusion no:24","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[300579] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"entre deux","link":"gallery_300579.html","maxRecords":0.0,"photoIDs":[5340086.0,5338237.0,5340019.0,5340022.0,5340025.0,5340089.0,5340091.0,5340093.0,5340095.0,5340094.0,5340096.0,5340098.0,5340101.0,5340102.0,5340105.0,5340106.0,5340108.0,5340109.0,5340110.0,5340104.0],"skipIndex":0,"section_code":"gallery","featured_images":5338237.0,"id":300579,"singleSection":false});				  						galleries[267545] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photography Exhibition \"ILLUSION\"","link":"gallery_267545.html","maxRecords":0.0,"photoIDs":[4636084.0,4636128.0,4636152.0,4636167.0,4636182.0,4636194.0,4636207.0,4636215.0,4636270.0,4636282.0,4636298.0,4636307.0,4636316.0,4636323.0,4636329.0,4636333.0,4636339.0,4636351.0,4636361.0,4636371.0,4636375.0,4636378.0,4636383.0,4636390.0],"skipIndex":0,"section_code":"gallery","featured_images":4636084.0,"id":267545,"singleSection":false});				  						galleries[93098] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Faces from the east side","link":"gallery_93098.html","maxRecords":0.0,"photoIDs":[1340933.0,1340930.0,1340924.0,1340935.0,1340917.0,1340928.0,1340921.0,1340920.0,1340938.0,1340937.0,1340919.0,1340936.0,1340901.0,1340939.0],"skipIndex":0,"section_code":"gallery","featured_images":1340933.0,"id":93098,"singleSection":false});				  						galleries[98772] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Parade","link":"gallery_98772.html","maxRecords":0.0,"photoIDs":[1425776.0,1425784.0,1425781.0,1425782.0,1425779.0,1425798.0,1425816.0,1425834.0,1425836.0,1425838.0,1425866.0,1425871.0,1425875.0,1425880.0,1425887.0],"skipIndex":0,"section_code":"gallery","featured_images":1425776.0,"id":98772,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5340086,4636128,4636194,1340901,4636390';
imageSets[2] = '5338237,4636084,1425776,1340933,4728721';
imageSets[3] = '5340110,5340109,5340108,5340106,5340105,5340104,5340102,5340101,5340098,5340096,5340095,5340094,5340093,5340091,5340089,5340086,5340025,5340022,5340019,5338237,4730909,4730908,4730907,4730906,4730905,4730904,4729193,4729189,4728721,4728719,4728717,4636390,4636383,4636378,4636375,4636371,4636361,4636351,4636339,4636333,4636329,4636323,4636316,4636307,4636298,4636282,4636270,4636215,4636207,4636194';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/argunyasa/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/argunyasa/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Argun Yasa Photography: ' + 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> Fr.' + (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="argunyasa@gmail.com">';
					temp += '<input type="hidden" name="currency_code" value="CHF">';
					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="argunyasa@gmail.com">';
				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;
	}
}

			

