
    var agt=navigator.userAgent.toLowerCase();

    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

function staticize(trigger,logged) {
  if (is_ie5up) {
    if (trigger == true) {
      window.onscroll = staticize;
      window.onresize = staticize;
    }
    setposition(trigger,logged);
  }
}

function setposition(trigger,logged) {
  //if (document.body.clientWidth < 900) {
  //  loginbox.style.left = (document.body.clientWidth + document.body.scrollLeft) - 165;
  //}
  //else {
    loginbox.style.left = 730;
  //}
  loginbox.style.top = document.body.scrollTop + 15;
  if (trigger == true && logged == 0)
   document.login.lusername.focus();
}

function setPointer(theRow, thePointerColor) {
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
}

	function sl(logo,name) {
		window.open('popups/logo.php?logo=' + logo + '&name=' + name, '', 'toolbar=0,menubar=0,scrollbars=no,resizable=no,status=1,location=0,directories=0,copyhistory=0,height=400,width=500');
	}
	
	function chat() {
		var URL = 'popups/chat.php?jUsername=' + document.javachat.jUsername.value + '&jPassword=' + document.javachat.jPassword.value;
		window.open(URL, '', 'toolbar=0,menubar=0,scrollbars=no,resizable=no,status=1,location=0,directories=0,copyhistory=0,height=500,width=775');
	}

	function ad(section, page, user) {
		window.open('http://www.c4u.ee/cbanner.php?id=3&section=' + section + '&page=' + page + '&user=' + user, '', 'toolbar=0,menubar=0,scrollbars=no,resizable=no,status=0,location=0,directories=0,copyhistory=0,height=350,width=600');
	}