searchWordHighlighting();

function searchWordHighlighting()
{
	var fontName    = "";
	var fontColor   = "";
	var fontSize    = 0;
	var isBold      = 0;
	var isItalic    = 0;
	var isUnderline = 0;
	var backColor   = "#FFFF00";

	if (!document.body.createTextRange) return;

	var range = document.body.createTextRange();
	var searchStr = getSearchStr();

	if (searchStr == "") return;

	range.collapse(true);

	while (range.findText(searchStr))
	{
		if (fontName != "") range.execCommand("fontName", true, fontName);
		if (fontSize > 0) range.execCommand("fontSize", true, fontSize);
		if (fontColor != "") range.execCommand("foreColor", true, fontColor);
		if (isBold != 0) range.execCommand("bold");
		if (isItalic != 0) range.execCommand("italic");
		if (isUnderline != 0) range.execCommand("underline");
		if (backColor != "") range.execCommand("backColor", false, backColor);
		range.collapse(false);
	}
}

function getSearchStr()
{
	var urlStr = "" + window.location;
	var baseStr = "mySearch=";
	var index = urlStr.indexOf(baseStr);
	if (index == -1) return "";
	return decodeURIComponent(urlStr.substring(index + baseStr.length));
}
