

function on(nos) {
        if (document.images) {
        document[nos].src = eval(nos + "on.src"); } }


function off(nos) {
        if (document.images) {
        document[nos].src = eval(nos + "off.src"); } }

var head = new Array();
var menu = new Array();

for(i=1;i<=10;i++) {
        head[i] = 0; menu[i] = 0;
}

function newlayer(text, id, t, l) {
        var strng="<div id=menu" + id + " style=\"position:absolute; z-index:50; top:" + t + ";left:" + l + ";visibility:hidden;width:100;filter:alpha(opacity=100);\" onmouseover=\"menu[" + id + "]=1;\" onmouseout=\"turn('" + id + "',0);menu[" + id + "]=0;\">" + text + "</div>";
        document.write(strng);  }

function turn(id, mode) {
        if(mode) eval("setTimeout(\"turnon(" + id + ", " + mode + ");\",100)")
        else eval("setTimeout(\"turnoff(" + id + ", " + mode + ");\",100)")
}

function turnon(id, mode){
        if(head[id])
                eval("document.getElementById('menu" + id + "')").style.visibility = 'visible'
}

function turnoff(id, mode){
        if(!menu[id] && !head[id])
        eval("document.getElementById('menu" + id + "')").style.visibility = 'hidden';
}


function change_bg (p_object, p_link) {
    if (p_link == true) {
        p_object.style.backgroundImage = "url(/vsaa/images/s_header_bg.gif)";
    } else {
        p_object.style.backgroundImage = "";
    }

        return true;
}


function change_bg2 (p_object, p_link) {
    if (p_link == true) {
        p_object.style.backgroundColor = "#B6CFE3";
    } else {
        p_object.style.backgroundColor = "#F0F5F9";
    }

        return true;
}

function wopen(url, name, w, h)
{
  // Fudge factors for window decoration space.
  // In my tests these work well on all platforms & browsers.
  w += 32;
  h += 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  // IE5 and other old browsers might allow a window that is
  // partially offscreen or wider than the screen. Fix that.
  // (Newer browsers fix this for us, but let's be thorough.)
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=yes, resizable=yes');
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'width='+width+',height='+height+',scrollbars=1,left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
