function insert_id(form_id) {
	var f = document.getElementById(form_id);
	var c = f.cx;

	if (c) {
		c_value = c.value;
		c.value = 'partner-pub-7474906700027458:' + c_value;
	};

	var r1 = document.getElementById('site');
	var r2 = document.getElementById('inet');

	if (r1) {
		r1_value = r1.value;
		r1.value = 'partner-pub-7474906700027458:' + r1_value;
	};
	if (r2) {
		r2_value = r2.value;
		r2.value = 'partner-pub-7474906700027458:' + r2_value;
	};
}

function str_replace(form_id, init_str) {
	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 = 'search';
}

function banners(count) {

	if (count == 'yes') {
// Top100 logo
		document.write('<a href="http://top100.rambler.ru/top100/" target="_blank" rel="nofollow">' +
					   '<img src="http://top100-images.rambler.ru/top100/banner-88x31-rambler-brown2.gif"\n' +
					   'title="Rambler\'s Top100" alt="" width="88" height="31" class="translucent"' +
					   'onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';" /></a>\n');
// Top100 counter
		document.write('<a href="http://www.rambler.ru/srch?set=top100&amp;words=miluti" rel="nofollow">' +
					   '<img src="http://counter.rambler.ru/top100.cnt?1418461" alt="" width="1" height="1" class="transparent" /></a>\n');
// LiveInternet counter
		document.write('<a href="http://www.liveinternet.ru/click" target="_blank" rel="nofollow"><img'+
		' src="http://counter.yadro.ru/hit?t24.2;r'+escape(document.referrer)+((typeof(screen)=="undefined")?"":
		";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
		";"+Math.random()+'" alt="" title="LiveInternet" class="translucent" onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';" /><\/a>');
	} else {
		document.write('<a href="http://top100.rambler.ru/top100/" target="_blank" rel="nofollow">' +
					   '<img src="http://top100-images.rambler.ru/top100/banner-88x31-rambler-brown2.gif"\n' +
					   'title="Rambler\'s Top100" alt="" width="88" height="31" class="translucent"' +
					   'onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';" /></a>\n');
		document.write('<a href="http://www.liveinternet.ru/click" target="_blank" rel="nofollow">' +
					   '<img src="/_images/li_logo.gif" alt="" title="LiveInternet" class="translucent"' +
					   'onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';"></a>');
	}
}


var hT, sT;
function SmoothShow(objId, x){
	var obj = document.getElementById(objId);
	op = (obj.style.opacity)?parseFloat(obj.style.opacity):parseInt(obj.style.filter)/100;

	if(op < x){
		clearTimeout(hT);
		op += 0.05;
		obj.style.opacity = op;
		obj.style.filter='alpha(opacity='+op*100+')';
		sT=setTimeout('SmoothShow(\''+objId+'\', '+x+')',50);
	}
}
function SmoothHide(objId, x){
	var obj = document.getElementById(objId);
	op = (obj.style.opacity)?parseFloat(obj.style.opacity):parseInt(obj.style.filter)/100;

	if(op > x){
		clearTimeout(sT);
		op -= 0.05;
		obj.style.opacity = op;
		obj.style.filter='alpha(opacity='+op*100+')';
		hT=setTimeout('SmoothHide(\''+objId+'\', '+x+')',50);
	}
}
