function GetRef(id) {
	return (document.all) ? document.all[id] : (document.getElementById) ? document.getElementById(id) : null;
}

function ShowHide(id, show) {
	var e = GetRef(id);
	if (e == null) return;
	var display = (show) ? "block" : "none";
	e.style.display = display;
}

function ShowHideWithStyle(id, show, style) {
	var e = GetRef(id);
	if (e == null) return;
	var display = (show) ? style : "none";
	e.style.display = display;
}

function RetrieveQStringParam(key) {
	var sRet = "";
	var q = location.search;
	if (q == null || q == "") return sRet;
	var iStart = q.indexOf(key +"=");
	if (iStart == -1) return sRet;
	var iEnd = q.indexOf("&", iStart);
	if (iEnd == -1) iEnd = q.length;
	sRet = q.substring(iStart + (key +"=").length, iEnd);
	return sRet;
}

