
function imageClick(imgObj, groupNumber){
	targetObj = $('mainImage');
	targetObjUrl = $('mainImageURL');
	imgCollection = $('contentLeftImages');
	

	
	 //var imgShow = new Element( 'a' );
 	 //newI.update('I am the new element');
	//var imgShow = new Element('a', { 'class': 'foo', href: '/foo.html' });
	//Element.insert( imgCollection);
	/*
	<a id="mainImageURL" href="/images/richmond/lrg/1-Richmond.jpg" rel="lightbox[richmond]" title="my caption">
			<img style="margin-top:84px;" id="mainImage" src="/images/richmond/1-Richmond.jpg">
		</a>
		
		*/
	//<a href="/images/richmond/lrg/1-Richmond.jpg" rel="lightbox[richmond]" title="my caption"></a>
	/*
	for (i=1;i<=10;i++){


				var imgShow = document.createElement('a');
				imgShow.setAttribute('rel','lightbox[richmond]');
				imgShow.setAttribute('href','/images/richmond/lrg/'+i+'-Richmond.jpg');
				if (i == imgNum){
					var theImg = document.createElement('img');
						theImg.setAttribute('style','margin-top:84px');
						theImg.setAttribute('id','mainImage');
						theImg.setAttribute('src','/images/richmond/'+i+'-Richmond.jpg');
						imgShow.appendChild(theImg);
				} 
					imgCollection.appendChild(imgShow);
				
	}
	*/
			//Element.insert( imgCollection);
			//$('contentLeftImages').insert( {top:imgShow} ); 
				//imgCollection.appendChild(imgShow);


		
		//objPrevLink.innerHTML = this.options.strings.prevLink;
		//objDetailsNav.appendChild(objPrevLink);
		//Event.observe(objPrevLink,'click',this.showPrev.bindAsEventListener(this));
	
	
	/*
	imgCollection.each(function(item) {
		if(myImgLrg == item.href){
  		 item.href = 
		}
	});
	*/
	myImg = imgObj.src.replace('/thumb','');
	myImgLrg = imgObj.src.replace('/thumb','/lrg');
	targetObj.src = myImg;
	targetObjUrl.href = myImgLrg;
	targetObjUrl.rel = 'lightbox[group'+groupNumber+']';
	
}

function thumbOver(imgObj){
	$(imgObj).setStyle({
  		border: '#00CC00 2px solid'
	});
}


function thumbOut(imgObj){
	$(imgObj).setStyle({
  		border: '#FFF 2px solid'
	});
}

function imageMainClick(imgObj){
	targetObj = $('mainImage');
	myImg = imgObj.src.replace('/thumb','');
	targetObj.src = myImg;
}