/*
 * Invoke this after setting up the DIV that is to float
 */
var menu_system = function() {
/*
 * Find out how much space we have
 */
function e2getwidth() {
    if( typeof( window.innerWidth ) == 'number' )
//Non-IE
       return window.innerWidth;
    else
    if( document.documentElement
     &&  document.documentElement.clientWidth)
//IE 6+ in 'standards compliant mode'
        return document.documentElement.clientWidth;
    else
    if( document.body
     &&  document.body.clientWidth)
//IE 4 compatible
        return document.body.clientWidth;
    return 600; /* Long stop */
}
function e2getheight() {
    if( typeof( window.innerHeight ) == 'number' )
//Non-IE
       return window.innerHeight;
    else
    if( document.documentElement
     && document.documentElement.clientHeight )
//IE 6+ in 'standards compliant mode'
        return document.documentElement.clientHeight;
    else
    if( document.body
     && document.body.clientHeight )
//IE 4 compatible
        return document.body.clientHeight;
    return 400; /* Long stop */
}
if (!document.layers)
    document.write('</div>')
function ini_X()
{
    return (e2getwidth() - 520)/2;
}
function ini_Y()
{
    return 0;
}
function float_menu()
{
var d = document;

function ml(id)
{
var el = d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];

    if (d.layers)
        el.style = el;
    el.set_pos = function(x,y){
            this.style.left = x;
            this.style.top = y;
        };
    el.x = ini_X();
    el.y = ini_Y();
    return el;
}
window.stay_top=function()
{
    obj.y = d.body.scrollTop + ini_Y();
    obj.x = ini_X();
    obj.set_pos(obj.x, obj.y);
    setTimeout("stay_top()", 10);
}
    obj = ml("div_stay_top");
    stay_top();
}
float_menu();
}
menu_system();
