/*
function blockError(){return true;}
window.onerror = blockError;
*/

function headers(image,text)
{
	if(image == '') add = '';
	else add = '<td width="35px"><img src="/man/site/'+image+'"></td>';
	return '<table id="menu_header"><tr>'+add+'<td><b style="color:#B32828;">'+text+'</b></td></tr></table>';
}

var bg = '';


function SelChk(link,type)
{
	if(type == 1)
	{
		bg = link.style.backgroundColor;
		link.style.backgroundColor = '#F0F0FF';
	}
	else
	{
  		link.style.backgroundColor = bg;
	}
}

var choise = 10;

function star(a, url, link, action)
{
	htmls = '';

	if(choise != a || choise == 10)
	{

		for(i = 0; i < 5; i ++)
		{
			url2 = url;
			url2 += (i+1);

			if(i < a)
			{
				htmls += '<img src="/man/site/star2.gif" onmouseover="star(\''+(i+1)+'\', \''+url+'\', \''+link+'\', \'\')" onClick=\'star_win("'+url2+'")\' style=\'cursor:pointer\'>';
			}
			else
			{
				htmls += '<img src="/man/site/star1.gif" onmouseover="star(\''+(i+1)+'\', \''+url+'\', \''+link+'\', \'\')" onClick=\'star_win("'+url2+'")\' style=\'cursor:pointer\'>';
			}
		}

		document.getElementById(link).innerHTML = htmls;
		if(action != 'write') choise = a;
    }

}

function online()
{
	Requests("/tmp/online/", "setTimeout('online();', '30000');");
}


function nopac(link,a)
{
	if(a == 1)
	{
		link.style.opacity='1.0';
		link.style.filter = 'alpha(opacity=100)';
	}
	else
	{
		link.style.opacity='0.05';
		link.style.filter = 'alpha(opacity=5)';
	}
}

function nbookmarks(title, url)
{
	document.write(' \
	<a target="blank" href="http://del.icio.us/post?url='+url+'&amp;title='+title+'"><img src="/man/img/bookmarks/del.icio.us.ico" title="Добавить в del.icio.us" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://news2.ru/add_story.php?url='+url+'"><img src="/man/img/bookmarks/news2.ru.ico" title="Добавить в news2.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://google.com/bookmarks/mark?op=edit&amp;bkmk='+url+'&amp;title='+title+'"><img src="/man/img/bookmarks/google.com.ico" title="Добавить в google.com" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://bobrdobr.ru/add.html?url='+url+'&amp;title='+title+'"><img src="/man/img/bookmarks/bobrdobr.ru.ico" title="Добавить в bobrdobr.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://memori.ru/link/?sm=1&amp;u_data%5Burl%5D='+url+'&amp;u_data%5Bname%5D='+title+'"><img src="/man/img/bookmarks/memori.ru.ico" title="Добавить в memori.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://moemesto.ru/post.php?url='+url+'&amp;title='+title+'"><img src="/man/img/bookmarks/moemesto.ru.ico" title="Добавить в moemesto.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://mister-wong.ru/add_url/?bm_url='+url+'&amp;bm_description='+title+'"><img src="/man/img/bookmarks/mister-wong.ru.ico" title="Добавить в mister-wong.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://rumarkz.ru/bookmarks/?action=add&amp;popup=1&amp;address='+url+'&amp;title='+title+'&amp;description=%7Bt%7D"><img src="/man/img/bookmarks/rumarkz.ru.ico" title="Добавить в rumarkz.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://rucity.com/bookmarks.php?action=add&amp;address='+url+'&amp;title='+title+'&amp;description="><img src="/man/img/bookmarks/rucity.com.ico" title="Добавить в rucity.com" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://linkstore.ru/servlet/LinkStore?a=add&amp;url='+url+'&amp;title='+title+'"><img src="/man/img/bookmarks/linkstore.ru.ico" title="Добавить в linkstore.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://myscoop.ru/add/?title='+title+'&amp;URL='+url+'"><img src="/man/img/bookmarks/myscoop.ru.ico" title="Добавить в myscoop.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://vaau.ru/submit/?action=step2&amp;url='+url+'"><img src="/man/img/bookmarks/vaau.ru.ico" title="Добавить в vaau.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	<a target="blank" href="http://newsland.ru/News/Add/type/news/"><img src="/man/img/bookmarks/newsland.ru.ico" title="Добавить в newsland.ru" border="0" width="16" height="16"onMouseover="nopac(this,\'1\')" onMouseout="nopac(this,\'0\')"></a> \
	');
}

function OpenIcqWindow()
{
	windowOptions = "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=532,height=477";
	window.open("http://metall-zone.com/library/tools/online/icq.php?lang=ru", "IcqWindow", windowOptions);
}