// set focus on the dom object identified by the id passed as parameter
function setFocus(id) {
	if (id !== undefined && id.length > 0) {
		var elem = document.getElementById(id);
		elem.focus();
	}
}

// get the cookie with the specified name, if cookie not found return ""
function getCookie(c_name) {
	if (document.cookie.length > 0) {
		var c_start = document.cookie.indexOf(c_name + "=");
		if (c_start != -1) {
			c_start = c_start + c_name.length + 1;
			var c_end = document.cookie.indexOf(";", c_start);
			if (c_end == -1) {
				c_end = document.cookie.length;
			}
			return unescape(document.cookie.substring(c_start, c_end));
		}
	}
	return "";
}

// is this an IE browser?
function isIEBrowser() {
	var detect = navigator.userAgent.toLowerCase();
	var place = detect.indexOf("msie") + 1;
	return place;
}

function displayHelpWindow(sURL) {
	newwindow=window.open(sURL,"newwin", "scrollbars=yes, toolbar=no, directories=no, menu bar=no, resizable=yes, status=yes, width=720, height=500");
	if (newwindow.focus) {
		newwindow.focus();
	}
}
