// JScript File
<!--
    function topleftWindow(win) {
        var win = ( !(win==undefined) ? win : window );

        win.moveTo(0,0);
    }

    function maxWindow(win) {
        if ( !win ) var win = window;
        
        if (document.all)
        {
          win.resizeTo(screen.availWidth,screen.availHeight);
        }

        else if (document.layers || document.getElementById)
        {
          if (win.outerHeight < screen.availHeight || win.outerWidth < screen.availWidth)
          {
            win.outerHeight = screen.availHeight;
            win.outerWidth = screen.availWidth;
          }
        }
    }
    
    function adjWindow(win) {
        if ( !win ) var win = window;

        var pelm = null;
        var pfe = null;
        var fe = ( win ? win.frameElement :null );
        
        if ( fe ) {
            var id = fe.id;
            var pwin = win.parent;
            
            if ( pwin ) {
                pelm = pwin.document.getElementById(id);
                pfe = pwin.frames(id);

                pelm.style.height = parseInt(pfe.document.body.scrollHeight);
                pelm.style.width = parseInt(pfe.document.body.clientWidth);
            }
        } /*else {
            win.resizeTo(win.document.body.clientWidth, win.document.body.scrollHeight);
        }*/
    }

    function adjWindows(win) {
        if ( !win ) var win = window;
        
        while ( win != window.top ) {
            adjWindow(win);
            win = win.parent;
        }
       // adjWindow(window.top);
    }
   
    function getWindowInnerHeight(win) {
        if ( !win ) var win = window;
        return parseInt(win.document.body.clientHeight);
    }

    function getWindowInnerWidth(win) {
        if ( !win ) var win = window;
        return parseInt(win.document.body.clientWidth);
    }

    function getWindowScrollHeight(win) {
        if ( !win ) var win = window;
        return parseInt(win.document.body.scrollHeight);
    }

    function getWindowScrollWidth(win) {
        if ( !win ) var win = window;
        return parseInt(win.document.body.scrollWidth);
    }
    
    function getElementLeft(elm) {
        var oLeft = null;
        
        if ( elm && elm.offsetLeft ) {
            oLeft = ( ( elm.offsetLeft.toString().length>0 ) ? parseInt(elm.offsetLeft) : 0 );
            while ( elm.offsetParent ) {
                var elm = elm.offsetParent;
                oLeft += ( ( elm.offsetLeft.toString().length>0 ) ? parseInt(elm.offsetLeft) : 0 );
            }
        }
        return oLeft;
    }

    function getElementMaxWidth(elm) {
        var sWidth = null;
        var mWidth = null;
        var oLeft = ( elm ? getElementLeft(elm) : null );
        
        if ( elm && elm.offsetParent ) {
            var elm = elm.offsetParent;
            sWidth = ( ( elm.scrollWidth.toString().length>0 ) ? parseInt(elm.scrollWidth) : 0 );
        }
        if ( sWidth && oLeft ) mWidth = sWidth-oLeft;
        
        return mWidth;
    }

    function DocumentCursorObject() {
	var baseElm = ( arguments.length>0 ? document.getElementById(arguments[0]) : document.body ) ;
	var baseElmStyleCursor = "";

	var items = new Array();

	this.initCursorInUse = false;
	this.setCursorInUse = false;
	this.clrCursorInUse = false;

	this.initCursor = function() {
		this.initCursorInUse = true;

		if ( baseElm ) {
			items = [];

			baseElmStyleCursor = baseElm.style.cursor;

			for ( var i=0; i<baseElm.all.length; i++ ) {
				items[items.length] = { "docElm" : baseElm.all(i), "styleCursor" : baseElm.all(i).style.cursor } ;
			}
		}

		this.initCursorInUse = false;
	}

    	this.setCursor = function(cs_name) {
		var setCursorTimeout = function() {
			this.setCursor(cs_name);
		}

		if ( !(this.initCursorInUse) && !(this.clrCursorInUse) ) {
			this.setCursorInUse = true;

			if ( baseElm ) {
				baseElm.style.cursor = cs_name;

				for ( var i=0; i<baseElm.all.length; i++ ) {
					baseElm.all(i).style.cursor = cs_name;
				}
			}

			this.setCursorInUse = false;
		} else {
			setCursorTimeout(fnTimeout,0);
		}
	}

    	this.clrCursor = function() {
		var clrCursorTimeout = function() {
			this.clrCursor();
		}

		if ( !(this.initCursorInUse) && !(this.setCursorInUse) ) {
			this.clrCursorInUse = true;

			for ( var i=0; i<items.length; i++ ) {
				items[i].docElm.style.cursor = items[i].styleCursor;
			}

			if ( baseElm ) baseElm.style.cursor = baseElmStyleCursor;

			this.clrCursorInUse = false;
		} else {
			clrCursorTimeout(fnTimeout,0);
		}
    	}

	setTimeout(this.initCursor,0);
    }

// --> 
