function setAgentCookie(name, value, ms) {
	var expiresDate = new Date(); 
	expiresDate.setTime(expiresDate.getTime() + (ms ? ms : 1 * 24 * 60 * 60 * 1000));
	var expires = expiresDate.toGMTString(); 
	var newCookie = name + "=" + value + "; path=/; expires=" + expires; 
	document.cookie = newCookie + ";"; 
} 
function getCookie(name) { 
	var prefix = name + "="; 
	var cookieStartIndex = document.cookie.indexOf(prefix); 
	if (cookieStartIndex == -1) return null; 
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length); 
	if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length; 
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)); 
}
//
(function() {
	var ua = navigator.userAgent.toLowerCase();
	//if (ua.indexOf("mra 5.1") != -1) return;
	if (getCookie("agentToolBar2")) if (getCookie("agentToolBar2") == 1) return;
	document.getElementById("agentToolbarId").style.display = "";
	var countDiv, count, ncount = "", i;
	if (countDiv = document.getElementById("agentCountId")) {
		count = parseInt(countDiv.firstChild.nodeValue);
		if (!isNaN(count)) {
			count = count.toString();
			for (i = count.length - 1; i >= 0; i--) ncount = ((count.length - i) % 3 ? count.charAt(i) : " " + count.charAt(i)) + ncount;
			document.getElementById("agentCountId").innerHTML = ncount;
		}
	}
})();
function closeAgentToolbar(temp) {
	if (typeof temp == "undefined") setAgentCookie("agentToolBar2", 1);
	document.getElementById("agentToolbarId").style.display = "none";
	return false;
}
