function search(e) {
	if (e == undefined || e.keyCode==13) {
		var txt = document.getElementById('searchText').value;
		if (txt.length > 0 && txt != "Search") {
			location.href = "Search-results.html?q=" + escape(txt);
		} else 
			alert("Please type a search query");
	}
}
function search_documents(e) {
	if (e == undefined || e.keyCode==13) {
		var txt = document.getElementById('documentSearch').value;
		if (txt.length > 0) {
			location.href = "Knowledge-results.html?q=" + txt;
			return;
		}
		var a = document.getElementsByName('documentTheme');
		for (var i = 0; i < a.length; i++) {
			if (a[i].checked) {
				location.href = "Knowledge-results.html?t=" + a[i].value;
				return;
			}
		}
		alert("Please select a theme or type a search query");
	}
}
function userDefinedLink(e) {
	if (e == 'Footer-Contact.html')
		location.href = 'Contact-form.html';
	else if (e == '../Footer-Contact.html')
		location.href = '../Contact-form.html';
}

