 
 
 
 
 

 




 
var wptheme_DebugUtils = {
    // summary: Collection of utilities for logging debug messages.
    enabled: false, 
    log: function ( /*String*/className, /*String*/message ) {
            // summary: Logs a debugging message, if debugging is enabled.
            // className: the javascript class name or function name which is logging the message
            // message: the message to log
            if ( this.enabled ) {
                message = className + " ==> " + message;
                if ( typeof( console ) == "undefined" ) {
                        console.log( message );
                }
                else {
                        //better alternative for browsers that don't support console????
                        alert( message );
                }
            }    
    } 
}
var wptheme_HTMLElementUtils = {
	// summary: Collection of utility functions useful for manipulating HTML elements in a cross-browser fashion.
	className: "wptheme_HTMLElementUtils",
	_debugUtils: wptheme_DebugUtils,
    _uniqueIdCounter: 0,
	getUniqueId: function () {
		// summary: Generates a unique identifier (to the current page) by appending a counter to a set prefix.
		//		A page refresh resets the unique identifier counter.
		// returns: a unique identifier
		var retVal = "wptheme_unique_" + this._uniqueIdCounter;
		this._uniqueIdCounter++;
		return retVal;	// String
	},
	sizeToViewableArea: function ( /*HTMLElement*/element ) {
		// summary: Sizes the given element to the viewable area of the browser in a cross-browser fashion.
		// element: the html element to size
		var browserDimensions = new BrowserDimensions();
		element.style.height = browserDimensions.getViewableAreaHeight() + "px";
		element.style.width = browserDimensions.getViewableAreaWidth() + "px";
		element.style.top = browserDimensions.getScrollFromTop() + "px";
		element.style.left = browserDimensions.getScrollFromLeft() + "px";
	},
	sizeToEntireArea: function ( /*HTMLElement*/element ) {
		// summary: Sizes the given element to the viewable area plus the scroll area.
		// element: the html element to size
		var browserDimensions = new BrowserDimensions();
		//The getHTMLElement*() functions return the exact size of the body element in IE even if the viewable area is
		//larger (i.e. no scroll bars). In Firefox, the dimensions of the viewable area plus the scrollable area is returned.
		//So in IE, we take the viewable area if that is larger and the HTMLElement* area if that is larger.
		element.style.height = Math.max( browserDimensions.getHTMLElementHeight(), browserDimensions.getViewableAreaHeight() ) + "px";
		element.style.width = Math.max( browserDimensions.getHTMLElementWidth(), browserDimensions.getViewableAreaWidth() ) + "px";
	},
	sizeRelativeToViewableArea: function ( /*HTMLElement*/element, /*float*/heightFactor, /*float*/widthFactor ) {
		// summary: Sizes the given element to a certain multiple of the viewable area. For example, if heightFactor is 0.5,
		//		the height of the given element will be set to half of the viewable area height.
		// element: the html element to size
		// heightFactor: the factor to multiply the viewable area height by
		// widthFactor: the factor to multiply the viewable area width by
		var browserDimensions = new BrowserDimensions();
		element.style.height = ( browserDimensions.getViewableAreaHeight() * heightFactor ) + "px";
		element.style.width = ( browserDimensions.getViewableAreaWidth() * widthFactor ) + "px";
	},
	positionRelativeToViewableArea: function ( /*HTMLElement*/element, /*float*/heightFactor, /*float*/widthFactor ) {
		// summary: Positions the given element relative to the viewable area. For example, if the heightFactor is 0.5, the
		// 		top of the element will be positioned (Y axis) halfway down the viewable area. Note that this means the element
		//		will be ABSOLUTELY positioned.
		// element: the html element to position
		// heightFactor: the factor to multiply the viewable area height by
		// widthFactor: the factor to multiply the viewable area width by
		var browserDimensions = new BrowserDimensions();
		element.style.position = "absolute";
		if ( this._debugUtils.enabled ) { 
			this._debugUtils.log( this.className, "Browser's viewable height: " + browserDimensions.getViewableAreaHeight() );
			this._debugUtils.log( this.className, "Browser's viewable width: " + browserDimensions.getViewableAreaWidth() );
			this._debugUtils.log( this.className, "Browser's scroll from top: " + browserDimensions.getScrollFromTop() ); 
			this._debugUtils.log( this.className, "Browser's scroll from left: " + browserDimensions.getScrollFromLeft() );
		}
		element.style.top = ( ( browserDimensions.getViewableAreaHeight() * heightFactor ) + browserDimensions.getScrollFromTop() ) + "px";
		//Scroll left behaves differently in FF & IE in RTL languages. The "correct" behavior is up for debate. In FF, it will return the "correct" value 
		//(scrollLeft switches when the page is rendered right-to-left). In IE, scroll left will basically return the scroll width for the body element.
		//There's no real "capability" to test for here so the window.attachEvent is a cheap trick to check for IE.
		//bidiSupport is defined in the theme.
		if ( bidiSupport.isRTL && window.attachEvent ) {
			if ( this._debugUtils.enabled ) {
				this._debugUtils.log( this.className, "scrollWidth = " + browserDimensions.getHTMLElementWidth() );
				this._debugUtils.log( this.className, "clientWidth = " + browserDimensions.getViewableAreaWidth() );
				this._debugUtils.log( this.className, "Scroll Offset should be: " + ( browserDimensions.getHTMLElementWidth() - browserDimensions.getViewableAreaWidth() - browserDimensions.getScrollFromLeft() ) );
			}
			element.style.left = ( ( browserDimensions.getViewableAreaWidth() * widthFactor) + ( browserDimensions.getHTMLElementWidth() - browserDimensions.getViewableAreaWidth() - browserDimensions.getScrollFromLeft() ) ) + "px";
		}
		else {
			element.style.left = ( ( browserDimensions.getViewableAreaWidth() * widthFactor ) + browserDimensions.getScrollFromLeft() ) + "px";
		}	
	},
	positionOutsideElementTopRight: function ( /*HTMLElement*/elementToPosition, /*HTMLElement*/relativeElement ) {
		// summary: Positions the given element just outside (to the top and lining up with the right edge) of the
		//		relative element.
		// description: Sets the top (Y-axis) position of the given element to the top of the relative element minus the
		//		height of element being positioned. Sets the left (X-axis) position of the given element to the left position of
		//		the relative element plus the width of the relative element (to get the right edge) minus the width of the element 
		// 		being positioned (to line the end of the element being positioned up with the right edge of the relative element). 
		elementToPosition.style.position = "absolute";
		elementToPosition.style.top = ( this.stripUnits( relativeElement.style.top ) - elementToPosition.offsetHeight ) + "px";
		if ( bidiSupport.isRTL ) {
			elementToPosition.style.left = ( this.stripUnits( relativeElement.style.left ) ) + "px";
		}
		else {
			elementToPosition.style.left = ( this.stripUnits( relativeElement.style.left ) + relativeElement.offsetWidth - elementToPosition.offsetWidth) + "px";	
		}
	},
	stripUnits: function ( /*String*/cssProp ) {
		// summary: Strips any units (i.e. "px") from a CSS style property.
		// returns: the number value minus any units
		return parseInt( cssProp.substring( 0, cssProp.length - 2 ));	//integer
	},
	addClassName: function ( /*HTMLElement*/element, /*String*/className ) {
		// summary: Adds the given className to the element's style definitions.
		// element: the HTMLElement to add the class name to
		// className: the className to add
		var clazz = element.className;
		if ( clazz.indexOf( className ) < 0 ) {
			element.className += (" " + className);
		}	
	},
	removeClassName: function ( /*HTMLElement*/element, /*String*/className ) {
		// summary: Removes the given className from the element's style definitions.
		// element: the HTMLElement to remove the class name from
		// className: the className to remove
		var clazz = element.className;
		var startIndex = clazz.indexOf( className );
		if ( startIndex >= 0 ) {
			clazz = clazz.substring(0, startIndex) + clazz.substring( startIndex + className.length + 1 );
			element.className = clazz;
		}
	},
	hideElementsByTagName: function ( /*String 1...N*/) {
		// summary: Hides every element of a given tag name. Stores the old visibility style so it can be 
		//		restored by the showElementsByTagName function.
		for ( var i = 0; i < arguments.length; i++ ) {
			var elements = document.getElementsByTagName( arguments[i] );
			for ( var j = 0; j < elements.length; j++ ) {
				if ( elements[j] && elements[j].style ) {
					elements[j]._oldVisibilityStyle = elements[j].style.visibility;
					elements[j].style.visibility = "hidden";
				}
			}
		}
	},
	showElementsByTagName: function ( /*String 1...N*/) {
		// summary: Shows every element of a given tag name. Uses the old visibility style so that elements hidden
		//		by hideElementsByTagName are properly restored.
		for ( var i = 0; i < arguments.length; i++ ) {
			var elements = document.getElementsByTagName( arguments[i] );
			for ( var j = 0; j < elements.length; j++ ) {
				if ( elements[j] && elements[j].style ) {
					if ( elements[j]._oldVisibility ) {
						elements[j].style.visibility = elements[j]._oldVisibility;
						elements[j]._oldVisibility = null;
					}
					else {
						elements[j].style.visibility = "visible";
					}
				}
			}
		}	
	},
	addOnload: function ( /*Function*/func ) {
		// summary: Adds a function to be called on page load.
		// func: the function to call 
		if ( window.addEventListener ) {
			window.addEventListener( "load", func, false );
		}
		else if ( window.attachEvent ) {
			window.attachEvent( "onload", func );
		}
	},
	getEventObject: function ( /*Event?*/event ) {
		// summary: Cross-browser function to retrieve the event object.
		// event: In W3C-compliant browsers, this object will just simply be
		//		returned
		// returns: the event object
		var result = event;
		if ( !event && window.event ) {
			result = window.event;
		}
		return result;	// Event
	}
}

var wptheme_CookieUtils = {
	// summary: Various utility functions for dealing with cookies on the client.
	_deleteDate: new Date( "1/1/2003" ),
	_undefinedOrNull: function ( /*Object*/variable ) {
            // summary: Determines if a given variable is undefined or NULL.
            // returns: true if undefined OR NULL, false otherwise.
            return ( typeof ( variable ) == "undefined" || variable == null );  // boolean
	},
	debug: wptheme_DebugUtils,
        className: "wptheme_CookieUtils",
	getCookie: function ( /*String*/cookieName ) {
		// summary: Gets the value for a given cookie name. If no value is found, returns NULL.
		cookieName = cookieName + "="
		var retVal = null;
		if ( document.cookie.indexOf( cookieName ) >= 0 )
		{
		    var cookies = document.cookie.split(";");
		
		    var c = 0;
		    while ( c < cookies.length && ( cookies[c].indexOf( cookieName ) == -1 ) )
		    {
		        c=c+1;
		    }
			//Add one to the cookie length to account for the equals we added to the cookie name at the beginning of 
			//the function.
		    var cookieValue = cookies[c].substring( (cookieName.length + 1), cookies[c].length );
		    
		    if ( cookieValue != "null" )
		    {
		        retVal = cookieValue;
		    }
		}
		
		return retVal; // String
	},
	setCookie: function ( /*String*/name, /*String*/value, /*Date?*/expiration, /*String?*/path ) {
		// summary: Creates the cookie based on the given information.
		// name: the name of the cookie
		// value: the value for the cookie
		// expiration: OPTIONAL -- when the cookie should expire
		// path: OPTIONAL -- the url path the cookie applies to
		if ( this.debug.enabled ) { this.debug.log( this.className, "set cookie (" + [ name, value, expiration, path ]  + ")"); }
		
		if ( this._undefinedOrNull( name ) ) { throw Error( "Unable to set cookie! No name given!" ); }
		if ( this._undefinedOrNull( value ) ) { throw Error( "Unable to set cookie! No value given!" ); }
		if ( this._undefinedOrNull( expiration ) ) { 
			expiration = ""; 
		}
		else {
			expiration = "expiration=" + expiration.toUTCString() + ";";
		}
		if ( this._undefinedOrNull( path ) ) { 
			path = "path=/;"; 
		}
		else {
			path = "path=" + path + ";";
		}
		
		document.cookie=name + '=' + value + ';' + expiration +  path;		
	},
	deleteCookie: function ( /*String*/cookieName ) {
		// summary: Deletes a given cookie by setting the value to "null" and setting the expiration
		//		value to expire completely.
		if ( this.debug.enabled ) { this.debug.log( this.className, "delete cookie (" + [ cookieName ] + ") "); }
		this.setCookie( cookieName, "null", this._deleteDate );
	}
}// Populates and shows a context menu asynchronously. 
//
// uniqueID             - some unique identifier describing the context of the menu (i.e. portlet window id)
// urlToMenuContents    - url target for the iFrame
// isLTR                - indicates if the page orientation is Left-to-Right
//
//
// This function creates a context menu using the WCL context menu javascript library. It populates this menu
// by creating a hidden DIV ( the ID consists of the unique identifier with "_DIV" appended ) which contains
// a hidden IFRAME ( the ID consists of the DIV identifier with "_IFRAME" appended ). The IFRAME loads the 
// specified URL and calls the buildAndDisplayMenu() function upon completion of loading the IFRAME. The document
// returned by the specified URL must contain a javascript function called "getMenuContents()" which returns 
// an array. The contents of the array must be in the following format ( array[i] = <menu-item-display-name>; 
// array[i+1] = <menu-item-action-url> ). The menu is attached to an HTML element with the id equal to the 
// unique identifier. So, in the portlet context menu case, the image associated with the context menu must have
// an ID equal to the portlet window ID. The dynamically created DIV and IFRAME are deleted after the menu 
// contents are populated and the same menu is returned for the duration of the request in which it was created.
//

//Control debugging. 
// -1 - no debugging
//  0 - minimal debugging ( adding items to menus )
//  1 - medium debugging ( function entry/exit )
//  2 - maximum debugging ( makes iframe visible )
// 999 - make iframe visible only
var asynchContextMenuDebug = -1;

var asynchContextMenuMouseOverIndicator = "";

var portletIdMap = new Object();

function asynchContextMenuOnMouseClickHandler( uniqueID, isLTR, urlToMenuContents, menuBorderStyle, menuTableStyle, menuItemStyle, menuItemSelectedStyle, emptyMenuText, loadingImage, renderBelow )
{
	var menuID = "contextMenu_" + uniqueID;
    
    var menu = getContextMenu( menuID );
    
    if (menu == null) 
    { 
    	asynchContextMenu_menuCurrentlyLoading = uniqueID;
    	
    	if ( loadingImage )
    	{
			setLoadingImage( loadingImage );
	    }

        menu = createContextMenu( menuID, isLTR, null, menuBorderStyle, menuTableStyle, emptyMenuText, null, renderBelow );
        loadAsynchContextMenu( uniqueID, urlToMenuContents, isLTR, menuItemStyle, menuItemSelectedStyle, '', true );
    }
    else
    {
    	if ( asynchContextMenu_menuCurrentlyLoading == uniqueID )
		{
			return;	
		}
    	showContextMenu( menuID, document.getElementById( uniqueID ) );
    }	
}

var asynchContextMenu_originalMenuImgElementSrc;

function setLoadingImage( img )
{
	asynchContextMenu_originalMenuImgElementSrc = document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src;
	document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src = img;
}

function clearLoadingImage()
{
	document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src = asynchContextMenu_originalMenuImgElementSrc;
}

function loadAsynchContextMenu( uniqueID, url, isLTR, menuItemStyle, menuItemSelectedStyle, emptyMenuText, showMenu, onMenuAffordanceShowHandler )
{
    asynchDebug( 'ENTRY loadAsynchContextMenu p1=' + uniqueID + '; p2=' + url + '; p3=' + isLTR + '; p4=' + isLTR);
	
	var menuID = "contextMenu_" + uniqueID;

    var dialogTag = null;
    var ID = uniqueID + '_DIV';
			
	//an iframe wasn't cleaned up properly
	if ( document.getElementById( ID ) != null )
	{
		closeMenu( ID );
        return;
	}
	
	//create the div tag and assign the styles to it		
	dialogTag = document.createElement( "DIV" );
	dialogTag.style.position="absolute";
	
	if ( asynchContextMenuDebug < 2 )
	{
		dialogTag.style.left = "0px";
		dialogTag.style.top  = "-100px";
    	dialogTag.style.visibility = "hidden";
	}
	
	if ( asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999 )
	{
		dialogTag.style.left = "100px";
		dialogTag.style.top  = "100px";
    	dialogTag.style.visibility = "visible";
	}		
	
	dialogTag.id=ID;
	
	var styleString = 'null';
	
	if ( menuItemStyle != null )
	{
		styleString = "'" + menuItemStyle + "'";
	}
	
	if ( menuItemSelectedStyle != null ) 
	{
		styleString = styleString + ", '" + menuItemSelectedStyle + "'";
	}
	else
	{
		styleString = styleString + ", null";
	}
	
	//alert( 'buildAndDisplayMenu( this.id, this.name, ' + styleString + ', ' + showMenu + ' , ' + callbackFn + ' );' );
	
    //create the iframe this way because onload handlers attached when creating dynamically don't seem to fire
    dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu( this.id, this.name, ' + styleString + ', ' + showMenu + ' , \''+ onMenuAffordanceShowHandler + '\' ); return false;" ></iframe>';
		
	//append the div tag to the document body		
	document.body.appendChild( dialogTag );

    asynchDebug( 'EXIT createDynamicElements' );

}



//Builds and displays the menu from the contents of the IFRAME.
function buildAndDisplayMenu( menuID, iframeID, menuItemStyle, menuItemSelectedStyle, showMenu, onMenuAffordanceShowHandler )
{
    asynchDebug( 'ENTRY buildAndDisplayMenu p1=' + menuID + '; p2=' + iframeID + '; p3=' + showMenu + '; p4=' + onMenuAffordanceShowHandler );
    
    //get the context menu, should have already been created.
    var menu = getContextMenu( menuID );

	//clear out our loading indicator
    clearLoadingImage();
   	asynchContextMenu_menuCurrentlyLoading = null;

    //if the menu doesn't exist, we shouldn't even be here....but just in case.
    if ( menu == null )
    {
        return false;
    }

    //strip the _IFRAME from the id to come up with the DIV id
    index = iframeID.indexOf( "_IFRAME" );
    var divID = iframeID.substring( 0, index );

    //strip the _DIV from the id to come up with the portlet id
    index2 = divID.indexOf( "_DIV" );
    var uniqueID = divID.substring( 0, index2 );
    
    asynchDebug( 'divID = ' + divID );
    asynchDebug( 'uniqueID = ' + uniqueID );

    var frame, c=-1, done=false;

    //In IE, referencing the iFrame via the name in the window.frames[] array
    //does not appear to work in this case, so we have to cycle through all the 
    //frames and compare the names to find the correct one.
    while ( ( c + 1 ) < window.frames.length && !done )
    {  
        c=c+1;

		//We have to surround this with a try/catch block because there are
		//cases where attempting to access the 'name' property of the current
		//frame in the array will generate an access denied exception. This is 
		//OK to ignore because any frame that generates this exception shouldn't
		//be the one we are looking for.
        try 
        {
            done = ( window.frames[c].name == iframeID );
        }
        catch ( e )
        {
            //do nothing.
        }
    }

    //Check for the existence of the function we are looking to call. 
    //If not, don't bother creating the menu. 
    if ( window.frames[c].getMenuContents )
    {
        contents = window.frames[c].getMenuContents();
    }
    else
    {
        //we were unable to load the context menu for whatever reason
        return false;
    }
    
    
    //Cycle through the array created by the getMenuContents()
    //function. The structure of the array should be [url, name].
    for ( i=0; i < contents.length; i=i+3 ) 
    {
        asynchDebug2( 'Adding item: ' + contents[i+1] );
        asynchDebug2( 'URL: ' + contents[i] );
        if ( contents[i] )
        {
        	asynchDebug2( 'url length: ' + contents[i].length );
        }
        asynchDebug2( 'icon: ' + contents[i+2] );

        if ( contents[i] && contents[i].length != 0 )
        {
        	var icon = null;
        	
        	if ( contents[i+2] && contents[i+2].length != 0 )
        	{
        		icon = contents[i+2];
        	}
        
            menu.add( new UilMenuItem( contents[i+1], true, '', contents[i], null, icon, null, menuItemStyle, menuItemSelectedStyle ) );
        }
    }

    //our target image should have an ID of the uniqueID
    var target = document.getElementById( uniqueID );
    //remove our iframe since we've created the menu, we don't need the iframe on this request anymore.
    // (148004) deleting the elements causes the status bar to spin forever on mozilla
    //deleteDynamicElements( divID );

    asynchDebug( 'EXIT buildAndDisplayMenu' );

	//asynchContextMenuOnLoadCheck( menuID, uniqueID, target, onMenuAffordanceShowHandler );

    //...and display!
    if ( showMenu == null || showMenu == true )
    {
    	return showContextMenu( menuID, target ); 
    }
}


//Creates and loads the IFRAME.
function createDynamicElements( uniqueID, url, menuID, menuItemStyle, menuItemSelectedStyle )
{
    asynchDebug( 'ENTRY createDynamicElements p1=' + uniqueID + '; p2=' + url + '; p3=' + menuID );

    var dialogTag = null;
    var ID = uniqueID + '_DIV';
			
	//an iframe wasn't cleaned up properly
	if ( document.getElementById( ID ) != null )
	{
		closeMenu( ID );
        return;
	}
	
	//create the div tag and assign the styles to it		
	dialogTag = document.createElement( "DIV" );
	dialogTag.style.position="absolute";
	
	if ( asynchContextMenuDebug < 2 )
	{
		dialogTag.style.left = "0px";
		dialogTag.style.top  = "-100px";
    	dialogTag.style.visibility = "hidden";
	}
	
	if ( asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999 )
	{
		dialogTag.style.left = "100px";
		dialogTag.style.top  = "100px";
    	dialogTag.style.visibility = "visible";
	}		
	
	dialogTag.id=ID;
	
	var styleString = 'null, null';
	
	if ( menuItemStyle != null )
	{
		styleString = "'" + menuItemStyle + "'";
	}
	
	if ( menuItemSelectedStyle != null ) 
	{
		styleString = styleString + ", '" + menuItemSelectedStyle + "'";
	}
	else
	{
		styleString = styleString + ", null";
	}
    
    //create the iframe this way because onload handlers attached when creating dynamically don't seem to fire
    dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu( this.id, this.name, ' + styleString + ' ); return false;" ></iframe>';
		
	//append the div tag to the document body		
	document.body.appendChild( dialogTag );

    asynchDebug( 'EXIT createDynamicElements' );
}

function asynchDebug( str ) 
{
	if ( asynchContextMenuDebug >= 1 && asynchContextMenuDebug != 999 )
	{
	    alert( str );
	}
}

function asynchDebug2( str )
{
	if ( asynchContextMenuDebug >= 0 && asynchContextMenuDebug != 999 )
	{
    	alert( str) ;
    }
}

//MMD - this function is used so that relative URLs may be used with the context menus.
function asynchDoFormSubmit( url ){

    var formElem = document.createElement("form");
    document.body.appendChild(formElem);

    formElem.setAttribute("method", "GET");

    var delimLocation = url.indexOf("?");
    
    if (delimLocation >= 0) {
        var newUrl = url.substring(0, delimLocation);
        
        var paramsEnd = url.length;
        // test to see if a # fragment identifier (the layout node id) is appended to the end of the URL
        var layoutNodeLocation = url.indexOf("#");
        if (layoutNodeLocation >= 0 && layoutNodeLocation > delimLocation) {
            paramsEnd = layoutNodeLocation;
            newUrl = newUrl + url.substring(layoutNodeLocation, url.length);
        }
        
        var params = url.substring(delimLocation + 1, paramsEnd);
        var paramArray = params.split("&");

        for (var i = 0; i < paramArray.length; i++) {
            var name = paramArray[i].substring(0, paramArray[i].indexOf("="));
            var value = paramArray[i].substring(paramArray[i].indexOf("=") + 1, paramArray[i].length);

            var inputElem = document.createElement("input");
            inputElem.setAttribute("type", "hidden");
            inputElem.setAttribute("name", name);
            inputElem.setAttribute("value", value);
            formElem.appendChild(inputElem);
        }
        
        url = newUrl;

    }

    formElem.setAttribute("action", url);
    
    formElem.submit();

}

var asynchContextMenu_menuCurrentlyLoading = null;

function menuMouseOver( id, selectedImage )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;

	portletIdMap[id] = 'menu_'+id+'_img';
	showAffordance(id, selectedImage);
}

function menuMouseOut( id, disabledImage )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;
	
   	hideAffordance(id , disabledImage);
	portletIdMap[id] = "";
}

function showAffordance( id, selectedImage )
{
	document.getElementById( 'menu_'+id ).style.cursor='pointer';
	document.getElementById( 'menu_'+id+'_img').src=selectedImage;
}

function hideAffordance( id, disabledImage )
{
	document.getElementById( 'menu_'+id ).style.cursor='default';
	document.getElementById( 'menu_'+id+'_img').src=disabledImage;	
}

function menuMouseOverThinSkin(id, selectedImage, minimized)
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;

	portletIdMap[id] = 'menu_'+id+'_img';
	showAffordanceThinSkin(id, selectedImage, minimized);
}

function menuMouseOutThinSkin(id, disabledImage, minimized )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null)
		return;

   	hideAffordanceThinSkin(id , disabledImage, minimized);
	portletIdMap[id] = "";
}

function showAffordanceThinSkin(id, selectedImage, minimized)
{
	document.getElementById( 'menu_'+id ).style.cursor='pointer';
	document.getElementById( 'portletTitleBar_'+id ).className='wpsThinSkinContainerBar wpsThinSkinContainerBarBorder';
	document.getElementById( 'title_'+id ).className='wpsThinSkinDragZoneContainer wpsThinSkinVisible';
	document.getElementById( 'menu_'+id+'_img' ).src=selectedImage;
}

function hideAffordanceThinSkin(id, disabledImage, minimized)
{
	document.getElementById( 'menu_'+id ).style.cursor='default';
	/* when minimized, the titlebar should always be displayed so it can be found by the user, so we don't hide it */
	if (minimized == null || minimized == false){
	document.getElementById( 'portletTitleBar_'+id ).className='wpsThinSkinContainerBar';
	}
	document.getElementById( 'title_'+id ).className='wpsThinSkinDragZoneContainer wpsThinSkinInvisible';
	document.getElementById( 'menu_'+id+'_img' ).src=disabledImage;	
}

var onmousedownold_;

function closeMenu(id, disabledImage)
{
	hideCurrentContextMenu();

	if (  portletIdMap[id] == "")
	{
		hideAffordance( id, disabledImage );
	}
	
	document.onmousedown = onmousedownold_;
}

function showPortletMenu( id, portletNoActionsText, isRTL, menuPortletURL, disabledImage, loadingImage )
{
	if ( portletIdMap[id].indexOf( id ) < 0  )
		return;
		
	asynchContextMenuOnMouseClickHandler('menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage );
   	onmousedownold_ = document.onmousedown;
	document.onmousedown = closeMenu;
}

function accessibleShowMenu( event , id , portletNoActionsText, isRTL, menuPortletURL, loadingImage )
{
	if ( event.which == 13 )
	{
	    asynchContextMenuOnMouseClickHandler( 'menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage );
	}
	else
	{
	 	return true;
	}
}

wptheme_AsyncMenuAffordance = function ( /*String*/anchorId, /*String*/imageId, /*String*/showingImgUrl, /*String*/hidingImgUrl ) {
	// summary: Representation of an asynchronous menu's affordance (UI element which triggers the menu to show). Manages the details
	//		of showing/hiding the affordance, if appropriate.
	// description: In the Portal theme, we want the menu affordance to only show during certain events (e.g. mouseover the page name). The details
	//		of the showing/hiding is a little more complicated than changing the css on an HTML element due to various rendering/accessibility concerns. This 
	//		object manages these details. 
	this.anchorId = anchorId;
	this.imageId = imageId;
	this.showingImgUrl = showingImgUrl;
	this.hidingImgUrl = hidingImgUrl;
	
	this.show = function () {
		// summary: Shows the affordance.		
		if (document.getElementById( this.anchorId ) != null) {
			document.getElementById( this.anchorId ).style.cursor = 'pointer';
			document.getElementById( this.imageId ).src=this.showingImgUrl;
		}	
	}
	this.hide = function () {
		// summary: Hides the affordance.
		if (document.getElementById( this.anchorId ) != null) {
			document.getElementById( this.anchorId ).style.cursor = 'default';
			document.getElementById( this.imageId ).src=this.hidingImgUrl;
		}
	}
}

wptheme_AsyncMenu = function ( /*String*/id, /*String*/menuBorderStyle, /*String*/menuStyle, /*String*/menuItemStyle, /*String*/selectedMenuItemStyle ) {
		// summary: Representation of an asynchronous context menu. Manages showing/hiding the menu as well as showing/hiding the menu's affordance (UI element
		//		which opens the menu). 
		// id: the menu's id
		// menuBorderStyle: the style name to be applied to the menu's border
		// menuStyle: the style name to be applied to the general menu
		// menuItemStyle: the style name to be applied to the menu item
		// selectedMenuItemStyle: the style name to be applied to a selected menu item
		
		//global utilities
		this._htmlUtils = wptheme_HTMLElementUtils;
		
		//properties passed in at construction time
		this.id = id;
		this.menuBorderStyle = menuBorderStyle; 
		this.menuStyle = menuStyle;
		this.menuItemStyle = menuItemStyle;
		this.selectedMenuItemStyle = selectedMenuItemStyle;
		
		//properties that have to be initialized in the theme
		this.url = null;
		this.isRTL = false;
		this.emptyMenuText = null;
		this.loadingImgUrl = null;
		this.affordance = null;
		this.init = function ( /*String*/ url, /*boolean*/isRTL, /*String*/ emptyMenuText, /*String*/ loadingImgUrl, /*wptheme_MenuAffordance*/affordance, /*boolean*/renderBelow ) {
			// summary: Convenience function for setting up the required variables for showing the page menu.
			// url: the url to load page menu contents (usually created with <portal-navgation:url themeTemplate="pageContextMenu" />)
			// isRTL: is the current locale a right-to-left locale
			// emptyMenuText: the text to display if the user has no valid options
			// loadingImgUrl: the url to the image to display while the menu is loading
			this.url = url;
			this.isRTL = isRTL;
			this.emptyMenuText = emptyMenuText;
			this.loadingImgUrl = loadingImgUrl;
			this.affordance = affordance;
			this.renderBelow = renderBelow;
		}
		this.show = function ( /*Event?*/evt ) {
			// summary: Shows the page menu for the selected page. 
			// description: Typically triggered by 2 types of events: click and keypress. On a click event, we just want to show the menu. On a keypress
			//		event, we want to make sure the ENTER/RETURN key was pressed before showing the menu.
			// event: Event object passed in when triggered from a key press event.
			
			evt = this._htmlUtils.getEventObject( evt );
			var show = false;
			var result;
			//On a keypress event, we want to make sure the ENTER/RETURN key was pressed before showing the menu.
			if ( evt && evt.type == "keypress" ) { 
				var keyCode = -1;
				if ( evt && evt.which ){	
					keyCode = evt.which;
				}
				else {
					keyCode = evt.keyCode
				}	
		
				//Enter/Return was the key that triggered this keypress event.
				if ( keyCode == 13 ) {
					show = true;
				}						
			}
			else {
				//Some other kind of event, just show the menu already...
				show = true;
			}
			
			//Show the menu if necessary.
			if ( show ) {
				result = asynchContextMenuOnMouseClickHandler( this.id, !this.isRTL, this.url, this.menuBorderStyle, this.menuStyle, this.menuItemStyle, this.selectedMenuItemStyle, this.emptyMenuText, this.loadingImgUrl, this.renderBelow );
			} 
			
			return result;
		}
		this.showAffordance = function () {
			// summary: Shows the affordance associated with the given asynchronous menu. 
			if ( asynchContextMenu_menuCurrentlyLoading == null ) {
				this.affordance.show();
			}	
		}
		this.hideAffordance = function () {
			// summary: Hides the affordance associated with the given asynchronous menu.
			if ( asynchContextMenu_menuCurrentlyLoading == null ) {
				this.affordance.hide();
			}
		}
	}

wptheme_ContextMenuUtils = {
	// summary: Utility object for managing the different context menus in the theme. Constructs the wptheme_AsyncMenu objects here, initialization must take place in
	//		the head section of the HTML document (usually the initialization values require the usage of JSP tags). 
	moreMenu: new wptheme_AsyncMenu( "wptheme_more_menu", "wptheme-more-menu-border", "wptheme-more-menu", "wptheme-more-menu-item", "wptheme-more-menu-item-selected", true ),
	topNavPageMenu: new wptheme_AsyncMenu( "wptheme_selected_page_menu", "wptheme-page-menu-border", "wptheme-page-menu", "wptheme-page-menu-item", "wptheme-page-menu-item-selected" ),
	sideNavPageMenu: new wptheme_AsyncMenu( "wptheme_selected_page_menu", "wptheme-page-menu-border", "wptheme-page-menu", "wptheme-page-menu-item", "wptheme-page-menu-item-selected" )
}



//////////////////////////////////////////////////////////////////
// begin BrowserDimensions object definition
BrowserDimensions.prototype				= new Object();
BrowserDimensions.prototype.constructor = BrowserDimensions;
BrowserDimensions.superclass			= null;

function BrowserDimensions(){

    this.body = document.body;
    if (this.isStrictDoctype() && !this.isSafari()) {
        this.body = document.documentElement;
    }

}

BrowserDimensions.prototype.getScrollFromLeft = function(){
    return this.body.scrollLeft ;
}

BrowserDimensions.prototype.getScrollFromTop = function(){
    return this.body.scrollTop ;
}

BrowserDimensions.prototype.getViewableAreaWidth = function(){
    return this.body.clientWidth ;
}

BrowserDimensions.prototype.getViewableAreaHeight = function(){
    return this.body.clientHeight ;
}

BrowserDimensions.prototype.getHTMLElementWidth = function(){
    return this.body.scrollWidth ;
}

BrowserDimensions.prototype.getHTMLElementHeight = function(){
    return this.body.scrollHeight ;
}

BrowserDimensions.prototype.isStrictDoctype = function(){

    return (document.compatMode && document.compatMode != "BackCompat");

}

BrowserDimensions.prototype.isSafari = function(){

    return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);

}

// end BrowserDimensions object definition
//////////////////////////////////////////////////////////////////

//Provides a controller for enabling and disabling javascript events
//on a particular HTML element. Elements must register with the controller
//in order to be enabled/disabled. The act of registering with the controller
//disables the element, unless otherwise specified. 
//
//
// **The main purpose of this controller is to disable the javascript 
//actions of certain elements that, if executed prior to the page completely 
//loading, cause problems.

//Object definition for ElementJavascriptEventController
function ElementJavascriptEventController()
{
	//Registered elements to disable and enable upon page load.
	this.elements = new Array();
	this.arrayPosition = 0;
	
	//Function mappings
	this.enableAll = enableRegisteredElementsInternal;
	this.disableAll = disableRegisteredElementsInternal;
	this.register = registerElementInternal;
	this.enable = enableRegisteredElementInternal;
	this.disable = disableRegisteredElementInternal;
	
	//Enables all registered items.
	function enableRegisteredElementsInternal()
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			this.elements[c].enable();	
		}
	}
	
	function enableRegisteredElementInternal( id )
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			if ( this.elements[c].ID == id )
			{
				this.elements[c].enable();
			}
		}
	}
	
	//Disables all registered items.
	function disableRegisteredElementsInternal()
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			this.elements[c].disable();
		}
	}
	
	function disableRegisteredElementInternal( id )
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			if ( this.elements[c].ID == id )
			{
				this.elements[c].disable();
			}
		}
	}
	
	//Registers an item with the controller.
	function registerElementInternal( HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction )
	{
		this.elements[ this.arrayPosition ] = new RegisteredElement( HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction );
		this.arrayPosition = this.arrayPosition + 1;
	}
}

//Object definition for an element registered with the controller.
//These objects should only be created by the controller.
function RegisteredElement( ElementID, doNotDisable, optionalOnEnableJavascriptAction )
{
	//Information about the element.
	this.ID = ElementID;
	this.oldCursor = "normal";
	this.ItemOnMouseDown = null;
	this.ItemOnMouseUp = null;
	this.ItemOnMouseOver = null;
	this.ItemOnMouseOut = null;
	this.ItemOnMouseClick = null;
	this.ItemOnBlur = null;
	this.ItemOnFocus = null;
	this.ItemOnChange = null;
	this.onEnableJS = optionalOnEnableJavascriptAction;
	
	//Function mappings
	this.enable = enableInternal;
	this.disable = disableInternal;
	
	//Enables an element. Enabling consists of changing the cursor
	//style back to the original style, and returning all the stored
	//javascript events to their original state. If the HTML element
	//is a button, the disabled property is simply set to false.
	function enableInternal()
	{
		//Return the old cursor style.
		document.getElementById( this.ID ).style.cursor = this.oldCursor;
		
		//If it's a button, re-enable it.
		if ( document.getElementById( this.ID ).tagName == "BUTTON" )
		{
			document.getElementById( this.ID ).disabled = false;
		}
		else
		{
			//Return all the events.
			document.getElementById( this.ID ).onmousedown = this.ItemOnMouseDown;
			document.getElementById( this.ID ).onmouseup = this.ItemOnMouseUp;
			document.getElementById( this.ID ).onmouseover = this.ItemOnMouseOver;
			document.getElementById( this.ID ).onmouseout = this.ItemOnMouseOut;
			document.getElementById( this.ID ).onclick = this.ItemOnMouseClick;
			document.getElementById( this.ID ).onblur = this.ItemOnBlur;
			document.getElementById( this.ID ).onfocus = this.ItemOnFocus;
			document.getElementById( this.ID ).onchange = this.ItemOnChange;	
		}
		
		//Execute the onEnable Javascript, if specified.
		if ( this.onEnableJS != null )
		{
			eval( this.onEnableJS );
		}
	}
	
	//Disables an element. Disabling consists of changing the cursor
	//style to "not-allowed", and setting all the javascript events to
	//do nothing. If the HTML element is a button, the "disabled" property
	//is simply set to true.	
	function disableInternal() 
	{
		//Set the cursor style to point out that you can't do anything yet
		this.oldCursor = document.getElementById( this.ID ).style.cursor;
		document.getElementById( this.ID ).style.cursor = "not-allowed";
	
		//If the HTML element is a BUTTON, we can easily disable it by
		//setting the disabled property to true.
		if ( document.getElementById( this.ID ).tagName == "BUTTON" )
		{
			document.getElementById( this.ID ).disabled = true;
		}
		else
		{
			//Store all the current events registered to the item.
			this.ItemOnMouseDown = document.getElementById( this.ID ).onmousedown;
			this.ItemOnMouseUp = document.getElementById( this.ID ).onmouseup;
			this.ItemOnMouseOver = document.getElementById( this.ID ).onmouseover;
			this.ItemOnMouseOut = document.getElementById( this.ID ).onmouseout;
			this.ItemOnMouseClick = document.getElementById( this.ID ).onclick;
			this.ItemOnBlur = document.getElementById( this.ID ).onblur;
			this.ItemOnFocus = document.getElementById( this.ID ).onfocus;
			this.ItemOnChange = document.getElementById( this.ID ).onchange;
			
			//Now set all the current events to do nothing.
			document.getElementById( this.ID ).onmousedown = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseup = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseover = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseout = function () { void(0); return false; };
			document.getElementById( this.ID ).onclick = function () { void(0); return false; };
			document.getElementById( this.ID ).onblur = function () { void(0); return false; };
			document.getElementById( this.ID ).onfocus = function () { void(0); return false; };
			document.getElementById( this.ID ).onchange = function () { void(0); return false; };
		}
	}		
	
	//Disable the element
	if ( !doNotDisable )
	{
		this.disable();	
	}
	
} 
// Global variables 
var wpsFLY_isIE = document.all?1:0;
var wpsFLY_isNetscape=document.layers?1:0;                             
var wpsFLY_isMoz = document.getElementById && !document.all;

// This sets how many pixels of the tab should show when collapsed was 11
var wpsFLY_minFlyout=0;

// How many pixels should it move every step? 
var wpsFLY_move=15;
if (wpsFLY_isIE)
   wpsFLY_move=12;

// Specify the scroll speed in milliseconds
var wpsFLY_scrollSpeed=1;

// Timeout ID for flyout
var wpsFLY_timeoutID=1;

// How from from top of screen for scrolling
var wpsFLY_fromTop=100;
var wpsFLY_leftResize;

//Cross browser access to required dimensions 
var wpsFLY_browserDimensions = new BrowserDimensions();

var wpsFLY_initFlyoutExpanded = wpsFLY_getInitialFlyoutState();

// Current state of the flyout for the life of the request (true=in, false=out)
var wpsFLY_state = true;

var wpsFLY_currIndex = -1;
// -----------------------------------------------------------------
// Initialize the Flyout
// -----------------------------------------------------------------
function wpsFLY_initFlyout(showHidden)
{
   wpsFLY_Flyout=new wpsFLY_makeFlyout('wpsFLYflyout');
   wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);
   wpsFLY_Flyout.css.overflow = 'hidden';
   wpsFLY_Flyout.setLeft( wpsFLY_Flyout.pageWidth() - wpsFLY_minFlyout-1 );

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      scrolled="window.pageYOffset";
   else if (wpsFLY_isIE)
      scrolled="document.body.scrollTop";

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      wpsFLY_fromTop=wpsFLY_Flyout.css.top;
   else if (wpsFLY_isIE)
      wpsFLY_fromTop=wpsFLY_Flyout.css.pixelTop;

   if (wpsFLY_isIE) {
      window.onscroll=wpsFLY_internalScroll;
      window.onresize=wpsFLY_internalScroll;
   }
   else {
     window.onscroll=wpsFLY_internalScroll();
   }

   if (showHidden)
      wpsFLY_Flyout.css.visibility="hidden";
   else
      wpsFLY_Flyout.css.visibility="visible";

   //Open or close the flyout depending on the init state.
   if ( wpsFLY_initFlyoutExpanded != null )
   {
       wpsFLY_toggleFlyout( wpsFLY_initFlyoutExpanded, true );
   }

   return;
}

// -----------------------------------------------------------------
// Initialize the Flyout on left
// -----------------------------------------------------------------
function wpsFLY_initFlyoutLeft(showHidden)
{
   wpsFLY_FlyoutLeft=new wpsFLY_makeFlyoutLeft('wpsFLYflyout');

   if (wpsFLY_isIE) {
      wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
      wpsFLY_FlyoutLeft.css.overflow = 'hidden';
	   wpsFLY_FlyoutLeft.setLeft(0);
   } else {
      //  Mozilla does not move the scroll to the left for bidi languages
	   wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4);
   }

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      scrolled="window.pageYOffset";
   else if (wpsFLY_isIE)
      scrolled="document.body.scrollTop";

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.top;
   else if (wpsFLY_isIE)
      wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.pixelTop;

   if (wpsFLY_isIE) {
      window.onscroll=wpsFLY_internalScrollLeft;
      window.onresize=wpsFLY_internalResizeLeft;
   } else
      window.onscroll=wpsFLY_internalScrollLeft();

   if (showHidden)
      wpsFLY_FlyoutLeft.css.visibility="hidden";
   else
      wpsFLY_FlyoutLeft.css.visibility="visible";
      
   //Open or close the flyout depending on the init state.
   if ( wpsFLY_initFlyoutExpanded != null )
   {
       wpsFLY_toggleFlyout( wpsFLY_initFlyoutExpanded, true );
   }   
}


// -----------------------------------------------------------------
// Constructs flyout (default on right)
// -----------------------------------------------------------------
function wpsFLY_makeFlyout(obj)
{
   this.origObject=document.getElementById(obj);
   //get the css for the DIV tag, need it later
   if (wpsFLY_isNetscape)
      this.css=eval('document.'+obj);
   else if (wpsFLY_isMoz)
      this.css=document.getElementById(obj).style;
   else if (wpsFLY_isIE)
      this.css=eval(obj+'.style');

   //initialize the expand state
   wpsFLY_state=1;
   this.go=0;

   //get the width
   if (wpsFLY_isNetscape)
      this.width=this.css.document.width;
   else if (wpsFLY_isMoz)
      this.width=document.getElementById(obj).offsetWidth;
   else if (wpsFLY_isIE)
      this.width=eval(obj+'.offsetWidth');

   this.setWidth=wpsFLY_internalSetWidth;
   this.getWidth=wpsFLY_internalGetWidth;
   
   //set a left method to make it common across browsers
   this.left=wpsFLY_internalGetLeft;
   this.pageWidth=wpsFLY_internalGetPageWidth;
   this.setLeft = wpsFLY_internalSetLeft;

   this.obj = obj + "Object";   
   eval(this.obj + "=this");  
}

// -----------------------------------------------------------------
// Constructs flyout (on left)
// -----------------------------------------------------------------
function wpsFLY_makeFlyoutLeft(obj)        
{
   this.origObject=document.getElementById(obj);
	//get the css for the DIV tag, need it later
    if (wpsFLY_isNetscape) 
		this.css=eval('document.'+obj);
    else if (wpsFLY_isMoz) 
		this.css=document.getElementById(obj).style;
    else if (wpsFLY_isIE) 
		this.css=eval(obj+'.style');

	//initialize the expand state
	wpsFLY_state=1;
	this.go=0;
	
	//get the width
	if (wpsFLY_isNetscape) 
		this.width=this.css.document.width;
    else if (wpsFLY_isMoz) 
		this.width=document.getElementById(obj).offsetWidth;
    else if (wpsFLY_isIE) 
		this.width=eval(obj+'.offsetWidth');

   this.setWidth=wpsFLY_internalSetWidthLeft;
   this.getWidth=wpsFLY_internalGetWidthLeft;

	//set a left method to make it common across browsers
	this.left=wpsFLY_internalGetLeft;
   this.pageWidth=wpsFLY_internalGetPageWidth;
   this.setLeft = wpsFLY_internalSetLeft;

   this.obj = obj + "Object"; 	
   eval(this.obj + "=this");	
}


// -----------------------------------------------------------------
// The internal api to get the page width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetPageWidth()
{
   //get the width
   return wpsFLY_browserDimensions.getViewableAreaWidth();
}

function wpsFLY_internalSetLeft( value )
{
    this.css.left=value + "px";
}

// -----------------------------------------------------------------
// The internal api to set the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalSetWidth(value)
{
   this.css.width = value + "px";
   if (navigator.userAgent.indexOf ("Opera") != -1) {
      var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');
      operaIframe.style.width = (value-wpsFLY_minFlyout) + "px" ;
   }
}

// -----------------------------------------------------------------
// The internal api to set the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalSetWidthLeft(value)
{
   this.css.width = value + "px";
   if (navigator.userAgent.indexOf ("Opera") != -1) {
      var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');
      operaIframe.style.width = (value-wpsFLY_minFlyout) + "px" ;
   }
}

// -----------------------------------------------------------------
// The internal api to get the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetWidth()
{
   //get the width
   if (wpsFLY_isNetscape)
      return eval(this.css.document.width);
   else if (wpsFLY_isMoz||wpsFLY_isIE)
      return eval(this.origObject.offsetWidth);
}

// -----------------------------------------------------------------
// The internal api to get the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetWidthLeft()
{
   var width;
   if (wpsFLY_isNetscape)
      width = eval(this.css.document.width);
   else if (wpsFLY_isMoz||wpsFLY_isIE)
      width = eval(this.origObject.offsetWidth);
   return width;
}

// -----------------------------------------------------------------
// The internal api to get the left value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetLeft()
{
   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      leftfunc=parseInt(this.css.left);
   else if (wpsFLY_isIE)
      leftfunc=eval(this.css.pixelLeft);
   return leftfunc;
}

// -----------------------------------------------------------------
// The internal fly out function, called my real function, only 
// wpsFLY_moveOutFlyout should call this function.
// -----------------------------------------------------------------
function wpsFLY_internalMoveOut()
{
	document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";

   if (wpsFLY_Flyout.left() - wpsFLY_move > wpsFLY_Flyout.pageWidth()+ wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width ) {
      var newwidth= wpsFLY_Flyout.getWidth()+wpsFLY_move;
      wpsFLY_Flyout.setWidth(newwidth);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left() - wpsFLY_move);
      wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOut()",wpsFLY_scrollSpeed);
      wpsFLY_Flyout.go=1;
   } else {
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width);
      wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);
      wpsFLY_Flyout.go=0;
      wpsFLY_state=0;
   }
}

// -----------------------------------------------------------------
// The internal slide out function, called my real function, only 
// wpsFLY_moveOutFlyoutLeft should call this function. For left sided
// flyout.
// -----------------------------------------------------------------
function wpsFLY_internalMoveOutLeft()
{
	document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";

   if (wpsFLY_isIE) {
	   if (wpsFLY_FlyoutLeft.getWidth() + wpsFLY_move < wpsFLY_FlyoutLeft.width) {
         var newwidth= wpsFLY_FlyoutLeft.getWidth()+wpsFLY_move;
         wpsFLY_FlyoutLeft.setWidth(newwidth);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);
		   wpsFLY_FlyoutLeft.go=1;
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
         wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=0;
	   }   
   } else {
   //  Mozilla browsers don't scroll left
      if( wpsFLY_FlyoutLeft.left()+wpsFLY_move < wpsFLY_browserDimensions.getScrollFromLeft()) {
		   wpsFLY_FlyoutLeft.go=1;
		   wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()+wpsFLY_move);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_browserDimensions.getScrollFromLeft());
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=0;
	   }
   }  
}

// -----------------------------------------------------------------
// The internal fly in function, called my real function, only 
// wpsFLY_moveInFlyout should call this function.
// -----------------------------------------------------------------
function wpsFLY_internalMoveIn()
{
   if ( wpsFLY_Flyout.left() + wpsFLY_move < wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout  ) {
      wpsFLY_Flyout.go=1;
      var newwidth= wpsFLY_Flyout.getWidth()-wpsFLY_move;
      wpsFLY_Flyout.setWidth(newwidth);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left()+wpsFLY_move);
      wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveIn()",wpsFLY_scrollSpeed);
   } else {
      wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout);
      wpsFLY_Flyout.go=0;
      wpsFLY_state=1;
   }  
}

// -----------------------------------------------------------------
// The internal slide in function, called my real function, only 
// wpsFLY_moveInFlyoutLeft should call this function. For left sided
// flyout.
// -----------------------------------------------------------------
function wpsFLY_internalMoveInLeft()
{
   if (wpsFLY_isIE) {
      if (wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move >  wpsFLY_minFlyout) {
         var newwidth= wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move;
         wpsFLY_FlyoutLeft.setWidth(newwidth);
         wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);
         wpsFLY_FlyoutLeft.go=1;
      } else {
         wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
         wpsFLY_FlyoutLeft.go=0;
         wpsFLY_state=1;
      }
   } else {
      if(wpsFLY_FlyoutLeft.left()>-wpsFLY_FlyoutLeft.width+wpsFLY_minFlyout) {
		   wpsFLY_FlyoutLeft.go=1;
		   wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()-wpsFLY_move);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4 );
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=1;
      }
	}
}

// -----------------------------------------------------------------
// The internal scroll function.
// -----------------------------------------------------------------
function wpsFLY_internalScroll() {
   if (!wpsFLY_Flyout.go) {

      //wpsFLY_Flyout.css.top=eval(scrolled)+parseInt(wpsFLY_fromTop);
      if (wpsFLY_state==1) {
         wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_minFlyout);
      } else {
         wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_Flyout.width);
      }
   }
   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      setTimeout('wpsFLY_internalScroll()',20);
}

// -----------------------------------------------------------------
// The internal scroll left function.
// -----------------------------------------------------------------
function wpsFLY_internalScrollLeft() {
   if (!wpsFLY_FlyoutLeft.go) {
      //wpsFLY_FlyoutLeft.css.top=eval(scrolled)+parseInt(wpsFLY_fromTop);

      // scroll horizontally for flyoutin 
      if (wpsFLY_state==1) {
         if (wpsFLY_isIE) {
            if (wpsFLY_leftResize == null) {
               wpsFLY_leftResize = wpsFLY_browserDimensions.getScrollFromLeft();
            }
            wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
            wpsFLY_FlyoutLeft.css.overflow = 'hidden';
            wpsFLY_FlyoutLeft.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_leftResize);
         } else {
            wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_FlyoutLeft.getWidth() - 4);
         }
      }
   }

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      setTimeout('wpsFLY_internalScrollLeft()',20);

}

// -----------------------------------------------------------------
// The internal resize left function.
// -----------------------------------------------------------------
function wpsFLY_internalResizeLeft(){
      
   if (wpsFLY_isIE) {
      wpsFLY_leftResize = wpsFLY_browserDimensions.getScrollFromLeft(); - wpsFLY_browserDimensions.getViewableAreaWidth();
   }

}

// -----------------------------------------------------------------
// Expand the flyout. The parameter skipSlide indicates whether or not
// the flyout should simply be rendered without the slide-out effect.
// ----------------------------------------------------------------- 
function wpsFLY_moveOutFlyout( skipSlide )
{
   if (this.wpsFLY_Flyout != null)
   {
      if ( wpsFLY_state && !skipSlide ) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveOut(); 
      }
      
      if ( wpsFLY_state && skipSlide )
      {
          wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + document.body.scrollLeft - wpsFLY_Flyout.width);
          wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);
          wpsFLY_Flyout.go=0;
          wpsFLY_state=0;
          document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";
      }
      
   }

   if (this.wpsFLY_FlyoutLeft != null)
   {      
      if ( wpsFLY_state && !skipSlide ) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveOutLeft(); 
      }
      
      if ( wpsFLY_state && skipSlide )
      {
      	 if ( wpsFLY_isIE )
      	 {
		     wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
    	     wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);
			 wpsFLY_FlyoutLeft.go=0;
			 wpsFLY_state=0;	
		 }
		 else
		 {
		 	 wpsFLY_FlyoutLeft.setLeft( document.body.scrollLeft);
   		     wpsFLY_FlyoutLeft.go=0;
		     wpsFLY_state=0;
		 }
		 document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";
	  }
   }
}

// -----------------------------------------------------------------
// Called to close the flyout. This is the method that the function
// external to the flyout should call.
// ----------------------------------------------------------------- 
function wpsFLY_moveInFlyout()
{
   if (this.wpsFLY_Flyout != null)
   {
      if (!wpsFLY_state) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveIn();
      }
   }

   if (this.wpsFLY_FlyoutLeft != null)
   {
      if (!wpsFLY_state) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveInLeft();
      }
   }
   
   document.getElementById('wpsFLYflyout').className = "portalFlyoutCollapsed";
}

// -----------------------------------------------------------------
// Called to toggle the flyout. This is the method that the function
// external to the flyout should call.
// -----------------------------------------------------------------
function wpsFLY_toggleFlyout(index, skipSlide)
{
	if(flyOut[index] != null){
	var checkIndex = index;
	var prevIndex=wpsFLY_getCurrIndex();
	
	if(checkIndex==prevIndex){
        
		if(flyOut[index].active==true){
			flyOut[index].active=false;
            /*
			document.getElementById("toolBarIcon"+prevIndex).src = flyOut[prevIndex].icon;	
			document.getElementById("toolBarIcon"+prevIndex).alt = flyOut[prevIndex].altText;
			document.getElementById("toolBarIcon"+prevIndex).title = flyOut[prevIndex].altText;
			*/
		}
		else{
			flyOut[index].active=true;
            /*
			document.getElementById("toolBarIcon"+index).src = flyOut[index].activeIcon;
			document.getElementById("toolBarIcon"+index).alt = flyOut[index].activeAltText;
			document.getElementById("toolBarIcon"+index).title = flyOut[index].activeAltText;
			*/
		}
        //Closing flyout, clear the state cookie.
        wpsFLY_clearStateCookie();
        wpsFLY_moveInFlyout();
	}else{
		if(prevIndex > -1){
			flyOut[prevIndex].active=false;
            /*
			document.getElementById("toolBarIcon"+prevIndex).src = flyOut[prevIndex].icon;	
			document.getElementById("toolBarIcon"+prevIndex).alt = flyOut[prevIndex].altText;
			document.getElementById("toolBarIcon"+prevIndex).title = flyOut[prevIndex].altText;
			*/
		}
		
		flyOut[index].active=true;
        /*
		document.getElementById("toolBarIcon"+index).src = flyOut[index].activeIcon;
		document.getElementById("toolBarIcon"+index).alt = flyOut[index].activeAltText;
		document.getElementById("toolBarIcon"+index).title = flyOut[index].activeAltText;
		*/
		wpsFLY_setCurrIndex(index);
		document.getElementById("wpsFLY_flyoutIFrame").src = flyOut[index].url;
	}
	
	if(wpsFLY_state){
		
        //Expanding flyout, store the open flyout index in the state cookie.
        wpsFLY_setStateCookie( index );
        wpsFLY_moveOutFlyout( skipSlide );
		}
	}
}

function wpsFLY_getCurrIndex()
{
	return wpsFLY_currIndex;
}

function wpsFLY_setCurrIndex(index)
{
	wpsFLY_currIndex = index;
}

// -----------------------------------------------------------------
// Create a cookie to track the state of the flyout. The value of the 
// cookie is the index of the open flyout. The cookie is marked for 
// deletion when the browser closes and the path is set to ensure the 
// cookie is valid for the entire site.
// -----------------------------------------------------------------
function wpsFLY_setStateCookie( index )
{
    document.cookie='portalOpenFlyout=' + index + '; path=/;';
}

// -----------------------------------------------------------------
// Clear the cookie by changing the value to null. By setting the expiration date in 
// the past, the cookie is marked for deletion when the browser closes.
// -----------------------------------------------------------------
function wpsFLY_clearStateCookie()
{
    document.cookie='portalOpenFlyout=null; expires=Wed, 1 Jan 2003 11:11:11 UTC; path=/;';
}

// -----------------------------------------------------------------
// Check which side of the page the flyout should show on
// -----------------------------------------------------------------
function wpsFLY_onloadShow( isRTL )
{
  if (this.wpsFLY_minFlyout != null) {
    var bodyObj = document.getElementById("FLYParent");
    if (bodyObj != null) {
      var showHidden = false;
      if (isRTL) { 
           bodyObj.onload = wpsFLY_initFlyoutLeft(showHidden);
       } else { 
      	   bodyObj.onload = wpsFLY_initFlyout(showHidden);
       } 	 
    }
  }
 }
// -----------------------------------------------------------------
// Write markup out to document for all flyout items
// -----------------------------------------------------------------
function wpsFLY_markupLoop( flyOut)
{	
 	for(arrayIndex = 0; arrayIndex < flyOut.length; arrayIndex++){
		if(flyOut[arrayIndex].url != "" && flyOut[arrayIndex].url != null){
			document.write('<li><a id="globalActionLink'+arrayIndex+'" href="javascript:void(0);" onclick="wpsFLY_toggleFlyout('+arrayIndex+'); return false;" >');
			document.write(flyOut[arrayIndex].altText);
            //document.write('<img src="'+flyOut[arrayIndex].icon+'" id="toolBarIcon'+arrayIndex+'" title="'+flyOut[arrayIndex].altText+'" border="0" alt="'+flyOut[arrayIndex].altText+'" onmouseover="this.src=flyOut['+arrayIndex+'].hoverIcon;" onmouseout="if (flyOut['+arrayIndex+'].active) {this.src=flyOut['+arrayIndex+'].activeIcon;} else this.src=flyOut['+arrayIndex+'].icon;" />');            
			document.write('</a></li>');
		}
		
		if ( javascriptEventController )
		{
			javascriptEventController.register( "globalActionLink" + arrayIndex );
			//javascriptEventController.register( "toolBarIcon" + arrayIndex );
		}
	}
}

// -----------------------------------------------------------------
// If we have an empty expanded flyout (via the back button), load 
// the previously open flyout.
// -----------------------------------------------------------------
function wpsFLY_checkForEmptyExpandedFlyout()
{
	var index = wpsFLY_getInitialFlyoutState();
	
	if ( index != null && flyOut[index] != null)
	{
		document.getElementById("wpsFLY_flyoutIFrame").src = flyOut[index].url;
	}
}

// -----------------------------------------------------------------
// Determine if the flyout should initially open and which flyout 
// should be loaded. 
// -----------------------------------------------------------------
function wpsFLY_getInitialFlyoutState()
{
	// Determine if the flyout's initial state is open or closed.
	if ( document.cookie.indexOf( "portalOpenFlyout=" ) >= 0 )
	{
	    var cookies = document.cookie.split(";");
	
	    var c = 0;
	    while ( c < cookies.length && ( cookies[c].indexOf( "portalOpenFlyout=" ) == -1 ) )
	    {
	        c=c+1;
	    }
	
	    initCookieValue = cookies[c].substring( 18, cookies[c].length );
	    
	    if ( initCookieValue != "null" )
	    {
	        return initCookieValue;
	    }
	    else
	    {
	        return null;
	    }
	}
	else
	{
		return null;
	}
	
}
var wpsInlineShelf_initShelfExpanded = wpsInlineShelf_getInitialShelfState();

// Current state of the flyout for the life of the request (true=expanded, false=collapsed)
var wpsInlineShelf_stateExpanded = false;

var wpsInlineShelf_currIndex = -1;

var wpsInlineShelf_loadingMsg = null;

function wpsInlineShelf_markupLoop( shelves )
{	
 	for(arrayIndex = 0; arrayIndex < shelves.length; arrayIndex++){
		if(shelves[arrayIndex].url != "" && shelves[arrayIndex].url != null){
			document.write('<li><a id="globalActionLinkInlineShelf'+arrayIndex+'" href="javascript:void(0);" onclick="wpsInlineShelf_toggleShelf('+arrayIndex+'); return false;" >');
			document.write(shelves[arrayIndex].altText+" ");
            document.write('<img src="'+shelves[arrayIndex].icon+'" id="toolBarIcon'+arrayIndex+'" title="'+shelves[arrayIndex].altText+'" border="0" alt="'+shelves[arrayIndex].altText+'" onmouseover="this.src=wptheme_InlineShelves['+arrayIndex+'].hoverIcon;" onmouseout="if (wptheme_InlineShelves['+arrayIndex+'].active) {this.src=wptheme_InlineShelves['+arrayIndex+'].activeIcon;} else this.src=wptheme_InlineShelves['+arrayIndex+'].icon;" />');            
			document.write('</a></li>');
		}
		
		if ( javascriptEventController )
		{
			javascriptEventController.register( "globalActionLinkInlineShelf" + arrayIndex );
		}
	}
}

// -----------------------------------------------------------------
// Called to toggle the shelf. This is the method that the function
// external to the shelf should call.
// -----------------------------------------------------------------
function wpsInlineShelf_toggleShelf(index, skipZoom)
{
	if(wptheme_InlineShelves[index] != null) {
    	var checkIndex = index;
    	var prevIndex=wpsInlineShelf_getCurrIndex();
        var newIframeUrl = null;

    	if(checkIndex==prevIndex){
            
    		if(wptheme_InlineShelves[index].active==true){
    			wptheme_InlineShelves[index].active=false;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).src = wptheme_InlineShelves[prevIndex].icon;	
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).alt = wptheme_InlineShelves[prevIndex].altText;
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).title = wptheme_InlineShelves[prevIndex].altText;
    			*/
                wpsInlineShelf_stateExpanded = false;
    		}else{
    			wptheme_InlineShelves[index].active=true;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+index).src = wptheme_InlineShelves[index].activeIcon;
    			document.getElementById("globalActionLinkInlineShelf"+index).alt = wptheme_InlineShelves[index].activeAltText;
    			document.getElementById("globalActionLinkInlineShelf"+index).title = wptheme_InlineShelves[index].activeAltText;
    			*/
                wpsInlineShelf_stateExpanded = true;
    		}
    	}else{
    		if(prevIndex > -1){
    			wptheme_InlineShelves[prevIndex].active=false;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).src = wptheme_InlineShelves[prevIndex].icon;	
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).alt = wptheme_InlineShelves[prevIndex].altText;
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).title = wptheme_InlineShelves[prevIndex].altText;
    			*/
    		}
    		
    		wptheme_InlineShelves[index].active=true;
            /*
    		document.getElementById("globalActionLinkInlineShelf"+index).src = wptheme_InlineShelves[index].activeIcon;
    		document.getElementById("globalActionLinkInlineShelf"+index).alt = wptheme_InlineShelves[index].activeAltText;
    		document.getElementById("globalActionLinkInlineShelf"+index).title = wptheme_InlineShelves[index].activeAltText;
    		*/
    		wpsInlineShelf_setCurrIndex(index);
            wpsInlineShelf_stateExpanded = true;

            newIframeUrl = wptheme_InlineShelves[index].url;
//    		document.getElementById("wpsInlineShelf_shelfIFrame").src = wptheme_InlineShelves[index].url;
    	}
    	
    	if(wpsInlineShelf_stateExpanded){
            //Expanding flyout, store the open shelf index in the state cookie.
            wpsInlineShelf_setStateCookie( index );
            wpsInlineShelf_expandShelf( skipZoom, newIframeUrl );
		} else {
            //Closing shelf, clear the state cookie.
            wpsInlineShelf_clearStateCookie();
            wpsInlineShelf_collapseShelf();
        }
	}
}


function wpsInlineShelf_getCurrIndex()
{
	return wpsInlineShelf_currIndex;
}

function wpsInlineShelf_setCurrIndex(index)
{
	wpsInlineShelf_currIndex = index;
}

// -----------------------------------------------------------------
// Create a cookie to track the state of the shelf. The value of the 
// cookie is the index of the open shelf. The cookie is marked for 
// deletion when the browser closes and the path is set to ensure the 
// cookie is valid for the entire site.
// -----------------------------------------------------------------
function wpsInlineShelf_setStateCookie( index )
{
    document.cookie='portalOpenInlineShelf=' + index + '; path=/;';
}

// -----------------------------------------------------------------
// Clear the cookie by changing the value to null. By setting the expiration date in 
// the past, the cookie is marked for deletion when the browser closes.
// -----------------------------------------------------------------
function wpsInlineShelf_clearStateCookie()
{
    document.cookie='portalOpenInlineShelf=null; expires=Wed, 1 Jan 2003 11:11:11 UTC; path=/;';
}

// -----------------------------------------------------------------
// Determine if the shelf should initially open and which shelf 
// should be loaded. 
// -----------------------------------------------------------------
function wpsInlineShelf_getInitialShelfState()
{
	// Determine if the shelf's initial state is expanded or collapsed.
	if ( document.cookie.indexOf( "portalOpenInlineShelf=" ) >= 0 )
	{
	    var cookies = document.cookie.split(";");
	
	    var c = 0;
	    while ( c < cookies.length && ( cookies[c].indexOf( "portalOpenInlineShelf=" ) == -1 ) )
	    {
	        c=c+1;
	    }
	
	    initCookieValue = cookies[c].substring( ("portalOpenInlineShelf=".length)+1, cookies[c].length );
	    
	    if ( initCookieValue != "null" )
	    {
	        return initCookieValue;
	    }
	    else
	    {
	        return null;
	    }
	}
	else
	{
		return null;
	}
	
}


// -----------------------------------------------------------------
// Expand the shelf. The parameter skipZoom indicates whether or not
// the shelf should simply be rendered without the zoom-out effect.
// NOTE: The zoom-out effect is not implemented yet.
// ----------------------------------------------------------------- 
function wpsInlineShelf_expandShelf( skipZoom, newIframeUrl )
{
    var shelf = document.getElementById("wpsInlineShelf");
    
    wpsInlineShelf_stateExpanded = false;

    // attach event listeners so when the URL loads or reloads, the iframe will be shown and resized.
    wpsInlineShelf_AttachIframeEventListeners("wpsInlineShelf_shelfIFrame");

    // show the shelf... but not the iframe yet...
    shelf.style.display = "block";

    // We change the URL AFTER the event listeners are hooked up.
    // If we are not changing the URL, we need to manually resize the iframe.
    if (null != newIframeUrl) {
        // when loading a new URL, display the spinning loading graphic
        wpsInlineShelf_loadingMsg.show(document.getElementById("wpsInlineShelf"));
        document.getElementById("wpsInlineShelf_shelfIFrame").src = newIframeUrl;
    } else {
        wpsInlineShelf_resizeIframe("wpsInlineShelf_shelfIFrame");
    }

}


// -----------------------------------------------------------------
// Collapse the shelf. The parameter skipZoom indicates whether or not
// the shelf should simply be rendered without the zoom-in effect.
// NOTE: The zoom-in effect is not implemented yet yet.
// ----------------------------------------------------------------- 
function wpsInlineShelf_collapseShelf( skipZoom )
{
    var shelf = document.getElementById("wpsInlineShelf");
    var iframe = document.getElementById("wpsInlineShelf_shelfIFrame");

    shelf.style.display = "none";
    iframe.style.display = "none";
    wpsInlineShelf_loadingMsg.hide();
    wpsInlineShelf_stateExpanded = true;
}

// -----------------------------------------------------------------
// Check which side of the page the shelf should show on
// -----------------------------------------------------------------
function wpsInlineShelf_onloadShow( isRTL )
{
    if ( wpsInlineShelf_initShelfExpanded != null )
    {
        wpsInlineShelf_toggleShelf( wpsInlineShelf_initShelfExpanded, true );
    }   
}


var wpsInlineShelf_getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var wpsInlineShelf_FFextraHeight=parseFloat(wpsInlineShelf_getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function wpsInlineShelf_resizeIframe(iframeID){
    var iframe=document.getElementById(iframeID)

    iframe.style.display = "block";
    wpsInlineShelf_loadingMsg.hide();

    if (iframe && !window.opera) {

/*
		// put the background color style onto the body of the document in the iframe
		if (iframe.contentDocument) {
			var iframeDocBody = iframe.contentDocument.body;
			if (iframeDocBody.className.indexOf("wpsInlineShelfIframeDocBody",0) == -1) {
				iframeDocBody.className = iframeDocBody.className + " wpsInlineShelfIframeDocBody";
			}
		}
*/
        if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) //ns6 syntax
            iframe.height = iframe.contentDocument.body.offsetHeight+wpsInlineShelf_FFextraHeight;
        else if (iframe.Document && iframe.Document.body.scrollHeight) //ie5+ syntax
            iframe.height = iframe.Document.body.scrollHeight;
    }
}

function wpsInlineShelf_AttachIframeEventListeners(iframeID) {
    var iframe=document.getElementById(iframeID)
    if (iframe && !window.opera) {

        if (iframe.addEventListener){
            iframe.addEventListener("load", wpsInlineShelf_IframeOnloadEventListener, false)
        } else if (iframe.attachEvent){
            iframe.detachEvent("onload", wpsInlineShelf_IframeOnloadEventListener) // Bug fix line
            iframe.attachEvent("onload", wpsInlineShelf_IframeOnloadEventListener)
        }
    }
}

function wpsInlineShelf_IframeOnloadEventListener(loadevt) {
    var crossevt=(window.event)? event : loadevt
    var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
    if (iframeroot) {
        wpsInlineShelf_resizeIframe(iframeroot.id);
    }
}

// -----------------------------------------------------------------
// If we have an empty expanded shelf (via the back button), load 
// the previously open shelf.
// -----------------------------------------------------------------
function wpsInlineShelf_checkForEmptyExpandedShelf() {
	var index = wpsInlineShelf_getInitialShelfState();
    
	if ( index != null && wptheme_InlineShelves[index] != null)
	{
		document.getElementById("wpsInlineShelf_shelfIFrame").src = wptheme_InlineShelves[index].url;
	}
}

wptheme_QuickLinksShelf = {
	_cookieUtils: wptheme_CookieUtils,
	cookieName: null,
	expand: function () {
		// summary: Expand the quick links shelf.
		document.getElementById("wptheme-expandedQuickLinksShelf").style.display='block';
        document.getElementById("wptheme-collapsedQuickLinksShelf").style.display='none';
        if ( this.cookieName != null ) {
        	this._cookieUtils.deleteCookie( this.cookieName );
        }	
        return false;
	},
	collapse: function () {
		// summary: Collapse the quick links shelf.
		document.getElementById("wptheme-expandedQuickLinksShelf").style.display='none';
        document.getElementById("wptheme-collapsedQuickLinksShelf").style.display='block';
        if ( this.cookieName != null ) {
        	var expires = new Date();
        	expires.setDate( expires.getDate() + 5 );
        	this._cookieUtils.setCookie( this.cookieName, "small", expires );
        }
        return false;
	}
}

var wpsInlineShelf_LoadingImage = function ( /*String*/cssClassName, /*String*/imageURL, /*String*/imageText ) {
    // summary: creates loading image for inline shelf
    // cssClassName: the class name to apply to the overlaid div
    // imageURL: the url to the image to display in the center of the overlaid div
    // imageText: the text to display next to the image    

    var elem = document.createElement( "DIV" );
    elem.className = cssClassName;
    elem.id = cssClassName;

    if ( imageURL && imageURL != "" && imageText ) {
        elem.innerHTML = "<img src='"+ imageURL + "' border=\"0\" alt=\"\" />&nbsp;" + imageText;
    }   
    
    var appended = false;
    
    this.show = function ( refNode ) { 
        if ( !appended ) {
            refNode.appendChild( elem );
            appended= true;
        }
        
        elem.style.display = 'block';
    }

    this.hide = function () {
        elem.style.display = 'none';
    }
}

/*        
        
        //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
        var iframehide="yes"

        var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
        var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

        function resizeCaller() {
                if (document.getElementById)
                        resizeIframe("myiframe")

                //reveal iframe for lower end browsers? (see var above):
                if ((document.all || document.getElementById) && iframehide=="no"){
                        var tempobj=document.all? document.all["myiframe"] : document.getElementById("myiframe")
                        tempobj.style.display="block"
                }
        }
        function resizeIframe(frameid){
                var currentfr=document.getElementById(frameid)
                if (currentfr && !window.opera) {
                        currentfr.style.display="block"
                        if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
                                currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
                        else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
                                currentfr.height = currentfr.Document.body.scrollHeight;

                        if (currentfr.addEventListener){
                                currentfr.addEventListener("load", readjustIframe, false)
                        }
                        else if (currentfr.attachEvent){
                currentfr.detachEvent("onload", readjustIframe) // Bug fix line
                currentfr.attachEvent("onload", readjustIframe)
            }
                }
        }

        function readjustIframe(loadevt) {
                var crossevt=(window.event)? event : loadevt
                var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
                if (iframeroot)
                resizeIframe(iframeroot.id);
        }

        function wptheme_ExpandToolsShelf() {
		//loadToolsIframe('myiframe', '${inlineTCUrl}');
                document.getElementById("wptheme-expandedToolsShelf").style.display='block';
	        document.getElementById("wptheme-collapsedToolsShelf").style.display='none';
		//document.getElementById("wptheme-expandedToolsShelfLink").style.display='block';
		//document.getElementById("wptheme-collapsedToolsShelfLink").style.display='none';
		document.getElementById("toolsShelfCollapseLink").style.display='block';
		document.getElementById("toolsShelfExpandLink").style.display='none';
		loadToolsIframe('myiframe', '${inlineTCUrl}');
                //if (document.getElementById)
                //      resizeIframe("myiframe");
                resizeCaller();
                wptheme_createCookie("<%=toolsShelfCookie%>",'small',7);
        return false;
    }

        function wptheme_CollapseToolsShelf() {
                document.getElementById("wptheme-expandedToolsShelf").style.display='none';
        	document.getElementById("wptheme-collapsedToolsShelf").style.display='block';
		//document.getElementById("wptheme-expandedToolsShelfLink").style.display='none';
                //document.getElementById("wptheme-collapsedToolsShelfLink").style.display='block';
		document.getElementById("toolsShelfCollapseLink").style.display='none';
                document.getElementById("toolsShelfExpandLink").style.display='block';
                wptheme_eraseCookie("<%=toolsShelfCookie%>");
        return false;
    }
	function loadToolsIframe(iframeName, toolsUrl){
		alert('loading tools iframe');
		if (document.getElementById) {
			document.getElementById(iframeName).src = toolsUrl;
		}
		return false;
    }
    
*/    
var wptheme_InlinePalettes = {
    // summary: Manages the inline palette(s). Tracks the iframe used to display the palettes, as well as the persistent state.
    // description: Palettes managed by this object must be added using the addPalette method. The addPalette method expects a
    //      PaletteContext object which has the following structure:
    //      {
    //          url: the url to set the iframe to (for CSA, only used as the initial url)
    //          page: the unique id of the page the url will be pointing to
    //          portlet: the unique id of the portlet control the url will be pointing to
    //          newWindow: indicates whether or not the url should be rendered using the Plain theme template
    //          portletWindowState: the window state the portlet should be in
    //          selectionDependent: indicates whether or not the url changes based on the current page selection
    //      }
    //      This PaletteContext object is required to support client-side aggregation. Since, in client-side aggregation,
    //      the page does not always reload in between page changes, the palette may need to be refreshed as the selection
    //      changes in client-side aggregation. This context object gives the client-side aggregation engine all the info
    //      it needs to create the appropriate url for the palette, as needed.
    // paletteStatus: indicates whether the palette is open or closed (0 = closed, 1 = open)
    // iframeID: the ID/NAME of the iframe to use
    // loadingDecorator: the decoration to display while the iframe is loading
    // currentIndex: the index (into the paletteContextArray) of the currently displaying palette
    // cookieName: the cookie used to store the state of the palette
    // paletteContextArray: the array of PaletteContext objects
    // urlFactory: only used in client-side aggregation -- set during the CSA theme's bootstrap, this function takes the PaletteContext
    //      object described above as the only parameter and returns the url to use to display the palette
    
    // INITIALIZATION
    className: "wptheme_InlinePalettes",

    //HTML element IDs
    iframeID: "wpsFLY_flyoutIFrame",    
    
    //Persistent state of the palette
    paletteStatus: 0,  // 0 = closed, 1 = open
    currentIndex: -1,   // the index of the paletteContextArray which is currently displaying
    cookieName: "portalOpenFlyout", 
    
    //Decoration to display while the palette is loading
    loadingDecorator: null, //needs to provide 2 functions: show and hide. show will receive a single parameter -- the node which should be covered with the decoration
    
    //Instance variables
    urlFactory: null,   //expected to be set in the bootstrap of the CSA theme. takes the context as a single parameter and returns the url as the output.
    paletteContextArray: [],    // Array of palettes which can be displayed
    
    //Debug
    debug: wptheme_DebugUtils,
    
    init: function ( /*Document?*/doc) {
        // summary: Initializes the inline palettes. Usually executed on page load.
        // description: Checks to see if the persisted state indicates the palette should be open or closed. If open, the proper location
        //      should be loaded into the iframe and displayed.
        // doc: OPTIONAL -- specifies the document to use when initializing (for use when called from within an iframe, for example).
        if ( this.debug.enabled ) { this.debug.log( this.className, "init( " + [ doc ] + ")" ); }
        
        if ( !doc ) { doc = document; }
        
        //Retrieve the persisted value. This will be the index into the PaletteContextArray.
        var value = this.getPersistedValue();
        if ( this.debug.enabled ) { this.debug.log( this.className, "retrieved value: " + value ); }
        if ( value != null && this.paletteContextArray[ value ] ) {
            this.show( value, true );
        } else {
            this.hide();
        }
        
        if ( this.debug.enabled ) { this.debug.log( this.className, "return init" ); }
    },
    
    // DISPLAY CONTROL 
    
    showCurrent: function () {
        // summary: Displays the current index or auto selects an index if no current index is selected.
        var indexToShow = 0;
        if ( this.currentIndex > -1 ) {
            indexToShow = this.currentIndex;
        }
        
        this.show( indexToShow );
    },
    
    show: function (/*int*/index, /*boolean?*/skipAnimation) {
        // summary: Displays the specified url in the palette.
        // url: the url for the iframe.
        // skipAnimation: OPTIONAL -- skips the loading decorator show/hide steps (used for the case where the palette is open on an initial page load
        if ( this.debug.enabled ) { this.debug.log( this.className, "show( " + [ index, skipAnimation ] + ")" ); }
        
        var iframe = this._getIframeElement();
        if ( !iframe ) { return false; }
        
        var url = this.getURL( index );
        
        iframe.parentNode.style.display = "block";
        //If we have to load the iframe, call postShow onload. Otherwise, call it immediately since the
        //iframe is already loaded.
        if ( window.frames[this.iframeID].location.href != url ) {
            if ( !skipAnimation && this.loadingDecorator != null && this.loadingDecorator.show ) {
                this.loadingDecorator.show( iframe.parentNode.parentNode );
            }
            iframe.src = url;
        }
        else {
            //The location hasn't changed so go ahead and call the post show behavior. Normally, the post show 
            //behavior executes once the iframe is loaded. 
            this._doPostShow();
        }
        
        this.persist( index );
        this.paletteStatus = 1;
        this.currentIndex = index;
    },
    hide: function ( doc ) {
        // summary: Hides the active palette.
        if ( this.debug.enabled ) { this.debug.log( this.className, "hide( " + [ doc ] + ")" ); }
        var iframe = this._getIframeElement( doc );
        if ( !iframe ) { return false; }
        
        iframe.parentNode.style.display = "none";
        this.paletteStatus = 0;
        this.currentIndex = -1;
        
        //Execute the post hide behavior.
        this._doPostHide();
    },
    _doPostShow: function () {
        // summary: Called after the iframe is loaded and ready to display.
        // description: Performs any sizing adjustments necessary (possibly IE) and hides the loading decoration.
        if ( this.debug.enabled ) { this.debug.log( this.className, "_doPostShow()" ); }
        var iframe = this._getIframeElement();
        if ( iframe.parentNode.style.display == "none" ) { return false; }
        iframe.style.visibility = "visible";
        
        if ( typeof ( dojo ) != "undefined" ) {
            var size = dojo.contentBox( iframe );
            if ( size.h < 300) {
                //IE doesn't correctly size the iframe when height is set to 100%. So if the height
                //is still 0 (IE 6) or small (IE7)after setting the display and visibility, set it manually to the height
                //of the TD element.
                var size = dojo.contentBox( iframe.parentNode.parentNode );
                iframe.style.height = size.h + "px";
            }
        }   
        
        if ( this.loadingDecorator != null && this.loadingDecorator.hide ) {
            this.loadingDecorator.hide();
        }
    },
    _doPostHide: function () {
        // summary: Execute any actions that need to occur after the palette is hidden from view.
        if ( this.debug.enabled ) { this.debug.log( this.className, "_doPostHide()" ); }
        var iframe = this._getIframeElement();
        iframe.style.visibility = "hidden";
    },
    
    // PERSISTENT STATE CONTROL
    
    persist: function ( /*String*/value ) {
        // summary: Persist the given value in a cookie.
        if ( this.debug.enabled ) { this.debug.log( this.className, "persist(" + [ value ] + ")" ); }
        wptheme_CookieUtils.setCookie( this.cookieName, value );
    },
    getPersistedValue: function () {
        // summary: Retrieve the persisted state for the inline palettes, if one exists.
        // description: Looks for the "portalOpenFlyout" cookie and parses out it's value.
        // returns: the persisted value for the portalOpenFlyout cookie or NULL if no value exists.
        if ( this.debug.enabled ) { this.debug.log( this.className, "getPersistedValue()" ); }
        return wptheme_CookieUtils.getCookie( this.cookieName );
    },
    unpersist: function () {
        // summary: Clears out the persisted value.
        // description: Sets the cookie's value to NULL and sets it to expire in the past.
        // returns: the index of the persisted value
        if ( this.debug.enabled ) { this.debug.log( this.className, "unpersist()" ); }
        var value = this.getPersistedValue();
        wptheme_CookieUtils.deleteCookie( this.cookieName );
        return value;
    },
    
    // UTILITY
    
    _getIframeElement: function ( /*Document?*/doc ) {
        // summary: Retrieves the iframe HTML element from the HTML document specified. If no HTML document is specified,
        //      the global HTML document is used.
        // doc: OPTIONAL -- specify the HTML document in which to look up the IFRAME object.
        // returns: the iframe HTML element
        if ( this.debug.enabled ) { this.debug.log( this.className,  "_getIframeElement( " + [ doc ] + ")" ); }
        if ( !doc ) { doc = document; }
        return doc.getElementById( this.iframeID );     // the IFRAME HTML element
    },
    addPalette: function ( /*PaletteContext*/context ) {
        if ( this.debug.enabled ){ this.debug.log( this.className, "addPalette( " + [ context ] + ")" ); }
        this.paletteContextArray.push( context );
    },
    
    getURL: function ( /*int*/value ) {
        if ( this.debug.enabled ) { this.debug.log( this.className, "getURL( " + [ value ] + ")" ); }
        var url = this.paletteContextArray[ value ].url;
        if ( document.isCSA && this.urlFactory != null ) {
            url = this.urlFactory( this.paletteContextArray[ value ] );
        }
        return url;
    }
    
    
}

var wptheme_DarkTransparentLoadingDecorator = function ( /*String*/cssClassName, /*String*/imageURL, /*String*/imageText ) {
    // summary: Displays a partially opaque overlay with a centered image and text to partially obscure and prevent
    //      interaction with a loading portion of the HTML page.
    // cssClassName: the class name to apply to the overlaid div
    // imageURL: the url to the image to display in the center of the overlaid div
    // imageText: the text to display next to the image
    this.className = "wptheme_DarkTransparentLoadingDecorator";
    
    var elem = document.createElement( "DIV" );
    elem.className = cssClassName;
    elem.style.position = "absolute";
    
    if ( imageURL && imageURL != "" && imageText ) {
        var text = document.createElement( "DIV" );
        text.style.position = "relative";
        text.style.top = "50%";
        text.style.left = "40%";
        text.innerHTML = "<img src='"+ imageURL + "' />&nbsp;" + imageText;
        elem.appendChild( text );
    }   
    
    var appended = false;
    
    this.show = function ( refNode ) { 
        if ( !appended ) {
            document.body.appendChild( elem );
            appended= true;
        }
        
        elem.style.display = 'block';
        elem.style.top = (dojo.coords( refNode, true ).y + 1) + "px";
        elem.style.left = (dojo.coords( refNode, true ).x + 1)  + "px";
      
        var size = dojo.contentBox( refNode );
        elem.style.height = (size.h - 2) + "px";
        elem.style.width = (size.w - 2) + "px";
    }

    this.hide = function () {
        elem.style.display = 'none';
    }
}

var wptheme_InlinePalettesContainer = { 
    // summary: Manages the inline palettes container.
    // description: Manages the container which holds the palettes. Made up of two parts: the first is the container.
    //      The container holds the links to select a palette, as well as, the actual iframe which displays
    //      the palette once a palette is selected. The second is the toggle element. The toggle element is
    //      the html element which actually opens and closes the container element.
    // containerStatus: indicates whether the container is open or closed (0 = closed, 1 = open)
    // openCssClassName: indicates the CSS class name which should be applied when the container is open
    // closedCssClassName: indicates the CSS class name which should be applied when the container is closed
    // containerElementID: the id of the html element which actually holds the palettes
    // toggleElementID: the id of the html element which is the toggle element
    // lastIndex: the index of the last palette that was opened
    // cookieName: the name of the cookie used to store the container's last state
    // cookieUtils: the utility object used to set and unset cookies - default is wptheme_CookieUtils
    // htmlUtils: the utility object used for adding/removing css classnames - default is wptheme_HTMLElementUtils
    // paletteManager: the object which contains the information about the palettes to display inside the container
    //      default is wptheme_InlinePalettes
    className: "wptheme_InlinePalettesContainer",
    
    containerStatus: 0,     //0 = closed, 1 = open
    openCssClassName: "wptheme-flyoutExpanded",
    closedCssClassName: "wptheme-flyoutCollapsed",
    toggleElementID: "wptheme-flyoutToggle",
    containerElementID: "wptheme-flyout",
    lastIndex: null,
    cookieName: "portalFlyoutIsOpen",
    cookieUtils: wptheme_CookieUtils,
    htmlUtils: wptheme_HTMLElementUtils,
    paletteManager: wptheme_InlinePalettes,
    
    //Main functions.
    init: function ( /*HTMLDocument?*/doc ) {
        // summary: Initializes and sets the appropriate visibilites for the container and the
        //      palettes inside.
        // doc: OPTIONAL -- used when called from an iframe
        var cookie = this.cookieUtils.getCookie( this.cookieName );
        if ( cookie && cookie != "null" ) {
            this.containerStatus = parseInt( cookie );
        }
        
        if ( this.paletteManager.paletteContextArray.length == 0 ) {
            this.disable();
        }
        else {
            if ( this.containerStatus ) {
                this.paletteManager.init();
                this._show();
            }
            else {
                this._hide();
            }
            this._makeVisible();
        }
    },
    toggle: function () {
        // summary: Toggles the container between open and closed state.
        
        if ( this.containerStatus ) {
            this.containerStatus = 0;
            this._hide();           
        }   
        else {
            this.containerStatus = 1;
            this._show();
        }
    },
    persist: function () {
        // summary: Sets the cookie with the current container status.
        this.cookieUtils.setCookie( this.cookieName, this.containerStatus );
        if ( this.paletteManager.currentIndex == this.lastIndex ) {
            this.paletteManager.persist( this.lastIndex );
        }
    },
    unpersist: function () {
        // summary: Removes the cookie which holds the state of the flyout.
        this.cookieUtils.deleteCookie( this.cookieName );
        this.lastIndex = this.paletteManager.unpersist();
    },
    _makeVisible: function () {
        // summary: Shows the toggle element AND the container element.
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        toggleElement.style.visibility = 'visible';
    },
    disable: function () {
        // summary: Hides the toggle element AND the container element.
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        

        if (toggleElement != null) {
            toggleElement.style.display = 'none';
        }
        if (containerElement != null) {
            containerElement.style.display = 'none';
        }
    },
    _hide: function () {
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        
        if ( !toggleElement || !containerElement ) {
            throw Error( "Unable to retrieve the necessary markup elements! The palettes may not function correctly.");
        }
        
        //Closing the container.
        this.htmlUtils.removeClassName( toggleElement, this.openCssClassName );
        this.htmlUtils.addClassName( toggleElement, this.closedCssClassName );
        containerElement.style.display = 'none';
        
        //Persistence cleanup.
        this.unpersist();       
    },
    _show: function () {
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        
        if ( !toggleElement || !containerElement ) {
            throw Error( "Unable to retrieve the necessary markup elements! The palettes may not function correctly.");
        }
        
        //Opening the container.
        this.htmlUtils.removeClassName( toggleElement, this.closedCssClassName );
        this.htmlUtils.addClassName( toggleElement, this.openCssClassName );
        containerElement.style.display = 'block';
        
        this.paletteManager.showCurrent();
        
        //Persistence cleanup.
        this.persist();
    }
}
//If we aren't inside an iframe, go ahead and register the init function so it's called on page load. This is where we check for 
//a palette's persistent state and handle other startup tasks.
if ( top.location == self.location ) {
    wptheme_InlinePalettesContainer.htmlUtils.addOnload( function () { wptheme_InlinePalettesContainer.init(); } );
};
//Shows an IFRAME inside a lightbox which blocks access to the page.
var wptheme_IFrameLightbox = function ( /*String*/disabledBackgroundClassname, /*String*/borderBoxClassname, /*String*/closeLinkClassname, /*String*/closeString ) {
	// summary: Creates a "lightbox" effect where a partially opaque div is set to cover the entire viewable area of the browser and the content
	//		is displayed in an iframe in approximately the middle of the viewable area.
	// description: Creates a div the size of the viewable area of the browser which is styled using the given "disabledBackgroundClassname". The iframe is
	//		displayed inside another div which is approximately centered and styled according to the given "borderBoxClassname". The content of the iframe is
	//		set using the "setURL" function. The "lightbox" is closed via a text anchor link which is positioned above the top right edge of the border box. The
	//		text displayed is controlled using the "closeString" parameter and the link is styled according to the "closeLinkClassname".
	// disabledBackgroundClassname: the CSS class name to apply to the background div displayed when the lightbox is showing
	// borderBoxClassname: the CSS class name to apply to the border box in the center of the page
	// closeString: the string which will be displayed as the link to close the lightbox
	this.className = "wptheme_IFrameLightbox";
	
	//Declare this here so that any dependency error (e.g. wptheme_HTMLElementUtils not yet being defined)
	//is clear from the beginning (throws an error at construction time instead of runtime). Also, allows
	//for easy substitution of alternate implementations (as long as function names & signatures are the same).
	this._htmlUtils = wptheme_HTMLElementUtils;
	this._debugUtils = wptheme_DebugUtils;
	
	this._initialized = false;
	this.showing = false;
	
	var uniquePrefix = this._htmlUtils.getUniqueId();
	this._backgroundDivId = uniquePrefix + "_lightboxPageBackgroundDiv";
	this._borderDivId = uniquePrefix + "_lightboxBorderDiv";
	this._closeLinkId = uniquePrefix + "_lightboxCloseLink";
	this._iframeId = uniquePrefix + "_lightboxIframe";
	
	// ****************************************************************
	// * Dynamically created DOM elements. 
	// ****************************************************************

	function createDiv(idStr, className, parent ) {
		// summary: Creates a div with the given ID, class, and appends to the given parent node. The display property is set to none by default.
		var div = document.createElement( "DIV" ); 
		div.id = idStr;
		div.className = className;
		div.style.display = "none";
		parent.appendChild( div );
		return div;
	}
	var me = this;
	function createLink(idStr, className, text, parent) {
		// summary: Creates a link with the given ID, class, textContent, and appends it to the given parent node. The display property is set to none
		//		by default. The onclick is set to hide the lightbox.
		var a = document.createElement( "A" );
		a.id = idStr;
		a.className = className;
		a.href = "javascript:void(0);";
		a.onclick = function () { me.hide() };
		a.style.display = "none";
		a.appendChild( document.createTextNode( text ) );
		parent.appendChild( a );
		return a;
	}
	
	function createIFrame( idStr, parent ) {
		// summary: Creates an iframe with the given ID (also used for the name) and appends it to the given parent node.
		var iframe = document.createElement( "IFRAME" );
		iframe.name = idStr;
		iframe.id = idStr;
		//iframe.style.display = "none";
		parent.appendChild( iframe );
		return iframe;
	}
	
	// ****************************************************************
	// * Initialization.
	// ****************************************************************
	
	this._init = function () {
		this._initialized = true;
		//Create the background div.
		createDiv( this._backgroundDivId, disabledBackgroundClassname, document.body );
		//Create the border box div
		createIFrame( this._iframeId, createDiv( this._borderDivId, borderBoxClassname, document.body ));
		//Create the close link.
		createLink( this._closeLinkId, closeLinkClassname, closeString, document.body );
	}
	
	// ****************************************************************
	// * Handling the browser scrolling and resizing dynamically.
	// ****************************************************************

	//Make sure to call any existing onscroll handler.
	var oldScrollFunc = window.onscroll;
	window.onscroll = function (e) {
		if ( me.showing ) {
			me.sizeAndPositionBorderBox();
			//me.sizeBackgroundDisablingDiv();
		}
		
		if ( oldScrollFunc ) {
			if (e) {
				oldScrollFunc(e);
			}
			else  {
				oldScrollFunc();
			}
		}
	}
	
	//Make sure to call any existing onresize handler.
	var oldResizeFunc = window.onresize;
	window.onresize = function (e) {
		if ( me.showing ) {
			me.sizeAndPositionBorderBox();
			me.sizeBackgroundDisablingDiv();
		}
		
		if ( oldResizeFunc ) {
			if (e) {
				oldResizeFunc(e);
			}
			else  {
				oldResizeFunc();
			}
		}
	}

	// ****************************************************************
	// * Main functions for use in the theme.
	// ****************************************************************
	
	this.setURL = function ( /*String*/url ) {
		// summary: Sets the URL displayed by the IFRAME in the lightbox.
		// url: the url to the resource to display
		window.frames[this._iframeId].location = url;
	}
	
	
	
	this.show = function ( /*String?*/url ) {
		// summary: Shows the lightbox above the disabled background div. 
		// url: OPTIONAL -- the url to display in the iframe in the center of the screen 
		if ( !this._initialized ) {
			this._init();
		}
		
		this.showing = true;
		
		this.disableBackground();
		this.showBorderBox();
		if ( url ) { 
			this.setURL( url );
		}		
	}
	
	this.hide = function() {
		// summary: Hides the lightbox and the disabled background div.
		if ( !this._initialized ) {
			this._init();
		}
		
		this.showing = false;
		
		this.enableBackground();
		this.hideBorderBox();
	}
	
	// ****************************************************************
	// * Content border box 
	// ****************************************************************
	this.showBorderBox = function () {
		// summary: Shows and positions the border box which contains the IFRAME.
		var div = document.getElementById( this._borderDivId );
		div.style.display = "block";
		var link = document.getElementById( this._closeLinkId );
		link.style.display = "block";
		
		this.sizeAndPositionBorderBox();
	}
	
	this.sizeAndPositionBorderBox = function () {
		// summary: Sizes and positions the border box which contains the IFRAME.
		var div = document.getElementById( this._borderDivId );
		this._htmlUtils.sizeRelativeToViewableArea( div, 0.60, 0.75 );
		this._htmlUtils.positionRelativeToViewableArea( div, 0.20, 0.12 );
		var link = document.getElementById( this._closeLinkId );
		this._htmlUtils.positionOutsideElementTopRight( link, div );
	}
	
	this.hideBorderBox = function () {
		// summary: hides the border box and IFRAME.
		document.getElementById( this._borderDivId ).style.display = "none";
		document.getElementById( this._closeLinkId ).style.display = "none";
	}
	
	// **************************************************************** 
	// * Transparent background controls
	// ****************************************************************
	this.disableBackground = function () {
		// summary: Disables the background by laying a transparent div over top of the document body.
		var div = document.getElementById( this._backgroundDivId );
		div.style.display = "block";
		this.sizeBackgroundDisablingDiv();
		this._htmlUtils.hideElementsByTagName( "select" );
	}
	
	this.sizeBackgroundDisablingDiv = function () {
		// summary: Sizes the transparent div appropriately.
		var div = document.getElementById( this._backgroundDivId );
		//dynamically size the div to the inner browser window
		this._htmlUtils.sizeToEntireArea( div );
	}
	
	this.enableBackground=function () {
		// summary: Enables the background by hiding the overlaid div.
		this._htmlUtils.showElementsByTagName( "select" );
		document.getElementById( this._backgroundDivId ).style.display = "none";
	}
};
/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _8=_1[i];_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";_3+=(i==0?"":",")+_8[0];_4+=(i==0?"":",")+_8[1];_5[_8[0]]=_8[1];_6[_8[1]]=_8[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _c=tn+"";console[_c]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_c+":");console["log"](a.join(" "));}:function(){};})();}}}if(typeof dojo=="undefined"){this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){this.dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){this.dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _f in djConfig){d.config[_f]=djConfig[_f];}}dojo.locale=d.config.locale;var rev="$Rev: 18832 $".match(/\d+/);dojo.version={major:1,minor:3,patch:2,flag:"",revision:rev?+rev[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _11={};dojo._mixin=function(obj,_13){for(var x in _13){if(_11[x]===undefined||_11[x]!=_13[x]){obj[x]=_13[x];}}if(d.isIE&&_13){var p=_13.toString;if(typeof p=="function"&&p!=obj.toString&&p!=_11.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){obj.toString=_13.toString;}}return obj;};dojo.mixin=function(obj,_17){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_1a,_1b,_1c){var obj=_1c||d.global;for(var i=0,p;obj&&(p=_1a[i]);i++){if(i==0&&this._scopeMap[p]){p=this._scopeMap[p];}obj=(p in obj?obj[p]:(_1b?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_20,_21,_22){var _23=_20.split("."),p=_23.pop(),obj=d._getProp(_23,true,_22);return obj&&p?(obj[p]=_21):undefined;};dojo.getObject=function(_26,_27,_28){return d._getProp(_26.split("."),_27,_28);};dojo.exists=function(_29,obj){return !!d.getObject(_29,false,obj);};dojo["eval"]=function(_2b){return d.global.eval?d.global.eval(_2b):eval(_2b);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_2d){var mp=this._modulePrefixes;return !!(mp[_2d]&&mp[_2d].value);},_getModulePrefix:function(_2f){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_2f)){return mp[_2f].value;}return _2f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_31,_32,cb){var uri=((_31.charAt(0)=="/"||_31.match(/^\w+:/))?"":this.baseUrl)+_31;try{return !_32?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_32,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _37=this._getText(uri,true);if(!_37){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_37="("+_37+")";}else{_37=this._scopePrefix+_37+this._scopeSuffix;}if(d.isMoz){_37+="\r\n//@ sourceURL="+uri;}var _38=d["eval"](_37);if(cb){cb(_38);}return true;};dojo._loadUriAndCheck=function(uri,_3a,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&this._loadedModules[_3a]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=d._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _43=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_43.call(obj);});}}};dojo.addOnLoad=function(obj,_45){d._onto(d._loaders,obj,_45);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){if(dojo.isAIR){setTimeout(function(){dojo.loaded();},0);}else{setTimeout(dojo._scopeName+".loaded();",0);}}else{d.loaded();}};dojo._getModuleSymbols=function(_47){var _48=_47.split(".");for(var i=_48.length;i>0;i--){var _4a=_48.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_4a)){_48[0]="../"+_48[0];}else{var _4b=this._getModulePrefix(_4a);if(_4b!=_4a){_48.splice(0,i,_4b);break;}}}return _48;};dojo._global_omit_module_check=false;dojo.loadInit=function(_4c){_4c();};dojo._loadModule=dojo.require=function(_4d,_4e){_4e=this._global_omit_module_check||_4e;var _4f=this._loadedModules[_4d];if(_4f){return _4f;}var _50=this._getModuleSymbols(_4d).join("/")+".js";var _51=(!_4e)?_4d:null;var ok=this._loadPath(_50,_51);if(!ok&&!_4e){throw new Error("Could not load '"+_4d+"'; last tried '"+_50+"'");}if(!_4e&&!this._isXDomain){_4f=this._loadedModules[_4d];if(!_4f){throw new Error("symbol '"+_4d+"' is not defined after loading '"+_50+"'");}}return _4f;};dojo.provide=function(_53){_53=_53+"";return (d._loadedModules[_53]=d.getObject(_53,true));};dojo.platformRequire=function(_54){var _55=_54.common||[];var _56=_55.concat(_54[d._name]||_54["default"]||[]);for(var x=0;x<_56.length;x++){var _58=_56[x];if(_58.constructor==Array){d._loadModule.apply(d,_58);}else{d._loadModule(_58);}}};dojo.requireIf=function(_59,_5a){if(_59===true){var _5b=[];for(var i=1;i<arguments.length;i++){_5b.push(arguments[i]);}d.require.apply(d,_5b);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_5d,_5e){d._modulePrefixes[_5d]={name:_5d,value:_5e};};dojo.requireLocalization=function(_5f,_60,_61,_62){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null;var _a=arguments;var uri=[_a[0]];for(var i=1;i<_a.length;i++){if(!_a[i]){continue;}var _69=new d._Url(_a[i]+"");var _6a=new d._Url(uri[0]+"");if(_69.path==""&&!_69.scheme&&!_69.authority&&!_69.query){if(_69.fragment!=n){_6a.fragment=_69.fragment;}_69=_6a;}else{if(!_69.scheme){_69.scheme=_6a.scheme;if(!_69.authority){_69.authority=_6a.authority;if(_69.path.charAt(0)!="/"){var _6b=_6a.path.substring(0,_6a.path.lastIndexOf("/")+1)+_69.path;var _6c=_6b.split("/");for(var j=0;j<_6c.length;j++){if(_6c[j]=="."){if(j==_6c.length-1){_6c[j]="";}else{_6c.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_6c[0]=="")&&_6c[j]==".."&&_6c[j-1]!=".."){if(j==(_6c.length-1)){_6c.splice(j,1);_6c[j-1]="";}else{_6c.splice(j-1,2);j-=2;}}}}_69.path=_6c.join("/");}}}}uri=[];if(_69.scheme){uri.push(_69.scheme,":");}if(_69.authority){uri.push("//",_69.authority);}uri.push(_69.path);if(_69.query){uri.push("?",_69.query);}if(_69.fragment){uri.push("#",_69.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_6f,url){var loc=d._getModuleSymbols(_6f).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _72=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_72==-1||_72>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _74=document.getElementsByTagName("script");var _75=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_74.length;i++){var src=_74[i].getAttribute("src");if(!src){continue;}var m=src.match(_75);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_74[i].getAttribute("djConfig");if(cfg){var _7a=eval("({ "+cfg+" })");for(var x in _7a){dojo.config[x]=_7a[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;var _80=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_80&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_80+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1]||dua.split("Shiretoko/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;if(d.isIE>=8&&document.documentMode!=5){d.isIE=document.documentMode;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}var cm=document.compatMode;d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _82,_83;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_82=new XMLHttpRequest();}catch(e){}}if(!_82){for(var i=0;i<3;++i){var _85=d._XMLHTTP_PROGIDS[i];try{_82=new ActiveXObject(_85);}catch(e){_83=e;}if(_82){d._XMLHTTP_PROGIDS=[_85];break;}}}if(!_82){throw new Error("XMLHTTP not available: "+_83);}return _82;};d._isDocumentOk=function(_86){var _87=_86.status||0;return (_87>=200&&_87<300)||_87==304||_87==1223||(!_87&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _88=window.location+"";var _89=document.getElementsByTagName("base");var _8a=(_89&&_89.length>0);d._getText=function(uri,_8c){var _8d=this._xhrObj();if(!_8a&&dojo._Url){uri=(new dojo._Url(_88,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_8d.open("GET",uri,false);try{_8d.send(null);if(!d._isDocumentOk(_8d)){var err=Error("Unable to load "+uri+" status:"+_8d.status);err.status=_8d.status;err.responseText=_8d.responseText;throw err;}}catch(e){if(_8c){return null;}throw e;}return _8d.responseText;};var _w=window;var _90=function(_91,fp){var _93=_w[_91]||function(){};_w[_91]=function(){fp.apply(_w,arguments);_93.apply(_w,arguments);};};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _95=0;d.addOnWindowUnload=function(obj,_97){d._onto(d._windowUnloaders,obj,_97);if(!_95){_95=1;_90("onunload",d.windowUnloaded);}};var _98=0;d.addOnUnload=function(obj,_9a){d._onto(d._unloaders,obj,_9a);if(!_98){_98=1;_90("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _9c=e&&e.type?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_9c!="domcontentloaded"&&_9c!="load")){return;}arguments.callee.initialized=true;if("_khtmlTimer" in dojo){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};if(!dojo.config.afterOnLoad){if(document.addEventListener){if(dojo.isWebKit>525||dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){document.addEventListener("DOMContentLoaded",dojo._loadInit,null);}window.addEventListener("load",dojo._loadInit,null);}if(dojo.isAIR){window.addEventListener("load",dojo._loadInit,null);}else{if((dojo.isWebKit<525)||dojo.isKhtml){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML);  display:inline-block");}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _9e in mp){dojo.registerModulePath(_9e,mp[_9e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=(function(){var _a1=function(it){var t=typeof it;return it&&(t=="function"||it instanceof Function);};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false;}return _a1(it);}:_a1;})();dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));};dojo.isArrayLike=function(it){var d=dojo;return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_a9,_aa){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_a9.prototype,arguments[i]);}return _a9;};dojo._hitchArgs=function(_ad,_ae){var pre=dojo._toArray(arguments,2);var _b0=dojo.isString(_ae);return function(){var _b1=dojo._toArray(arguments);var f=_b0?(_ad||dojo.global)[_ae]:_ae;return f&&f.apply(_ad||this,pre.concat(_b1));};};dojo.hitch=function(_b3,_b4){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_b4){_b4=_b3;_b3=null;}if(dojo.isString(_b4)){_b3=_b3||dojo.global;if(!_b3[_b4]){throw (["dojo.hitch: scope[\"",_b4,"\"] is null (scope=\"",_b3,"\")"].join(""));}return function(){return _b3[_b4].apply(_b3,arguments||[]);};}return !_b3?_b4:function(){return _b4.apply(_b3,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_b7){TMP.prototype=obj;var tmp=new TMP();if(_b7){dojo._mixin(tmp,_b7);}return tmp;};})();(function(){var _b9=function(obj,_bb,_bc){return (_bc||[]).concat(Array.prototype.slice.call(obj,_bb||0));};var _bd=function(obj,_bf,_c0){var arr=_c0||[];for(var x=_bf||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=dojo.isIE?function(obj){return ((obj.item)?_bd:_b9).apply(this,arguments);}:_b9;})();dojo.partial=function(_c4){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo.clone=function(o){if(!o){return o;}if(dojo.isArray(o)){var r=[];for(var i=0;i<o.length;++i){r.push(dojo.clone(o[i]));}return r;}if(!dojo.isObject(o)){return o;}if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}r=new o.constructor();for(i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");dojo.declare=function(_cb,_cc,_cd){var dd=arguments.callee,_cf;if(dojo.isArray(_cc)){_cf=_cc;_cc=_cf.shift();}if(_cf){dojo.forEach(_cf,function(m,i){if(!m){throw (_cb+": mixin #"+i+" is null");}_cc=dd._delegate(_cc,m);});}var _d2=dd._delegate(_cc);_cd=_cd||{};_d2.extend(_cd);dojo.extend(_d2,{declaredClass:_cb,_constructor:_cd.constructor});_d2.prototype.constructor=_d2;return dojo.setObject(_cb,_d2);};dojo.mixin(dojo.declare,{_delegate:function(_d3,_d4){var bp=(_d3||0).prototype,mp=(_d4||0).prototype,dd=dojo.declare;var _d8=dd._makeCtor();dojo.mixin(_d8,{superclass:bp,mixin:mp,extend:dd._extend});if(_d3){_d8.prototype=dojo._delegate(bp);}dojo.extend(_d8,dd._core,mp||0,{_constructor:null,preamble:null});_d8.prototype.constructor=_d8;_d8.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return _d8;},_extend:function(_d9){var i,fn;for(i in _d9){if(dojo.isFunction(fn=_d9[i])&&!0[i]){fn.nom=i;fn.ctor=this;}}dojo.extend(this,_d9);},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_dc){var c=_dc.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_dc,ii,fn;if(a[0]){if(((fn=a[0].preamble))){a=fn.apply(this,a)||a;}}if((fn=c.prototype.preamble)){a=fn.apply(this,a)||a;}if(ct&&ct.apply){ct.apply(this,a);}if(mct&&mct.apply){mct.apply(this,a);}if((ii=c.prototype._constructor)){ii.apply(this,_dc);}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,_dc);}},_findMixin:function(_e5){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_e5||(m instanceof _e5.constructor)){return p;}if(m&&m._findMixin&&(m=m._findMixin(_e5))){return m;}c=p&&p.constructor;}},_findMethod:function(_e9,_ea,_eb,has){var p=_eb,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_e9,_ea,m,has))){return m;}if((f=p[_e9])&&(has==(f==_ea))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_eb))&&this._findMethod(_e9,_ea,p,has);},inherited:function(_f1,_f2,_f3){var a=arguments;if(!dojo.isString(a[0])){_f3=_f2;_f2=_f1;_f1=_f2.callee.nom;}a=_f3||_f2;var c=_f2.callee,p=this.constructor.prototype,fn,mp;if(this[_f1]!=c||p[_f1]==c){mp=(c.ctor||0).superclass||this._findMethod(_f1,c,p,true);if(!mp){throw (this.declaredClass+": inherited method \""+_f1+"\" mismatch");}p=this._findMethod(_f1,c,mp,false);}fn=p&&p[_f1];if(!fn){throw (mp.declaredClass+": inherited method \""+_f1+"\" not found");}return fn.apply(this,a);}}});}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_100,_101,_102){_100=_100||dojo.global;var f=_100[_101];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_100[_101]=d;}return f._listeners.push(_102);},remove:function(_105,_106,_107){var f=(_105||dojo.global)[_106];if(f&&f._listeners&&_107--){delete f._listeners[_107];}}};dojo.connect=function(obj,_10a,_10b,_10c,_10d){var a=arguments,args=[],i=0;args.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){args.push(a[i]);}return dojo._connect.apply(this,args);};dojo._connect=function(obj,_113,_114,_115){var l=dojo._listener,h=l.add(obj,_113,dojo.hitch(_114,_115));return [obj,_113,h,l];};dojo.disconnect=function(_118){if(_118&&_118[0]!==undefined){dojo._disconnect.apply(this,_118);delete _118[0];}};dojo._disconnect=function(obj,_11a,_11b,_11c){_11c.remove(obj,_11a,_11b);};dojo._topics={};dojo.subscribe=function(_11d,_11e,_11f){return [_11d,dojo._listener.add(dojo._topics,_11d,dojo.hitch(_11e,_11f))];};dojo.unsubscribe=function(_120){if(_120){dojo._listener.remove(dojo._topics,_120[0],_120[1]);}};dojo.publish=function(_121,args){var f=dojo._topics[_121];if(f){f.apply(this,args||[]);}};dojo.connectPublisher=function(_124,obj,_126){var pf=function(){dojo.publish(_124,arguments);};return (_126)?dojo.connect(obj,_126,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_128){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_128;this.silentlyCancelled=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,cbfn){var _132=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_132,_132);},addCallback:function(cb,cbfn){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,cbfn){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire();}return this;},_fire:function(){var _139=this.chain;var _13a=this.fired;var res=this.results[_13a];var self=this;var cb=null;while((_139.length>0)&&(this.paused==0)){var f=_139.shift()[_13a];if(!f){continue;}var func=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_13a=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){self._resback(res);self.paused--;if((self.paused==0)&&(self.fired>=0)){self._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(err){_13a=1;res=err;}}}this.fired=_13a;this.results[_13a]=res;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(json){return eval("("+json+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_145,_146){if(it===undefined){return "undefined";}var _147=typeof it;if(_147=="number"||_147=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _148=arguments.callee;var _149;_146=_146||"";var _14a=_145?_146+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_149=tf.call(it);if(it!==_149){return _148(_149,_145,_14a);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_145?" ":"";var _14d=_145?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_148(obj,_145,_14a);if(typeof val!="string"){val="undefined";}return _14d+_14a+val;});return "["+res.join(","+sep)+_14d+_146+"]";}if(_147=="function"){return null;}var _151=[],key;for(key in it){var _153,val;if(typeof key=="number"){_153="\""+key+"\"";}else{if(typeof key=="string"){_153=dojo._escapeString(key);}else{continue;}}val=_148(it[key],_145,_14a);if(typeof val!="string"){continue;}_151.push(_14d+_14a+_153+":"+sep+val);}return "{"+_151.join(","+sep)+_14d+_146+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _155=function(arr,obj,cb){return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];};dojo.mixin(dojo,{indexOf:function(_159,_15a,_15b,_15c){var step=1,end=_159.length||0,i=0;if(_15c){i=end-1;step=end=-1;}if(_15b!=undefined){i=_15b;}if((_15c&&i>end)||i<end){for(;i!=end;i+=step){if(_159[i]==_15a){return i;}}}return -1;},lastIndexOf:function(_15f,_160,_161){return dojo.indexOf(_15f,_160,_161,true);},forEach:function(arr,_163,_164){if(!arr||!arr.length){return;}var _p=_155(arr,_164,_163);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_168,arr,_16a,_16b){var _p=_155(arr,_16b,_16a);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){var _16f=!!_p[2].call(_p[1],arr[i],i,arr);if(_168^_16f){return _16f;}}return _168;},every:function(arr,_171,_172){return dojo._everyOrSome(true,arr,_171,_172);},some:function(arr,_174,_175){return dojo._everyOrSome(false,arr,_174,_175);},map:function(arr,_177,_178){var _p=_155(arr,_178,_177);arr=_p[0];var _17a=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_17a.push(_p[2].call(_p[1],arr[i],i,arr));}return _17a;},filter:function(arr,_17e,_17f){var _p=_155(arr,_17f,_17e);arr=_p[0];var _181=[];for(var i=0,l=arr.length;i<l;++i){if(_p[2].call(_p[1],arr[i],i,arr)){_181.push(arr[i]);}}return _181;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_185){if(_185){this.setColor(_185);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_18b){if(d.isString(_18b)){d.colorFromString(_18b,this);}else{if(d.isArray(_18b)){d.colorFromArray(_18b,this);}else{this._set(_18b.r,_18b.g,_18b.b,_18b.a);if(!(_18b instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_191){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_191?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_194,end,_196,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_194[x]+(end[x]-_194[x])*_196;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_19a,obj){var m=_19a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_19d,obj){var t=obj||new d.Color(),bits=(_19d.length==4)?4:8,mask=(1<<bits)-1;_19d=Number("0x"+_19d.substr(1));if(isNaN(_19d)){return null;}d.forEach(["b","g","r"],function(x){var c=_19d&mask;_19d>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_1aa,_1ab){dojo.global=_1aa;dojo.doc=_1ab;};dojo.withGlobal=function(_1ac,_1ad,_1ae,_1af){var _1b0=dojo.global;try{dojo.global=_1ac;return dojo.withDoc.call(null,_1ac.document,_1ad,_1ae,_1af);}finally{dojo.global=_1b0;}};dojo.withDoc=function(_1b1,_1b2,_1b3,_1b4){var _1b5=dojo.doc,_1b6=dojo._bodyLtr;try{dojo.doc=_1b1;delete dojo._bodyLtr;if(_1b3&&dojo.isString(_1b2)){_1b2=_1b3[_1b2];}return _1b2.apply(_1b3,_1b4||[]);}finally{dojo.doc=_1b5;if(_1b6!==undefined){dojo._bodyLtr=_1b6;}}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _1bb=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(dojo.isFF<=2){try{e.relatedTarget.tagName;}catch(e2){return;}}if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_1bf,_1c0){if(node){_1bf=del._normalizeEventName(_1bf);if(!dojo.isIE&&(_1bf=="mouseenter"||_1bf=="mouseleave")){_1bf=(_1bf=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_1bf,_1c0,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_1c6){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_1c9){return del._fixEvent(evt,_1c9);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1cb=dojo._listener;dojo._connect=function(obj,_1cd,_1ce,_1cf,_1d0){var _1d1=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_1d1?(_1d0?2:1):0,l=[dojo._listener,del,_1cb][lid];var h=l.add(obj,_1cd,dojo.hitch(_1ce,_1cf));return [obj,_1cd,h,lid];};dojo._disconnect=function(obj,_1d6,_1d7,_1d8){([dojo._listener,del,_1cb][_1d8]).remove(obj,_1d6,_1d7);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};if(dojo.isIE){var _1d9=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _1dd=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_1cb=iel=dojo._ie_listener={handlers:[],add:function(_1de,_1df,_1e0){_1de=_1de||dojo.global;var f=_1de[_1df];if(!f||!f[_1dd]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_1dd]=[];f=_1de[_1df]=d;}return f[_1dd].push(ieh.push(_1e0)-1);},remove:function(_1e4,_1e5,_1e6){var f=(_1e4||dojo.global)[_1e5],l=f&&f[_1dd];if(f&&l&&_1e6--){delete ieh[l[_1e6]];delete l[_1e6];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1ea,fp){if(!node){return;}_1ea=del._normalizeEventName(_1ea);if(_1ea=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_1dd]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_1ea,del._fixCallback(fp));},remove:function(node,_1ef,_1f0){_1ef=del._normalizeEventName(_1ef);iel.remove(node,_1ef,_1f0);if(_1ef=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_1f2){return _1f2.slice(0,2)!="on"?"on"+_1f2:_1f2;},_nop:function(){},_fixEvent:function(evt,_1f4){if(!evt){var w=_1f4&&(_1f4.ownerDocument||_1f4.document||_1f4).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1f4||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1f8=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1f9=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1f8.scrollLeft||0)-_1f9.x;evt.pageY=evt.clientY+(_1f8.scrollTop||0)-_1f9.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_1dd]){return;}var k=evt.keyCode;var _1ff=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1ff||evt.ctrlKey){var c=_1ff?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_1d9(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1d9(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_204){var faux=dojo.mixin({},evt,_204);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_207){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_20a,fp){if(!node){return;}var _20c=del._add(node,_20a,fp);if(del._normalizeEventName(_20a)=="keypress"){_20c._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _20f=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_20f||evt.ctrlKey){var c=_20f?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _20c;},remove:function(node,_213,_214){if(node){if(_214._stealthKeyDownHandle){del._remove(node,"keydown",_214._stealthKeyDownHandle);}del._remove(node,_213,_214);}},_fixEvent:function(evt,_216){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_219){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_219,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_219,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(dojo.isString(id)){var _d=doc||dojo.doc;var te=_d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}}else{return id;}};}else{dojo.byId=function(id,doc){return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var _22f=null;d.addOnWindowUnload(function(){_22f=null;});dojo._destroyElement=dojo.destroy=function(node){node=d.byId(node);try{if(!_22f||_22f.ownerDocument!=node.ownerDocument){_22f=node.ownerDocument.createElement("div");}_22f.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_22f.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_232){try{node=d.byId(node);_232=d.byId(_232);while(node){if(node===_232){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_234){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=_234?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_234?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_234?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _236=function(node,ref){var _239=ref.parentNode;if(_239){_239.insertBefore(node,ref);}};var _23a=function(node,ref){var _23d=ref.parentNode;if(_23d){if(_23d.lastChild==ref){_23d.appendChild(node);}else{_23d.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_23f,_240){_23f=d.byId(_23f);if(d.isString(node)){node=node.charAt(0)=="<"?d._toDom(node,_23f.ownerDocument):d.byId(node);}if(typeof _240=="number"){var cn=_23f.childNodes;if(!cn.length||cn.length<=_240){_23f.appendChild(node);}else{_236(node,cn[_240<0?0:_240]);}}else{switch(_240){case "before":_236(node,_23f);break;case "after":_23a(node,_23f);break;case "replace":_23f.parentNode.replaceChild(node,_23f);break;case "only":d.empty(_23f);_23f.appendChild(node);break;case "first":if(_23f.firstChild){_236(node,_23f.firstChild);break;}default:_23f.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){var _dcm=document.compatMode;d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_249,_24a){return parseFloat(_24a)||0;};}else{d._toPixelValue=function(_24b,_24c){if(!_24c){return 0;}if(_24c=="medium"){return 4;}if(_24c.slice&&_24c.slice(-2)=="px"){return parseFloat(_24c);}with(_24b){var _24d=style.left;var _24e=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_24c;_24c=style.pixelLeft;}catch(e){_24c=0;}style.left=_24d;runtimeStyle.left=_24e;}return _24c;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_257){var ov=_257*100;node.style.zoom=1;af(node,1).Enabled=!(_257==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_257);});}return _257;}:function(node,_25b){return node.style.opacity=_25b;};var _25c={left:true,top:true};var _25d=/margin|padding|width|height|max|min|offset/;var _25e=function(node,type,_261){type=type.toLowerCase();if(d.isIE){if(_261=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_261){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _25c)){_25c[type]=_25d.test(type);}return _25c[type]?px(node,_261):_261;};var _262=d.isIE?"styleFloat":"cssFloat",_263={"cssFloat":_262,"styleFloat":_262,"float":_262};dojo.style=function(node,_265,_266){var n=d.byId(node),args=arguments.length,op=(_265=="opacity");_265=_263[_265]||_265;if(args==3){return op?d._setOpacity(n,_266):n.style[_265]=_266;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&!d.isString(_265)){for(var x in _265){d.style(node,x,_265[x]);}return s;}return (args==1)?s:_25e(n,_265,s[_265]||n.style[_265]);};dojo._getPadExtents=function(n,_26d){var s=_26d||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_272){var ne="none",s=_272||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_278){var s=_278||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_27d){var s=_27d||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_284){var s=_284||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_28f){var s=_28f||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_296){var s=_296||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_2a5,_2a6,_2a7){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_2a7);if(_2a5>=0){_2a5+=pb.w;}if(_2a6>=0){_2a6+=pb.h;}}d._setBox(node,NaN,NaN,_2a5,_2a6);};dojo._setMarginBox=function(node,_2aa,_2ab,_2ac,_2ad,_2ae){var s=_2ae||gcs(node),bb=d._usesBorderBox(node),pb=bb?_2b2:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_2ac>=0&&!ns.width){ns.width="4px";}if(_2ad>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_2ac>=0){_2ac=Math.max(_2ac-pb.w-mb.w,0);}if(_2ad>=0){_2ad=Math.max(_2ad-pb.h-mb.h,0);}d._setBox(node,_2aa,_2ab,_2ac,_2ad);};var _2b2={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _2bf=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_2c3=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_2c3+=val-0;if(node==_b){break;}}node=node.parentNode;}return _2c3;};dojo._docScroll=function(){var _b=d.body(),_w=d.global,de=d.doc.documentElement;return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};};dojo._isBodyLtr=function(){return ("_bodyLtr" in d)?d._bodyLtr:d._bodyLtr=gcs(d.body()).direction=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<7){return {x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};}else{if(d.isIE<8){return {x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top};}else{return {x:0,y:0};}}};dojo._fixIeBiDiScrollLeft=function(_2c9){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return _2c9+de.clientWidth-de.scrollWidth;}return _2c9;};dojo._abs=function(node,_2cd){var db=d.body(),dh=d.body().parentNode,ret;if(node["getBoundingClientRect"]){var _2d1=node.getBoundingClientRect();ret={x:_2d1.left,y:_2d1.top};if(d.isFF>=3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}if(d.isIE){var _2d3=d._getIeDocumentElementOffset();ret.x-=_2d3.x+(d.isQuirks?db.clientLeft:0);ret.y-=_2d3.y+(d.isQuirks?db.clientTop:0);}}else{ret={x:0,y:0};if(node["offsetParent"]){ret.x-=_2bf(node,"scrollLeft");ret.y-=_2bf(node,"scrollTop");var _2d4=node;do{var n=_2d4.offsetLeft,t=_2d4.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_2d4);if(_2d4!=node){if(d.isFF){ret.x+=2*px(_2d4,cs.borderLeftWidth);ret.y+=2*px(_2d4,cs.borderTopWidth);}else{ret.x+=px(_2d4,cs.borderLeftWidth);ret.y+=px(_2d4,cs.borderTopWidth);}}if(d.isFF&&cs.position=="static"){var _2d7=_2d4.parentNode;while(_2d7!=_2d4.offsetParent){var pcs=gcs(_2d7);if(pcs.position=="static"){ret.x+=px(_2d4,pcs.borderLeftWidth);ret.y+=px(_2d4,pcs.borderTopWidth);}_2d7=_2d7.parentNode;}}_2d4=_2d4.offsetParent;}while((_2d4!=dh)&&_2d4);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_2cd){var _2d9=d._docScroll();ret.x+=_2d9.x;ret.y+=_2d9.y;}return ret;};dojo.coords=function(node,_2db){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,_2db);mb.x=abs.x;mb.y=abs.y;return mb;};var _2e0=d.isIE<8;var _2e1=function(name){switch(name.toLowerCase()){case "tabindex":return _2e0?"tabIndex":"tabindex";case "readonly":return "readOnly";case "class":return "className";case "for":case "htmlfor":return _2e0?"htmlFor":"for";default:return name;}};var _2e3={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType",classname:"className",innerhtml:"innerHTML"};dojo.hasAttr=function(node,name){node=d.byId(node);var _2e6=_2e1(name);_2e6=_2e6=="htmlFor"?"for":_2e6;var attr=node.getAttributeNode&&node.getAttributeNode(_2e6);return attr?attr.specified:false;};var _2e8={},_ctr=0,_2ea=dojo._scopeName+"attrid",_2eb={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_2ee){node=d.byId(node);var args=arguments.length;if(args==2&&!d.isString(name)){for(var x in name){d.attr(node,x,name[x]);}return;}name=_2e1(name);if(args==3){if(d.isFunction(_2ee)){var _2f1=d.attr(node,_2ea);if(!_2f1){_2f1=_ctr++;d.attr(node,_2ea,_2f1);}if(!_2e8[_2f1]){_2e8[_2f1]={};}var h=_2e8[_2f1][name];if(h){d.disconnect(h);}else{try{delete node[name];}catch(e){}}_2e8[_2f1][name]=d.connect(node,name,_2ee);}else{if(typeof _2ee=="boolean"){node[name]=_2ee;}else{if(name==="style"&&!d.isString(_2ee)){d.style(node,_2ee);}else{if(name=="className"){node.className=_2ee;}else{if(name==="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _2eb){d.empty(node);node.appendChild(d._toDom(_2ee,node.ownerDocument));}else{node[name]=_2ee;}}else{node.setAttribute(name,_2ee);}}}}}}else{var prop=_2e3[name.toLowerCase()];if(prop){return node[prop];}var _2f4=node[name];return (typeof _2f4=="boolean"||typeof _2f4=="function")?_2f4:(d.hasAttr(node,name)?node.getAttribute(name):null);}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_2e1(name));};dojo.create=function(tag,_2f8,_2f9,pos){var doc=d.doc;if(_2f9){_2f9=d.byId(_2f9);doc=_2f9.ownerDocument;}if(d.isString(tag)){tag=doc.createElement(tag);}if(_2f8){d.attr(tag,_2f8);}if(_2f9){d.place(tag,_2f9,pos);}return tag;};d.empty=d.isIE?function(node){node=d.byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){d.byId(node).innerHTML="";};var _2ff={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_300=/<\s*([\w\:]+)/,_301={},_302=0,_303="__"+d._scopeName+"ToDomId";for(var _304 in _2ff){var tw=_2ff[_304];tw.pre=_304=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _308=doc[_303];if(!_308){doc[_303]=_308=++_302+"";_301[_308]=doc.createElement("div");}frag+="";var _309=frag.match(_300),tag=_309?_309[1].toLowerCase():"",_30b=_301[_308],wrap,i,fc,df;if(_309&&_2ff[tag]){wrap=_2ff[tag];_30b.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_30b=_30b.firstChild;}}else{_30b.innerHTML=frag;}if(_30b.childNodes.length==1){return _30b.removeChild(_30b.firstChild);}df=doc.createDocumentFragment();while(fc=_30b.firstChild){df.appendChild(fc);}return df;};var _30f="className";dojo.hasClass=function(node,_311){return ((" "+d.byId(node)[_30f]+" ").indexOf(" "+_311+" ")>=0);};dojo.addClass=function(node,_313){node=d.byId(node);var cls=node[_30f];if((" "+cls+" ").indexOf(" "+_313+" ")<0){node[_30f]=cls+(cls?" ":"")+_313;}};dojo.removeClass=function(node,_316){node=d.byId(node);var t=d.trim((" "+node[_30f]+" ").replace(" "+_316+" "," "));if(node[_30f]!=t){node[_30f]=t;}};dojo.toggleClass=function(node,_319,_31a){if(_31a===undefined){_31a=!d.hasClass(node,_319);}d[_31a?"addClass":"removeClass"](node,_319);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a){a.constructor=d.NodeList;dojo._mixin(a,d.NodeList.prototype);return a;};var _321=function(f,a,o){a=[0].concat(aps.call(a,0));if(!a.sort){a=aps.call(a,0);}o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _326=function(f,o){return function(){this.forEach(_321(f,arguments,o));return this;};};var _329=function(f,o){return function(){return this.map(_321(f,arguments,o));};};var _32c=function(f,o){return function(){return this.filter(_321(f,arguments,o));};};var _32f=function(f,g,o){return function(){var a=arguments,body=_321(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _335=function(a){return a.length==1&&d.isString(a[0]);};var _337=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};var nl=d.NodeList,nlp=nl.prototype;nl._wrap=tnl;nl._adaptAsMap=_329;nl._adaptAsForEach=_326;nl._adaptAsFilter=_32c;nl._adaptWithCondition=_32f;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return tnl(f.apply(this,arguments));};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_32f(d[name],_335);});d.forEach(["connect","addClass","removeClass","toggleClass","empty"],function(name){nlp[name]=_326(d[name]);});dojo.extend(dojo.NodeList,{concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(a.constructor===NodeList||a.constructor==nl)?aps.call(a,0):a;});return tnl(apc.apply(t,m));},map:function(func,obj){return tnl(d.map(this,func,obj));},forEach:function(_348,_349){d.forEach(this,_348,_349);return this;},coords:_329(d.coords),place:function(_34a,_34b){var item=d.query(_34a)[0];return this.forEach(function(node){d.place(node,item,_34b);});},orphan:function(_34e){return (_34e?d._filterQueryResult(this,_34e):this).forEach(_337);},adopt:function(_34f,_350){return d.query(_34f).place(this[0],_350);},query:function(_351){if(!_351){return this;}var ret=this.map(function(node){return d.query(_351,node).filter(function(_354){return _354!==undefined;});});return tnl(apc.apply([],ret));},filter:function(_355){var a=arguments,_357=this,_358=0;if(d.isString(_355)){_357=d._filterQueryResult(this,a[0]);if(a.length==1){return _357;}_358=1;}return tnl(d.filter(_357,a[_358],a[_358+1]));},addContent:function(_359,_35a){var c=d.isString(_359)?d._toDom(_359,this[0]&&this[0].ownerDocument):_359,i,l=this.length-1;for(i=0;i<l;++i){d.place(c.cloneNode(true),this[i],_35a);}if(l>=0){d.place(c,this[l],_35a);}return this;},instantiate:function(_35d,_35e){var c=d.isFunction(_35d)?_35d:d.getObject(_35d);_35e=_35e||{};return this.forEach(function(node){new c(_35e,node);});},at:function(){var t=new dojo.NodeList();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t;}});d.forEach(["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"],function(evt){var _oe="on"+evt;nlp[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._queryListCtor=d.NodeList;var _36b=d.isString;var _36c=function(){return d.doc;};var _36d=((d.isWebKit||d.isMozilla)&&((_36c().compatMode)=="BackCompat"));var _36e=!!_36c().firstChild["children"]?"children":"childNodes";var _36f=">~+";var _370=false;var _371=function(){return true;};var _372=function(_373){if(_36f.indexOf(_373.slice(-1))>=0){_373+=" * ";}else{_373+=" ";}var ts=function(s,e){return trim(_373.slice(s,e));};var _377=[];var _378=-1,_379=-1,_37a=-1,_37b=-1,_37c=-1,inId=-1,_37e=-1,lc="",cc="",_381;var x=0,ql=_373.length,_384=null,_cp=null;var _386=function(){if(_37e>=0){var tv=(_37e==x)?null:ts(_37e,x);_384[(_36f.indexOf(tv)<0)?"tag":"oper"]=tv;_37e=-1;}};var _388=function(){if(inId>=0){_384.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _389=function(){if(_37c>=0){_384.classes.push(ts(_37c+1,x).replace(/\\/g,""));_37c=-1;}};var _38a=function(){_388();_386();_389();};var _38b=function(){_38a();if(_37b>=0){_384.pseudos.push({name:ts(_37b+1,x)});}_384.loops=(_384.pseudos.length||_384.attrs.length||_384.classes.length);_384.oquery=_384.query=ts(_381,x);_384.otag=_384.tag=(_384["oper"])?null:(_384.tag||"*");if(_384.tag){_384.tag=_384.tag.toUpperCase();}if(_377.length&&(_377[_377.length-1].oper)){_384.infixOper=_377.pop();_384.query=_384.infixOper.query+" "+_384.query;}_377.push(_384);_384=null;};for(;lc=cc,cc=_373.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_384){_381=x;_384={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_370)?this.otag:this.tag;}};_37e=x;}if(_378>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_378+1,x);}else{_cp.matchFor=ts((_37a||_378+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.slice(1,-1);}}_384.attrs.push(_cp);_cp=null;_378=_37a=-1;}else{if(cc=="="){var _38d=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_38d+cc;_cp.attr=ts(_378+1,x-_38d.length);_37a=x+1;}}}else{if(_379>=0){if(cc==")"){if(_37b>=0){_cp.value=ts(_379+1,x);}_37b=_379=-1;}}else{if(cc=="#"){_38a();inId=x+1;}else{if(cc=="."){_38a();_37c=x;}else{if(cc==":"){_38a();_37b=x;}else{if(cc=="["){_38a();_378=x;_cp={};}else{if(cc=="("){if(_37b>=0){_cp={name:ts(_37b+1,x),value:null};_384.pseudos.push(_cp);}_379=x;}else{if((cc==" ")&&(lc!=cc)){_38b();}}}}}}}}}return _377;};var _38e=function(_38f,_390){if(!_38f){return _390;}if(!_390){return _38f;}return function(){return _38f.apply(window,arguments)&&_390.apply(window,arguments);};};var _391=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _395=function(n){return (1==n.nodeType);};var _397="";var _398=function(elem,attr){if(!elem){return _397;}if(attr=="class"){return elem.className||_397;}if(attr=="for"){return elem.htmlFor||_397;}if(attr=="style"){return elem.style.cssText||_397;}return (_370?elem.getAttribute(attr):elem.getAttribute(attr,2))||_397;};var _39b={"*=":function(attr,_39d){return function(elem){return (_398(elem,attr).indexOf(_39d)>=0);};},"^=":function(attr,_3a0){return function(elem){return (_398(elem,attr).indexOf(_3a0)==0);};},"$=":function(attr,_3a3){var tval=" "+_3a3;return function(elem){var ea=" "+_398(elem,attr);return (ea.lastIndexOf(_3a3)==(ea.length-_3a3.length));};},"~=":function(attr,_3a8){var tval=" "+_3a8+" ";return function(elem){var ea=" "+_398(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_3ad){var _3ae=" "+_3ad+"-";return function(elem){var ea=" "+_398(elem,attr);return ((ea==_3ad)||(ea.indexOf(_3ae)==0));};},"=":function(attr,_3b2){return function(elem){return (_398(elem,attr)==_3b2);};}};var _3b4=(typeof _36c().firstChild.nextElementSibling=="undefined");var _ns=!_3b4?"nextElementSibling":"nextSibling";var _ps=!_3b4?"previousElementSibling":"previousSibling";var _3b7=(_3b4?_395:_371);var _3b8=function(node){while(node=node[_ps]){if(_3b7(node)){return false;}}return true;};var _3ba=function(node){while(node=node[_ns]){if(_3b7(node)){return false;}}return true;};var _3bc=function(node){var root=node.parentNode;var i=0,tret=root[_36e],ci=(node["_i"]||-1),cl=(root["_l"]||-1);if(!tret){return -1;}var l=tret.length;if(cl==l&&ci>=0&&cl>=0){return ci;}root["_l"]=l;ci=-1;for(var te=root["firstElementChild"]||root["firstChild"];te;te=te[_ns]){if(_3b7(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _3c5=function(elem){return !((_3bc(elem))%2);};var _3c7=function(elem){return ((_3bc(elem))%2);};var _3c9={"checked":function(name,_3cb){return function(elem){return !!d.attr(elem,"checked");};},"first-child":function(){return _3b8;},"last-child":function(){return _3ba;},"only-child":function(name,_3ce){return function(node){if(!_3b8(node)){return false;}if(!_3ba(node)){return false;}return true;};},"empty":function(name,_3d1){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false;}}return true;};},"contains":function(name,_3d8){var cz=_3d8.charAt(0);if(cz=="\""||cz=="'"){_3d8=_3d8.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_3d8)>=0);};},"not":function(name,_3dc){var p=_372(_3dc)[0];var _3de={el:1};if(p.tag!="*"){_3de.tag=1;}if(!p.classes.length){_3de.classes=1;}var ntf=_3e0(p,_3de);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_3e3){var pi=parseInt;if(_3e3=="odd"){return _3c7;}else{if(_3e3=="even"){return _3c5;}}if(_3e3.indexOf("n")!=-1){var _3e5=_3e3.split("n",2);var pred=_3e5[0]?((_3e5[0]=="-")?-1:pi(_3e5[0])):1;var idx=_3e5[1]?pi(_3e5[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred));}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred;}idx=idx%pred;}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred;}}}if(pred>0){return function(elem){var i=_3bc(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_3e3=idx;}}var _3ec=pi(_3e3);return function(elem){return (_3bc(elem)==_3ec);};}};var _3ee=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_370?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _3e0=function(_3f4,_3f5){if(!_3f4){return _371;}_3f5=_3f5||{};var ff=null;if(!("el" in _3f5)){ff=_38e(ff,_395);}if(!("tag" in _3f5)){if(_3f4.tag!="*"){ff=_38e(ff,function(elem){return (elem&&(elem.tagName==_3f4.getTag()));});}}if(!("classes" in _3f5)){each(_3f4.classes,function(_3f8,idx,arr){var re=new RegExp("(?:^|\\s)"+_3f8+"(?:\\s|$)");ff=_38e(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _3f5)){each(_3f4.pseudos,function(_3fd){var pn=_3fd.name;if(_3c9[pn]){ff=_38e(ff,_3c9[pn](pn,_3fd.value));}});}if(!("attrs" in _3f5)){each(_3f4.attrs,function(attr){var _400;var a=attr.attr;if(attr.type&&_39b[attr.type]){_400=_39b[attr.type](a,attr.matchFor);}else{if(a.length){_400=_3ee(a);}}if(_400){ff=_38e(ff,_400);}});}if(!("id" in _3f5)){if(_3f4.id){ff=_38e(ff,function(elem){return (!!elem&&(elem.id==_3f4.id));});}}if(!ff){if(!("default" in _3f5)){ff=_371;}}return ff;};var _403=function(_404){return function(node,ret,bag){while(node=node[_ns]){if(_3b4&&(!_395(node))){continue;}if((!bag||_408(node,bag))&&_404(node)){ret.push(node);}break;}return ret;};};var _409=function(_40a){return function(root,ret,bag){var te=root[_ns];while(te){if(_3b7(te)){if(bag&&!_408(te,bag)){break;}if(_40a(te)){ret.push(te);}}te=te[_ns];}return ret;};};var _40f=function(_410){_410=_410||_371;return function(root,ret,bag){var te,x=0,tret=root[_36e];while(te=tret[x++]){if(_3b7(te)&&(!bag||_408(te,bag))&&(_410(te,x))){ret.push(te);}}return ret;};};var _417=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _41b={};var _41c=function(_41d){var _41e=_41b[_41d.query];if(_41e){return _41e;}var io=_41d.infixOper;var oper=(io?io.oper:"");var _421=_3e0(_41d,{el:1});var qt=_41d.tag;var _423=("*"==qt);var ecs=_36c()["getElementsByClassName"];if(!oper){if(_41d.id){_421=(!_41d.loops&&_423)?_371:_3e0(_41d,{el:1,id:1});_41e=function(root,arr){var te=d.byId(_41d.id,(root.ownerDocument||root));if(!te||!_421(te)){return;}if(9==root.nodeType){return _391(te,arr);}else{if(_417(te,root)){return _391(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_41d.classes.length&&!_36d){_421=_3e0(_41d,{el:1,classes:1,id:1});var _428=_41d.classes.join(" ");_41e=function(root,arr,bag){var ret=_391(0,arr),te,x=0;var tret=root.getElementsByClassName(_428);while((te=tret[x++])){if(_421(te,root)&&_408(te,bag)){ret.push(te);}}return ret;};}else{if(!_423&&!_41d.loops){_41e=function(root,arr,bag){var ret=_391(0,arr),te,x=0;var tret=root.getElementsByTagName(_41d.getTag());while((te=tret[x++])){if(_408(te,bag)){ret.push(te);}}return ret;};}else{_421=_3e0(_41d,{el:1,tag:1,id:1});_41e=function(root,arr,bag){var ret=_391(0,arr),te,x=0;var tret=root.getElementsByTagName(_41d.getTag());while((te=tret[x++])){if(_421(te,root)&&_408(te,bag)){ret.push(te);}}return ret;};}}}}else{var _43e={el:1};if(_423){_43e.tag=1;}_421=_3e0(_41d,_43e);if("+"==oper){_41e=_403(_421);}else{if("~"==oper){_41e=_409(_421);}else{if(">"==oper){_41e=_40f(_421);}}}}return _41b[_41d.query]=_41e;};var _43f=function(root,_441){var _442=_391(root),qp,x,te,qpl=_441.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_441[i];x=_442.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_41c(qp);while(te=_442[x--]){gef(te,ret,bag);}if(!ret.length){break;}_442=ret;}return ret;};var _44b={},_44c={};var _44d=function(_44e){var _44f=_372(trim(_44e));if(_44f.length==1){var tef=_41c(_44f[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true;}return r;};}return function(root){return _43f(root,_44f);};};var nua=navigator.userAgent;var wk="WebKit/";var _456=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _457=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _459=(!!_36c()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_456));var _45a=function(_45b,_45c){if(_459){var _45d=_44c[_45b];if(_45d&&!_45c){return _45d;}}var _45e=_44b[_45b];if(_45e){return _45e;}var qcz=_45b.charAt(0);var _460=(-1==_45b.indexOf(" "));if((_45b.indexOf("#")>=0)&&(_460)){_45c=true;}var _461=(_459&&(!_45c)&&(_36f.indexOf(qcz)==-1)&&(!d.isIE||(_45b.indexOf(":")==-1))&&(!(_36d&&(_45b.indexOf(".")>=0)))&&(_45b.indexOf(":contains")==-1)&&(_45b.indexOf("|=")==-1));if(_461){var tq=(_36f.indexOf(_45b.charAt(_45b.length-1))>=0)?(_45b+" *"):_45b;return _44c[_45b]=function(root){try{if(!((9==root.nodeType)||_460)){throw "";}var r=root[qsa](tq);r[_457]=true;return r;}catch(e){return _45a(_45b,true)(root);}};}else{var _465=_45b.split(/\s*,\s*/);return _44b[_45b]=((_465.length<2)?_44d(_45b):function(root){var _467=0,ret=[],tp;while((tp=_465[_467++])){ret=ret.concat(_44d(tp)(root));}return ret;});}};var _46a=0;var _46b=d.isIE?function(node){if(_370){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_46a)||_46a);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_46a));};var _408=function(node,bag){if(!bag){return 1;}var id=_46b(node);if(!bag[id]){return bag[id]=1;}return 0;};var _471="_zipIdx";var _zip=function(arr){if(arr&&arr.nozip){return (qlc._wrap)?qlc._wrap(arr):arr;}var ret=new qlc();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_46a++;if(d.isIE&&_370){var _475=_46a+"";arr[0].setAttribute(_471,_475);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_471)!=_475){ret.push(te);}te.setAttribute(_471,_475);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_395(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_471]=_46a;}for(var x=1,te;te=arr[x];x++){if(arr[x][_471]!=_46a){ret.push(te);}te[_471]=_46a;}}}return ret;};d.query=function(_478,root){qlc=d._queryListCtor;if(!_478){return new qlc();}if(_478.constructor==qlc){return _478;}if(!_36b(_478)){return new qlc(_478);}if(_36b(root)){root=d.byId(root);if(!root){return new qlc();}}root=root||_36c();var od=root.ownerDocument||root.documentElement;_370=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_45a(_478)(root);if(r&&r.nozip&&!qlc._wrap){return r;}return _zip(r);};d.query.pseudos=_3c9;d._filterQueryResult=function(_47c,_47d){var _47e=new d._queryListCtor();var _47f=_3e0(_372(_47d)[0]);for(var x=0,te;te=_47c[x];x++){if(_47f(te)){_47e.push(te);}}return _47e;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function _483(obj,name,_486){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_486];}else{if(_d.isArray(val)){val.push(_486);}else{obj[name]=_486;}}};dojo.formToObject=function(_488){var ret={};var _48a="file|submit|image|reset|button|";_d.forEach(dojo.byId(_488).elements,function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(_in&&type&&_48a.indexOf(type)==-1&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){_483(ret,_in,item.value);}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){_483(ret,_in,opt.value);}});}else{_483(ret,_in,item.value);if(type=="image"){ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;}}}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _491=[];var _492={};for(var name in map){var _494=map[name];if(_494!=_492[name]){var _495=enc(name)+"=";if(_d.isArray(_494)){for(var i=0;i<_494.length;i++){_491.push(_495+enc(_494[i]));}}else{_491.push(_495+enc(_494));}}}return _491.join("&");};dojo.formToQuery=function(_497){return _d.objectToQuery(_d.formToObject(_497));};dojo.formToJson=function(_498,_499){return _d.toJson(_d.formToObject(_498),_499);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _49f=item.split("=");var name=dec(_49f.shift());var val=dec(_49f.join("="));if(_d.isString(ret[name])){ret[name]=[ret[name]];}if(_d.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;dojo._contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _d.fromJson(xhr.responseText||null);},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");}var _4a5=xhr.responseText;var _4a6=_4a5.indexOf("/*");var _4a7=_4a5.lastIndexOf("*/");if(_4a6==-1||_4a7==-1){throw new Error("JSON was not comment filtered");}return _d.fromJson(_4a5.substring(_4a6+2,_4a7));},javascript:function(xhr){return _d.eval(xhr.responseText);},xml:function(xhr){var _4aa=xhr.responseXML;if(_d.isIE&&(!_4aa||!_4aa.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_d.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_4aa=dom;}catch(e){return false;}return true;});}return _4aa;}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _4b1=_d._contentHandlers;if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){return _4b1["json-comment-filtered"](xhr);}else{return _4b1["json"](xhr);}};dojo._ioSetArgs=function(args,_4b3,_4b4,_4b5){var _4b6={args:args,url:args.url};var _4b7=null;if(args.form){var form=_d.byId(args.form);var _4b9=form.getAttributeNode("action");_4b6.url=_4b6.url||(_4b9?_4b9.value:null);_4b7=_d.formToObject(form);}var _4ba=[{}];if(_4b7){_4ba.push(_4b7);}if(args.content){_4ba.push(args.content);}if(args.preventCache){_4ba.push({"dojo.preventCache":new Date().valueOf()});}_4b6.query=_d.objectToQuery(_d.mixin.apply(null,_4ba));_4b6.handleAs=args.handleAs||"text";var d=new _d.Deferred(_4b3);d.addCallbacks(_4b4,function(_4bc){return _4b5(_4bc,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_4be){return ld.call(args,_4be,_4b6);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_4c0){return err.call(args,_4c0,_4b6);});}var _4c1=args.handle;if(_4c1&&_d.isFunction(_4c1)){d.addBoth(function(_4c2){return _4c1.call(args,_4c2,_4b6);});}d.ioArgs=_4b6;return d;};var _4c3=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=typeof xhr.abort;if(_at=="function"||_at=="object"||_at=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _4c8=function(dfd){var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _4cb=function(_4cc,dfd){console.error(_4cc);return _4cc;};var _4ce=null;var _4cf=[];var _4d0=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_4cf.length&&(tif=_4cf[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_4cf.splice(i--,1);}else{if(tif.ioCheck(dfd)){_4cf.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_4cf.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}if(!_4cf.length){clearInterval(_4ce);_4ce=null;return;}};dojo._ioCancelAll=function(){try{_d.forEach(_4cf,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_d.isIE){_d.addOnWindowUnload(_d._ioCancelAll);}_d._ioWatch=function(dfd,_4d9,_4da,_4db){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_4cf.push({dfd:dfd,validCheck:_4d9,ioCheck:_4da,resHandle:_4db});if(!_4ce){_4ce=setInterval(_4d0,50);}if(args.sync){_4d0();}};var _4dd="application/x-www-form-urlencoded";var _4de=function(dfd){return dfd.ioArgs.xhr.readyState;};var _4e0=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _4e2=function(dfd){var xhr=dfd.ioArgs.xhr;if(_d._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_4e6){if(_4e6.query.length){_4e6.url+=(_4e6.url.indexOf("?")==-1?"?":"&")+_4e6.query;_4e6.query=null;}};dojo.xhr=function(_4e7,args,_4e9){var dfd=_d._ioSetArgs(args,_4c3,_4c8,_4cb);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);if(_4e9){if("postData" in args){dfd.ioArgs.query=args.postData;}else{if("putData" in args){dfd.ioArgs.query=args.putData;}}}else{_d._ioAddQueryToUrl(dfd.ioArgs);}var _4eb=dfd.ioArgs;var xhr=_4eb.xhr;xhr.open(_4e7,_4eb.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{xhr.setRequestHeader(hdr,args.headers[hdr]);}}}xhr.setRequestHeader("Content-Type",args.contentType||_4dd);if(!args.headers||!args.headers["X-Requested-With"]){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}if(dojo.config.debugAtAllCosts){xhr.send(_4eb.query);}else{try{xhr.send(_4eb.query);}catch(e){dfd.ioArgs.error=e;dfd.cancel();}}_d._ioWatch(dfd,_4de,_4e0,_4e2);xhr=null;return dfd;};dojo.xhrGet=function(args){return _d.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _d.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _d.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _d.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _4f3=d.mixin;dojo._Line=function(_4f4,end){this.start=_4f4;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};d.declare("dojo._Animation",null,{constructor:function(args){_4f3(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){if(this[evt]){if(dojo.config.debugAtAllCosts){this[evt].apply(this,args||[]);}else{try{this[evt].apply(this,args||[]);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_4fa,_4fb){var _t=this;if(_t._delayTimer){_t._clearTimer();}if(_4fb){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0;}else{if(_t._active&&!_t._paused){return _t;}}_t._fire("beforeBegin");var de=_4fa||_t.delay,_p=dojo.hitch(_t,"_play",_4fb);if(de>0){_t._delayTimer=setTimeout(_p,de);return _t;}_p();return _t;},_play:function(_4ff){var _t=this;if(_t._delayTimer){_t._clearTimer();}_t._startTime=new Date().valueOf();if(_t._paused){_t._startTime-=_t.duration*_t._percent;}_t._endTime=_t._startTime+_t.duration;_t._active=true;_t._paused=false;var _501=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t._fire("onBegin",[_501]);}_t._fire("onPlay",[_501]);_t._cycle();return _t;},pause:function(){var _t=this;if(_t._delayTimer){_t._clearTimer();}_t._stopTimer();if(!_t._active){return _t;}_t._paused=true;_t._fire("onPause",[_t.curve.getValue(_t._percent)]);return _t;},gotoPercent:function(_503,_504){var _t=this;_t._stopTimer();_t._active=_t._paused=true;_t._percent=_503;if(_504){_t.play();}return _t;},stop:function(_506){var _t=this;if(_t._delayTimer){_t._clearTimer();}if(!_t._timer){return _t;}_t._stopTimer();if(_506){_t._percent=1;}_t._fire("onStop",[_t.curve.getValue(_t._percent)]);_t._active=_t._paused=false;return _t;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _t=this;if(_t._active){var curr=new Date().valueOf();var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);if(step>=1){step=1;}_t._percent=step;if(_t.easing){step=_t.easing(step);}_t._fire("onAnimate",[_t.curve.getValue(step)]);if(_t._percent<1){_t._startTimer();}else{_t._active=false;if(_t.repeat>0){_t.repeat--;_t.play(null,true);}else{if(_t.repeat==-1){_t.play(null,true);}else{if(_t._startRepeatCount){_t.repeat=_t._startRepeatCount;_t._startRepeatCount=0;}}}_t._percent=0;_t._fire("onEnd");_t._stopTimer();}}return _t;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_50c=[],_50d=null,_50e={run:function(){}};dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(_50e,"run",this,"_cycle");ctr++;}if(!_50d){_50d=setInterval(d.hitch(_50e,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_50d);_50d=null;ctr=0;}};var _50f=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _513=_4f3({properties:{}},args),_514=(_513.properties.opacity={});_514.start=!("start" in _513)?function(){return +d.style(_513.node,"opacity")||0;}:_513.start;_514.end=_513.end;var anim=d.animateProperty(_513);d.connect(anim,"beforeBegin",d.partial(_50f,_513.node));return anim;};dojo.fadeIn=function(args){return d._fade(_4f3({end:1},args));};dojo.fadeOut=function(args){return d._fade(_4f3({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _519=function(_51a){this._properties=_51a;for(var p in _51a){var prop=_51a[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_519.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_521=prop.start;if(_521 instanceof d.Color){ret[p]=d.blendColors(_521,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_521)){ret[p]=((prop.end-_521)*r)+_521+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d._Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];prop=pm[p]=_4f3({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start();}if(d.isFunction(prop.end)){prop.end=prop.end();}var _527=(p.toLowerCase().indexOf("color")>=0);function _528(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_527?v:parseFloat(v));};if(!("end" in prop)){prop.end=_528(this.node,p);}else{if(!("start" in prop)){prop.start=_528(this.node,p);}}if(_527){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _519(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_52d,_52e,_52f,_530,_531){return d.animateProperty({node:node,duration:_52e||d._Animation.prototype.duration,properties:_52d,easing:_52f,onEnd:_530}).play(_531||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000);}})();
/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.doc;if(_1.selection){var s=_1.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _3=dojo.global;var _4=_3.getSelection();if(dojo.isString(_4)){return !_4;}else{return !_4||_4.isCollapsed||!_4.toString();}}},getBookmark:function(){var _5,_6=dojo.doc.selection;if(_6){var _7=_6.createRange();if(_6.type.toUpperCase()=="CONTROL"){if(_7.length){_5=[];var i=0,_9=_7.length;while(i<_9){_5.push(_7.item(i++));}}else{_5=null;}}else{_5=_7.getBookmark();}}else{if(window.getSelection){_6=dojo.global.getSelection();if(_6){_7=_6.getRangeAt(0);_5=_7.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _5;},moveToBookmark:function(_a){var _b=dojo.doc;if(_b.selection){var _c;if(dojo.isArray(_a)){_c=_b.body.createControlRange();dojo.forEach(_a,function(n){_c.addElement(n);});}else{_c=_b.selection.createRange();_c.moveToBookmark(_a);}_c.select();}else{var _e=dojo.global.getSelection&&dojo.global.getSelection();if(_e&&_e.removeAllRanges){_e.removeAllRanges();_e.addRange(_a);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_f,_10){return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10};},focus:function(_11){if(!_11){return;}var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow;if(_12){var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12;if(_15&&_15.focus){try{_15.focus();}catch(e){}}dijit._onFocusNode(_12);}if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){if(_14){_14.focus();}try{dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]);}catch(e){}}},_activeStack:[],registerIframe:function(_16){dijit.registerWin(_16.contentWindow,_16);},registerWin:function(_17,_18){dojo.connect(_17.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(_18||evt.target||evt.srcElement);});var doc=_17.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(_18||evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(_18||evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(_18||evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(_18||evt.target);},true);}}doc=null;},_onBlurNode:function(_1f){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(_20){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _21=[];try{while(_20){if(_20.dijitPopupParent){_20=dijit.byId(_20.dijitPopupParent).domNode;}else{if(_20.tagName&&_20.tagName.toLowerCase()=="body"){if(_20===dojo.body()){break;}_20=dijit.getDocumentWindow(_20.ownerDocument).frameElement;}else{var id=_20.getAttribute&&_20.getAttribute("widgetId");if(id){_21.unshift(id);}_20=_20.parentNode;}}}}catch(e){}dijit._setStack(_21);},_onFocusNode:function(_23){if(!_23){return;}if(_23.nodeType==9){return;}dijit._onTouchNode(_23);if(_23==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_23;dojo.publish("focusNode",[_23]);},_setStack:function(_24){var _25=dijit._activeStack;dijit._activeStack=_24;for(var _26=0;_26<Math.min(_25.length,_24.length);_26++){if(_25[_26]!=_24[_26]){break;}}for(var i=_25.length-1;i>=_26;i--){var _28=dijit.byId(_25[i]);if(_28){_28._focused=false;_28._hasBeenBlurred=true;if(_28._onBlur){_28._onBlur();}if(_28._setStateClass){_28._setStateClass();}dojo.publish("widgetBlur",[_28]);}}for(i=_26;i<_24.length;i++){_28=dijit.byId(_24[i]);if(_28){_28._focused=true;if(_28._onFocus){_28._onFocus();}if(_28._setStateClass){_28._setStateClass();}dojo.publish("widgetFocus",[_28]);}}}});dojo.addOnLoad(function(){dijit.registerWin(window);});}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_29){if(this._hash[_29.id]){throw new Error("Tried to register widget with id=="+_29.id+" but that id is already registered");}this._hash[_29.id]=_29;},remove:function(id){delete this._hash[id];},forEach:function(_2b){for(var id in this._hash){_2b(this._hash[id]);}},filter:function(_2d){var res=new dijit.WidgetSet();this.forEach(function(_2f){if(_2d(_2f)){res.add(_2f);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_32){return _32.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_33){var id;do{id=_33+"_"+(_33 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_33]:dijit._widgetTypeCtr[_33]=0);}while(dijit.byId(id));return id;};dijit.findWidgets=function(_35){var _36=[];function _37(_38){var _39=dojo.isIE?_38.children:_38.childNodes,i=0,_3b;while(_3b=_39[i++]){if(_3b.nodeType!=1){continue;}var _3c=_3b.getAttribute("widgetId");if(_3c){var _3d=dijit.byId(_3c);_36.push(_3d);}else{_37(_3b);}}};_37(_35);return _36;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dojo.forEach(dijit.findWidgets(dojo.body()),function(_3e){if(_3e.destroyRecursive){_3e.destroyRecursive();}else{if(_3e.destroy){_3e.destroy();}}});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_40){return dijit.registry.byId(_40.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_41){while(_41){if(_41.getAttribute&&_41.getAttribute("widgetId")){return dijit.registry.byId(_41.getAttribute("widgetId"));}_41=_41.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_42){var _43=dojo.style(_42);return (_43.visibility!="hidden")&&(_43.visibility!="collapsed")&&(_43.display!="none")&&(dojo.attr(_42,"type")!="hidden");};dijit.isTabNavigable=function(_44){if(dojo.hasAttr(_44,"disabled")){return false;}var _45=dojo.hasAttr(_44,"tabindex");var _46=dojo.attr(_44,"tabindex");if(_45&&_46>=0){return true;}var _47=_44.nodeName.toLowerCase();if(((_47=="a"&&dojo.hasAttr(_44,"href"))||dijit._tabElements[_47])&&(!_45||_46>=0)){return true;}return false;};dijit._getTabNavigable=function(_48){var _49,_4a,_4b,_4c,_4d,_4e;var _4f=function(_50){dojo.query("> *",_50).forEach(function(_51){var _52=dijit._isElementShown(_51);if(_52&&dijit.isTabNavigable(_51)){var _53=dojo.attr(_51,"tabindex");if(!dojo.hasAttr(_51,"tabindex")||_53==0){if(!_49){_49=_51;}_4a=_51;}else{if(_53>0){if(!_4b||_53<_4c){_4c=_53;_4b=_51;}if(!_4d||_53>=_4e){_4e=_53;_4d=_51;}}}}if(_52&&_51.nodeName.toUpperCase()!="SELECT"){_4f(_51);}});};if(dijit._isElementShown(_48)){_4f(_48);}return {first:_49,last:_4a,lowest:_4b,highest:_4d};};dijit.getFirstInTabbingOrder=function(_54){var _55=dijit._getTabNavigable(dojo.byId(_54));return _55.lowest?_55.lowest:_55.first;};dijit.getLastInTabbingOrder=function(_56){var _57=dijit._getTabNavigable(dojo.byId(_56));return _57.last?_57.last:_57.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_58){this.pairs=[];this.returnWrappers=_58||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_59,_5a,_5b,_5c,_5d){this.pairs[((_5d)?"unshift":"push")]([_59,_5a,_5b,_5c]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _5f=this.pairs[i];if(_5f[1].apply(this,arguments)){if((_5f[3])||(this.returnWrappers)){return _5f[2];}else{return _5f[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_60){for(var i=0;i<this.pairs.length;i++){var _62=this.pairs[i];if(_62[0]==_60){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _63=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _64=dojo._docScroll();return {w:_63.clientWidth,h:_63.clientHeight,l:_64.x,t:_64.y};};dijit.placeOnScreen=function(_65,pos,_67,_68){var _69=dojo.map(_67,function(_6a){var c={corner:_6a,pos:{x:pos.x,y:pos.y}};if(_68){c.pos.x+=_6a.charAt(1)=="L"?_68.x:-_68.x;c.pos.y+=_6a.charAt(0)=="T"?_68.y:-_68.y;}return c;});return dijit._place(_65,_69);};dijit._place=function(_6c,_6d,_6e){var _6f=dijit.getViewport();if(!_6c.parentNode||String(_6c.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_6c);}var _70=null;dojo.some(_6d,function(_71){var _72=_71.corner;var pos=_71.pos;if(_6e){_6e(_6c,_71.aroundCorner,_72);}var _74=_6c.style;var _75=_74.display;var _76=_74.visibility;_74.visibility="hidden";_74.display="";var mb=dojo.marginBox(_6c);_74.display=_75;_74.visibility=_76;var _78=(_72.charAt(1)=="L"?pos.x:Math.max(_6f.l,pos.x-mb.w)),_79=(_72.charAt(0)=="T"?pos.y:Math.max(_6f.t,pos.y-mb.h)),_7a=(_72.charAt(1)=="L"?Math.min(_6f.l+_6f.w,_78+mb.w):pos.x),_7b=(_72.charAt(0)=="T"?Math.min(_6f.t+_6f.h,_79+mb.h):pos.y),_7c=_7a-_78,_7d=_7b-_79,_7e=(mb.w-_7c)+(mb.h-_7d);if(_70==null||_7e<_70.overflow){_70={corner:_72,aroundCorner:_71.aroundCorner,x:_78,y:_79,w:_7c,h:_7d,overflow:_7e};}return !_7e;});_6c.style.left=_70.x+"px";_6c.style.top=_70.y+"px";if(_70.overflow&&_6e){_6e(_6c,_70.aroundCorner,_70.corner);}return _70;};dijit.placeOnScreenAroundNode=function(_7f,_80,_81,_82){_80=dojo.byId(_80);var _83=_80.style.display;_80.style.display="";var _84=_80.offsetWidth;var _85=_80.offsetHeight;var _86=dojo.coords(_80,true);_80.style.display=_83;return dijit._placeOnScreenAroundRect(_7f,_86.x,_86.y,_84,_85,_81,_82);};dijit.placeOnScreenAroundRectangle=function(_87,_88,_89,_8a){return dijit._placeOnScreenAroundRect(_87,_88.x,_88.y,_88.width,_88.height,_89,_8a);};dijit._placeOnScreenAroundRect=function(_8b,x,y,_8e,_8f,_90,_91){var _92=[];for(var _93 in _90){_92.push({aroundCorner:_93,corner:_90[_93],pos:{x:x+(_93.charAt(1)=="L"?0:_8e),y:y+(_93.charAt(0)=="T"?0:_8f)}});}return dijit._place(_8b,_92,_91);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(_98,_99,_9a,_9b){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _9e=[],_9f=1000,_a0=1;this.prepare=function(_a1){var s=_a1.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(_a1);};this.open=function(_a3){var _a4=_a3.popup,_a5=_a3.orient||{"BL":"TL","TL":"BL"},_a6=_a3.around,id=(_a3.around&&_a3.around.id)?(_a3.around.id+"_dropdown"):("popup_"+_a0++);var _a8=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_9f+_9e.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(_a8,"presentation");_a8.style.left=_a8.style.top="0px";if(_a3.parent){_a8.dijitPopupParent=_a3.parent.id;}var s=_a4.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_a8.appendChild(_a4.domNode);var _aa=new dijit.BackgroundIframe(_a8);var _ab=_a6?dijit.placeOnScreenAroundElement(_a8,_a6,_a5,_a4.orient?dojo.hitch(_a4,"orient"):null):dijit.placeOnScreen(_a8,_a3,_a5=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_a3.padding);_a8.style.visibility="visible";var _ac=[];var _ad=function(){for(var pi=_9e.length-1;pi>0&&_9e[pi].parent===_9e[pi-1].widget;pi--){}return _9e[pi];};_ac.push(dojo.connect(_a8,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a3.onCancel){dojo.stopEvent(evt);_a3.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _b0=_ad();if(_b0&&_b0.onCancel){_b0.onCancel();}}}}));if(_a4.onCancel){_ac.push(dojo.connect(_a4,"onCancel",null,_a3.onCancel));}_ac.push(dojo.connect(_a4,_a4.onExecute?"onExecute":"onChange",null,function(){var _b1=_ad();if(_b1&&_b1.onExecute){_b1.onExecute();}}));_9e.push({wrapper:_a8,iframe:_aa,widget:_a4,parent:_a3.parent,onExecute:_a3.onExecute,onCancel:_a3.onCancel,onClose:_a3.onClose,handlers:_ac});if(_a4.onOpen){_a4.onOpen(_ab);}return _ab;};this.close=function(_b2){while(dojo.some(_9e,function(_b3){return _b3.widget==_b2;})){var top=_9e.pop(),_b5=top.wrapper,_b6=top.iframe,_b7=top.widget,_b8=top.onClose;if(_b7.onClose){_b7.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_b7||!_b7.domNode){return;}this.prepare(_b7.domNode);_b6.destroy();dojo.destroy(_b5);if(_b8){_b8();}}};}();dijit._frames=new function(){var _b9=[];this.pop=function(){var _ba;if(_b9.length){_ba=_b9.pop();_ba.style.display="";}else{if(dojo.isIE){var _bb=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _bc="<iframe src='"+_bb+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_ba=dojo.doc.createElement(_bc);}else{_ba=dojo.create("iframe");_ba.src="javascript:\"\"";_ba.className="dijitBackgroundIframe";}_ba.tabIndex=-1;dojo.body().appendChild(_ba);}return _ba;};this.push=function(_bd){_bd.style.display="none";if(dojo.isIE){_bd.style.removeExpression("width");_bd.style.removeExpression("height");}_b9.push(_bd);};}();dijit.BackgroundIframe=function(_be){if(!_be.id){throw new Error("no id");}if(dojo.isIE<7||(dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _bf=dijit._frames.pop();_be.appendChild(_bf);if(dojo.isIE){_bf.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_be.id+"').offsetWidth");_bf.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_be.id+"').offsetHeight");}this.iframe=_bf;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(_c0){try{_c0=dojo.byId(_c0);var doc=dojo.doc;var _c2=dojo.body();var _c3=_c2.parentNode;if((!(dojo.isFF>=3||dojo.isIE||dojo.isWebKit)||_c0==_c2||_c0==_c3)&&(typeof _c0.scrollIntoView=="function")){_c0.scrollIntoView(false);return;}var ltr=dojo._isBodyLtr();var _c5=dojo.isIE>=8&&!_c6;var rtl=!ltr&&!_c5;var _c8=_c2;var _c6=doc.compatMode=="BackCompat";if(_c6){_c3._offsetWidth=_c3._clientWidth=_c2._offsetWidth=_c2.clientWidth;_c3._offsetHeight=_c3._clientHeight=_c2._offsetHeight=_c2.clientHeight;}else{if(dojo.isWebKit){_c2._offsetWidth=_c2._clientWidth=_c3.clientWidth;_c2._offsetHeight=_c2._clientHeight=_c3.clientHeight;}else{_c8=_c3;}_c3._offsetHeight=_c3.clientHeight;_c3._offsetWidth=_c3.clientWidth;}function _c9(_ca){var ie=dojo.isIE;return ((ie<=6||(ie>=7&&_c6))?false:(dojo.style(_ca,"position").toLowerCase()=="fixed"));};function _cc(_cd){var _ce=_cd.parentNode;var _cf=_cd.offsetParent;if(_cf==null||_c9(_cd)){_cf=_c3;_ce=(_cd==_c2)?_c3:null;}_cd._offsetParent=_cf;_cd._parent=_ce;var bp=dojo._getBorderExtents(_cd);_cd._borderStart={H:(_c5&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};_cd._borderSize={H:bp.w,V:bp.h};_cd._scrolledAmount={H:_cd.scrollLeft,V:_cd.scrollTop};_cd._offsetSize={H:_cd._offsetWidth||_cd.offsetWidth,V:_cd._offsetHeight||_cd.offsetHeight};_cd._offsetStart={H:(_c5&&!ltr)?_cf.clientWidth-_cd.offsetLeft-_cd._offsetSize.H:_cd.offsetLeft,V:_cd.offsetTop};_cd._clientSize={H:_cd._clientWidth||_cd.clientWidth,V:_cd._clientHeight||_cd.clientHeight};if(_cd!=_c2&&_cd!=_c3&&_cd!=_c0){for(var dir in _cd._offsetSize){var _d2=_cd._offsetSize[dir]-_cd._clientSize[dir]-_cd._borderSize[dir];var _d3=_cd._clientSize[dir]>0&&_d2>0;if(_d3){_cd._offsetSize[dir]-=_d2;if(dojo.isIE&&rtl&&dir=="H"){_cd._offsetStart[dir]+=_d2;}}}}};var _d4=_c0;while(_d4!=null){if(_c9(_d4)){_c0.scrollIntoView(false);return;}_cc(_d4);_d4=_d4._parent;}if(dojo.isIE&&_c0._parent){var _d5=_c0._offsetParent;_c0._offsetStart.H+=_d5._borderStart.H;_c0._offsetStart.V+=_d5._borderStart.V;}if(dojo.isIE>=7&&_c8==_c3&&rtl&&_c2._offsetStart&&_c2._offsetStart.H==0){var _d6=_c3.scrollWidth-_c3._offsetSize.H;if(_d6>0){_c2._offsetStart.H=-_d6;}}if(dojo.isIE<=6&&!_c6){_c3._offsetSize.H+=_c3._borderSize.H;_c3._offsetSize.V+=_c3._borderSize.V;}if(rtl&&_c2._offsetStart&&_c8==_c3&&_c3._scrolledAmount){var ofs=_c2._offsetStart.H;if(ofs<0){_c3._scrolledAmount.H+=ofs;_c2._offsetStart.H=0;}}_d4=_c0;while(_d4){var _d8=_d4._parent;if(!_d8){break;}if(_d8.tagName=="TD"){var _d9=_d8._parent._parent._parent;if(_d8!=_d4._offsetParent&&_d8._offsetParent!=_d4._offsetParent){_d8=_d9;}}var _da=_d4._offsetParent==_d8;for(var dir in _d4._offsetStart){var _dc=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(_d8!=_c3)&&(_d8!=_c2)&&(dojo.isIE||dojo.isWebKit)&&_d8._clientSize.H>0&&_d8.scrollWidth>_d8._clientSize.H){var _dd=_d8.scrollWidth-_d8._clientSize.H;if(_dd>0){_d8._scrolledAmount.H-=_dd;}}if(_d8._offsetParent.tagName=="TABLE"){if(dojo.isIE){_d8._offsetStart[dir]-=_d8._offsetParent._borderStart[dir];_d8._borderStart[dir]=_d8._borderSize[dir]=0;}else{_d8._offsetStart[dir]+=_d8._offsetParent._borderStart[dir];}}if(dojo.isIE){_d8._offsetStart[dir]+=_d8._offsetParent._borderStart[dir];}var _de=_d4._offsetStart[dir]-_d8._scrolledAmount[dir]-(_da?0:_d8._offsetStart[dir])-_d8._borderStart[dir];var _df=_de+_d4._offsetSize[dir]-_d8._offsetSize[dir]+_d8._borderSize[dir];var _e0=(dir=="H")?"scrollLeft":"scrollTop";var _e1=dir=="H"&&rtl;var _e2=_e1?-_df:_de;var _e3=_e1?-_de:_df;var _e4=(_e2*_e3<=0)?0:Math[(_e2<0)?"max":"min"](_e2,_e3);if(_e4!=0){var _e5=_d8[_e0];_d8[_e0]+=(_e1)?-_e4:_e4;var _e6=_d8[_e0]-_e5;}if(_da){_d4._offsetStart[dir]+=_d8._offsetStart[dir];}_d4._offsetStart[dir]-=_d8[_e0];}_d4._parent=_d8._parent;_d4._offsetParent=_d8._offsetParent;}_d8=_c0;var _e7;while(_d8&&_d8.removeAttribute){_e7=_d8.parentNode;_d8.removeAttribute("_offsetParent");_d8.removeAttribute("_parent");_d8=_e7;}}catch(error){console.error("scrollIntoView: "+error);_c0.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,_e9=d.doc.documentElement,ie=d.isIE,_eb=d.isOpera,maj=Math.floor,ff=d.isFF,_ee=d.boxModel.replace(/-/,""),_ef={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_eb,dj_opera8:maj(_eb)==8,dj_opera9:maj(_eb)==9,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};_ef["dj_"+_ee]=true;for(var p in _ef){if(_ef[p]){if(_e9.className){_e9.className+=" "+p;}else{_e9.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_e9.className+=" dijitRtl";for(var p in _ef){if(_ef[p]){_e9.className+=" "+p+"-rtl";}}}});})();}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_f3,_f4,_f5,obj,_f7,_f8){if(obj!=this._obj){this.stop();this._initialDelay=_f8||500;this._subsequentDelay=_f7||0.9;this._obj=obj;this._evt=evt;this._node=_f4;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_f3,_f5);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(_f9,_fa,_fb,_fc,_fd,_fe){if(_fa.keyCode){_fa.charOrCode=_fa.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_fa.charCode){_fa.charOrCode=String.fromCharCode(_fa.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_f9,"onkeypress",this,function(evt){if(evt.charOrCode==_fa.charOrCode&&(_fa.ctrlKey===undefined||_fa.ctrlKey==evt.ctrlKey)&&(_fa.altKey===undefined||_fa.altKey==evt.ctrlKey)&&(_fa.shiftKey===undefined||_fa.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_fa,_fb,_f9,_fc,_fa,_fd,_fe);}else{if(dijit.typematic._obj==_fa){dijit.typematic.stop();}}}),dojo.connect(_f9,"onkeyup",this,function(evt){if(dijit.typematic._obj==_fa){dijit.typematic.stop();}})];},addMouseListener:function(node,_102,_103,_104,_105){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_102,node,_103,node,_104,_105);}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_102,node,_103,node,_104,_105);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_10c,_10d,_10e,_10f,_110,_111,_112){return this.addKeyListener(_10d,_10e,_10f,_110,_111,_112).concat(this.addMouseListener(_10c,_10f,_110,_111,_112));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _115=cs.backgroundImage;var _116=(cs.borderTopColor==cs.borderRightColor)||(_115!=null&&(_115=="none"||_115=="url(invalid-url:)"));dojo[_116?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(elem,role){var _119=this.getWaiRole(elem);return role?(_119.indexOf(role)>-1):(_119.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _11d=dojo.attr(elem,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(_11d)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_11d+" ").indexOf(" "+role+" ")<0){var _11e=dojo.trim(_11d.replace(this._XhtmlRoles,""));var _11f=dojo.trim(_11d.replace(_11e,""));dojo.attr(elem,"role",_11f+(_11f?" ":"")+role);}}},removeWaiRole:function(elem,role){var _122=dojo.attr(elem,"role");if(!_122){return;}if(role){var _123=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_122+" ").replace(" "+_123+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_126){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_126);}return elem.hasAttribute?elem.hasAttribute("aria-"+_126):!!elem.getAttribute("aria-"+_126);},getWaiState:function(elem,_128){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_128);}return elem.getAttribute("aria-"+_128)||"";},setWaiState:function(elem,_12a,_12b){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_12a,_12b);}else{elem.setAttribute("aria-"+_12a,_12b);}},removeWaiState:function(elem,_12d){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_12d);}else{elem.removeAttribute("aria-"+_12d);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_12e,_12f){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _130=dojo.date.stamp._isoRegExp.exec(_12e);var _131=null;if(_130){_130.shift();if(_130[1]){_130[1]--;}if(_130[6]){_130[6]*=1000;}if(_12f){_12f=new Date(_12f);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _12f["get"+prop]();}).forEach(function(_133,_134){if(_130[_134]===undefined){_130[_134]=_133;}});}_131=new Date(_130[0]||1970,_130[1]||0,_130[2]||1,_130[3]||0,_130[4]||0,_130[5]||0,_130[6]||0);var _135=0;var _136=_130[7]&&_130[7].charAt(0);if(_136!="Z"){_135=((_130[8]||0)*60)+(Number(_130[9])||0);if(_136!="-"){_135*=-1;}}if(_136){_135-=_131.getTimezoneOffset();}if(_135){_131.setTime(_131.getTime()+_135*60000);}}return _131;};dojo.date.stamp.toISOString=function(_137,_138){var _=function(n){return (n<10)?"0"+n:n;};_138=_138||{};var _13b=[];var _13c=_138.zulu?"getUTC":"get";var date="";if(_138.selector!="time"){var year=_137[_13c+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_137[_13c+"Month"]()+1),_(_137[_13c+"Date"]())].join("-");}_13b.push(date);if(_138.selector!="date"){var time=[_(_137[_13c+"Hours"]()),_(_137[_13c+"Minutes"]()),_(_137[_13c+"Seconds"]())].join(":");var _140=_137[_13c+"Milliseconds"]();if(_138.milliseconds){time+="."+(_140<100?"0":"")+_(_140);}if(_138.zulu){time+="Z";}else{if(_138.selector!="time"){var _141=_137.getTimezoneOffset();var _142=Math.abs(_141);time+=(_141>0?"-":"+")+_(Math.floor(_142/60))+":"+_(_142%60);}}_13b.push(time);}return _13b.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _144=d._scopeName+"Type";var qry="["+_144+"]";var _146=0,_147={};var _148=function(_149,_14a){var nso=_14a||_147;if(dojo.isIE){var cn=_149["__dojoNameCache"];if(cn&&nso[cn]===_149){return cn;}}var name;do{name="__"+_146++;}while(name in nso);nso[name]=_149;return name;};function _14e(_14f){if(d.isString(_14f)){return "string";}if(typeof _14f=="number"){return "number";}if(typeof _14f=="boolean"){return "boolean";}if(d.isFunction(_14f)){return "function";}if(d.isArray(_14f)){return "array";}if(_14f instanceof Date){return "date";}if(_14f instanceof d._Url){return "url";}return "object";};function _150(_151,type){switch(type){case "string":return _151;case "number":return _151.length?Number(_151):NaN;case "boolean":return typeof _151=="boolean"?_151:!(_151.toLowerCase()=="false");case "function":if(d.isFunction(_151)){_151=_151.toString();_151=d.trim(_151.substring(_151.indexOf("{")+1,_151.length-1));}try{if(_151.search(/[^\w\.]+/i)!=-1){_151=_148(new Function(_151),this);}return d.getObject(_151,false);}catch(e){return new Function();}case "array":return _151?_151.split(/\s*,\s*/):[];case "date":switch(_151){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_151);}case "url":return d.baseUrl+_151;default:return d.fromJson(_151);}};var _153={};function _154(_155){if(!_153[_155]){var cls=d.getObject(_155);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_155+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _157=cls.prototype;var _158={},_159={};for(var name in _157){if(name.charAt(0)=="_"){continue;}if(name in _159){continue;}var _15b=_157[name];_158[name]=_14e(_15b);}_153[_155]={cls:cls,params:_158};}return _153[_155];};this._functionFromScript=function(_15c){var _15d="";var _15e="";var _15f=_15c.getAttribute("args");if(_15f){d.forEach(_15f.split(/\s*,\s*/),function(part,idx){_15d+="var "+part+" = arguments["+idx+"]; ";});}var _162=_15c.getAttribute("with");if(_162&&_162.length){d.forEach(_162.split(/\s*,\s*/),function(part){_15d+="with("+part+"){";_15e+="}";});}return new Function(_15d+_15c.innerHTML+_15e);};this.instantiate=function(_164,_165){var _166=[];_165=_165||{};d.forEach(_164,function(node){if(!node){return;}var type=_144 in _165?_165[_144]:node.getAttribute(_144);if(!type||!type.length){return;}var _169=_154(type),_16a=_169.cls,ps=_16a._noScript||_16a.prototype._noScript;var _16c={},_16d=node.attributes;for(var name in _169.params){var item=name in _165?{value:_165[name],specified:true}:_16d.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _170=item.value;switch(name){case "class":_170="className" in _165?_165.className:node.className;break;case "style":_170="style" in _165?_165.style:(node.style&&node.style.cssText);}var _171=_169.params[name];if(typeof _170=="string"){_16c[name]=_150(_170,_171);}else{_16c[name]=_170;}}if(!ps){var _172=[],_173=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_174){var _175=_174.getAttribute("event"),type=_174.getAttribute("type"),nf=d.parser._functionFromScript(_174);if(_175){if(type=="dojo/connect"){_172.push({event:_175,func:nf});}else{_16c[_175]=nf;}}else{_173.push(nf);}});}var _177=_16a["markupFactory"];if(!_177&&_16a["prototype"]){_177=_16a.prototype["markupFactory"];}var _178=_177?_177(_16c,node,_16a):new _16a(_16c,node);_166.push(_178);var _179=node.getAttribute("jsId");if(_179){d.setObject(_179,_178);}if(!ps){d.forEach(_172,function(_17a){d.connect(_178,_17a.event,null,_17a.func);});d.forEach(_173,function(func){func.call(_178);});}});d.forEach(_166,function(_17c){if(_17c&&_17c.startup&&!_17c._started&&(!_17c.getParent||!_17c.getParent())){_17c.startup();}});return _166;};this.parse=function(_17d){var list=d.query(qry,_17d);var _17f=this.instantiate(list);return _17f;};}();(function(){var _180=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_180);}else{dojo._loaders.unshift(_180);}})();}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"connect",function(_181,_182){if(_181&&dojo.isFunction(_181._onConnect)){_181._onConnect(_182);}});dijit._connectOnUseEventHandler=function(_183){};(function(){var _184={};var _185=function(dc){if(!_184[dc]){var r=[];var _188;var _189=dojo.getObject(dc).prototype;for(var _18a in _189){if(dojo.isFunction(_189[_18a])&&(_188=_18a.match(/^_set([a-zA-Z]*)Attr$/))&&_188[1]){r.push(_188[1].charAt(0).toLowerCase()+_188[1].substr(1));}}_184[dc]=r;}return _184[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_18b,_18c){this.create(_18b,_18c);},create:function(_18d,_18e){this.srcNodeRef=dojo.byId(_18e);this._connects=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_18d){this.params=_18d;dojo.mixin(this,_18d);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _190=this.srcNodeRef;if(_190&&_190.parentNode){_190.parentNode.replaceChild(this.domNode,_190);}for(attr in this.params){this._onConnect(attr);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _191=function(attr,_193){if((_193.params&&attr in _193.params)||_193[attr]){_193.attr(attr,_193[attr]);}};for(var attr in this.attributeMap){_191(attr,this);}dojo.forEach(_185(this.declaredClass),function(a){if(!(a in this.attributeMap)){_191(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_196){this.destroyDescendants(_196);this.destroy(_196);},destroy:function(_197){this.uninitialize();dojo.forEach(this._connects,function(_198){dojo.forEach(_198,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_197);dijit.registry.remove(this.id);},destroyRendering:function(_19a){if(this.bgIframe){this.bgIframe.destroy(_19a);delete this.bgIframe;}if(this.domNode){if(_19a){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_19a){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_19b){dojo.forEach(this.getChildren(),function(_19c){if(_19c.destroyRecursive){_19c.destroyRecursive(_19b);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_19e){if(_19e in this._deferredConnects){var _19f=this[this._deferredConnects[_19e]||"domNode"];this.connect(_19f,_19e.toLowerCase(),_19e);delete this._deferredConnects[_19e];}},_setClassAttr:function(_1a0){var _1a1=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_1a1,this["class"]);this["class"]=_1a0;dojo.addClass(_1a1,_1a0);},_setStyleAttr:function(_1a2){var _1a3=this[this.attributeMap["style"]||"domNode"];if(dojo.isObject(_1a2)){dojo.style(_1a3,_1a2);}else{if(_1a3.style.cssText){_1a3.style.cssText+="; "+_1a2;}else{_1a3.style.cssText=_1a2;}}this["style"]=_1a2;},setAttribute:function(attr,_1a5){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_1a5);},_attrToDom:function(attr,_1a7){var _1a8=this.attributeMap[attr];dojo.forEach(dojo.isArray(_1a8)?_1a8:[_1a8],function(_1a9){var _1aa=this[_1a9.node||_1a9||"domNode"];var type=_1a9.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_1a7)){_1a7=dojo.hitch(this,_1a7);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_1aa,attr,_1a7);break;case "innerHTML":_1aa.innerHTML=_1a7;break;case "class":dojo.removeClass(_1aa,this[attr]);dojo.addClass(_1aa,_1a7);break;}},this);this[attr]=_1a7;},attr:function(name,_1ad){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _1b0=this._getAttrNames(name);if(args==2){if(this[_1b0.s]){return this[_1b0.s](_1ad)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_1ad);}this[name]=_1ad;}return this;}else{if(this[_1b0.g]){return this[_1b0.g]();}else{return this[name];}}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){if(this.containerNode){var list=dojo.query("[widgetId]",this.containerNode);return list.map(dijit.byNode);}else{return [];}},getChildren:function(){if(this.containerNode){return dijit.findWidgets(this.containerNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_1b6,_1b7){var d=dojo;var dc=dojo.connect;var _1ba=[];if(_1b6=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_1b7);_1ba.push(dc(obj,"onkeydown",this,function(e){if(!d.isFF&&e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}else{if(e.keyCode==d.keys.SPACE){d.stopEvent(e);}}}),dc(obj,"onkeyup",this,function(e){if(e.keyCode==d.keys.SPACE&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));if(d.isFF){_1ba.push(dc(obj,"onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){return m(e);}}));}}_1b6="onclick";}_1ba.push(dc(obj,_1b6,this,_1b7));this._connects.push(_1ba);return _1ba;},disconnect:function(_1bf){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_1bf){dojo.forEach(_1bf,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_1c1,_1c2){if(_1c1["declaredClass"]&&_1c1["addChild"]){_1c1.addChild(this,_1c2);}else{dojo.place(this.domNode,_1c1,_1c2);}return this;}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_1cc,map,_1ce,_1cf){_1cf=_1cf||dojo.global;_1ce=(!_1ce)?function(v){return v;}:dojo.hitch(_1cf,_1ce);return _1cc.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_1d1,key,_1d3){var _1d4=dojo.getObject(key,false,map);if(_1d3){_1d4=dojo.getObject(_1d3,false,_1cf).call(_1cf,_1d4,key);}return _1ce(_1d4,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){var _1d8=this.declaredClass,_1d9=this;return dojo.string.substitute(tmpl,this,function(_1da,key){if(key.charAt(0)=="!"){_1da=dojo.getObject(key.substr(1),false,_1d9);}if(typeof _1da=="undefined"){throw new Error(_1d8+" template:"+key);}if(_1da==null){return "";}return key.charAt(0)=="!"?_1da:_1da.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _1dc=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_1dc)){node=dojo._toDom(this._stringRepl(_1dc));}else{node=_1dc.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._supportingWidgets=dojo.parser.parse(node));this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_1e1){var dest=this.containerNode;if(_1e1&&dest){while(_1e1.hasChildNodes()){dest.appendChild(_1e1.firstChild);}}},_attachTemplateNodes:function(_1e3,_1e4){_1e4=_1e4||function(n,p){return n.getAttribute(p);};var _1e7=dojo.isArray(_1e3)?_1e3:(_1e3.all||_1e3.getElementsByTagName("*"));var x=dojo.isArray(_1e3)?0:-1;for(;x<_1e7.length;x++){var _1e9=(x==-1)?_1e3:_1e7[x];if(this.widgetsInTemplate&&_1e4(_1e9,"dojoType")){continue;}var _1ea=_1e4(_1e9,"dojoAttachPoint");if(_1ea){var _1eb,_1ec=_1ea.split(/\s*,\s*/);while((_1eb=_1ec.shift())){if(dojo.isArray(this[_1eb])){this[_1eb].push(_1e9);}else{this[_1eb]=_1e9;}}}var _1ed=_1e4(_1e9,"dojoAttachEvent");if(_1ed){var _1ee,_1ef=_1ed.split(/\s*,\s*/);var trim=dojo.trim;while((_1ee=_1ef.shift())){if(_1ee){var _1f1=null;if(_1ee.indexOf(":")!=-1){var _1f2=_1ee.split(":");_1ee=trim(_1f2[0]);_1f1=trim(_1f2[1]);}else{_1ee=trim(_1ee);}if(!_1f1){_1f1=_1ee;}this.connect(_1e9,_1ee,_1f1);}}}var role=_1e4(_1e9,"waiRole");if(role){dijit.setWaiRole(_1e9,role);}var _1f4=_1e4(_1e9,"waiState");if(_1f4){dojo.forEach(_1f4.split(/\s*,\s*/),function(_1f5){if(_1f5.indexOf("-")!=-1){var pair=_1f5.split("-");dijit.setWaiState(_1e9,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_1f7,_1f8,_1f9){var _1fa=dijit._Templated._templateCache;var key=_1f8||_1f7;var _1fc=_1fa[key];if(_1fc){if(!_1fc.ownerDocument||_1fc.ownerDocument==dojo.doc){return _1fc;}dojo.destroy(_1fc);}if(!_1f8){_1f8=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_1f7)));}_1f8=dojo.string.trim(_1f8);if(_1f9||_1f8.match(/\$\{([^\}]+)\}/g)){return (_1fa[key]=_1f8);}else{return (_1fa[key]=dojo._toDom(_1f8));}};dijit._Templated._sanitizeTemplateString=function(_1fd){if(_1fd){_1fd=_1fd.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _1fe=_1fd.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_1fe){_1fd=_1fe[1];}}else{_1fd="";}return _1fd;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _1ff=dijit._Templated._templateCache;for(var key in _1ff){var _201=_1ff[key];if(!isNaN(_201.nodeType)){dojo.destroy(_201);}delete _1ff[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_202,_203){var _204=this.containerNode;if(_203&&typeof _203=="number"){var _205=this.getChildren();if(_205&&_205.length>=_203){_204=_205[_203-1].domNode;_203="after";}}dojo.place(_202.domNode,_204,_203);if(this._started&&!_202._started){_202.startup();}},removeChild:function(_206){if(typeof _206=="number"&&_206>0){_206=this.getChildren()[_206];}if(!_206||!_206.domNode){return;}var node=_206.domNode;node.parentNode.removeChild(node);},_nextElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},_firstElement:function(node){node=node.firstChild;if(node&&node.nodeType!=1){node=this._nextElement(node);}return node;},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);},hasChildren:function(){return !!this._firstElement(this.containerNode);},destroyDescendants:function(_20a){dojo.forEach(this.getChildren(),function(_20b){_20b.destroyRecursive(_20a);});},_getSiblingOfChild:function(_20c,dir){var node=_20c.domNode;var _20f=(dir>0?"nextSibling":"previousSibling");do{node=node[_20f];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;},getIndexOfChild:function(_210){var _211=this.getChildren();for(var i=0,c;c=_211[i];i++){if(c==_210){return i;}}return -1;}});}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _216=dijit.byId(id);return _216.isContainer?_216:null;}}return null;},_getSibling:function(_217){var node=this.domNode;do{node=node[_217+"Sibling"];}while(node&&node.nodeType!=1);if(!node){return null;}var id=node.getAttribute("widgetId");return dijit.byId(id);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");dojo.addClass(this.domNode,this.baseClass);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_21b){_21b.startup();});if(!this.getParent||!this.getParent()){this.resize();this._viewport=dijit.getViewport();this.connect(dojo.global,"onresize",function(){var _21c=dijit.getViewport();if(_21c.w!=this._viewport.w||_21c.h!=this._viewport.h){this._viewport=_21c;this.resize();}});}this.inherited(arguments);},resize:function(_21d,_21e){var node=this.domNode;if(_21d){dojo.marginBox(node,_21d);if(_21d.t){node.style.top=_21d.t+"px";}if(_21d.l){node.style.left=_21d.l+"px";}}var mb=_21e||{};dojo.mixin(mb,_21d||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(node),mb);}var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var be=dojo._getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=dojo._getPadExtents(node,cs);this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_226){dojo.addClass(_226.domNode,this.baseClass+"-child");if(_226.baseClass){dojo.addClass(_226.domNode,this.baseClass+"-"+_226.baseClass);}},addChild:function(_227,_228){this.inherited(arguments);if(this._started){this._setupChild(_227);}},removeChild:function(_229){dojo.removeClass(_229.domNode,this.baseClass+"-child");if(_229.baseClass){dojo.removeClass(_229.domNode,this.baseClass+"-"+_229.baseClass);}this.inherited(arguments);}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _22f=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_232,dim){_232.resize?_232.resize(dim):dojo.marginBox(_232.domNode,dim);dojo.mixin(_232,dojo.marginBox(_232.domNode));dojo.mixin(_232,dim);};dijit.layout.layoutChildren=function(_234,dim,_236){dim=dojo.mixin({},dim);dojo.addClass(_234,"dijitLayoutContainer");_236=dojo.filter(_236,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_236,function(item){return item.layoutAlign=="client";}));dojo.forEach(_236,function(_239){var elm=_239.domNode,pos=_239.layoutAlign;var _23c=elm.style;_23c.left=dim.l+"px";_23c.top=dim.t+"px";_23c.bottom=_23c.right="auto";dojo.addClass(elm,"dijitAlign"+_22f(pos));if(pos=="top"||pos=="bottom"){size(_239,{w:dim.w});dim.h-=_239.h;if(pos=="top"){dim.t+=_239.h;}else{_23c.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_239,{h:dim.h});dim.w-=_239.w;if(pos=="left"){dim.l+=_239.w;}else{_23c.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_239,dim);}}}});};})();}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},_setDisabledAttr:function(_23d){this.disabled=_23d;dojo.attr(this.focusNode,"disabled",_23d);dijit.setWaiState(this.focusNode,"disabled",_23d);if(_23d){this._hovering=false;this._active=false;this.focusNode.removeAttribute("tabIndex");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_23e){dojo.deprecated("setDisabled("+_23e+") is deprecated. Use attr('disabled',"+_23e+") instead.","","2.0");this.attr("disabled",_23e);},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_240){var _241=_240.currentTarget;if(_241&&_241.getAttribute){this.stateModifier=_241.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_240.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _242=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_242);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _243=this.baseClass.split(" ");function _244(_245){_243=_243.concat(dojo.map(_243,function(c){return c+_245;}),"dijit"+_245);};if(this.checked){_244("Checked");}if(this.state){_244(this.state);}if(this.selected){_244("Selected");}if(this.disabled){_244("Disabled");}else{if(this.readOnly){_244("ReadOnly");}else{if(this._active){_244(this.stateModifier+"Active");}else{if(this._focused){_244("Focused");}if(this._hovering){_244(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_248={};dojo.forEach(tn.className.split(" "),function(c){_248[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _248[c];});}dojo.forEach(_243,function(c){_248[c]=true;});var _24c=[];for(var c in _248){_24c.push(c);}tn.className=_24c.join(" ");this._stateClasses=_243;},compare:function(val1,val2){if((typeof val1=="number")&&(typeof val2=="number")){return (isNaN(val1)&&isNaN(val2))?0:(val1-val2);}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_250){},_onChangeActive:false,_handleOnChange:function(_251,_252){this._lastValue=_251;if(this._lastValueReported==undefined&&(_252===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_251;}if((this.intermediateChanges||_252||_252===undefined)&&((typeof _251!=typeof this._lastValueReported)||this.compare(_251,this._lastValueReported)!=0)){this._lastValueReported=_251;if(this._onChangeActive){this.onChange(_251);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle);}this.inherited(arguments);},setValue:function(_253){dojo.deprecated("dijit.form._FormWidget:setValue("+_253+") is deprecated.  Use attr('value',"+_253+") instead.","","2.0");this.attr("value",_253);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_layoutHack:function(){if(dojo.isFF==2&&!this._layoutHackHandle){var node=this.domNode;var old=node.style.opacity;node.style.opacity="0.999";this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){this._layoutHackHandle=null;node.style.opacity=old;}),0);}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:""}),postCreate:function(){if(dojo.isIE||dojo.isWebKit){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_256,_257){this.value=_256;this._handleOnChange(_256,_257);},_getValueAttr:function(_258){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}else{if(dojo.isWebKit){te=document.createEvent("Events");te.initEvent("keypress",true,true);te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.target.dispatchEvent(te);}}}}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}
/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2007 - All Rights reserved.  **/
dojo.provide("ibm.ibmClientModel");if(!dojo._hasResource["dojox.data.dom"]){dojo._hasResource["dojox.data.dom"]=true;dojo.provide("dojox.data.dom");dojo.experimental("dojox.data.dom");dojox.data.dom.createDocument=function(_1,_2){var _3=dojo.doc;if(!_2){_2="text/xml";}if(_1&&(typeof dojo.global["DOMParser"])!=="undefined"){var _4=new DOMParser();return _4.parseFromString(_1,_2);}else{if((typeof dojo.global["ActiveXObject"])!=="undefined"){var _5=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<_5.length;i++){try{var _7=new ActiveXObject(_5[i]+".XMLDOM");if(_1){if(_7){_7.async=false;_7.loadXML(_1);return _7;}else{console.log("loadXML didn't work?");}}else{if(_7){return _7;}}}catch(e){}}}else{if((_3.implementation)&&(_3.implementation.createDocument)){if(_1){if(_3.createElement){var _8=_3.createElement("xml");_8.innerHTML=_1;var _9=_3.implementation.createDocument("foo","",null);for(var i=0;i<_8.childNodes.length;i++){_9.importNode(_8.childNodes.item(i),true);}return _9;}}else{return _3.implementation.createDocument("","",null);}}}}return null;};dojox.data.dom.textContent=function(_a,_b){if(arguments.length>1){var _c=_a.ownerDocument||dojo.doc;dojox.data.dom.replaceChildren(_a,_c.createTextNode(_b));return _b;}else{if(_a.textContent!==undefined){return _a.textContent;}var _d="";if(_a==null){return _d;}for(var i=0;i<_a.childNodes.length;i++){switch(_a.childNodes[i].nodeType){case 1:case 5:_d+=dojox.data.dom.textContent(_a.childNodes[i]);break;case 3:case 2:case 4:_d+=_a.childNodes[i].nodeValue;break;default:break;}}return _d;}};dojox.data.dom.replaceChildren=function(_f,_10){var _11=[];if(dojo.isIE){for(var i=0;i<_f.childNodes.length;i++){_11.push(_f.childNodes[i]);}}dojox.data.dom.removeChildren(_f);for(var i=0;i<_11.length;i++){dojo._destroyElement(_11[i]);}if(!dojo.isArray(_10)){_f.appendChild(_10);}else{for(var i=0;i<_10.length;i++){_f.appendChild(_10[i]);}}};dojox.data.dom.removeChildren=function(_13){var _14=_13.childNodes.length;while(_13.hasChildNodes()){_13.removeChild(_13.firstChild);}return _14;};dojox.data.dom.innerXML=function(_15){if(_15.innerXML){return _15.innerXML;}else{if(_15.xml){return _15.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(_15);}}}};}dojo.provide("ibm.portal.xml.xpath");ibm.portal.xml.xpath.evaluateXPath=function(_16,doc,_18){if(typeof ActiveXObject!="undefined"){return ibm.portal.xml.xpath.ie.evaluateXPath(_16,doc,_18);}else{return ibm.portal.xml.xpath.gecko.evaluateXPath(_16,doc,_18);}};dojo.provide("ibm.portal.xml.xpath.ie");ibm.portal.xml.xpath.ie.evaluateXPath=function(_19,doc,_1b){if(_1b){var ns="";for(var _1d in _1b){ns+="xmlns:"+_1d+"='"+_1b[_1d]+"' ";}if(doc.ownerDocument){doc.ownerDocument.setProperty("SelectionNamespaces",ns);}else{doc.setProperty("SelectionNamespaces",ns);}}var _1e=doc.selectNodes(_19);var _1f;var _20=new Array();var len=0;for(var i=0;i<_1e.length;i++){_1f=_1e[i];if(_1f){_20[len]=_1f;len++;}}return _20;};dojo.provide("ibm.portal.xml.xpath.gecko");ibm.portal.xml.xpath.gecko.evaluateXPath=function(_23,doc,_25){var _26;try{var _27=doc;if(!_27.evaluate){_27=doc.ownerDocument;}_26=_27.evaluate(_23,doc,function(_28){return _25[_28]||null;},XPathResult.ANY_TYPE,null);}catch(exc){alert("error with xpath expression: "+exc);throw new Error("Error with xpath expression"+exc);}var _29;var _2a=new Array();var len=0;do{_29=_26.iterateNext();if(_29){_2a[len]=_29;len++;}}while(_29);return _2a;};dojo.provide("ibm.portal.xml.xslt");ibm.portal.xml.xslt.ie={};ibm.portal.xml.xslt.gecko={};ibm.portal.xml.xslt.getXmlHttpRequest=function(){var _2c=null;if(typeof ActiveXObject!="undefined"){_2c=new ActiveXObject("Microsoft.XMLHTTP");}else{_2c=new XMLHttpRequest();}return _2c;};ibm.portal.xml.xslt.loadXml=function(_2d){if(typeof ActiveXObject!="undefined"){return ibm.portal.xml.xslt.ie.loadXml(_2d);}else{return ibm.portal.xml.xslt.gecko.loadXml(_2d);}};ibm.portal.xml.xslt.loadXmlString=function(_2e){if(typeof ActiveXObject!="undefined"){return ibm.portal.xml.xslt.ie.loadXmlString(_2e);}else{return ibm.portal.xml.xslt.gecko.loadXmlString(_2e);}};ibm.portal.xml.xslt.loadXsl=function(_2f){if(typeof ActiveXObject!="undefined"){return ibm.portal.xml.xslt.ie.loadXsl(_2f);}else{return ibm.portal.xml.xslt.gecko.loadXsl(_2f);}};ibm.portal.xml.xslt.transform=function(xml,xsl,_32,_33,_34){ibm.portal.debug.entry("transform",[xml,xsl,_32,_33,_34]);if(typeof ActiveXObject!="undefined"){return ibm.portal.xml.xslt.ie.transform(xml,xsl,_32,_33,_34);}else{return ibm.portal.xml.xslt.gecko.transform(xml,xsl,_32,_33,_34);}};ibm.portal.xml.xslt.transformAndUpdate=function(_35,xml,xsl,_38,_39){ibm.portal.debug.entry("transformAndUpdate",[_35,xml,xsl,_38,_39]);if(typeof ActiveXObject!="undefined"){var _3a=ibm.portal.xml.xslt.ie.transform(xml,xsl,_38,_39,true);ibm.portal.debug.text("XSLT result: "+_3a);_35.innerHTML+=_3a;}else{_3a=ibm.portal.xml.xslt.gecko.transform(xml,xsl,_38,_39,false);ibm.portal.debug.text("XSLT result: "+(new XMLSerializer()).serializeToString(_3a),"ibm.portal.xml.xslt.transformAndUpdate");var _3b=_3a.documentElement;if(_3a.documentElement.tagName=="transformiix:result"){_3b=_3a.documentElement.childNodes;var _3c=_3a.documentElement.cloneNode(true);while(_3c.hasChildNodes()&&_3c.firstChild.nodeType==3){_3c.removeChild(_3c.firstChild);}while(_3c.hasChildNodes()&&_3c.lastChild.nodeType==3){_3c.removeChild(_3c.lastChild);}while(_3c.hasChildNodes()){_35.appendChild(_3c.firstChild);}}else{ibm.portal.debug.text("Appending2: "+(new XMLSerializer()).serializeToString(_3b),"ibm.portal.xml.xslt.transformAndUpdate");_35.appendChild(_3b);}}ibm.portal.debug.exit("transformAndUpdate");};ibm.portal.xml.xslt.ie.loadXml=function(_3d){var _3e=new ActiveXObject("MSXML2.DOMDocument");_3e.async=0;_3e.resolveExternals=0;if(!_3e.load(_3d)){throw new Error("Error loading xml file "+_3d);}return _3e;};ibm.portal.xml.xslt.ie.loadXmlString=function(_3f){var _40=new ActiveXObject("MSXML2.DOMDocument");_40.async=0;_40.resolveExternals=0;if(!_40.loadXML(_3f)){throw new Error("Error loading xml string "+_3f);}return _40;};ibm.portal.xml.xslt.ie.loadXsl=function(_41){var _42=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_42.async=0;_42.resolveExternals=0;if(!_42.load(_41)){throw new Error("Error loading xsl file "+_41);}return _42;};ibm.portal.xml.xslt.ie.transform=function(_43,xsl,_45,_46,_47){var _48=_43;var _49=xsl;try{if(!_49.documentElement){_49=this.loadXsl(xsl);}}catch(e){var _4a=e.message;throw new Error(""+_4a,""+_4a);}var _4b=new ActiveXObject("Msxml2.XSLTemplate");_4b.stylesheet=_49;var _4c=_4b.createProcessor();_4c.input=_48;if(_46){for(var p in _46){_4c.addParameter(p,_46[p]);}}if(_45){_4c.addParameter("mode",_45);}if(_47){if(!_4c.transform()){throw new Error("Error transforming xml doc "+_48);}return _4c.output;}else{var _4e=new ActiveXObject("MSXML2.DOMDocument");_4e.async=0;_4e.validateOnParse=1;_48.transformNodeToObject(_49,_4e);return _4e;}};ibm.portal.xml.xslt.gecko.loadXml=function(_4f){var _50=document.implementation.createDocument("","",null);_50.async=0;_50.load(_4f);return _50;};ibm.portal.xml.xslt.gecko.loadXmlString=function(_51){var _52=new DOMParser();try{oXmlDoc=_52.parseFromString(_51,"text/xml");}catch(exc){alert("error loading xml");throw new Error("Error loading xml string "+_51);}return oXmlDoc;};ibm.portal.xml.xslt.gecko.loadXsl=function(_53){var _54=document.implementation.createDocument("","",null);_54.async=0;_54.load(_53);return _54;};ibm.portal.xml.xslt.gecko.transform=function(_55,xsl,_57,_58,_59){try{var _5a=xsl;if(!_5a.documentElement){alert("xslDoc is not a Document, loading it...");_5a=this.loadXsl(xsl);}var _5b=new XSLTProcessor();_5b.importStylesheet(_5a);if(_58){for(var p in _58){_5b.setParameter(null,p,_58[p]);}}if(_57){_5b.setParameter(null,"mode",_57);}var _5d=_5b.transformToDocument(_55);if(!_59){return _5d;}resultStr=_5d.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};ibm.portal.xml.xslt.setLayerContentByXml=function(_5e,xml,xsl,_61,_62){var _63=ibm.portal.xml.xslt.transform(xml,xsl,null,_61,_62);if(_5e.innerHTML){_5e.innerHTML=_63;}else{var obj=document.getElementById(_5e);obj.innerHTML=_63;}};dojo.provide("com.ibm.portal.xpath");com.ibm.portal.xpath.evaluateXPath=function(_65,doc,_67){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xpath.ie.evaluateXPath(_65,doc,_67);}else{return com.ibm.portal.xpath.gecko.evaluateXPath(_65,doc,_67);}};dojo.provide("com.ibm.portal.xpath.ie");com.ibm.portal.xpath.ie.evaluateXPath=function(_68,doc,_6a){if(_6a){var ns="";for(var _6c in _6a){ns+="xmlns:"+_6c+"='"+_6a[_6c]+"' ";}if(doc.ownerDocument){doc.ownerDocument.setProperty("SelectionNamespaces",ns);}else{doc.setProperty("SelectionNamespaces",ns);}}var _6d=doc.selectNodes(_68);var _6e;var _6f=new Array();var len=0;for(var i=0;i<_6d.length;i++){_6e=_6d[i];if(_6e){_6f[len]=_6e;len++;}}return _6f;};dojo.provide("com.ibm.portal.xpath.gecko");com.ibm.portal.xpath.gecko.evaluateXPath=function(_72,doc,_74){var _75;try{var _76=doc;if(!_76.evaluate){_76=doc.ownerDocument;}_75=_76.evaluate(_72,doc,function(_77){return _74[_77]||null;},XPathResult.ANY_TYPE,null);}catch(exc){alert("error with xpath expression: "+exc);throw new Error("Error with xpath expression"+exc);}var _78;var _79=new Array();var len=0;do{_78=_75.iterateNext();if(_78){_79[len]=_78;len++;}}while(_78);return _79;};dojo.provide("com.ibm.portal.xslt");dojo.require("dojox.data.dom");dojo.declare("com.ibm.portal.xslt.TransformerFactory",null,{constructor:function(){this._xsltMap=new Array();},newTransformer:function(_7b){ibm.portal.debug.entry("newTransformer",[_7b]);var _7c=this._getXslt(_7b);return new com.ibm.portal.xslt.Transformer(_7c);},_getXslt:function(_7d){var _7e=null;for(i=0;i<this._xsltMap.length;i++){var _7f=this._xsltMap[i];if(_7d==_7f.url){_7e=_7f.xsl;break;}}if(_7e==null){_7e=this._loadXslt(_7d);this._xsltMap.push({url:_7d,xsl:_7e});}if(_7e==null){ibm.portal.debug.text("Cannot load XSL document.");}return _7e;},_loadXslt:function(_80){var _81=new dojo.xml.XslTransform(_80);return _81;}});dojo.declare("com.ibm.portal.xslt.Transformer",null,{constructor:function(_82){this._xslt=_82;},transformToRegion:function(_83,_84,_85,doc){if(dojo.isIE){this._xslt.transformToRegion(_83,_84,_85,doc);}else{var _87=this._xslt.transformToDocument(_83,_84);dojox.data.dom.replaceChildren(_85,_87.documentElement);}},transformToDocument:function(_88,_89,_8a){var _8b=null;if(_8a){_8b=this._xslt.getResultString(_88,_89,document);}else{_8b=this._xslt.transformToDocument(_88,_89);}return _8b;}});com.ibm.portal.xslt.TRANSFORMER_FACTORY=new com.ibm.portal.xslt.TransformerFactory();com.ibm.portal.xslt.ie={};com.ibm.portal.xslt.gecko={};com.ibm.portal.xslt.getXmlHttpRequest=function(){var _8c=null;if(typeof ActiveXObject!="undefined"){_8c=new ActiveXObject("Microsoft.XMLHTTP");}else{_8c=new XMLHttpRequest();}return _8c;};com.ibm.portal.xslt.loadXml=function(_8d){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXml(_8d);}else{return com.ibm.portal.xslt.gecko.loadXml(_8d);}};com.ibm.portal.xslt.loadXmlString=function(_8e){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXmlString(_8e);}else{return com.ibm.portal.xslt.gecko.loadXmlString(_8e);}};com.ibm.portal.xslt.loadXsl=function(_8f){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXsl(_8f);}else{return com.ibm.portal.xslt.gecko.loadXsl(_8f);}};com.ibm.portal.xslt.transform=function(xml,xsl,_92,_93,_94){ibm.portal.debug.entry("transform",[xml,xsl,_92,_93,_94]);if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.transform(xml,xsl,_92,_93,_94);}else{return com.ibm.portal.xslt.gecko.transform(xml,xsl,_92,_93,_94);}};com.ibm.portal.xslt.transformAndUpdate=function(_95,xml,xsl,_98,_99){ibm.portal.debug.entry("transformAndUpdate",[_95,xml,xsl,_98,_99]);if(typeof ActiveXObject!="undefined"){var _9a=com.ibm.portal.xslt.ie.transform(xml,xsl,_98,_99,true);ibm.portal.debug.text("XSLT result: "+_9a);_95.innerHTML+=_9a;}else{_9a=com.ibm.portal.xslt.gecko.transform(xml,xsl,_98,_99,false);ibm.portal.debug.text("XSLT result: "+(new XMLSerializer()).serializeToString(_9a),"com.ibm.portal.xslt.transformAndUpdate");var _9b=_9a.documentElement;if(_9a.documentElement.tagName=="transformiix:result"){_9b=_9a.documentElement.childNodes;var _9c=_9a.documentElement.cloneNode(true);while(_9c.hasChildNodes()&&_9c.firstChild.nodeType==3){_9c.removeChild(_9c.firstChild);}while(_9c.hasChildNodes()&&_9c.lastChild.nodeType==3){_9c.removeChild(_9c.lastChild);}while(_9c.hasChildNodes()){_95.appendChild(_9c.firstChild);}}else{ibm.portal.debug.text("Appending2: "+(new XMLSerializer()).serializeToString(_9b),"com.ibm.portal.xslt.transformAndUpdate");_95.appendChild(_9b);}}ibm.portal.debug.exit("transformAndUpdate");};com.ibm.portal.xslt.ie.loadXml=function(_9d){var _9e=new ActiveXObject("MSXML2.DOMDocument");_9e.async=0;_9e.resolveExternals=0;if(!_9e.load(_9d)){throw new Error("Error loading xml file "+_9d);}return _9e;};com.ibm.portal.xslt.ie.loadXmlString=function(_9f){var _a0=new ActiveXObject("MSXML2.DOMDocument");_a0.async=0;_a0.resolveExternals=0;if(!_a0.loadXML(_9f)){throw new Error("Error loading xml string "+_9f);}return _a0;};com.ibm.portal.xslt.ie.loadXsl=function(_a1){var _a2=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_a2.async=0;_a2.resolveExternals=0;if(!_a2.load(_a1)){throw new Error("Error loading xsl file "+_a1);}return _a2;};com.ibm.portal.xslt.ie.transform=function(_a3,xsl,_a5,_a6,_a7){var _a8=_a3;var _a9=xsl;try{if(!_a9.documentElement){_a9=this.loadXsl(xsl);}}catch(e){var _aa=e.message;throw new Error(""+_aa,""+_aa);}var _ab=new ActiveXObject("Msxml2.XSLTemplate");_ab.stylesheet=_a9;var _ac=_ab.createProcessor();_ac.input=_a8;if(_a6){for(var p in _a6){_ac.addParameter(p,_a6[p]);}}if(_a5){_ac.addParameter("mode",_a5);}if(_a7){if(!_ac.transform()){throw new Error("Error transforming xml doc "+_a8);}return _ac.output;}else{var _ae=new ActiveXObject("MSXML2.DOMDocument");_ae.async=0;_ae.validateOnParse=1;_a8.transformNodeToObject(_a9,_ae);return _ae;}};com.ibm.portal.xslt.gecko.loadXml=function(_af){var _b0=document.implementation.createDocument("","",null);_b0.async=0;_b0.load(_af);return _b0;};com.ibm.portal.xslt.gecko.loadXmlString=function(_b1){var _b2=new DOMParser();try{oXmlDoc=_b2.parseFromString(_b1,"text/xml");}catch(exc){alert("error loading xml");throw new Error("Error loading xml string "+_b1);}return oXmlDoc;};com.ibm.portal.xslt.gecko.loadXsl=function(_b3){var _b4=document.implementation.createDocument("","",null);_b4.async=0;_b4.load(_b3);return _b4;};com.ibm.portal.xslt.gecko.transform=function(_b5,xsl,_b7,_b8,_b9){try{var _ba=xsl;if(!_ba.documentElement){alert("xslDoc is not a Document, loading it...");_ba=this.loadXsl(xsl);}var _bb=new XSLTProcessor();_bb.importStylesheet(_ba);if(_b8){for(var p in _b8){_bb.setParameter(null,p,_b8[p]);}}if(_b7){_bb.setParameter(null,"mode",_b7);}var _bd=_bb.transformToDocument(_b5);if(!_b9){return _bd;}resultStr=_bd.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};com.ibm.portal.xslt.setLayerContentByXml=function(_be,xml,xsl,_c1,_c2){var _c3=com.ibm.portal.xslt.transform(xml,xsl,null,_c1,_c2);if(_be.innerHTML){_be.innerHTML=_c3;}else{var obj=document.getElementById(_be);obj.innerHTML=_c3;}};if(!dojo._hasResource["com.ibm.portal.state"]){dojo._hasResource["com.ibm.portal.state"]=true;dojo.provide("com.ibm.portal.state");dojo.declare("com.ibm.portal.state.StateManager",null,{constructor:function(_c5){this.stateDOM=null;this.stateNode=null;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.serializationManager=new com.ibm.portal.state.SerializationManager(_c5);},getState:function(){return this.stateDOM;},newState:function(_c6,_c7,_c8){var _c9=null;if(_c6==null){_c9=dojox.data.dom.createDocument();}else{if(_c7==null){_c9=dojox.data.dom.createDocument(dojox.data.dom.innerXML(_c6));}else{var _ca=com.ibm.portal.xslt;var _cb=_ca.transform(_c6,_c7,null,_c8,true);_c9=dojox.data.dom.createDocument(_cb);}}return _c9;},reset:function(_cc){this.stateDOM=_cc;this.stateNode=this._getStateNode(_cc);},getSerializationManager:function(){return this.serializationManager;},newPortletAccessor:function(_cd,_ce){var _cf;var _d0;if(_ce==null||this.stateDOM==_ce){_cf=this.stateNode;_d0=this.stateDOM;}else{_cf=this._getStateNode(_ce);_d0=_ce;}var _d1="state:portlet[@id='"+_cd+"']";var _d2=this._getSpecificStateNode("portlet",_d1,_cf,_d0);_d2.setAttribute("id",_cd);return new com.ibm.portal.state.PortletAccessor(_d2,_d0);},newPortletListAccessor:function(_d3){var _d4;var _d5;if(_d3==null||this.stateDOM==_d3){_d4=this.stateNode;_d5=this.stateDOM;}else{_d4=this._getStateNode(_d3);_d5=_d3;}return new com.ibm.portal.state.PortletListAccessor(_d4,_d5);},newSelectionAccessor:function(_d6){var _d7;var _d8;if(_d6==null||this.stateDOM==_d6){_d7=this.stateNode;_d8=this.stateDOM;}else{_d7=this._getStateNode(_d6);_d8=_d6;}var _d9=this._getSpecificStateNode("selection","state:selection",_d7,_d8);return new com.ibm.portal.state.SelectionAccessor(_d9,_d8);},newSoloStateAccessor:function(_da){var _db;var _dc;if(_da==null||this.stateDOM==_da){_db=this.stateNode;_dc=this.stateDOM;}else{_db=this._getStateNode(_da);_dc=_da;}var _dd=this._getSpecificStateNode("solo","state:solo",_db,_dc);return new com.ibm.portal.state.SoloStateAccessor(_dd,_dc);},newThemeTemplateAccessor:function(_de){var _df;var _e0;if(_de==null||this.stateDOM==_de){_df=this.stateNode;_e0=this.stateDOM;}else{_df=this._getStateNode(_de);_e0=_de;}var _e1=this._getSpecificStateNode("theme-template","state:theme-template",_df,_e0);return new com.ibm.portal.state.ThemeTemplateAccessor(_e1,_e0);},_getStateNode:function(_e2){var _e3="state:root/state:state[@type='navigational']";var _e4=com.ibm.portal.xpath.evaluateXPath(_e3,_e2,this.ns);var _e5=null;if(_e4==null||_e4.length<=0){var _e6=_e2.firstChild;if(_e6==null){_e6=this._createElement(_e2,"root");this._prependChild(_e6,_e2);}_e5=_e6.firstChild;if(_e5==null){_e5=this._createElement(_e2,"state");this._prependChild(_e5,_e6);}_e5.setAttribute("type","navigational");}else{_e5=_e4[0];}return _e5;},_getSpecificStateNode:function(_e7,_e8,_e9,_ea){var _eb=com.ibm.portal.xpath.evaluateXPath(_e8,_e9,this.ns);var _ec;if(_eb==null||_eb.length<=0){_ec=this._createElement(_ea,_e7);this._prependChild(_ec,_e9);}else{_ec=_eb[0];}return _ec;},_prependChild:function(_ed,_ee){_ee.firstChild?_ee.insertBefore(_ed,_ee.firstChild):_ee.appendChild(_ed);},_createElement:function(dom,_f0){var _f1;if(dojo.isIE){_f1=dom.createNode(1,_f0,this.ns.state);}else{_f1=dom.createElementNS(this.ns.state,_f0);}return _f1;}});dojo.declare("com.ibm.portal.state.PortletAccessor",null,{constructor:function(_f2,_f3){this.portletNode=_f2;this.stateDOM=_f3;this.parameters=new com.ibm.portal.state.Parameters(_f2,_f3);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.xsltURL=dojo.moduleUrl("com","ibm/portal/state/");},getPortletMode:function(){var _f4="state:portlet-mode";var _f5=com.ibm.portal.xpath.evaluateXPath(_f4,this.portletNode,this.ns);var _f6=ibm.portal.portlet.PortletMode.VIEW;if(_f5!=null&&_f5.length>0){var _f7=_f5[0].firstChild;if(_f7!=null){_f6=_f7.nodeValue;}}return _f6;},getWindowState:function(){var _f8="state:window-state";var _f9=com.ibm.portal.xpath.evaluateXPath(_f8,this.portletNode,this.ns);var _fa=ibm.portal.portlet.WindowState.NORMAL;if(_f9!=null&&_f9.length>0){var _fb=_f9[0].firstChild;if(_fb!=null){_fa=_fb.nodeValue;}}return _fa;},getRenderParameters:function(){return this.parameters;},setPortletMode:function(_fc){var _fd="state:portlet-mode";var _fe=com.ibm.portal.xpath.evaluateXPath(_fd,this.portletNode,this.ns);if(_fe==null||_fe.length<=0){var _ff=this._createElement(this.stateDOM,"portlet-mode");this._prependChild(_ff,this.portletNode);var _100=this.stateDOM.createTextNode(_fc);this._prependChild(_100,_ff);}else{_fe[0].firstChild.nodeValue=_fc;}},setWindowState:function(_101){var expr="state:window-state";var _103=com.ibm.portal.xpath.evaluateXPath(expr,this.portletNode,this.ns);if(_103==null||_103.length<=0){var _104=this._createElement(this.stateDOM,"window-state");this._prependChild(_104,this.portletNode);var _105=this.stateDOM.createTextNode(_101);this._prependChild(_105,_104);}else{_103[0].firstChild.nodeValue=_101;}},getPortletState:function(){var _106=dojox.data.dom.createDocument();var _107=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_106);_107.setPortletMode(this.getPortletMode());_107.setWindowState(this.getWindowState());var _108=this.getRenderParameters().getMap();if(_108.length>0){_107.getRenderParameters().putAll(_108);}return _106;},setPortletState:function(_109,_10a){var _10b=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_109);this.setPortletMode(_10b.getPortletMode());this.setWindowState(_10b.getWindowState());var _10c=_10b.getRenderParameters().getMap();if(_10a==null||_10a==false){this.getRenderParameters().clear();}if(_10c.length>0){this.getRenderParameters().putAll(_10c);}},_prependChild:function(node,_10e){_10e.firstChild?_10e.insertBefore(node,_10e.firstChild):_10e.appendChild(node);},_createElement:function(dom,name){var _111;if(dojo.isIE){_111=dom.createNode(1,name,this.ns.state);}else{_111=dom.createElementNS(this.ns.state,name);}return _111;}});dojo.declare("com.ibm.portal.state.Parameters",null,{constructor:function(_112,_113){this.baseNode=_112;this.stateDOM=_113;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getMap:function(){var _114=this.getNames();var map=new Array(_114.length);for(var i=0;i<_114.length;i++){var name=_114[i];map[i]={name:name,values:this.getValues(name)};}return map;},getNames:function(){var expr="state:parameters/state:param";var _119=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _11a=new Array();if(_119!=null&&_119.length>0){var _11b=_119.length;for(var i=0;i<_11b;i++){_11a[i]=_119[i].getAttribute("name");}}return _11a;},getValue:function(name){var _11e=this.getValues(name);var _11f=null;if(_11e!=null&&_11e.length>0){_11f=_11e[0];}return _11f;},getValues:function(name){var expr="state:parameters/state:param[@name='"+name+"']/state:value";var _122=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _123=null;if(_122!=null&&_122.length>0){_123=new Array(_122.length);var _124=_122.length;for(var i=0;i<_124;i++){var _126=_122[i].firstChild;if(_126!=null){_123[i]=_126.nodeValue;}}}return _123;},remove:function(name){var expr="state:parameters/state:param[@name='"+name+"']";var _129=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_129!=null){var _12a=_129[0];if(_12a&&_12a.parentNode){_12a.parentNode.removeChild(_12a);}}},putAll:function(map){if(map!=null&&map.length>0){for(var i=map.length-1;i>=0;i--){var _12d=map[i].name;var _12e=map[i].values;this.setValues(_12d,_12e);}}},setValue:function(name,_130){this.setValues(name,new Array(_130));},setValues:function(name,_132){var expr="state:parameters/state:param[@name='"+name+"']";var _134=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _135;if(_134==null||_134.length==0){var _136=null;if(_136==null){_136=this._createElement(this.stateDOM,"parameters");this._prependChild(_136,this.baseNode);}_135=this._createElement(this.stateDOM,"param");_135.setAttribute("name",name);this._prependChild(_135,_136);}else{_135=_134[0];dojox.data.dom.removeChildren(_135);}if(_132!=null){for(var i=_132.length-1;i>=0;i--){var _138=this._createElement(this.stateDOM,"value");this._prependChild(_138,_135);var _139=_132[i];if(_139!=null){var _13a=this.stateDOM.createTextNode(_139);this._prependChild(_13a,_138);}}}},clear:function(){var expr="state:parameters";var _13c=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_13c!=null){var _13d=_13c[0];if(_13d&&_13d.parentNode){_13d.parentNode.removeChild(_13d);}}},_getFirstChildWithTag:function(_13e,_13f){if(!_13e||!_13f){return null;}var node=_13e.firstChild;while(node){if(node.nodeType==1&&node.tagName&&node.tagName.toLowerCase()==_13f.toLowerCase()){return node;}node=node.nextSibling;}return null;},_prependChild:function(node,_142){_142.firstChild?_142.insertBefore(node,_142.firstChild):_142.appendChild(node);},_createElement:function(dom,name){var _145;if(dojo.isIE){_145=dom.createNode(1,name,this.ns.state);}else{_145=dom.createElementNS(this.ns.state,name);}return _145;}});dojo.declare("com.ibm.portal.state.PortletListAccessor",null,{constructor:function(_146,_147){this.stateNode=_146;this.stateDOM=_147;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPortlets:function(){var expr="state:portlet";var _149=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);var _14a=null;if(_149!=null&&_149.length>0){_14a=new Array(_149.length);for(var i=0;i<_149.length;i++){var node=_149[i];_14a[i]=node.getAttribute("id");}}return _14a;}});dojo.declare("com.ibm.portal.state.SelectionAccessor",null,{constructor:function(_14d,_14e){this.selectionNode=_14d;this.stateDOM=_14e;this.parameters=new com.ibm.portal.state.Parameters(this.selectionNode,_14e);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPageSelection:function(){return this.selectionNode.getAttribute("selection-node");},getFragmentSelection:function(){var _14f=this.getParameters();var _150=_14f.getValues("frg");var _151=null;if(_150!=null&&_150.length>0){_151=_150[0];if(_150.length>1){if(_151=="pw"){_151=_150[1];}}}return _151;},getMapping:function(_152){var expr="state:mapping[@src='"+_152+"']";var _154=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _155=null;if(_154!=null&&_154.length>0){var _156=_154[0];_155=_156.getAttribute("dst");}return _155;},getParameters:function(){return this.parameters;},setPageSelection:function(_157){this.selectionNode.setAttribute("selection-node",_157);},setFragmentSelection:function(_158,_159){var _15a=this.getParameters();if(_159==null||_159==true){var _15b=new Array(2);_15b[0]=_158;_15b[1]="pw";_15a.setValues("frg",_15b);}else{_15a.setValue("frg",_158);}},setMapping:function(_15c,_15d){if(_15d!=null){var expr="state:mapping[@src='"+_15c+"']";var _15f=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _160;if(_15f!=null&&_15f.length>0){_160=_15f[0];}else{_160=this._createElement(this.stateDOM,"mapping");this._prependChild(_160,this.selectionNode);_160.setAttribute("src",_15c);}_160.setAttribute("dst",_15d);}else{this.removeMapping(_15c);}},removeMapping:function(_161){var expr="state:mapping[@src='"+_161+"']";var _163=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _164=false;if(_163!=null&&_163.length>0){for(var i=0;i<_163.length;i++){var _166=_163[i];if(_166&&_166.parentNode){_166.parentNode.removeChild(_166);}}_164=true;}return _164;},_prependChild:function(node,_168){_168.firstChild?_168.insertBefore(node,_168.firstChild):_168.appendChild(node);},_createElement:function(dom,name){var _16b;if(dojo.isIE){_16b=dom.createNode(1,name,this.ns.state);}else{_16b=dom.createElementNS(this.ns.state,name);}return _16b;},getSelection:function(){return this.getPageSelection();},setSelection:function(_16c){this.setPageSelection(_16c);}});dojo.declare("com.ibm.portal.state.SoloStateAccessor",null,{constructor:function(_16d,_16e){this.soloNode=_16d;this.stateDOM=_16e;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setSoloPortlet:function(_16f){dojox.data.dom.removeChildren(this.soloNode);if(_16f!=null){var _170=this.stateDOM.createTextNode(_16f);this._prependChild(_170,this.soloNode);}},getSoloPortlet:function(){var _171=this.soloNode.firstChild;if(_171!=null){return _171.nodeValue;}else{return null;}},setReturnSelection:function(_172){this.soloNode.setAttribute("return-selection",_172);},getReturnSelection:function(){return this.soloNode.getAttribute("return-selection");},_prependChild:function(node,_174){_174.firstChild?_174.insertBefore(node,_174.firstChild):_174.appendChild(node);}});dojo.declare("com.ibm.portal.state.ThemeTemplateAccessor",null,{constructor:function(_175,_176){this.themeTemplateNode=_175;this.stateDOM=_176;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setThemeTemplate:function(_177){dojox.data.dom.removeChildren(this.themeTemplateNode);if(_177!=null){var _178=this.stateDOM.createTextNode(_177);this._prependChild(_178,this.themeTemplateNode);}},getThemeTemplate:function(){var _179=this.themeTemplateNode.firstChild;if(_179!=null){return _179.nodeValue;}else{return null;}},_prependChild:function(node,_17b){_17b.firstChild?_17b.insertBefore(node,_17b.firstChild):_17b.appendChild(node);}});dojo.declare("com.ibm.portal.state.SerializationManager",null,{STATE_URI_SCHEME:"state",STATE_URI_POST:"state:encode",DOWNLOAD_MODE:"download",STATUS_UNDEFINED:0,STATUS_OK:1,STATUS_ERROR:2,STATE_NS_URI:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state",STATE_THRESHOLD:1024,constructor:function(_17c){this.serviceURL=_17c;},serialize:function(_17d,_17e,_17f){ibm.portal.debug.entry("SerializationManager.serialize",[dojox.data.dom.innerXML(_17d),_17e,_17f]);var _180=dojox.data.dom.innerXML(_17d);var _181=escape(_180);var _182=this._getMimeType();var _183=null;var me=this;ibm.portal.debug.text("Mime type for response: "+_182);ibm.portal.debug.text("Length of encoded state XML is: "+_181.length);ibm.portal.debug.text("Encoded state XML is: "+_181);var _185=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_185);if(_181.length<=this.STATE_THRESHOLD){var _186=this.STATE_URI_SCHEME+":"+_181;var _187;_17e=(_17e!=null&&_17e==true);if(_17e==true){if(_185!=null){_187={"uri":_186,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true","digest":_185};}else{_187={"uri":_186,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true"};}}else{if(_185!=null){_187={"uri":_186,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_185};}else{_187={"uri":_186,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}}ibm.portal.debug.text("Doing a GET request: { url: \""+this.serviceURL+"\", sync: "+((_17f)?false:true)+", content: "+_187+", handleAs: "+_182+", transport: XMLHTTPRequest");ibm.portal.debug.text("Parameters: uri=\""+_187.uri+"\" mode=\""+_187.mode+"\" xmlns=\""+_187.xmlns+"\"");dojo.xhrGet({url:this.serviceURL,sync:(_17f)?false:true,content:_187,handleAs:_182,handle:function(_188,_189){ibm.portal.debug.text("Response: "+_188);_183=me._handleSerializationResponse.call(me,_188,_17f,_17d,_17e);return _188;},transport:"XMLHTTPTransport"});}else{ibm.portal.debug.text("Doing a POST request.");if(dojo.isIE){var idx=_180.indexOf("UTF-16");if(idx>=0){_180=_180.replace(/UTF-16/,"UTF-8");}}var url=this.serviceURL+"?uri="+this.STATE_URI_POST+"&xmlns="+this.STATE_NS_URI;if(_185!=null){url+="&digest="+_185;}dojo.rawXhrPost({url:url,sync:(_17f)?false:true,postData:_180,handleAs:_182,headers:{"Content-Type":"text/xml"},handle:function(_18c,_18d){_183=me._handleSerializationResponse.call(me,_18c,_17f,_17d,_17e);return _18c;},transport:"XMLHTTPTransport"});}ibm.portal.debug.exit("SerializationManager.serialize",_183);return _183;},deserialize:function(url,_18f){var _190=this.STATE_URI_SCHEME+":"+url;var _191=null;var _192=this._getMimeType();var me=this;var _194=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_194);var _195;if(_194!=null){_195={"uri":_190,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_194};}else{_195={"uri":_190,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}dojo.xhrGet({url:this.serviceURL,sync:(_18f)?false:true,content:_195,handleAs:_192,handle:function(_196,_197){var type=(_196 instanceof Error)?"error":"load";if(type=="load"){var _199=me._getResponseXML(_196);if(_199.documentElement.nodeName=="parsererror"){_199=dojox.data.dom.createDocument();}if(_18f){_18f(1,url,_199);}else{_191={"status":1,"input":me.serviceURL,"url":me.serviceURL,"returnObject":_199,"state":_199};}}else{if(type=="error"){if(_18f){_18f(2,url,null);}else{_191={"status":2,"input":me.serviceURL,"url":me.serviceURL,"returnObject":null,"state":null};}}}},transport:"XMLHTTPTransport"});return _191;},_handleSerializationResponse:function(_19a,_19b,_19c,_19d){var _19e=null;var type=(_19a instanceof Error)?"error":"load";if(type=="load"){var _1a0=this._getResponseXML(_19a);var _1a1="atom:entry/atom:link";var ns={"atom":"http://www.w3.org/2005/Atom","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};var _1a3=null;var _1a4=com.ibm.portal.xpath.evaluateXPath(_1a1,_1a0,ns);if(_1a4!=null&&_1a4.length>0){_1a3=_1a4[0].getAttribute("href");}var _1a5=_19c;if(_19d==true){var _1a6="atom:entry/atom:content/state:root";var _1a7=com.ibm.portal.xpath.evaluateXPath(_1a6,_1a0,ns);if(_1a7!=null&&_1a7.length>0){var _1a8=dojox.data.dom.innerXML(_1a7[0]);_1a5=dojox.data.dom.createDocument(_1a8);}}if(_19b){_19b(1,_1a5,_1a3);}else{_19e={"status":1,"input":_1a5,"state":_1a5,"returnObject":_1a3,"url":_1a3};}}else{if(type=="error"){if(_19b){_19b(this.STATUS_ERROR,_19c,null);}else{_19e={"status":this.STATUS_ERROR,"input":_19c,"state":_19c,"returnObject":null,"url":null};}}}return _19e;},_getMimeType:function(){var _1a9="xml";if(dojo.isIE){_1a9="text";}return _1a9;},_getResponseXML:function(data){var _1ab=data;if(dojo.isIE){_1ab=dojox.data.dom.createDocument(data);}return _1ab;},_encodeAscii:function(str){var ret=str;if(dojo.isString(ret)){var _1ae=escape(ret);var _1af=/%u([A-F0-9][A-F0-9][A-F0-9][A-F0-9])/i;var _1b0=null;while((_1b0=_1ae.match(_1af))){ret+=_1ae.substring(0,_1b0.index)+escape(Number("0x"+_1b0[1]));_1ae=_1ae.substring(_1b0.index+_1b0[0].length);}ret+=_1ae;ret=ret.replace(/\+/g,"%2B");}return ret;}});dojo.declare("com.ibm.portal.navigation.controller.StateVaryManager",null,{constructor:function(){this._expr=new Array();},setExpressions:function(id,_1b2){var _1b3=this._findBucket(id);if(_1b3==null){_1b3={"id":id,"expr":null};this._expr.push(_1b3);}_1b3.expr=_1b2;},getExpressions:function(id){var _1b5=null;var _1b6=this._findBucket(id);if(_1b6!=null){_1b5=_1b6.expr;}return _1b5;},_findBucket:function(id){var _1b8=null;for(i=0;i<this._expr.length;i++){var temp=this._expr[i];if(temp.id==id){_1b8=temp;break;}}return _1b8;}});com.ibm.portal.state.STATE_MANAGER=new com.ibm.portal.state.StateManager();com.ibm.portal.state.STATE_MANAGER.reset(dojox.data.dom.createDocument());}dojo.provide("com.ibm.portal.debug");dojo.provide("ibm.portal.debug");ibm.portal.debug.text=function(str,_1bb){window.console.log(str);};ibm.portal.debug.entry=function(_1bc,args){var _1be=_1bc+" --> entry; { ";if(args&&args.length>0){for(arg in args){_1be=_1be+args[arg]+" ";}}_1be=_1be+" } ";ibm.portal.debug.text(_1be,_1bc);};ibm.portal.debug.exit=function(_1bf,_1c0){var _1c1=_1bf+" --> exit;";if(typeof (_1c0)!="undefined"){_1c1=_1c1+" { "+_1c0+" } ";}ibm.portal.debug.text(_1c1,_1bf);};ibm.portal.debug.escapeXmlForHTMLDisplay=function(_1c2){_1c2=_1c2.replace(/</g,"&lt;");_1c2=_1c2.replace(/>/g,"&gt;");return _1c2;};dojo.provide("com.ibm.portal.EventBroker");dojo.require("com.ibm.portal.debug");dojo.declare("com.ibm.portal.Event",null,{constructor:function(_1c3){this.eventName=_1c3;this._listeners=new Array();},fire:function(_1c4){ibm.portal.debug.text("Firing event: "+this.eventName+" with parameters: ");dojo.publish(this.eventName,[_1c4]);},register:function(_1c5,_1c6){if(!_1c6){return dojo.subscribe(this.eventName,null,_1c5);}else{return dojo.subscribe(this.eventName,_1c5,_1c6);}},unregister:function(_1c7){dojo.unsubscribe(_1c7);},cancel:function(_1c8){dojo.publish(this.id+"/cancel");}});dojo.declare("com.ibm.portal.EventBroker",null,{startPage:new com.ibm.portal.Event("portal/StartPage"),endPage:new com.ibm.portal.Event("portal/EndPage"),startFragment:new com.ibm.portal.Event("portal/StartFragment"),endFragment:new com.ibm.portal.Event("portal/EndFragment"),fragmentUpdated:new com.ibm.portal.Event("portal/FragmentUpdated"),startRequest:new com.ibm.portal.Event("portal/StartRequest"),endRequest:new com.ibm.portal.Event("portal/EndRequest"),cancelAll:new com.ibm.portal.Event("portal/CancelAll"),stateChanged:new com.ibm.portal.Event("portal/StateChanged"),startScriptHandling:new com.ibm.portal.Event("portal/StartScriptHandling"),endScriptHandling:new com.ibm.portal.Event("portal/EndScriptHandling"),javascriptCleanup:new com.ibm.portal.Event("portal/JavascriptCleanup"),stopEvent:new com.ibm.portal.Event("portal/StopEvent"),redirect:new com.ibm.portal.Event("portal/Redirect")});com.ibm.portal.EVENT_BROKER=new com.ibm.portal.EventBroker();if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}dojo.provide("com.ibm.portal.utilities");com.ibm.portal.utilities={findPortletIdByElement:function(_1cd){ibm.portal.debug.entry("findPortletID",[_1cd]);var id="";var _1cf=_1cd.parentNode;while(_1cf&&id.length==0){ibm.portal.debug.text("examining element "+_1cf.tagName+"; class="+_1cf.className,"findPortletID");if(_1cf.className&&(_1cf.className.match(/\bwpsPortletBody\b/)||_1cf.className.match(/\bwpsPortletBodyInlineMode\b/))){id=_1cf.id;var _1d0=id.indexOf("_mode");if(_1d0>=0){id=id.substring(0,_1d0);}}_1cf=_1cf.parentNode;}if(id.indexOf("portletActions_")>=0){id=id.substring("portletActions_".length);}ibm.portal.debug.exit("findPortletID",[id]);return id;},encodeURI:function(uri){ibm.portal.debug.entry("encodeURI",[uri]);var _1d2=uri;var _1d3=uri.lastIndexOf(":");while(_1d3>=0){var _1d4=_1d2.substring(0,_1d3);var part=_1d2.substring(_1d3+1);_1d2=_1d4+":"+encodeURIComponent(part);_1d3=_1d4.lastIndexOf(":");}_1d2=encodeURIComponent(_1d2);ibm.portal.debug.exit("encodeURI",[_1d2]);return _1d2;},decodeURI:function(uri){ibm.portal.debug.entry("decodeURI",[uri]);var _1d7=decodeURIComponent(uri);var _1d8=_1d7.indexOf(":");while(_1d8>=0){var _1d9=_1d7.substring(0,_1d8);var part=_1d7.substring(_1d8+1);_1d7=_1d9+":"+decodeURIComponent(part);_1d8=_1d7.indexOf(":",_1d8+1);}ibm.portal.debug.exit("decodeURI",[_1d7]);return _1d7;},getSelectionNodeId:function(_1db){ibm.portal.debug.entry("getSelectionNodeId",[_1db]);var _1dc=_1db.split("@oid:");ibm.portal.debug.exit("getSelectionNodeId",[_1dc[1]]);return _1dc[1];},getControlId:function(_1dd){ibm.portal.debug.entry("_getControlId",[_1dd]);var _1de=_1dd.split("@oid:");var _1df=_1de[0].split("oid:");ibm.portal.debug.exit("getControlId",[_1df[1]]);return _1df[1];},overwriteProperty:function(obj,_1e1,_1e2,_1e3){ibm.portal.debug.entry("overwriteProperty",[obj,_1e1,_1e2,_1e3]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}if(!_1e3){_1e3=false;}var _1e4=(_1e3&&(obj["_overwritten_"][_1e1]!=null));if(!_1e4){if(obj["_overwritten_"][_1e1]==null){obj["_overwritten_"][_1e1]=obj[_1e1];}else{obj["_overwritten_"][_1e1]=null;}obj[_1e1]=_1e2;ibm.portal.debug.text("Property overwrite successful!");}ibm.portal.debug.exit("overwriteProperty");},restoreProperty:function(obj,_1e6){ibm.portal.debug.entry("utilities.restoreProperty",[obj,_1e6]);var _1e7=obj[_1e6];if(obj["_overwritten_"]!=null){ibm.portal.debug.text("overwritten property value: "+obj["_overwritten_"]);obj[_1e6]=obj["_overwritten_"][_1e6];obj["_overwritten_"][_1e6]=null;}else{obj[_1e6]=null;}ibm.portal.debug.exit("utilities.restoreProperty",_1e7);return _1e7;},getOverwrittenProperty:function(obj,_1e9){if(obj["_overwritten_"]){return obj["_overwritten_"][_1e9];}else{return null;}},setOverwrittenProperty:function(obj,_1eb,_1ec){ibm.portal.debug.entry("utilities.setOverwrittenProperty",[obj,_1eb,_1ec]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}obj["_overwritten_"][_1eb]=_1ec;ibm.portal.debug.exit("utilities.setOverwrittenProperty");},callOverwrittenFunction:function(_1ed,_1ee,args){ibm.portal.debug.entry("utilities.callOverwrittenFunction",[_1ed,_1ee,args]);var _1f0=null;var _1f1=this.getOverwrittenProperty(_1ed,_1ee);ibm.portal.debug.text("Overwritten property: "+_1f1);ibm.portal.debug.text("old property's apply function: "+_1f1.apply);if(args){_1f0=_1f1.apply(_1ed,args);}else{_1f0=_1f1.apply(_1ed);}ibm.portal.debug.exit("utilities.callOverwrittenFunction",_1f0);return _1f0;},isExternalUrl:function(_1f2){ibm.portal.debug.entry("isExternalUrl",[_1f2]);var host=window.location.host;var _1f4=window.location.protocol;var _1f5=_1f2.split("?")[0];var _1f6=!(_1f5.indexOf("://")<0||(_1f5.indexOf(_1f4)==0&&_1f5.indexOf(host)==_1f4.length+2));ibm.portal.debug.text("urlStringNoQuery.indexOf(\"://\") = "+_1f5.indexOf("://"));ibm.portal.debug.text("urlStringNoQuery.indexOf(protocol) = "+_1f5.indexOf(_1f4));ibm.portal.debug.exit("isExternalUrl",_1f6);return _1f6;},isJavascriptUrl:function(_1f7){ibm.portal.debug.entry("isJavascriptUrl",[_1f7]);var url=com.ibm.portal.utilities.string.trim(_1f7.toLowerCase());var _1f9=(url.indexOf("javascript:")==0);ibm.portal.debug.exit("isJavascriptUrl",_1f9);return _1f9;},decodeXML:function(_1fa){ibm.portal.debug.entry("decodeXML",[_1fa]);var _1fb=_1fa.replace(/&amp;/g,"&");var _1fc=_1fb.replace(/&amp;/g,"&");_1fb=_1fc.replace(/&#039;/g,"'");_1fc=_1fb.replace(/&#034;/g,"\"");_1fc=_1fc.replace(/&lt;/g,"<");_1fc=_1fc.replace(/&gt;/g,">");ibm.portal.debug.exit("decodeXML",[_1fc]);return _1fc;},eventHandlerToString:function(_1fd){var _1fe=_1fd.toString();var _1ff=_1fe.indexOf("{");var _200=_1fe.lastIndexOf("}");onclickStr=_1fe.substring(_1ff+1,_200);return onclickStr;},_waitingForScript:false,_isWaitingForScript:function(){return com.ibm.portal.utilities._waitingForScript;},stopWaitingForScript:function(){com.ibm.portal.utilities._waitingForScript=false;},waitFor:function(_201,_202,_203,args){var _205=setInterval(function(){if(_201()){clearInterval(_205);if(!args){_203();}else{_203(args);}}},_202);},waitForScript:function(_206,args){com.ibm.portal.utilities._waitingForScript=true;com.ibm.portal.utilities.waitFor(function(){return (!com.ibm.portal.utilities._isWaitingForScript());},500,_206,args);}};com.ibm.portal.utilities.string={findNext:function(_208,_209,from){ibm.portal.debug.entry("string.findNext",[_208,_209]);var _20b=-1;for(var i=0;i<_209.length;i++){var _20d=null;if(from){_20d=from+_209[i].length;}var _20e=_208.indexOf(_209[i],_20d);if(_20e>-1&&(_20e<_20b||_20b==-1)){_20b=_20e;}}ibm.portal.debug.exit("string.findNext",[_20b]);return _20b;},contains:function(_20f,_210){ibm.portal.debug.entry("string.contains",[_20f,_210]);var _211=false;if(_20f!=null&&_210!=null){_211=(_20f.indexOf(_210)!=-1);}ibm.portal.debug.exit("string.contains",[_211]);return _211;},strip:function(_212,_213){ibm.portal.debug.entry("string.strip",[_212,_213]);var _214=_212.replace(new RegExp(_213,"g"),"");ibm.portal.debug.exit("string.strip",[_214]);return _214;},properCase:function(_215){if(_215==null||_215.length<1){return "";}ibm.portal.debug.entry("string.properCase",[_215]);var _216=_215.charAt(0).toUpperCase();if(_215.length>1){_216+=_215.substring(1).toLowerCase();}ibm.portal.debug.exit("string.properCase",[_216]);return _216;},trim:function(_217){ibm.portal.debug.entry("string.trim",[_217]);var _218=_217;_218=_218.replace(/^\s+/,"");_218=_218.replace(/\s+$/,"");ibm.portal.debug.exit("string.trim",_218);return _218;}};dojo.declare("com.ibm.portal.utilities.HttpUrl",null,{constructor:function(_219){this.scheme="http://";this.server=this._extractServer(_219);this.port=this._extractPort(_219);this.path=this._extractPath(_219);this.query=this._extractQuery(_219);this.anchor="";},addParameter:function(name,_21b){this.query+="&"+name+"="+_21b;},toString:function(){var str="";if(this.server!=""){str+=this.scheme+this.server;}if(this.port!=""){str+=":"+this.port;}str+="/"+this.path;if(this.query!=""){str+="?"+this.query;}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_extractServer:function(_21d){var _21e=_21d.indexOf(this.scheme);var _21f="";if(_21e==0){var _220=_21d.indexOf("/",_21e+this.scheme.length);var _221=_21d.substring(_21e+this.scheme.length,_220);_21f=_221.split(":")[0];}return _21f;},_extractPort:function(_222){var _223=_222.indexOf(this.server);var _224="";if(_223>=0){var _225=_222.indexOf("/",_223);var _226=_222.substring(_223,_225);var _227=_226.split(":");if(_227.length>1){_224=_227[1];}}return _224;},_extractPath:function(_228){var _229=_228.indexOf(this.server);var _22a="";if(_229>=0){var _22b=_228.indexOf("/",_229);var _22c=_228.indexOf("?");var _22d=_228.lastIndexOf("#");if(_22c>=0){_22a=_228.substring(_22b+1,_22c);}else{if(_22d>=0){_22a=_228.substring(_22b+1,_22d);}else{_22a=_228.substring(_22b+1);}}}return _22a;},_extractQuery:function(_22e){var _22f="";var _230=_22e.split("?");if(_230.length>1){_22f=_230[1].split("#")[0];}return _22f;},_extractAnchor:function(_231){var _232="";var _233=_231.split("#");if(_233.length>1){_232=_233[_233.length-1];}return _232;}});dojo.provide("com.ibm.portal.utilities.html");dojo.require("com.ibm.portal.utilities");com.ibm.portal.utilities.html={createAnchor:function(_234,href,id,_237,_238){ibm.portal.debug.entry("SkinRenderer.createAnchor",[_234,href,id,_237,_238]);var _239=document.createElement("A");_239.href=href;if(id){_239.id=id;}if(_238){_239.className=_238;}if(_237){_239.appendChild(document.createTextNode(_237));}_234.appendChild(_239);ibm.portal.debug.exit("SkinRenderer.createAnchor",[_239]);return _239;},createButton:function(_23a,href,id,_23d,_23e){ibm.portal.debug.entry("SkinRenderer.createButton",[_23a,href,id,_23d,_23e]);var _23f=document.createElement("BUTTON");if(href){_23f.href=href;}if(id){_23f.id=id;}if(_23e){_23f.className=_23e;}if(_23d){_23f.appendChild(document.createTextNode(_23d));}_23a.appendChild(_23f);ibm.portal.debug.exit("SkinRenderer.createButton",[_23f]);return _23f;},createImage:function(_240,src,id,_243,_244){ibm.portal.debug.entry("SkinRenderer.createImage",[_240,src,id,_243,_244]);var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_243){img.alt=_243;img.setAttribute("title",_243);if(_240.nodeName=="BUTTON"){_240.setAttribute("title",_243);}}if(_244){img.className=_244;}_240.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImage",[img]);return img;},createImageAnchor:function(_246,src,id,_249,_24a){ibm.portal.debug.entry("SkinRenderer.createImageAnchor",[_246,src,id,_249,_24a]);var _24b=com.ibm.portal.utilities.html.createAnchor(_246,"javascript:void(0);");var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_249){img.alt=_249;img.title=_249;}if(_24a){img.className=_24a;}_24b.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImageAnchor",[img]);return _24b;},createTemporaryMarkupDiv:function(_24d){ibm.portal.debug.entry("html.createTemporaryMarkupDiv");var div=document.createElement("DIV");div.innerHTML="<p style='display: none;'>&nbsp;</p>"+_24d;ibm.portal.debug.exit("html.createTemporaryMarkupDiv",[div]);return div;},getElementsByTagNames:function(_24f){ibm.portal.debug.entry("html.getElementsByTagNames",[_24f]);var _250=new Array();for(var i=1;i<arguments.length;i++){var _252=_24f.getElementsByTagName(arguments[i]);ibm.portal.debug.text("found "+_252.length+" "+arguments[i]+" tags.");for(var j=0;j<_252.length;j++){_250.push(_252[j]);}}ibm.portal.debug.exit("html.getElementsByTagNames",[_250]);return _250;},getX:function(elem){ibm.portal.debug.entry("html.getX",[elem]);var size=0;if(elem!=null){if(elem.offsetParent!=null){size+=com.ibm.portal.utilities.html.getX(elem.offsetParent);}if(elem!=null){size+=elem.offsetLeft;}}ibm.portal.debug.exit("html.getX",[size]);return size;},getY:function(elem){ibm.portal.debug.entry("html.getY"[elem]);var size=0;if(elem!=null){if(elem.offsetParent!=null){size+=com.ibm.portal.utilities.html.getY(elem.offsetParent);}if(elem!=null){size+=elem.offsetTop;}}ibm.portal.debug.exit("html.getY",[size]);return size;},convertFormToQuery:function(_258,_259){ibm.portal.debug.entry("html.convertFormToQuery",[_258,_259]);var _25a=this.getElementsByTagNames(_258,"input","select","textarea","button");var _25b="";var _25c="&";var _25d="=";var _25e=0;for(var i=0;i<_25a.length;i++){var _260=this.convertInputToNameValuePairs(_25a[i],_259);for(var k=0;k<_260.length;k++){var pair=_260[k];if(pair.name!=""){if(_25e!=0){_25b+=_25c;}_25b+=encodeURIComponent(pair.name);for(var j=0;j<pair.values.length;j++){if(j==0){_25b+=(_25d+encodeURIComponent(pair.values[j]));}else{_25b+=(_25c+encodeURIComponent(pair.name)+_25d+encodeURIComponent(pair.values[j]));}}_25e=_25e+1;}}}ibm.portal.debug.exit("html.convertFormToQuery",_25b);return _25b;},convertInputToNameValuePairs:function(_264,_265){ibm.portal.debug.entry("html.convertInputToNameValuePairs",[_264,_265]);var type=_264.type;ibm.portal.debug.text("Input type is: "+type);ibm.portal.debug.text("Input name is: "+_264.name);var name="";var _268=[];var _269=[];if(!_264.disabled){switch(type.toLowerCase()){case "text":case "reset":case "password":case "hidden":case "button":name=_264.name;_268.push(_264.value);_269.push({name:name,values:_268});break;case "radio":case "checkbox":if(_264.checked){name=_264.name;_268.push(_264.value);}_269.push({name:name,values:_268});break;case "image":if(!_265||_264.name==_265){name=_264.name;if(_264.value){_268.push(_264.value);_269.push({name:name,values:_268});}_269.push({name:name+".x",values:[this.getX(_264)]});_269.push({name:name+".y",values:[this.getY(_264)]});}break;case "submit":if(!_265||(_264.name==_265.name&&_264.value==_265.value)){name=_264.name;if(_264.value){_268.push(_264.value);}_269.push({name:name,values:_268});}break;case "select-one":case "select-multiple":name=_264.name;for(var i=0;i<_264.options.length;i++){if(_264.options[i].selected){var _26b=_264.options[i].value?_264.options[i].value:_264.options[i].text;_268.push(_26b);}}if(_268.length!=0){_269.push({name:name,values:_268});}break;case "file":break;default:name=_264.name;_268.push(_264.value);_269.push({name:name,values:_268});}}ibm.portal.debug.exit("html.convertInputToNameValuePairs",_269);return _269;},isHidden:function(node){return dojo.style(node,"display")=="none";},hide:function(node){dojo.fx.wipeOut({node:node,duration:5}).play();},show:function(node){dojo.fx.wipeIn({node:node,duration:5}).play();},isDescendantOf:function(node,ref){var node=node.parentNode;var _271=false;while(node&&!_271){if(node==ref){_271=true;}node=node.parentNode;}return _271;}};dojo.provide("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.EventBroker");dojo.declare("com.ibm.portal.services.ContentHandlerURL",null,{constructor:function(uri,_273,verb,_275){ibm.portal.debug.entry("ContentHandlerURL.constructor",[uri,_273,verb,_275]);if(uri==null){return null;}if(!_273){_273=2;}this.url="";if(uri.charAt(0)=="?"){this.url=this._fromQueryString(uri,_275);}else{this.url=this._fromURI(uri,_273,"download",_275);}ibm.portal.debug.exit("ContentHandlerURL.constructor");},_fromQueryString:function(_276,_277){ibm.portal.debug.entry("fromQueryString",[_276]);var str=ibmPortalConfig["contentHandlerURI"]+_276;str=str.replace(/&amp;/g,"&");if(_277){str=str+_277;}if(str.indexOf("rep=compact")<0&&str.indexOf("rep=full")<0){str=str+"&rep=compact";}ibm.portal.debug.exit("fromQueryString",[str]);return str;},_fromURI:function(uri,_27a,verb,_27c){ibm.portal.debug.entry("ContentHandlerURL._fromURI",[uri,_27a,verb,_27c]);uri=com.ibm.portal.utilities.encodeURI(uri);var qStr="?uri="+uri;if(_27a){qStr=qStr+"&levels="+encodeURIComponent(_27a);}if(verb){qStr=qStr+"&mode="+encodeURIComponent(verb);}if(_27c){qStr=qStr+_27c;}if(qStr.indexOf("rep=compact")<0&&qStr.indexOf("rep=full")<0){qStr=qStr+"&rep=compact";}return this._fromQueryString(qStr);},getURI:function(){ibm.portal.debug.entry("ContentHandlerURL.getURI");return com.ibm.portal.utilities.decodeURI(this._extractParamValue("uri"));},getLevels:function(){return this._extractParamValue("levels");},getVerb:function(){return this._extractParamValue("verb");},_extractParamValue:function(_27e){ibm.portal.debug.entry("ContentHandlerURL._extractParamValue",[_27e]);var _27f=this.url.indexOf(_27e);var _280=this.url.indexOf("&",_27f);var _281=this.url.slice(_27f+_27e.length+1,_280);ibm.portal.debug.exit("ContentHandlerURL._extractParamValue",[_281]);return _281;}});dojo.require("com.ibm.portal.utilities.html");dojo.declare("com.ibm.portal.services.PortalRestServiceForm",null,{method:"GET",isMultipart:false,encoding:"application/x-www-form-urlencoded",DomId:null,constructor:function(_282){if(_282.getAttributeNode("method")){this.method=_282.getAttributeNode("method").value;}if(_282.getAttributeNode("encType")){this.encoding=_282.getAttributeNode("encType").value;}if(_282.getAttributeNode("id")){this.DomId=_282.getAttributeNode("id").value;}else{DomId=_282;}this.isMultipart=(this.encoding=="multipart/form-data");},getDOMElement:function(){return dojo.byId(this.DomId);},submit:function(){this.getDOMElement().submit();},toQuery:function(){return com.ibm.portal.utilities.html.convertFormToQuery(this.getDOMElement());}});dojo.declare("com.ibm.portal.services.PortalRestServiceRequest",null,{constructor:function(_283,form,_285,sync){ibm.portal.debug.entry("PortalRestServiceRequest.constructor",[_283,form,_285,sync]);this._feedURI=_283.url;this._textOnly=_285;this._sync=sync;this._form=form;if(!this._sync){this._sync=false;}ibm.portal.debug.exit("PortalRestServiceRequest.constructor");},create:function(feed,_288,_289){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.create");},read:function(_28a,_28b){ibm.portal.debug.entry("PortalRestServiceRequest.read",[_28a,_28b]);com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:this._feedURI});if(this._textOnly){this._retrieveRawFeed(_28a,_28b);}else{this._retrieve(_28a,_28b);}ibm.portal.debug.exit("PortalRestServiceRequest.read");},update:function(feed,_28d,_28e){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.update");},remove:function(feed,_290,_291){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.remove");},_retrieveRawFeed:function(_292,_293){ibm.portal.debug.entry("_retrieveRawFeed",[_292,_293]);var me=this;dojo.xhrGet({url:this._feedURI,load:function(type,data,evt){_292(data,_293);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});},sync:this._sync});ibm.portal.debug.exit("_retrieveRawFeed");},_retrieve:function(_298,_299,_29a,_29b){ibm.portal.debug.entry("_retrieve",[_298]);if(this._form&&this._form.isMultipart){this._doIframeRequest(_298,_299);}else{this._doXmlHttpRequest(_298,_299);}ibm.portal.debug.exit("PortalRestServiceRequest._retrieve");},_doIframeRequest:function(_29c,_29d){ibm.portal.debug.entry("PortalRestServiceRequest._doIframeRequest",[_29c]);var _29e=null;var _29f=dojo.dnd.getUniqueId();if(dojo.isIE){_29e=document.createElement("<iframe name='"+_29f+"' id='"+_29f+"' src='about:blank' onload='com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER.handleMultiPartResult(this.id);'></iframe>");com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER._callbackfns[_29f]={fn:_29c,args:_29d};var url=new com.ibm.portal.utilities.HttpUrl(this._feedURI);url.addParameter("ibm.web2.contentType","text/plain");this._form.getDOMElement().setAttribute("action",url.toString());}else{ibm.portal.debug.text("Creating the iframe... name is: "+_29f+"; url is: "+this._feedURI);_29e=document.createElement("IFRAME");_29e.setAttribute("name",_29f);_29e.setAttribute("id",_29f);var me=this;_29e.onload=function(){var xml=window.frames[_29f].document;_29c("load",xml,null,_29d);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});};this._form.getDOMElement().setAttribute("action",this._feedURI);}_29e.style.visibility="hidden";_29e.style.height="1px";_29e.style.width="1px";document.body.appendChild(_29e);if(window.frames[_29f].name!=_29f){window.frames[_29f].name=_29f;}ibm.portal.debug.text("Setting the iframe target attribute to: "+_29f);this._form.getDOMElement().setAttribute("target",_29f);this._form.submit();ibm.portal.debug.exit("PortalRestServiceRequest._doIframeRequest");},_doXmlHttpRequest:function(_2a3,_2a4){ibm.portal.debug.entry("PortalRestServiceRequest._doXmlHttpRequest",[_2a3,_2a4]);var _2a5={};ibm.portal.debug.text("Attempting to retrieve: "+this._feedURI+"; synchronously? "+this._sync);var me=this;var args={url:this._feedURI,content:_2a5,handle:function(_2a8,_2a9){ibm.portal.debug.entry("PortalRestServiceRequest.handle",[_2a8,_2a9]);var xhr=_2a9.xhr;ibm.portal.debug.text("XHR object: "+xhr);var _2ab=com.ibm.portal.services.PortalRestServiceConfig;var _2ac=xhr.getResponseHeader("X-Request-Digest");if(_2ac){_2ab.digest=_2ac;}if(xhr.status==200){var data=_2a8;var loc=xhr.getResponseHeader("IBM-Web2-Location");if(loc){if(loc.indexOf(ibmPortalConfig["portalProtectedURI"])>=0&&me._feedURI.indexOf(ibmPortalConfig["portalPublicURI"])>=0){top.location.href=loc;return;}}var _2af=xhr.getResponseHeader("Content-Type");if(_2af&&_2af.indexOf("text/html")>=0){var _2b0=me._feedURI;if(loc){_2b0=loc;}com.ibm.portal.EVENT_BROKER.redirect.fire({url:_2b0});top.location.href=_2b0;return;}ibm.portal.debug.text("Read feed: "+me._feedURI);if(dojo.isIE){var doc=dojox.data.dom.createDocument(data);_2a3("load",doc,xhr,_2a4);}else{_2a3("load",data,xhr,_2a4);}}else{_2a3("error",_2a8,null,_2a4);}com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});ibm.portal.debug.exit("PortalRestServiceRequest.handle");},sync:this._sync,handleAs:"xml"};var _2b2="Get";if(this._form){args.content=dojo.queryToObject(this._form.toQuery());_2b2=com.ibm.portal.utilities.string.properCase(this._form.method);}if(dojo.isIE){args.content["ibm.web2.contentType"]="text/xml";args.handleAs="text";}var _2b3=com.ibm.portal.services.PortalRestServiceConfig;if(_2b3.timeout){args.timeout=_2b3.timeout;}if(_2b3.digest){args.content["digest"]=_2b3.digest;}var xhr=dojo["xhr"+_2b2](args);ibm.portal.debug.exit("PortalRestServiceRequest._doXmlHttpRequest");},toString:function(){return this._feedURI;}});com.ibm.portal.services.PortalRestServiceConfig={timeout:null,digest:null};dojo.provide("com.ibm.portal.services.PortletFragmentService");dojo.require("dojox.data.dom");dojo.require("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.utilities");dojo.require("com.ibm.portal.debug");dojo.require("com.ibm.portal.EventBroker");dojo.declare("com.ibm.portal.services.PortletFragmentURL",null,{constructor:function(uri){if(uri.indexOf("?uri=")==0){this.url=ibmPortalConfig["portalURI"]+uri;this.url=this.url.replace(/&amp;/g,"&");this.url=this.url.replace(/lm:/,"pm:");}else{if(uri.indexOf("lm:")==0){this.url=ibmPortalConfig["portalURI"]+"?uri=fragment:"+uri;this.url=this.url.replace(/lm:/,"pm:");}else{this.url=uri;}}}});dojo.declare("com.ibm.portal.services.PortletInfo",null,{constructor:function(wId,pId,_2b8,_2b9,_2ba,_2bb,_2bc,_2bd,_2be,_2bf,_2c0){ibm.portal.debug.entry("PortletInfo.constructor",[wId,pId,_2b8,_2b9,_2ba,_2bb,_2bd]);this.windowId=wId;this.portletId=pId;this.uri="fragment:pm:oid:"+wId+"@oid:"+pId;this.markup=_2b8;this.portletModes=_2b9;this.windowStates=_2ba;this.dependentPortlets=_2bb;this.otherPortlets=_2bc;this.stateVaryExpressions=_2be;this.updatedState=_2bd;this.currentMode=_2bf;this.currentWindowState=_2c0;ibm.portal.debug.exit("PortletInfo.constructor");}});dojo.declare("com.ibm.portal.services.PortletFragmentService",null,{namespaces:{"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state","state-vary":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state-vary"},_flagPortletUrl:function(url,_2c2){ibm.portal.debug.entry("PortletFragmentService._flagPortletUrl",[url]);var _2c3=url.indexOf("uri=fragment:pm:oid:");var _2c4=new com.ibm.portal.utilities.HttpUrl(url);_2c4.addParameter("ibm.web2.keepRenderMode","false");if(_2c3<0){_2c2=_2c2.replace(/lm:/g,"fragment:pm:");_2c4.addParameter("uri",_2c2);}ibm.portal.debug.exit("PortletFragmentService._flagPortletUrl",[_2c4.toString()]);return _2c4.toString();},getPortletInfo:function(_2c5,_2c6,_2c7,form,_2c9){ibm.portal.debug.entry("PortletFragmentService.getPortletInfo",[_2c5,_2c6,_2c7,form,_2c9]);if(_2c6=="#"||_2c6==window.location.href+"#"){ibm.portal.debug.text("Illegal portlet url provided: "+_2c6);ibm.portal.debug.text("Aborting request.");return false;}if(com.ibm.portal.utilities.isJavascriptUrl(_2c6)){return eval(_2c6);}if(!_2c9){com.ibm.portal.EVENT_BROKER.startFragment.fire({id:_2c5});}if(_2c6.indexOf("?")==0){var _2ca=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_2c6=_2ca.resolveRelativePortletURL(_2c6);}if(com.ibm.portal.utilities.isExternalUrl(_2c6)){self.location.href=_2c6;}else{var url={url:this._flagPortletUrl(_2c6,_2c5)};var _2cc=new com.ibm.portal.services.PortalRestServiceRequest(url,form);var me=this;_2cc.read(function(type,_2cf,xhr){var _2d1=null;if(type=="load"){_2d1=me.createPortletInfo(_2cf);}if(_2cf instanceof Error){_2d1=_2cf;}if(!_2c9){me._fireEvents(_2d1,_2c5,xhr);}if(_2c7){_2c7(_2d1,xhr);}});}ibm.portal.debug.exit("PortletFragmentService.getPortletInfo");},readWindowID:function(_2d2){ibm.portal.debug.entry("PortletFragmentService.readWindowID",[_2d2]);var _2d3="/atom:feed/atom:entry/atom:id";var _2d4=com.ibm.portal.xpath.evaluateXPath(_2d3,_2d2,this.namespaces);var _2d5=dojox.data.dom.textContent(_2d4[0]);ibm.portal.debug.exit("PortletFragmentService.readWindowID",[_2d5.substring(4)]);return _2d5.substring(4);},readPortletID:function(_2d6){ibm.portal.debug.entry("PortletFragmentService.readPortletID",[_2d6]);var _2d7="/atom:feed/atom:id";var _2d8=com.ibm.portal.xpath.evaluateXPath(_2d7,_2d6,this.namespaces);var _2d9=dojox.data.dom.textContent(_2d8[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletID",[_2d9.substring(4)]);return _2d9.substring(4);},readMarkup:function(_2da){ibm.portal.debug.entry("PortletFragmentService.readMarkup",[_2da]);var _2db="/atom:feed/atom:entry/atom:content";var _2dc=com.ibm.portal.xpath.evaluateXPath(_2db,_2da,this.namespaces);var _2dd="";if(_2dc!=null&&_2dc.length>0){_2dd=dojox.data.dom.textContent(_2dc[0]);}ibm.portal.debug.exit("PortletFragmentService.readMarkup",[_2dd]);return _2dd;},readPortletModes:function(_2de){ibm.portal.debug.entry("PortletFragmentService.readPortletModes",[_2de]);var _2df="/atom:feed/atom:entry/atom:link[@portal:rel='portlet-mode']";var _2e0=com.ibm.portal.xpath.evaluateXPath(_2df,_2de,this.namespaces);var _2e1=new Array();if(_2e0!=null&&_2e0.length>0){var _2e2=_2e0.length;for(var i=0;i<_2e2;i++){_2e1.push({"link":_2e0[i].getAttribute("href"),"mode":_2e0[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readPortletModes",[_2e1]);return _2e1;},readWindowStates:function(_2e4){ibm.portal.debug.entry("PortletFragmentService.readWindowStates",[_2e4]);var _2e5="/atom:feed/atom:entry/atom:link[@portal:rel='window-state']";var _2e6=com.ibm.portal.xpath.evaluateXPath(_2e5,_2e4,this.namespaces);var _2e7=new Array();if(_2e6!=null&&_2e6.length>0){var _2e8=_2e6.length;for(var i=0;i<_2e8;i++){_2e7.push({"link":_2e6[i].getAttribute("href"),"mode":_2e6[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readWindowStates",[_2e7]);return _2e7;},readDependentPortlets:function(_2ea){ibm.portal.debug.entry("PortletFragmentService.readDependentPortlets",[_2ea]);var _2eb="/atom:feed/atom:link[@portal:rel='dependent']";var _2ec=com.ibm.portal.xpath.evaluateXPath(_2eb,_2ea,this.namespaces);var _2ed=new Array();if(_2ec!=null&&_2ec.length>0){var _2ee=_2ec.length;for(var i=0;i<_2ee;i++){_2ed.push({"link":_2ec[i].getAttribute("href"),"portlet":_2ec[i].getAttribute("title"),"uri":_2ec[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readDependentPortlets",[_2ed]);return _2ed;},readOtherPortlets:function(_2f0){ibm.portal.debug.entry("PortletFragmentService.readOtherPortlets",[_2f0]);var _2f1="/atom:feed/atom:link[@portal:rel='other']";var _2f2=com.ibm.portal.xpath.evaluateXPath(_2f1,_2f0,this.namespaces);var _2f3=new Array();if(_2f2!=null&&_2f2.length>0){var _2f4=_2f2.length;for(var i=0;i<_2f4;i++){_2f3.push({"link":_2f2[i].getAttribute("href"),"portlet":_2f2[i].getAttribute("title"),"uri":_2f2[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readOtherPortlets",[_2f3]);return _2f3;},readStateVaryExpressions:function(_2f6){ibm.portal.debug.entry("PortletFragmentService.readStateVaryExpressions",[_2f6]);var _2f7="/atom:feed/atom:entry/state-vary:state-vary/state-vary:expr";var _2f8=com.ibm.portal.xpath.evaluateXPath(_2f7,_2f6,this.namespaces);var _2f9=new Array();if(_2f8!=null&&_2f8.length>0){var _2fa=_2f8.length;for(var i=0;i<_2fa;i++){var _2fc=_2f8[i].firstChild;if(_2fc!=null){_2f9.push(_2fc.nodeValue);}}}ibm.portal.debug.exit("PortletFragmentService.readStateVaryExpressions",[_2f9]);return _2f9;},readPortletState:function(_2fd){return this._readPortletState(_2fd);},_readPortletState:function(_2fe){ibm.portal.debug.entry("PortletFragmentService.readPortletState",[_2fe]);var _2ff="/atom:feed/atom:entry/state:root";var _300=com.ibm.portal.xpath.evaluateXPath(_2ff,_2fe,this.namespaces);var _301=null;if(_300!=null&&_300.length>0){var doc=dojox.data.dom.createDocument();doc.appendChild(_300[0]);_301=doc;}else{_2ff="/atom:feed/state:root";_300=com.ibm.portal.xpath.evaluateXPath(_2ff,_2fe,this.namespaces);if(_300!=null&&_300.length>0){var doc=dojox.data.dom.createDocument();doc.appendChild(_300[0]);_301=doc;}}ibm.portal.debug.exit("PortletFragmentService.readPortletState",[_301]);return _301;},_fireEvents:function(_303,_304){this._fireGlobalPortletStateChange(_303,_304);},_fireGlobalPortletStateChange:function(_305,_306,xhr){com.ibm.portal.EVENT_BROKER.endFragment.fire({portletInfo:_305,id:_306,xhr:xhr});},_fireIndividualPortletStateChange:function(_308){},createPortletInfo:function(_309){var _30a=this.readWindowID(_309);var _30b=this.readPortletID(_309);var _30c=this.readMarkup(_309);var _30d=this.readPortletModes(_309);var _30e=this.readWindowStates(_309);var _30f=this.readDependentPortlets(_309);var _310=this.readOtherPortlets(_309);var _311=this.readPortletState(_309);var _312=this.readStateVaryExpressions(_309);var _313=_311;if(_313==null){_313=this._readPortletState(_309);}var _314=new com.ibm.portal.state.StateManager();var _315=_314.newPortletAccessor(_30a,_313);var mode=_315.getPortletMode();var _317=_315.getWindowState();return new com.ibm.portal.services.PortletInfo(_30a,_30b,_30c,_30d,_30e,_30f,_310,_311,_312,mode,_317);}});dojo.declare("com.ibm.portal.services.IndependentPortletFragmentService",com.ibm.portal.services.PortletFragmentService,{readDependentPortlets:function(_318){ibm.portal.debug.entry("DependentPortletFragmentService.readDependentPortlets",[_318]);var _319=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readDependentPortlets",[_319]);return _319;},readOtherPortlets:function(_31a){ibm.portal.debug.entry("DependentPortletFragmentService.readOtherPortlets",[_31a]);var _31b=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readOtherPortlets",[_31b]);return _31b;},readPortletState:function(_31c){return null;}});if(!dojo._hasResource["ibm.portal.portlet.portlet"]){dojo._hasResource["ibm.portal.portlet.portlet"]=true;dojo.provide("ibm.portal.portlet.portlet");ibm.portal.portlet._SafeToExecute=false;if(window.addEventListener){window.addEventListener("load",function(){ibm.portal.portlet._SafeToExecute=true;},false);}else{if(window.attachEvent){window.attachEvent("onload",function(){ibm.portal.portlet._SafeToExecute=true;});}}dojo.declare("ibm.portal.portlet.PortletWindow",null,{STATUS_UNDEFINED:0,STATUS_OK:1,STATUS_ERROR:2,constructor:function(_31d){if(_31d==null){return;}this.windowID=_31d;var _31e=document.getElementById("com.ibm.wps.web2.portlet.preferences."+this.windowID);this.preferenceEditID=_31e.getAttribute("editid");this.preferenceConfigID=_31e.getAttribute("configid");this.preferenceEditDefaultsID=_31e.getAttribute("editdefaultsid");this.pageID=_31e.getAttribute("pageid");this.attributes=new Array();this._queuedFuncs=new Array();this.portletState=new ibm.portal.portlet.PortletState(_31d);this.isCSA=false;try{this.isCSA=(typeof (document.isCSA)!="undefined");}catch(e){}var me=this;function executeQueued(){for(var i=0;i<me._queuedFuncs.length;i++){me._queuedFuncs[i]();}};if(window.addEventListener){window.addEventListener("load",function(){if(!ibm.portal.portlet._SafeToExecute){ibm.portal.portlet._SafeToExecute=true;}executeQueued();},false);}else{if(window.attachEvent){window.attachEvent("onload",function(){if(!ibm.portal.portlet._SafeToExecute){ibm.portal.portlet._SafeToExecute=true;}executeQueued();});}}},reportError:function(_321){var code;if(_321.getErrorCode()==ibm.portal.portlet.Error.ERROR){code="error";}else{if(_321.getErrorCode()==ibm.portal.portlet.Error.INFO){code="info";}else{if(_321.getErrorCode()==ibm.portal.portlet.Error.WARN){code="warning";}}}var _323={"_type":code,"_message":_321.getMessage(),"_details":_321.getDescription()};if(this.isCSA){dojo.publish("/portal/status",[{message:_323}]);}else{if(typeof (console)!="undefined"){if(_321.getErrorCode()==ibm.portal.portlet.Error.ERROR){console.error(_323._message+"\n"+_323._details);}else{if(_321.getErrorCode()==ibm.portal.portlet.Error.INFO){console.info(_323._message+"\n"+_323._details);}else{if(_321.getErrorCode()==ibm.portal.portlet.Error.WARN){console.warn(_323._message+"\n"+_323._details);}}}}else{alert(_323._type.toUpperCase()+"\nMessage: "+_323._message+"\nDetails: "+_323._details);}}},getAttribute:function(name){return this.attributes[name];},setAttribute:function(name,_326){var ret=this.attributes[name];this.attributes[name]=_326;return ret;},removeAttribute:function(name){this.attributes[name]=null;},clearAttributes:function(){this.attributes=new Array();},getPortletState:function(_329){var _32a=this.portletState;var _32b=this;var _32c=null;if(_329!=null){_329(_32b,ibm.portal.portlet.PortletWindow.STATUS_OK,_32a);}else{_32c={"portletWindow":_32b,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_32a};}return _32c;},setPortletState:function(_32d,_32e){this.portletState=_32d;return this.getPortletState(_32e);},_queueUp:function(_32f){this._queuedFuncs.push(_32f);},_throwInappropriateRequestError:function(_330){throw new Error("Cannot execute a synchronous call before the page loads! Please use an onload handler to execute this call to \""+_330+"\".");return null;},getPortletPreferences:function(_331){if(!ibm.portal.portlet._SafeToExecute){if(_331){var me=this;this._queueUp(function(){me.getPortletPreferences(_331);});return false;}else{return this._throwInappropriateRequestError("getPortletPreferences");}}var _333=this.getPortletState().returnObject.getPortletMode();this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _334=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_334.indexOf("--portletwindowid--");var _url=_334.replace(/--portletwindowid--/g,this.windowID);_url+="&verb=download&levels=-all&rep=compact&preferences=aggregated";this.requestedPreferenceID="pm:oid:"+this.preferenceEditID;if(_333==ibm.portal.portlet.PortletMode.CONFIG){this.requestedPreferenceID="pm:oid:"+this.preferenceConfigID;}else{if(_333==ibm.portal.portlet.PortletMode.EDIT_DEFAULTS){this.requestedPreferenceID="pm:oid:"+this.preferenceEditDefaultsID;}}var _337=this;var _338=null;dojo.xhrGet({url:_url,handleAs:"xml",headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_331)?false:true,handle:function(_339,_33a){var type=(_339 instanceof Error)?"error":"load";if(type=="load"){var _33c=_339;if(!_33c||(typeof (dojox.data.dom.innerXML(_339))=="undefined")){_33c=dojox.data.dom.createDocument(_33a.xhr.responseText);}var _33d=new ibm.portal.portlet.PortletPreferences(_337.windowID,_337.requestedPreferenceID,_33c);if(_331){_331(_337,ibm.portal.portlet.PortletWindow.STATUS_OK,_33d);}else{_338={"portletWindow":_337,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_33d};}}else{if(type=="error"){if(_331){_331(_337,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_338={"portletWindow":_337,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _338;},setPortletPreferences:function(_33e,_33f){if(!ibm.portal.portlet._SafeToExecute){if(_33f){var me=this;this._queueUp(function(){me.setPortletPreferences(_33e,_33f);});return false;}else{return this._throwInappropriateRequestError("setPortletPreferences");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _341=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_341.indexOf("--portletwindowid--");var _url=_341.replace(/--portletwindowid--/g,this.windowID);_url+="&verb=download";var _344=_33e.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+_344+"']";var _346=ibm.portal.xml.xpath.evaluateXPath(expr,_33e.xmlData,_33e.ns);var _347;if(_346&&_346.length>0){_347=_346[0];}else{return null;}var _348=_347.parentNode;expr="/atom:feed/atom:entry";_346=ibm.portal.xml.xpath.evaluateXPath(expr,_33e.xmlData,_33e.ns);for(var i=0;i<_346.length;i++){var node=_346[i];if(node!=_347){_348.removeChild(node);}}var _34b=this;var _34c=null;dojo.rawXhrPut({url:_url,sync:(_33f)?false:true,putData:dojox.data.dom.innerXML(_33e.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_34d,_34e){var type=(_34d instanceof Error)?"error":"load";if(type=="load"){if(_33f){_33f(_34b,ibm.portal.portlet.PortletWindow.STATUS_OK,_33e);}else{_34c={"portletWindow":_34b,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_33e};}}else{if(type=="error"){if(_33f){_33f(_34b,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_34c={"portletWindow":_34b,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _34c;},getUserProfile:function(_350){if(!ibm.portal.portlet._SafeToExecute){if(_350){var me=this;this._queueUp(function(){me.getUserProfile(_350);});return false;}else{return this._throwInappropriateRequestError("getUserProfile");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _url=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _353=this;var _354=null;dojo.xhrGet({url:_url,headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_350)?false:true,handleAs:"xml",handle:function(_355,_356){var type=(_355 instanceof Error)?"error":"load";if(type=="load"){var _358=_355;if(!_358||(typeof (dojox.data.dom.innerXML(_355))=="undefined")){_358=dojox.data.dom.createDocument(_356.xhr.responseText);}var _359=new ibm.portal.portlet.UserProfile(_353.windowID,_358);if(_350){_350(_353,ibm.portal.portlet.PortletWindow.STATUS_OK,_359);}else{_354={"portletWindow":_353,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_359};}}else{if(type=="error"){if(_350){_350(_353,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_354={"portletWindow":_353,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _354;},setUserProfile:function(_35a,_35b){if(!ibm.portal.portlet._SafeToExecute){if(_35b){var me=this;this._queueUp(function(){me.setUserProfile(_35a,_35b);});return false;}else{return this._throwInappropriateRequestError("setUserProfile");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _url=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _35e=this;var _35f=null;dojo.rawXhrPost({url:_url,sync:(_35b)?false:true,postData:dojox.data.dom.innerXML(_35a.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_360,_361){var type=(_360 instanceof Error)?"error":"load";if(type=="load"){if(_35b){_35b(_35e,ibm.portal.portlet.PortletWindow.STATUS_OK,_35a);}else{_35f={"portletWindow":_35e,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_35a};}}else{if(type=="error"){if(_35b){_35b(_35e,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_35f={"portletWindow":_35e,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _35f;},newXMLPortletRequest:function(){return new ibm.portal.portlet.XMLPortletRequest(this.pageID,this.windowID);}});dojo.declare("ibm.portal.portlet.PortletPreferences",null,{constructor:function(_363,_364,data){this.windowID=_363;this.requestedPreferenceID=_364;this.xmlData=data;this.xsltURL=dojo.moduleUrl("ibm","portal/portlet/");this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance"};this.internal_reset();},getMap:function(){if(this.result_getMap){return this.result_getMap;}var _366=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesMap.xsl");if(_366.documentElement==null){alert("xslDoc is null");}var _367=ibm.portal.xml.xslt.transform(this.xmlData,_366,null,{"selectionid":this.requestedPreferenceID},true);if(_367==null){this.result_getNames=null;return null;}var _368=eval(_367);if(_368){_368=_368.preferences;}this.result_getMap=_368;return this.result_getMap;},getNames:function(){if(this.result_getNames){return this.result_getNames;}var _369=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesNames.xsl");if(_369.documentElement==null){alert("xslDoc is null");}var _36a=ibm.portal.xml.xslt.transform(this.xmlData,_369,null,{"selectionid":this.requestedPreferenceID},true);if(_36a==null){this.result_getNames=null;return null;}var _36b=eval(_36a);if(_36b){_36b=_36b.names;}this.result_getNames=_36b;return this.result_getNames;},getValue:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _36f=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _370;if(_36f&&_36f.length>0){_370=_36f[0].getAttribute("value");}else{_370=def;}return _370;},getValues:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _374=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _375;if(_374&&_374.length>0){_375=new Array();for(var i=0;i<_374.length;i++){_375[i]=_374[i].getAttribute("value");}}else{_375=def;}return _375;},isReadOnly:function(key){var id=this.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+id+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _37a=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _37b=false;if(_37a&&_37a.length>0){var temp=_37a[0].getAttribute("read-only");if(temp!=null){if(temp=="true"){_37b=true;}}}return _37b;},reset:function(key){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _37f=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);if(_37f&&_37f.length>0){var _380=_37f[0].parentNode;_380.removeChild(_37f[0]);}},setValue:function(key,_382){var _383=new Array();_383[0]=_382;this.setValues(key,_383);},setValues:function(key,_385){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _387=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _388=null;if(_387&&_387.length>0){_388=_387[0];for(var i=_388.childNodes.length-1;i>=0;i--){_388.removeChild(_388.childNodes[i]);}}else{var _38a="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*";var _38b=ibm.portal.xml.xpath.evaluateXPath(_38a,this.xmlData,this.ns);if(dojo.isIE){_388=this.xmlData.createNode(1,"model:portletpreferences",this.ns.model);}else{_388=this.xmlData.createElementNS(this.ns.model,"model:portletpreferences");}_388.setAttribute("name",key);_388.setAttribute("read-only","false");_38b[0].appendChild(_388);}for(var i=0;i<_385.length;i++){var _38c;if(dojo.isIE){_38c=this.xmlData.createNode(1,"base:value",this.ns.base);var _38d=this.xmlData.createNode(2,"xsi:type",this.ns.xsi);_38d.nodeValue="String";_38c.setAttributeNode(_38d);}else{_38c=this.xmlData.createElementNS(this.ns.base,"base:value");_38c.setAttributeNS(this.ns.xsi,"xsi:type","String");}_38c.setAttribute("value",_385[i]);_388.appendChild(_38c);}},internal_reset:function(){this.result_getMap=null;this.result_getNames=null;},clone:function(){var _38e=dojox.data.dom.innerXML(this.xmlData);var _38f=dojox.data.dom.createDocument(_38e);return new ibm.portal.portlet.PortletPreferences(this.windowID,this.requestedPreferenceID,_38f);}});dojo.declare("ibm.portal.portlet.PortletMode",null,{VIEW:"view",EDIT:"edit",EDIT_DEFAULTS:"edit_defaults",HELP:"help",CONFIG:"config"});dojo.declare("ibm.portal.portlet.WindowState",null,{NORMAL:"normal",MINIMIZED:"minimized",MAXIMIZED:"maximized"});dojo.declare("ibm.portal.portlet.PortletState",null,{constructor:function(_390,_391){var _392=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);if(dojo.isString(_390)){var _393=this._getExistingState(_390,_392.getSerializationManager());_392.reset(_393);}else{_392.reset(_390);_390=_391;}this.portletAccessor=_392.newPortletAccessor(_390);this.renderParameters=this.portletAccessor.getRenderParameters();},_isCSA:function(){var _394=false;try{_394=(typeof (document.isCSA)!="undefined");}catch(e){}return _394;},_getExistingState:function(_395,_396){var _397=null;if(this._isCSA()){_397=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState().stateDOM;}else{if(_396!=null){var _398=_396.deserialize(location.href);_397=_398.returnObject;}else{_397=dojox.data.dom.createDocument();}}return _397;},getPortletMode:function(){return this.portletAccessor.getPortletMode();},setPortletMode:function(_399){this.portletAccessor.setPortletMode(_399);return _399;},getWindowState:function(){return this.portletAccessor.getWindowState();},setWindowState:function(_39a){this.portletAccessor.setWindowState(_39a);return _39a;},getParameterNames:function(){return this.renderParameters.getNames();},getParameterValue:function(name){return this.renderParameters.getValue(name);},getParameterValues:function(name){return this.renderParameters.getValues(name);},getParameterMap:function(){return this.renderParameters.getMap();},setParameterValue:function(name,_39e){this.renderParameters.setValue(name,_39e);return _39e;},setParameterValues:function(name,_3a0){this.renderParameters.setValues(name,_3a0);return _3a0;},setParameterMap:function(map,_3a2){if(_3a2==true){this.renderParameters.clear();}this.renderParameters.putAll(map);return this.renderParameters.getMap();},removeParameter:function(name){this.renderParameters.remove(name);}});dojo.require("com.ibm.portal.services.PortletFragmentService");dojo.declare("ibm.portal.portlet.XMLPortletRequest",null,{onreadystatechange:null,readyState:0,responseText:null,responseXML:null,status:null,statusText:null,onportletstateready:null,_location:null,constructor:function(page,_3a5){this.pageID=page;this.windowID=_3a5;},_getXHR:function(){if(!this._xhr){this._xhr=this._createXHR();}return this._xhr;},_createXHR:function(){var _3a6=null;if(typeof (XMLHttpRequest)!="undefined"){_3a6=new XMLHttpRequest();}else{_3a6=new ActiveXObject("Microsoft.XMLHTTP");}return _3a6;},_onreadystatechangehandler:function(){var xhr=this._getXHR();this.readyState=xhr.readyState;if(this.readyState==4){this.responseText=xhr.responseText;this.responseXML=xhr.responseXML;this.status=xhr.status;this.statusText=xhr.statusText;var _3a8=new com.ibm.portal.services.PortletFragmentService();this.responseText=_3a8.readMarkup(xhr.responseXML);this.responseXML=null;this._handleDependentPortlets(_3a8.readDependentPortlets(xhr.responseXML));var _3a9=true;if(this.onportletstateready!=null){var _3aa=_3a8.readPortletState(xhr.responseXML);var _3a8=new com.ibm.portal.services.PortletFragmentService();var _3ab=_3a8.readWindowID(xhr.responseXML);var _3ac=new ibm.portal.portlet.PortletState(_3aa,_3ab);_3a9=this.onportletstateready(_3ac);}if(_3a9&&this._isCSA()){var _3ad=_3a8.createPortletInfo(xhr.responseXML);_3a8._fireGlobalPortletStateChange(_3ad);}}if(this.onreadystatechange!=null){this.onreadystatechange();}},_handleDependentPortlets:function(_3ae){if(this._isCSA()){var _3af=new com.ibm.portal.services.PortletFragmentService();for(var i=0;i<_3ae.length;i++){var _3b1=_3ae[i].uri;_3b1=_3b1.replace(/fragment:pm:/g,"lm:");com.ibm.portal.aggregation.PORTAL_AGGREGATOR.page.getFragment(_3b1).setLoading();_3af.getPortletInfo(_3b1,_3ae[i].link);}}else{if(_3ae.length>0){window.location.href=this._newPageURL();}}},_isCSA:function(){var _3b2=false;try{_3b2=(typeof (document.isCSA)!="undefined");}catch(e){}return _3b2;},_flag:function(_3b3){var id="lm:oid:"+this.windowID+"@oid:"+this.pageID;var _3b5=new com.ibm.portal.services.PortletFragmentService();return _3b5._flagPortletUrl(_3b3,id);},_newPageURL:function(){var _3b6=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);var _3b7=dojox.data.dom.createDocument();_3b6.reset(_3b7);var _3b8=_3b6.newPortletAccessor(this.windowID).getPortletState();var _3b9=_3b6.newSelectionAccessor(_3b8);_3b9.setPageSelection(this.pageID);var _3ba=_3b6.getSerializationManager();var _3bb=_3ba.serialize(_3b8);var _3bc=_3bb["returnObject"];var url=_3bc;return url;},open:function(_3be,uri){this.open(_3be,uri,false);},open:function(_3c0,uri,_3c2){var xhr=this._getXHR();var me=this;this._location=uri;xhr.onreadystatechange=function(){me._onreadystatechangehandler();};xhr.open(_3c0,this._flag(uri),_3c2);},setRequestHeader:function(_3c5,_3c6){this._getXHR().setRequestHeader(_3c5,_3c6);},send:function(data){this._getXHR().send(data);},abort:function(){this._getXHR().abort();},getAllResponseHeaders:function(){return this._getXHR().getAllResponseHeaders();},getResponseHeader:function(_3c8){return this._getXHR().getResponseHeader(_3c8);}});dojo.declare("ibm.portal.portlet.UserProfile",null,{constructor:function(_3c9,data){this.windowID=_3c9;this.xmlData=data;this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","xsi":"http://www.w3.org/2001/XMLSchema-instance","um":"http://www.ibm.com/xmlns/prod/websphere/um.xsd"};},getAttribute:function(name){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _3cd=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3ce=null;if(_3cd&&_3cd.length>0){if(_3cd[0].textContent){_3ce=_3cd[0].textContent;}else{_3ce=_3cd[0].text;}}return _3ce;},setAttribute:function(name,_3d0){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _3d2=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3d3=null;if(_3d2&&_3d2.length>0){if(_3d2[0].textContent){_3d3=_3d2[0].textContent;_3d2[0].textContent=_3d0;}else{_3d3=_3d2[0].text;_3d2[0].text=_3d0;}}else{var _3d4="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']";var _3d5=ibm.portal.xml.xpath.evaluateXPath(_3d4,this.xmlData,this.ns);var _3d6=null;if(_3d5&&_3d5.length>0){_3d6=_3d5[0];}else{var _3d7="/atom:entry/atom:content/um:profile[@type='user']";var _3d8=ibm.portal.xml.xpath.evaluateXPath(_3d7,this.xmlData,this.ns);if(dojo.isIE){_3d6=this.xmlData.createNode(1,"um:attribute",this.ns.um);}else{_3d6=this.xmlData.createElementNS(this.ns.um,"um:attribute");}_3d6.setAttribute("type","xs:string");_3d6.setAttribute("multiValued","false");_3d6.setAttribute("name",name);_3d8[0].appendChild(_3d6);}var _3d9;if(dojo.isIE){_3d9=this.xmlData.createNode(1,"um:attributeValue",this.ns.um);_3d9.text=_3d0;}else{_3d9=this.xmlData.createElementNS(this.ns.um,"um:attributeValue");_3d9.textContent=_3d0;}_3d6.appendChild(_3d9);}return _3d3;},clone:function(){var _3da=dojox.data.dom.innerXML(this.xmlData);var _3db=dojox.data.dom.createDocument(_3da);return new ibm.portal.portlet.UserProfile(this.windowID,_3db);}});dojo.declare("ibm.portal.portlet.Error",null,{INFO:0,WARN:1,ERROR:2,constructor:function(_3dc,_3dd,_3de){this.errorCode=_3dc;this.message=_3dd;this.description=_3de;},getErrorCode:function(){return this.errorCode;},getMessage:function(){return this.message;},getDescription:function(){return this.description;}});var com_ibm_portal_portlet_portletwindow=new ibm.portal.portlet.PortletWindow();ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED=com_ibm_portal_portlet_portletwindow.STATUS_UNDEFINED;ibm.portal.portlet.PortletWindow.STATUS_OK=com_ibm_portal_portlet_portletwindow.STATUS_OK;ibm.portal.portlet.PortletWindow.STATUS_ERROR=com_ibm_portal_portlet_portletwindow.STATUS_ERROR;com_ibm_portal_portlet_portletwindow=null;var com_ibm_portal_portlet_portletmode=new ibm.portal.portlet.PortletMode();ibm.portal.portlet.PortletMode.VIEW=com_ibm_portal_portlet_portletmode.VIEW;ibm.portal.portlet.PortletMode.EDIT=com_ibm_portal_portlet_portletmode.EDIT;ibm.portal.portlet.PortletMode.EDIT_DEFAULTS=com_ibm_portal_portlet_portletmode.EDIT_DEFAULTS;ibm.portal.portlet.PortletMode.HELP=com_ibm_portal_portlet_portletmode.HELP;ibm.portal.portlet.PortletMode.CONFIG=com_ibm_portal_portlet_portletmode.CONFIG;com_ibm_portal_portlet_portletmode=null;var com_ibm_portal_portlet_windowstate=new ibm.portal.portlet.WindowState();ibm.portal.portlet.WindowState.NORMAL=com_ibm_portal_portlet_windowstate.NORMAL;ibm.portal.portlet.WindowState.MINIMIZED=com_ibm_portal_portlet_windowstate.MINIMIZED;ibm.portal.portlet.WindowState.MAXIMIZED=com_ibm_portal_portlet_windowstate.MAXIMIZED;com_ibm_portal_portlet_windowstate=null;var com_ibm_portal_portlet_error=new ibm.portal.portlet.Error();ibm.portal.portlet.Error.INFO=com_ibm_portal_portlet_error.INFO;ibm.portal.portlet.Error.WARN=com_ibm_portal_portlet_error.WARN;ibm.portal.portlet.Error.ERROR=com_ibm_portal_portlet_error.ERROR;com_ibm_portal_portlet_error=null;}
/*********************************************************** {COPYRIGHT-TOP} ***
* Licensed Materials - Property of IBM
* Tivoli Presentation Services
*
* (C) Copyright IBM Corp. 2002,2003 All Rights Reserved.
*
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
************************************************************ {COPYRIGHT-END} ***
* Change Activity on 6/20/03 version 1.17:
* @00=WCL, V3R0, 04/14/2002, JCP: Initial version
* @01=D96484, V3R2, 06/14/2002, bcourt: hide select/iframe elements
* @02=D99067, V3R2, 06/25/2002, bcourt: hide listbox scrollbar
* @03=D97043, V3R3, 09/03/2002, JCP: fix launch menu item on linux NS6
* @04=D104656, V3R3, 09/16/2002, JCP: form submit instead of triggers, mozilla compatibility
* @05=D107029, V3R4, 12/03/2002, Mark Rebuck:  Added support for timed menu hiding
* @06=D110173, V3R4, 03/24/2003, JCP: selection sometimes gets stuck
* @07=D113641, V3R4, 04/29/2003, LSR: Requirement #258 Shorten CSS Names
* @08=D113626, V3R4, 06/20/2003, JCP: clicking on text doesn't launch action on linux Moz13
*******************************************************************************/

var visibleMenu_ = null;
var padding_ = 10;

var transImg_ = "transparent.gif";

var arrowNorm_ = "contextArrowDefault.gif";
var arrowSel_ = "contextArrowSelected.gif";
var arrowDis_ = "contextArrowDisabled.gif";
var launchNorm_ = "contextLauncherDefault.gif";
var launchSel_ = "contextLauncherSelected.gif";

var arrowNormRTL_ = "contextArrowDefault.gif";
var arrowSelRTL_ = "contextArrowSelected.gif";
var arrowDisRTL_ = "contextArrowDisabled.gif";
var launchNormRTL_ = "contextLauncherDefault.gif";
var launchSelRTL_ = "contextLauncherSelected.gif";

//ARC CHANGES FOR SPECIFYING STYLES - BEGIN
var defaultContextMenuBorderStyle_ = "lwpShadowBorder";
var defaultContextMenuTableStyle_ = "lwpBorderAll";
//ARC CHANGES FOR SPECIFYING STYLES - END

var arrowWidth_ = "12";
var arrowHeight_ = "12";

var submenuAltText_ = "+";

//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
var defaultNoActionsText_ = "(0)";
var defaultNoActionsTextStyle_ = "lwpMenuItemDisabled";
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END

var hideCurrentMenuTimer_ = null;

var onmousedown_ = document.onmousedown;

function clearMenuTimer( ) { //@05
   if (null != hideCurrentMenuTimer_) {
      clearTimeout( hideCurrentMenuTimer_ );
      hideCurrentMenuTimer_ = null;
   }
}

function setMenuTimer( ) { // @05
   clearMenuTimer( );
   hideCurrentMenuTimer_ = setTimeout( 'hideCurrentContextMenu( )', 2000);
}

function debug( str ) {
   /*
   if ( xbDEBUG != null ) {
      xbDEBUG.dump( str );
   }
   */
}

// constructor
function UilContextMenu( name, isLTR, width, borderStyle, tableStyle, emptyMenuText, emptyMenuTextStyle, positionUnder ) {
   // member variables
   this.name = name;
   this.items = new Array();
   this.isVisible = false;
   this.isDismissable = true;
   this.selectedItem = null;
   this.isDynamic = false;
   this.isCacheable = false;
   this.isEmpty = true;
   this.isLTR = isLTR;
   this.hiddenItems = new Array(); //@01A
   this.isHyperlinkChild = true; //  We will reset later if needed.
   
   this.bottomPositioned = positionUnder;

   // html variables
   this.launcher = null;
   this.menuTag = null;

   //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
   //styles for menu
   if ( borderStyle != null )
   {
       this.menuBorderStyle = borderStyle;
   }
   else
   {
       this.menuBorderStyle = defaultContextMenuBorderStyle_;
   }
   
   if ( tableStyle != null )
   {
       this.menuTableStyle = tableStyle;
   }
   else
   {
       this.menuTableStyle = defaultContextMenuTableStyle_;
   }
   //ARC CHANGES FOR SPECIFYING STYLES - END

   //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
   if ( emptyMenuText != null )
   {
   	   this.noActionsText = emptyMenuText;
   }
   else
   {
   	   this.noActionsText = defaultNoActionsText_;
   }
   
   if ( emptyMenuTextStyle != null )
   {
   	   this.noActionsTextStyle = emptyMenuTextStyle;
   }
   else
   {
   	   this.noActionsTextStyle = defaultNoActionsTextStyle_;
   }
   //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END

   // external methods
   this.add = UilContextMenuAdd;
   this.addSeparator = UilContextMenuAddSeparator;
   this.show = UilContextMenuShow;
   this.hide = UilContextMenuHide;

   // internal methods
   this.create = UilContextMenuCreate;
   this.getMenuItem = UilContextMenuGetMenuItem;
   this.getSelectedItem = UilContextMenuGetSelectedItem;

   if ( this.name == null ) {
      this.name = "UilContextMenu_" + allMenus_.length;
   }
}

// adds a menu item to the context menu
function UilContextMenuAdd( item ) {
   this.items[ this.items.length ] = item;
   this.isEmpty = false;
}

function UilContextMenuAddSeparator() {
   var sep = new UilMenuItem();
   sep.isSeparator = true;
   this.add( sep );
}

// shows the context menu
// launcher- html element (anchor) that is launching the menu
// launchItem- menu item that is launching the menu
function UilContextMenuShow( launcher, launchItem ) {
   if ( this.items.length == 0 ) {
      // empty context menu
      debug( 'menu is empty!' );
      //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
      this.add( new UilMenuItem( this.noActionsText, false, "javascript:void(0);", null, null, null, null, this.noActionsTextStyle ) );
      //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END
      this.isEmpty = true;
   }

   if ( this.menuTag == null ) {
      // create the context menu html
      this.create();
   } else {
      this.menuTag.style.left = ""; //196195 //Reset
      this.menuTag.style.top = ""; //196195 //Reset
      this.menuTag.style.width = ""; //"0px"; //196195 //Reset
      this.menuTag.style.height = ""; //196195 //Reset
      this.menuTag.style.overflow = "visible"; //196195 //Reset, No horizontal and vertical scrollbars
   }

   if ( this.menuTag != null) {
      // store the launcher for later
      this.launcher = launcher;
      if ( this.launcher.tagName == "IMG" ) {
         this.isHyperlinkChild = false;

         // we want the anchor tag
         this.launcher = this.launcher.parentNode;
      }

      // boundaries of window
      var bd = new ContextMenuBrowserDimensions();
      var maxX = bd.getScrollFromLeft() + bd.getViewableAreaWidth();
      var maxY = bd.getScrollFromTop() + bd.getViewableAreaHeight();
      var minX = bd.getScrollFromLeft();
      var minY = bd.getScrollFromTop();

      debug( 'max: ' + maxX + ', ' + maxY );

      var menuWidth = getWidth( this.menuTag );
      var menuHeight = getHeight( this.menuTag );

      // move the context menu to the right of the launcher
      var posX = 0;
      var posY = 0;
      var fUseUpperY = false; //196195
      var maxUpperPosY = 0; //196195

      if ( launchItem != null ) {
         // launched from submenu
         var launchTag = launchItem.itemTag;
         var launchTagWidth = getWidth( launchTag );
         var parentTag = launchItem.parentMenu.menuTag; //@04A
         var launchOffsetX = getLeft( parentTag ); //@04C
         var launchOffsetY = getTop( parentTag ); //@04C

         posX = launchOffsetX + getLeft( launchTag ) + launchTagWidth; //@04C
         posY = launchOffsetY + getTop( launchTag ); //@04C

         if ( !this.isLTR ) {
            posX -= launchTagWidth;
            posX -= menuWidth;
         }

         // try to keep it in the window
         if ( this.isLTR ) {
            if ( posX + menuWidth > maxX ) {
               // try to show it to the left of the parent menu
               var posX1 = launchOffsetX - menuWidth;
               var posX2 = maxX - menuWidth;
               if ( 0 <= posX1 ) {
                  posX = posX1;
               }
               else {
                  posX = Math.max( minX, posX2 );
               }
            }
         }
         else {
            if ( posX < 0 ) {
               // try to show it to the right of the parent menu
               var posX1 = launchOffsetX + launchTagWidth;
               if ( posX1 + menuWidth < maxX ) {
                  posX = posX1;
               }
               else {
                  posX = Math.min( maxX, maxX - menuWidth );
               }
            }
         }

         if ( posY + menuHeight > maxY ) {
            var posY1 = maxY - menuHeight;
            posY = Math.max( minY, posY1 );
         }
      }
      else {
         // launched from menu link
         var launcherLeft = getLeft( this.launcher, true )
         if ( this.launcher.tagName == "BUTTON" || this.bottomPositioned ) {
			
             posX = launcherLeft;
             
             // bidi
             if ( !this.isLTR ) {
                 //196195 posX += getWidth( this.launcher ) - getWidth( this.menuTag );
                 posX += getWidth( this.launcher ) - menuWidth; //196195
             }

             if (this.isLTR) {
                 if ((posX + menuWidth) > maxX) {
                     //196195 begins
                     if ((posX + getWidth(this.launcher)) > maxX) {
                         posX = Math.max(minX, maxX - menuWidth);
                     }
                     else 
                     //196195 ends
                         posX = Math.max(minX, posX + getWidth( this.launcher ) - menuWidth);
                 }
                 //196195 begins 
                 else if (posX < minX) {
                     posX = minX;
                 }
                 //196195 ends 
             }
             else{
                 if (posX < minX) {
                     //196195 if ((launcherLeft + menuWidth) < maxX) {
                     if ((launcherLeft > minX) && ((launcherLeft + menuWidth) < maxX)) { //196195
                         posX = launcherLeft;
                     }
                     else{
                         posX = Math.min(minX, maxX - menuWidth);
                     }
                 }
                 //196195 begins
                 else if ( (posX + menuWidth) > maxX) {
                     if (Math.min(posX, maxX - menuWidth) >= minX)
                         posX = Math.min(posX, maxX - menuWidth);
                 }
                 //196195 ends  
             }
             
             maxUpperPosY = getTop( this.launcher, true ); //196195
             var upperVisibleHeight = maxUpperPosY - minY; //196195
             posY = getTop( this.launcher, true ) + getHeight( this.launcher );
             var lowerVisibleHeight = maxY - posY; //196195
             //196195 if ( posY + menuHeight > maxY ) {
             if ( (posY + menuHeight > maxY) && (lowerVisibleHeight < upperVisibleHeight) ) { //196195
                // top
                posY -= (menuHeight + getHeight( this.launcher ));
                fUseUpperY = true; //196195
             }

             if ( posY < minY ) {
                posY = minY;
             }
         }
         else {

             // left-right
             posX = launcherLeft + this.launcher.offsetWidth;
             posY = getTop( this.launcher, true );

             if ( !this.isLTR ) {
                posX -= this.launcher.offsetWidth;
                posX -= menuWidth;
             }

             // keep it in the window
             if ( this.isLTR ) {
                if ( posX + menuWidth > maxX ) {
                   // try to show it on the left side of the launcher
                   var posX1 = launcherLeft - menuWidth;
                   if ( posX1 > 0 ) {
                      posX = posX1;
                   }
                   else {
                      posX = Math.max( minX, maxX - menuWidth );
                   }
                }
             }
             else {
                if ( posX < minX ) {
                   // try to show it on the right side of the launcher
                   var posX1 = launcherLeft + this.launcher.offsetWidth;
                   if ( posX1 + menuWidth < maxX ) {
                      posX = posX1;
                   }
                   else {
                      posX = Math.min( minX, maxX - menuWidth );
                   }
                }
             }

             if ( posY + menuHeight > maxY ) {
                posY = Math.max( minY, maxY - menuHeight );
             }
         }
         if ( ((posX + menuWidth) > maxX) ||
              (((posY + menuHeight) > maxY) && (fUseUpperY == false)) || 
              (((posY + menuHeight) > maxUpperPosY) && (fUseUpperY == true)) ) {
             if (posX + menuWidth > maxX) {
                 this.menuTag.style.width = (maxX - posX) + "px";
             }
             else{
                 this.menuTag.style.width = menuWidth + "px";
             }

             if (fUseUpperY == false) {
                 if (posY + menuHeight > maxY) {
                     this.menuTag.style.height = (maxY - posY) + "px";
                 }
                 else {
                     this.menuTag.style.height = menuHeight + "px";
                 }
             } else {
                 if (posY + menuHeight > maxUpperPosY) {
                     this.menuTag.style.height = (maxUpperPosY - posY) + "px";
                 }
                 else {
                     this.menuTag.style.height = menuHeight + "px";
                 }
             }

             this.menuTag.style.overflow = "auto";
         } else { //196195 begins
             this.menuTag.style.width = menuWidth + "px";
             this.menuTag.style.height = menuHeight + "px";
             this.menuTag.style.overflow = "visible"; //196195
         } //196196 ends
      }

      debug( 'show ' + this.name + ': ' + posX + ', ' + posY );
      this.menuTag.style.left = posX + "px";
      this.menuTag.style.top = posY + "px";

      // make the context menu visible
      this.menuTag.style.visibility = "visible";
      this.isVisible = true;

      // set focus on the first menu item
      this.items[0].setSelected( true );
      this.items[0].anchorTag.focus();

      // @01A - Hide any items that intersect this menu
      var coll = document.getElementsByTagName("SELECT");
      if (coll!=null)
      {
         for (i=0; i<coll.length; i++)
         {
            //Hide the element
            if (intersect(this.menuTag,coll[i]) == true ) {
               if (coll[i].style.visibility != "collapse") //@02C
               {
                  coll[i].style.visibility = "collapse"; //@02C
                  this.hiddenItems.push(coll[i]);
               }
            }
         }
      }
      coll = document.getElementsByTagName("IFRAME");
      if (coll!=null)
      {
         for (i=0; i<coll.length; i++)
         {
            //Hide the element
            if (intersect(this.menuTag,coll[i]) == true ) {
               if (coll[i].style.visibility != "hidden")
               {
                  coll[i].style.visibility = "hidden";
                  this.hiddenItems.push(coll[i]);
               }
            }
         }
      }

      // save old & set new hide action for this menu     
      onmousedown_ = document.onmousedown;
      document.onmousedown = hideCurrentContextMenu;
   }
}

// Test whether two objects overlap
function intersect(obj1 , obj2) //@01A
{
   var left1 =  parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("left"));
   var right1 = left1 + parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("width"));
   var top1 = parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("top"));
   var bottom1 = top1 + parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("height"));

   var left2 =  parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("left"));
   var right2 = left2 + parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("width"));
   var top2 = parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("top"));
   var bottom2 = top2 + parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("height"));

    //alert("Comparing: " +left1 + ", " + right1+ ", " +top1 + ", " + bottom1+ " to "  +left2 + ", "  +right2 + ", " +top2 + ", " +bottom2);
   if (lineIntersect(left1,right1, left2,right2)== true &&
       lineIntersect(top1,bottom1,top2,bottom2) == true) {
      return true;
   }
   return false;
}

// Test whether the two line segments a--b and c--d intersect.
function lineIntersect(a, b, c, d) //@01A
{
   //alert (a+"--"+b + "   " + c + "--" + d);
   //Assume that a < b && c < d
   if ( (a <= c  && c <= b) ||
        (a <= d && d <= b) ||
        (c <= a && d >= b ) )
   {
      return true;
   } else {
      return false;
   }
}

// hides the context menu
function UilContextMenuHide() {
   if ( this.menuTag != null ) {
      debug( 'hide ' + this.name );

      // hide any visible submenus first
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].submenu != null &&
              this.items[i].submenu.isVisible ) {
            this.items[i].submenu.hide();
         }
      }

      // clear selection
      if ( this.selectedItem != null ) {
         this.selectedItem.setSelected( false );
      }

      // make the context menu hidden
      this.menuTag.style.visibility = "hidden";
      this.isVisible = false;
      this.isDismissable = true;

      // @01A - Show any items that were hidden by this menu
      var itemCount = this.hiddenItems.length;
      for (i=0; i<itemCount; i++)
      {
         var item = this.hiddenItems.pop();
         item.style.visibility = "visible";
      }

      // clear the launcher
      this.launcher = null;
      
      // reset action      
      document.onmousedown = onmousedown_;
   }
}

// creates the context menu html element
function UilContextMenuCreate( recurse ) {
   if ( this.menuTag == null ) {
      this.menuTag = document.createElement( "DIV" );
      this.menuTag.style.position = "absolute";
      this.menuTag.style.cursor = "default";
      this.menuTag.style.visibility = "hidden";
      // following line does not work on Mozilla. SPR #PDIK66SJZ4
      //this.menuTag.style.width = "0px"; // this causes dynamic sizing
      //if (!this.isLTR) this.menuTag.dir = "RTL"; //196195
      this.menuTag.onmouseover = contextMenuDismissDisable;
      this.menuTag.onmouseout = contextMenuDismissEnable;
      this.menuTag.oncontextmenu = contextMenuOnContextMenu;

      var numItems = this.items.length;

      // check if this context menu contains icons or submenus
      var hasIcon = false;
      var hasSubmenu = false;
      for ( var i=0; i<numItems; i++ ) {
         if ( !this.items[i].isSeparator ) {
            if ( !hasSubmenu && this.items[i].submenu != null ) {
               hasSubmenu = true;
            }
            if ( !hasIcon && this.items[i].icon != null ) {
               hasIcon = true;
            }
            if ( hasSubmenu && hasIcon ) {
               break;
            }
         }
      }

      // create the menu items
      for ( var i=0; i<numItems; i++ ) {
         this.items[i].isFirst = ( i == 0 );
         this.items[i].isLast = ( i+1 == numItems );
         this.items[i].parentMenu = this;
         this.items[i].create( hasIcon, hasSubmenu );
      }

      // create the context menu border
      var border = document.createElement( "TABLE" );
      if (!this.isLTR) border.dir = "RTL";
      //border.className = "wclPopupMenuBorder"; //@04D
      border.rules = "none";
      border.cellPadding = 0;
      border.cellSpacing = 0;
      //border.width = "100%";
      border.border = 0;
      var borderBody = document.createElement( "TBODY" );
      var borderRow = document.createElement( "TR" );
      var borderData = document.createElement( "TD" );
      var borderDiv = document.createElement( "DIV" ); //@04A
      //borderDiv.className = "pop2"; //@04A   //@06C1
      
      //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
      borderDiv.className = this.menuBorderStyle; 
      //ARC CHANGES FOR SPECIFYING STYLES - END

      borderData.appendChild( borderDiv ); //@04A
      borderRow.appendChild( borderData );
      borderBody.appendChild( borderRow );
      border.appendChild( borderBody );

      // create the context menu
      var table = document.createElement( "TABLE" );
      if (!this.isLTR) table.dir = "RTL";
      //table.className = "wclPopupMenu"; //@04D
      table.rules = "none";
      table.cellPadding = 0;
      table.cellSpacing = 0;
      table.width = "100%";
      table.border = 0;

      // add the menu items
      var tableBody = document.createElement( "TBODY" );
      table.appendChild( tableBody );

      // @04A - create another table for mozilla fix
      // (border styles not hidden correctly if set on table tag)
      var table2 = document.createElement( "TABLE" );
      if (!this.isLTR) table2.dir = "RTL";
      table2.rules = "none";
      table2.cellPadding = 0;
      table2.cellSpacing = 0;
      table2.width = "100%";
      table2.border = 0;
      var tableRow = document.createElement( "TR" );
      var tableData = document.createElement( "TD" );
      var tableDiv = document.createElement( "DIV" );
      //tableDiv.className = "pop1";     //@06C1

      //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
      tableDiv.className = this.menuTableStyle;     //@06C1
      //ARC CHANGES FOR SPECIFYING STYLES - END

      var tableBody2 = document.createElement( "TBODY" );
      tableBody.appendChild( tableRow );
      tableRow.appendChild( tableData );
      tableData.appendChild( tableDiv );
      tableDiv.appendChild( table2 );
      table2.appendChild( tableBody2 );

      for ( var i=0; i<numItems; i++ ) {
         if ( this.items[i].isSeparator ) {
            this.items[i].createSeparator( tableBody2, hasSubmenu ); //@04C
         }
         else {
            tableBody2.appendChild( this.items[i].itemTag ); //@04C
         }
      }

      borderDiv.appendChild( table ); //@04C
      this.menuTag.appendChild( border );

      // add to document
      document.body.appendChild( this.menuTag );
   }

   if ( recurse ) {
      // this is used when cloning dynamic menus
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].submenu != null ) {
            this.items[i].submenu.create( recurse );
         }
      }
   }
}

// returns the menu item object associated with the html element
function UilContextMenuGetMenuItem( htmlElement ) {
   if ( htmlElement != null ) {
      if ( htmlElement.nodeType == 3 ) { //@06A
          // text node
          htmlElement = htmlElement.parentNode; //@06A
      }
      var tagName = htmlElement.tagName;
      var menuItemTag = null;
      if ( tagName == "IMG" ||
           tagName == "A" ) {
         menuItemTag = htmlElement.parentNode.parentNode;
      }
      else if ( tagName == "TD" ) {
         menuItemTag = htmlElement.parentNode;
      }
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].itemTag != null &&
              this.items[i].itemTag == menuItemTag ) {
            // found the item
            return this.items[i];
         }
         else if ( this.items[i].submenu != null &&
                   this.items[i].submenu.isVisible ) {
            // recurse through any visible submenus
            var item = this.items[i].submenu.getMenuItem( htmlElement );
            if ( item != null ) {
               // found the item
               return item;
            }
         }
      }
   }
   return null;
}

// returns the deepest selected menu item
function UilContextMenuGetSelectedItem() {
   var item = this.selectedItem;
   if ( item != null && item.submenu != null && item.submenu.isVisible ) {
      // recurse through the item's visible submenu
      return item.submenu.getSelectedItem();
   }
   return item;
}

// method called by an event handler (onmouseover for context menu div)
function contextMenuDismissEnable() {
   if ( visibleMenu_ != null ) {
      visibleMenu_.isDismissable = true;
      if (visibleMenu_.isHyperlinkChild) {
         setMenuTimer( ); // @05
      }
   }
}

// method called by an event handler (onmouseout for context menu div)
function contextMenuDismissDisable() {
   if ( visibleMenu_ != null ) {
      visibleMenu_.isDismissable = false;
      clearMenuTimer( ); // @05
   }
}

// method called by an event handler (oncontextmenu for context menu div)
function contextMenuOnContextMenu() {
   return false;
}

// constructor
function UilMenuItem( text, enabled, action, clientAction, submenu, icon, defItem,menuStyle, selectedMenuStyle ) {
   // member variables
   this.text = text;
   this.icon = icon;
   this.action = action;
   this.clientAction = clientAction;
   this.submenu = submenu;
   this.isSeparator = false;
   this.isSelected = false;
   this.isEnabled = ( enabled != null ) ? enabled : true;
   this.isDefault = ( defItem != null ) ? defItem : false;
   this.isFirst = false;
   this.isLast = false;
   this.parentMenu = null;
   
   if ( menuStyle != null ) {
      this.menuStyle = menuStyle; 
   }
   else {
      this.menuStyle = ( this.isEnabled ) ? "lwpMenuItem" : "lwpMenuItemDisabled"; 
   }

   this.selectedMenuStyle = ( selectedMenuStyle != null) ? selectedMenuStyle : "lwpSelectedMenuItem";

   // html variables
   this.itemTag = null;
   this.anchorTag = null;
   this.arrowTag = null;

   // internal methods
   this.create = UilMenuItemCreate;
   this.createSeparator = UilMenuItemCreateSeparator;
   this.setSelected = UilMenuItemSetSelected;
   this.updateStyle = UilMenuItemUpdateStyle;
   this.getNextItem = UilMenuItemGetNextItem;
   this.getPrevItem = UilMenuItemGetPrevItem;

   if ( this.submenu != null ) {
      // menu items with submenus do not have actions
      this.action = null;
   }
}

// creates the menu item html element
function UilMenuItemCreate( menuHasIcon, menuHasSubmenu ) {
   if ( !this.isSeparator ) {
      this.anchorTag = document.createElement( "A" );
      if ( this.action != null ) {
         this.anchorTag.href = "javascript:menuItemLaunchAction();";
         if ( this.clientAction != null ) {
            this.anchorTag.onclick = this.clientAction;
         }
      }
      else if ( this.submenu != null ) {
         this.anchorTag.href = "javascript:void(0);";
         this.anchorTag.onclick = menuItemShowSubmenu;
      }
      else if ( this.clientAction != null ) {
         this.anchorTag.href = "javascript:menuItemLaunchAction();";
         this.anchorTag.onclick = this.clientAction;
      }
      this.anchorTag.onfocus = menuItemFocus;
      this.anchorTag.onblur = menuItemBlur;
      this.anchorTag.onkeydown = menuItemKeyDown;
      this.anchorTag.innerHTML = this.text;
//      this.anchorTag.title = this.text; 
      this.anchorTag.title = this.anchorTag.innerHTML; 
      //this.anchorTag.className = "pop5";    //@06C1
      this.anchorTag.className = this.menuStyle;    //@06C1
      if ( this.isDefault ) {
         this.anchorTag.style.fontWeight = "bold";
      }

      var td = document.createElement( "TD" );
      td.noWrap = true;
      td.style.padding = "3px";
      td.appendChild( this.anchorTag );

      // left padding or icon
      var leftPad = document.createElement( "TD" );
      leftPad.noWrap = true;
      leftPad.innerHTML = "&nbsp;";
      leftPad.style.padding = "3px";
      if ( this.icon != null ) {
         var imgTag = document.createElement( "IMG" );
         imgTag.src = this.icon;
         if (imgTag.src == "" || imgTag.src == null) {
             var imgTag1 = "<img src=\"" + this.icon + "\"";
             if ( this.text != null ) {
                imgTag1 += " alt=\'" + this.text + "\'";
                imgTag1 += " title=\'" + this.text + "\'";
             }
             imgTag1 += "/>";
             leftPad.innerHTML = imgTag1;
         } else {
             if ( this.text != null ) {
                imgTag.alt = this.text;
                imgTag.title = this.text;
             }
             leftPad.appendChild( imgTag );
         }
      }
      else {
         leftPad.width = padding_;
      }

      // right padding
      var rightPad = document.createElement( "TD" );
      rightPad.noWrap = true;
      rightPad.width = padding_;
      rightPad.innerHTML = "&nbsp;";
      rightPad.style.padding = "3px";

      this.itemTag = document.createElement( "TR" );
      this.itemTag.onmousemove = menuItemMouseMove;
      this.itemTag.onmousedown = menuItemLaunchAction;
      //this.itemTag.className = "pop5";  //@06C1
      this.itemTag.className = this.menuStyle;
      // put together the table row
      this.itemTag.appendChild( leftPad );
      this.itemTag.appendChild( td );
      this.itemTag.appendChild( rightPad );
      if ( menuHasSubmenu ) {
         // submenu arrow
         var submenuArrow = document.createElement( "TD" );
         submenuArrow.noWrap = true;
         submenuArrow.style.padding = "3px";
         if ( this.submenu != null ) {
            var submenuImg = document.createElement( "IMG" );
            submenuImg.alt = submenuAltText_;
            submenuImg.title = submenuAltText_;
            submenuImg.width = arrowWidth_;
            submenuImg.height = arrowHeight_;
            if (this.parentMenu.isLTR) submenuImg.src = arrowNorm_;
            else submenuImg.src = arrowNormRTL_;
            submenuArrow.appendChild( submenuImg );
            this.arrowTag = submenuImg;
         }
         else {
            submenuArrow.innerHTML = "&nbsp;";
         }
         this.itemTag.appendChild( submenuArrow );
      }

      // update the style of the menu item
      this.updateStyle( this.itemTag );
   }
}

// create the context menu separator html elements
function UilMenuItemCreateSeparator( tableBody, menuHasSubmenu ) {
   // create the context menu separator
   var numCols = ( menuHasSubmenu ) ? 4 : 3;

   for ( var i=0; i<4; i++ ) {
      var tr = document.createElement( "TR" );
      if ( i == 1 ) {
         //tr.className = "pop3";   //@06C1
         tr.className = "portlet-separator";   //@06C1
      }
      else if ( i == 2 ) {
         //tr.className = "pop4";   //@06C1
         tr.className = "lwpMenuBackground";   //@06C1
      }
      else {
         //tr.className = "pop5";   //@06C1
         tr.className = "lwpMenuItem";   //@06C1
      }

      var td = document.createElement( "TD" );
      td.noWrap = true;
      td.width = "100%";
      td.height = "1px";
      td.colSpan = numCols;

      //mmd - 06/09/06 - commenting out this section of code because it causes many additional requests
      //to the server everytime a context menu is opened.  after unit testing, removing piece of code
      //does not appear to affect the function of the menus
      /*var img = document.createElement( "IMG" );
      img.src = transImg_;
      img.width = 1;
      img.height = 1;
      img.style.display = "block";
      td.appendChild( img );*/

      tr.appendChild( td );
      tableBody.appendChild( tr );
   }
}

// changes the selected state for menu item
function UilMenuItemSetSelected( isSelected ) {

   if ( isSelected && !this.isSelected ) {
      debug( 'selected: ' + this.text );
      // handle the previous selection first
      if ( this.parentMenu != null &&
           this.parentMenu.isVisible &&
           this.parentMenu.selectedItem != null &&
           this.parentMenu.selectedItem != this ) {
         // hide previous selection's submenu
         if ( this.parentMenu.selectedItem.submenu != null ) {
            this.parentMenu.selectedItem.submenu.hide();
         }
         // unselect previous selection from parent menu
         this.parentMenu.selectedItem.setSelected( false );
      }

      // select this menu item
      this.isSelected = true;
      if ( this.parentMenu != null && this.parentMenu.isVisible ) {
         this.parentMenu.selectedItem = this;
      }

      // update the styles
      this.updateStyle( this.itemTag );
   }
   else if ( !isSelected && this.isSelected ) {
      debug( 'deselected: ' + this.text );
      // menu item cannot be unselected if its submenu is visible
      if ( this.submenu == null || ( this.submenu != null && !this.submenu.isVisible ) ) {
         // unselect this menu item
         this.isSelected = false;
         if ( this.parentmenu != null ) {
            this.parentmenu.selectedItem = null;
         }

         // update the styles
         this.updateStyle( this.itemTag );
      }
   }
}

// recursively set the style of the menu item html element
function UilMenuItemUpdateStyle( tag, styleID ) {
   if ( tag != null ) {
      if ( styleID == null ) {
         //styleID = "pop5";  //@06C1
         styleID = this.menuStyle;
         if ( !this.isEnabled ) {
            //styleID = "pop7"; //@06C1
            styleID = this.menuStyle; 
         }
         else if ( this.isSelected ) {
            //styleID = "pop6";  //@06C1
            styleID = this.selectedMenuStyle;  //@06C1
         }
         if ( this.arrowTag != null ) {
            if ( this.isEnabled && this.isSelected ) {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowSel_;
               else this.arrowTag.src = arrowSelRTL_;
            }
            else if ( !this.isEnabled ) {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowDis_;
               else this.arrowTag.src = arrowDisRTL_;
            }
            else {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowNorm_;
               else this.arrowTag.src = arrowNormRTL_;
            }
         }
      }
      tag.className = styleID;
      if ( tag.childNodes != null ) {
         for ( var i=0; i<tag.childNodes.length; i++ ) {
            this.updateStyle( tag.childNodes[i], styleID );
         }
      }
   }
}

// returns the next enabled, non-separator menu item after the given item
function UilMenuItemGetNextItem() {
   var menu = this.parentMenu;
   if ( menu != null ) {
      for ( var i=0; i<menu.items.length; i++ ) {
         if ( menu.items[i] == this ) {
            for ( var j=i+1; j<menu.items.length; j++ ) {
               if ( !menu.items[j].isSeparator && menu.items[j].isEnabled ) {
                  return menu.items[j];
               }
            }
            // no next item
            return null;
         }
      }
   }
   return null;
}

// returns the previous enabled, non-separator menu item before the given item
function UilMenuItemGetPrevItem() {
   var menu = this.parentMenu;
   if ( menu != null ) {
      for ( var i=menu.items.length-1; i>=0; i-- ) {
         if ( menu.items[i] == this ) {
            for ( var j=i-1; j>=0; j-- ) {
               if ( !menu.items[j].isSeparator && menu.items[j].isEnabled ) {
                  return menu.items[j];
               }
            }
            // no previous item
            return null;
         }
      }
   }
   return null;
}

// launches the action for a menu item
// method called by an event handler (href for anchor tag)
function menuItemLaunchAction() {
   if ( visibleMenu_ != null ) {
      //var evt = window.event;
      //var item = visibleMenu_.getMenuItem( evt.target );
      var item = visibleMenu_.getSelectedItem();
      if ( item != null && item.isEnabled ) {
         hideCurrentContextMenu( true );
         if ( item.clientAction != null ) {
            eval( item.clientAction );
         }
         if ( item.action != null ) {
            if ( item.action.indexOf( "javascript:" ) == 0 ) {
               eval( item.action );
            }
            else {
               //window.location.href = item.action; //@04D
            }
         }
      }
   }
}

// shows the submenu for a menu item
// method called by an event handler (onclick for anchor tag)
function menuItemShowSubmenu(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null && item.isEnabled ) {
         var menu = item.submenu;
         if ( menu != null ) {
            menu.show( item.anchorTag, item );
         }
      }
   }
}

// focus handler for menu item
// method called by an event handler (onfocus for anchor tag)
function menuItemFocus(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         // select the focused menu item
         //item.anchorTag.hideFocus = item.isEnabled;
         item.setSelected( true );
      }
   }
}

// blur handler for menu item
// method called by an event handler (onblur for anchor tag)
function menuItemBlur(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         /* //jcp
         if ( item.isFirst && evt.shiftKey ) {
            debug( 'blur = ' + item.text );
            // user is shift tabbing off the beginning of the menu
            // set focus on the launcher
            item.parentMenu.launcher.focus();
            // hide the menu
            item.parentMenu.hide();
         }
         */
      }
   }
}

// key press handler for menu item
// method called by an event handler (onkeydown for anchor tag)
function menuItemKeyDown(evt) {
   var item = null;
   if ( visibleMenu_ != null ) {
      item = visibleMenu_.getMenuItem( evt.target );
   }
   if ( item != null ) {
      var next = null;
      switch ( evt.keyCode ) {
      case 38: // up key
         next = item.getPrevItem();
         if ( next != null ) {
            next.anchorTag.focus();
         }
         else if ( item.parentMenu != visibleMenu_ ) {
            item.parentMenu.launcher.focus();
            item.parentMenu.hide();
         }
         else {
            visibleMenu_.launcher.focus();
            hideCurrentContextMenu( true );
         }
         return false;
         break;
      case 40: // down key
         next = item.getNextItem();
         if ( next != null ) {
            next.anchorTag.focus();
         }
         else if ( item.parentMenu != visibleMenu_ ) {
            item.parentMenu.launcher.focus();
            item.parentMenu.hide();
         }
         else {
            visibleMenu_.launcher.focus();
            hideCurrentContextMenu( true );
         }
         return false;
         break;
      case 39: // right key
         if ( visibleMenu_.isLTR ) {
            if ( item.submenu != null ) {
               menuItemShowSubmenu(evt);
               item.submenu.items[0].anchorTag.focus();
            }
         }
         else {
            if ( item.parentMenu != visibleMenu_ ) {
               item.parentMenu.launcher.focus();
               item.parentMenu.hide();
            }
         }
         return false;
         break;
      case 37: // left key
         if ( visibleMenu_.isLTR ) {
            if ( item.parentMenu != visibleMenu_ ) {
               item.parentMenu.launcher.focus();
               item.parentMenu.hide();
            }
         }
         else {
            if ( item.submenu != null ) {
               menuItemShowSubmenu(evt);
               item.submenu.items[0].anchorTag.focus();
            }
         }
         return false;
         break;
      case 9: // tab key
         visibleMenu_.launcher.focus();
         hideCurrentContextMenu( true );
         break;
      case 27: // escape key
         visibleMenu_.launcher.focus();
         hideCurrentContextMenu( true );
         break;
      case 13: // enter key
         break;
      default:
         break;
      }
   }
}

// handle mouse move for menu item
// method called by an event handler (onmousemove for item tag)
function menuItemMouseMove(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         if ( !item.isSelected ) {
            // set focus on the anchor and select the menu item
            item.anchorTag.focus();
         }
         if ( item.submenu != null && !item.submenu.isVisible && item.isEnabled ) {
            // show the submenu
            item.submenu.show( item.anchorTag, item );
         }
      }
   }
}

// handle mouse down event for menu item
// method called by an event handler (onmousedown for item tag)
function menuItemMouseDown(evt) {
   /* //@08D
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         item.setSelected( true );
      }
      else { //@03A
         item = visibleMenu_.getSelectedItem();
      }
      if ( item != null && item.anchorTag != evt.target ) {
         //item.anchorTag.click();
         menuItemLaunchAction();
      }
   }
   */
   menuItemLaunchAction(); //@08A
}

var allMenus_ = new Array();

//ARC CHANGES FOR SPECIFYING STYLES - BEGIN
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
function createContextMenu( name, isLTR, width, borderStyle, tableStyle, noActionsText, noActionsTextStyle, positionUnder ) {
   var menu = new UilContextMenu( name, isLTR, width, borderStyle, tableStyle, noActionsText, noActionsTextStyle, positionUnder );
   allMenus_[ allMenus_.length ] = menu;
   return menu;
}
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END
//ARC CHANGES FOR SPECIFYING STYLES - END

function getContextMenu( name ) {
   for ( var i=0; i<allMenus_.length; i++ ) {
      if ( allMenus_[i].name == name ) {
         return allMenus_[i];
      }
   }
   return null;
}

function showContextMenu( name, isDynamic, isCacheable ) {
   contextMenuShow( name, isDynamic, isCacheable, event.target, true );
}

function showContextMenu( name, launcher ) {
   contextMenuShow( name, false, false, launcher, true );
}

function contextMenuShow( name, isDynamic, isCacheable, launcher, doLoad ) {
   debug( "***** showContextMenu: " + name )

   //  We mnight need to find a suitable launcher...
   var oldLauncher = launcher;
   while ((null != launcher) && (null == launcher.tagName)) {
      launcher = launcher.parentNode;
   }
   if (null == launcher) { //  shouldn't happen, but...
      launcher = oldLauncher;
   }

   if ( eval( isDynamic ) ) {
      debug( 'showContextMenu: dynamic=true, load=' + eval( doLoad ) + ', cache=' + eval( isCacheable ) );
      // dynamically loaded menu
      if ( eval( doLoad ) ) {
         // load the url into hidden frame
         loadDynamicMenu( name );
      }

      // clone the dynamic menu from hidden frame
      menu = getDynamicMenu( name, eval( isCacheable ) );

      if ( menu == null && top.isContextMenuManager_ != null ) {
         // menu not done loading yet
         debug( 'showContextMenu: ' + name + ' added to queue' );
         top.contextMenuManagerRequest( name, window, launcher, isCacheable );
      }
   }
   else {
      debug( 'showContextMenu: static context menu' );
      // statically defined menu
      menu = getContextMenu( name );
      if ( menu == null ) {
         menu = createContextMenu( name, 150 );
      }
   }

   if ( menu != null ) {
      hideCurrentContextMenu( true );
      menu.show( launcher );
      visibleMenu_ = menu;
   }
   else {
      debug( 'showContextMenu: ' + name + ' unavailable' );
   }
   clearMenuTimer( ); // @05
}

// method called by an event handler (onmousedown for document)
function hideCurrentContextMenu( forceHide ) {
   if ( visibleMenu_ != null && ( forceHide == true || visibleMenu_.isDismissable ) ) {
//      contextMenuDismissEnable();
      if ( visibleMenu_.isVisible ) {
         visibleMenu_.hide();
      }
      if ( visibleMenu_.isDynamic && !visibleMenu_.isCacheable ) {
         uncacheContextMenu( visibleMenu_ );
      }
      visibleMenu_ = null;
   }
}

function uncacheContextMenu( menu ) {
   debug( 'uncache menu: ' + menu.name );
   // recurse
   for ( var i=0; i<menu.items.length; i++ ) {
      if ( menu.items[i].submenu != null ) {
         uncacheContextMenu( menu.items[i].submenu );
      }
   }

   // remove from all menus array
   for ( var i=0; i<allMenus_.length; i++ ) {
      if ( allMenus_[i] == menu ) {
         var temp = new Array();
         var index = 0;
         for ( var j=0; j<allMenus_.length; j++ ) {
            if ( j != i ) {
               temp[ index ] = allMenus_[ j ];
               index++;
            }
         }
         allMenus_ = temp;
         break;
      }
   }
}

function contextMenuSetIcons( transparentImage,
                              arrowDefault, arrowSelected, arrowDisabled,
                              launcherDefault, launcherSelected,
                              arrowDefaultRTL, arrowSelectedRTL, arrowDisabledRTL,
                              launcherDefaultRTL, launcherSelectedRTL ) {
   transImg_ = transparentImage;

   arrowNorm_ = arrowDefault;
   arrowSel_ = arrowSelected;
   arrowDis_ = arrowDisabled;
   launchNorm_ = launcherDefault;
   launchSel_ = launcherSelected;

   arrowNormRTL_ = arrowDefaultRTL;
   arrowSelRTL_ = arrowSelectedRTL;
   arrowDisRTL_ = arrowDisabledRTL;
   launchNormRTL_ = launcherDefaultRTL;
   launchSelRTL_ = launcherSelectedRTL;

   contextMenuPreloadImage( transImg_ );

   contextMenuPreloadImage( arrowNorm_ );
   contextMenuPreloadImage( arrowSel_ );
   contextMenuPreloadImage( arrowDis_ );
   contextMenuPreloadImage( launchNorm_ );
   contextMenuPreloadImage( launchSel_ );

   contextMenuPreloadImage( arrowNormRTL_ );
   contextMenuPreloadImage( arrowSelRTL_ );
   contextMenuPreloadImage( arrowDisRTL_ );
   contextMenuPreloadImage( launchNormRTL_ );
   contextMenuPreloadImage( launchSelRTL_ );
}

function contextMenuSetArrowIconDimensions( width, height ) {
   arrowWidth_ = width;
   arrowHeight_ = height;
}

function contextMenuPreloadImage( imgsrc ) {
   var preload = new Image();
   preload.src = imgsrc;
}

function toggleLauncherIcon( popupID, selected, isLTR ) {
   if ( selected ) {
      if ( isLTR ) {
         document.images[ popupID ].src = launchSel_;
      }
      else {
         document.images[ popupID ].src = launchSelRTL_;
      }
   }
   else {
      if ( isLTR ) {
         document.images[ popupID ].src = launchNorm_;
      }
      else {
         document.images[ popupID ].src = launchNormRTL_;
      }
   }
   return true;
}

function contextMenuSetNoActionsText( noActionsText, submenuAltText ) {
   noActionsText_ = noActionsText;
   submenuAltText_ = submenuAltText;
}

function contextMenuGetNoActionsText() {
   return noActionsText_;
}

function getWidth( tag ) {
   return tag.offsetWidth;
}

function getHeight( tag ) {
   return tag.offsetHeight;
}

function getLeft( tag, recurse ) {
   var size = 0;
   if ( tag != null ) {
      //size = parseInt( document.defaultView.getComputedStyle(tag, null).getPropertyValue("left") ); //@04D

      //@04A
      if ( recurse && tag.offsetParent != null ) {
         size += getLeft( tag.offsetParent, recurse );
      }
      if ( tag != null ) {
         size += tag.offsetLeft;
      }

   }
   return size;
}

function getTop( tag, recurse ) {
   var size = 0;
   if ( tag != null ) {
      //size = parseInt( document.defaultView.getComputedStyle(tag, null).getPropertyValue("top") ); //@04D

      //@04A
      if ( recurse && tag.offsetParent != null ) {
         size += getTop( tag.offsetParent, recurse );
      }
      if ( tag != null ) {
         size += tag.offsetTop;
      }

   }
   return size;
}

/*****************************************************
* code for dynamically loaded menus
*****************************************************/
function loadDynamicMenu( menuURL ) {
   debug( '* loadDynamicMenu: ' + menuURL );
   var menu = getContextMenu( menuURL );
   if ( menu != null ) {
      if ( menu.isVisible ) {
         // dynamic menu requested, but it's currently showing
         menu.hide();
      }
      if ( !menu.isCacheable ) {
         // make sure it's not in the cache
         uncacheContextMenu( menu );
      }
   }
   if ( getContextMenu( menuURL ) == null ) {
      if ( top.isContextMenuManager_ != null ) {
         debug( 'loadDynamicMenu: loading' );
         top.contextMenuManagerLoadDynamicMenu( menuURL );
      }
   }
}

function getDynamicMenu( menuURL, cache ) {
   debug( '* getDynamicMenu: ' + menuURL );
   var clone = getContextMenu( menuURL );
   if ( clone == null ) {
      if ( top.isContextMenuManager_ != null ) {
         if ( top.contextMenuManagerIsDynamicMenuLoaded() ) {
            var menu = top.contextMenuManagerGetDynamicMenu();
            debug( 'getDynamicMenu: fetched menu from other frame' );
            clone = cloneMenu( menu, menuURL, cache );
            if ( clone.items.length == 0 ) {
               contextMenuSetNoActionsText( top.contextMenuManagerGetNoActionsText() );
            }
         }
         else {
            debug( 'getDynamicMenu: menu not loaded' );
         }
      }
      else {
         debug( 'getDynamicMenu: menu manager not present' );
      }
   }
   else {
      debug( 'getDynamicMenu: menu previously loaded' );
   }
   return clone;
}

function cloneMenu( menu, name, cache ) {
   var clone = getContextMenu( name );
   if ( clone == null ) {
      if ( menu != null ) {
         clone = createContextMenu( name, menu.width );
      }
      else {
         clone = createContextMenu( name, 150 );
      }
      clone.isDynamic = true;
      clone.isCacheable = cache;
      if ( menu != null ) {
         for ( var i=0; i<menu.items.length; i++ ) {
            clone.add( cloneMenuItem( menu.items[i], name + "_sub" + i, cache ) );
         }
      }
   }
   return clone;
}

function cloneMenuItem( item, submenuName, cache ) {
   var submenu = null;
   if ( item.submenu != null ) {
      submenu = cloneMenu( item.submenu, submenuName, cache );
   }
   var clone = new UilMenuItem( item.text, item.isEnabled, item.action, item.clientAction, submenu, item.icon, null, null, null );
   clone.isEnabled = item.isEnabled;
   clone.isSelected = item.isSelected;
   clone.isSeparator = item.isSeparator;
   return clone;
}


//////////////////////////////////////////////////////////////////
// begin BrowserDimensions object definition
ContextMenuBrowserDimensions.prototype				= new Object();
ContextMenuBrowserDimensions.prototype.constructor = ContextMenuBrowserDimensions;
ContextMenuBrowserDimensions.superclass			= null;

function ContextMenuBrowserDimensions(){

    this.body = document.body;
    if (this.isStrictDoctype() && !this.isSafari()) {
        this.body = document.documentElement;
    }

}

ContextMenuBrowserDimensions.prototype.getScrollFromLeft = function(){
    return this.body.scrollLeft ;
}

ContextMenuBrowserDimensions.prototype.getScrollFromTop = function(){
    return this.body.scrollTop ;
}

ContextMenuBrowserDimensions.prototype.getViewableAreaWidth = function(){
    return this.body.clientWidth ;
}

ContextMenuBrowserDimensions.prototype.getViewableAreaHeight = function(){
    return this.body.clientHeight ;
}

ContextMenuBrowserDimensions.prototype.getHTMLElementWidth = function(){
    return this.body.scrollWidth ;
}

ContextMenuBrowserDimensions.prototype.getHTMLElementHeight = function(){
    return this.body.scrollHeight ;
}

ContextMenuBrowserDimensions.prototype.isStrictDoctype = function(){

    return (document.compatMode && document.compatMode != "BackCompat");

}

ContextMenuBrowserDimensions.prototype.isSafari = function(){

    return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);

}

// end BrowserDimensions object definition
//////////////////////////////////////////////////////////////////





  
  	
  
        
 
 
delete djConfig.baseUrl;
