// Copyright 23 October 2000, Cavalry Outpost Publications.

// This multifunction program:
//      1.0 Positions a hyperlink "Up-Arrow.gif" on the lower right hand
//      margin of the hosted page, out of the view as the host page is
//      loaded. Scrolling down the host page enables the display of the
//      "Up Arrow.gif". Clicking on the image, repositions the host page
//      to the original position.

// *********************************************************************
// **********     Program Name = Goto_Top.js Ver 03.11.15     **********
// *********************************************************************

// 1.0 DEFINE "Up_Arrow.gif" DISPLAY POSITION PARAMETERS
var image_Ypos = 650;
var image_width = 125;
var image_height = 15;
var left_from_corner = 0;
var up_from_corner = 0;
var JH = 0;
var JW = 0;
var JX = 0;
var JY = 0;
var left = image_width + left_from_corner + 25;
var up = image_height + up_from_corner + 25;

// 2.0 DETERMINE BROWSER TYPE and DISPLAY "Up_Arrow.gif" IMAGE
function watermark() {
        if(navigator.appName == "Netscape") {
                var wm = document.jsbrand;
                JH = window.innerHeight;
                JW = window.innerWidth;
                JX = window.pageXOffset;
                JY = window.pageYOffset;
                wm.top = (JH + JY - up);
                wm.left = (JW + JX - left);
                wm.visibility = "hide";
                if (JY > image_Ypos) {
                        wm.visibility= "show";
                }
        }
        if (navigator.appVersion.indexOf("MSIE") != -1) {
                var wm = document.all.jsbrand;
                if (navigator.appVersion.indexOf("Mac") == -1) {
                        JH = document.body.clientHeight;
                        JW = document.body.clientWidth;
                        JX = document.body.scrollLeft;
                        JY = document.body.scrollTop;
                        wm.style.top = (JH + JY - up);
                        wm.style.left =(JW + JX - left);
                        wm.style.display = "none";
                        if (JY > image_Ypos) {
                                wm.style.display = "";
                        } 
                }
        }
}

// 3.0 DEFINE "Up_Arrow.gif" REFRESH RATE (.05 seconds)
setInterval("watermark()",50);

