DOCJSLIB Version 4.0: The Page Watermark Code - www.docjavascript.com
The Page Watermark Code
var windowWidth= 0;
var windowHeight= 0;
var pageScrollLeft= 0;
var pageScrollTop= 0;
var imageWidth= 147;
var imageHeight= 17;
var rightSpacer= 17;
var bottomSpacer= 25;
function waterMark(){
if (navigator.appVersion.indexOf("Mac") == -1){
oldWindowWidth= windowWidth;
oldWindowHeight= windowHeight;
oldPageScrollLeft= pageScrollLeft;
oldPageScrollTop= pageScrollTop;
windowWidth = docjslib_getWindowWidth();
windowHeight = docjslib_getWindowHeight();
pageScrollLeft = docjslib_getPageScrollLeft();
pageScrollTop = docjslib_getPageScrollTop();
if ((windowHeight != oldWindowHeight)||(windowWidth !=
oldWindowWidth)||(pageScrollLeft != oldPageScrollLeft)||
(pageScrollTop != oldPageScrollTop)){
docjslib_setPosFromTop("docjslib", windowHeight + pageScrollTop -
(imageHeight + bottomSpacer));
docjslib_setPosFromLeft("docjslib", windowWidth + pageScrollLeft -
(imageWidth + rightSpacer));
var topZ = docjslib_findHighestZ();
docjslib_setZposition("docjslib", topZ);
}
}
}
docjslib_makeLinkedImage("docjslib", // id
"docjslib.gif", // image URL
"https://www.webreference.com/js", // link URL
27, // height
147, // width
"Click here for all Doc JavaScript Columns", // alternative
1000, // position from left
1000, // position from top
true, // visibility
0); // z index
docjslib_doThisCommandEveryIntervalMS("waterMark()", 100);
Produced by Yehuda Shiran and Tomer Shiran
Created: January 4, 1999
Revised: January 4, 1999
URL: https://www.webreference.com/js/column33/code3.html