function jsOpenWnd(show_instruct, width, height)
{
	if (typeof width == "undefined") {
		width = 700;
	}
	if (typeof height == "undefined") {
		height = 650;
	}

	p="height="+height+",width="+width+",toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
	hWnd=window.open(show_instruct, "displayWindow", p);
	hWnd.focus();
}
function comp_table(path)
{
	p="height=500,width=780,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
	hWnd=window.open(path, "comp_table", p);
	hWnd.focus();
}

function comp_table2(path)
{
	p="height=450,width=550,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no";
	hWnd=window.open(path, "comp_table", p);
	hWnd.focus();
}


function vacancies(path)
{
	p="height=500,width=780,toolbar=no,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no";
	hWnd=window.open(path, "vacancies", p);
	hWnd.focus();
}
function contacts(path)
{
	p="height=500,width=780,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
	hWnd=window.open(path, "comp_table", p);
	hWnd.focus();
}
function news(path)
{
	p="height=500,width=780,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no";
	hWnd=window.open(path, "comp_table", p);
	hWnd.focus();
}
function smart_settings(path)
{
	p="height=500,width=780,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no";
	hWnd=window.open(path, "comp_table", p);
	hWnd.focus();
}
function premium_content(show_instruct)
{
	p="height=650,width=550,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no";
	hWnd=window.open(show_instruct, "premium_content", p);
	hWnd.focus();
}


// Banner showing
var divId = 'div_bottom_banner';
var tableId = 'table_bottom_banner'
var bWidth = 700;
var bHeight = 35;
var shift = 1;
var leftPos;

function start()
{
    setInterval("roll()", 30);
    vAlignment();
    document.getElementById(divId).style.visibility = 'visible';
}

function vAlignment()
{
    document.getElementById(divId).style.left = 0;
    if (document.all)
        document.getElementById(divId).style.top = (document.body.scrollTop + document.body.clientHeight - bHeight);
    else
        document.getElementById(divId).style.top = (document.body.clientHeight - bHeight);
    document.getElementById(divId).style.width = document.body.clientWidth;
}

function roll()
{
    if (document.all || document.getElementById)
    {
        leftPos = parseInt(document.getElementById(tableId).style.left);
        document.getElementById(tableId).style.left = leftPos - shift;
        if (Math.abs(leftPos) >= bWidth)
        {
            document.getElementById(tableId).style.left = (-shift);
        }
    }
}




function show_bottom_banner(bannerBody)
{
    var position;
    if (window.attachEvent)
    {
        window.attachEvent("onscroll", vAlignment);
        window.attachEvent("onresize", vAlignment);
        position = "absolute";
    }
    else
    {
        window.addEventListener("resize", vAlignment, 1);
        position = "fixed";
    }

    document.write('<div id="' + divId + '" onMouseout="shift=1" onMouseover="shift=0" style="visibility:hidden;overflow:hidden;position:' + position + ';left:0px;width:' + document.body.clientWidth + 'px;height:' + bHeight + 'px;z-index:100;">');
    document.write('<table cellspacing=0 cellpadding=0 id="' + tableId + '" style="position:absolute;left:0;top:0;width:' + (bWidth * 4) + 'px"><tr><td>' + bannerBody + '</td></table></div>');

    setTimeout("start()", 1000);
}


