var galleryIdName="myGallery";

function startSlideshow(width, height) {
	//size slideshow
	var theGallery = document.getElementById(galleryIdName);
	theGallery.style.width="420px";
	theGallery.style.height="300px";
	
	//add div tags around image tags
	var slideShowImages = new Array();
	slideShowImages = theGallery.getElementsByTagName("img");
	
	for(var i=0;i<slideShowImages.length;i++) {	
		var wrapper = document.createElement('div'); 
		var myImg = slideShowImages[i]; 
		myImg.className="full";
		wrapper.appendChild(myImg.cloneNode(true)); 
		wrapper.className="imageElement";
		myImg.parentNode.replaceChild(wrapper, myImg);	
	}
	
	//init SmoothGallery framework
	var myGallery = new gallery($(galleryIdName), {
		timed: false,
		showArrows: true,
		showCarousel: false,
		embedLinks: false,
		showInfopane: false
	});
}

//method for replacing fake [slideshow] tags using javascript, that did not function properly on the site due to conflicts with other scripts in IE, code left in for reference
function replaceSlideShowTags() {
	document.body.innerHTML = document.body.innerHTML.replace("[slideshow]",'<div id="'+galleryIdName+'">');
	document.body.innerHTML = document.body.innerHTML.replace("[/slideshow]",'</div>');
}