/// Begin Basic Library **************************************************** WW_Netscape4 = true; WW_Microsoft = false; WW_oldbrowser = false; WW_setbrowser(); function WW_setbrowser() { // Set Browser Flags if ( navigator.appName != "Netscape" ) { WW_Netscape4 = false; WW_Microsoft = true; } if ( navigator.appVersion < 4 ) { WW_Netscape4 = false; WW_Microsoft = false; WW_oldbrowser = true; } } // End WW_setbrowser() function WW_getlayer(idstring) { // Find layer with given label if (document.all) { return eval("document.all." + idstring); } return eval("document." + idstring); } // End WW_getlayer() function WW_getlayertop(obj) { if (WW_isundefined(obj)) return 0; // IE if (obj.style) { return obj.style.pixelTop; } // NN if (obj.top) { return obj.top; } return 0; } // End WW_getlayertop(obj) function WW_getlayerleft(obj) { if (WW_isundefined(obj)) return 0; // IE if (obj.style) { return obj.style.pixelLeft; } // NN if (obj.left) { return obj.left; } return 0; } // End WW_getlayerleft(obj) function WW_getlayerheight(obj) { if (WW_isundefined(obj)) return 0; // IE if (obj.clientHeight) { return obj.clientHeight; } // NN if (obj.clip.height) { return obj.clip.height; } return 0; } // End WW_getlayerheight(obj) function WW_getlayerwidth(obj) { if (WW_isundefined(obj)) return 0; // IE if (obj.clientWidth) { return obj.clientWidth; } // NN if (obj.clip.width) { return obj.clip.width; } return 0; } // End WW_getlayerwidth(obj) function WW_setlayerwidth(obj,value) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.width = value; } // NN if (obj.clip.width) { obj.clip.width = value; } } // End WW_setlayerwidth(obj,value) function WW_setlayerheight(obj,value) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.height = value; } // MS if (obj.clip.height) { obj.clip.height = value; } } // End WW_setlayerheight(obj,value) function WW_getwindowwidth() { // IE if (document.body.clientWidth) { return document.body.clientWidth; } // NN if (window.innerWidth) { return window.innerWidth; } return 0; } // End WW_getwindowwidth() function WW_getwindowheight() { // IE if (document.body.clientHeight) { return document.body.clientHeight; } // NN if (window.innerHeight) { return window.innerHeight; } return 0; } // End WW_getwindowheight() function WW_setbackgroundcolor(obj,actualcolor) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.backgroundColor = actualcolor; } // NN if (obj.bgColor) { obj.bgColor = actualcolor; } } // End WW_setbackgroundcolor(obj,actualcolor) function WW_getlayerzindex(obj) { if (WW_isundefined(obj)) return 0; // IE if (obj.style) { return obj.style.zIndex; } // NN if (obj.zIndex) { return obj.zIndex; } return 0; } // End WW_getlayerzindex(obj) function WW_layertotop(obj) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.zIndex = 1000; } // NN if (obj.zIndex) { obj.zIndex = 1000; } } // End WW_layertotop(obj) function WW_layertogeneric(obj,amount) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.zIndex = amount; } // NN if (obj.zIndex) { obj.zIndex = amount; } } // End WW_layertogeneric(obj) function WW_layertobottom(obj) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.zIndex = 0; } // NN obj.zIndex = 0; } // End WW_layertobottom(obj) function WW_layershow(obj) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.visibility = "visible"; } // NN if (obj.visibility) { obj.visibility = "visible"; } } // End WW_layershow(obj) function WW_layerhide(obj) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.zIndex = 0; obj.style.visibility = "hidden"; } // NN obj.zIndex = 0; obj.visibility = "hidden"; } // End WW_layerhide(obj) function WW_layerishidden(obj) { if (WW_isundefined(obj)) return true; // IE if (obj.style && obj.style.visibility == 'hidden') { return true; } // NN if (obj.visibility && obj.visibility == 'hide') { return true; } return false; } // End WW_layerishidden(obj) function WW_layershiftto(obj,x,y) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.pixelLeft = x; obj.style.pixelTop = y; } // NN if (obj.moveTo) { obj.moveTo(x,y); } } // End WW_layershiftto(obj,x,y) function WW_layershiftby(obj,deltax,deltay) { if (WW_isundefined(obj)) return; // IE if (obj.style) { obj.style.pixelLeft += deltax; obj.style.pixelTop += deltay; } // NN if (obj.moveBy) { obj.moveBy(deltax,deltay); } } // End WW_layershiftby(obj,deltax,deltay) function WW_eventx(e) { // return x value of event // IE if (window.event.clientX) { return window.event.clientX; } // NN if (e.pageX) { return e.pageX; } } // End WW_eventx(e) function WW_eventy(e) { // return y value of event // IE if (window.event.clientY) { return window.event.clientY; } // NN if (e.pageY) { return e.pageY; } } // End WW_eventy(e)