function checkActive(what,srcElem,target) {
	if(srcElem.className=='active') return false;
	document.getElementById(what).className = 'hand';
	srcElem.className='active';
	document.getElementById(target).value = srcElem.id;
	return false;
}

var shown = true;

function hideWarn() {
	if(!shown) return false;
	document.getElementById('hideCur').parentNode.rows[1].className = 'afterMiddle';
	document.getElementById('hideCur').style.display = 'none';
	shown = false;
}

function addFavorite(x)
{
//	if (document.all  && !window.opera) 
//	{
//		if (typeof window.external == "object") 
//		{
//			window.external.AddFavorite(document.location, document.title);
//			return true;
//		}
//		else return false;
//		
//	}
//	else
//	{
//		x.href = document.location;
//		x.title = document.title;
//		x.rel = "sidebar";
//		return true;
//	}	

	var title	= document.title;
	var url		= document.location;
	
	if (window.sidebar) 
	{
		window.sidebar.addPanel(title, url, '');
	}
	else if( window.opera && window.print )
	{
		var mbm = document.createElement('a');
		mbm.setAttribute('rel', 'sidebar');
		mbm.setAttribute('href', url);
		mbm.setAttribute('title', title);
		mbm.click();
	}
	else if( document.all ) 
	{
		window.external.AddFavorite(url, title);
	}
	else
	{
		alert('Нажмите Ctrl + D, чтобы добавить страницу в закладки');
	}
}
