/*-----------------------------------------------------------------------
	Functions required for slidshow.	
-----------------------------------------------------------------------*/

function changeFrame(frame)
{
	var source;
	var sub;
	if (frame == "galleryone") { source = "slide_galleryone.php"; sub = "Gallery One";
	} else if (frame == "gallerytwo") { source = "slide_gallerytwo.php"; sub = "Gallery Two";
	} else if (frame == "gallerythree") { source = "slide_gallerythree.php"; sub = "Gallery Three";
	} else { source = "slide_all.php"; sub = "All Galleries"; }

	// change the iframe source and index page sub title.
	document.getElementById('fraThumb').src = source;
	document.getElementById('hProperty').innerHTML = sub;
}

function extractImagePath(url)
{
	// remove the "thumbs/" from the image path.
	var regExp = new RegExp("thumbs/","g");
	var thestring = url;
	var result = thestring.replace(regExp,"");

	return result;
}


function setFrameSource(url, alt)
{
	// display the full image and text description.
	var theFrame = parent.document.getElementById('fraLarge');
	var theText = parent.document.getElementById('imgAlt');

	var imgPath = extractImagePath(url);

	if (theFrame) {
		theFrame.src = imgPath;
		theText.innerHTML = alt;
	}
}

function showStatus(sMsg) {
    window.status = sMsg ;
    return true ;
}