var browser=navigator.appName;
var version=navigator.appVersion;

function setCookie(name, value) {
	var days=500;
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
	document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : expires);
}

function getCookie(Name) {
	var search = Name + "=";
	if (document.cookie.length > 0) { // if there are any cookies
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // if cookie exists
			offset += search.length;
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset);
			// set index of end of cookie value
			if (end == -1){
				end = document.cookie.length;
			}
			return unescape(document.cookie.substring(offset, end));
		}
	}
}

function emailArticle()
{
	document.location.href="MailTo:?body=I thought you would like to know about this article on Insure.com:" + "%0A" + "%0A" + escape(document.title) + "%0A" + escape(document.URL);
}

function emailEditor()
{
	document.location.href="mailto:editor@insure.com?subject=Insure.com reader response&body=" + escape(document.title) + "%0A" + escape(document.URL);
} 