isDOM=document.getElementById ? true : false;
isOpera=isOpera5=window.opera && isDOM;
isOpera6=isOpera && window.print;
isOpera7=isOpera && document.readyState;
isMSIE=isIE=document.all && document.all.item && !isOpera;
isStrict=document.compatMode=='CSS1Compat';
isNN=isNC=navigator.appName=='Netscape';
isNN4=isNC4=isNN && !isDOM;
isMozilla=isNN6=isNN && isDOM;

function KL_getBody(w)
{
	if(!w) w=window;
	if(isStrict) {return w.document.documentElement;}
	else {return w.document.body;}
}

function getWinWidth(w)
{
	if(!w) w=window;
	if(isMSIE) return KL_getBody(w).clientWidth;
	if(isNN || isOpera) return w.innerWidth;
}

function main_bestRebild()
{
	if (winWidth_bsv > 1600)
	{
		gebi('main_best3').innerHTML = ''+
			'<div class="block">'+
				'<a href="' + Best3UrlHtml + '"><img src="' + Best3UrlJpg + '"' + Best3SizeJpg + ' alt="" /><\/a>'+
				'<div class="bottom">'+
					'<div class="right"><a href="' + Best3RateUrl + '" title="Результаты голосования"><b>Рейтинг: ' + Best3Rate + '<\/b><\/a><\/div>'+
					'<span><a href="' + Best3UrlHtml + '">' + Best3NameFinish + '<\/a><\/span><br />'+
					'<a href="http://www.mail.ru/agent?message&amp;to=' + Best3EmailAuthor + '"><i class="f2_mrim_status f2_off" email="' + Best3EmailAuthor + '"><img src="http://img.mail.ru/0.gif" alt="" class="f2_ico" /></i><\/a>&nbsp;<a href="' + Best3UrlAuthor + '">' + Best3NickAuthor + '<\/a>&nbsp;<span class="user-info-menu" onclick="return userInfo(\''+Best3EmailAuthor+'\',this, event, \'' + Best3UrlAuthor + '\');"><img class="ico_dropdown" src="http://img.imgsmail.ru/r/foto2/ico_down.gif" alt="" \/><\/span>'+
				'<\/div>'+
			'<\/div>';
		gebi('main_best3').style.display = '';
		gebi('main_best3_width').style.display = '';
	}
	else
	{
		gebi('main_best3').innerHTML = '';
		gebi('main_best3').style.display = 'none';
		gebi('main_best3_width').style.display = 'none';
	}
	if (winWidth_bsv > 1380)
	{
		gebi('main_best2').innerHTML = ''+
			'<div class="block">'+
				'<a href="' + Best2UrlHtml + '"><img src="' + Best2UrlJpg + '"' + Best2SizeJpg + ' alt="" /></a>'+
				'<div class="bottom">'+
					'<div class="right"><a href="' + Best2RateUrl + '" title="Результаты голосования"><b>Рейтинг: ' + Best2Rate + '</b></a></div>'+
					'<span><a href="' + Best2UrlHtml + '">' + Best2NameFinish + '</a></span><br />'+
					'<a href="http://www.mail.ru/agent?message&amp;to=' + Best2EmailAuthor + '"><i class="f2_mrim_status f2_off" email="' + Best2EmailAuthor + '"><img src="http://img.mail.ru/0.gif" alt="" class="f2_ico" /></i></a>&nbsp;<a href="' + Best2UrlAuthor + '">' + Best2NickAuthor + '</a>&nbsp;<span class="user-info-menu" onclick="return userInfo(\''+Best2EmailAuthor+'\',this, event, \'' + Best2UrlAuthor + '\');"><img class="ico_dropdown" src="http://img.imgsmail.ru/r/foto2/ico_down.gif" alt="" /></span>'+
				'</div>'+
			'</div>';
		gebi('main_best2').style.display = '';
		gebi('main_best2_width').style.display = '';
	}
	else
	{
		gebi('main_best2').innerHTML = '';
		gebi('main_best2').style.display = 'none';
		gebi('main_best2_width').style.display = 'none';
		gebi('main_best3').style.display = 'none';
		gebi('main_best3_width').style.display = 'none';
	}

}
