function TrimString(sInString) 
{
  sInString = sInString.replace( /^\s+/g, "" ); // strip leading
  
  return sInString.replace( /\s+$/g, "" ); // strip trailing
}

function ClearTextBoxFocus(item, str)
{
    if (TrimString(item.value) == str)
    {
        item.value = '';
    }
}

function ClearTextBoxBlur(item, str)
{
    if (TrimString(item.value) == '') 
    {
       item.value = str; 
    }
}

function ValidateReportURL(item, str)
{
		if (TrimString(item.value) != str && TrimString(item.value) != '')
		{
			window.open('http://' + item.value + '/reports','Reports','');
		}
}

function ConfirmSubmit()
{
	var agree = confirm("Are you sure you wish to delete this page?  All content will be permanently lost.\n\nIf you only wish to hide this page, press 'Cancel' and check the 'Hide This Page' checkbox.");

	if (agree)
		return true;
	else
		return false;
}

function ConfirmSubmit2()
{
	var agree = confirm("Are you sure you wish to delete this page?  All content will be permanently lost.");

	if (agree)
		return true;
	else
		return false;
}