addHandler(window, "load", checkLocation);

function checkLocation()
{
	var loc = new String(window.location);
	if (loc.indexOf("shogi.by") == -1)
	{
		var div = document.createElement("div");
		div.id = "new_loc_alert";
		div.innerHTML = "<span onclick=parentNode.style.display='none'>закрыть</span><div>Основной домен форума &ndash; <a href='http://forum.shogi.by/'>forum.shogi.by</a></div>";
		var content = document.getElementById("counters");
		content.appendChild(div);
		disposeDiv();
		addHandler(window, "scroll", disposeDiv);
	}
} 

function disposeDiv() 
{
	div = document.getElementById("new_loc_alert");
	div.style.top = (document.body.clientHeight - div.clientHeight)/2 + document.body.scrollTop;
	div.style.left = (document.body.clientWidth - div.clientWidth)/2;
}


function addHandler(object, event, handler)
{
	if (typeof object.addEventListener != 'undefined')
		object.addEventListener(event, handler, false);
	else if (typeof object.attachEvent != 'undefined')
		object.attachEvent('on' + event, handler);
}