function addBookmark(url, title)
{
	if (!url) url = location.href;
	if (!title) title = document.title;

	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) //Gecko
		window.sidebar.addPanel(title, url, "");
	else if (typeof window.external == "object") //IE4+
		window.external.AddFavorite(url, title);
	else if (window.opera && document.createElement) //Opera7+
	{
		var a = document.createElement('A');
		if (!a) return false; //IF Opera 6
		a.setAttribute('rel', 'sidebar');
		a.setAttribute('href', url);
		a.setAttribute('title', title);
		a.click();
	}
	else
		return false;
	return true;
}

function close_status()
{
	var links = document.getElementsByTagName("a");
	for (i in links)
	{
		if (links[i].pathname != 's/out.php' && links[i].pathname != '/s/out.php')
			continue;
		links[i].onmouseover = function()
		{
			if (this.search.match(/out.cgi\?u=(.*)$/))
				window.status=this.search.match(/out.cgi\?u=(.*)$/)[1];
			return true;
		}
		links[i].onmouseout = function() {window.status="Done"; return true;}
	}
}

function block_header(offset)
{
	var ar = new Array('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat');
	var d = new Date();
	d.setDate(d.getDate() + offset);
	var d_of_w = d.getDay();
	document.write('<img src="images3/tit-'+ar[d_of_w]+'.jpg" />');
}
