window.thumbnails = new Object();
												thumbnails[2093554] = new thumbnail(2093554,'','','pers_hiese_34_thumb.jpg',130, 37,5,'							photo_2093554.html');
												thumbnails[2810312] = new thumbnail(2810312,'175685','','Darsser-Wald-10-B_0808_thumb.jpg',130, 87,5,'							photo_2810312.html');
												thumbnails[2810456] = new thumbnail(2810456,'175685','','Hohe-Duene-Zingst-1_0808_thumb.jpg',130, 87,5,'							photo_2810456.html');
												thumbnails[2811288] = new thumbnail(2811288,'175685','','Darsswald_Buchen_Moor_2_0808_thumb.jpg',130, 87,5,'							photo_2811288.html');
												thumbnails[2811292] = new thumbnail(2811292,'175685','','Strand-Darsser-Ort_noerdl_thumb.-Weststrand_0808.jpg',130, 87,5,'							photo_2811292.html');
												thumbnails[2811296] = new thumbnail(2811296,'175685','','Darsswald_Buchen_Moor_1_0808_thumb.jpg',130, 87,5,'							photo_2811296.html');
												thumbnails[2811300] = new thumbnail(2811300,'175685','','Strand_Kliffs_Wustrow_1_0808_thumb.jpg',130, 87,5,'							photo_2811300.html');
												thumbnails[2811398] = new thumbnail(2811398,'175685','','Schilf-Darsser-Ort_0808_thumb.jpg',130, 194,5,'							photo_2811398.html');
												thumbnails[2089379] = new thumbnail(2089379,'139224','','Sylvensteinspeicher Februar 2007_thumb.jpg',130, 87,5,'							photo_2089379.html');
												thumbnails[2090184] = new thumbnail(2090184,'139224','','Sonnenaufgang-Kochelsee-Herzogenstand_230308_thumb.jpg',130, 87,5,'							photo_2090184.html');
												thumbnails[2811605] = new thumbnail(2811605,'175685','','Strand_Kliffs_Wustrow_2_0808_thumb.jpg',130, 87,5,'							photo_2811605.html');
												thumbnails[2090230] = new thumbnail(2090230,'139224','','Tratenbach Lenggries Winter 0208_thumb.jpg',130, 87,5,'							photo_2090230.html');
												thumbnails[2811612] = new thumbnail(2811612,'175685','','Darsser-Wald-6_0808_thumb.jpg',130, 87,5,'							photo_2811612.html');
												thumbnails[2090363] = new thumbnail(2090363,'139224','','Fichtenwald Osterseen_thumb.jpg',130, 87,5,'							photo_2090363.html');
												thumbnails[2811619] = new thumbnail(2811619,'175685','','Darsswald_Baumkadaver_Vordarss_0808_bw_thumb.jpg',130, 87,5,'							photo_2811619.html');
												thumbnails[2091122] = new thumbnail(2091122,'139224','','Lainbach 2_thumb.jpg',130, 87,5,'							photo_2091122.html');
												thumbnails[2091321] = new thumbnail(2091321,'139224','','Lainbach 3_thumb.jpg',130, 87,5,'							photo_2091321.html');
												thumbnails[2091436] = new thumbnail(2091436,'139224','','Sonnenaufgang Osterseen_thumb.jpg',130, 87,5,'							photo_2091436.html');
												thumbnails[2091680] = new thumbnail(2091680,'139224','','Aufstieg zur Tölzer Hutte aus der Eng Oktober 2007_thumb.jpg',130, 87,5,'							photo_2091680.html');
												thumbnails[2091864] = new thumbnail(2091864,'139224','','Iffeldorf-Schneelandschaft-Sonnenaufgang_thumb.jpg',130, 88,5,'							photo_2091864.html');
												thumbnails[2137527] = new thumbnail(2137527,'139224','','Rams-in-der-Ramsau_0508_thumb.jpg',130, 87,5,'							photo_2137527.html');
												thumbnails[2137548] = new thumbnail(2137548,'139224','','Schoenauer-Weiher-Spiegelung-0508_thumb.jpg',130, 87,5,'							photo_2137548.html');
												thumbnails[2141300] = new thumbnail(2141300,'139224','','Froesche-Schoenauer-Weiher-0308_thumb.jpg',130, 87,5,'							photo_2141300.html');
												thumbnails[2141305] = new thumbnail(2141305,'139224','','Arzbach-0508_thumb.jpg',130, 87,5,'							photo_2141305.html');
												thumbnails[2168436] = new thumbnail(2168436,'139224','','Bavarian-Spring-1_thumb.jpg',130, 87,5,'							photo_2168436.html');
												thumbnails[2278575] = new thumbnail(2278575,'139224','','Schilf-Ufer-Spitzingsee_0508_thumb.jpg',130, 87,5,'							photo_2278575.html');
												thumbnails[2313575] = new thumbnail(2313575,'139224','','Sonnenaufgang-Sylvensteinspeicher-0608_thumb.jpg',130, 87,5,'							photo_2313575.html');
												thumbnails[2313886] = new thumbnail(2313886,'139224','','Frostige-Isar_0108_thumb.jpg',130, 87,5,'							photo_2313886.html');
												thumbnails[2313897] = new thumbnail(2313897,'139224','','Lainbachfall_0508_thumb.jpg',130, 87,5,'							photo_2313897.html');
												thumbnails[2453586] = new thumbnail(2453586,'139224','','Eitzenberger-Weiher-07_08_thumb.jpg',130, 87,5,'							photo_2453586.html');
												thumbnails[2461522] = new thumbnail(2461522,'139224','','Hubersee_Penzberg_0708_thumb.jpg',130, 87,5,'							photo_2461522.html');
												thumbnails[2627928] = new thumbnail(2627928,'139224','','Blick-in-die-Jachenau-kurz-nach-Start_gruen_III_0808_thumb.jpg',130, 87,5,'							photo_2627928.html');
												thumbnails[2849971] = new thumbnail(2849971,'139224','','Silberdistel-Herzogenstand-0908_thumb.jpg',130, 87,5,'							photo_2849971.html');
												thumbnails[2952972] = new thumbnail(2952972,'139224','','Abstieg-Lenggrieser-Huette_121008_thumb.jpg',130, 87,5,'							photo_2952972.html');
												thumbnails[2958766] = new thumbnail(2958766,'139224','','Osterseen_Herbstsonne_Waldweg_Baumschatten_3_1008_thumb.jpg',130, 87,5,'							photo_2958766.html');
												thumbnails[2958841] = new thumbnail(2958841,'139224','','Osterseen_Herbstsonne_Waldweg_Laub_4_10081_thumb.jpg',130, 87,5,'							photo_2958841.html');
												thumbnails[3261244] = new thumbnail(3261244,'198931','','Osterseen-Steg_sw_Silver-Efex-Pro_200_thumb.jpg',130, 89,5,'							photo_3261244.html');
												thumbnails[3261370] = new thumbnail(3261370,'198931','','Tratenbach-Lenggries-Winter-0208_SW_200_thumb.jpg',130, 89,5,'							photo_3261370.html');
												thumbnails[3261318] = new thumbnail(3261318,'198931','','Schwan_Kochelsee_Winter_Sonne_1108_SW_200_thumb.jpg',130, 89,5,'							photo_3261318.html');
												thumbnails[3498886] = new thumbnail(3498886,'198931','','Kloster-Benediktb-Berge-Winter-wiess-Kloster-klar_0209_sw_200_thumb.jpg',130, 89,5,'							photo_3498886.html');
												thumbnails[3649727] = new thumbnail(3649727,'198931','','Isar-zwischen-Lenggries-Tölz_0309_sw_200_thumb.jpg',130, 89,5,'							photo_3649727.html');
												thumbnails[3654141] = new thumbnail(3654141,'139224','','Kaltblüter-von-hinten-0508_thumb.jpg',130, 87,5,'							photo_3654141.html');
												thumbnails[3654147] = new thumbnail(3654147,'139224','','Pferd-Koppel-Moor-Benediktbeuern-Winter-Abendsonne_1108_thumb.jpg',130, 87,5,'							photo_3654147.html');
												thumbnails[3654152] = new thumbnail(3654152,'139224','','Kloster-Benediktbeuern-Berge-Winter-weiss-0209_thumb.jpg',130, 87,5,'							photo_3654152.html');
												thumbnails[3654159] = new thumbnail(3654159,'139224','','Walchensee-Blick-nach-Osten_blau_Winter_0309_thumb.jpg',130, 87,5,'							photo_3654159.html');
												thumbnails[3654171] = new thumbnail(3654171,'139224','','Walchensee-Blick-Westen_Winter_0309_thumb.jpg',130, 87,5,'							photo_3654171.html');
												thumbnails[4227064] = new thumbnail(4227064,'139224','','Staffelsee_Sonnenaufgang_Schilf_140609_Website-Lothar_thumb.jpg',130, 88,5,'							photo_4227064.html');
												thumbnails[4227074] = new thumbnail(4227074,'139224','','Staffelsee_Schilf_Hintergrundberge_140909_website_thumb.jpg',130, 87,5,'							photo_4227074.html');
												thumbnails[3654186] = new thumbnail(3654186,'139224','','Hochmoor-Benediktbeuern_Wasser_1108_thumb.jpg',130, 87,5,'							photo_3654186.html');
												thumbnails[3654212] = new thumbnail(3654212,'139224','','Vereister-Wasserfall_Abstieg-Lenggrieser-Huette_0109_thumb.jpg',130, 87,5,'							photo_3654212.html');
												thumbnails[5241795] = new thumbnail(5241795,'278397','','Namibia-Dead-Vlei_0909_Rahmen_schwarz_150_clikpik_thumb.jpg',130, 89,5,'							photo_5241795.html');
												thumbnails[7229975] = new thumbnail(7229975,'139224','','Naturschutzgebiet-Osterseen_Schechenfilz_Pflanzen_01-1002694_thumb.jpg',130, 96,5,'							photo_7229975.html');
												thumbnails[7229983] = new thumbnail(7229983,'139224','','SW_Painting-Fall_1-1002911_thumb.jpg',130, 90,5,'							photo_7229983.html');
												thumbnails[7229989] = new thumbnail(7229989,'139224','','SW_3200__rw_Schechenfilz_Moor_Seeshaupt_Wasser-1002723_thumb.jpg',130, 87,5,'							photo_7229989.html');
												thumbnails[7229992] = new thumbnail(7229992,'139224','','Sylvensteinspeicher_blue-hour__nachmittags_051209-1002084_thumb.jpg',130, 87,5,'							photo_7229992.html');
												thumbnails[7242029] = new thumbnail(7242029,'139224','','SW_Solarisation_Moränen-Detail-Rissbachtal-Eng-121060-1002781_thumb.jpg',130, 87,5,'							photo_7242029.html');
												thumbnails[2627937] = new thumbnail(2627937,'139224','','Wiesen-vertikal-gruen_0808_thumb.jpg',130, 195,5,'							photo_2627937.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[139224] = new gallery(139224,'7229992,2089379','Oberbayern','gallery',[2089379,2090184,2090230,2090363,2091122,2091321,2091436,2091680,2091864,2137527,2137548,2141300,2141305,2168436,2278575,2313575,2313886,2313897,2453586,2461522,2627928,2849971,2952972,2958766,2958841,3654141,3654147,3654152,3654159,3654171,4227064,4227074,3654186,3654212,7229975,7229983,7229989,7229992,7242029,2627937],0, 0, '', '																																																																																																							gallery_139224.html',0,0);
				  					galleries[175685] = new gallery(175685,'2810456','Ostsee','gallery',[2810312,2810456,2811288,2811292,2811296,2811300,2811398,2811605,2811612,2811619],0, 0, '', '																																																																																																							gallery_175685.html',0,0);
				  					galleries[278397] = new gallery(278397,'5241795','Namibia','gallery',[5241795],0, 0, '', '																																																																																																							gallery_278397.html',0,0);
				  					galleries[198931] = new gallery(198931,'3261244','S/W-Fotografie ','gallery',[3261244,3261370,3261318,3498886,3649727],0, 0, '', '																																																																																																							gallery_198931.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7242029,7229992,7229989,7229983,7229975,5241795,4227074,4227064,3654212,3654186,3654171,3654159,3654152,3654147,3654141,3649727,3498886,3261370,3261318,3261244,2958841,2958766,2952972,2811619,2811612,2811605,2811398,2811300,2811296,2811292,2811288,2810456,2810312,2627937,2627928,2461522,2453586,2313897,2313886,2313575,2278575,2168436,2141305,2141300,2137548,2137527,2091864,2091680,2091436,2091321,2091122,2090363,2090230,2090184,2089379';
imageSets[2] = '7229992,3261244,2810456,2089379';
imageSets[3] = '7242029,7229992,7229989,7229983,7229975,5241795,4227074,4227064,3654212,3654186,3654171,3654159,3654152,3654147,3654141,3649727,3498886,3261370,3261318,3261244,2958841,2958766,2952972,2849971,2811619,2811612,2811605,2811398,2811300,2811296,2811292,2811288,2810456,2810312,2627937,2627928,2461522,2453586,2313897,2313886,2313575,2278575,2168436,2141305,2141300,2137548,2137527,2093554,2091864,2091680';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/saloti/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://www.clikchurch.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/saloti/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/saloti/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/saloti/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/saloti/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/saloti/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));		}, 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 = 'Lothar Hiese 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));    }        
    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 = 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.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Bild Nr.: </strong>' + this.photo_ref + '</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>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				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>Jetzt mit PayPal kaufen</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> 				&euro;' + (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>Kaufen Sie dieses Bild 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 + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = 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 = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="lothar.hiese@t-online.de">';
	temp = temp + '<input type="hidden" name="currency_code" value="EUR">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Zum Warenkorb hinzufügen\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="lothar.hiese@t-online.de">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"Überblick Warenkorb\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							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;
	}
}

		

