function enlarge(m,f) {
	ShowPic = window.open("/enlarge.php?mode=" + m + "&img=" + f, "ShowPic","resizable=no,screenX=16,screenY=16,titlebar=no,width=512,height=128");
	ShowPic.focus();
};

function fixPNG(element)
{
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))
	{
		var src;

		if (element.tagName=='IMG')
		{
			if (/\.png$/.test(element.src))
			{
				src = element.src;
				element.src = "/.images/px.gif";
			}
		}
		else
		{
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)
			if (src)
			{
				src = src[1];
				element.runtimeStyle.backgroundImage = "none";
			}
		}
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')";
	}
};

function searh_form(form_no, pos, query) {
	if (lang == 'en') {
		button = 'search'
	} else {
		button = 'поиск'
	}
	if (query == '') query = init_str
	document.write('\n<div id="search_pos_' + pos + '">\n')
	document.write('<form action="/search/" id="cse-search-box' + form_no + '" class="search_form">\n')
	document.write('	<input type="hidden" name="cx" value="partner-pub-7474906700027458:5g40z43qq1d" />\n')
	document.write('	<input type="hidden" name="cof" value="FORID:11" />\n')
	document.write('	<input type="hidden" name="ie" value="windows-1251" />\n')
	document.write('	<input type="text" name="q" size="32" class="query" value="' + query + '" />\n')
	document.write('	<input type="submit" name="sa" value="' + button + '" class="button" />\n')
	document.write('</form>\n')
	document.write('</div>')
}

function str_replace(form_id) {
	var f = document.getElementById(form_id);
	var q = f.q;

	var b = function() {
		if (q.value == '') {
			q.value = init_str;
		};
	};
	var f = function() {
		if (q.value == init_str) {
			q.value = '';
		};
	};
	q.onfocus = f;
	q.onblur = b;
	q.style.cssText = '';
	q.className = 'query';
//	document.write('текст: ' + form_id + ' ' + init_str);
}
