window.thumbnails = {};
															thumbnails[6567219] = clik.newPhoto({"id":6567219,"src":"cornish_cliffs_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_6567219.html","width":130,"caption":"Wintry seas with sun breaking through,<br>\r\nCornwall (November 2009)<br>\r\nSeascape. Oil on canvas","height":50});
															thumbnails[8476653] = clik.newPhoto({"id":8476653,"src":"Cornwall_cliffs_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_8476653.html","width":130,"caption":"Wintry seas near Land's End, Cornwall","height":80});
															thumbnails[3686820] = clik.newPhoto({"id":3686820,"src":"mountains_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_3686820.html","width":130,"caption":"Mountains and fir trees in moonlight. Sold.","height":186});
															thumbnails[9026608] = clik.newPhoto({"id":9026608,"src":"Rocks_and_cliffs_composition_1_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_9026608.html","width":130,"caption":"Rocks & Cliffs composition 1","height":98});
															thumbnails[9061410] = clik.newPhoto({"id":9061410,"src":"Study_of_Jarnefelts_ice-covered_cliffs1_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_9061410.html","width":130,"caption":"Study of Eero Jarnefelt - ice-covered cliffs","height":104});
															thumbnails[9061412] = clik.newPhoto({"id":9061412,"src":"Study_of_Jarnefelts_ice-covered_cliffs12_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_9061412.html","width":130,"caption":"Study of Eero Jarnefelt - ice-covered cliffs","height":104});
															thumbnails[6323096] = clik.newPhoto({"id":6323096,"src":"the_cliffs_overlooking_porthleven_from_beacon_crag_C67058B8-24E8-5EC4-4F7EF494F783D739_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_6323096.html","width":130,"caption":"The cliffs overlooking Porthleven, Cornwall","height":94});
															thumbnails[9052260] = clik.newPhoto({"id":9052260,"src":"still_life_Jan_12_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_9052260.html","width":130,"caption":"Still Life ","height":162});
															thumbnails[3686795] = clik.newPhoto({"id":3686795,"src":"willows2_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_3686795.html","width":130,"caption":"Willows at sunset. Sold.","height":94});
															thumbnails[5050760] = clik.newPhoto({"id":5050760,"src":"Composition_No_1_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_5050760.html","width":130,"caption":"Abstract Composition 1","height":173});
															thumbnails[6147706] = clik.newPhoto({"id":6147706,"src":"my_painting_for_ruth_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_6147706.html","width":130,"caption":"Painting for The Odes","height":132});
															thumbnails[4546503] = clik.newPhoto({"id":4546503,"src":"Abstract_thumb.jpg","galleries_id":204640,"server_id":15,"link":"photo_4546503.html","width":130,"caption":"Acrylic on canvas. NFS.","height":98});
															thumbnails[8426932] = clik.newPhoto({"id":8426932,"src":"Punavuori_red_mountain_thumb.jpg","galleries_id":415434,"server_id":15,"link":"photo_8426932.html","width":130,"caption":"Punavuori, Helsinki","height":104});
															thumbnails[7666782] = clik.newPhoto({"id":7666782,"src":"red_path_to_cliff_edge_thumb.jpg","galleries_id":415434,"server_id":15,"link":"photo_7666782.html","width":130,"caption":"Red Path to Cliff Edge","height":107});
															thumbnails[9061406] = clik.newPhoto({"id":9061406,"src":"Study_of_Jarnefelts_ice-covered_cliffs_thumb.jpg","galleries_id":415434,"server_id":15,"link":"photo_9061406.html","width":130,"caption":"Study of Jarnefelt - snow-covered cliffs","height":104});
															thumbnails[9067078] = clik.newPhoto({"id":9067078,"src":"nuottalahti_winter_2011_thumb_68BE79A4-1EC9-D45B-1C3B6C4BA7466634.jpg","galleries_id":415434,"server_id":15,"link":"photo_9067078.html","width":130,"caption":"Nuottalahti, southern Finland, winter 2011","height":99});
															thumbnails[7666935] = clik.newPhoto({"id":7666935,"src":"night_day_and_inbetween_thumb.jpg","galleries_id":415434,"server_id":15,"link":"photo_7666935.html","width":130,"caption":"Night, Day and In-between","height":175});
															thumbnails[9027106] = clik.newPhoto({"id":9027106,"src":"finland_-_composition_1_thumb_6A798C04-1EC9-DFB6-098EBB5CEED55F5D.jpg","galleries_id":415434,"server_id":15,"link":"photo_9027106.html","width":130,"caption":"Finland landscape","height":170});
															thumbnails[7565145] = clik.newPhoto({"id":7565145,"src":"Going_to_the_Races_thumb.jpg","galleries_id":415434,"server_id":15,"link":"photo_7565145.html","width":130,"caption":"Going to the Races","height":151});
															thumbnails[5439635] = clik.newPhoto({"id":5439635,"src":"Girl_with_toucan_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5439635.html","width":130,"caption":"Portrait of a girl with toucan","height":164});
															thumbnails[6193400] = clik.newPhoto({"id":6193400,"src":"kurban_in_a_turban_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_6193400.html","width":130,"caption":"Kurban Haji ","height":220});
															thumbnails[6401681] = clik.newPhoto({"id":6401681,"src":"best_of_lynda_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_6401681.html","width":130,"caption":"My friend after finishing<br>\r\nchemotherapy (NFS)","height":173});
															thumbnails[5502874] = clik.newPhoto({"id":5502874,"src":"martin_knights_1_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5502874.html","width":130,"caption":"Portrait of Martin Knights","height":161});
															thumbnails[5242576] = clik.newPhoto({"id":5242576,"src":"Portrait_of_Edward_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5242576.html","width":130,"caption":"Portrait of Edward","height":156});
															thumbnails[5117781] = clik.newPhoto({"id":5117781,"src":"FAINA_USE_THIS_ONE_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5117781.html","width":130,"caption":"Portrait of Fiana Smith","height":173});
															thumbnails[3686725] = clik.newPhoto({"id":3686725,"src":"freud_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_3686725.html","width":130,"caption":"This is a study, painted in 2002, of Freud's self-portrait.","height":185});
															thumbnails[9005308] = clik.newPhoto({"id":9005308,"src":"exhausted_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_9005308.html","width":130,"caption":"10-minute sketch of girl, Sydney (2002)","height":183});
															thumbnails[4546420] = clik.newPhoto({"id":4546420,"src":"Peter_sketch_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_4546420.html","width":130,"caption":"5 minute sketch. Pencil on paper.","height":173});
															thumbnails[4546497] = clik.newPhoto({"id":4546497,"src":"Peter_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_4546497.html","width":130,"caption":"Asleep by the open fire","height":173});
															thumbnails[3686751] = clik.newPhoto({"id":3686751,"src":"girl_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_3686751.html","width":130,"caption":"Girl in a striped top.NFS.","height":179});
															thumbnails[5048281] = clik.newPhoto({"id":5048281,"src":"Adam_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5048281.html","width":130,"caption":"Adam Rowbrey-Evans, the<br>\r\nartist's son","height":164});
															thumbnails[5050777] = clik.newPhoto({"id":5050777,"src":"orlando_thumb.jpg","galleries_id":225230,"server_id":15,"link":"photo_5050777.html","width":130,"caption":"Orlando","height":156});
															thumbnails[3613403] = clik.newPhoto({"id":3613403,"src":"egyptianlandscape1_thumb.jpg","galleries_id":350702,"server_id":15,"link":"photo_3613403.html","width":130,"caption":"Egyptian landscape.","height":171});
															thumbnails[4941279] = clik.newPhoto({"id":4941279,"src":"Old_alley_Cairo1_thumb.jpg","galleries_id":350702,"server_id":15,"link":"photo_4941279.html","width":130,"caption":"Old alley, Cairo. £450 framed.","height":95});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[350702] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Paintings of Egypt","link":"section418605.html","maxRecords":0.0,"photoIDs":[3613403.0,4941279.0],"skipIndex":0,"section_code":"section418605","featured_images":"4941279,3613403","id":350702,"singleSection":true});				  						galleries[415434] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Finland paintings","link":"section497254.html","maxRecords":0.0,"photoIDs":[8426932.0,7666782.0,9061406.0,9067078.0,7666935.0,9027106.0,7565145.0],"skipIndex":0,"section_code":"section497254","featured_images":"9067078,9061406,9027106,8426932,7666935,7666782,7565145","id":415434,"singleSection":true});				  						galleries[204640] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes and abstract painting","link":"section317956.html","maxRecords":0.0,"photoIDs":[6567219.0,8476653.0,3686820.0,9026608.0,9061410.0,9061412.0,6323096.0,9052260.0,3686795.0,5050760.0,6147706.0,4546503.0],"skipIndex":0,"section_code":"section317956","featured_images":8476653.0,"id":204640,"singleSection":true});				  						galleries[225230] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery.html","maxRecords":0.0,"photoIDs":[5439635.0,6193400.0,6401681.0,5502874.0,5242576.0,5117781.0,3686725.0,9005308.0,4546420.0,4546497.0,3686751.0,5048281.0,5050777.0],"skipIndex":0,"section_code":"gallery","featured_images":"9005308,6401681,6193400,5502874,5439635,5242576,5117781,5050777,5048281,4546497","id":225230,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8476653';
imageSets[2] = '8476653';
imageSets[3] = '6401681,6193400,5439635,6567219,5502874,5242576,5117781,9067078,9061412,9061410,9061406,9026608,8426932,7666782,3686820,3686725,3613403,9027106,7666935,9005308,6323096,4546420,4546497,9052260,3686751,5048281,7565145,4941279,5050777,3686795,5050760,6147706,4546503';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/erikarowbreyevans/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/erikarowbreyevans/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section317956.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 && 'section317956' != '') {
					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 = 'erikaart.co.uk: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
																		temp += '<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="erika_rowbreyevans@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					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="erika_rowbreyevans@hotmail.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;
	}
}

			

