//	var slvIndicator = 'New';
	var slvIndicator = '<img src="http://blog.tabakov.net/wp-content/ak-img/new_1.gif" alt="New" title="New since your last visit." />';
	
	function slvBanner() {
		var posts = slvGetCookie('wplastvisit_posts');
		var comments = slvGetCookie('wplastvisit_comments');
		if (posts == null || comments == null) {
			return false;
		}
		var banner = '';
		if (posts == 1) {
			banner += posts + ' new post and ';
		}
		else {
			banner += posts + ' new posts and ';
		}
		if (comments == 1) {
			banner += comments + ' new comment since your last visit.';
		}
		else {
			banner += comments + ' new comments since your last visit.';
		}
		document.write(banner);
	}
	
	function slvShowNewIndicator(date) {
		if (parseInt(date) > parseInt(slvGetCookie('wplastvisit'))) {
			document.write(slvIndicator);
		}
	}
	
	function slvGetCookie(name) {

	/**
	 * Read the JavaScript cookies tutorial at:
	 *   http://www.netspade.com/articles/javascript/cookies.xml
	 */

		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1)
		{
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		}
		else
		{
			begin += 2;
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1)
		{
			end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
	}	
