function show(object) {
    if (document.getElementById && document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='visible';
         document.getElementById(object).style.display='block';
    }
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all) {
        document.all[object].style.zIndex = 100;
        document.all[object].style.visibility = 'visible';
    }
}
function hide(object) {
    if (document.getElementById && document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='hidden';
         document.getElementById(object).style.display='none';
    }
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}
function showhide(object)
{
    if (document.getElementById && document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='visible';
         if (document.getElementById(object).style.display=='none')
         document.getElementById(object).style.display='block';
         else
         document.getElementById(object).style.display='none';

    }
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all) {
        document.all[object].style.zIndex = 100;
        if (document.all[object].style.visibility == 'visible')
        document.all[object].style.visibility = 'visible';
        else
        document.all[object].style.visibility = 'hidden';
    }
}

function norm(obj) {
    if (document.getElementById){
//     obj.style.fontWeight='normal';
     obj.style.color='black';

    }
}


function bold(obj) {
	if (document.getElementById) {
		if (last) norm(last);
		obj.style.fontWeight='bold';
		obj.style.color='blue';
		last = obj;
     }
}
function boldshow(obj,mes) {
	if (document.getElementById) {
		if (last) {norm(last)}
		obj.style.fontWeight='bold';
		show(mes)
		last = obj;
		lastmess= mes
     }
}
function addthread(ur)
{
var wnd=window.open(ur,'addthread','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=yes,status=no,width=600,height=600','true');
wnd.focus();
}

function add_t(ur)
{
var wnd2=window.open(ur,'thr','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=500,height=430','true');
wnd2.focus();
}

function wo2(ur)
{
var wnd2=window.open(ur,'thr','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=yes,status=no,width=500,height=400','true');
wnd2.focus();
}

function wo(ur)
{
var wnd2=window.open(ur,'mess_thr','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=yes,status=no,width=500,height=400','true');
wnd2.focus();
}

function awt(ur)
{
var wndt=window.open(ur,'themese','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=400,height=180','true');
wndt.focus();
}

function awthr(ur)
{
var wndthrr=window.open(ur,'thread','toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no,status=no,width=485,height=170','true');
wndthrr.focus();
}
function awr(ur)
{
var wndr=window.open(ur,'category','toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no,status=no,width=485,height=190','true');
wndr.focus();
}
function lnkt(ur)
{
var wndlnk=window.open(ur,'lnkt','toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no,status=no,width=485,height=190','true');
wndlnk.focus();
}

function alrtv(ur)
{
var wndalrtv=window.open(ur,'alrtv','toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no,status=no,width=300,height=150','true');
wndalrtv.focus();
}

function awm(ur)
{
var wndm=window.open(ur,'thr','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=500,height=480','true');
wndm.focus();
}
function awmm(ur)
{
	var isOpera = (navigator.userAgent.indexOf("Opera") > 0) ;
	var isCompatible = (!isOpera && navigator.appName == 'Microsoft Internet Explorer') ;

	if (isCompatible)
	{
		var wndmm=window.open(ur,'answer','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=520,height=430','true');
		wndmm.focus();
	}
	else
	{
		var wndmm=window.open(ur,'','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=500,height=430','true');
		wndmm.focus();
	}
}

function articles(ur)
{
var warticles=window.open(ur,'articles','toolbar=no,location=no,directories=no,status=yes,resizable=yes,scrollbars=no,status=no,width=500,height=310','true');
warticles.focus();
}

function close_reload()
{
window.close();self.opener.location.reload(true);
}

function reload()
{
window.opener.location.reload(true);
}
function reload2()
{
if (self.opener){
//window.opener.location.reload();
self.opener.focus();
}
else
{
var tg=window.open("/forum/index.php","wm","");
tg.focus();
}
}
var last = null;
var lastmess = null;

