function doOnClickLaunchSlider(e)
{
	launchSlider();
}

function launchSlider()
{
	openWindow(HOST_ROOT + 'slider/', 'winSlider', 480, 800, 1, 0, 1, 0, 0, 0, 0);
}

function launchTimeline()
{
	openWindow(HOST_ROOT + 'carousel/', 'winTimeline', 970, 450, 0, 0, 1, 0, 0, 0, 0);
}

//This function opens a new window, centered in the middle of the user's screen.
function openWindow(strURL, strID, nWidth, nHeight, bScrollbars, bToolbar, bResizable, bLocation, bDirectories, bMenubar, bStatus)
{
	//Initialise variables.
	var strFeatures = "";
	var strScrollbars = bScrollbars ? "yes" : "no";
	var strToolbar = bToolbar ? "yes" : "no";
	var strResizable = bResizable ? "yes" : "no";
	var strLocation = bLocation ? "yes" : "no";
	var strDirectories = bDirectories ? "yes" : "no";
	var strMenubar = bMenubar ? "yes" : "no";
	var strStatus = bStatus ? "yes" : "no";
	var nScreenWidth; var nScreenHeight; var nPosX; var nPosY;

	strFeatures += "scrollbars=" + strScrollbars + ", ";
	strFeatures += "toolbar=" + strToolbar + ", ";
	strFeatures += "resizable=" + strResizable + ", ";
	strFeatures += "location=" + strLocation + ", ";
	strFeatures += "directories=" + strDirectories + ", ";
	strFeatures += "menubar=" + strMenubar + ", ";
	strFeatures += "status=" + strStatus + ", ";
	strFeatures += "width=" + nWidth + ",innerWidth=" + nWidth;
	strFeatures += ",height=" + nHeight + ",innerHeight=" + nHeight;

	if (window.screen)
	{
		nScreenWidth = screen.availWidth;
		nScreenHeight = screen.availHeight;
		nPosX = parseInt((nScreenWidth - nWidth) / 2);
		nPosY = parseInt((nScreenHeight - nHeight) / 2);
		strFeatures += ",left=" + nPosX + ",screenX=" + nPosX;
		strFeatures += ",top=" + nPosY + ",screenY=" + nPosY;
	}

	//Open window.
	window.open(strURL, strID, strFeatures);
}

function clearSearchBox()
{
	var eleSearchBox = YAHOO.util.Dom.get('txtdstrSearchKeywords');
	var strSearchText = new String(eleSearchBox.value);

	if (strSearchText == 'SEARCH THE SITE')
	{
		eleSearchBox.value = '';
	}
}

function doEnquiryFormFieldOnFocus(strId, strDefaultValue)
{
    if($('#' + strId).val()==strDefaultValue) {
        $('#' + strId).val("");
    }
}

function doEnquiryFormFieldOnBlur(strId, strDefaultValue)
{
    if($('#' + strId).val()=="") {
        $('#' + strId).val(strDefaultValue);
    }
}