function tfSearch(useSeoFormatter, locale, alertDefault, alertText) {
	if (document.getElementById("hsb_search_input").value == alertDefault || document.getElementById("hsb_search_input").value == '') {
		alert (alertText);
	} else {
		if(useSeoFormatter) {
			var formStr = document.getElementById("hsb_search_input").value;
			var encodedStr = formStr.replace("&", "%26");
			window.location = "/transformers/dotm/" + locale + "/search/_/Ntt-" + encodeURIComponent(encodedStr) + "?Ntk=All&Ntx=mode+matchallpartial";
		} else {
			window.location = "/transformers/dotm/" + locale + "/search.cfm?Ntk=All&Ntt=" + encodeURIComponent(document.getElementById("hsb_search_input").value) + "&Ntx=mode+matchallpartial";
		}
	}
}

function instructionsSearch(locale, alertText) {
	if (document.getElementById("hsb_keyword_input").value == '' && document.getElementById("hsb_char_dropdown").value == '') {
		alert (alertText);
	} else {
		var NVal = '861';
		if (document.getElementById("hsb_char_dropdown").value) {
			NVal = NVal + '+' + encodeURIComponent(document.getElementById("hsb_char_dropdown").value);
		}
		if (document.getElementById("hsb_keyword_input").value) {
			window.location = "/transformers/dotm/" + locale + "/discover/instructions-search.cfm?Ntk=All&N=" + NVal + "&Ntt=" + encodeURIComponent(document.getElementById("hsb_keyword_input").value) + "&Ntx=mode+matchallpartial";
		} else {
			window.location = "/transformers/dotm/" + locale + "/discover/instructions-search.cfm?Ntk=All&N=" + NVal + "&Ntx=mode+matchallpartial";
		}
	}
}
