function CheckSearch() 
{
	var i=document.forms['search'];
	var re_str=/[^\s+]/;

	if (!re_str.test(i.text.value) || i.text.value=='ïîèñê ïî ñàéòó...')
	{
		i.text.focus(); alert("Ââåäèòå ñòðîêó ïîèñêà!"); return false;
	} else 
	{
		return true;
	}
}

function OpenWin(url, framename, wdth, hght) 
{
	alert(1);
	var features = "toolbar=0,location=0,directoties=0,status=0,menubar=0,scrollbars=no,resizable=no,width="+(wdth+16)+",height="+hght+",left="+(screen.availWidth-wdth)/2+",top="+(screen.availHeight-hght)/2;
	var w=window.open(url, framename,features);
		w.focus();
}

function OpenFWin(url, framename, wdth, hght) 
{
		var features = "toolbar=0,location=0,directoties=0,status=0,menubar=1,scrollbars=no,resizable=yes,width="+(wdth+16)+",height="+hght+",left="+(screen.availWidth-wdth)/2+",top="+(screen.availHeight-hght)/2;
		var w=window.open(url, framename,features);
		w.focus();
}

function ShowPicture(url,title,width,height)
{
	var features = "toolbar=0,location=0,directoties=0,status=0,menubar=0,scrollbars=no,resizable=yes,width="+(width)+",height="+height+",left="+(screen.availWidth-width)/2+",top="+(screen.availHeight-height)/2;
	var w=window.open("/picture.php?url="+url+"&title="+title+"&width="+width+"px"+"&height="+height, '', features);
}

function GetYear() 
{
var now = new Date();
var year = now.getYear();
if (!document.all) year +=1900;
if (year < 1500) year +=1900;
document.write(year);
}

function getClientWidth()
{
	return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

function getCenter()
{
	var x = (getClientWidth()-1280)/2;
	x = (x>0) ? x : (-1)*x;
	window.scrollTo(100,0);
}