//
// Dashboard
//
    var origWidth
    var origHeight
	var NS4 = navigator.appName.indexOf( "Netscape" ) != -1
    
    if ( NS4 )
    {
	    origWidth = window.innerWidth
	    origHeight = window.innerHeight
	    window.onresize = NSResize
    }
    else
    {
        window.onresize = onResizeFunction
    }
    
    function NSResize()
    {
     	if ( NS7 || NS6 || ( NS4 && ( HP || Sun ) ) )
    	{
    		window.location.reload()
    	}
    	else
    	{
    		if ( isAHTMLDisplayed ) // Appearance HTML is being displayed
    		{
    			// no sizing for netscape ... it's done during page load(getAppletWidth)
    		}
    		else // handle regularily
    		{
	    		if ( window.innerWidth - 24 > 5 )
	    		{
					if ( typeof( window.document.applets.Dashboard ) != "undefined" )
					{
				    	document.Dashboard.setSize( window.innerWidth - 24, 18 )
				    	window.scroll( 0, 0 )
				    }
				}
			}
		}
   }
	
    function onLoadFunction()
    {
		pageLoaded = true

    	if ( !( isMac && NS4 ) )
    	{
			if ( typeof( window.document.applets.Dashboard ) != "undefined" )
			{
        		onResizeFunction()
			}
		}

		executeAtlasFunction( 'AtlasAutoSync', document.location )
		saveAtlasURL()
		
		return false
    }
    
    function onResizeFunction()
    {
		if ( typeof( window.document.applets.Dashboard ) != "undefined" )
		{
	        if ( NS4 )
	        {
	        	if ( !isMac )
	        	{
	        		if ( isAHTMLDisplayed ) // Appearance HTML is being displayed
	        		{
	        			// no sizing done for netscape... it's done during page load (getAppletWidth)
	        		}
	        		else // handle regularily
	        		{
	        			if ( window.innerWidth - 24 > 5 )
	        			{
							if ( typeof( window.document.applets.Dashboard ) != "undefined" )
							{
		        				window.document.applets.Dashboard.setSize( window.innerWidth - 24, 18 )
		        				window.scroll( 0, 0 )
		        			}
	        			}
	        		}
	        	}
	        }
	        else
	        {
				if ( isAHTMLDisplayed ) // Appearance HTML is being displayed
				{
					window.document.applets.Dashboard.width = "100%";
				}
				else // handle regularily
				{
	        		if ( window.document.body.clientWidth -
	           				window.document.body.leftMargin -
							window.document.body.rightMargin > 5 )
					{
					    window.document.applets.Dashboard.width = 
					    		window.document.body.clientWidth -
					   			window.document.body.leftMargin -
					    		window.document.body.rightMargin
					}
				}
			}
 		}

        return false
    }
    
    function getAppletWidth()
    {
        var appSize

		/*        
        if ( NS4 )
        {
            appSize = window.innerWidth - 24
        }
        else
        {
            appSize =
            	window.document.body.clientWidth -
            	window.document.body.leftMargin -
            	window.document.body.rightMargin
        }
        */
        
        if ( !( NS4 || NS6 || NS7 ) )
        {
			appSize = 1600;
		}
		else
		{
			if ( NS6 || NS7 )
				appSize = window.document.widthimage.width;
			else
			{
				if ( isAHTMLDisplayed )
				{
					appSize = ns4NavWidth;
				}
				else
				{
					appSize = window.innerWidth - 24;
				}
			}
		}
			
		return appSize
    }
    
    function menu_callback( theURL, theTarget )
    {
	    if ( !pageLoaded )
	    {
	    	return
	    }

		if ( __LeavePage == "" || ( eval( __LeavePage + "( '" + theURL + "', '" + theTarget + "')" ) ) )
		{
        	openURL( theURL, theTarget )
        }
    }

