// JavaScript Document
var target_x2 = 6;
var target_y2 = -135;

var has_inner2 = typeof(window.innerWidth) == 'number';
var has_element2 = document.documentElement && document.documentElement.clientWidth;

var fm_id='floatdiv2';
var floating_menu2 =
    document.getElementById
    ? document.getElementById(fm_id)
    : document.all
      ? document.all[fm_id]
      : document.layers[fm_id];

var fm_shift_x2, fm_shift_y2, fm_next_x2, fm_next_y2;

function move_menu2()
{
    if (document.layers)
    {
        floating_menu2.left = fm_next_x2;
        floating_menu2.top = fm_next_y2;
    }
    else
    {
        floating_menu2.style.left = fm_next_x2 + 'px';
        floating_menu2.style.top = fm_next_y2 + 'px';
    }
}

function compute_shifts2()
{
    fm_shift_x2 = has_inner2
        ? pageXOffset
        : has_element2
          ? document.documentElement.scrollLeft
          : document.body.scrollLeft;
    if (target_x2 < 0)
        fm_shift_x2 += has_inner2
            ? window.innerWidth
            : has_element2
              ? document.documentElement.clientWidth
              : document.body.clientWidth;

    fm_shift_y2 = has_inner2
        ? pageYOffset
        : has_element2
          ? document.documentElement.scrollTop
          : document.body.scrollTop;
    if (target_y2 < 0)
        fm_shift_y2 += has_inner2
            ? window.innerHeight
            : has_element2
              ? document.documentElement.clientHeight
              : document.body.clientHeight;
}

function float_menu2()
{
    var step_x2, step_y2;

    compute_shifts2();

    step_x2 = (fm_shift_x2 + target_x2 - fm_next_x2) * .07;
    if (Math.abs(step_x2) < .5)
        step_x2 = fm_shift_x2 + target_x2 - fm_next_x2;

    step_y2 = (fm_shift_y2 + target_y2 - fm_next_y2) * .07;
    if (Math.abs(step_y2) < .5)
        step_y2 = fm_shift_y2 + target_y2 - fm_next_y2;

    if (Math.abs(step_x2) > 0 ||
        Math.abs(step_y2) > 0)
    {
        fm_next_x2 += step_x2;
        fm_next_y2 += step_y2;
        move_menu2();
    }

    setTimeout('float_menu2()', 20);
};

compute_shifts2();
if (document.layers)
{
    // Netscape 4 cannot perform init move
    // when the page loads.
    fm_next_x2 = 0;
    fm_next_y2 = 0;
}
else
{
    fm_next_x2 = fm_shift_x2 + target_x2;
    fm_next_y2 = fm_shift_y2 + target_y2;
    move_menu2();
}
float_menu2();
