function forum_quote(mess_id) {
	mess_obj = document.getElementById('mess_' + mess_id);
	if(!mess_obj)
		return false;


if (body_obj = document.getElementById('comment_editor')) {
		var form   = document.getElementById('comment_add_form');
		if(form)
			form.action = '/blogs20/commentAdd/' + mess_id + '/';
}
	if(!body_obj) body_obj = document.getElementById("blg20_content");
	if(!body_obj) body_obj = document.getElementById("message");
	
	
	if(!body_obj)
		return false;


if (window.getSelection){
 sel_str = window.getSelection();
}else if (document.getSelection){
 sel_str = document.getSelection();
}else if (document.selection){
 sel_str = document.selection.createRange().text;
}else {
			sel_str = "";
		}

	if(mess_obj.textContent)
		qmess = mess_obj.textContent;
	else
		qmess = mess_obj.outerText;

if(qmess.replace(sel_str, "") != qmess) {
				qmess = sel_str;
			}	
if(qmess) {
		if(body_obj.value.length == 0)
			body_obj.value += "[quote]" + qmess + "[/quote]\r\n";
		else
			body_obj.value += "\r\n[quote]" + qmess + "[/quote]\r\n";
	}
			
			body_obj.focus();
	return false;
}

function SearchForm(id)
{	// функция меняет содержимое span-а для вывода в нем формы.

	document.getElementById('href_razd_'+id).style.display = 'none';
	document.getElementById('form_razd_'+id).style.display = 'inline';
	return false;

	var oForm = document.createElement('FORM');
	oForm.style.display = 'inline';
	oForm.style.margin = '0px';
	oForm.style.padding = '0px';
	oForm.style.marginLeft = '10px';
//	oForm.style.border = '1px solid';

	oForm.method = 'GET';
	oForm.action = '/search/';

	var oInput1 = document.createElement('INPUT');
	var oInput2 = oInput1.cloneNode(true);
	var oInput3 = oInput1.cloneNode(true);

	oInput1.type = 'hidden';
	oInput1.name = 'razd';
	oInput1.value = id;

	oInput2.type = 'text';
	oInput2.size = '20';
	oInput2.name = 'q';
	oInput2.value = '';
	oInput2.style.border = '1px solid';
	oInput2.style.height = '18px';
	

//<input type="image" src="/images/button.gif" alt="Найти" style="vertical-align: top; display: inline;"/>

	oInput3.type = 'image';
	oInput3.src = '/images/button.gif';
	oInput3.alt = "Найти";
	oInput3.style.verticalAlign = 'top';
	oInput3.style.display = 'inline';
	oInput3.style.marginTop = '1px';

	oForm.appendChild(oInput1);
	oForm.appendChild(oInput2);
	oForm.innerHTML += ' '
	oForm.appendChild(oInput3);
	var oSpan = document.getElementById('article_razd_'+id);
	oSpan.innerHTML = '';
	oSpan.appendChild(oForm);
	return false;
}

jsHover = function() {
		if (document.getElementById("nav")) { 
		var hEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0, len=hEls.length; i<len; i++) {
			hEls[i].onmouseover=function() { this.className+=" jshover"; }
			hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
		}}
	}
	if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);