var myWidth = 0, myHeight = 0;
var threetop;
var nowshowing;

IE=document.all;
NS=document.layers;
threetop = 155;
if (IE)
{
    threetop = 155;
}

function dshow (w) {
    if (document.getElementById) {
        var peek = document.getElementById(w);
        peek.style.visibility = 'visible';
        peek.style.zIndex = 50;
	// setTimeout("nowShowing('"+w+"')",1000);
    }
}

function nowShowing(w) {
    nowshowing = w;
    document.getElementById('bug').innerHTML='Showing:'+nowshowing;
}

function dhide (w) {
    document.getElementById('bug').innerHTML='Hiding:'+nowshowing;
    nowshowing = 'Nothing';
    setTimeout("hide('"+w+"')",50);
}

function hide (w) {
    if (document.getElementById && nowshowing != w) {
        var peek = document.getElementById(w);
        peek.style.visibility = 'hidden';
        peek.style.zIndex = 1;
	document.getElementById('bug').innerHTML='F'+nowshowing;
  }
}

function alertSize() {
    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    // window.alert( 'Width = ' + myWidth );
    // window.alert( 'Height = ' + myHeight );
    if (myHeight < 599) {
        window.resizeTo(840 , 800);
    }
}

function getScrollXY() {
    var scrOfX = 0, scrOfY = 0;
    if( typeof( window.pageYOffset ) == 'number' ) {
        //Netscape compliant
        scrOfY = window.pageYOffset;
        scrOfX = window.pageXOffset;
    } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        //DOM compliant
        scrOfY = document.body.scrollTop;
        scrOfX = document.body.scrollLeft;
    } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        //IE6 standards compliant mode
        scrOfY = document.documentElement.scrollTop;
        scrOfX = document.documentElement.scrollLeft;
    }
    //  return [ scrOfX, scrOfY ];
    //  var zeek = document.getElementById('zx');
    //  var zyk  = document.getElementById('zy');
    //  var zyk  = document.getElementById('report');
    var sidm = document.getElementById('shortcutcage');
    //  zeek.innerHTML = scrOfX;
    //  zyk.innerHTML = scrOfY;
    //  zyk.innerHTML = myHeight;
    document.getElementById('scbgcage').top=scrOfY+104+'px';
    sidm.style.top = scrOfY+112+'px';
    document.getElementById('bug').innerHTML=scrOfY;
}
