var g_bDirty;

function SetDirty(b)
{
	g_bDirty = b;
}

function GoHref(href)
{
	if (g_bDirty == true)
	{
		if (!confirm("Continue without saving changes?"))
			return;
	}

	window.location = href;
}

function ValidStr(o)
{
	if (typeof(o) != "string")
		return false;
	
	var strTemp = o.replace(/\s/g, "");
	if (strTemp.length)
		return true;
			
	return false;
}

function ValidateTextboxForValue(tbx, strMsg)
{
	var bRet = ValidStr(tbx.value);
	if (!bRet)
	{
		tbx.focus();
		alert(strMsg);
	}
	
	return bRet;
}
