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

function changeFrame(frame)
{
	var source;
	var sub;
	if (frame == "brock") { source = "slide_brock.html"; sub = "Brock Plaza";
	} else if (frame == "days") { source = "slide_days.html"; sub = "Days Inn";
	} else if (frame == "falls") { source = "slide_falls.html"; sub = "Falls Avenue";
	} else if (frame == "hampton") { source = "slide_hampton.html"; sub = "Hampton Inn";
	} else if (frame == "holiday") { source = "slide_holiday.html"; sub = "Holiday Inn";
	} else if (frame == "sheraton") { source = "slide_sheraton.html"; sub = "Sheraton";
	} else if (frame == "skyline") { source = "slide_skyline.html"; sub = "Skyline";
	} else { source = "slide_all.html"; sub = "All Properties"; }

	// 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 ;
}
