<!--

function wind(address, name, width, height){
	wind=open(address, name, 'toolbar=no,scrollbars=no,status=no,height='+height+',width='+width);
	wind.focus();
}

function hintwnd(address, header, width, height){
	hwindow=open(address, header, 'toolbar=no,scrollbars=yes,status=no,height='+height+',width='+width);
	hwindow.focus();
}


function dialog(_with, _nick){
    dlg=open('dialog.php?with='+_with+'&nick='+_nick, 'dialog'+_with, 'toolbar=no,scrollbars=no,status=yes,height=500,width=400');
	dlg.focus();
}

function help(name){
	helpwnd=open('onlinehelp.php?name='+name, 'help', 'toolbar=yes,scrollbars=yes,status=yes,resizable=yes,height=400,width=400');
	helpwnd.focus();
}

ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
if(navigator.userAgent.indexOf('Mac')>0){
	ns4=false;
	ie4=false;
}

if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0 || navigator.userAgent.indexOf('MSIE 6')>0 || navigator.userAgent.indexOf('Opera 6')) {
		ie5 = true;
	} else {
		ie5 = false;
	}
} else {
	ie5 = false;
}
var x = 0;
var y = 0;
var x_ = 0;
var y_ = 0;
var show = 0;
var sw = 0;
var cnt = 0;
var m_sw = 0;
var m_show = 0;
var m_cnt = 1;
var menu = 1;
var tr = 1;
var tip = 1;
var off = 1;
var g_title = '';
var g_text = '';

function init_layers()
{
	if ( (ns4) || (ie4) )
	{
		if (ns4) tip = document.tipDiv;
		if (ie4) tip = tipDiv.style;
        if (ns4) menu = document.menuDiv;
		if (ie4) menu = menuDiv.style;
        if (ns4) off = document.offDiv;
		if (ie4) off = offDiv.style;
		document.onmousemove = mouseMove;
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
	}
}

function disposeTip() {
	if ( (ns4) || (ie4) ) {
		if (show == 0) 	{
			moveTo(tip, x - 40, y + 15);
			showObject(tip);
			show = 1;
		}
	}
}

function hideTip() {
	if ( cnt >= 1 )
    	sw = 0;
	if ( (ns4) || (ie4) ) {
		if ( sw == 0 ) {
			show = 0;
            moveTo(tip, 0, 0);
			hideObject(tip);
		} else
			cnt++;
	}
}

function mouseMove(e) {
	x_ = 0;
    y_ = 0;
	if (ns4) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=document.body.scrollTop + event.y;}
	if (show)
		moveTo(tip, x-40, y + 15);
}

function tipWrite(txt) {
        if (ns4) {
        	var lyr = document.tipDiv.document;
            lyr.write(txt);
            lyr.close();
        }else if (ie4)
			document.all["tipDiv"].innerHTML = txt;
}

var m_timer = 0;

function tryHideMenu(){
	m_timer = setTimeout('hideMenu()', 500);
}

function cancelMenu(){
	clearTimeout(m_timer);
}

function cancelShowMenu(){
	clearTimeout(m_timer);
}

function menuWrite(txt) {
        if (ns4) {
                var lyr = document.menuDiv.document;
                lyr.write(txt);
                lyr.close();
        }
        else if (ie4)
        	document.all["menuDiv"].innerHTML = txt;
}

function disposeMenu(){
	x_ = 0;
    y_ = 0;
    if ( (ns4) || (ie4) ) {
		if (m_show == 0) 	{
            menuDiv.style.display='block';
            m_cnt = 0;
        	moveTo(menu, x - 30, y - 5);
            moveTo(off, x_, y_);
//            showObject(off);
			showObject(menu);
			m_show = 1;
		}
	}
}

function showGlobalMenu(){
	if (show == 1)
    	hideTip();
	showMenu(g_title, g_text);
}

function tryShowMenu(title, text){
	g_title = title;
    g_text = text;
	m_timer = setTimeout('showGlobalMenu()', 500);
}

function go(url){
	if (m_show == 0) location.href=url;
}

function hideMenu() {
	if (m_show == 0)
    	return;
/*	if ( m_cnt >= 1 )
    	m_sw = 0;*/
	if ( (ns4) || (ie4) ) {
		if ( m_sw == 0 ) {
			m_show = 0;
            moveTo(menu, 0, 0);
			hideObject(menu);
            hideObject(off);
		} else
			m_cnt++;
	}
}

function showObject(obj) {
        if (ns4)
        	obj.visibility = "show"
        else if (ie4)
        	obj.visibility = "visible"
}

function hideObject(obj) {
        if (ns4)
        	obj.visibility = "hide"
        else if (ie4)
        	obj.visibility = "hidden"
}

function moveTo(obj,xL,yL) {
        obj.left = xL
        obj.top = yL
}

function treeExpand(node_id) {
	
}

//-->
