 
 
 
 
 

 




 
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-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	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(!this["console"]){this.console={log:function(){}};}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]=function(){var a=Array.apply({},arguments);a.unshift(_c+":");console.log(a.join(" "));};})();}}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];}}var _10=["Browser","Rhino","Spidermonkey","Mobile"];var t;while((t=_10.shift())){d["is"+t]=false;}dojo.locale=d.config.locale;var rev="$Rev: 13707 $".match(/\d+/);dojo.version={major:1,minor:1,patch:1,flag:"_IBM",revision:rev?+rev[0]:999999,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());}dojo._mixin=function(obj,_14){var _15={};for(var x in _14){if(_15[x]===undefined||_15[x]!=_14[x]){obj[x]=_14[x];}}if(d["isIE"]&&_14){var p=_14.toString;if(typeof p=="function"&&p!=obj.toString&&p!=_15.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){obj.toString=_14.toString;}}return obj;};dojo.mixin=function(obj,_19){for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_1c,_1d,_1e){var obj=_1e||d.global;for(var i=0,p;obj&&(p=_1c[i]);i++){if(i==0&&this._scopeMap[p]){p=this._scopeMap[p];}obj=(p in obj?obj[p]:(_1d?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_22,_23,_24){var _25=_22.split("."),p=_25.pop(),obj=d._getProp(_25,true,_24);return obj&&p?(obj[p]=_23):undefined;};dojo.getObject=function(_28,_29,_2a){return d._getProp(_28.split("."),_29,_2a);};dojo.exists=function(_2b,obj){return !!d.getObject(_2b,false,obj);};dojo["eval"]=function(_2d){return d.global.eval?d.global.eval(_2d):eval(_2d);};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(_2f){var mp=this._modulePrefixes;return !!(mp[_2f]&&mp[_2f].value);},_getModulePrefix:function(_31){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_31)){return mp[_31].value;}return _31;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_33,_34,cb){var uri=((_33.charAt(0)=="/"||_33.match(/^\w+:/))?"":this.baseUrl)+_33;try{return !_34?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_34,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _39=this._getText(uri,true);if(!_39){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_39="("+_39+")";}else{_39=this._scopePrefix+_39+this._scopeSuffix;}if(d.isMoz){_39+="\r\n//@ sourceURL="+uri;}var _3a=d["eval"](_39);if(cb){cb(_3a);}return true;};dojo._loadUriAndCheck=function(uri,_3c,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&this._loadedModules[_3c]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=d._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){try{mll[x]();}catch(e){throw e;console.error("dojo.addOnLoad callback failed: "+e,e);}}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=this._unloaders;while(mll.length){(mll.pop())();}};var _42=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _46=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_46.call(obj);});}}};dojo.addOnLoad=function(obj,_48){_42(d._loaders,obj,_48);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};dojo.addOnUnload=function(obj,_4a){_42(d._unloaders,obj,_4a);};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(_4b){var _4c=_4b.split(".");for(var i=_4c.length;i>0;i--){var _4e=_4c.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_4e)){_4c[0]="../"+_4c[0];}else{var _4f=this._getModulePrefix(_4e);if(_4f!=_4e){_4c.splice(0,i,_4f);break;}}}return _4c;};dojo._global_omit_module_check=false;dojo._loadModule=dojo.require=function(_50,_51){_51=this._global_omit_module_check||_51;var _52=this._loadedModules[_50];if(_52){return _52;}var _53=this._getModuleSymbols(_50).join("/")+".js";var _54=(!_51)?_50:null;var ok=this._loadPath(_53,_54);if(!ok&&!_51){throw new Error("Could not load '"+_50+"'; last tried '"+_53+"'");}if(!_51&&!this._isXDomain){_52=this._loadedModules[_50];if(!_52){throw new Error("symbol '"+_50+"' is not defined after loading '"+_53+"'");}}return _52;};dojo.provide=function(_56){_56=_56+"";return (d._loadedModules[_56]=d.getObject(_56,true));};dojo.platformRequire=function(_57){var _58=_57.common||[];var _59=_58.concat(_57[d._name]||_57["default"]||[]);for(var x=0;x<_59.length;x++){var _5b=_59[x];if(_5b.constructor==Array){d._loadModule.apply(d,_5b);}else{d._loadModule(_5b);}}};dojo.requireIf=function(_5c,_5d){if(_5c===true){var _5e=[];for(var i=1;i<arguments.length;i++){_5e.push(arguments[i]);}d.require.apply(d,_5e);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_60,_61){d._modulePrefixes[_60]={name:_60,value:_61};};dojo.requireLocalization=function(_62,_63,_64,_65){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 _6c=new d._Url(_a[i]+"");var _6d=new d._Url(uri[0]+"");if(_6c.path==""&&!_6c.scheme&&!_6c.authority&&!_6c.query){if(_6c.fragment!=n){_6d.fragment=_6c.fragment;}_6c=_6d;}else{if(!_6c.scheme){_6c.scheme=_6d.scheme;if(!_6c.authority){_6c.authority=_6d.authority;if(_6c.path.charAt(0)!="/"){var _6e=_6d.path.substring(0,_6d.path.lastIndexOf("/")+1)+_6c.path;var _6f=_6e.split("/");for(var j=0;j<_6f.length;j++){if(_6f[j]=="."){if(j==_6f.length-1){_6f[j]="";}else{_6f.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_6f[0]=="")&&_6f[j]==".."&&_6f[j-1]!=".."){if(j==(_6f.length-1)){_6f.splice(j,1);_6f[j-1]="";}else{_6f.splice(j-1,2);j-=2;}}}}_6c.path=_6f.join("/");}}}}uri=[];if(_6c.scheme){uri.push(_6c.scheme,":");}if(_6c.authority){uri.push("//",_6c.authority);}uri.push(_6c.path);if(_6c.query){uri.push("?",_6c.query);}if(_6c.fragment){uri.push("#",_6c.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(_72,url){var loc=d._getModuleSymbols(_72).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _75=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_75==-1||_75>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 _77=document.getElementsByTagName("script");var _78=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_77.length;i++){var src=_77[i].getAttribute("src");if(!src){continue;}var m=src.match(_78);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_77[i].getAttribute("djConfig");if(cfg){var _7d=eval("({ "+cfg+" })");for(var x in _7d){dojo.config[x]=_7d[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent;var dav=n.appVersion;var tv=parseFloat(dav);d.isOpera=(dua.indexOf("Opera")>=0)?tv:0;var idx=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(idx){d.isSafari=parseFloat(dav.split("Version/")[1])||((parseFloat(dav.substr(idx+7))>=419.3)?3:2)||2;}d.isAIR=(dua.indexOf("AdobeAIR")>=0)?1:0;d.isKhtml=(dav.indexOf("Konqueror")>=0||d.isSafari)?tv:0;d.isMozilla=d.isMoz=(dua.indexOf("Gecko")>=0&&!d.isKhtml)?tv:0;d.isFF=d.isIE=0;if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1])||0;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||0;}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 _85=null;var _86=null;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_85=new XMLHttpRequest();}catch(e){}}if(!_85){for(var i=0;i<3;++i){var _88=d._XMLHTTP_PROGIDS[i];try{_85=new ActiveXObject(_88);}catch(e){_86=e;}if(_85){d._XMLHTTP_PROGIDS=[_88];break;}}}if(!_85){throw new Error("XMLHTTP not available: "+_86);}return _85;};d._isDocumentOk=function(_89){var _8a=_89.status||0;return (_8a>=200&&_8a<300)||_8a==304||_8a==1223||(!_8a&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _8b=window.location+"";var _8c=document.getElementsByTagName("base");var _8d=(_8c&&_8c.length>0);d._getText=function(uri,_8f){var _90=this._xhrObj();if(!_8d&&dojo._Url){uri=(new dojo._Url(_8b,uri)).toString();}if(d.config.cacheBust){uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_90.open("GET",uri,false);try{_90.send(null);if(!d._isDocumentOk(_90)){var err=Error("Unable to load "+uri+" status:"+_90.status);err.status=_90.status;err.responseText=_90.responseText;throw err;}}catch(e){if(_8f){return null;}throw e;}return _90.responseText;};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _93=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_93!="domcontentloaded"&&_93!="load")){return;}arguments.callee.initialized=true;if("_khtmlTimer" in dojo){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};dojo._fakeLoadInit=function(){dojo._loadInit({type:"load"});};if(!dojo.config.afterOnLoad){if(document.addEventListener){if(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(/(WebKit|khtml)/i.test(navigator.userAgent)){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}}}(function(){var _w=window;var _95=function(_96,fp){var _98=_w[_96]||function(){};_w[_96]=function(){fp.apply(_w,arguments);_98.apply(_w,arguments);};};if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}var _99=true;_95("onbeforeunload",function(){_w.setTimeout(function(){_99=false;},0);});_95("onunload",function(){if(_99){dojo.unloaded();}});try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}catch(e){}}else{_95("onbeforeunload",function(){dojo.unloaded();});}})();}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _9b in mp){dojo.registerModulePath(_9b,mp[_9b]);}}})();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");}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 _9e=function(it){return it&&(typeof it=="function"||it instanceof Function);};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false;}return _9e(it);}:_9e;})();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(_a5,_a6){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_a5.prototype,arguments[i]);}return _a5;};dojo._hitchArgs=function(_a9,_aa){var pre=dojo._toArray(arguments,2);var _ac=dojo.isString(_aa);return function(){var _ad=dojo._toArray(arguments);var f=_ac?(_a9||dojo.global)[_aa]:_aa;return f&&f.apply(_a9||this,pre.concat(_ad));};};dojo.hitch=function(_af,_b0){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_b0){_b0=_af;_af=null;}if(dojo.isString(_b0)){_af=_af||dojo.global;if(!_af[_b0]){throw (["dojo.hitch: scope[\"",_b0,"\"] is null (scope=\"",_af,"\")"].join(""));}return function(){return _af[_b0].apply(_af,arguments||[]);};}return !_af?_b0:function(){return _b0.apply(_af,arguments||[]);};};dojo.delegate=dojo._delegate=function(obj,_b2){function TMP(){};TMP.prototype=obj;var tmp=new TMP();if(_b2){dojo.mixin(tmp,_b2);}return tmp;};dojo.partial=function(_b4){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo._toArray=function(obj,_b7,_b8){var arr=_b8||[];for(var x=_b7||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};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());}var r=new o.constructor();for(var i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;};dojo.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(_bf,_c0,_c1){var dd=arguments.callee,_c3;if(dojo.isArray(_c0)){_c3=_c0;_c0=_c3.shift();}if(_c3){dojo.forEach(_c3,function(m){if(!m){throw (_bf+": mixin #"+i+" is null");}_c0=dd._delegate(_c0,m);});}var _c5=(_c1||0).constructor,_c6=dd._delegate(_c0),fn;for(var i in _c1){if(dojo.isFunction(fn=_c1[i])&&!0[i]){fn.nom=i;}}dojo.extend(_c6,{declaredClass:_bf,_constructor:_c5,preamble:null},_c1||0);_c6.prototype.constructor=_c6;return dojo.setObject(_bf,_c6);};dojo.mixin(dojo.declare,{_delegate:function(_c9,_ca){var bp=(_c9||0).prototype,mp=(_ca||0).prototype;var _cd=dojo.declare._makeCtor();dojo.mixin(_cd,{superclass:bp,mixin:mp,extend:dojo.declare._extend});if(_c9){_cd.prototype=dojo._delegate(bp);}dojo.extend(_cd,dojo.declare._core,mp||0,{_constructor:null,preamble:null});_cd.prototype.constructor=_cd;_cd.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return _cd;},_extend:function(_ce){for(var i in _ce){if(dojo.isFunction(fn=_ce[i])&&!0[i]){fn.nom=i;}}dojo.extend(this,_ce);},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_d0){var c=_d0.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_d0,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,_d0);}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,_d0);}},_findMixin:function(_d9){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_d9||(m instanceof _d9.constructor)){return p;}if(m&&(m=m._findMixin(_d9))){return m;}c=p&&p.constructor;}},_findMethod:function(_dd,_de,_df,has){var p=_df,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_dd,_de,m,has))){return m;}if((f=p[_dd])&&(has==(f==_de))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_df))&&this._findMethod(_dd,_de,p,has);},inherited:function(_e5,_e6,_e7){var a=arguments;if(!dojo.isString(a[0])){_e7=_e6;_e6=_e5;_e5=_e6.callee.nom;}a=_e7||_e6;var c=_e6.callee,p=this.constructor.prototype,fn,mp;if(this[_e5]!=c||p[_e5]==c){mp=this._findMethod(_e5,c,p,true);if(!mp){throw (this.declaredClass+": inherited method \""+_e5+"\" mismatch");}p=this._findMethod(_e5,c,mp,false);}fn=p&&p[_e5];if(!fn){throw (mp.declaredClass+": inherited method \""+_e5+"\" 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);for(var i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}return r;};},add:function(_f3,_f4,_f5){_f3=_f3||dojo.global;var f=_f3[_f4];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_f3[_f4]=d;}return f._listeners.push(_f5);},remove:function(_f8,_f9,_fa){var f=(_f8||dojo.global)[_f9];if(f&&f._listeners&&_fa--){delete f._listeners[_fa];}}};dojo.connect=function(obj,_fd,_fe,_ff,_100){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,_106,_107,_108){var l=dojo._listener,h=l.add(obj,_106,dojo.hitch(_107,_108));return [obj,_106,h,l];};dojo.disconnect=function(_10b){if(_10b&&_10b[0]!==undefined){dojo._disconnect.apply(this,_10b);delete _10b[0];}};dojo._disconnect=function(obj,_10d,_10e,_10f){_10f.remove(obj,_10d,_10e);};dojo._topics={};dojo.subscribe=function(_110,_111,_112){return [_110,dojo._listener.add(dojo._topics,_110,dojo.hitch(_111,_112))];};dojo.unsubscribe=function(_113){if(_113){dojo._listener.remove(dojo._topics,_113[0],_113[1]);}};dojo.publish=function(_114,args){var f=dojo._topics[_114];if(f){f.apply(this,args||[]);}};dojo.connectPublisher=function(_117,obj,_119){var pf=function(){dojo.publish(_117,arguments);};return (_119)?dojo.connect(obj,_119,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(_11b){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_11b;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;err=new Error("Deferred Cancelled");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 _124=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_124,_124);},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 _12b=this.chain;var _12c=this.fired;var res=this.results[_12c];var self=this;var cb=null;while((_12b.length>0)&&(this.paused==0)){var f=_12b.shift()[_12c];if(!f){continue;}try{res=f(res);_12c=((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++;}}catch(err){console.debug(err);_12c=1;res=err;}}this.fired=_12c;this.results[_12c]=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,_135,_136){if(it===undefined){return "undefined";}var _137=typeof it;if(_137=="number"||_137=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}if(it.nodeType&&it.cloneNode){return "";}var _138=arguments.callee;var _139;_136=_136||"";var _13a=_135?_136+dojo.toJsonIndentStr:"";if(typeof it.__json__=="function"){_139=it.__json__();if(it!==_139){return _138(_139,_135,_13a);}}if(typeof it.json=="function"){_139=it.json();if(it!==_139){return _138(_139,_135,_13a);}}var sep=_135?" ":"";var _13c=_135?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_138(obj,_135,_13a);if(typeof val!="string"){val="undefined";}return _13c+_13a+val;});return "["+res.join(","+sep)+_13c+_136+"]";}if(_137=="function"){return null;}var _140=[];for(var key in it){var _142;if(typeof key=="number"){_142="\""+key+"\"";}else{if(typeof key=="string"){_142=dojo._escapeString(key);}else{continue;}}val=_138(it[key],_135,_13a);if(typeof val!="string"){continue;}_140.push(_13c+_13a+_142+":"+sep+val);}return "{"+_140.join(","+sep)+_13c+_136+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _143=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(_147,_148,_149,_14a){var step=1,end=_147.length||0,i=0;if(_14a){i=end-1;step=end=-1;}if(_149!=undefined){i=_149;}if((_14a&&i>end)||i<end){for(;i!=end;i+=step){if(_147[i]==_148){return i;}}}return -1;},lastIndexOf:function(_14d,_14e,_14f){return dojo.indexOf(_14d,_14e,_14f,true);},forEach:function(arr,_151,_152){if(!arr||!arr.length){return;}var _p=_143(arr,_152,_151);arr=_p[0];for(var i=0,l=_p[0].length;i<l;i++){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_156,arr,_158,_159){var _p=_143(arr,_159,_158);arr=_p[0];for(var i=0,l=arr.length;i<l;i++){var _15d=!!_p[2].call(_p[1],arr[i],i,arr);if(_156^_15d){return _15d;}}return _156;},every:function(arr,_15f,_160){return this._everyOrSome(true,arr,_15f,_160);},some:function(arr,_162,_163){return this._everyOrSome(false,arr,_162,_163);},map:function(arr,_165,_166){var _p=_143(arr,_166,_165);arr=_p[0];var _168=(arguments[3]?(new arguments[3]()):[]);for(var i=0;i<arr.length;++i){_168.push(_p[2].call(_p[1],arr[i],i,arr));}return _168;},filter:function(arr,_16b,_16c){var _p=_143(arr,_16c,_16b);arr=_p[0];var _16e=[];for(var i=0;i<arr.length;i++){if(_p[2].call(_p[1],arr[i],i,arr)){_16e.push(arr[i]);}}return _16e;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");dojo.Color=function(_170){if(_170){this.setColor(_170);}};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(_176){var d=dojo;if(d.isString(_176)){d.colorFromString(_176,this);}else{if(d.isArray(_176)){d.colorFromArray(_176,this);}else{this._set(_176.r,_176.g,_176.b,_176.a);if(!(_176 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=dojo.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(_17d){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_17d?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_180,end,_182,obj){var d=dojo,t=obj||new dojo.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_180[x]+(end[x]-_180[x])*_182;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_187,obj){var m=_187.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_18a,obj){var d=dojo,t=obj||new d.Color(),bits=(_18a.length==4)?4:8,mask=(1<<bits)-1;_18a=Number("0x"+_18a.substr(1));if(isNaN(_18a)){return null;}d.forEach(["b","g","r"],function(x){var c=_18a&mask;_18a>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new dojo.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=dojo.Color.named[str];return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.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._gearsObject=function(){var _198;var _199;var _19a=dojo.getObject("google.gears");if(_19a){return _19a;}if(typeof GearsFactory!="undefined"){_198=new GearsFactory();}else{if(dojo.isIE){try{_198=new ActiveXObject("Gears.Factory");}catch(e){}}else{if(navigator.mimeTypes["application/x-googlegears"]){_198=document.createElement("object");_198.setAttribute("type","application/x-googlegears");_198.setAttribute("width",0);_198.setAttribute("height",0);_198.style.display="none";document.documentElement.appendChild(_198);}}}if(!_198){return null;}dojo.setObject("google.gears.factory",_198);return dojo.getObject("google.gears");};dojo.isGears=(!!dojo._gearsObject())||0;dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_19b,_19c){dojo.global=_19b;dojo.doc=_19c;};dojo._fireCallback=function(_19d,_19e,_19f){if(_19e&&dojo.isString(_19d)){_19d=_19e[_19d];}return _19d.apply(_19e,_19f||[]);};dojo.withGlobal=function(_1a0,_1a1,_1a2,_1a3){var rval;var _1a5=dojo.global;var _1a6=dojo.doc;try{dojo.setContext(_1a0,_1a0.document);rval=dojo._fireCallback(_1a1,_1a2,_1a3);}finally{dojo.setContext(_1a5,_1a6);}return rval;};dojo.withDoc=function(_1a7,_1a8,_1a9,_1aa){var rval;var _1ac=dojo.doc;try{dojo.doc=_1a7;rval=dojo._fireCallback(_1a8,_1a9,_1aa);}finally{dojo.doc=_1ac;}return rval;};}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 _1b1=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_1b5,_1b6){if(node){node.removeEventListener(del._normalizeEventName(_1b5),_1b6,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,_1bc){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";}});dojo.fixEvent=function(evt,_1bf){return del._fixEvent(evt,_1bf);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1c1=dojo._listener;dojo._connect=function(obj,_1c3,_1c4,_1c5,_1c6){var _1c7=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=!_1c7?0:(!_1c6?1:2),l=[dojo._listener,del,_1c1][lid];var h=l.add(obj,_1c3,dojo.hitch(_1c4,_1c5));return [obj,_1c3,h,lid];};dojo._disconnect=function(obj,_1cc,_1cd,_1ce){([dojo._listener,del,_1c1][_1ce]).remove(obj,_1cc,_1cd);};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 _1cf=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;if(!dojo.config._allow_leaks){_1c1=iel=dojo._ie_listener={handlers:[],add:function(_1d3,_1d4,_1d5){_1d3=_1d3||dojo.global;var f=_1d3[_1d4];if(!f||!f._listeners){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d._listeners=[];f=_1d3[_1d4]=d;}return f._listeners.push(ieh.push(_1d5)-1);},remove:function(_1d9,_1da,_1db){var f=(_1d9||dojo.global)[_1da],l=f&&f._listeners;if(f&&l&&_1db--){delete ieh[l[_1db]];delete l[_1db];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1df,fp){if(!node){return;}_1df=del._normalizeEventName(_1df);if(_1df=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd._listeners||!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,_1df,del._fixCallback(fp));},remove:function(node,_1e4,_1e5){_1e4=del._normalizeEventName(_1e4);iel.remove(node,_1e4,_1e5);if(_1e4=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_1e7){return _1e7.slice(0,2)!="on"?"on"+_1e7:_1e7;},_nop:function(){},_fixEvent:function(evt,_1e9){if(!evt){var w=_1e9&&(_1e9.ownerDocument||_1e9.document||_1e9).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1e9||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1ed=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1ee=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1ed.scrollLeft||0)-_1ee.x;evt.pageY=evt.clientY+(_1ed.scrollTop||0)-_1ee.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;},_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},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp._listeners){return;}var k=evt.keyCode;var _1f4=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1f4||evt.ctrlKey){var c=_1f4?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;_1cf(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1cf(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,_1f9){var faux=dojo.mixin({},evt,_1f9);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_1fc){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.isSafari){dojo.mixin(del,{_fixEvent:function(evt,_1ff){switch(evt.type){case "keypress":var c=evt.charCode,s=evt.shiftKey,k=evt.keyCode;k=k||_203[evt.keyIdentifier]||0;if(evt.keyIdentifier=="Enter"){c=0;}else{if((evt.ctrlKey)&&(c>0)&&(c<27)){c+=96;}else{if(c==dojo.keys.SHIFT_TAB){c=dojo.keys.TAB;s=true;}else{c=(c>=32&&c<63232?c:0);}}}return del._synthesizeEvent(evt,{charCode:c,shiftKey:s,keyCode:k});}return evt;}});dojo.mixin(dojo.keys,{SHIFT_TAB:25,UP_ARROW:63232,DOWN_ARROW:63233,LEFT_ARROW:63234,RIGHT_ARROW:63235,F1:63236,F2:63237,F3:63238,F4:63239,F5:63240,F6:63241,F7:63242,F8:63243,F9:63244,F10:63245,F11:63246,F12:63247,PAUSE:63250,DELETE:63272,HOME:63273,END:63275,PAGE_UP:63276,PAGE_DOWN:63277,INSERT:63302,PRINT_SCREEN:63248,SCROLL_LOCK:63249,NUM_LOCK:63289});var dk=dojo.keys,_203={"Up":dk.UP_ARROW,"Down":dk.DOWN_ARROW,"Left":dk.LEFT_ARROW,"Right":dk.RIGHT_ARROW,"PageUp":dk.PAGE_UP,"PageDown":dk.PAGE_DOWN};}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_206){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c._listeners,t=h[c.target];var r=t&&t.apply(_206,args);for(var i in ls){if(!(i in ap)){h[ls[i]].apply(_206,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){return te;}else{var eles=_d.all[id];if(!eles||!eles.length){return eles;}var i=0;while((te=eles[i++])){if(te.attributes.id.value==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 _21a=null;dojo.addOnUnload(function(){_21a=null;});dojo._destroyElement=function(node){node=d.byId(node);try{if(!_21a||_21a.ownerDocument!=node.ownerDocument){_21a=node.ownerDocument.createElement("div");}_21a.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_21a.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_21d){try{node=d.byId(node);_21d=d.byId(_21d);while(node){if(node===_21d){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_21f){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=_21f?"":"none";}else{if(d.isKhtml){node.style.KhtmlUserSelect=_21f?"auto":"none";}else{if(d.isIE){node.unselectable=_21f?"":"on";d.query("*",node).forEach(function(_220){_220.unselectable=_21f?"":"on";});}}}};var _221=function(node,ref){ref.parentNode.insertBefore(node,ref);return true;};var _224=function(node,ref){var pn=ref.parentNode;if(ref==pn.lastChild){pn.appendChild(node);}else{return _221(node,ref.nextSibling);}return true;};dojo.place=function(node,_229,_22a){if(!node||!_229||_22a===undefined){return false;}node=d.byId(node);_229=d.byId(_229);if(typeof _22a=="number"){var cn=_229.childNodes;if((_22a==0&&cn.length==0)||cn.length==_22a){_229.appendChild(node);return true;}if(_22a==0){return _221(node,_229.firstChild);}return _224(node,cn[_22a-1]);}switch(_22a.toLowerCase()){case "before":return _221(node,_229);case "after":return _224(node,_229);case "first":if(_229.firstChild){return _221(node,_229.firstChild);}default:_229.appendChild(node);return true;}};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.isSafari){gcs=function(node){var dv=node.ownerDocument.defaultView;var 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.currentStyle;};}else{gcs=function(node){var dv=node.ownerDocument.defaultView;return dv.getComputedStyle(node,null);};}}dojo.getComputedStyle=gcs;if(!d.isIE){dojo._toPixelValue=function(_234,_235){return parseFloat(_235)||0;};}else{dojo._toPixelValue=function(_236,_237){if(!_237){return 0;}if(_237=="medium"){return 4;}if(_237.slice&&(_237.slice(-2)=="px")){return parseFloat(_237);}with(_236){var _238=style.left;var _239=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_237;_237=style.pixelLeft;}catch(e){_237=0;}style.left=_238;runtimeStyle.left=_239;}return _237;};}var px=d._toPixelValue;dojo._getOpacity=d.isIE?function(node){try{return node.filters.alpha.opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_23e){if(_23e==1){var _23f=/FILTER:[^;]*;?/i;node.style.cssText=node.style.cssText.replace(_23f,"");if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.cssText=i.style.cssText.replace(_23f,"");});}}else{var o="Alpha(Opacity="+_23e*100+")";node.style.filter=o;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.filter=o;});}return _23e;}:function(node,_244){return node.style.opacity=_244;};var _245={left:true,top:true};var _246=/margin|padding|width|height|max|min|offset/;var _247=function(node,type,_24a){type=type.toLowerCase();if(d.isIE&&_24a=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(!(type in _245)){_245[type]=_246.test(type);}return _245[type]?px(node,_24a):_24a;};var _24b=d.isIE?"styleFloat":"cssFloat";var _24c={"cssFloat":_24b,"styleFloat":_24b,"float":_24b};dojo.style=function(node,_24e,_24f){var n=d.byId(node),args=arguments.length,op=(_24e=="opacity");_24e=_24c[_24e]||_24e;if(args==3){return op?d._setOpacity(n,_24f):n.style[_24e]=_24f;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&!d.isString(_24e)){for(var x in _24e){d.style(node,x,_24e[x]);}return s;}return (args==1)?s:_247(n,_24e,s[_24e]);};dojo._getPadExtents=function(n,_256){var s=_256||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,_25b){var ne="none",s=_25b||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,_261){var s=_261||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,_266){var s=_266||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isSafari&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_26d){var s=_26d||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{var p=node.parentNode;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){var p=node.parentNode;if(p){var 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,_278){var s=_278||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,_27f){var s=_27f||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._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||n=="BUTTON";};dojo._setContentSize=function(node,_28d,_28e,_28f){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_28f);if(_28d>=0){_28d+=pb.w;}if(_28e>=0){_28e+=pb.h;}}d._setBox(node,NaN,NaN,_28d,_28e);};dojo._setMarginBox=function(node,_292,_293,_294,_295,_296){var s=_296||gcs(node);var bb=d._usesBorderBox(node),pb=bb?_29a:d._getPadBorderExtents(node,s),mb=d._getMarginExtents(node,s);if(_294>=0){_294=Math.max(_294-pb.w-mb.w,0);}if(_295>=0){_295=Math.max(_295-pb.h-mb.h,0);}d._setBox(node,_292,_293,_294,_295);};var _29a={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=dojo.byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _2a6=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_2aa=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_2aa+=val-0;if(node==_b){break;}}node=node.parentNode;}return _2aa;};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=gcs(d.body()).direction=="ltr":d._bodyLtr;};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;return (d.isIE>=7)?{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top}:{x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};};dojo._fixIeBiDiScrollLeft=function(_2b0){var dd=d.doc;if(d.isIE&&!dojo._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return _2b0+de.clientWidth-de.scrollWidth;}return _2b0;};dojo._abs=function(node,_2b4){var _2b5=node.ownerDocument;var ret={x:0,y:0};var db=d.body();if(d.isIE||(d.isFF>=3)){var _2b8=node.getBoundingClientRect();var _2b9=(d.isIE)?d._getIeDocumentElementOffset():{x:0,y:0};ret.x=_2b8.left-_2b9.x;ret.y=_2b8.top-_2b9.y;}else{if(_2b5["getBoxObjectFor"]){var bo=_2b5.getBoxObjectFor(node),b=d._getBorderExtents(node);ret.x=bo.x-b.l-_2a6(node,"scrollLeft");ret.y=bo.y-b.t-_2a6(node,"scrollTop");}else{if(node["offsetParent"]){var _2bc;if(d.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){_2bc=db;}else{_2bc=db.parentNode;}if(node.parentNode!=db){var nd=node;if(d.isOpera){nd=db;}ret.x-=_2a6(nd,"scrollLeft");ret.y-=_2a6(nd,"scrollTop");}var _2be=node;do{var n=_2be.offsetLeft;if(!d.isOpera||n>0){ret.x+=isNaN(n)?0:n;}var t=_2be.offsetTop;ret.y+=isNaN(t)?0:t;if(d.isSafari&&_2be!=node){var cs=gcs(_2be);ret.x+=px(_2be,cs.borderLeftWidth);ret.y+=px(_2be,cs.borderTopWidth);}_2be=_2be.offsetParent;}while((_2be!=_2bc)&&_2be);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_2b4){var _2c2=d._docScroll();ret.y+=_2c2.y;ret.x+=_2c2.x;}return ret;};dojo.coords=function(node,_2c4){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,_2c4);mb.x=abs.x;mb.y=abs.y;return mb;};var _2c9=function(name){switch(name.toLowerCase()){case "tabindex":return (d.isIE&&d.isIE<8)?"tabIndex":"tabindex";default:return name;}};var _2cb={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType"};dojo.hasAttr=function(node,name){var attr=d.byId(node).getAttributeNode(_2c9(name));return attr?attr.specified:false;};var _2cf={};var _ctr=0;var _2d1=dojo._scopeName+"attrid";dojo.attr=function(node,name,_2d4){var args=arguments.length;if(args==2&&!d.isString(name)){for(var x in name){d.attr(node,x,name[x]);}return;}node=d.byId(node);name=_2c9(name);if(args==3){if(d.isFunction(_2d4)){var _2d7=d.attr(node,_2d1);if(!_2d7){_2d7=_ctr++;d.attr(node,_2d1,_2d7);}if(!_2cf[_2d7]){_2cf[_2d7]={};}var h=_2cf[_2d7][name];if(h){d.disconnect(h);}else{try{delete node[name];}catch(e){}}_2cf[_2d7][name]=d.connect(node,name,_2d4);}else{if(typeof _2d4=="boolean"){node[name]=_2d4;}else{node.setAttribute(name,_2d4);}}return;}else{var prop=_2cb[name.toLowerCase()];if(prop){return node[prop];}else{var _2d4=node[name];return (typeof _2d4=="boolean"||typeof _2d4=="function")?_2d4:(d.hasAttr(node,name)?node.getAttribute(name):null);}}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_2c9(name));};})();dojo.hasClass=function(node,_2dd){return ((" "+dojo.byId(node).className+" ").indexOf(" "+_2dd+" ")>=0);};dojo.addClass=function(node,_2df){node=dojo.byId(node);var cls=node.className;if((" "+cls+" ").indexOf(" "+_2df+" ")<0){node.className=cls+(cls?" ":"")+_2df;}};dojo.removeClass=function(node,_2e2){node=dojo.byId(node);var t=dojo.trim((" "+node.className+" ").replace(" "+_2e2+" "," "));if(node.className!=t){node.className=t;}};dojo.toggleClass=function(node,_2e5,_2e6){if(_2e6===undefined){_2e6=!dojo.hasClass(node,_2e5);}dojo[_2e6?"addClass":"removeClass"](node,_2e5);};}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var tnl=function(arr){arr.constructor=dojo.NodeList;dojo._mixin(arr,dojo.NodeList.prototype);return arr;};var _2ea=function(func,_2ec){return function(){var _a=arguments;var aa=d._toArray(_a,0,[null]);var s=this.map(function(i){aa[0]=i;return d[func].apply(d,aa);});return (_2ec||((_a.length>1)||!d.isString(_a[0])))?this:s;};};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};dojo.NodeList._wrap=tnl;dojo.extend(dojo.NodeList,{slice:function(){var a=dojo._toArray(arguments);return tnl(a.slice.apply(this,a));},splice:function(){var a=dojo._toArray(arguments);return tnl(a.splice.apply(this,a));},concat:function(){var a=dojo._toArray(arguments,0,[this]);return tnl(a.concat.apply([],a));},indexOf:function(_2f4,_2f5){return d.indexOf(this,_2f4,_2f5);},lastIndexOf:function(){return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));},every:function(_2f6,_2f7){return d.every(this,_2f6,_2f7);},some:function(_2f8,_2f9){return d.some(this,_2f8,_2f9);},map:function(func,obj){return d.map(this,func,obj,d.NodeList);},forEach:function(_2fc,_2fd){d.forEach(this,_2fc,_2fd);return this;},coords:function(){return d.map(this,d.coords);},attr:_2ea("attr"),style:_2ea("style"),addClass:_2ea("addClass",true),removeClass:_2ea("removeClass",true),toggleClass:_2ea("toggleClass",true),connect:_2ea("connect",true),place:function(_2fe,_2ff){var item=d.query(_2fe)[0];return this.forEach(function(i){d.place(i,item,(_2ff||"last"));});},orphan:function(_302){var _303=_302?d._filterQueryResult(this,_302):this;_303.forEach(function(item){if(item.parentNode){item.parentNode.removeChild(item);}});return _303;},adopt:function(_305,_306){var item=this[0];return d.query(_305).forEach(function(ai){d.place(ai,item,_306||"last");});},query:function(_309){if(!_309){return this;}var ret=d.NodeList();this.forEach(function(item){d.query(_309,item).forEach(function(_30c){if(_30c!==undefined){ret.push(_30c);}});});return ret;},filter:function(_30d){var _30e=this;var _a=arguments;var r=d.NodeList();var rp=function(t){if(t!==undefined){r.push(t);}};if(d.isString(_30d)){_30e=d._filterQueryResult(this,_a[0]);if(_a.length==1){return _30e;}_a.shift();}d.forEach(d.filter(_30e,_a[0],_a[1]),rp);return r;},addContent:function(_313,_314){var ta=d.doc.createElement("span");if(d.isString(_313)){ta.innerHTML=_313;}else{ta.appendChild(_313);}if(_314===undefined){_314="last";}var ct=(_314=="first"||_314=="after")?"lastChild":"firstChild";this.forEach(function(item){var tn=ta.cloneNode(true);while(tn[ct]){d.place(tn[ct],item,_314);}});return this;},empty:function(){return this.forEach("item.innerHTML='';");},instantiate:function(_319,_31a){var c=d.isFunction(_319)?_319:d.getObject(_319);return this.forEach(function(i){new c(_31a||{},i);});}});d.forEach(["blur","focus","click","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup"],function(evt){var _oe="on"+evt;dojo.NodeList.prototype[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;dojo.provide("dojo._base.query");(function(){var d=dojo;var _322=dojo.isIE?"children":"childNodes";var _323=false;var _324=function(_325){if(">~+".indexOf(_325.charAt(_325.length-1))>=0){_325+=" *";}_325+=" ";var ts=function(s,e){return d.trim(_325.slice(s,e));};var _329=[];var _32a=-1;var _32b=-1;var _32c=-1;var _32d=-1;var _32e=-1;var inId=-1;var _330=-1;var lc="";var cc="";var _333;var x=0;var ql=_325.length;var _336=null;var _cp=null;var _338=function(){if(_330>=0){var tv=(_330==x)?null:ts(_330,x).toLowerCase();_336[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;_330=-1;}};var _33a=function(){if(inId>=0){_336.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _33b=function(){if(_32e>=0){_336.classes.push(ts(_32e+1,x).replace(/\\/g,""));_32e=-1;}};var _33c=function(){_33a();_338();_33b();};for(;lc=cc,cc=_325.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_336){_333=x;_336={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null};_330=x;}if(_32a>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_32a+1,x);}else{_cp.matchFor=ts((_32c||_32a+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.substring(1,cmf.length-1);}}_336.attrs.push(_cp);_cp=null;_32a=_32c=-1;}else{if(cc=="="){var _33e=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_33e+cc;_cp.attr=ts(_32a+1,x-_33e.length);_32c=x+1;}}}else{if(_32b>=0){if(cc==")"){if(_32d>=0){_cp.value=ts(_32b+1,x);}_32d=_32b=-1;}}else{if(cc=="#"){_33c();inId=x+1;}else{if(cc=="."){_33c();_32e=x;}else{if(cc==":"){_33c();_32d=x;}else{if(cc=="["){_33c();_32a=x;_cp={};}else{if(cc=="("){if(_32d>=0){_cp={name:ts(_32d+1,x),value:null};_336.pseudos.push(_cp);}_32b=x;}else{if(cc==" "&&lc!=cc){_33c();if(_32d>=0){_336.pseudos.push({name:ts(_32d+1,x)});}_336.hasLoops=(_336.pseudos.length||_336.attrs.length||_336.classes.length);_336.query=ts(_333,x);_336.tag=(_336["oper"])?null:(_336.tag||"*");_329.push(_336);_336=null;}}}}}}}}}return _329;};var _33f={"*=":function(attr,_341){return "[contains(@"+attr+", '"+_341+"')]";},"^=":function(attr,_343){return "[starts-with(@"+attr+", '"+_343+"')]";},"$=":function(attr,_345){return "[substring(@"+attr+", string-length(@"+attr+")-"+(_345.length-1)+")='"+_345+"']";},"~=":function(attr,_347){return "[contains(concat(' ',@"+attr+",' '), ' "+_347+" ')]";},"|=":function(attr,_349){return "[contains(concat(' ',@"+attr+",' '), ' "+_349+"-')]";},"=":function(attr,_34b){return "[@"+attr+"='"+_34b+"']";}};var _34c=function(_34d,_34e,_34f,_350){d.forEach(_34e.attrs,function(attr){var _352;if(attr.type&&_34d[attr.type]){_352=_34d[attr.type](attr.attr,attr.matchFor);}else{if(attr.attr.length){_352=_34f(attr.attr);}}if(_352){_350(_352);}});};var _353=function(_354){var _355=".";var _356=_324(d.trim(_354));while(_356.length){var tqp=_356.shift();var _358;var _359="";if(tqp.oper==">"){_358="/";tqp=_356.shift();}else{if(tqp.oper=="~"){_358="/following-sibling::";tqp=_356.shift();}else{if(tqp.oper=="+"){_358="/following-sibling::";_359="[position()=1]";tqp=_356.shift();}else{_358="//";}}}_355+=_358+tqp.tag+_359;if(tqp.id){_355+="[@id='"+tqp.id+"'][1]";}d.forEach(tqp.classes,function(cn){var cnl=cn.length;var _35c=" ";if(cn.charAt(cnl-1)=="*"){_35c="";cn=cn.substr(0,cnl-1);}_355+="[contains(concat(' ',@class,' '), ' "+cn+_35c+"')]";});_34c(_33f,tqp,function(_35d){return "[@"+_35d+"]";},function(_35e){_355+=_35e;});}return _355;};var _35f={};var _360=function(path){if(_35f[path]){return _35f[path];}var doc=d.doc;var _363=_353(path);var tf=function(_365){var ret=[];var _367;try{_367=doc.evaluate(_363,_365,null,XPathResult.ANY_TYPE,null);}catch(e){console.debug("failure in exprssion:",_363,"under:",_365);console.debug(e);}var _368=_367.iterateNext();while(_368){ret.push(_368);_368=_367.iterateNext();}return ret;};return _35f[path]=tf;};var _369={};var _36a={};var _36b=function(_36c,_36d){if(!_36c){return _36d;}if(!_36d){return _36c;}return function(){return _36c.apply(window,arguments)&&_36d.apply(window,arguments);};};var _36e=function(root){var ret=[];var te,x=0,tret=root[_322];while(te=tret[x++]){if(te.nodeType==1){ret.push(te);}}return ret;};var _374=function(root,_376){var ret=[];var te=root;while(te=te.nextSibling){if(te.nodeType==1){ret.push(te);if(_376){break;}}}return ret;};var _379=function(_37a,_37b,_37c,idx){var nidx=idx+1;var _37f=(_37b.length==nidx);var tqp=_37b[idx];if(tqp.oper){var ecn=(tqp.oper==">")?_36e(_37a):_374(_37a,(tqp.oper=="+"));if(!ecn||!ecn.length){return;}nidx++;_37f=(_37b.length==nidx);var tf=_383(_37b[idx+1]);for(var x=0,ecnl=ecn.length,te;x<ecnl,te=ecn[x];x++){if(tf(te)){if(_37f){_37c.push(te);}else{_379(te,_37b,_37c,nidx);}}}}var _387=_388(tqp)(_37a);if(_37f){while(_387.length){_37c.push(_387.shift());}}else{while(_387.length){_379(_387.shift(),_37b,_37c,nidx);}}};var _389=function(_38a,_38b){var ret=[];var x=_38a.length-1,te;while(te=_38a[x--]){_379(te,_38b,ret,0);}return ret;};var _383=function(q){if(_369[q.query]){return _369[q.query];}var ff=null;if(q.tag){if(q.tag=="*"){ff=_36b(ff,function(elem){return (elem.nodeType==1);});}else{ff=_36b(ff,function(elem){return ((elem.nodeType==1)&&(q.tag==elem.tagName.toLowerCase()));});}}if(q.id){ff=_36b(ff,function(elem){return ((elem.nodeType==1)&&(elem.id==q.id));});}if(q.hasLoops){ff=_36b(ff,_394(q));}return _369[q.query]=ff;};var _395=function(node){var pn=node.parentNode;var pnc=pn.childNodes;var nidx=-1;var _39a=pn.firstChild;if(!_39a){return nidx;}var ci=node["__cachedIndex"];var cl=pn["__cachedLength"];if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){pn["__cachedLength"]=pnc.length;var idx=1;do{if(_39a===node){nidx=idx;}if(_39a.nodeType==1){_39a["__cachedIndex"]=idx;idx++;}_39a=_39a.nextSibling;}while(_39a);}else{nidx=ci;}return nidx;};var _39e=0;var _39f="";var _3a0=function(elem,attr){if(attr=="class"){return elem.className||_39f;}if(attr=="for"){return elem.htmlFor||_39f;}return elem.getAttribute(attr,2)||_39f;};var _3a3={"*=":function(attr,_3a5){return function(elem){return (_3a0(elem,attr).indexOf(_3a5)>=0);};},"^=":function(attr,_3a8){return function(elem){return (_3a0(elem,attr).indexOf(_3a8)==0);};},"$=":function(attr,_3ab){var tval=" "+_3ab;return function(elem){var ea=" "+_3a0(elem,attr);return (ea.lastIndexOf(_3ab)==(ea.length-_3ab.length));};},"~=":function(attr,_3b0){var tval=" "+_3b0+" ";return function(elem){var ea=" "+_3a0(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_3b5){var _3b6=" "+_3b5+"-";return function(elem){var ea=" "+(elem.getAttribute(attr,2)||"");return ((ea==_3b5)||(ea.indexOf(_3b6)==0));};},"=":function(attr,_3ba){return function(elem){return (_3a0(elem,attr)==_3ba);};}};var _3bc={"first-child":function(name,_3be){return function(elem){if(elem.nodeType!=1){return false;}var fc=elem.previousSibling;while(fc&&(fc.nodeType!=1)){fc=fc.previousSibling;}return (!fc);};},"last-child":function(name,_3c2){return function(elem){if(elem.nodeType!=1){return false;}var nc=elem.nextSibling;while(nc&&(nc.nodeType!=1)){nc=nc.nextSibling;}return (!nc);};},"empty":function(name,_3c6){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,_3cd){return function(elem){return (elem.innerHTML.indexOf(_3cd)>=0);};},"not":function(name,_3d0){var ntf=_383(_324(_3d0)[0]);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_3d4){var pi=parseInt;if(_3d4=="odd"){return function(elem){return (((_395(elem))%2)==1);};}else{if((_3d4=="2n")||(_3d4=="even")){return function(elem){return ((_395(elem)%2)==0);};}else{if(_3d4.indexOf("0n+")==0){var _3d8=pi(_3d4.substr(3));return function(elem){return (elem.parentNode[_322][_3d8-1]===elem);};}else{if((_3d4.indexOf("n+")>0)&&(_3d4.length>3)){var _3da=_3d4.split("n+",2);var pred=pi(_3da[0]);var idx=pi(_3da[1]);return function(elem){return ((_395(elem)%pred)==idx);};}else{if(_3d4.indexOf("n")==-1){var _3d8=pi(_3d4);return function(elem){return (_395(elem)==_3d8);};}}}}}}};var _3df=(d.isIE)?function(cond){var clc=cond.toLowerCase();return function(elem){return elem[cond]||elem[clc];};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _394=function(_3e5){var _3e6=(_36a[_3e5.query]||_369[_3e5.query]);if(_3e6){return _3e6;}var ff=null;if(_3e5.id){if(_3e5.tag!="*"){ff=_36b(ff,function(elem){return (elem.tagName.toLowerCase()==_3e5.tag);});}}d.forEach(_3e5.classes,function(_3e9,idx,arr){var _3ec=_3e9.charAt(_3e9.length-1)=="*";if(_3ec){_3e9=_3e9.substr(0,_3e9.length-1);}var re=new RegExp("(?:^|\\s)"+_3e9+(_3ec?".*":"")+"(?:\\s|$)");ff=_36b(ff,function(elem){return re.test(elem.className);});ff.count=idx;});d.forEach(_3e5.pseudos,function(_3ef){if(_3bc[_3ef.name]){ff=_36b(ff,_3bc[_3ef.name](_3ef.name,_3ef.value));}});_34c(_3a3,_3e5,_3df,function(_3f0){ff=_36b(ff,_3f0);});if(!ff){ff=function(){return true;};}return _36a[_3e5.query]=ff;};var _3f1={};var _388=function(_3f2,root){var fHit=_3f1[_3f2.query];if(fHit){return fHit;}if(_3f2.id&&!_3f2.hasLoops&&!_3f2.tag){return _3f1[_3f2.query]=function(root){return [d.byId(_3f2.id)];};}var _3f6=_394(_3f2);var _3f7;if(_3f2.tag&&_3f2.id&&!_3f2.hasLoops){_3f7=function(root){var te=d.byId(_3f2.id);if(_3f6(te)){return [te];}};}else{var tret;if(!_3f2.hasLoops){_3f7=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f2.tag);while(te=tret[x++]){ret.push(te);}return ret;};}else{_3f7=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f2.tag);while(te=tret[x++]){if(_3f6(te)){ret.push(te);}}return ret;};}}return _3f1[_3f2.query]=_3f7;};var _403={};var _404={"*":d.isIE?function(root){return root.all;}:function(root){return root.getElementsByTagName("*");},"~":_374,"+":function(root){return _374(root,true);},">":_36e};var _408=function(_409){var _40a=_324(d.trim(_409));if(_40a.length==1){var tt=_388(_40a[0]);tt.nozip=true;return tt;}var sqf=function(root){var _40e=_40a.slice(0);var _40f;if(_40e[0].oper==">"){_40f=[root];}else{_40f=_388(_40e.shift())(root);}return _389(_40f,_40e);};return sqf;};var _410=((document["evaluate"]&&!d.isSafari)?function(_411){var _412=_411.split(" ");if((document["evaluate"])&&(_411.indexOf(":")==-1)&&(_411.indexOf("+")==-1)){if(((_412.length>2)&&(_411.indexOf(">")==-1))||(_412.length>3)||(_411.indexOf("[")>=0)||((1==_412.length)&&(0<=_411.indexOf(".")))){return _360(_411);}}return _408(_411);}:_408);var _413=function(_414){var qcz=_414.charAt(0);if(d.doc["querySelectorAll"]&&((!d.isSafari)||(d.isSafari>3.1))&&(">+~".indexOf(qcz)==-1)){return function(root){var r=root.querySelectorAll(_414);r.nozip=true;return r;};}if(_404[_414]){return _404[_414];}if(0>_414.indexOf(",")){return _404[_414]=_410(_414);}else{var _418=_414.split(/\s*,\s*/);var tf=function(root){var _41b=0;var ret=[];var tp;while(tp=_418[_41b++]){ret=ret.concat(_410(tp,tp.indexOf(" "))(root));}return ret;};return _404[_414]=tf;}};var _41e=0;var _zip=function(arr){if(arr&&arr.nozip){return d.NodeList._wrap(arr);}var ret=new d.NodeList();if(!arr){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_41e++;arr[0]["_zipIdx"]=_41e;for(var x=1,te;te=arr[x];x++){if(arr[x]["_zipIdx"]!=_41e){ret.push(te);}te["_zipIdx"]=_41e;}return ret;};d.query=function(_424,root){if(_424.constructor==d.NodeList){return _424;}if(!d.isString(_424)){return new d.NodeList(_424);}if(d.isString(root)){root=d.byId(root);}return _zip(_413(_424)(root||d.doc));};d.query.pseudos=_3bc;d._filterQueryResult=function(_426,_427){var tnl=new d.NodeList();var ff=(_427)?_383(_324(_427)[0]):function(){return true;};for(var x=0,te;te=_426[x];x++){if(ff(te)){tnl.push(te);}}return tnl;};})();}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function setValue(obj,name,_42f){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_42f];}else{if(_d.isArray(val)){val.push(_42f);}else{obj[name]=_42f;}}};dojo.formToObject=function(_431){var ret={};var iq="input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";_d.query(iq,_431).filter(function(node){return !node.disabled&&node.name;}).forEach(function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(type=="radio"||type=="checkbox"){if(item.checked){setValue(ret,_in,item.value);}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){setValue(ret,_in,opt.value);}});}else{setValue(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 _43b=[];var _43c={};for(var name in map){var _43e=map[name];if(_43e!=_43c[name]){var _43f=enc(name)+"=";if(_d.isArray(_43e)){for(var i=0;i<_43e.length;i++){_43b.push(_43f+enc(_43e[i]));}}else{_43b.push(_43f+enc(_43e));}}}return _43b.join("&");};dojo.formToQuery=function(_441){return _d.objectToQuery(_d.formToObject(_441));};dojo.formToJson=function(_442,_443){return _d.toJson(_d.formToObject(_442),_443);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _449=item.split("=");var name=dec(_449.shift());var val=dec(_449.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){if(!dojo.config.usePlainJson){console.warn("Consider using mimetype:text/json-comment-filtered"+" to avoid potential security issues with JSON endpoints"+" (use djConfig.usePlainJson=true to turn off this message)");}return (xhr.status==204)?undefined:_d.fromJson(xhr.responseText);},"json-comment-filtered":function(xhr){var _44f=xhr.responseText;var _450=_44f.indexOf("/*");var _451=_44f.lastIndexOf("*/");if(_450==-1||_451==-1){throw new Error("JSON was not comment filtered");}return (xhr.status==204)?undefined:_d.fromJson(_44f.substring(_450+2,_451));},"javascript":function(xhr){return _d.eval(xhr.responseText);},"xml":function(xhr){var _454=xhr.responseXML;if(_d.isIE&&(!_454||window.location.protocol=="file:")){_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(_455){try{var dom=new ActiveXObject(_455+".XMLDOM");dom.async=false;dom.loadXML(xhr.responseText);_454=dom;}catch(e){}});}return _454;}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _458=_d._contentHandlers;try{return _458["json-comment-filtered"](xhr);}catch(e){return _458["json"](xhr);}};dojo._ioSetArgs=function(args,_45a,_45b,_45c){var _45d={args:args,url:args.url};var _45e=null;if(args.form){var form=_d.byId(args.form);var _460=form.getAttributeNode("action");_45d.url=_45d.url||(_460?_460.value:null);_45e=_d.formToObject(form);}var _461=[{}];if(_45e){_461.push(_45e);}if(args.content){_461.push(args.content);}if(args.preventCache){_461.push({"dojo.preventCache":new Date().valueOf()});}_45d.query=_d.objectToQuery(_d.mixin.apply(null,_461));_45d.handleAs=args.handleAs||"text";var d=new _d.Deferred(_45a);d.addCallbacks(_45b,function(_463){return _45c(_463,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_465){return ld.call(args,_465,_45d);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_467){return err.call(args,_467,_45d);});}var _468=args.handle;if(_468&&_d.isFunction(_468)){d.addBoth(function(_469){return _468.call(args,_469,_45d);});}d.ioArgs=_45d;return d;};var _46a=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=typeof xhr.abort;if(_at=="function"||_at=="unknown"){xhr.abort();}var err=new Error("xhr cancelled");err.dojoType="cancel";return err;};var _46f=function(dfd){return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);};var _471=function(_472,dfd){console.debug(_472);return _472;};var _474=function(args){var dfd=_d._ioSetArgs(args,_46a,_46f,_471);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);return dfd;};var _477=null;var _478=[];var _479=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_478.length&&(tif=_478[i]);i++){var dfd=tif.dfd;try{if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_478.splice(i--,1);}else{if(tif.ioCheck(dfd)){_478.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_478.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}}catch(e){console.debug(e);dfd.errback(new Error("_watchInFlightError!"));}}}if(!_478.length){clearInterval(_477);_477=null;return;}};dojo._ioCancelAll=function(){try{_d.forEach(_478,function(i){i.dfd.cancel();});}catch(e){}};if(_d.isIE){_d.addOnUnload(_d._ioCancelAll);}_d._ioWatch=function(dfd,_481,_482,_483){if(dfd.ioArgs.args.timeout){dfd.startTime=(new Date()).getTime();}_478.push({dfd:dfd,validCheck:_481,ioCheck:_482,resHandle:_483});if(!_477){_477=setInterval(_479,50);}_479();};var _484="application/x-www-form-urlencoded";var _485=function(dfd){return dfd.ioArgs.xhr.readyState;};var _487=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _489=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);}};var _48d=function(type,dfd){var _490=dfd.ioArgs;var args=_490.args;var xhr=_490.xhr;xhr.open(type,_490.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||_484);if(!args.headers||!args.headers["X-Requested-With"]){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}try{xhr.send(_490.query);}catch(e){dfd.cancel();}_d._ioWatch(dfd,_485,_487,_489);xhr=null;return dfd;};dojo._ioAddQueryToUrl=function(_494){if(_494.query.length){_494.url+=(_494.url.indexOf("?")==-1?"?":"&")+_494.query;_494.query=null;}};dojo.xhr=function(_495,args,_497){var dfd=_474(args);if(!_497){_d._ioAddQueryToUrl(dfd.ioArgs);}return _48d(_495,dfd);};dojo.xhrGet=function(args){return _d.xhr("GET",args);};dojo.xhrPost=function(args){return _d.xhr("POST",args,true);};dojo.rawXhrPost=function(args){var dfd=_474(args);dfd.ioArgs.query=args.postData;return _48d("POST",dfd);};dojo.xhrPut=function(args){return _d.xhr("PUT",args,true);};dojo.rawXhrPut=function(args){var dfd=_474(args);var _4a0=dfd.ioArgs;if(args.putData){_4a0.query=args.putData;args.putData=null;}return _48d("PUT",dfd);};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;dojo._Line=function(_4a3,end){this.start=_4a3;this.end=end;this.getValue=function(n){return ((this.end-this.start)*n)+this.start;};};d.declare("dojo._Animation",null,{constructor:function(args){d.mixin(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){try{if(this[evt]){this[evt].apply(this,args||[]);}}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}return this;},play:function(_4a9,_4aa){var _t=this;if(_4aa){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0;}else{if(_t._active&&!_t._paused){return _t;}}_t._fire("beforeBegin");var de=_4a9||_t.delay;var _p=dojo.hitch(_t,"_play",_4aa);if(de>0){setTimeout(_p,de);return _t;}_p();return _t;},_play:function(_4ae){var _t=this;_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 _4b0=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t._fire("onBegin",[_4b0]);}_t._fire("onPlay",[_4b0]);_t._cycle();return _t;},pause:function(){this._stopTimer();if(!this._active){return this;}this._paused=true;this._fire("onPause",[this.curve.getValue(this._percent)]);return this;},gotoPercent:function(_4b1,_4b2){this._stopTimer();this._active=this._paused=true;this._percent=_4b1;if(_4b2){this.play();}return this;},stop:function(_4b3){if(!this._timer){return this;}this._stopTimer();if(_4b3){this._percent=1;}this._fire("onStop",[this.curve.getValue(this._percent)]);this._active=this._paused=false;return this;},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;}});var ctr=0;var _4b8=[];var _4b9={run:function(){}};var _4ba=null;dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(_4b9,"run",this,"_cycle");ctr++;}if(!_4ba){_4ba=setInterval(d.hitch(_4b9,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_4ba);_4ba=null;ctr=0;}};var _4bb=(d.isIE)?function(node){var ns=node.style;if(!ns.zoom.length&&d.style(node,"zoom")=="normal"){ns.zoom="1";}if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _4bf=d.mixin({properties:{}},args);var _4c0=(_4bf.properties.opacity={});_4c0.start=!("start" in _4bf)?function(){return Number(d.style(_4bf.node,"opacity"));}:_4bf.start;_4c0.end=_4bf.end;var anim=d.animateProperty(_4bf);d.connect(anim,"beforeBegin",d.partial(_4bb,_4bf.node));return anim;};dojo.fadeIn=function(args){return d._fade(d.mixin({end:1},args));};dojo.fadeOut=function(args){return d._fade(d.mixin({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _4c5=function(_4c6){this._properties=_4c6;for(var p in _4c6){var prop=_4c6[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}this.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p];var _4cd=prop.start;if(_4cd instanceof d.Color){ret[p]=d.blendColors(_4cd,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_4cd)){ret[p]=((prop.end-_4cd)*r)+_4cd+(p!="opacity"?prop.units||"px":"");}}}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]=d.mixin({},(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 _4d3=(p.toLowerCase().indexOf("color")>=0);function getStyle(node,p){var v=({height:node.offsetHeight,width:node.offsetWidth})[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?Number(v):(_4d3?v:parseFloat(v));};if(!("end" in prop)){prop.end=getStyle(this.node,p);}else{if(!("start" in prop)){prop.start=getStyle(this.node,p);}}if(_4d3){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);}}this.curve=new _4c5(pm);});d.connect(anim,"onAnimate",anim,function(_4d7){for(var s in _4d7){d.style(this.node,s,_4d7[s]);}});return anim;};dojo.anim=function(node,_4da,_4db,_4dc,_4dd,_4de){return d.animateProperty({node:node,duration:_4db||d._Animation.prototype.duration,properties:_4da,easing:_4dc,onEnd:_4dd}).play(_4de||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");if(dojo.config.require){dojo.forEach(dojo.config.require,"dojo['require'](item);");}}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_4df,_4e0,_4e1){_4e1=dojo.i18n.normalizeLocale(_4e1);var _4e2=_4e1.split("-");var _4e3=[_4df,"nls",_4e0].join(".");var _4e4=dojo._loadedModules[_4e3];if(_4e4){var _4e5;for(var i=_4e2.length;i>0;i--){var loc=_4e2.slice(0,i).join("_");if(_4e4[loc]){_4e5=_4e4[loc];break;}}if(!_4e5){_4e5=_4e4.ROOT;}if(_4e5){var _4e8=function(){};_4e8.prototype=_4e5;return new _4e8();}}throw new Error("Bundle not found: "+_4e0+" in "+_4df+" , locale="+_4e1);};dojo.i18n.normalizeLocale=function(_4e9){var _4ea=_4e9?_4e9.toLowerCase():dojo.locale;if(_4ea=="root"){_4ea="ROOT";}return _4ea;};dojo.i18n._requireLocalization=function(_4eb,_4ec,_4ed,_4ee){var _4ef=dojo.i18n.normalizeLocale(_4ed);var _4f0=[_4eb,"nls",_4ec].join(".");var _4f1="";if(_4ee){var _4f2=_4ee.split(",");for(var i=0;i<_4f2.length;i++){if(_4ef.indexOf(_4f2[i])==0){if(_4f2[i].length>_4f1.length){_4f1=_4f2[i];}}}if(!_4f1){_4f1="ROOT";}}var _4f4=_4ee?_4f1:_4ef;var _4f5=dojo._loadedModules[_4f0];var _4f6=null;if(_4f5){if(dojo.config.localizationComplete&&_4f5._built){return;}var _4f7=_4f4.replace(/-/g,"_");var _4f8=_4f0+"."+_4f7;_4f6=dojo._loadedModules[_4f8];}if(!_4f6){_4f5=dojo["provide"](_4f0);var syms=dojo._getModuleSymbols(_4eb);var _4fa=syms.concat("nls").join("/");var _4fb;dojo.i18n._searchLocalePath(_4f4,_4ee,function(loc){var _4fd=loc.replace(/-/g,"_");var _4fe=_4f0+"."+_4fd;var _4ff=false;if(!dojo._loadedModules[_4fe]){dojo["provide"](_4fe);var _500=[_4fa];if(loc!="ROOT"){_500.push(loc);}_500.push(_4ec);var _501=_500.join("/")+".js";_4ff=dojo._loadPath(_501,null,function(hash){var _503=function(){};_503.prototype=_4fb;_4f5[_4fd]=new _503();for(var j in hash){_4f5[_4fd][j]=hash[j];}});}else{_4ff=true;}if(_4ff&&_4f5[_4fd]){_4fb=_4f5[_4fd];}else{_4f5[_4fd]=_4fb;}if(_4ee){return true;}});}if(_4ee&&_4ef!=_4f1){_4f5[_4ef.replace(/-/g,"_")]=_4f5[_4f1.replace(/-/g,"_")];}};(function(){var _505=dojo.config.extraLocale;if(_505){if(!_505 instanceof Array){_505=[_505];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_509,_50a){req(m,b,_509,_50a);if(_509){return;}for(var i=0;i<_505.length;i++){req(m,b,_505[i],_50a);}};}})();dojo.i18n._searchLocalePath=function(_50c,down,_50e){_50c=dojo.i18n.normalizeLocale(_50c);var _50f=_50c.split("-");var _510=[];for(var i=_50f.length;i>0;i--){_510.push(_50f.slice(0,i).join("-"));}_510.push(false);if(down){_510.reverse();}for(var j=_510.length-1;j>=0;j--){var loc=_510[j]||"ROOT";var stop=_50e(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_515,_516){function preload(_517){_517=dojo.i18n.normalizeLocale(_517);dojo.i18n._searchLocalePath(_517,true,function(loc){for(var i=0;i<_516.length;i++){if(_516[i]==loc){dojo["require"](_515+"_"+loc);return true;}}return false;});};preload();var _51a=dojo.config.extraLocale||[];for(var i=0;i<_51a.length;i++){preload(_51a[i]);}};}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.pad=function(text,size,ch,end){var out=String(text);if(!ch){ch="0";}while(out.length<size){if(end){out+=ch;}else{out=ch+out;}}return out;};dojo.string.substitute=function(_521,map,_523,_524){return _521.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_525,key,_527){var _528=dojo.getObject(key,false,map);if(_527){_528=dojo.getObject(_527,false,_524)(_528);}if(_523){_528=_523(_528,key);}return _528.toString();});};dojo.string.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["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_52c){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_52c&&_52c.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_530){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_530);};dojo.regexp.group=function(_533,_534){return "("+(_534?"?:":"")+_533+")";};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_535,_536){_536=dojo.mixin({},_536||{});var _537=dojo.i18n.normalizeLocale(_536.locale);var _538=dojo.i18n.getLocalization("dojo.cldr","number",_537);_536.customs=_538;var _539=_536.pattern||_538[(_536.type||"decimal")+"Format"];if(isNaN(_535)){return null;}return dojo.number._applyPattern(_535,_539,_536);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_53a,_53b,_53c){_53c=_53c||{};var _53d=_53c.customs.group;var _53e=_53c.customs.decimal;var _53f=_53b.split(";");var _540=_53f[0];_53b=_53f[(_53a<0)?1:0]||("-"+_540);if(_53b.indexOf("%")!=-1){_53a*=100;}else{if(_53b.indexOf("‰")!=-1){_53a*=1000;}else{if(_53b.indexOf("¤")!=-1){_53d=_53c.customs.currencyGroup||_53d;_53e=_53c.customs.currencyDecimal||_53e;_53b=_53b.replace(/\u00a4{1,3}/,function(_541){var prop=["symbol","currency","displayName"][_541.length-1];return _53c[prop]||_53c.currency||"";});}else{if(_53b.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _543=dojo.number._numberPatternRE;var _544=_540.match(_543);if(!_544){throw new Error("unable to find a number expression in pattern: "+_53b);}return _53b.replace(_543,dojo.number._formatAbsolute(_53a,_544[0],{decimal:_53e,group:_53d,places:_53c.places}));};dojo.number.round=function(_545,_546,_547){var _548=String(_545).split(".");var _549=(_548[1]&&_548[1].length)||0;if(_549>_546){var _54a=Math.pow(10,_546);if(_547>0){_54a*=10/_547;_546++;}_545=Math.round(_545*_54a)/_54a;_548=String(_545).split(".");_549=(_548[1]&&_548[1].length)||0;if(_549>_546){_548[1]=_548[1].substr(0,_546);_545=Number(_548.join("."));}}return _545;};dojo.number._formatAbsolute=function(_54b,_54c,_54d){_54d=_54d||{};if(_54d.places===true){_54d.places=0;}if(_54d.places===Infinity){_54d.places=6;}var _54e=_54c.split(".");var _54f=(_54d.places>=0)?_54d.places:(_54e[1]&&_54e[1].length)||0;if(!(_54d.round<0)){_54b=dojo.number.round(_54b,_54f,_54d.round);}var _550=String(Math.abs(_54b)).split(".");var _551=_550[1]||"";if(_54d.places){_550[1]=dojo.string.pad(_551.substr(0,_54d.places),_54d.places,"0",true);}else{if(_54e[1]&&_54d.places!==0){var pad=_54e[1].lastIndexOf("0")+1;if(pad>_551.length){_550[1]=dojo.string.pad(_551,pad,"0",true);}var _553=_54e[1].length;if(_553<_551.length){_550[1]=_551.substr(0,_553);}}else{if(_550[1]){_550.pop();}}}var _554=_54e[0].replace(",","");pad=_554.indexOf("0");if(pad!=-1){pad=_554.length-pad;if(pad>_550[0].length){_550[0]=dojo.string.pad(_550[0],pad);}if(_554.indexOf("#")==-1){_550[0]=_550[0].substr(_550[0].length-pad);}}var _555=_54e[0].lastIndexOf(",");var _556,_557;if(_555!=-1){_556=_54e[0].length-_555-1;var _558=_54e[0].substr(0,_555);_555=_558.lastIndexOf(",");if(_555!=-1){_557=_558.length-_555-1;}}var _559=[];for(var _55a=_550[0];_55a;){var off=_55a.length-_556;_559.push((off>0)?_55a.substr(off):_55a);_55a=(off>0)?_55a.slice(0,off):"";if(_557){_556=_557;delete _557;}}_550[0]=_559.reverse().join(_54d.group||",");return _550.join(_54d.decimal||".");};dojo.number.regexp=function(_55c){return dojo.number._parseInfo(_55c).regexp;};dojo.number._parseInfo=function(_55d){_55d=_55d||{};var _55e=dojo.i18n.normalizeLocale(_55d.locale);var _55f=dojo.i18n.getLocalization("dojo.cldr","number",_55e);var _560=_55d.pattern||_55f[(_55d.type||"decimal")+"Format"];var _561=_55f.group;var _562=_55f.decimal;var _563=1;if(_560.indexOf("%")!=-1){_563/=100;}else{if(_560.indexOf("‰")!=-1){_563/=1000;}else{var _564=_560.indexOf("¤")!=-1;if(_564){_561=_55f.currencyGroup||_561;_562=_55f.currencyDecimal||_562;}}}var _565=_560.split(";");if(_565.length==1){_565.push("-"+_565[0]);}var re=dojo.regexp.buildGroupRE(_565,function(_567){_567="(?:"+dojo.regexp.escapeString(_567,".")+")";return _567.replace(dojo.number._numberPatternRE,function(_568){var _569={signed:false,separator:_55d.strict?_561:[_561,""],fractional:_55d.fractional,decimal:_562,exponent:false};var _56a=_568.split(".");var _56b=_55d.places;if(_56a.length==1||_56b===0){_569.fractional=false;}else{if(_56b===undefined){_56b=_56a[1].lastIndexOf("0")+1;}if(_56b&&_55d.fractional==undefined){_569.fractional=true;}if(!_55d.places&&(_56b<_56a[1].length)){_56b+=","+_56a[1].length;}_569.places=_56b;}var _56c=_56a[0].split(",");if(_56c.length>1){_569.groupSize=_56c.pop().length;if(_56c.length>1){_569.groupSize2=_56c.pop().length;}}return "("+dojo.number._realNumberRegexp(_569)+")";});},true);if(_564){re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_56d,_56e,_56f,_570){var prop=["symbol","currency","displayName"][_56f.length-1];var _572=dojo.regexp.escapeString(_55d[prop]||_55d.currency||"");_56e=_56e?"\\s":"";_570=_570?"\\s":"";if(!_55d.strict){if(_56e){_56e+="*";}if(_570){_570+="*";}return "(?:"+_56e+_572+_570+")?";}return _56e+_572+_570;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_561,decimal:_562,factor:_563};};dojo.number.parse=function(_573,_574){var info=dojo.number._parseInfo(_574);var _576=(new RegExp("^"+info.regexp+"$")).exec(_573);if(!_576){return NaN;}var _577=_576[1];if(!_576[1]){if(!_576[2]){return NaN;}_577=_576[2];info.factor*=-1;}_577=_577.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return Number(_577)*info.factor;};dojo.number._realNumberRegexp=function(_578){_578=_578||{};if(!("places" in _578)){_578.places=Infinity;}if(typeof _578.decimal!="string"){_578.decimal=".";}if(!("fractional" in _578)||/^0/.test(_578.places)){_578.fractional=[true,false];}if(!("exponent" in _578)){_578.exponent=[true,false];}if(!("eSigned" in _578)){_578.eSigned=[true,false];}var _579=dojo.number._integerRegexp(_578);var _57a=dojo.regexp.buildGroupRE(_578.fractional,function(q){var re="";if(q&&(_578.places!==0)){re="\\"+_578.decimal;if(_578.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_578.places+"}";}}return re;},true);var _57d=dojo.regexp.buildGroupRE(_578.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_578.eSigned})+")";}return "";});var _57f=_579+_57a;if(_57a){_57f="(?:(?:"+_57f+")|(?:"+_57a+"))";}return _57f+_57d;};dojo.number._integerRegexp=function(_580){_580=_580||{};if(!("signed" in _580)){_580.signed=[true,false];}if(!("separator" in _580)){_580.separator="";}else{if(!("groupSize" in _580)){_580.groupSize=3;}}var _581=dojo.regexp.buildGroupRE(_580.signed,function(q){return q?"[-+]":"";},true);var _583=dojo.regexp.buildGroupRE(_580.separator,function(sep){if(!sep){return "(?:0|[1-9]\\d*)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_580.groupSize,grp2=_580.groupSize2;if(grp2){var _587="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_587+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_587;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _581+_583;};}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_588){var _589=_588.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_589==1&&dojo.date.isLeapYear(_588)){return 29;}return days[_589];};dojo.date.isLeapYear=function(_58b){var year=_58b.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_58d){var str=_58d.toString();var tz="";var _590;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_590=str.match(pat))){tz=_590[1];}else{str=_58d.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_590=str.match(pat))){tz=_590[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_593,_594,_595){_593=new Date(Number(_593));_594=new Date(Number(_594||new Date()));if(_595!=="undefined"){if(_595=="date"){_593.setHours(0,0,0,0);_594.setHours(0,0,0,0);}else{if(_595=="time"){_593.setFullYear(0,0,0);_594.setFullYear(0,0,0);}}}if(_593>_594){return 1;}if(_593<_594){return -1;}return 0;};dojo.date.add=function(date,_597,_598){var sum=new Date(Number(date));var _59a=false;var _59b="Date";switch(_597){case "day":break;case "weekday":var days,_59d;var mod=_598%5;if(!mod){days=(_598>0)?5:-5;_59d=(_598>0)?((_598-5)/5):((_598+5)/5);}else{days=mod;_59d=parseInt(_598/5);}var strt=date.getDay();var adj=0;if(strt==6&&_598>0){adj=1;}else{if(strt==0&&_598<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_598>0)?2:-2;}_598=(7*_59d)+days+adj;break;case "year":_59b="FullYear";_59a=true;break;case "week":_598*=7;break;case "quarter":_598*=3;case "month":_59a=true;_59b="Month";break;case "hour":case "minute":case "second":case "millisecond":_59b="UTC"+_597.charAt(0).toUpperCase()+_597.substring(1)+"s";}if(_59b){sum["set"+_59b](sum["get"+_59b]()+_598);}if(_59a&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_5a2,_5a3,_5a4){_5a3=_5a3||new Date();_5a4=_5a4||"day";var _5a5=_5a3.getFullYear()-_5a2.getFullYear();var _5a6=1;switch(_5a4){case "quarter":var m1=_5a2.getMonth();var m2=_5a3.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_5a5*4);_5a6=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_5a2,_5a3,"day"));var _5ac=parseInt(dojo.date.difference(_5a2,_5a3,"week"));var mod=days%7;if(mod==0){days=_5ac*5;}else{var adj=0;var aDay=_5a2.getDay();var bDay=_5a3.getDay();_5ac=parseInt(days/7);mod=days%7;var _5b1=new Date(_5a2);_5b1.setDate(_5b1.getDate()+(_5ac*7));var _5b2=_5b1.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_5b2+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_5b2+mod)<0:adj=2;}}}days+=adj;days-=(_5ac*2);}_5a6=days;break;case "year":_5a6=_5a5;break;case "month":_5a6=(_5a3.getMonth()-_5a2.getMonth())+(_5a5*12);break;case "week":_5a6=parseInt(dojo.date.difference(_5a2,_5a3,"day")/7);break;case "day":_5a6/=24;case "hour":_5a6/=60;case "minute":_5a6/=60;case "second":_5a6/=1000;case "millisecond":_5a6*=_5a3.getTime()-_5a2.getTime();}return Math.round(_5a6);};}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_5b3){var _5b4={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};var _5b5=dojo.cldr.supplemental._region(_5b3);var dow=_5b4[_5b5];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_5b7){_5b7=dojo.i18n.normalizeLocale(_5b7);var tags=_5b7.split("-");var _5b9=tags[1];if(!_5b9){_5b9={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_5b9.length==4){_5b9=tags[2];}}return _5b9;};dojo.cldr.supplemental.getWeekend=function(_5ba){var _5bb={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _5bc={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _5bd=dojo.cldr.supplemental._region(_5ba);var _5be=_5bb[_5bd];var end=_5bc[_5bd];if(_5be===undefined){_5be=6;}if(end===undefined){end=0;}return {start:_5be,end:end};};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(_5c0,_5c1,_5c2,_5c3){return _5c3.replace(/([a-z])\1*/ig,function(_5c4){var s,pad;var c=_5c4.charAt(0);var l=_5c4.length;var _5c9=["abbr","wide","narrow"];switch(c){case "G":s=_5c1[(l<4)?"eraAbbr":"eraNames"][_5c0.getFullYear()<0?0:1];break;case "y":s=_5c0.getFullYear();switch(l){case 1:break;case 2:if(!_5c2){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_5c0.getMonth()+1)/3);pad=true;break;case "M":case "L":var m=_5c0.getMonth();var _5cb;switch(l){case 1:case 2:s=m+1;pad=true;break;case 3:case 4:case 5:_5cb=_5c9[l-3];break;}if(_5cb){var _5cc=(c=="L")?"standalone":"format";var _5cd=["months",_5cc,_5cb].join("-");s=_5c1[_5cd][m];}break;case "w":var _5ce=0;s=dojo.date.locale._getWeekOfYear(_5c0,_5ce);pad=true;break;case "d":s=_5c0.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_5c0);pad=true;break;case "E":case "e":case "c":var d=_5c0.getDay();var _5d0;switch(l){case 1:case 2:if(c=="e"){var _5d1=dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);d=(d-_5d1+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3:case 4:case 5:_5d0=_5c9[l-3];break;}if(_5d0){var _5d2=(c=="c")?"standalone":"format";var _5d3=["days",_5d2,_5d0].join("-");s=_5c1[_5d3][d];}break;case "a":var _5d4=(_5c0.getHours()<12)?"am":"pm";s=_5c1[_5d4];break;case "h":case "H":case "K":case "k":var h=_5c0.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_5c0.getMinutes();pad=true;break;case "s":s=_5c0.getSeconds();pad=true;break;case "S":s=Math.round(_5c0.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.getTimezoneName(_5c0);if(s){break;}l=4;case "Z":var _5d6=_5c0.getTimezoneOffset();var tz=[(_5d6<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_5d6)/60),2),dojo.string.pad(Math.abs(_5d6)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_5c3);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale.format=function(_5d8,_5d9){_5d9=_5d9||{};var _5da=dojo.i18n.normalizeLocale(_5d9.locale);var _5db=_5d9.formatLength||"short";var _5dc=dojo.date.locale._getGregorianBundle(_5da);var str=[];var _5de=dojo.hitch(this,formatPattern,_5d8,_5dc,_5d9.fullYear);if(_5d9.selector=="year"){var year=_5d8.getFullYear();if(_5da.match(/^zh|^ja/)){year+="年";}return year;}if(_5d9.selector!="time"){var _5e0=_5d9.datePattern||_5dc["dateFormat-"+_5db];if(_5e0){str.push(_processPattern(_5e0,_5de));}}if(_5d9.selector!="date"){var _5e1=_5d9.timePattern||_5dc["timeFormat-"+_5db];if(_5e1){str.push(_processPattern(_5e1,_5de));}}var _5e2=str.join(" ");return _5e2;};dojo.date.locale.regexp=function(_5e3){return dojo.date.locale._parseInfo(_5e3).regexp;};dojo.date.locale._parseInfo=function(_5e4){_5e4=_5e4||{};var _5e5=dojo.i18n.normalizeLocale(_5e4.locale);var _5e6=dojo.date.locale._getGregorianBundle(_5e5);var _5e7=_5e4.formatLength||"short";var _5e8=_5e4.datePattern||_5e6["dateFormat-"+_5e7];var _5e9=_5e4.timePattern||_5e6["timeFormat-"+_5e7];var _5ea;if(_5e4.selector=="date"){_5ea=_5e8;}else{if(_5e4.selector=="time"){_5ea=_5e9;}else{_5ea=_5e8+" "+_5e9;}}var _5eb=[];var re=_processPattern(_5ea,dojo.hitch(this,_buildDateTimeRE,_5eb,_5e6,_5e4));return {regexp:re,tokens:_5eb,bundle:_5e6};};dojo.date.locale.parse=function(_5ed,_5ee){var info=dojo.date.locale._parseInfo(_5ee);var _5f0=info.tokens,_5f1=info.bundle;var re=new RegExp("^"+info.regexp+"$");var _5f3=re.exec(_5ed);if(!_5f3){return null;}var _5f4=["abbr","wide","narrow"];var _5f5=[1970,0,1,0,0,0,0];var amPm="";var _5f7=dojo.every(_5f3,function(v,i){if(!i){return true;}var _5fa=_5f0[i-1];var l=_5fa.length;switch(_5fa.charAt(0)){case "y":if(l!=2&&_5ee.strict){_5f5[0]=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _5fd=year.substring(0,2)*100;var _5fe=Math.min(Number(year.substring(2,4))+20,99);var num=(v<_5fe)?_5fd+v:_5fd-100+v;_5f5[0]=num;}else{if(_5ee.strict){return false;}_5f5[0]=v;}}break;case "M":if(l>2){var _600=_5f1["months-format-"+_5f4[l-3]].concat();if(!_5ee.strict){v=v.replace(".","").toLowerCase();_600=dojo.map(_600,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_600,v);if(v==-1){return false;}}else{v--;}_5f5[1]=v;break;case "E":case "e":var days=_5f1["days-format-"+_5f4[l-3]].concat();if(!_5ee.strict){v=v.toLowerCase();days=dojo.map(days,function(d){return d.toLowerCase();});}v=dojo.indexOf(days,v);if(v==-1){return false;}break;case "D":_5f5[1]=0;case "d":_5f5[2]=v;break;case "a":var am=_5ee.am||_5f1.am;var pm=_5ee.pm||_5f1.pm;if(!_5ee.strict){var _606=/\./g;v=v.replace(_606,"").toLowerCase();am=am.replace(_606,"").toLowerCase();pm=pm.replace(_606,"").toLowerCase();}if(_5ee.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_5f5[3]=v;break;case "m":_5f5[4]=v;break;case "s":_5f5[5]=v;break;case "S":_5f5[6]=v;}return true;});var _607=+_5f5[3];if(amPm==="p"&&_607<12){_5f5[3]=_607+12;}else{if(amPm==="a"&&_607==12){_5f5[3]=0;}}var _608=new Date(_5f5[0],_5f5[1],_5f5[2],_5f5[3],_5f5[4],_5f5[5],_5f5[6]);if(_5ee.strict){_608.setFullYear(_5f5[0]);}var _609=_5f0.join("");if(!_5f7||(_609.indexOf("M")!=-1&&_608.getMonth()!=_5f5[1])||(_609.indexOf("d")!=-1&&_608.getDate()!=_5f5[2])){return null;}return _608;};function _processPattern(_60a,_60b,_60c,_60d){var _60e=function(x){return x;};_60b=_60b||_60e;_60c=_60c||_60e;_60d=_60d||_60e;var _610=_60a.match(/(''|[^'])+/g);var _611=false;dojo.forEach(_610,function(_612,i){if(!_612){_610[i]="";}else{_610[i]=(_611?_60c:_60b)(_612);_611=!_611;}});return _60d(_610.join(""));};function _buildDateTimeRE(_614,_615,_616,_617){_617=dojo.regexp.escapeString(_617);if(!_616.strict){_617=_617.replace(" a"," ?a");}return _617.replace(/([a-z])\1*/ig,function(_618){var s;var c=_618.charAt(0);var l=_618.length;var p2="",p3="";if(_616.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s=p2+"[1-9]|[12]\\d|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_616.am||_615.am||"AM";var pm=_616.pm||_615.pm||"PM";if(_616.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_614){_614.push(_618);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _620=[];dojo.date.locale.addCustomFormats=function(_621,_622){_620.push({pkg:_621,name:_622});};dojo.date.locale._getGregorianBundle=function(_623){var _624={};dojo.forEach(_620,function(desc){var _626=dojo.i18n.getLocalization(desc.pkg,desc.name,_623);_624=dojo.mixin(_624,_626);},this);return _624;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,use,_62a){var _62b;var _62c=dojo.date.locale._getGregorianBundle(_62a);var _62d=[item,use,type];if(use=="standAlone"){_62b=_62c[_62d.join("-")];}_62d[1]="format";return (_62b||_62c[_62d.join("-")]).concat();};dojo.date.locale.isWeekend=function(_62e,_62f){var _630=dojo.cldr.supplemental.getWeekend(_62f);var day=(_62e||new Date()).getDay();if(_630.end<_630.start){_630.end+=7;if(day<_630.start){day+=7;}}return day>=_630.start&&day<=_630.end;};dojo.date.locale._getDayOfYear=function(_632){return dojo.date.difference(new Date(_632.getFullYear(),0,1),_632)+1;};dojo.date.locale._getWeekOfYear=function(_633,_634){if(arguments.length==1){_634=0;}var _635=new Date(_633.getFullYear(),0,1).getDay();var adj=(_635-_634+7)%7;var week=Math.floor((dojo.date.locale._getDayOfYear(_633)+adj-1)/7);if(_635==_634){week++;}return week;};}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_638,_639){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 _63a=dojo.date.stamp._isoRegExp.exec(_638);var _63b=null;if(_63a){_63a.shift();if(_63a[1]){_63a[1]--;}if(_63a[6]){_63a[6]*=1000;}if(_639){_639=new Date(_639);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _639["get"+prop]();}).forEach(function(_63d,_63e){if(_63a[_63e]===undefined){_63a[_63e]=_63d;}});}_63b=new Date(_63a[0]||1970,_63a[1]||0,_63a[2]||1,_63a[3]||0,_63a[4]||0,_63a[5]||0,_63a[6]||0);var _63f=0;var _640=_63a[7]&&_63a[7].charAt(0);if(_640!="Z"){_63f=((_63a[8]||0)*60)+(Number(_63a[9])||0);if(_640!="-"){_63f*=-1;}}if(_640){_63f-=_63b.getTimezoneOffset();}if(_63f){_63b.setTime(_63b.getTime()+_63f*60000);}}return _63b;};dojo.date.stamp.toISOString=function(_641,_642){var _=function(n){return (n<10)?"0"+n:n;};_642=_642||{};var _645=[];var _646=_642.zulu?"getUTC":"get";var date="";if(_642.selector!="time"){var year=_641[_646+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_641[_646+"Month"]()+1),_(_641[_646+"Date"]())].join("-");}_645.push(date);if(_642.selector!="date"){var time=[_(_641[_646+"Hours"]()),_(_641[_646+"Minutes"]()),_(_641[_646+"Seconds"]())].join(":");var _64a=_641[_646+"Milliseconds"]();if(_642.milliseconds){time+="."+(_64a<100?"0":"")+_(_64a);}if(_642.zulu){time+="Z";}else{if(_642.selector!="time"){var _64b=_641.getTimezoneOffset();var _64c=Math.abs(_64b);time+=(_64b>0?"-":"+")+_(Math.floor(_64c/60))+":"+_(_64c%60);}}_645.push(time);}return _645.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _64e=d._scopeName+"Type";var qry="["+_64e+"]";function val2type(_650){if(d.isString(_650)){return "string";}if(typeof _650=="number"){return "number";}if(typeof _650=="boolean"){return "boolean";}if(d.isFunction(_650)){return "function";}if(d.isArray(_650)){return "array";}if(_650 instanceof Date){return "date";}if(_650 instanceof d._Url){return "url";}return "object";};function str2obj(_651,type){switch(type){case "string":return _651;case "number":return _651.length?Number(_651):NaN;case "boolean":return typeof _651=="boolean"?_651:!(_651.toLowerCase()=="false");case "function":if(d.isFunction(_651)){_651=_651.toString();_651=d.trim(_651.substring(_651.indexOf("{")+1,_651.length-1));}try{if(_651.search(/[^\w\.]+/i)!=-1){_651=d.parser._nameAnonFunc(new Function(_651),this);}return d.getObject(_651,false);}catch(e){return new Function();}case "array":return _651.split(/\s*,\s*/);case "date":switch(_651){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_651);}case "url":return d.baseUrl+_651;default:return d.fromJson(_651);}};var _653={};function getClassInfo(_654){if(!_653[_654]){var cls=d.getObject(_654);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_654+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _656=cls.prototype;var _657={};for(var name in _656){if(name.charAt(0)=="_"){continue;}var _659=_656[name];_657[name]=val2type(_659);}_653[_654]={cls:cls,params:_657};}return _653[_654];};this._functionFromScript=function(_65a){var _65b="";var _65c="";var _65d=_65a.getAttribute("args");if(_65d){d.forEach(_65d.split(/\s*,\s*/),function(part,idx){_65b+="var "+part+" = arguments["+idx+"]; ";});}var _660=_65a.getAttribute("with");if(_660&&_660.length){d.forEach(_660.split(/\s*,\s*/),function(part){_65b+="with("+part+"){";_65c+="}";});}return new Function(_65b+_65a.innerHTML+_65c);};this.instantiate=function(_662){var _663=[];d.forEach(_662,function(node){if(!node){return;}var type=node.getAttribute(_64e);if((!type)||(!type.length)){return;}var _666=getClassInfo(type);var _667=_666.cls;var ps=_667._noScript||_667.prototype._noScript;var _669={};var _66a=node.attributes;for(var name in _666.params){var item=_66a.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _66d=item.value;switch(name){case "class":_66d=node.className;break;case "style":_66d=node.style&&node.style.cssText;}var _66e=_666.params[name];_669[name]=str2obj(_66d,_66e);}if(!ps){var _66f=[],_670=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_671){var _672=_671.getAttribute("event"),type=_671.getAttribute("type"),nf=d.parser._functionFromScript(_671);if(_672){if(type=="dojo/connect"){_66f.push({event:_672,func:nf});}else{_669[_672]=nf;}}else{_670.push(nf);}});}var _674=_667["markupFactory"];if(!_674&&_667["prototype"]){_674=_667.prototype["markupFactory"];}var _675=_674?_674(_669,node,_667):new _667(_669,node);_663.push(_675);var _676=node.getAttribute("jsId");if(_676){d.setObject(_676,_675);}if(!ps){d.forEach(_66f,function(_677){d.connect(_675,_677.event,null,_677.func);});d.forEach(_670,function(func){func.call(_675);});}});d.forEach(_663,function(_679){if(_679&&_679.startup&&!_679._started&&(!_679.getParent||!_679.getParent())){_679.startup();}});return _663;};this.parse=function(_67a){var list=d.query(qry,_67a);var _67c=this.instantiate(list);return _67c;};}();(function(){var _67d=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,_67d);}else{dojo._loaders.unshift(_67d);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_67e,_67f){var jpn="$joinpoint";var nso=(_67f||dojo.parser._anon);if(dojo.isIE){var cn=_67e["__dojoNameCache"];if(cn&&nso[cn]===_67e){return _67e["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_67e;return ret;};}if(!dojo._hasResource["dojo.xml.XslTransform"]){dojo._hasResource["dojo.xml.XslTransform"]=true;dojo.provide("dojo.xml.XslTransform");dojo.xml.XslTransform=function(_684){window.console.log("XslTransform is supported by Internet Explorer and Mozilla, with limited support in Opera 9 (no document function support).");var _685=dojo.isIE;var _686=["Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];var _687=["Msxml2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"];var _688=["Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"];function getActiveXImpl(_689){for(var i=0;i<_689.length;i++){try{var _68b=new ActiveXObject(_689[i]);if(_68b){return _689[i];}}catch(e){}}dojo.raise("Could not find an ActiveX implementation in:\n\n "+_689);};if(_684==null||_684==undefined){dojo.raise("You must pass the URI String for the XSL file to be used!");return false;}var _68c=null;var _68d=null;if(_685){_68c=new ActiveXObject(getActiveXImpl(_687));}else{_68d=new XSLTProcessor();_68c=document.implementation.createDocument("","",null);_68c.addEventListener("load",onXslLoad,false);}_68c.async=false;_68c.load(_684);if(_685){var xslt=new ActiveXObject(getActiveXImpl(_688));xslt.stylesheet=_68c;_68d=xslt.createProcessor();}function onXslLoad(){_68d.importStylesheet(_68c);};function getResultDom(_68f,_690){if(_685){addIeParams(_690);var _691=getIeResultDom(_68f);removeIeParams(_690);return _691;}else{return getMozillaResultDom(_68f,_690);}};function addIeParams(_692){if(!_692){return;}for(var i=0;i<_692.length;i++){_68d.addParameter(_692[i][0],_692[i][1]);}};function removeIeParams(_694){if(!_694){return;}for(var i=0;i<_694.length;i++){_68d.addParameter(_694[i][0],"");}};function getIeResultDom(_696){_68d.input=_696;var _697=new ActiveXObject(getActiveXImpl(_686));_697.async=false;_697.validateOnParse=false;_68d.output=_697;_68d.transform();if(_697.parseError.errorCode!=0){var err=_697.parseError;dojo.raise("err.errorCode: "+err.errorCode+"\n\nerr.reason: "+err.reason+"\n\nerr.url: "+err.url+"\n\nerr.srcText: "+err.srcText);}return _697;};function getIeResultStr(_699,_69a){_68d.input=_699;_68d.transform();return _68d.output;};function addMozillaParams(_69b){if(!_69b){return;}for(var i=0;i<_69b.length;i++){_68d.setParameter(null,_69b[i][0],_69b[i][1]);}};function getMozillaResultDom(_69d,_69e){addMozillaParams(_69e);var _69f=_68d.transformToDocument(_69d);_68d.clearParameters();return _69f;};function getMozillaResultStr(_6a0,_6a1,_6a2){addMozillaParams(_6a1);var _6a3=_68d.transformToFragment(_6a0,_6a2);var _6a4=new XMLSerializer();_68d.clearParameters();return _6a4.serializeToString(_6a3);};this.getResultString=function(_6a5,_6a6,_6a7){var _6a8=null;if(_685){addIeParams(_6a6);_6a8=getIeResultStr(_6a5,_6a6);removeIeParams(_6a6);}else{_6a8=getMozillaResultStr(_6a5,_6a6,_6a7);}return _6a8;};this.transformToContentPane=function(_6a9,_6aa,_6ab,_6ac){var _6ad=this.getResultString(_6a9,_6aa,_6ac);_6ab.setContent(_6ad);};this.transformToRegion=function(_6ae,_6af,_6b0,_6b1){try{var _6b2=this.getResultString(_6ae,_6af,_6b1);_6b0.innerHTML=_6b2;}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_684);}};this.transformToDocument=function(_6b3,_6b4){return getResultDom(_6b3,_6b4);};this.transformToWindow=function(_6b5,_6b6,_6b7,_6b8){try{_6b7.open();_6b7.write(this.getResultString(_6b5,_6b6,_6b8));_6b7.close();}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_684);}};};}if(!dojo._hasResource["dojo.back"]){dojo._hasResource["dojo.back"]=true;dojo.provide("dojo.back");(function(){var back=dojo.back;function getHash(){var h=window.location.hash;if(h.charAt(0)=="#"){h=h.substring(1);}return dojo.isMozilla?h:decodeURIComponent(h);};function setHash(h){if(!h){h="";}window.location.hash=encodeURIComponent(h);_6bc=history.length;};if(dojo.exists("tests.back-hash")){back.getHash=getHash;back.setHash=setHash;}var _6bd=(typeof (window)!=="undefined")?window.location.href:"";var _6be=(typeof (window)!=="undefined")?getHash():"";var _6bf=null;var _6c0=null;var _6c1=null;var _6c2=null;var _6c3=[];var _6c4=[];var _6c5=false;var _6c6=false;var _6bc;function handleBackButton(){var _6c7=_6c4.pop();if(!_6c7){return;}var last=_6c4[_6c4.length-1];if(!last&&_6c4.length==0){last=_6bf;}if(last){if(last.kwArgs["back"]){last.kwArgs["back"]();}else{if(last.kwArgs["backButton"]){last.kwArgs["backButton"]();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("back");}}}}_6c3.push(_6c7);};back.goBack=handleBackButton;function handleForwardButton(){var last=_6c3.pop();if(!last){return;}if(last.kwArgs["forward"]){last.kwArgs.forward();}else{if(last.kwArgs["forwardButton"]){last.kwArgs.forwardButton();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("forward");}}}_6c4.push(last);};back.goForward=handleForwardButton;function createState(url,args,hash){return {"url":url,"kwArgs":args,"urlHash":hash};};function getUrlQuery(url){var _6ce=url.split("?");if(_6ce.length<2){return null;}else{return _6ce[1];}};function loadIframeHistory(){var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();_6c5=true;if(_6c2){dojo.isSafari?_6c2.location=url:window.frames[_6c2.name].location=url;}else{}return url;};function checkLocation(){if(!_6c6){var hsl=_6c4.length;var hash=getHash();if((hash===_6be||window.location.href==_6bd)&&(hsl==1)){handleBackButton();return;}if(_6c3.length>0){if(_6c3[_6c3.length-1].urlHash===hash){handleForwardButton();return;}}if((hsl>=2)&&(_6c4[hsl-2])){if(_6c4[hsl-2].urlHash===hash){handleBackButton();return;}}if(dojo.isSafari&&dojo.isSafari<3){var _6d2=history.length;if(_6d2>_6bc){handleForwardButton();}else{if(_6d2<_6bc){handleBackButton();}}_6bc=_6d2;}}};back.init=function(){if(dojo.byId("dj_history")){return;}var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");};back.setInitialState=function(args){_6bf=createState(_6bd,args,_6be);};back.addToHistory=function(args){_6c3=[];var hash=null;var url=null;if(!_6c2){if(dojo.config["useXDomain"]&&!dojo.config["dojoIframeHistoryUrl"]){console.debug("dojo.back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");}_6c2=window.frames["dj_history"];}if(!_6c1){_6c1=document.createElement("a");dojo.body().appendChild(_6c1);_6c1.style.display="none";}if(args["changeUrl"]){hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());if(_6c4.length==0&&_6bf.urlHash==hash){_6bf=createState(url,args,hash);return;}else{if(_6c4.length>0&&_6c4[_6c4.length-1].urlHash==hash){_6c4[_6c4.length-1]=createState(url,args,hash);return;}}_6c6=true;setTimeout(function(){setHash(hash);_6c6=false;},1);_6c1.href=hash;if(dojo.isIE){url=loadIframeHistory();var _6d8=args["back"]||args["backButton"]||args["handle"];var tcb=function(_6da){if(getHash()!=""){setTimeout(function(){setHash(hash);},1);}_6d8.apply(this,[_6da]);};if(args["back"]){args.back=tcb;}else{if(args["backButton"]){args.backButton=tcb;}else{if(args["handle"]){args.handle=tcb;}}}var _6db=args["forward"]||args["forwardButton"]||args["handle"];var tfw=function(_6dd){if(getHash()!=""){setHash(hash);}if(_6db){_6db.apply(this,[_6dd]);}};if(args["forward"]){args.forward=tfw;}else{if(args["forwardButton"]){args.forwardButton=tfw;}else{if(args["handle"]){args.handle=tfw;}}}}else{if(!dojo.isIE){if(!_6c0){_6c0=setInterval(checkLocation,200);}}}}else{url=loadIframeHistory();}_6c4.push(createState(url,args,hash));};back._iframeLoaded=function(evt,_6df){var _6e0=getUrlQuery(_6df.href);if(_6e0==null){if(_6c4.length==1){handleBackButton();}return;}if(_6c5){_6c5=false;return;}if(_6c4.length>=2&&_6e0==getUrlQuery(_6c4[_6c4.length-2].url)){handleBackButton();}else{if(_6c3.length>0&&_6e0==getUrlQuery(_6c3[_6c3.length-1].url)){handleForwardButton();}}};})();}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_6e2,_6e3){var c=document.cookie;if(arguments.length==1){var _6e5=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _6e5?decodeURIComponent(_6e5[1]):undefined;}else{_6e3=_6e3||{};var exp=_6e3.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_6e3.expires=d;}if(exp&&exp.toUTCString){_6e3.expires=exp.toUTCString();}_6e2=encodeURIComponent(_6e2);var _6e8=name+"="+_6e2;for(propName in _6e3){_6e8+="; "+propName;var _6e9=_6e3[propName];if(_6e9!==true){_6e8+="="+_6e9;}}document.cookie=_6e8;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["dojo.cldr.monetary"]){dojo._hasResource["dojo.cldr.monetary"]=true;dojo.provide("dojo.cldr.monetary");dojo.cldr.monetary.getData=function(code){var _6eb={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};var _6ec={CHF:5};var _6ed=_6eb[code],_6ee=_6ec[code];if(typeof _6ed=="undefined"){_6ed=2;}if(typeof _6ee=="undefined"){_6ee=0;}return {places:_6ed,round:_6ee};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_6ef){_6ef=_6ef||{};_6ef.type="currency";var _6f0=dojo.i18n.getLocalization("dojo.cldr","currency",_6ef.locale)||{};var iso=_6ef.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_6f0[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_6ef);};dojo.currency.format=function(_6f4,_6f5){return dojo.number.format(_6f4,dojo.currency._mixInDefaults(_6f5));};dojo.currency.regexp=function(_6f6){return dojo.number.regexp(dojo.currency._mixInDefaults(_6f6));};dojo.currency.parse=function(_6f7,_6f8){return dojo.number.parse(_6f7,dojo.currency._mixInDefaults(_6f8));};}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");(function(){var _6f9={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _6fc=function(_6fd){this._index=-1;this._animations=_6fd||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;dojo.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};dojo.extend(_6fc,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){dojo.disconnect(this._onAnimateCtx);dojo.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_6ff,_700){if(!this._current){this._current=this._animations[this._index=0];}if(!_700&&this._current.status()=="playing"){return this;}var _701=dojo.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_702=dojo.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_704=dojo.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);dojo.disconnect(_701);dojo.disconnect(_702);dojo.disconnect(_704);});if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=dojo.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);dojo.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_708,_709){this.pause();var _70a=this.duration*_708;this._current=null;dojo.some(this._animations,function(a){if(a.duration<=_70a){this._current=a;return true;}_70a-=a.duration;return false;});if(this._current){this._current.gotoPercent(_70a/_current.duration,_709);}return this;},stop:function(_70c){if(this._current){if(_70c){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=dojo.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);dojo.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}}});dojo.extend(_6fc,_6f9);dojo.fx.chain=function(_70f){return new _6fc(_70f);};var _710=function(_711){this._animations=_711||[];this._connects=[];this._finished=0;this.duration=0;dojo.forEach(_711,function(a){var _713=a.duration;if(a.delay){_713+=a.delay;}if(this.duration<_713){this.duration=_713;}this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));},this);};dojo.extend(_710,{_doAction:function(_715,args){dojo.forEach(this._animations,function(a){a[_715].apply(a,args);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_718,args){var t=this._pseudoAnimation;t[_718].apply(t,args);},play:function(_71b,_71c){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_71d,_71e){var ms=this.duration*_71d;dojo.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_71e);});this._call("gotoProcent",arguments);return this;},stop:function(_721){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);}});dojo.extend(_710,_6f9);dojo.fx.combine=function(_722){return new _710(_722);};})();dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_725){return this.showAnim.play(_725||0);},hide:function(_726){return this.hideAnim.play(_726||0);}});dojo.fx.wipeIn=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style,o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _72c=dojo.style(node,"height");return Math.max(_72c,1);}},end:function(){return node.scrollHeight;}}}},args));dojo.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;var o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));dojo.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});dojo.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=(args.node=dojo.byId(args.node));var top=null;var left=null;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));dojo.connect(anim,"beforeBegin",anim,init);return anim;};}if(!dojo._hasResource["dojo.NodeList-fx"]){dojo._hasResource["dojo.NodeList-fx"]=true;dojo.provide("dojo.NodeList-fx");dojo.extend(dojo.NodeList,{_anim:function(obj,_73d,args){args=args||{};return dojo.fx.combine(this.map(function(item){var _740={node:item};dojo.mixin(_740,args);return obj[_73d](_740);}));},wipeIn:function(args){return this._anim(dojo.fx,"wipeIn",args);},wipeOut:function(args){return this._anim(dojo.fx,"wipeOut",args);},slideTo:function(args){return this._anim(dojo.fx,"slideTo",args);},fadeIn:function(args){return this._anim(dojo,"fadeIn",args);},fadeOut:function(args){return this._anim(dojo,"fadeOut",args);},animateProperty:function(args){return this._anim(dojo,"animateProperty",args);},anim:function(_747,_748,_749,_74a,_74b){var _74c=dojo.fx.combine(this.map(function(item){return dojo.animateProperty({node:item,properties:_747,duration:_748||350,easing:_749});}));if(_74a){dojo.connect(_74c,"onEnd",_74a);}return _74c.play(_74b||0);}});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._fakeLoadInit,1000);}})();dojo.i18n._preloadLocalizations("dojo.nls.dojo",["ar-lb","mk-mk","xx","ln","lo","de-de","pt-br","lt","lv","es-mx","hu-hu","id-id","ROOT","aa-dj","ar-ye","es-ar","el-gr","mt-mt","ar-ma","mk","es-ni","en-mh","ml","aa","mn","ja-jp","haw","so-dj","zh-hant-mo","af","wal-et","mr","it-ch","ms","en-mp","mt","en-mt","am","el-polytoni","en-za","sid-et","en-us-posix","ps-af","zh","et-ee","es-bo","ar","as","ga-ie","nb","en-as","uz-arab","en-au","ne","nl-nl","az","aa-er","aa-et","nl-be","pt-pt","zu","nl","mr-in","nn","en-zw","be","sk-sk","th-th","bg","en-be","so-et","bn","es-cl","fa-af","tig-er","es-co","en-nz","bs","es-cr","sr-cyrl-ba","es-pa","en-bw","ca","om","en-ca","sr-ba","or","es-pr","lv-lv","es-py","es-do","sid","cs","hy-am-revised","pa","ms-my","cy","kk-kz","so-so","nb-no","gez-er","zh-mo","kw-gb","en-ph","pl","da","gez-et","en-pk","de","bn-bd","es-ec","be-by","dz-bt","ps","pt","dv","es-es","ms-bn","dz","ar-qa","ar-dz","pa-arab","gv-gb","sq-al","sh-ba","ko-kr","el","en","eo","tt-ru","fr-lu","es","et","eu","gl-es","ml-in","kn-in","fa","ro","zh-hans-cn","om-et","fi","ru","zh-cn","rw","es-sv","fo","fr","sa","es-gt","se","ar-sa","am-et","sh","as-in","he-il","en-sg","sk","ga","sl","so","en-gb","sq","sr","hy-am","sv","gl","sw","fr-be","fo-fo","es-hn","ar-sy","it-it","gu","syr","ta","gv","en-gu","te","cy-gb","th","ti","so-ke","he","tr","fr-ca","ar-tn","hi","tt","cs-cz","de-li","kok-in","es-us","fur","sr-latn","zh-hant-hk","sr-cyrl","zh-hant-tw","en-hk","fr-ch","es-uy","hr","pa-in","sw-tz","sr-latn-ba","wal","hu","hi-in","de-lu","lt-lt","hy","ca-es","es-ve","kok","nn-no","af-za","or-in","uk","ia","kl-gl","sv-fi","id","zh-hans","lo-la","zh-hant","en-um","syr-sy","el-cy","en-ie","en-us","uz","en-in","sv-se","ti-er","zh-hans-sg","is","it","ti-et","zh-sg","vi","tig","de-at","ja","en-vi","gu-in","ta-in","km-kh","is-is","de-be","byn-er","bg-bg","ru-ua","ar-jo","pl-pl","uk-ua","fi-fi","haw-us","ka","da-dk","zh-hk","sw-ke","zh-tw","gez","kk","kl","km","kn","bn-in","ko","de-ch","eu-es","kw","om-ke","sl-si","byn","ky","ro-ro","te-in","xh"]);
/*
	Copyright (c) 2004-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	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.
*/

dojo.provide("dijit.dijit");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.global;var _2=dojo.doc;if(_2.selection){return !_2.selection.createRange().text;}else{var _3=_1.getSelection();if(dojo.isString(_3)){return !_3;}else{return _3.isCollapsed||!_3.toString();}}},getBookmark:function(){var _4,_5=dojo.doc.selection;if(_5){var _6=_5.createRange();if(_5.type.toUpperCase()=="CONTROL"){if(_6.length){_4=[];var i=0,_8=_6.length;while(i<_8){_4.push(_6.item(i++));}}else{_4=null;}}else{_4=_6.getBookmark();}}else{if(window.getSelection){_5=dojo.global.getSelection();if(_5){_6=_5.getRangeAt(0);_4=_6.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _4;},moveToBookmark:function(_9){var _a=dojo.doc;if(_a.selection){var _b;if(dojo.isArray(_9)){_b=_a.body.createControlRange();dojo.forEach(_9,"range.addElement(item)");}else{_b=_a.selection.createRange();_b.moveToBookmark(_9);}_b.select();}else{var _c=dojo.global.getSelection&&dojo.global.getSelection();if(_c&&_c.removeAllRanges){_c.removeAllRanges();_c.addRange(_9);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_d,_e){return {node:_d&&dojo.isDescendant(dijit._curFocus,_d.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_e||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_e||dojo.global,dijit.getBookmark):null,openedForWindow:_e};},focus:function(_f){if(!_f){return;}var _10="node" in _f?_f.node:_f,_11=_f.bookmark,_12=_f.openedForWindow;if(_10){var _13=(_10.tagName.toLowerCase()=="iframe")?_10.contentWindow:_10;if(_13&&_13.focus){try{_13.focus();}catch(e){}}dijit._onFocusNode(_10);}if(_11&&dojo.withGlobal(_12||dojo.global,dijit.isCollapsed)){if(_12){_12.focus();}try{dojo.withGlobal(_12||dojo.global,dijit.moveToBookmark,null,[_11]);}catch(e){}}},_activeStack:[],registerWin:function(_14){if(!_14){_14=window;}dojo.connect(_14.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var _16=_14.document.body||_14.document.getElementsByTagName("body")[0];if(_16){if(dojo.isIE){_16.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="body"){dijit._onFocusNode(evt.srcElement);}});_16.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{_16.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);_16.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}_16=null;},_onBlurNode:function(_1b){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(_1c){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1d=[];try{while(_1c){if(_1c.dijitPopupParent){_1c=dijit.byId(_1c.dijitPopupParent).domNode;}else{if(_1c.tagName&&_1c.tagName.toLowerCase()=="body"){if(_1c===dojo.body()){break;}_1c=dijit.getDocumentWindow(_1c.ownerDocument).frameElement;}else{var id=_1c.getAttribute&&_1c.getAttribute("widgetId");if(id){_1d.unshift(id);}_1c=_1c.parentNode;}}}}catch(e){}dijit._setStack(_1d);},_onFocusNode:function(_1f){if(_1f&&_1f.tagName&&_1f.tagName.toLowerCase()=="body"){return;}dijit._onTouchNode(_1f);if(_1f==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_1f;dojo.publish("focusNode",[_1f]);},_setStack:function(_20){var _21=dijit._activeStack;dijit._activeStack=_20;for(var _22=0;_22<Math.min(_21.length,_20.length);_22++){if(_21[_22]!=_20[_22]){break;}}for(var i=_21.length-1;i>=_22;i--){var _24=dijit.byId(_21[i]);if(_24){_24._focused=false;_24._hasBeenBlurred=true;if(_24._onBlur){_24._onBlur();}if(_24._setStateClass){_24._setStateClass();}dojo.publish("widgetBlur",[_24]);}}for(i=_22;i<_20.length;i++){_24=dijit.byId(_20[i]);if(_24){_24._focused=true;if(_24._onFocus){_24._onFocus();}if(_24._setStateClass){_24._setStateClass();}dojo.publish("widgetFocus",[_24]);}}}});dojo.addOnLoad(dijit.registerWin);}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(_25){if(this._hash[_25.id]){throw new Error("Tried to register widget with id=="+_25.id+" but that id is already registered");}this._hash[_25.id]=_25;},remove:function(id){delete this._hash[id];},forEach:function(_27){for(var id in this._hash){_27(this._hash[id]);}},filter:function(_29){var res=new dijit.WidgetSet();this.forEach(function(_2b){if(_29(_2b)){res.add(_2b);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_2e){return _2e.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_2f){var id;do{id=_2f+"_"+(_2f in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_2f]:dijit._widgetTypeCtr[_2f]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnUnload(function(){dijit.registry.forEach(function(_31){_31.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_33){return dijit.registry.byId(_33.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_34){while(_34){if(_34.getAttribute&&_34.getAttribute("widgetId")){return dijit.registry.byId(_34.getAttribute("widgetId"));}_34=_34.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_35){var _36=dojo.style(_35);return (_36.visibility!="hidden")&&(_36.visibility!="collapsed")&&(_36.display!="none");};dijit.isTabNavigable=function(_37){if(dojo.hasAttr(_37,"disabled")){return false;}var _38=dojo.hasAttr(_37,"tabindex");var _39=dojo.attr(_37,"tabindex");if(_38&&_39>=0){return true;}var _3a=_37.nodeName.toLowerCase();if(((_3a=="a"&&dojo.hasAttr(_37,"href"))||dijit._tabElements[_3a])&&(!_38||_39>=0)){return true;}return false;};dijit._getTabNavigable=function(_3b){var _3c,_3d,_3e,_3f,_40,_41;var _42=function(_43){dojo.query("> *",_43).forEach(function(_44){var _45=dijit._isElementShown(_44);if(_45&&dijit.isTabNavigable(_44)){var _46=dojo.attr(_44,"tabindex");if(!dojo.hasAttr(_44,"tabindex")||_46==0){if(!_3c){_3c=_44;}_3d=_44;}else{if(_46>0){if(!_3e||_46<_3f){_3f=_46;_3e=_44;}if(!_40||_46>=_41){_41=_46;_40=_44;}}}}if(_45){_42(_44);}});};if(dijit._isElementShown(_3b)){_42(_3b);}return {first:_3c,last:_3d,lowest:_3e,highest:_40};};dijit.getFirstInTabbingOrder=function(_47){var _48=dijit._getTabNavigable(dojo.byId(_47));return _48.lowest?_48.lowest:_48.first;};dijit.getLastInTabbingOrder=function(_49){var _4a=dijit._getTabNavigable(dojo.byId(_49));return _4a.last?_4a.last:_4a.highest;};}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _4b=dojo.global;var _4c=dojo.doc;var w=0,h=0;var de=_4c.documentElement;var dew=de.clientWidth,deh=de.clientHeight;if(dojo.isMozilla){var _52,_53,_54,_55;var dbw=_4c.body.clientWidth;if(dbw>dew){_52=dew;_54=dbw;}else{_54=dew;_52=dbw;}var dbh=_4c.body.clientHeight;if(dbh>deh){_53=deh;_55=dbh;}else{_55=deh;_53=dbh;}w=(_54>_4b.innerWidth)?_52:_54;h=(_55>_4b.innerHeight)?_53:_55;}else{if(!dojo.isOpera&&_4b.innerWidth){w=_4b.innerWidth;h=_4b.innerHeight;}else{if(dojo.isIE&&de&&deh){w=dew;h=deh;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _58=dojo._docScroll();return {w:w,h:h,l:_58.x,t:_58.y};};dijit.placeOnScreen=function(_59,pos,_5b,_5c){var _5d=dojo.map(_5b,function(_5e){return {corner:_5e,pos:pos};});return dijit._place(_59,_5d);};dijit._place=function(_5f,_60,_61){var _62=dijit.getViewport();if(!_5f.parentNode||String(_5f.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_5f);}var _63=null;dojo.some(_60,function(_64){var _65=_64.corner;var pos=_64.pos;if(_61){_61(_5f,_64.aroundCorner,_65);}var _67=_5f.style;var _68=_67.display;var _69=_67.visibility;_67.visibility="hidden";_67.display="";var mb=dojo.marginBox(_5f);_67.display=_68;_67.visibility=_69;var _6b=(_65.charAt(1)=="L"?pos.x:Math.max(_62.l,pos.x-mb.w)),_6c=(_65.charAt(0)=="T"?pos.y:Math.max(_62.t,pos.y-mb.h)),_6d=(_65.charAt(1)=="L"?Math.min(_62.l+_62.w,_6b+mb.w):pos.x),_6e=(_65.charAt(0)=="T"?Math.min(_62.t+_62.h,_6c+mb.h):pos.y),_6f=_6d-_6b,_70=_6e-_6c,_71=(mb.w-_6f)+(mb.h-_70);if(_63==null||_71<_63.overflow){_63={corner:_65,aroundCorner:_64.aroundCorner,x:_6b,y:_6c,w:_6f,h:_70,overflow:_71};}return !_71;});_5f.style.left=_63.x+"px";_5f.style.top=_63.y+"px";if(_63.overflow&&_61){_61(_5f,_63.aroundCorner,_63.corner);}return _63;};dijit.placeOnScreenAroundElement=function(_72,_73,_74,_75){_73=dojo.byId(_73);var _76=_73.style.display;_73.style.display="";var _77=_73.offsetWidth;var _78=_73.offsetHeight;var _79=dojo.coords(_73,true);_73.style.display=_76;var _7a=[];for(var _7b in _74){_7a.push({aroundCorner:_7b,corner:_74[_7b],pos:{x:_79.x+(_7b.charAt(1)=="L"?0:_77),y:_79.y+(_7b.charAt(0)=="T"?0:_78)}});}return dijit._place(_72,_7a,_75);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isSafari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i<win.frames.length;i++){fix(win.frames[i]);}};fix(window.top);}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 _81=[],_82=1000,_83=1;this.prepare=function(_84){dojo.body().appendChild(_84);var s=_84.style;if(s.display=="none"){s.display="";}s.visibility="hidden";s.position="absolute";s.top="-9999px";};this.open=function(_86){var _87=_86.popup,_88=_86.orient||{"BL":"TL","TL":"BL"},_89=_86.around,id=(_86.around&&_86.around.id)?(_86.around.id+"_dropdown"):("popup_"+_83++);var _8b=dojo.doc.createElement("div");dijit.setWaiRole(_8b,"presentation");_8b.id=id;_8b.className="dijitPopup";_8b.style.zIndex=_82+_81.length;_8b.style.visibility="hidden";if(_86.parent){_8b.dijitPopupParent=_86.parent.id;}dojo.body().appendChild(_8b);var s=_87.domNode.style;s.display="";s.visibility="";s.position="";_8b.appendChild(_87.domNode);var _8d=new dijit.BackgroundIframe(_8b);var _8e=_89?dijit.placeOnScreenAroundElement(_8b,_89,_88,_87.orient?dojo.hitch(_87,"orient"):null):dijit.placeOnScreen(_8b,_86,_88=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_8b.style.visibility="visible";var _8f=[];var _90=function(){for(var pi=_81.length-1;pi>0&&_81[pi].parent===_81[pi-1].widget;pi--){}return _81[pi];};_8f.push(dojo.connect(_8b,"onkeypress",this,function(evt){if(evt.keyCode==dojo.keys.ESCAPE&&_86.onCancel){dojo.stopEvent(evt);_86.onCancel();}else{if(evt.keyCode==dojo.keys.TAB){dojo.stopEvent(evt);var _93=_90();if(_93&&_93.onCancel){_93.onCancel();}}}}));if(_87.onCancel){_8f.push(dojo.connect(_87,"onCancel",null,_86.onCancel));}_8f.push(dojo.connect(_87,_87.onExecute?"onExecute":"onChange",null,function(){var _94=_90();if(_94&&_94.onExecute){_94.onExecute();}}));_81.push({wrapper:_8b,iframe:_8d,widget:_87,parent:_86.parent,onExecute:_86.onExecute,onCancel:_86.onCancel,onClose:_86.onClose,handlers:_8f});if(_87.onOpen){_87.onOpen(_8e);}return _8e;};this.close=function(_95){while(dojo.some(_81,function(_96){return _96.widget==_95;})){var top=_81.pop(),_98=top.wrapper,_99=top.iframe,_9a=top.widget,_9b=top.onClose;if(_9a.onClose){_9a.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_9a||!_9a.domNode){return;}this.prepare(_9a.domNode);_99.destroy();dojo._destroyElement(_98);if(_9b){_9b();}}};}();dijit._frames=new function(){var _9c=[];this.pop=function(){var _9d;if(_9c.length){_9d=_9c.pop();_9d.style.display="";}else{if(dojo.isIE){var _9e="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_9d=dojo.doc.createElement(_9e);}else{_9d=dojo.doc.createElement("iframe");_9d.src="javascript:\"\"";_9d.className="dijitBackgroundIframe";}_9d.tabIndex=-1;dojo.body().appendChild(_9d);}return _9d;};this.push=function(_9f){_9f.style.display="";if(dojo.isIE){_9f.style.removeExpression("width");_9f.style.removeExpression("height");}_9c.push(_9f);};}();if(dojo.isIE&&dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(_a1){if(!_a1.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _a2=dijit._frames.pop();_a1.appendChild(_a2);if(dojo.isIE){_a2.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_a1.id+"').offsetWidth");_a2.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_a1.id+"').offsetHeight");}this.iframe=_a2;}};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(_a3){var _a4=_a3.parentNode;var _a5=_a4.scrollTop+dojo.marginBox(_a4).h;var _a6=_a3.offsetTop+dojo.marginBox(_a3).h;if(_a5<_a6){_a4.scrollTop+=(_a6-_a5);}else{if(_a4.scrollTop>_a3.offsetTop){_a4.scrollTop-=(_a4.scrollTop-_a3.offsetTop);}}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo;var ie=d.isIE;var _a9=d.isOpera;var maj=Math.floor;var ff=d.isFF;var _ac={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_a9,dj_opera8:maj(_a9)==8,dj_opera9:maj(_a9)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2};for(var p in _ac){if(_ac[p]){var _ae=dojo.doc.documentElement;if(_ae.className){_ae.className+=" "+p;}else{_ae.className=p;}}}})();}if(!dojo._hasResource["dijit._base.bidi"]){dojo._hasResource["dijit._base.bidi"]=true;dojo.provide("dijit._base.bidi");dojo.addOnLoad(function(){if(!dojo._isBodyLtr()){dojo.addClass(dojo.body(),"dijitRtl");}});}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,_b0,_b1,_b2,obj,_b4,_b5){if(obj!=this._obj){this.stop();this._initialDelay=_b5||500;this._subsequentDelay=_b4||0.9;this._obj=obj;this._evt=evt;this._node=_b1;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_b0,_b2);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(_b6,_b7,_b8,_b9,_ba,_bb){return [dojo.connect(_b6,"onkeypress",this,function(evt){if(evt.keyCode==_b7.keyCode&&(!_b7.charCode||_b7.charCode==evt.charCode)&&(_b7.ctrlKey===undefined||_b7.ctrlKey==evt.ctrlKey)&&(_b7.altKey===undefined||_b7.altKey==evt.ctrlKey)&&(_b7.shiftKey===undefined||_b7.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_b7,_b8,_b6,_b9,_b7,_ba,_bb);}else{if(dijit.typematic._obj==_b7){dijit.typematic.stop();}}}),dojo.connect(_b6,"onkeyup",this,function(evt){if(dijit.typematic._obj==_b7){dijit.typematic.stop();}})];},addMouseListener:function(_be,_bf,_c0,_c1,_c2){var dc=dojo.connect;return [dc(_be,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_bf,_be,_c0,_be,_c1,_c2);}),dc(_be,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_be,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_be,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_be,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_bf,_be,_c0,_be,_c1,_c2);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_c9,_ca,_cb,_cc,_cd,_ce,_cf){return this.addKeyListener(_ca,_cb,_cc,_cd,_ce,_cf).concat(this.addMouseListener(_c9,_cc,_cd,_ce,_cf));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.doc.createElement("div");div.id="a11yTestNode";div.style.cssText="border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+dojo.moduleUrl("dojo","resources/blank.gif")+"\");";dojo.body().appendChild(div);var cs=dojo.getComputedStyle(div);if(cs){var _d2=cs.backgroundImage;var _d3=(cs.borderTopColor==cs.borderRightColor)||(_d2!=null&&(_d2=="none"||_d2=="url(invalid-url:)"));dojo[_d3?"addClass":"removeClass"](dojo.body(),"dijit_a11y");dojo.body().removeChild(div);}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{hasWaiRole:function(_d4){return _d4.hasAttribute?_d4.hasAttribute("role"):!!_d4.getAttribute("role");},getWaiRole:function(_d5){var _d6=_d5.getAttribute("role");if(_d6){var _d7=_d6.indexOf(":");return _d7==-1?_d6:_d6.substring(_d7+1);}else{return "";}},setWaiRole:function(_d8,_d9){_d8.setAttribute("role",(dojo.isFF&&dojo.isFF<3)?"wairole:"+_d9:_d9);},removeWaiRole:function(_da){_da.removeAttribute("role");},hasWaiState:function(_db,_dc){if(dojo.isFF&&dojo.isFF<3){return _db.hasAttributeNS("http://www.w3.org/2005/07/aaa",_dc);}else{return _db.hasAttribute?_db.hasAttribute("aria-"+_dc):!!_db.getAttribute("aria-"+_dc);}},getWaiState:function(_dd,_de){if(dojo.isFF&&dojo.isFF<3){return _dd.getAttributeNS("http://www.w3.org/2005/07/aaa",_de);}else{var _df=_dd.getAttribute("aria-"+_de);return _df?_df:"";}},setWaiState:function(_e0,_e1,_e2){if(dojo.isFF&&dojo.isFF<3){_e0.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_e1,_e2);}else{_e0.setAttribute("aria-"+_e1,_e2);}},removeWaiState:function(_e3,_e4){if(dojo.isFF&&dojo.isFF<3){_e3.removeAttributeNS("http://www.w3.org/2005/07/aaa",_e4);}else{_e3.removeAttribute("aria-"+_e4);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");if(dojo.isSafari){dojo.connect(window,"load",function(){window.resizeBy(1,0);setTimeout(function(){window.resizeBy(-1,0);},10);});}}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},postscript:function(_e5,_e6){this.create(_e5,_e6);},create:function(_e7,_e8){this.srcNodeRef=dojo.byId(_e8);this._connects=[];this._attaches=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_e7){this.params=_e7;dojo.mixin(this,_e7);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){for(var _e9 in this.attributeMap){var _ea=this[_e9];if(typeof _ea!="object"&&((_ea!==""&&_ea!==false)||(_e7&&_e7[_e9]))){this.setAttribute(_e9,_ea);}}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.doc.createElement("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_eb){this.destroyDescendants();this.destroy();},destroy:function(_ec){this.uninitialize();dojo.forEach(this._connects,function(_ed){dojo.forEach(_ed,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){w.destroy();});this.destroyRendering(_ec);dijit.registry.remove(this.id);},destroyRendering:function(_ef){if(this.bgIframe){this.bgIframe.destroy();delete this.bgIframe;}if(this.domNode){dojo._destroyElement(this.domNode);delete this.domNode;}if(this.srcNodeRef){dojo._destroyElement(this.srcNodeRef);delete this.srcNodeRef;}},destroyDescendants:function(){dojo.forEach(this.getDescendants(),function(_f0){_f0.destroy();});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},setAttribute:function(_f2,_f3){var _f4=this[this.attributeMap[_f2]||"domNode"];this[_f2]=_f3;switch(_f2){case "class":dojo.addClass(_f4,_f3);break;case "style":if(_f4.style.cssText){_f4.style.cssText+="; "+_f3;}else{_f4.style.cssText=_f3;}break;default:if(/^on[A-Z]/.test(_f2)){_f2=_f2.toLowerCase();}if(typeof _f3=="function"){_f3=dojo.hitch(this,_f3);}dojo.attr(_f4,_f2,_f3);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){if(this.containerNode){var _f5=dojo.query("[widgetId]",this.containerNode);return _f5.map(dijit.byNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_f7,_f8){var _f9=[];if(_f7=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){_f9.push(dojo.connect(obj,"onkeydown",this,function(e){if(e.keyCode==dojo.keys.ENTER){return (dojo.isString(_f8))?this[_f8](e):_f8.call(this,e);}else{if(e.keyCode==dojo.keys.SPACE){dojo.stopEvent(e);}}}));_f9.push(dojo.connect(obj,"onkeyup",this,function(e){if(e.keyCode==dojo.keys.SPACE){return dojo.isString(_f8)?this[_f8](e):_f8.call(this,e);}}));}_f7="onclick";}_f9.push(dojo.connect(obj,_f7,this,_f8));this._connects.push(_f9);return _f9;},disconnect:function(_fc){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_fc){dojo.forEach(_fc,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){if(!("_ltr" in this)){this._ltr=dojo.getComputedStyle(this.domNode).direction!="rtl";}return this._ltr;},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");}});}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,containerNode:null,_skipNodeCache:false,_stringRepl:function(_fe){var _ff=this.declaredClass,_100=this;return dojo.string.substitute(_fe,this,function(_101,key){if(key.charAt(0)=="!"){_101=_100[key.substr(1)];}if(typeof _101=="undefined"){throw new Error(_ff+" template:"+key);}if(!_101){return "";}return key.charAt(0)=="!"?_101:_101.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _103=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_103)){node=dijit._Templated._createNodesFromText(this._stringRepl(_103))[0];}else{node=_103.cloneNode(true);}this._attachTemplateNodes(node);var _105=this.srcNodeRef;if(_105&&_105.parentNode){_105.parentNode.replaceChild(node,_105);}this.domNode=node;if(this.widgetsInTemplate){var cw=this._supportingWidgets=dojo.parser.parse(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(_105);},_fillContent:function(_109){var dest=this.containerNode;if(_109&&dest){while(_109.hasChildNodes()){dest.appendChild(_109.firstChild);}}},_attachTemplateNodes:function(_10b,_10c){_10c=_10c||function(n,p){return n.getAttribute(p);};var _10f=dojo.isArray(_10b)?_10b:(_10b.all||_10b.getElementsByTagName("*"));var x=dojo.isArray(_10b)?0:-1;for(;x<_10f.length;x++){var _111=(x==-1)?_10b:_10f[x];if(this.widgetsInTemplate&&_10c(_111,"dojoType")){continue;}var _112=_10c(_111,"dojoAttachPoint");if(_112){var _113,_114=_112.split(/\s*,\s*/);while((_113=_114.shift())){if(dojo.isArray(this[_113])){this[_113].push(_111);}else{this[_113]=_111;}}}var _115=_10c(_111,"dojoAttachEvent");if(_115){var _116,_117=_115.split(/\s*,\s*/);var trim=dojo.trim;while((_116=_117.shift())){if(_116){var _119=null;if(_116.indexOf(":")!=-1){var _11a=_116.split(":");_116=trim(_11a[0]);_119=trim(_11a[1]);}else{_116=trim(_116);}if(!_119){_119=_116;}this.connect(_111,_116,_119);}}}var role=_10c(_111,"waiRole");if(role){dijit.setWaiRole(_111,role);}var _11c=_10c(_111,"waiState");if(_11c){dojo.forEach(_11c.split(/\s*,\s*/),function(_11d){if(_11d.indexOf("-")!=-1){var pair=_11d.split("-");dijit.setWaiState(_111,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_11f,_120,_121){var _122=dijit._Templated._templateCache;var key=_120||_11f;var _124=_122[key];if(_124){if(!_124.ownerDocument||_124.ownerDocument==dojo.doc){return _124;}dojo._destroyElement(_124);}if(!_120){_120=dijit._Templated._sanitizeTemplateString(dojo._getText(_11f));}_120=dojo.string.trim(_120);if(_121||_120.match(/\$\{([^\}]+)\}/g)){return (_122[key]=_120);}else{return (_122[key]=dijit._Templated._createNodesFromText(_120)[0]);}};dijit._Templated._sanitizeTemplateString=function(_125){if(_125){_125=_125.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _126=_125.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_126){_125=_126[1];}}else{_125="";}return _125;};if(dojo.isIE){dojo.addOnUnload(function(){var _127=dijit._Templated._templateCache;for(var key in _127){var _129=_127[key];if(!isNaN(_129.nodeType)){dojo._destroyElement(_129);}delete _127[key];}});}(function(){var _12a={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};var tn;dijit._Templated._createNodesFromText=function(text){if(tn&&tn.ownerDocument!=dojo.doc){dojo._destroyElement(tn);tn=undefined;}if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";dojo.body().appendChild(tn);}var _12d="none";var _12e=text.replace(/^\s+/,"");for(var type in _12a){var map=_12a[type];if(map.re.test(_12e)){_12d=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_12d];var _132=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _133=[];while(_132.firstChild){_133.push(_132.removeChild(_132.firstChild));}tn.innerHTML="";return _133;};})();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._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _136=dijit.byId(id);return _136.isContainer?_136:null;}}return null;},_getSibling:function(_137){var node=this.domNode;do{node=node[_137+"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");}});dojo.declare("dijit._Container",null,{isContainer:true,addChild:function(_13a,_13b){if(_13b===undefined){_13b="last";}var _13c=this.containerNode||this.domNode;if(_13b&&typeof _13b=="number"){var _13d=dojo.query("> [widgetid]",_13c);if(_13d&&_13d.length>=_13b){_13c=_13d[_13b-1];_13b="after";}}dojo.place(_13a.domNode,_13c,_13b);if(this._started&&!_13a._started){_13a.startup();}},removeChild:function(_13e){var node=_13e.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||this.domNode).map(dijit.byNode);},hasChildren:function(){var cn=this.containerNode||this.domNode;return !!this._firstElement(cn);},_getSiblingOfChild:function(_143,dir){var node=_143.domNode;var _146=(dir>0?"nextSibling":"previousSibling");do{node=node[_146];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;}});dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_147,_148){var _149=this._keyNavCodes={};var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_147,function(code){_149[code]=prev;});dojo.forEach(_148,function(code){_149[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_14e,_14f){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_14e);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusNext:function(){if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){this.focusedChild.focusNext();return;}var _150=this._getNextFocusableChild(this.focusedChild,1);if(_150.getFocalNodes){this.focusChild(_150,_150.getFocalNodes()[0]);}else{this.focusChild(_150);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _151=this._getNextFocusableChild(this.focusedChild,-1);if(_151.getFocalNodes){var _152=_151.getFocalNodes();this.focusChild(_151,_152[_152.length-1]);}else{this.focusChild(_151);}},focusChild:function(_153,node){if(_153){if(this.focusedChild&&_153!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_153;if(node&&_153.focusFocalNode){_153.focusFocalNode(node);}else{_153.focus();}}},_startupChild:function(_155){if(_155.getFocalNodes){dojo.forEach(_155.getFocalNodes(),function(node){dojo.attr(node,"tabindex",-1);this._connectNode(node);},this);}else{var node=_155.focusNode||_155.domNode;if(_155.isFocusable()){dojo.attr(node,"tabindex",-1);}this._connectNode(node);}},_connectNode:function(node){this.connect(node,"onfocus","_onNodeFocus");this.connect(node,"onblur","_onNodeBlur");},_onContainerFocus:function(evt){if(evt.target===this.domNode){this.focusFirstChild();}},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.keyCode];if(func){func();dojo.stopEvent(evt);}},_onNodeFocus:function(evt){dojo.attr(this.domNode,"tabindex",-1);var _15d=dijit.getEnclosingWidget(evt.target);if(_15d&&_15d.isFocusable()){this.focusedChild=_15d;}dojo.stopEvent(evt);},_onNodeBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabindex",this.tabIndex);}dojo.stopEvent(evt);},_onChildBlur:function(_15f){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_160,dir){if(_160){_160=this._getSiblingOfChild(_160,dir);}var _162=this.getChildren();for(var i=0;i<_162.length;i++){if(!_160){_160=_162[(dir>0)?0:(_162.length-1)];}if(_160.isFocusable()){return _160;}_160=this._getSiblingOfChild(_160,dir);}return null;}});}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],{isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_164){_164.startup();});if(!this.getParent||!this.getParent()){this.resize();this.connect(window,"onresize",function(){this.resize();});}this.inherited(arguments);},resize:function(args){var node=this.domNode;if(args){dojo.marginBox(node,args);if(args.t){node.style.top=args.t+"px";}if(args.l){node.style.left=args.l+"px";}}var mb=dojo.mixin(dojo.marginBox(node),args||{});this._contentBox=dijit.layout.marginBox2contentBox(node,mb);this.layout();},layout:function(){}});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 _16d=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_170,dim){_170.resize?_170.resize(dim):dojo.marginBox(_170.domNode,dim);dojo.mixin(_170,dojo.marginBox(_170.domNode));dojo.mixin(_170,dim);};dijit.layout.layoutChildren=function(_172,dim,_174){dim=dojo.mixin({},dim);dojo.addClass(_172,"dijitLayoutContainer");_174=dojo.filter(_174,function(item){return item.layoutAlign!="client";}).concat(dojo.filter(_174,function(item){return item.layoutAlign=="client";}));dojo.forEach(_174,function(_177){var elm=_177.domNode,pos=_177.layoutAlign;var _17a=elm.style;_17a.left=dim.l+"px";_17a.top=dim.t+"px";_17a.bottom=_17a.right="auto";dojo.addClass(elm,"dijitAlign"+_16d(pos));if(pos=="top"||pos=="bottom"){size(_177,{w:dim.w});dim.h-=_177.h;if(pos=="top"){dim.t+=_177.h;}else{_17a.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){size(_177,{h:dim.h});dim.w-=_177.w;if(pos=="left"){dim.l+=_177.w;}else{_17a.left=dim.l+dim.w+"px";}}else{if(pos=="client"){size(_177,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,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),setAttribute:function(attr,_17c){this.inherited(arguments);switch(attr){case "disabled":var _17d=this[this.attributeMap["tabIndex"]||"domNode"];if(_17c){this._hovering=false;this._active=false;_17d.removeAttribute("tabIndex");}else{_17d.setAttribute("tabIndex",this.tabIndex);}dijit.setWaiState(this[this.attributeMap["disabled"]||"domNode"],"disabled",_17c);this._setStateClass();}},setDisabled:function(_17e){dojo.deprecated("setDisabled("+_17e+") is deprecated. Use setAttribute('disabled',"+_17e+") instead.","","2.0");this.setAttribute("disabled",_17e);},_onMouse:function(_17f){var _180=_17f.currentTarget;if(_180&&_180.getAttribute){this.stateModifier=_180.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_17f.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 _181=this.connect(dojo.body(),"onmouseup",function(){this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_181);});if(this.isFocusable()){this.focus();}break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){setTimeout(dojo.hitch(this,dijit.focus,this.focusNode),0);},_setStateClass:function(){if(!("staticClass" in this)){this.staticClass=(this.stateNode||this.domNode).className;}var _182=[this.baseClass];function multiply(_183){_182=_182.concat(dojo.map(_182,function(c){return c+_183;}),"dijit"+_183);};if(this.checked){multiply("Checked");}if(this.state){multiply(this.state);}if(this.selected){multiply("Selected");}if(this.disabled){multiply("Disabled");}else{if(this.readOnly){multiply("ReadOnly");}else{if(this._active){multiply(this.stateModifier+"Active");}else{if(this._focused){multiply("Focused");}if(this._hovering){multiply(this.stateModifier+"Hover");}}}}(this.stateNode||this.domNode).className=this.staticClass+" "+_182.join(" ");},onChange:function(_185){},_onChangeMonitor:"value",_onChangeActive:false,_handleOnChange:function(_186,_187){this._lastValue=_186;if(this._lastValueReported==undefined&&(_187===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_186;}if((this.intermediateChanges||_187||_187===undefined)&&((_186&&_186.toString)?_186.toString():_186)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){this._lastValueReported=_186;if(this._onChangeActive){this.onChange(_186);}}},reset:function(){this._hasBeenBlurred=false;if(this.setValue&&!this._getValueDeprecated){this.setValue(this._resetValue,true);}else{if(this._onChangeMonitor){this.setAttribute(this._onChangeMonitor,(this._resetValue!==undefined&&this._resetValue!==null)?this._resetValue:"");}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle);}this.inherited(arguments);},setValue:function(_188){dojo.deprecated("dijit.form._FormWidget:setValue("+_188+") is deprecated.  Use setAttribute('value',"+_188+") instead.","","2.0");this.setAttribute("value",_188);},_getValueDeprecated:true,getValue:function(){dojo.deprecated("dijit.form._FormWidget:getValue() is deprecated.  Use widget.value instead.","","2.0");return this.value;},_layoutHack:function(){if(dojo.isFF==2){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.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{value:""}),postCreate:function(){this.setValue(this.value,null);},setValue:function(_18b,_18c){this.value=_18b;this._handleOnChange(_18b,_18c);},_getValueDeprecated:false,getValue:function(){return this._lastValue;},undo:function(){this.setValue(this._lastValueReported,false);},_valueChanged:function(){var v=this.getValue();var lv=this._lastValueReported;return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");},_onKeyPress:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){if(this._valueChanged()){this.undo();dojo.stopEvent(e);return false;}}return true;}});}if(!dojo._hasResource["dijit.dijit"]){dojo._hasResource["dijit.dijit"]=true;dojo.provide("dijit.dijit");}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,"class":"dijitContentPane",doLayout:"auto",postCreate:function(){this.domNode.title="";if(!this.containerNode){this.containerNode=this.domNode;}if(this.preload){this._loadCheck();}var _190=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_190);this.errorMessage=dojo.string.substitute(this.errorMessage,_190);var _191=dijit.getWaiRole(this.domNode);if(!_191){dijit.setWaiRole(this.domNode,"group");}dojo.addClass(this.domNode,this["class"]);},startup:function(){if(this._started){return;}if(this.doLayout!="false"&&this.doLayout!==false){this._checkIfSingleChild();if(this._singleChild){this._singleChild.startup();}}this._loadCheck();this.inherited(arguments);},_checkIfSingleChild:function(){var _192=dojo.query(">",this.containerNode||this.domNode),_193=_192.filter("[widgetId]");if(_192.length==1&&_193.length==1){this.isContainer=true;this._singleChild=dijit.byNode(_193[0]);}else{delete this.isContainer;delete this._singleChild;}},refresh:function(){return this._prepareLoad(true);},setHref:function(href){this.href=href;return this._prepareLoad();},setContent:function(data){if(!this._isDownloaded){this.href="";this._onUnloadHandler();}this._setContent(data||"");this._isDownloaded=false;if(this.parseOnLoad){this._createSubWidgets();}if(this.doLayout!="false"&&this.doLayout!==false){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){this._singleChild.startup();this._singleChild.resize(this._contentBox||dojo.contentBox(this.containerNode||this.domNode));}}this._onLoadHandler();},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;},destroy:function(){if(this._beingDestroyed){return;}this._onUnloadHandler();this._beingDestroyed=true;this.inherited("destroy",arguments);},resize:function(size){dojo.marginBox(this.domNode,size);var node=this.containerNode||this.domNode,mb=dojo.mixin(dojo.marginBox(node),size||{});this._contentBox=dijit.layout.marginBox2contentBox(node,mb);if(this._singleChild&&this._singleChild.resize){this._singleChild.resize(this._contentBox);}},_prepareLoad:function(_199){this.cancel();this.isLoaded=false;this._loadCheck(_199);},_isShown:function(){if("open" in this){return this.open;}else{var node=this.domNode;return (node.style.display!="none")&&(node.style.visibility!="hidden");}},_loadCheck:function(_19b){var _19c=this._isShown();if(this.href&&(_19b||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_19c&&!this._xhrDfd)||(!this.isLoaded&&_19c&&!this._xhrDfd))){this._downloadExternalContent();}},_downloadExternalContent:function(){this._onUnloadHandler();this._setContent(this.onDownloadStart.call(this));var self=this;var _19e={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(_19e,this.ioArgs);}var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_19e);hand.addCallback(function(html){try{self.onDownloadEnd.call(self);self._isDownloaded=true;self.setContent.call(self,html);}catch(err){self._onError.call(self,"Content",err);}delete self._xhrDfd;return html;});hand.addErrback(function(err){if(!hand.cancelled){self._onError.call(self,"Download",err);}delete self._xhrDfd;return err;});},_onLoadHandler:function(){this.isLoaded=true;try{this.onLoad.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code");}},_onUnloadHandler:function(){this.isLoaded=false;this.cancel();try{this.onUnload.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code");}},_setContent:function(cont){this.destroyDescendants();try{var node=this.containerNode||this.domNode;while(node.firstChild){dojo._destroyElement(node.firstChild);}if(typeof cont=="string"){if(this.extractContent){match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(match){cont=match[1];}}node.innerHTML=cont;}else{if(cont.nodeType){node.appendChild(cont);}else{dojo.forEach(cont,function(n){node.appendChild(n.cloneNode(true));});}}}catch(e){var _1a5=this.onContentError(e);try{node.innerHTML=_1a5;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}}},_onError:function(type,err,_1a8){var _1a9=this["on"+type+"Error"].call(this,err);if(_1a8){console.error(_1a8,err);}else{if(_1a9){this._setContent.call(this,_1a9);}}},_createSubWidgets:function(){var _1aa=this.containerNode||this.domNode;try{dojo.parser.parse(_1aa,true);}catch(e){this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));}},onLoad:function(e){},onUnload:function(e){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_1ad){},onDownloadError:function(_1ae){return this.errorMessage;},onDownloadEnd:function(){}});}if(!dojo._hasResource["dijit.Menu"]){dojo._hasResource["dijit.Menu"]=true;dojo.provide("dijit.Menu");dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){this._bindings=[];},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);},startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_1af){_1af.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_1b0){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.keyCode){case dojo.keys.RIGHT_ARROW:this._moveToPopup(evt);dojo.stopEvent(evt);break;case dojo.keys.LEFT_ARROW:if(this.parentMenu){this.onCancel(false);}else{dojo.stopEvent(evt);}break;}},onItemHover:function(item){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}},_onChildBlur:function(item){dijit.popup.close(item.popup);item._blur();this._stopPopupTimer();},onItemUnhover:function(item){},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(item.disabled){return false;}if(item.popup){if(!this.is_open){this._openPopup();}}else{this.onExecute();item.onClick(evt);}},_iframeContentWindow:function(_1b9){var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_1b9))||dijit.Menu._iframeContentDocument(_1b9)["__parent__"]||(_1b9.name&&dojo.doc.frames[_1b9.name])||null;return win;},_iframeContentDocument:function(_1bb){var doc=_1bb.contentDocument||(_1bb.contentWindow&&_1bb.contentWindow.document)||(_1bb.name&&dojo.doc.frames[_1bb.name]&&dojo.doc.frames[_1bb.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var win=dijit.getDocumentWindow(node.ownerDocument);if(node.tagName.toLowerCase()=="iframe"){win=this._iframeContentWindow(node);node=dojo.withGlobal(win,dojo.body);}var cn=(node==dojo.body()?dojo.doc:node);node[this.id]=this._bindings.push([dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);},unBindDomNode:function(_1c0){var node=dojo.byId(_1c0);if(node){var bid=node[this.id]-1,b=this._bindings[bid];dojo.forEach(b,dojo.disconnect);delete this._bindings[bid];}},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};_e.preventDefault=_e.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_e);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e){if(this.leftClickToOpen&&e.button>0){return;}dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;}else{var _1ca=dojo.coords(e.target,true);x=_1ca.x+10;y=_1ca.y+10;}var self=this;var _1cc=dijit.getFocus(this);function closeAndRestoreFocus(){dijit.focus(_1cc);dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},onOpen:function(e){this.isShowingNow=true;},onClose:function(){this._stopPopupTimer();this.parentMenu=null;this.isShowingNow=false;this.currentPopup=null;if(this.focusedChild){this._onChildBlur(this.focusedChild);this.focusedChild=null;}},_openPopup:function(){this._stopPopupTimer();var _1ce=this.focusedChild;var _1cf=_1ce.popup;if(_1cf.isShowingNow){return;}_1cf.parentMenu=this;var self=this;dijit.popup.open({parent:this,popup:_1cf,around:_1ce.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){dijit.popup.close(_1cf);_1ce.focus();self.currentPopup=null;}});this.currentPopup=_1cf;if(_1cf.focus){_1cf.focus();}},uninitialize:function(){dojo.forEach(this.targetNodeIds,this.unBindDomNode,this);this.inherited(arguments);}});dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\" "+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\"><div class=\"dijitMenuItemIcon ${iconClass}\" dojoAttachPoint=\"iconNode\"></div></td>"+"<td tabIndex=\"-1\" class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode,focusNode\" waiRole=\"menuitem\"></td>"+"<td class=\"dijitReset\" dojoAttachPoint=\"arrowCell\">"+"<div class=\"dijitMenuExpand\" dojoAttachPoint=\"expand\" style=\"display:none\">"+"<span class=\"dijitInline dijitArrowNode dijitMenuExpandInner\">+</span>"+"</div>"+"</td>"+"</tr>",label:"",iconClass:"",disabled:false,postCreate:function(){dojo.setSelectable(this.domNode,false);this.setDisabled(this.disabled);if(this.label){this.setLabel(this.label);}},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");try{dijit.focus(this.containerNode);}catch(e){}},_blur:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");},setLabel:function(_1d3){this.containerNode.innerHTML=this.label=_1d3;},setDisabled:function(_1d4){this.disabled=_1d4;dojo[_1d4?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.containerNode,"disabled",_1d4?"true":"false");}});dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _1d5=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_1d5[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";dojo.addClass(this.expand,"dijitMenuExpandEnabled");dojo.style(this.expand,"display","");dijit.setWaiState(this.containerNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){this.popup.destroyRecursive();delete this.popup;}this.inherited(arguments);}});dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}dojo.i18n._preloadLocalizations("dijit.nls.dijit",["ar-lb","mk-mk","xx","ln","lo","de-de","pt-br","lt","lv","es-mx","hu-hu","id-id","ROOT","aa-dj","ar-ye","es-ar","el-gr","mt-mt","ar-ma","mk","es-ni","en-mh","ml","aa","mn","ja-jp","haw","so-dj","zh-hant-mo","af","wal-et","mr","it-ch","ms","en-mp","mt","en-mt","am","el-polytoni","en-za","sid-et","en-us-posix","ps-af","zh","et-ee","es-bo","ar","as","ga-ie","nb","en-as","uz-arab","en-au","ne","nl-nl","az","aa-er","aa-et","nl-be","pt-pt","zu","nl","mr-in","nn","en-zw","be","sk-sk","th-th","bg","en-be","so-et","bn","es-cl","fa-af","tig-er","es-co","en-nz","bs","es-cr","sr-cyrl-ba","es-pa","en-bw","ca","om","en-ca","sr-ba","or","es-pr","lv-lv","es-py","es-do","sid","cs","hy-am-revised","pa","ms-my","cy","kk-kz","so-so","nb-no","gez-er","zh-mo","kw-gb","en-ph","pl","da","gez-et","en-pk","de","bn-bd","es-ec","be-by","dz-bt","ps","pt","dv","es-es","ms-bn","dz","ar-qa","ar-dz","pa-arab","gv-gb","sq-al","sh-ba","ko-kr","el","en","eo","tt-ru","fr-lu","es","et","eu","gl-es","ml-in","kn-in","fa","ro","zh-hans-cn","om-et","fi","ru","zh-cn","rw","es-sv","fo","fr","sa","es-gt","se","ar-sa","am-et","sh","as-in","he-il","en-sg","sk","ga","sl","so","en-gb","sq","sr","hy-am","sv","gl","sw","fr-be","fo-fo","es-hn","ar-sy","it-it","gu","syr","ta","gv","en-gu","te","cy-gb","th","ti","so-ke","he","tr","fr-ca","ar-tn","hi","tt","cs-cz","de-li","kok-in","es-us","fur","sr-latn","zh-hant-hk","sr-cyrl","zh-hant-tw","en-hk","fr-ch","es-uy","hr","pa-in","sw-tz","sr-latn-ba","wal","hu","hi-in","de-lu","lt-lt","hy","ca-es","es-ve","kok","nn-no","af-za","or-in","uk","ia","kl-gl","sv-fi","id","zh-hans","lo-la","zh-hant","en-um","syr-sy","el-cy","en-ie","en-us","uz","en-in","sv-se","ti-er","zh-hans-sg","is","it","ti-et","zh-sg","vi","tig","de-at","ja","en-vi","gu-in","ta-in","km-kh","is-is","de-be","byn-er","bg-bg","ru-ua","ar-jo","pl-pl","uk-ua","fi-fi","haw-us","ka","da-dk","zh-hk","sw-ke","zh-tw","gez","kk","kl","km","kn","bn-in","ko","de-ch","eu-es","kw","om-ke","sl-si","byn","ky","ro-ro","te-in","xh"]);
/** 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("com.ibm.portal.xpath");com.ibm.portal.xpath.evaluateXPath=function(_16,doc,_18){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xpath.ie.evaluateXPath(_16,doc,_18);}else{return com.ibm.portal.xpath.gecko.evaluateXPath(_16,doc,_18);}};dojo.provide("com.ibm.portal.xpath.ie");com.ibm.portal.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("com.ibm.portal.xpath.gecko");com.ibm.portal.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){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.xpath");dojo.require("com.ibm.portal.xpath");ibm.portal.xml.xpath.evaluateXPath=function(_2c,doc,_2e){return com.ibm.portal.xpath.evaluateXPath(_2c,doc,_2e);};dojo.provide("ibm.portal.xml.xpath.ie");ibm.portal.xml.xpath.ie.evaluateXPath=function(_2f,doc,_31){return com.ibm.portal.xpath.ie.evaluateXPath(_2f,doc,_31);};dojo.provide("ibm.portal.xml.xpath.gecko");ibm.portal.xml.xpath.gecko.evaluateXPath=function(_32,doc,_34){return com.ibm.portal.xpath.gecko.evaluateXPath(_32,doc,_34);};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(_35){ibm.portal.debug.entry("newTransformer",[_35]);var trf=this._getCached(_35);if(trf==null){trf=new com.ibm.portal.xslt.Transformer(_35);this._xsltMap.push({url:_35,transformer:trf});}return trf;},_getCached:function(_37){var _38=null;for(i=0;i<this._xsltMap.length;i++){var _39=this._xsltMap[i];if(_37==_39.url){_38=_39.transformer;break;}}return _38;}});dojo.declare("com.ibm.portal.xslt.Transformer",null,{constructor:function(_3a){this._xslt=com.ibm.portal.xslt.loadXsl(_3a);},transformToRegion:function(_3b,_3c,_3d,doc){if(dojo.isIE){var _3f=com.ibm.portal.xslt.transform(_3b,this._xslt,null,_3c,true);_3d.innerHTML=dojo.string.trim(_3f);}else{var _40=com.ibm.portal.xslt.gecko._transformToFragment(_3b,this._xslt,null,_3c,doc);_3d.innerHTML="";_3d.appendChild(_40);}},transformToDocument:function(_41,_42,_43){var _44=com.ibm.portal.xslt.transform(_41,this._xslt,null,_42,_43);return _44;}});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 _45=null;if(typeof ActiveXObject!="undefined"){_45=new ActiveXObject("Microsoft.XMLHTTP");}else{_45=new XMLHttpRequest();}return _45;};com.ibm.portal.xslt.loadXml=function(_46){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXml(_46);}else{return com.ibm.portal.xslt.gecko.loadXml(_46);}};com.ibm.portal.xslt.loadXmlString=function(_47){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXmlString(_47);}else{return com.ibm.portal.xslt.gecko.loadXmlString(_47);}};com.ibm.portal.xslt.loadXsl=function(_48){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXsl(_48);}else{return com.ibm.portal.xslt.gecko.loadXsl(_48);}};com.ibm.portal.xslt.transform=function(xml,xsl,_4b,_4c,_4d){ibm.portal.debug.entry("transform",[xml,xsl,_4b,_4c,_4d]);if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.transform(xml,xsl,_4b,_4c,_4d);}else{return com.ibm.portal.xslt.gecko.transform(xml,xsl,_4b,_4c,_4d);}};com.ibm.portal.xslt.transformAndUpdate=function(_4e,xml,xsl,_51,_52){ibm.portal.debug.entry("transformAndUpdate",[_4e,xml,xsl,_51,_52]);if(typeof ActiveXObject!="undefined"){var _53=com.ibm.portal.xslt.transform(xml,xsl,_51,_52,true);_4e.innerHTML=dojo.string.trim(_53);}else{var doc=_4e.ownerDocument?_4e.ownerDocument:document;var _55=com.ibm.portal.xslt.gecko._transformToFragment(xml,xsl,_51,_52,doc);_4e.innerHTML="";_4e.appendChild(_55);}ibm.portal.debug.exit("transformAndUpdate");};com.ibm.portal.xslt.ie.XSLT_PROG_IDS=["Msxml2.XSLTemplate.6.0","Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0","MSXML2.XSLTemplate"];com.ibm.portal.xslt.ie.DOM_PROG_IDS=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];com.ibm.portal.xslt.ie.FTDOM_PROG_IDS=["Msxml2.FreeThreadedDOMDocument.6.0","Msxml2.FreeThreadedDOMDocument.5.0","Msxml2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument","MSXML.FreeThreadedDOMDocument","Microsoft.FreeThreadedXMLDOM"];com.ibm.portal.xslt.ie._getMSXMLImpl=function(_56){for(var i=0;i<_56.length;i++){try{var _58=new ActiveXObject(_56[i]);if(_58){return _58;}}catch(err){}}throw new Error("No MSXML implementation exists");};com.ibm.portal.xslt.ie.loadXml=function(_59){var _5a=this._getMSXMLImpl(this.DOM_PROG_IDS);_5a.async=0;_5a.resolveExternals=0;if(!_5a.load(_59)){throw new Error("Error loading xml file "+_59);}return _5a;};com.ibm.portal.xslt.ie.loadXmlString=function(_5b){var _5c=this._getMSXMLImpl(this.DOM_PROG_IDS);_5c.async=0;_5c.resolveExternals=0;if(!_5c.loadXML(_5b)){throw new Error("Error loading xml string "+_5b);}return _5c;};com.ibm.portal.xslt.ie.loadXsl=function(_5d){var _5e=this._getMSXMLImpl(this.FTDOM_PROG_IDS);_5e.async=0;_5e.resolveExternals=0;if(!_5e.load(_5d)){throw new Error("Error loading xsl file "+_5d);}return _5e;};com.ibm.portal.xslt.ie.transform=function(_5f,xsl,_61,_62,_63){var _64=_5f;var _65=xsl;try{if(!_65.documentElement){_65=this.loadXsl(xsl);}}catch(e){var _66=e.message;throw new Error(""+_66,""+_66);}var _67=this._getMSXMLImpl(this.XSLT_PROG_IDS);_67.stylesheet=_65;var _68=_67.createProcessor();_68.input=_64;if(_62){for(var p in _62){_68.addParameter(p,_62[p]);}}if(_61){_68.addParameter("mode",_61);}if(_63){if(!_68.transform()){throw new Error("Error transforming xml doc "+_64);}return _68.output;}else{var _6a=this._getMSXMLImpl(this.DOM_PROG_IDS);_6a.async=false;_6a.validateOnParse=false;_64.transformNodeToObject(_65,_6a);return _6a;}};com.ibm.portal.xslt.gecko.loadXml=function(_6b){var _6c=null;if(dojo.isSafari){var xhr=new XMLHttpRequest();xhr.open("GET",_6b,false);xhr.send(null);if(xhr.status==200){_6c=xhr.responseXML;}}else{_6c=document.implementation.createDocument("","",null);_6c.async=0;_6c.load(_6b);}return _6c;};com.ibm.portal.xslt.gecko.loadXmlString=function(_6e){var _6f=new DOMParser();try{oXmlDoc=_6f.parseFromString(_6e,"text/xml");}catch(exc){throw new Error("Error loading xml string "+_6e);}return oXmlDoc;};com.ibm.portal.xslt.gecko.loadXsl=function(_70){var _71=null;if(dojo.isSafari){var xhr=new XMLHttpRequest();xhr.open("GET",_70,false);xhr.send(null);if(xhr.status==200){_71=xhr.responseXML;}}else{_71=document.implementation.createDocument("","",null);_71.async=0;_71.load(_70);}return _71;};com.ibm.portal.xslt.gecko._getXSLTProc=function(_73,xsl,_75,_76){var _77=xsl;if(!_77.documentElement){_77=this.loadXsl(xsl);}var _78=new XSLTProcessor();_78.importStylesheet(_77);if(_76){for(var p in _76){_78.setParameter(null,p,_76[p]);}}if(_75){_78.setParameter(null,"mode",_75);}return _78;};com.ibm.portal.xslt.gecko._transformToFragment=function(_7a,xsl,_7c,_7d,doc){var _7f=com.ibm.portal.xslt.gecko._getXSLTProc(_7a,xsl,_7c,_7d);var _80=null;_80=_7f.transformToFragment(_7a,doc);_7f.clearParameters();return _80;};com.ibm.portal.xslt.gecko.transform=function(_81,xsl,_83,_84,_85){try{var _86=null;if(!_85){var _87=com.ibm.portal.xslt.gecko._getXSLTProc(_81,xsl,_83,_84);_86=_87.transformToDocument(_81);return _86;}else{_86=com.ibm.portal.xslt.gecko._transformToFragment(_81,xsl,_83,_84,document);}var _88=new XMLSerializer();var _89=dojo.string.trim(_88.serializeToString(_86));if(dojo.isOpera&&_86.firstChild&&_86.firstChild.nodeName=="result"){var _8a=_89.indexOf("<result>")+8;var end=_89.lastIndexOf("</result>");_89=dojo.string.trim(_89.substring(_8a,end));}return _89;}catch(exc){throw new Error("Error transforming xml doc "+exc);}};com.ibm.portal.xslt.setLayerContentByXml=function(_8c,xml,xsl,_8f,_90){var _91=com.ibm.portal.xslt.transform(xml,xsl,null,_8f,_90);if(_8c.innerHTML){_8c.innerHTML=_91;}else{var obj=document.getElementById(_8c);obj.innerHTML=_91;}};dojo.provide("ibm.portal.xml.xslt");dojo.require("com.ibm.portal.xslt");ibm.portal.xml.xslt.ie={};ibm.portal.xml.xslt.gecko={};ibm.portal.xml.xslt.getXmlHttpRequest=function(){return com.ibm.portal.xslt.getXmlHttpRequest();};ibm.portal.xml.xslt.loadXml=function(_93){return com.ibm.portal.xslt.loadXml(_93);};ibm.portal.xml.xslt.loadXmlString=function(_94){return com.ibm.portal.xslt.loadXmlString(_94);};ibm.portal.xml.xslt.loadXsl=function(_95){return com.ibm.portal.xslt.loadXsl(_95);};ibm.portal.xml.xslt.transform=function(xml,xsl,_98,_99,_9a){ibm.portal.debug.entry("transform",[xml,xsl,_98,_99,_9a]);return com.ibm.portal.xslt.transform(xml,xsl,_98,_99,_9a);};ibm.portal.xml.xslt.transformAndUpdate=function(_9b,xml,xsl,_9e,_9f){ibm.portal.debug.entry("transformAndUpdate",[_9b,xml,xsl,_9e,_9f]);com.ibm.portal.xslt.transformAndUpdate(_9b,xml,xsl,_9e,_9f);ibm.portal.debug.exit("transformAndUpdate");};ibm.portal.xml.xslt.ie.loadXml=function(_a0){return com.ibm.portal.xslt.ie.loadXml(_a0);};ibm.portal.xml.xslt.ie.loadXmlString=function(_a1){return com.ibm.portal.xslt.ie.loadXmlString(_a1);};ibm.portal.xml.xslt.ie.loadXsl=function(_a2){return com.ibm.portal.xslt.ie.loadXsl(_a2);};ibm.portal.xml.xslt.ie.transform=function(_a3,xsl,_a5,_a6,_a7){return com.ibm.portal.xslt.ie.transform(_a3,xsl,_a5,_a6,_a7);};ibm.portal.xml.xslt.gecko.loadXml=function(_a8){return com.ibm.portal.xslt.gecko.loadXml(_a8);};ibm.portal.xml.xslt.gecko.loadXmlString=function(_a9){return com.ibm.portal.xslt.gecko.loadXmlString(_a9);};ibm.portal.xml.xslt.gecko.loadXsl=function(_aa){return com.ibm.portal.xslt.gecko.loadXsl(_aa);};ibm.portal.xml.xslt.gecko.transform=function(_ab,xsl,_ad,_ae,_af){return com.ibm.portal.xslt.gecko.transform(_ab,xsl,_ad,_ae,_af);};ibm.portal.xml.xslt.setLayerContentByXml=function(_b0,xml,xsl,_b3,_b4){com.ibm.portal.xslt.setLayerContentByXml(_b0,xml,xsl,_b3,_b4);};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(_b5){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(_b5);},getState:function(){return this.stateDOM;},newState:function(_b6,_b7,_b8){var _b9=null;if(_b6==null){_b9=dojox.data.dom.createDocument();}else{if(_b7==null){_b9=dojox.data.dom.createDocument(dojox.data.dom.innerXML(_b6));}else{var _ba=com.ibm.portal.xslt;var _bb=_ba.transform(_b6,_b7,null,_b8,true);_b9=dojox.data.dom.createDocument(_bb);}}return _b9;},reset:function(_bc){this.stateDOM=_bc;this.stateNode=this._getStateNode(_bc);},getSerializationManager:function(){return this.serializationManager;},newPortletAccessor:function(_bd,_be){var _bf;var _c0;if(_be==null||this.stateDOM==_be){_bf=this.stateNode;_c0=this.stateDOM;}else{_bf=this._getStateNode(_be);_c0=_be;}var _c1="state:portlet[@id='"+_bd+"']";var _c2=this._getSpecificStateNode("portlet",_c1,_bf,_c0);_c2.setAttribute("id",_bd);return new com.ibm.portal.state.PortletAccessor(_c2,_c0);},newPortletListAccessor:function(_c3){var _c4;var _c5;if(_c3==null||this.stateDOM==_c3){_c4=this.stateNode;_c5=this.stateDOM;}else{_c4=this._getStateNode(_c3);_c5=_c3;}return new com.ibm.portal.state.PortletListAccessor(_c4,_c5);},newSelectionAccessor:function(_c6){var _c7;var _c8;if(_c6==null||this.stateDOM==_c6){_c7=this.stateNode;_c8=this.stateDOM;}else{_c7=this._getStateNode(_c6);_c8=_c6;}var _c9=this._getSpecificStateNode("selection","state:selection",_c7,_c8);return new com.ibm.portal.state.SelectionAccessor(_c9,_c8);},newSoloStateAccessor:function(_ca){var _cb;var _cc;if(_ca==null||this.stateDOM==_ca){_cb=this.stateNode;_cc=this.stateDOM;}else{_cb=this._getStateNode(_ca);_cc=_ca;}var _cd=this._getSpecificStateNode("solo","state:solo",_cb,_cc);return new com.ibm.portal.state.SoloStateAccessor(_cd,_cc);},newThemeTemplateAccessor:function(_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=this._getSpecificStateNode("theme-template","state:theme-template",_cf,_d0);return new com.ibm.portal.state.ThemeTemplateAccessor(_d1,_d0);},newLocaleAccessor:function(_d2){var _d3;var _d4;if(_d2==null||this.stateDOM==_d2){_d3=this.stateNode;_d4=this.stateDOM;}else{_d3=this._getStateNode(_d2);_d4=_d2;}var _d5=this._getSpecificStateNode("locale","state:locale",_d3,_d4);return new com.ibm.portal.state.LocaleAccessor(_d5,_d4);},_getStateNode:function(_d6){var _d7="state:root/state:state[@type='navigational']";var _d8=com.ibm.portal.xpath.evaluateXPath(_d7,_d6,this.ns);var _d9=null;if(_d8==null||_d8.length<=0){var _da=_d6.firstChild;if(_da==null){_da=this._createElement(_d6,"root");this._prependChild(_da,_d6);}_d9=_da.firstChild;if(_d9==null){_d9=this._createElement(_d6,"state");this._prependChild(_d9,_da);}_d9.setAttribute("type","navigational");}else{_d9=_d8[0];}return _d9;},_getSpecificStateNode:function(_db,_dc,_dd,_de){var _df=com.ibm.portal.xpath.evaluateXPath(_dc,_dd,this.ns);var _e0;if(_df==null||_df.length<=0){_e0=this._createElement(_de,_db);this._prependChild(_e0,_dd);}else{_e0=_df[0];}return _e0;},_prependChild:function(_e1,_e2){_e2.firstChild?_e2.insertBefore(_e1,_e2.firstChild):_e2.appendChild(_e1);},_createElement:function(dom,_e4){var _e5;if(dojo.isIE){_e5=dom.createNode(1,_e4,this.ns.state);}else{_e5=dom.createElementNS(this.ns.state,_e4);}return _e5;}});dojo.declare("com.ibm.portal.state.PortletAccessor",null,{constructor:function(_e6,_e7){this.portletNode=_e6;this.stateDOM=_e7;this.parameters=new com.ibm.portal.state.Parameters(_e6,_e7);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 _e8="state:portlet-mode";var _e9=com.ibm.portal.xpath.evaluateXPath(_e8,this.portletNode,this.ns);var _ea=ibm.portal.portlet.PortletMode.VIEW;if(_e9!=null&&_e9.length>0){var _eb=_e9[0].firstChild;if(_eb!=null){_ea=_eb.nodeValue;}}return _ea;},getWindowState:function(){var _ec="state:window-state";var _ed=com.ibm.portal.xpath.evaluateXPath(_ec,this.portletNode,this.ns);var _ee=ibm.portal.portlet.WindowState.NORMAL;if(_ed!=null&&_ed.length>0){var _ef=_ed[0].firstChild;if(_ef!=null){_ee=_ef.nodeValue;}}return _ee;},getRenderParameters:function(){return this.parameters;},setPortletMode:function(_f0){var _f1="state:portlet-mode";var _f2=com.ibm.portal.xpath.evaluateXPath(_f1,this.portletNode,this.ns);if(_f2==null||_f2.length<=0){var _f3=this._createElement(this.stateDOM,"portlet-mode");this._prependChild(_f3,this.portletNode);var _f4=this.stateDOM.createTextNode(_f0);this._prependChild(_f4,_f3);}else{_f2[0].firstChild.nodeValue=_f0;}},setWindowState:function(_f5){var _f6="state:window-state";var _f7=com.ibm.portal.xpath.evaluateXPath(_f6,this.portletNode,this.ns);if(_f7==null||_f7.length<=0){var _f8=this._createElement(this.stateDOM,"window-state");this._prependChild(_f8,this.portletNode);var _f9=this.stateDOM.createTextNode(_f5);this._prependChild(_f9,_f8);}else{_f7[0].firstChild.nodeValue=_f5;}},getPortletState:function(){var _fa=dojox.data.dom.createDocument();var _fb=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_fa);_fb.setPortletMode(this.getPortletMode());_fb.setWindowState(this.getWindowState());var _fc=this.getRenderParameters().getMap();if(_fc.length>0){_fb.getRenderParameters().putAll(_fc);}return _fa;},setPortletState:function(_fd,_fe){var _ff=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_fd);this.setPortletMode(_ff.getPortletMode());this.setWindowState(_ff.getWindowState());var _100=_ff.getRenderParameters().getMap();if(_fe==null||_fe==false){this.getRenderParameters().clear();}if(_100.length>0){this.getRenderParameters().putAll(_100);}},_prependChild:function(node,_102){_102.firstChild?_102.insertBefore(node,_102.firstChild):_102.appendChild(node);},_createElement:function(dom,name){var _105;if(dojo.isIE){_105=dom.createNode(1,name,this.ns.state);}else{_105=dom.createElementNS(this.ns.state,name);}return _105;}});dojo.declare("com.ibm.portal.state.Parameters",null,{constructor:function(_106,_107){this.baseNode=_106;this.stateDOM=_107;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getMap:function(){var _108=this.getNames();var map=new Array(_108.length);for(var i=0;i<_108.length;i++){var name=_108[i];map[i]={name:name,values:this.getValues(name)};}return map;},getNames:function(){var expr="state:parameters/state:param";var _10d=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _10e=new Array();if(_10d!=null&&_10d.length>0){var _10f=_10d.length;for(var i=0;i<_10f;i++){_10e[i]=_10d[i].getAttribute("name");}}return _10e;},getValue:function(name){var _112=this.getValues(name);var _113=null;if(_112!=null&&_112.length>0){_113=_112[0];}return _113;},getValues:function(name){var expr="state:parameters/state:param[@name='"+name+"']/state:value";var _116=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _117=null;if(_116!=null&&_116.length>0){_117=new Array(_116.length);var _118=_116.length;for(var i=0;i<_118;i++){var _11a=_116[i].firstChild;if(_11a!=null){_117[i]=_11a.nodeValue;}}}return _117;},remove:function(name){var expr="state:parameters/state:param[@name='"+name+"']";var _11d=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_11d!=null){var _11e=_11d[0];if(_11e&&_11e.parentNode){_11e.parentNode.removeChild(_11e);}}},putAll:function(map){if(map!=null&&map.length>0){for(var i=map.length-1;i>=0;i--){var _121=map[i].name;var _122=map[i].values;this.setValues(_121,_122);}}},setValue:function(name,_124){this.setValues(name,new Array(_124));},setValues:function(name,_126){var expr="state:parameters/state:param[@name='"+name+"']";var _128=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _129;if(_128==null||_128.length==0){var _12a=null;if(_12a==null){_12a=this._createElement(this.stateDOM,"parameters");this._prependChild(_12a,this.baseNode);}_129=this._createElement(this.stateDOM,"param");_129.setAttribute("name",name);this._prependChild(_129,_12a);}else{_129=_128[0];dojox.data.dom.removeChildren(_129);}if(_126!=null){for(var i=_126.length-1;i>=0;i--){var _12c=this._createElement(this.stateDOM,"value");this._prependChild(_12c,_129);var _12d=_126[i];if(_12d!=null){var _12e=this.stateDOM.createTextNode(_12d);this._prependChild(_12e,_12c);}}}},clear:function(){var expr="state:parameters";var _130=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_130!=null){var _131=_130[0];if(_131&&_131.parentNode){_131.parentNode.removeChild(_131);}}},_getFirstChildWithTag:function(_132,_133){if(!_132||!_133){return null;}var node=_132.firstChild;while(node){if(node.nodeType==1&&node.tagName&&node.tagName.toLowerCase()==_133.toLowerCase()){return node;}node=node.nextSibling;}return null;},_prependChild:function(node,_136){_136.firstChild?_136.insertBefore(node,_136.firstChild):_136.appendChild(node);},_createElement:function(dom,name){var _139;if(dojo.isIE){_139=dom.createNode(1,name,this.ns.state);}else{_139=dom.createElementNS(this.ns.state,name);}return _139;}});dojo.declare("com.ibm.portal.state.PortletListAccessor",null,{constructor:function(_13a,_13b){this.stateNode=_13a;this.stateDOM=_13b;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPortlets:function(){var expr="state:portlet";var _13d=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);var _13e=null;if(_13d!=null&&_13d.length>0){_13e=new Array(_13d.length);for(var i=0;i<_13d.length;i++){var node=_13d[i];_13e[i]=node.getAttribute("id");}}return _13e;}});dojo.declare("com.ibm.portal.state.SelectionAccessor",null,{constructor:function(_141,_142){this.selectionNode=_141;this.stateDOM=_142;this.parameters=new com.ibm.portal.state.Parameters(this.selectionNode,_142);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 _143=this.getParameters();var _144=_143.getValues("frg");var _145=null;if(_144!=null&&_144.length>0){_145=_144[0];if(_144.length>1){if(_145=="pw"){_145=_144[1];}}}return _145;},getMapping:function(_146){var expr="state:mapping[@src='"+_146+"']";var _148=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _149=null;if(_148!=null&&_148.length>0){var _14a=_148[0];_149=_14a.getAttribute("dst");}return _149;},getParameters:function(){return this.parameters;},setPageSelection:function(_14b){this.selectionNode.setAttribute("selection-node",_14b);},setFragmentSelection:function(_14c,_14d){var _14e=this.getParameters();if(_14d==null||_14d==true){var _14f=new Array(2);_14f[0]=_14c;_14f[1]="pw";_14e.setValues("frg",_14f);}else{_14e.setValue("frg",_14c);}},setMapping:function(_150,_151){if(_151!=null){var expr="state:mapping[@src='"+_150+"']";var _153=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _154;if(_153!=null&&_153.length>0){_154=_153[0];}else{_154=this._createElement(this.stateDOM,"mapping");this._prependChild(_154,this.selectionNode);_154.setAttribute("src",_150);}_154.setAttribute("dst",_151);}else{this.removeMapping(_150);}},removeMapping:function(_155){var expr="state:mapping[@src='"+_155+"']";var _157=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _158=false;if(_157!=null&&_157.length>0){for(var i=0;i<_157.length;i++){var _15a=_157[i];if(_15a&&_15a.parentNode){_15a.parentNode.removeChild(_15a);}}_158=true;}return _158;},_prependChild:function(node,_15c){_15c.firstChild?_15c.insertBefore(node,_15c.firstChild):_15c.appendChild(node);},_createElement:function(dom,name){var _15f;if(dojo.isIE){_15f=dom.createNode(1,name,this.ns.state);}else{_15f=dom.createElementNS(this.ns.state,name);}return _15f;},getSelection:function(){return this.getPageSelection();},setSelection:function(_160){this.setPageSelection(_160);}});dojo.declare("com.ibm.portal.state.SoloStateAccessor",null,{constructor:function(_161,_162){this.soloNode=_161;this.stateDOM=_162;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setSoloPortlet:function(_163){dojox.data.dom.removeChildren(this.soloNode);if(_163!=null){var _164=this.stateDOM.createTextNode(_163);this._prependChild(_164,this.soloNode);}},getSoloPortlet:function(){var _165=this.soloNode.firstChild;if(_165!=null){return _165.nodeValue;}else{return null;}},setReturnSelection:function(_166){this.soloNode.setAttribute("return-selection",_166);},getReturnSelection:function(){return this.soloNode.getAttribute("return-selection");},_prependChild:function(node,_168){_168.firstChild?_168.insertBefore(node,_168.firstChild):_168.appendChild(node);}});dojo.declare("com.ibm.portal.state.ThemeTemplateAccessor",null,{constructor:function(_169,_16a){this.themeTemplateNode=_169;this.stateDOM=_16a;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setThemeTemplate:function(_16b){dojox.data.dom.removeChildren(this.themeTemplateNode);if(_16b!=null){var _16c=this.stateDOM.createTextNode(_16b);this._prependChild(_16c,this.themeTemplateNode);}},getThemeTemplate:function(){var _16d=this.themeTemplateNode.firstChild;if(_16d!=null){return _16d.nodeValue;}else{return null;}},_prependChild:function(node,_16f){_16f.firstChild?_16f.insertBefore(node,_16f.firstChild):_16f.appendChild(node);}});dojo.declare("com.ibm.portal.state.LocaleAccessor",null,{constructor:function(_170,_171){this.localeNode=_170;this.stateDOM=_171;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setLocale:function(_172){dojox.data.dom.removeChildren(this.localeNode);if(_172!=null){var _173=this.stateDOM.createTextNode(_172);this._prependChild(_173,this.localeNode);}},getLocale:function(){var _174=this.localeNode.firstChild;if(_174!=null){return _174.nodeValue;}else{return null;}},_prependChild:function(node,_176){_176.firstChild?_176.insertBefore(node,_176.firstChild):_176.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(_177){this.serviceURL=_177;},serialize:function(_178,_179,_17a){ibm.portal.debug.entry("SerializationManager.serialize",[dojox.data.dom.innerXML(_178),_179,_17a]);var _17b=dojox.data.dom.innerXML(_178);var _17c=escape(_17b);var _17d=this._getMimeType();var _17e=null;var me=this;ibm.portal.debug.text("Mime type for response: "+_17d);ibm.portal.debug.text("Length of encoded state XML is: "+_17c.length);ibm.portal.debug.text("Encoded state XML is: "+_17c);var _180=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_180);if(_17c.length<=this.STATE_THRESHOLD){var _181=this.STATE_URI_SCHEME+":"+_17c;var _182;_179=(_179!=null&&_179==true);if(_179==true){if(_180!=null){_182={"uri":_181,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true","digest":_180};}else{_182={"uri":_181,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true"};}}else{if(_180!=null){_182={"uri":_181,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_180};}else{_182={"uri":_181,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}}ibm.portal.debug.text("Doing a GET request: { url: \""+this.serviceURL+"\", sync: "+((_17a)?false:true)+", content: "+_182+", handleAs: "+_17d+", transport: XMLHTTPRequest");ibm.portal.debug.text("Parameters: uri=\""+_182.uri+"\" mode=\""+_182.mode+"\" xmlns=\""+_182.xmlns+"\"");dojo.xhrGet({url:this.serviceURL,sync:(_17a)?false:true,content:_182,handleAs:_17d,handle:function(_183,_184){ibm.portal.debug.text("Response: "+_183);_17e=me._handleSerializationResponse.call(me,_183,_17a,_178,_179);return _183;},transport:"XMLHTTPTransport"});}else{ibm.portal.debug.text("Doing a POST request.");if(dojo.isIE){var idx=_17b.indexOf("UTF-16");if(idx>=0){_17b=_17b.replace(/UTF-16/,"UTF-8");}}var url=this.serviceURL+"?uri="+this.STATE_URI_POST+"&xmlns="+this.STATE_NS_URI;if(_180!=null){url+="&digest="+_180;}dojo.rawXhrPost({url:url,sync:(_17a)?false:true,postData:_17b,handleAs:_17d,headers:{"Content-Type":"text/xml"},handle:function(_187,_188){_17e=me._handleSerializationResponse.call(me,_187,_17a,_178,_179);return _187;},transport:"XMLHTTPTransport"});}ibm.portal.debug.exit("SerializationManager.serialize",_17e);return _17e;},deserialize:function(url,_18a){var _18b=this.STATE_URI_SCHEME+":"+url;var _18c=null;var _18d=this._getMimeType();var me=this;var _18f=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_18f);var _190;if(_18f!=null){_190={"uri":_18b,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_18f};}else{_190={"uri":_18b,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}dojo.xhrGet({url:this.serviceURL,sync:(_18a)?false:true,content:_190,handleAs:_18d,handle:function(_191,_192){var type=(_191 instanceof Error)?"error":"load";if(type=="load"){var _194=me._getResponseXML(_191);if(_194.documentElement.nodeName=="parsererror"){_194=dojox.data.dom.createDocument();}if(_18a){_18a(1,url,_194);}else{_18c={"status":1,"input":me.serviceURL,"url":me.serviceURL,"returnObject":_194,"state":_194};}}else{if(type=="error"){if(_18a){_18a(2,url,null);}else{_18c={"status":2,"input":me.serviceURL,"url":me.serviceURL,"returnObject":null,"state":null};}}}},transport:"XMLHTTPTransport"});return _18c;},_handleSerializationResponse:function(_195,_196,_197,_198){var _199=null;var type=(_195 instanceof Error)?"error":"load";if(type=="load"){var _19b=this._getResponseXML(_195);var _19c="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 _19e=null;var _19f=com.ibm.portal.xpath.evaluateXPath(_19c,_19b,ns);if(_19f!=null&&_19f.length>0){_19e=_19f[0].getAttribute("href");}var _1a0=_197;if(_198==true){var _1a1="atom:entry/atom:content/state:root";var _1a2=com.ibm.portal.xpath.evaluateXPath(_1a1,_19b,ns);if(_1a2!=null&&_1a2.length>0){var _1a3=dojox.data.dom.innerXML(_1a2[0]);_1a0=dojox.data.dom.createDocument(_1a3);}}if(_196){_196(1,_1a0,_19e);}else{_199={"status":1,"input":_1a0,"state":_1a0,"returnObject":_19e,"url":_19e};}}else{if(type=="error"){if(_196){_196(this.STATUS_ERROR,_197,null);}else{_199={"status":this.STATUS_ERROR,"input":_197,"state":_197,"returnObject":null,"url":null};}}}return _199;},_getMimeType:function(){var _1a4="xml";if(dojo.isIE){_1a4="text";}return _1a4;},_getResponseXML:function(data){var _1a6=data;if(dojo.isIE){_1a6=dojox.data.dom.createDocument(data);}return _1a6;},_encodeAscii:function(str){var ret=str;if(dojo.isString(ret)){var _1a9=escape(ret);var _1aa=/%u([A-F0-9][A-F0-9][A-F0-9][A-F0-9])/i;var _1ab=null;while((_1ab=_1a9.match(_1aa))){ret+=_1a9.substring(0,_1ab.index)+escape(Number("0x"+_1ab[1]));_1a9=_1a9.substring(_1ab.index+_1ab[0].length);}ret+=_1a9;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,_1ad){var _1ae=this._findBucket(id);if(_1ae==null){_1ae={"id":id,"expr":null};this._expr.push(_1ae);}_1ae.expr=_1ad;},getExpressions:function(id){var _1b0=null;var _1b1=this._findBucket(id);if(_1b1!=null){_1b0=_1b1.expr;}return _1b0;},_findBucket:function(id){var _1b3=null;for(i=0;i<this._expr.length;i++){var temp=this._expr[i];if(temp.id==id){_1b3=temp;break;}}return _1b3;}});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,_1b6){window.console.log(str);};ibm.portal.debug.entry=function(_1b7,args){var _1b9=_1b7+" --> entry; { ";if(args&&args.length>0){for(arg in args){_1b9=_1b9+args[arg]+" ";}}_1b9=_1b9+" } ";ibm.portal.debug.text(_1b9,_1b7);};ibm.portal.debug.exit=function(_1ba,_1bb){var _1bc=_1ba+" --> exit;";if(typeof (_1bb)!="undefined"){_1bc=_1bc+" { "+_1bb+" } ";}ibm.portal.debug.text(_1bc,_1ba);};ibm.portal.debug.escapeXmlForHTMLDisplay=function(_1bd){_1bd=_1bd.replace(/</g,"&lt;");_1bd=_1bd.replace(/>/g,"&gt;");return _1bd;};dojo.provide("com.ibm.portal.EventBroker");dojo.require("com.ibm.portal.debug");dojo.declare("com.ibm.portal.Event",null,{constructor:function(_1be){this.eventName=_1be;this._listeners=new Array();},fire:function(_1bf){ibm.portal.debug.text("Firing event: "+this.eventName+" with parameters: ");dojo.publish(this.eventName,[_1bf]);},register:function(_1c0,_1c1){if(!_1c1){return dojo.subscribe(this.eventName,null,_1c0);}else{return dojo.subscribe(this.eventName,_1c0,_1c1);}},unregister:function(_1c2){dojo.unsubscribe(_1c2);},cancel:function(_1c3){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"),beforeSnapShot:new com.ibm.portal.Event("portal/BeforeSnapShot"),afterSnapShot:new com.ibm.portal.Event("portal/AfterSnapShot"),restorePointUpdated:new com.ibm.portal.Event("portal/RestorePointUpdated"),clearRestorePoint:new com.ibm.portal.Event("portal/ClearRestorePoint"),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(_1c8){ibm.portal.debug.entry("findPortletID",[_1c8]);var id="";var _1ca=_1c8.parentNode;while(_1ca&&id.length==0){ibm.portal.debug.text("examining element "+_1ca.tagName+"; class="+_1ca.className,"findPortletID");if(_1ca.className&&(_1ca.className.match(/\bwpsPortletBody\b/)||_1ca.className.match(/\bwpsPortletBodyInlineMode\b/))){id=_1ca.id;var _1cb=id.indexOf("_mode");if(_1cb>=0){id=id.substring(0,_1cb);}}_1ca=_1ca.parentNode;}if(id.indexOf("portletActions_")>=0){id=id.substring("portletActions_".length);}ibm.portal.debug.exit("findPortletID",[id]);return id;},findFormByElement:function(_1cc){var _1cd=_1cc;while(_1cd){if(_1cd.tagName&&_1cd.tagName.toLowerCase()=="form"){break;}_1cd=_1cd.parentNode;}return _1cd;},encodeURI:function(uri){ibm.portal.debug.entry("encodeURI",[uri]);var _1cf=uri;var _1d0=uri.lastIndexOf(":");while(_1d0>=0){var _1d1=_1cf.substring(0,_1d0);var part=_1cf.substring(_1d0+1);_1cf=_1d1+":"+encodeURIComponent(part);_1d0=_1d1.lastIndexOf(":");}_1cf=encodeURIComponent(_1cf);ibm.portal.debug.exit("encodeURI",[_1cf]);return _1cf;},decodeURI:function(uri){ibm.portal.debug.entry("decodeURI",[uri]);var _1d4=decodeURIComponent(uri);var _1d5=_1d4.indexOf(":");while(_1d5>=0){var _1d6=_1d4.substring(0,_1d5);var part=_1d4.substring(_1d5+1);_1d4=_1d6+":"+decodeURIComponent(part);_1d5=_1d4.indexOf(":",_1d5+1);}ibm.portal.debug.exit("decodeURI",[_1d4]);return _1d4;},getSelectionNodeId:function(_1d8){ibm.portal.debug.entry("getSelectionNodeId",[_1d8]);var _1d9=_1d8.split("@oid:");ibm.portal.debug.exit("getSelectionNodeId",[_1d9[1]]);return _1d9[1];},getControlId:function(_1da){ibm.portal.debug.entry("_getControlId",[_1da]);var _1db=_1da.split("@oid:");var _1dc=_1db[0].split("oid:");ibm.portal.debug.exit("getControlId",[_1dc[1]]);return _1dc[1];},overwriteProperty:function(obj,_1de,_1df,_1e0){ibm.portal.debug.entry("overwriteProperty",[obj,_1de,_1df,_1e0]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}if(!_1e0){_1e0=false;}var _1e1=(_1e0&&(obj["_overwritten_"][_1de]!=null));if(!_1e1){if(obj["_overwritten_"][_1de]==null){obj["_overwritten_"][_1de]=obj[_1de];}else{obj["_overwritten_"][_1de]=null;}obj[_1de]=_1df;ibm.portal.debug.text("Property overwrite successful!");}ibm.portal.debug.exit("overwriteProperty");},restoreProperty:function(obj,_1e3){ibm.portal.debug.entry("utilities.restoreProperty",[obj,_1e3]);var _1e4=obj[_1e3];if(obj["_overwritten_"]!=null){ibm.portal.debug.text("overwritten property value: "+obj["_overwritten_"]);obj[_1e3]=obj["_overwritten_"][_1e3];obj["_overwritten_"][_1e3]=null;}else{obj[_1e3]=null;}ibm.portal.debug.exit("utilities.restoreProperty",_1e4);return _1e4;},getOverwrittenProperty:function(obj,_1e6){if(obj["_overwritten_"]){return obj["_overwritten_"][_1e6];}else{return null;}},setOverwrittenProperty:function(obj,_1e8,_1e9){ibm.portal.debug.entry("utilities.setOverwrittenProperty",[obj,_1e8,_1e9]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}obj["_overwritten_"][_1e8]=_1e9;ibm.portal.debug.exit("utilities.setOverwrittenProperty");},callOverwrittenFunction:function(_1ea,_1eb,args){ibm.portal.debug.entry("utilities.callOverwrittenFunction",[_1ea,_1eb,args]);var _1ed=null;var _1ee=this.getOverwrittenProperty(_1ea,_1eb);ibm.portal.debug.text("Overwritten property: "+_1ee);ibm.portal.debug.text("old property's apply function: "+_1ee.apply);if(args){_1ed=_1ee.apply(_1ea,args);}else{_1ed=_1ee.apply(_1ea);}ibm.portal.debug.exit("utilities.callOverwrittenFunction",_1ed);return _1ed;},isExternalUrl:function(_1ef){ibm.portal.debug.entry("isExternalUrl",[_1ef]);var host=window.location.host;var _1f1=window.location.protocol;var _1f2=_1ef.split("?")[0];var _1f3=!(_1f2.indexOf("://")<0||(_1f2.indexOf(_1f1)==0&&_1f2.indexOf(host)==_1f1.length+2));ibm.portal.debug.text("urlStringNoQuery.indexOf(\"://\") = "+_1f2.indexOf("://"));ibm.portal.debug.text("urlStringNoQuery.indexOf(protocol) = "+_1f2.indexOf(_1f1));ibm.portal.debug.exit("isExternalUrl",_1f3);return _1f3;},isJavascriptUrl:function(_1f4){ibm.portal.debug.entry("isJavascriptUrl",[_1f4]);var url=com.ibm.portal.utilities.string.trim(_1f4.toLowerCase());var _1f6=(url.indexOf("javascript:")==0);ibm.portal.debug.exit("isJavascriptUrl",_1f6);return _1f6;},isPortalUrl:function(_1f7){ibm.portal.debug.entry("utilities.isPortalUrl",[_1f7]);var _1f8=(_1f7.indexOf(ibmPortalConfig["portalURI"])>=0);ibm.portal.debug.exit("utilities.isPortalUrl",_1f8);return _1f8;},addExternalNode:function(doc,node){var _1fb=null;if(doc.importNode){_1fb=doc.importNode(node,true);}else{_1fb=node;}doc.appendChild(_1fb);},decodeXML:function(_1fc){ibm.portal.debug.entry("decodeXML",[_1fc]);var _1fd=_1fc.replace(/&amp;/g,"&");var _1fe=_1fd.replace(/&amp;/g,"&");_1fd=_1fe.replace(/&#039;/g,"'");_1fe=_1fd.replace(/&#034;/g,"\"");_1fe=_1fe.replace(/&lt;/g,"<");_1fe=_1fe.replace(/&gt;/g,">");ibm.portal.debug.exit("decodeXML",[_1fe]);return _1fe;},eventHandlerToString:function(_1ff){var _200=_1ff.toString();var _201=_200.indexOf("{");var _202=_200.lastIndexOf("}");onclickStr=_200.substring(_201+1,_202);return onclickStr;},_waitingForScript:false,_isWaitingForScript:function(){return com.ibm.portal.utilities._waitingForScript;},stopWaitingForScript:function(){com.ibm.portal.utilities._waitingForScript=false;},waitFor:function(_203,_204,_205,args){var _207=setInterval(function(){if(_203()){clearInterval(_207);if(!args){_205();}else{_205(args);}}},_204);},waitForScript:function(_208,args){com.ibm.portal.utilities._waitingForScript=true;com.ibm.portal.utilities.waitFor(function(){return (!com.ibm.portal.utilities._isWaitingForScript());},500,_208,args);}};com.ibm.portal.utilities.string={findNext:function(_20a,_20b,from){ibm.portal.debug.entry("string.findNext",[_20a,_20b]);var _20d=-1;for(var i=0;i<_20b.length;i++){var _20f=null;if(from){_20f=from+_20b[i].length;}var _210=_20a.indexOf(_20b[i],_20f);if(_210>-1&&(_210<_20d||_20d==-1)){_20d=_210;}}ibm.portal.debug.exit("string.findNext",[_20d]);return _20d;},contains:function(_211,_212){ibm.portal.debug.entry("string.contains",[_211,_212]);var _213=false;if(_211!=null&&_212!=null){_213=(_211.indexOf(_212)!=-1);}ibm.portal.debug.exit("string.contains",[_213]);return _213;},strip:function(_214,_215){ibm.portal.debug.entry("string.strip",[_214,_215]);var _216=_214.replace(new RegExp(_215,"g"),"");ibm.portal.debug.exit("string.strip",[_216]);return _216;},properCase:function(_217){if(_217==null||_217.length<1){return "";}ibm.portal.debug.entry("string.properCase",[_217]);var _218=_217.charAt(0).toUpperCase();if(_217.length>1){_218+=_217.substring(1).toLowerCase();}ibm.portal.debug.exit("string.properCase",[_218]);return _218;},trim:function(_219){ibm.portal.debug.entry("string.trim",[_219]);var _21a=_219;_21a=_21a.replace(/^\s+/,"");_21a=_21a.replace(/\s+$/,"");ibm.portal.debug.exit("string.trim",_21a);return _21a;}};dojo.declare("com.ibm.portal.utilities.HttpUrl",null,{constructor:function(_21b){this.scheme="http://";this.server=this._extractServer(_21b);this.port=this._extractPort(_21b);this.path=this._extractPath(_21b);this.query=this._extractQuery(_21b);this.anchor="";},addParameter:function(name,_21d){this.query+="&"+name+"="+_21d;},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(_21f){var _220=_21f.indexOf(this.scheme);var _221="";if(_220==0){var _222=_21f.indexOf("/",_220+this.scheme.length);var _223=_21f.substring(_220+this.scheme.length,_222);_221=_223.split(":")[0];}return _221;},_extractPort:function(_224){var _225=_224.indexOf(this.server);var _226="";if(_225>=0){var _227=_224.indexOf("/",_225);var _228=_224.substring(_225,_227);var _229=_228.split(":");if(_229.length>1){_226=_229[1];}}return _226;},_extractPath:function(_22a){var _22b=_22a.indexOf(this.server);var _22c="";if(_22b>=0){var _22d=_22a.indexOf("/",_22b);var _22e=_22a.indexOf("?");var _22f=_22a.lastIndexOf("#");if(_22e>=0){_22c=_22a.substring(_22d+1,_22e);}else{if(_22f>=0){_22c=_22a.substring(_22d+1,_22f);}else{_22c=_22a.substring(_22d+1);}}}return _22c;},_extractQuery:function(_230){var _231="";var _232=_230.split("?");if(_232.length>1){_231=_232[1].split("#")[0];}return _231;},_extractAnchor:function(_233){var _234="";var _235=_233.split("#");if(_235.length>1){_234=_235[_235.length-1];}return _234;}});dojo.provide("com.ibm.portal.utilities.html");dojo.require("com.ibm.portal.utilities");com.ibm.portal.utilities.html={createAnchor:function(_236,href,id,_239,_23a){ibm.portal.debug.entry("SkinRenderer.createAnchor",[_236,href,id,_239,_23a]);var _23b=document.createElement("A");_23b.href=href;if(id){_23b.id=id;}if(_23a){_23b.className=_23a;}if(_239){_23b.appendChild(document.createTextNode(_239));}_236.appendChild(_23b);ibm.portal.debug.exit("SkinRenderer.createAnchor",[_23b]);return _23b;},createButton:function(_23c,href,id,_23f,_240){ibm.portal.debug.entry("SkinRenderer.createButton",[_23c,href,id,_23f,_240]);var _241=document.createElement("BUTTON");if(href){_241.href=href;}if(id){_241.id=id;}if(_240){_241.className=_240;}if(_23f){_241.appendChild(document.createTextNode(_23f));}_23c.appendChild(_241);ibm.portal.debug.exit("SkinRenderer.createButton",[_241]);return _241;},createImage:function(_242,src,id,_245,_246){ibm.portal.debug.entry("SkinRenderer.createImage",[_242,src,id,_245,_246]);var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_245){img.alt=_245;img.setAttribute("title",_245);if(_242.nodeName=="BUTTON"){_242.setAttribute("title",_245);}}if(_246){img.className=_246;}_242.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImage",[img]);return img;},createImageAnchor:function(_248,src,id,_24b,_24c){ibm.portal.debug.entry("SkinRenderer.createImageAnchor",[_248,src,id,_24b,_24c]);var _24d=com.ibm.portal.utilities.html.createAnchor(_248,"javascript:void(0);");var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_24b){img.alt=_24b;img.title=_24b;}if(_24c){img.className=_24c;}_24d.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImageAnchor",[img]);return _24d;},createTemporaryMarkupDiv:function(_24f){ibm.portal.debug.entry("html.createTemporaryMarkupDiv");var _250={markup:_24f,objects:{}};if(dojo.isIE){_250=com.ibm.portal.utilities.html.extractObjectElementsFromString(_24f);}var div=document.createElement("DIV");div.innerHTML="<p style='display: none;'>&nbsp;</p>"+_250.markup;ibm.portal.debug.exit("html.createTemporaryMarkupDiv",[div]);return {node:div,objects:_250.objects};},extractObjectElementsFromString:function(_252){var _253={};var _254=/<object/gi;var _255=/<\/object>/gi;var _256=_252;var _257=null;try{_257=_254.exec(_256);if(_257&&_257.index>-1){var _258=_257.index;var buf;var end;var _25b;var id;while(_258>-1){buf=_256.substring(0,_258);end=_256.indexOf(">",_258);if(_256.charAt(end-1)=="/"){_254.lastIndex=end;_257=_254.exec(_256);if(_257){_258=_257.index;continue;}else{break;}}_255.lastIndex=_258;_257=_255.exec(_256);if(_257){end=_257.index;}else{break;}_25b=_256.substring(_258,end+9);id=dojo.dnd.getUniqueId();_256=buf+"<div id='"+id+"'></div>"+_256.substring(end+9);_253[id]=_25b;_254.lastIndex=0;_257=_254.exec(_256);if(_257){_258=_257.index;}else{break;}}}_252=_256;}catch(e){_253={};}return {markup:_252,objects:_253};},replaceObjectElementsInMarkup:function(_25d){for(var id in _25d){var _25f=dojo.byId(id);if(_25f){_25f.outerHTML=_25d[id];}}},removeNodesOnCondition:function(node,_261){if(!_261){_261=function(){return false;};}if(node&&node.childNodes){for(var i=0;i<node.childNodes.length;i++){if(_261(node.childNodes[i])){var _263=node.childNodes[i];node.removeChild(_263);delete _263;i--;}else{this.removeNodesOnCondition(node.childNodes[i],_261);}}}},getElementsByTagNames:function(_264){ibm.portal.debug.entry("html.getElementsByTagNames",[_264]);var _265=new Array();for(var i=1;i<arguments.length;i++){var _267=_264.getElementsByTagName(arguments[i]);ibm.portal.debug.text("found "+_267.length+" "+arguments[i]+" tags.");for(var j=0;j<_267.length;j++){_265.push(_267[j]);}}ibm.portal.debug.exit("html.getElementsByTagNames",[_265]);return _265;},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(_26d,_26e){ibm.portal.debug.entry("html.convertFormToQuery",[_26d,_26e]);var _26f=this.getElementsByTagNames(_26d,"input","select","textarea","button");var _270="";var _271="&";var _272="=";var _273=0;for(var i=0;i<_26f.length;i++){var _275=this.convertInputToNameValuePairs(_26f[i],_26e);for(var k=0;k<_275.length;k++){var pair=_275[k];if(pair.name!=""){if(_273!=0){_270+=_271;}_270+=encodeURIComponent(pair.name);for(var j=0;j<pair.values.length;j++){if(j==0){_270+=(_272+encodeURIComponent(pair.values[j]));}else{_270+=(_271+encodeURIComponent(pair.name)+_272+encodeURIComponent(pair.values[j]));}}_273=_273+1;}}}ibm.portal.debug.exit("html.convertFormToQuery",_270);return _270;},convertInputToNameValuePairs:function(_279,_27a){ibm.portal.debug.entry("html.convertInputToNameValuePairs",[_279,_27a]);var type=_279.type;ibm.portal.debug.text("Input type is: "+type);ibm.portal.debug.text("Input name is: "+_279.name);var name="";var _27d=[];var _27e=[];if(!_279.disabled){switch(type.toLowerCase()){case "text":case "password":case "hidden":name=_279.name;_27d.push(_279.value);_27e.push({name:name,values:_27d});break;case "reset":case "button":if(!_27a||(_279.name==_27a.name&&_279.value==_27a.value)){name=_279.name;_27d.push(_279.value);_27e.push({name:name,values:_27d});}break;case "radio":case "checkbox":if(_279.checked){name=_279.name;_27d.push(_279.value);}_27e.push({name:name,values:_27d});break;case "image":if(!_27a||_279.name==_27a){name=_279.name;if(_279.value){_27d.push(_279.value);_27e.push({name:name,values:_27d});}_27e.push({name:name+".x",values:[this.getX(_279)]});_27e.push({name:name+".y",values:[this.getY(_279)]});}break;case "submit":if(!_27a||(_279.name==_27a.name&&_279.value==_27a.value)){name=_279.name;if(_279.value){_27d.push(_279.value);}_27e.push({name:name,values:_27d});}break;case "select-one":case "select-multiple":name=_279.name;for(var i=0;i<_279.options.length;i++){if(_279.options[i].selected){var _280=_279.options[i].value?_279.options[i].value:_279.options[i].text;_27d.push(_280);}}if(_27d.length!=0){_27e.push({name:name,values:_27d});}break;case "file":break;default:name=_279.name;_27d.push(_279.value);_27e.push({name:name,values:_27d});}}ibm.portal.debug.exit("html.convertInputToNameValuePairs",_27e);return _27e;},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 _286=false;while(node&&!_286){if(node==ref){_286=true;}node=node.parentNode;}return _286;}};dojo.provide("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.EventBroker");dojo.declare("com.ibm.portal.services.ContentHandlerURL",null,{constructor:function(uri,_288,verb,_28a){ibm.portal.debug.entry("ContentHandlerURL.constructor",[uri,_288,verb,_28a]);if(uri==null){return null;}if(!_288){_288=2;}var _28b=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _28c=_28b.getLocale();if(_28c){if(_28a){_28a+="&locale="+_28c;}else{_28a="&locale="+_28c;}}this.url="";if(uri.charAt(0)=="?"){this.url=this._fromQueryString(uri,_28a);}else{this.url=this._fromURI(uri,_288,"download",_28a);}ibm.portal.debug.exit("ContentHandlerURL.constructor");},_fromQueryString:function(_28d,_28e){ibm.portal.debug.entry("fromQueryString",[_28d]);var str=ibmPortalConfig["contentHandlerURI"]+_28d;str=str.replace(/&amp;/g,"&");if(_28e){str=str+_28e;}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,_291,verb,_293){ibm.portal.debug.entry("ContentHandlerURL._fromURI",[uri,_291,verb,_293]);uri=com.ibm.portal.utilities.encodeURI(uri);var qStr="?uri="+uri;if(_291){qStr=qStr+"&levels="+encodeURIComponent(_291);}if(verb){qStr=qStr+"&mode="+encodeURIComponent(verb);}if(_293){qStr=qStr+_293;}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(_295){ibm.portal.debug.entry("ContentHandlerURL._extractParamValue",[_295]);var _296=this.url.indexOf(_295);var _297=this.url.indexOf("&",_296);var _298=this.url.slice(_296+_295.length+1,_297);ibm.portal.debug.exit("ContentHandlerURL._extractParamValue",[_298]);return _298;}});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(_299){if(_299.getAttributeNode("method")){this.method=_299.getAttributeNode("method").value;}if(_299.getAttributeNode("encType")){this.encoding=_299.getAttributeNode("encType").value;}if(_299.getAttributeNode("id")){this.DomId=_299.getAttributeNode("id").value;}else{DomId=_299;}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(_29a,form,_29c,sync){ibm.portal.debug.entry("PortalRestServiceRequest.constructor",[_29a,form,_29c,sync]);this._feedURI=_29a.url;this._textOnly=_29c;this._sync=sync;this._form=form;if(!this._sync){this._sync=false;}ibm.portal.debug.exit("PortalRestServiceRequest.constructor");},create:function(feed,_29f,_2a0){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.create");},read:function(_2a1,_2a2){ibm.portal.debug.entry("PortalRestServiceRequest.read",[_2a1,_2a2]);com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:this._feedURI});if(this._textOnly){this._retrieveRawFeed(_2a1,_2a2);}else{this._retrieve(_2a1,_2a2);}ibm.portal.debug.exit("PortalRestServiceRequest.read");},update:function(feed,_2a4,_2a5){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.update");},remove:function(feed,_2a7,_2a8){dojo.unimplemented("com.ibm.portal.services.PortalRestServiceRequest.remove");},_retrieveRawFeed:function(_2a9,_2aa){ibm.portal.debug.entry("_retrieveRawFeed",[_2a9,_2aa]);var me=this;dojo.xhrGet({url:this._feedURI,load:function(type,data,evt){_2a9(data,_2aa);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});},sync:this._sync});ibm.portal.debug.exit("_retrieveRawFeed");},_retrieve:function(_2af,_2b0,_2b1,_2b2){ibm.portal.debug.entry("_retrieve",[_2af]);if(this._form&&this._form.isMultipart){this._doIframeRequest(_2af,_2b0);}else{this._doXmlHttpRequest(_2af,_2b0);}ibm.portal.debug.exit("PortalRestServiceRequest._retrieve");},_doIframeRequest:function(_2b3,_2b4){ibm.portal.debug.entry("PortalRestServiceRequest._doIframeRequest",[_2b3]);var _2b5=null;var _2b6=dojo.dnd.getUniqueId();if(dojo.isIE){_2b5=document.createElement("<iframe name='"+_2b6+"' id='"+_2b6+"' 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[_2b6]={fn:_2b3,args:_2b4};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: "+_2b6+"; url is: "+this._feedURI);_2b5=document.createElement("IFRAME");_2b5.setAttribute("name",_2b6);_2b5.setAttribute("id",_2b6);var me=this;_2b5.onload=function(){var xml=window.frames[_2b6].document;_2b3("load",xml,null,_2b4);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});};this._form.getDOMElement().setAttribute("action",this._feedURI);}_2b5.style.visibility="hidden";_2b5.style.height="1px";_2b5.style.width="1px";document.body.appendChild(_2b5);if(window.frames[_2b6].name!=_2b6){window.frames[_2b6].name=_2b6;}ibm.portal.debug.text("Setting the iframe target attribute to: "+_2b6);this._form.getDOMElement().setAttribute("target",_2b6);this._form.submit();ibm.portal.debug.exit("PortalRestServiceRequest._doIframeRequest");},_doXmlHttpRequest:function(_2ba,_2bb){ibm.portal.debug.entry("PortalRestServiceRequest._doXmlHttpRequest",[_2ba,_2bb]);var _2bc={};ibm.portal.debug.text("Attempting to retrieve: "+this._feedURI+"; synchronously? "+this._sync);var me=this;var args={url:this._feedURI,content:_2bc,handle:function(_2bf,_2c0){ibm.portal.debug.entry("PortalRestServiceRequest.handle",[_2bf,_2c0]);var xhr=_2c0.xhr;ibm.portal.debug.text("XHR object: "+xhr);var _2c2=com.ibm.portal.services.PortalRestServiceConfig;var _2c3=xhr.getResponseHeader("X-Request-Digest");if(_2c3){_2c2.digest=_2c3;}if(xhr.status==200){var data=_2bf;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 _2c6=xhr.getResponseHeader("Content-Type");if(_2c6&&_2c6.indexOf("text/html")>=0){var _2c7=me._feedURI;if(loc){_2c7=loc;}if(dojo.cookie("WASReqURL")!=null){var _2c8=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _2c9=_2c8.createLinkToCurrentState();var _2ca="WASReqURL="+_2c9+"; path=/";document.cookie=_2ca;}com.ibm.portal.EVENT_BROKER.redirect.fire({url:_2c7});top.location.href=_2c7;return;}ibm.portal.debug.text("Read feed: "+me._feedURI);if(dojo.isIE){var doc=dojox.data.dom.createDocument(data);_2ba("load",doc,xhr,_2bb);}else{_2ba("load",data,xhr,_2bb);}}else{_2ba("error",_2bf,null,_2bb);}com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});ibm.portal.debug.exit("PortalRestServiceRequest.handle");},sync:this._sync,handleAs:"xml"};var _2cc="Get";if(this._form){args.content=dojo.queryToObject(this._form.toQuery());_2cc=com.ibm.portal.utilities.string.properCase(this._form.method);}if(dojo.isIE){args.content["ibm.web2.contentType"]="text/xml";args.handleAs="text";}var _2cd=com.ibm.portal.services.PortalRestServiceConfig;if(_2cd.timeout){args.timeout=_2cd.timeout;}if(_2cd.digest){args.content["digest"]=_2cd.digest;}var xhr=dojo["xhr"+_2cc](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,_2d2,_2d3,_2d4,_2d5,_2d6,_2d7,_2d8,_2d9,_2da){ibm.portal.debug.entry("PortletInfo.constructor",[wId,pId,_2d2,_2d3,_2d4,_2d5,_2d7]);this.windowId=wId;this.portletId=pId;this.uri="fragment:pm:oid:"+wId+"@oid:"+pId;this.markup=_2d2;this.portletModes=_2d3;this.windowStates=_2d4;this.dependentPortlets=_2d5;this.otherPortlets=_2d6;this.stateVaryExpressions=_2d8;this.updatedState=_2d7;this.currentMode=_2d9;this.currentWindowState=_2da;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,_2dc){ibm.portal.debug.entry("PortletFragmentService._flagPortletUrl",[url]);var _2dd=url.indexOf("uri=fragment:pm:oid:");var _2de=new com.ibm.portal.utilities.HttpUrl(url);_2de.addParameter("ibm.web2.keepRenderMode","false");if(_2dd<0){_2dc=_2dc.replace(/lm:/g,"fragment:pm:");_2de.addParameter("uri",_2dc);}ibm.portal.debug.exit("PortletFragmentService._flagPortletUrl",[_2de.toString()]);return _2de.toString();},getPortletInfo:function(_2df,_2e0,_2e1,form,_2e3){ibm.portal.debug.entry("PortletFragmentService.getPortletInfo",[_2df,_2e0,_2e1,form,_2e3]);if(_2e0=="#"||_2e0==window.location.href+"#"){ibm.portal.debug.text("Illegal portlet url provided: "+_2e0);ibm.portal.debug.text("Aborting request.");return false;}if(com.ibm.portal.utilities.isJavascriptUrl(_2e0)){return eval(_2e0);}if(!_2e3){com.ibm.portal.EVENT_BROKER.startFragment.fire({id:_2df});}var _2e4=_2e0;if(_2e4.indexOf(top.location.href)==0){_2e4=_2e4.substring(top.location.href.length);while(_2e4.length>0&&_2e4.charAt(0)=="/"){_2e4=_2e4.substring(1);}}if(_2e4.indexOf("?")==0){var _2e5=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_2e0=_2e5.resolveRelativePortletURL(_2e4);}if(com.ibm.portal.utilities.isExternalUrl(_2e0)){self.location.href=_2e0;}else{var url={url:this._flagPortletUrl(_2e0,_2df)};var _2e7=new com.ibm.portal.services.PortalRestServiceRequest(url,form);var me=this;_2e7.read(function(type,_2ea,xhr){var _2ec=null;if(type=="load"){_2ec=me.createPortletInfo(_2ea);}if(_2ea instanceof Error){_2ec=_2ea;}if(!_2e3){me._fireEvents(_2ec,_2df,xhr);}if(_2e1){_2e1(_2ec,xhr);}});}ibm.portal.debug.exit("PortletFragmentService.getPortletInfo");},readWindowID:function(_2ed){ibm.portal.debug.entry("PortletFragmentService.readWindowID",[_2ed]);var _2ee="/atom:feed/atom:entry/atom:id";var _2ef=com.ibm.portal.xpath.evaluateXPath(_2ee,_2ed,this.namespaces);var _2f0=dojox.data.dom.textContent(_2ef[0]);ibm.portal.debug.exit("PortletFragmentService.readWindowID",[_2f0.substring(4)]);return _2f0.substring(4);},readPortletID:function(_2f1){ibm.portal.debug.entry("PortletFragmentService.readPortletID",[_2f1]);var _2f2="/atom:feed/atom:id";var _2f3=com.ibm.portal.xpath.evaluateXPath(_2f2,_2f1,this.namespaces);var _2f4=dojox.data.dom.textContent(_2f3[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletID",[_2f4.substring(4)]);return _2f4.substring(4);},readMarkup:function(_2f5){ibm.portal.debug.entry("PortletFragmentService.readMarkup",[_2f5]);var _2f6="/atom:feed/atom:entry/atom:content";var _2f7=com.ibm.portal.xpath.evaluateXPath(_2f6,_2f5,this.namespaces);var _2f8="";if(_2f7!=null&&_2f7.length>0){_2f8=dojox.data.dom.textContent(_2f7[0]);}ibm.portal.debug.exit("PortletFragmentService.readMarkup",[_2f8]);return _2f8;},readPortletModes:function(_2f9){ibm.portal.debug.entry("PortletFragmentService.readPortletModes",[_2f9]);var _2fa="/atom:feed/atom:entry/atom:link[@portal:rel='portlet-mode']";var _2fb=com.ibm.portal.xpath.evaluateXPath(_2fa,_2f9,this.namespaces);var _2fc=new Array();if(_2fb!=null&&_2fb.length>0){var _2fd=_2fb.length;for(var i=0;i<_2fd;i++){_2fc.push({"link":_2fb[i].getAttribute("href"),"mode":_2fb[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readPortletModes",[_2fc]);return _2fc;},readWindowStates:function(_2ff){ibm.portal.debug.entry("PortletFragmentService.readWindowStates",[_2ff]);var _300="/atom:feed/atom:entry/atom:link[@portal:rel='window-state']";var _301=com.ibm.portal.xpath.evaluateXPath(_300,_2ff,this.namespaces);var _302=new Array();if(_301!=null&&_301.length>0){var _303=_301.length;for(var i=0;i<_303;i++){_302.push({"link":_301[i].getAttribute("href"),"mode":_301[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readWindowStates",[_302]);return _302;},readDependentPortlets:function(_305){ibm.portal.debug.entry("PortletFragmentService.readDependentPortlets",[_305]);var _306="/atom:feed/atom:link[@portal:rel='dependent']";var _307=com.ibm.portal.xpath.evaluateXPath(_306,_305,this.namespaces);var _308=new Array();if(_307!=null&&_307.length>0){var _309=_307.length;for(var i=0;i<_309;i++){_308.push({"link":_307[i].getAttribute("href"),"portlet":_307[i].getAttribute("title"),"uri":_307[i].getAttribute("portal:uri")?_307[i].getAttribute("portal:uri"):_307[i].getAttribute("uri")});}}ibm.portal.debug.exit("PortletFragmentService.readDependentPortlets",[_308]);return _308;},readOtherPortlets:function(_30b){ibm.portal.debug.entry("PortletFragmentService.readOtherPortlets",[_30b]);var _30c="/atom:feed/atom:link[@portal:rel='other']";var _30d=com.ibm.portal.xpath.evaluateXPath(_30c,_30b,this.namespaces);var _30e=new Array();if(_30d!=null&&_30d.length>0){var _30f=_30d.length;for(var i=0;i<_30f;i++){_30e.push({"link":_30d[i].getAttribute("href"),"portlet":_30d[i].getAttribute("title"),"uri":_30d[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readOtherPortlets",[_30e]);return _30e;},readStateVaryExpressions:function(_311){ibm.portal.debug.entry("PortletFragmentService.readStateVaryExpressions",[_311]);var _312="/atom:feed/atom:entry/state-vary:state-vary/state-vary:expr";var _313=com.ibm.portal.xpath.evaluateXPath(_312,_311,this.namespaces);var _314=new Array();if(_313!=null&&_313.length>0){var _315=_313.length;for(var i=0;i<_315;i++){var _317=_313[i].firstChild;if(_317!=null){_314.push(_317.nodeValue);}}}ibm.portal.debug.exit("PortletFragmentService.readStateVaryExpressions",[_314]);return _314;},readPortletState:function(_318){return this._readPortletState(_318);},_readPortletState:function(_319){ibm.portal.debug.entry("PortletFragmentService.readPortletState",[_319]);var _31a="/atom:feed/atom:entry/state:root";var _31b=com.ibm.portal.xpath.evaluateXPath(_31a,_319,this.namespaces);var _31c=null;if(_31b!=null&&_31b.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_31b[0]);_31c=doc;}else{_31a="/atom:feed/state:root";_31b=com.ibm.portal.xpath.evaluateXPath(_31a,_319,this.namespaces);if(_31b!=null&&_31b.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_31b[0]);_31c=doc;}}ibm.portal.debug.exit("PortletFragmentService.readPortletState",[_31c]);return _31c;},_fireEvents:function(_31e,_31f,xhr){this._fireGlobalPortletStateChange(_31e,_31f,xhr);},_fireGlobalPortletStateChange:function(_321,_322,xhr){com.ibm.portal.EVENT_BROKER.endFragment.fire({portletInfo:_321,id:_322,xhr:xhr});},_fireIndividualPortletStateChange:function(_324){},createPortletInfo:function(_325){var _326=this.readWindowID(_325);var _327=this.readPortletID(_325);var _328=this.readMarkup(_325);var _329=this.readPortletModes(_325);var _32a=this.readWindowStates(_325);var _32b=this.readDependentPortlets(_325);var _32c=this.readOtherPortlets(_325);var _32d=this.readPortletState(_325);var _32e=this.readStateVaryExpressions(_325);var _32f=_32d;if(_32f==null){_32f=this._readPortletState(_325);}var _330=new com.ibm.portal.state.StateManager();var _331=_330.newPortletAccessor(_326,_32f);var mode=_331.getPortletMode();var _333=_331.getWindowState();return new com.ibm.portal.services.PortletInfo(_326,_327,_328,_329,_32a,_32b,_32c,_32d,_32e,mode,_333);}});dojo.declare("com.ibm.portal.services.IndependentPortletFragmentService",com.ibm.portal.services.PortletFragmentService,{readDependentPortlets:function(_334){ibm.portal.debug.entry("DependentPortletFragmentService.readDependentPortlets",[_334]);var _335=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readDependentPortlets",[_335]);return _335;},readOtherPortlets:function(_336){ibm.portal.debug.entry("DependentPortletFragmentService.readOtherPortlets",[_336]);var _337=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readOtherPortlets",[_337]);return _337;},readPortletState:function(_338){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(_339){if(_339==null){return;}this.windowID=_339;var _33a=document.getElementById("com.ibm.wps.web2.portlet.preferences."+this.windowID);this.preferenceEditID=_33a.getAttribute("editid");this.preferenceConfigID=_33a.getAttribute("configid");this.preferenceEditDefaultsID=_33a.getAttribute("editdefaultsid");this.pageID=_33a.getAttribute("pageid");this.attributes=new Array();this._queuedFuncs=new Array();this.portletState=new ibm.portal.portlet.PortletState(_339);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(_33d){var code;if(_33d.getErrorCode()==ibm.portal.portlet.Error.ERROR){code="error";}else{if(_33d.getErrorCode()==ibm.portal.portlet.Error.INFO){code="info";}else{if(_33d.getErrorCode()==ibm.portal.portlet.Error.WARN){code="warning";}}}var _33f={"_type":code,"_message":_33d.getMessage(),"_details":_33d.getDescription()};if(this.isCSA){dojo.publish("/portal/status",[{message:_33f}]);}else{if(typeof (console)!="undefined"){if(_33d.getErrorCode()==ibm.portal.portlet.Error.ERROR){console.error(_33f._message+"\n"+_33f._details);}else{if(_33d.getErrorCode()==ibm.portal.portlet.Error.INFO){console.info(_33f._message+"\n"+_33f._details);}else{if(_33d.getErrorCode()==ibm.portal.portlet.Error.WARN){console.warn(_33f._message+"\n"+_33f._details);}}}}else{alert(_33f._type.toUpperCase()+"\nMessage: "+_33f._message+"\nDetails: "+_33f._details);}}},getAttribute:function(name){return this.attributes[name];},setAttribute:function(name,_342){var ret=this.attributes[name];this.attributes[name]=_342;return ret;},removeAttribute:function(name){this.attributes[name]=null;},clearAttributes:function(){this.attributes=new Array();},getPortletState:function(_345){var _346=this.portletState;var _347=this;var _348=null;if(_345!=null){_345(_347,ibm.portal.portlet.PortletWindow.STATUS_OK,_346);}else{_348={"portletWindow":_347,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_346};}return _348;},setPortletState:function(_349,_34a){this.portletState=_349;if(this.isCSA){if(_34a==null){var _34b=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var url=_34b.newPortletRenderURL(this.windowID);var _34d=new com.ibm.portal.services.PortletFragmentService();_34d.getPortletInfo("lm:oid:"+this.windowID+"@oid:"+this.pageID,url);}}else{var _34e=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);_34e.reset(_349.portletAccessor.stateDOM);var _34f=_34e.getSerializationManager();var _350=_34f.serialize(_34e.getState());var _351=_350["returnObject"];var url=_351;window.location.href=url;}return this.getPortletState(_34a);},_queueUp:function(_352){this._queuedFuncs.push(_352);},_throwInappropriateRequestError:function(_353){throw new Error("Cannot execute a synchronous call before the page loads! Please use an onload handler to execute this call to \""+_353+"\".");return null;},getPortletPreferences:function(_354){if(!ibm.portal.portlet._SafeToExecute){if(_354){var me=this;this._queueUp(function(){me.getPortletPreferences(_354);});return false;}else{return this._throwInappropriateRequestError("getPortletPreferences");}}var _356=this.getPortletState().returnObject.getPortletMode();this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _357=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_357.indexOf("--portletwindowid--");var _url=_357.replace(/--portletwindowid--/g,this.windowID);if(_url.indexOf("?")<0){_url=_url+"?";}_url+="&verb=download&levels=-all&rep=compact&preferences=aggregated";this.requestedPreferenceID="pm:oid:"+this.preferenceEditID;if(_356==ibm.portal.portlet.PortletMode.CONFIG){this.requestedPreferenceID="pm:oid:"+this.preferenceConfigID;}else{if(_356==ibm.portal.portlet.PortletMode.EDIT_DEFAULTS){this.requestedPreferenceID="pm:oid:"+this.preferenceEditDefaultsID;}}var _35a=this;var _35b=null;dojo.xhrGet({url:_url,handleAs:"xml",headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_354)?false:true,handle:function(_35c,_35d){var type=(_35c instanceof Error)?"error":"load";if(type=="load"){var _35f=_35c;if(!_35f||(typeof (dojox.data.dom.innerXML(_35c))=="undefined")){_35f=dojox.data.dom.createDocument(_35d.xhr.responseText);}var _360=new ibm.portal.portlet.PortletPreferences(_35a.windowID,_35a.requestedPreferenceID,_35f);if(_354){_354(_35a,ibm.portal.portlet.PortletWindow.STATUS_OK,_360);}else{_35b={"portletWindow":_35a,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_360};}}else{if(type=="error"){if(_354){_354(_35a,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_35b={"portletWindow":_35a,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _35b;},setPortletPreferences:function(_361,_362){if(!ibm.portal.portlet._SafeToExecute){if(_362){var me=this;this._queueUp(function(){me.setPortletPreferences(_361,_362);});return false;}else{return this._throwInappropriateRequestError("setPortletPreferences");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _364=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_364.indexOf("--portletwindowid--");var _url=_364.replace(/--portletwindowid--/g,this.windowID);if(_url.indexOf("?")<0){_url+="?verb=download";}else{_url+="&verb=download";}var _367=_361.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+_367+"']";var _369=ibm.portal.xml.xpath.evaluateXPath(expr,_361.xmlData,_361.ns);var _36a;if(_369&&_369.length>0){_36a=_369[0];}else{return null;}var _36b=_36a.parentNode;expr="/atom:feed/atom:entry";_369=ibm.portal.xml.xpath.evaluateXPath(expr,_361.xmlData,_361.ns);for(var i=0;i<_369.length;i++){var node=_369[i];if(node!=_36a){_36b.removeChild(node);}}var _36e=this;var _36f=null;dojo.rawXhrPut({url:_url,sync:(_362)?false:true,putData:dojox.data.dom.innerXML(_361.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_370,_371){var type=(_370 instanceof Error)?"error":"load";if(type=="load"){if(_362){_362(_36e,ibm.portal.portlet.PortletWindow.STATUS_OK,_361);}else{_36f={"portletWindow":_36e,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_361};}}else{if(type=="error"){if(_362){_362(_36e,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_36f={"portletWindow":_36e,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _36f;},getUserProfile:function(_373){if(!ibm.portal.portlet._SafeToExecute){if(_373){var me=this;this._queueUp(function(){me.getUserProfile(_373);});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 _376=this;var _377=null;dojo.xhrGet({url:_url,headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_373)?false:true,handleAs:"xml",handle:function(_378,_379){var type=(_378 instanceof Error)?"error":"load";if(type=="load"){var _37b=_378;if(!_37b||(typeof (dojox.data.dom.innerXML(_378))=="undefined")){_37b=dojox.data.dom.createDocument(_379.xhr.responseText);}var _37c=new ibm.portal.portlet.UserProfile(_376.windowID,_37b);if(_373){_373(_376,ibm.portal.portlet.PortletWindow.STATUS_OK,_37c);}else{_377={"portletWindow":_376,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_37c};}}else{if(type=="error"){if(_373){_373(_376,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_377={"portletWindow":_376,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _377;},setUserProfile:function(_37d,_37e){if(!ibm.portal.portlet._SafeToExecute){if(_37e){var me=this;this._queueUp(function(){me.setUserProfile(_37d,_37e);});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 _381=this;var _382=null;dojo.rawXhrPost({url:_url,sync:(_37e)?false:true,postData:dojox.data.dom.innerXML(_37d.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_383,_384){var type=(_383 instanceof Error)?"error":"load";if(type=="load"){if(_37e){_37e(_381,ibm.portal.portlet.PortletWindow.STATUS_OK,_37d);}else{_382={"portletWindow":_381,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_37d};}}else{if(type=="error"){if(_37e){_37e(_381,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_382={"portletWindow":_381,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _382;},newXMLPortletRequest:function(){return new ibm.portal.portlet.XMLPortletRequest(this.pageID,this.windowID);}});dojo.declare("ibm.portal.portlet.PortletPreferences",null,{constructor:function(_386,_387,data){this.windowID=_386;this.requestedPreferenceID=_387;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 _389=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesMap.xsl");if(_389.documentElement==null){alert("xslDoc is null");}var _38a=ibm.portal.xml.xslt.transform(this.xmlData,_389,null,{"selectionid":this.requestedPreferenceID},true);if(_38a==null){this.result_getNames=null;return null;}var _38b=eval(_38a);if(_38b){_38b=_38b.preferences;}this.result_getMap=_38b;return this.result_getMap;},getNames:function(){if(this.result_getNames){return this.result_getNames;}var _38c=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesNames.xsl");if(_38c.documentElement==null){alert("xslDoc is null");}var _38d=ibm.portal.xml.xslt.transform(this.xmlData,_38c,null,{"selectionid":this.requestedPreferenceID},true);if(_38d==null){this.result_getNames=null;return null;}var _38e=eval(_38d);if(_38e){_38e=_38e.names;}this.result_getNames=_38e;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 _392=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _393;if(_392&&_392.length>0){_393=_392[0].getAttribute("value");}else{_393=def;}return _393;},getValues:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _397=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _398;if(_397&&_397.length>0){_398=new Array();for(var i=0;i<_397.length;i++){_398[i]=_397[i].getAttribute("value");}}else{_398=def;}return _398;},isReadOnly:function(key){var id=this.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+id+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _39d=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _39e=false;if(_39d&&_39d.length>0){var temp=_39d[0].getAttribute("read-only");if(temp!=null){if(temp=="true"){_39e=true;}}}return _39e;},reset:function(key){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3a2=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);if(_3a2&&_3a2.length>0){var _3a3=_3a2[0].parentNode;_3a3.removeChild(_3a2[0]);}},setValue:function(key,_3a5){var _3a6=new Array();_3a6[0]=_3a5;this.setValues(key,_3a6);},setValues:function(key,_3a8){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3aa=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3ab=null;if(_3aa&&_3aa.length>0){_3ab=_3aa[0];for(var i=_3ab.childNodes.length-1;i>=0;i--){_3ab.removeChild(_3ab.childNodes[i]);}}else{var _3ad="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*";var _3ae=ibm.portal.xml.xpath.evaluateXPath(_3ad,this.xmlData,this.ns);if(dojo.isIE){_3ab=this.xmlData.createNode(1,"model:portletpreferences",this.ns.model);}else{_3ab=this.xmlData.createElementNS(this.ns.model,"model:portletpreferences");}_3ab.setAttribute("name",key);_3ab.setAttribute("read-only","false");_3ae[0].appendChild(_3ab);}for(var i=0;i<_3a8.length;i++){var _3af;if(dojo.isIE){_3af=this.xmlData.createNode(1,"base:value",this.ns.base);var _3b0=this.xmlData.createNode(2,"xsi:type",this.ns.xsi);_3b0.nodeValue="String";_3af.setAttributeNode(_3b0);}else{_3af=this.xmlData.createElementNS(this.ns.base,"base:value");_3af.setAttributeNS(this.ns.xsi,"xsi:type","String");}_3af.setAttribute("value",_3a8[i]);_3ab.appendChild(_3af);}},internal_reset:function(){this.result_getMap=null;this.result_getNames=null;},clone:function(){var _3b1=dojox.data.dom.innerXML(this.xmlData);var _3b2=dojox.data.dom.createDocument(_3b1);return new ibm.portal.portlet.PortletPreferences(this.windowID,this.requestedPreferenceID,_3b2);}});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(_3b3,_3b4){var _3b5=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);if(dojo.isString(_3b3)){var _3b6=this._getExistingState(_3b3,_3b5.getSerializationManager());_3b5.reset(_3b6);}else{_3b5.reset(_3b3);_3b3=_3b4;}this.portletAccessor=_3b5.newPortletAccessor(_3b3);this.renderParameters=this.portletAccessor.getRenderParameters();},_isCSA:function(){var _3b7=false;try{_3b7=(typeof (document.isCSA)!="undefined");}catch(e){}return _3b7;},_getExistingState:function(_3b8,_3b9){var _3ba=null;if(this._isCSA()){_3ba=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState().stateDOM;}else{if(_3b9!=null){var _3bb=_3b9.deserialize(location.href);_3ba=_3bb.returnObject;}else{_3ba=dojox.data.dom.createDocument();}}return _3ba;},getPortletMode:function(){return this.portletAccessor.getPortletMode();},setPortletMode:function(_3bc){this.portletAccessor.setPortletMode(_3bc);return _3bc;},getWindowState:function(){return this.portletAccessor.getWindowState();},setWindowState:function(_3bd){this.portletAccessor.setWindowState(_3bd);return _3bd;},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,_3c1){this.renderParameters.setValue(name,_3c1);return _3c1;},setParameterValues:function(name,_3c3){this.renderParameters.setValues(name,_3c3);return _3c3;},setParameterMap:function(map,_3c5){if(_3c5==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,_3c8){this.pageID=page;this.windowID=_3c8;},_getXHR:function(){if(!this._xhr){this._xhr=this._createXHR();}return this._xhr;},_createXHR:function(){var _3c9=null;if(typeof (XMLHttpRequest)!="undefined"){_3c9=new XMLHttpRequest();}else{_3c9=new ActiveXObject("Microsoft.XMLHTTP");}return _3c9;},_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 _3cb=new com.ibm.portal.services.PortletFragmentService();this.responseText=_3cb.readMarkup(xhr.responseXML);this.responseXML=null;this._handleDependentPortlets(_3cb.readDependentPortlets(xhr.responseXML));var _3cc=true;if(this.onportletstateready!=null){var _3cd=_3cb.readPortletState(xhr.responseXML);var _3cb=new com.ibm.portal.services.PortletFragmentService();var _3ce=_3cb.readWindowID(xhr.responseXML);var _3cf=new ibm.portal.portlet.PortletState(_3cd,_3ce);_3cc=this.onportletstateready(_3cf);}if(_3cc&&this._isCSA()){var _3d0=_3cb.createPortletInfo(xhr.responseXML);_3cb._fireGlobalPortletStateChange(_3d0);}}if(this.onreadystatechange!=null){this.onreadystatechange();}},_handleDependentPortlets:function(_3d1){if(this._isCSA()){var _3d2=new com.ibm.portal.services.PortletFragmentService();for(var i=0;i<_3d1.length;i++){var _3d4=_3d1[i].uri;_3d4=_3d4.replace(/fragment:pm:/g,"lm:");com.ibm.portal.aggregation.PORTAL_AGGREGATOR.page.getFragment(_3d4).setLoading();_3d2.getPortletInfo(_3d4,_3d1[i].link);}}else{if(_3d1.length>0){window.location.href=this._newPageURL();}}},_isCSA:function(){var _3d5=false;try{_3d5=(typeof (document.isCSA)!="undefined");}catch(e){}return _3d5;},_flag:function(_3d6){var id="lm:oid:"+this.windowID+"@oid:"+this.pageID;var _3d8=new com.ibm.portal.services.PortletFragmentService();return _3d8._flagPortletUrl(_3d6,id);},_newPageURL:function(){var _3d9=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);var _3da=dojox.data.dom.createDocument();_3d9.reset(_3da);var _3db=_3d9.newPortletAccessor(this.windowID).getPortletState();var _3dc=_3d9.newSelectionAccessor(_3db);_3dc.setPageSelection(this.pageID);var _3dd=_3d9.getSerializationManager();var _3de=_3dd.serialize(_3db);var _3df=_3de["returnObject"];var url=_3df;return url;},open:function(_3e1,uri){this.open(_3e1,uri,false);},open:function(_3e3,uri,_3e5){var xhr=this._getXHR();var me=this;this._location=uri;xhr.onreadystatechange=function(){me._onreadystatechangehandler();};xhr.open(_3e3,this._flag(uri),_3e5);},setRequestHeader:function(_3e8,_3e9){this._getXHR().setRequestHeader(_3e8,_3e9);},send:function(data){this._getXHR().send(data);},abort:function(){this._getXHR().abort();},getAllResponseHeaders:function(){return this._getXHR().getAllResponseHeaders();},getResponseHeader:function(_3eb){return this._getXHR().getResponseHeader(_3eb);}});dojo.declare("ibm.portal.portlet.UserProfile",null,{constructor:function(_3ec,data){this.windowID=_3ec;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 _3f0=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3f1=null;if(_3f0&&_3f0.length>0){if(_3f0[0].textContent){_3f1=_3f0[0].textContent;}else{_3f1=_3f0[0].text;}}return _3f1;},setAttribute:function(name,_3f3){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _3f5=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3f6=null;if(_3f5&&_3f5.length>0){if(_3f5[0].textContent){_3f6=_3f5[0].textContent;_3f5[0].textContent=_3f3;}else{_3f6=_3f5[0].text;_3f5[0].text=_3f3;}}else{var _3f7="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']";var _3f8=ibm.portal.xml.xpath.evaluateXPath(_3f7,this.xmlData,this.ns);var _3f9=null;if(_3f8&&_3f8.length>0){_3f9=_3f8[0];}else{var _3fa="/atom:entry/atom:content/um:profile[@type='user']";var _3fb=ibm.portal.xml.xpath.evaluateXPath(_3fa,this.xmlData,this.ns);if(dojo.isIE){_3f9=this.xmlData.createNode(1,"um:attribute",this.ns.um);}else{_3f9=this.xmlData.createElementNS(this.ns.um,"um:attribute");}_3f9.setAttribute("type","xs:string");_3f9.setAttribute("multiValued","false");_3f9.setAttribute("name",name);_3fb[0].appendChild(_3f9);}var _3fc;if(dojo.isIE){_3fc=this.xmlData.createNode(1,"um:attributeValue",this.ns.um);_3fc.text=_3f3;}else{_3fc=this.xmlData.createElementNS(this.ns.um,"um:attributeValue");_3fc.textContent=_3f3;}_3f9.appendChild(_3fc);}return _3f6;},clone:function(){var _3fd=dojox.data.dom.innerXML(this.xmlData);var _3fe=dojox.data.dom.createDocument(_3fd);return new ibm.portal.portlet.UserProfile(this.windowID,_3fe);}});dojo.declare("ibm.portal.portlet.Error",null,{INFO:0,WARN:1,ERROR:2,constructor:function(_3ff,_400,_401){this.errorCode=_3ff;this.message=_400;this.description=_401;},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;}

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";
var wclIsOpera_=/Opera/.test(navigator.userAgent);
var defaultContextMenuBorderStyle_="lwpShadowBorder";
var defaultContextMenuTableStyle_="lwpBorderAll";
var arrowWidth_="12";
var arrowHeight_="12";
var submenuAltText_="+";
var defaultNoActionsText_="(0)";
var defaultNoActionsTextStyle_="lwpMenuItemDisabled";
var hideCurrentMenuTimer_=null;
var onmousedown_=document.onmousedown;
function clearMenuTimer(){
if(null !=hideCurrentMenuTimer_){
clearTimeout(hideCurrentMenuTimer_);
hideCurrentMenuTimer_=null;}}
function setMenuTimer(){
clearMenuTimer();
hideCurrentMenuTimer_=setTimeout('hideCurrentContextMenu( )',2000);}
function debug(str){/*
if(xbDEBUG!=null){
xbDEBUG.dump(str);}*/}
function UilContextMenu(name,isLTR,width,borderStyle,tableStyle,emptyMenuText,emptyMenuTextStyle,positionUnder){
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();
this.isHyperlinkChild=true;
this.bottomPositioned=positionUnder;
this.launcher=null;
this.menuTag=null;
if(borderStyle!=null){
this.menuBorderStyle=borderStyle;}
else{
this.menuBorderStyle=defaultContextMenuBorderStyle_;}
if(tableStyle!=null){
this.menuTableStyle=tableStyle;}
else{
this.menuTableStyle=defaultContextMenuTableStyle_;}
if(emptyMenuText!=null){
this.noActionsText=emptyMenuText;}
else{
this.noActionsText=defaultNoActionsText_;}
if(emptyMenuTextStyle!=null){
this.noActionsTextStyle=emptyMenuTextStyle;}
else{
this.noActionsTextStyle=defaultNoActionsTextStyle_;}
this.add=UilContextMenuAdd;
this.addSeparator=UilContextMenuAddSeparator;
this.show=UilContextMenuShow;
this.hide=UilContextMenuHide;
this.create=UilContextMenuCreate;
this.getMenuItem=UilContextMenuGetMenuItem;
this.getSelectedItem=UilContextMenuGetSelectedItem;
if(this.name==null){
this.name="UilContextMenu_"+allMenus_.length;}}
function UilContextMenuAdd(item){
this.items[this.items.length]=item;
this.isEmpty=false;}
function UilContextMenuAddSeparator(){
var sep=new UilMenuItem();
sep.isSeparator=true;
this.add(sep);}
function UilContextMenuShow(launcher,launchItem){
if(this.items.length==0){
debug('menu is empty!');
this.add(new UilMenuItem(this.noActionsText,false,"javascript:void(0);",null,null,null,null,this.noActionsTextStyle));
this.isEmpty=true;}
if(this.menuTag==null){
this.create();}else{
this.menuTag.style.left="";
this.menuTag.style.top="";
this.menuTag.style.width="";
this.menuTag.style.height="";
this.menuTag.style.overflow="visible";}
if(this.menuTag!=null){
this.launcher=launcher;
if(this.launcher.tagName=="IMG"){
this.isHyperlinkChild=false;
this.launcher=this.launcher.parentNode;}
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);
var posX=0;
var posY=0;
var fUseUpperY=false;
var maxUpperPosY=0;
if(launchItem!=null){
var launchTag=launchItem.itemTag;
var launchTagWidth=getWidth(launchTag);
var parentTag=launchItem.parentMenu.menuTag;
var launchOffsetX=getLeft(parentTag);
var launchOffsetY=getTop(parentTag);
posX=launchOffsetX+getLeft(launchTag)+launchTagWidth;
posY=launchOffsetY+getTop(launchTag);
if(!this.isLTR){
posX-=launchTagWidth;
posX-=menuWidth;}
if(this.isLTR){
if(posX+menuWidth>maxX){
var posX1=launchOffsetX-menuWidth;
var posX2=maxX-menuWidth;
if(0<=posX1){
posX=posX1;}
else{
posX=Math.max(minX,posX2);}}}
else{
if(posX<0){
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{
var launcherLeft=getLeft(this.launcher,true)
if(this.launcher.tagName=="BUTTON"||this.bottomPositioned){
posX=launcherLeft;
if(!this.isLTR){
posX+=getWidth(this.launcher)-menuWidth;}
if(this.isLTR){
if((posX+menuWidth)>maxX){
if((posX+getWidth(this.launcher))>maxX){
posX=Math.max(minX,maxX-menuWidth);}
else
posX=Math.max(minX,posX+getWidth(this.launcher)-menuWidth);}
else if(posX<minX){
posX=minX;}}
else{
if(posX<minX){
if((launcherLeft>minX)&&((launcherLeft+menuWidth)<maxX)){
posX=launcherLeft;}
else{
posX=Math.min(minX,maxX-menuWidth);}}
else if((posX+menuWidth)>maxX){
if(Math.min(posX,maxX-menuWidth)>=minX)
posX=Math.min(posX,maxX-menuWidth);}}
maxUpperPosY=getTop(this.launcher,true);
var upperVisibleHeight=maxUpperPosY-minY;
posY=getTop(this.launcher,true)+getHeight(this.launcher);
var lowerVisibleHeight=maxY-posY;
if((posY+menuHeight>maxY)&&(lowerVisibleHeight<upperVisibleHeight)){
posY-=(menuHeight+getHeight(this.launcher));
fUseUpperY=true;}
if(posY<minY){
posY=minY;}}
else{
posX=launcherLeft+this.launcher.offsetWidth;
posY=getTop(this.launcher,true);
if(!this.isLTR){
posX-=this.launcher.offsetWidth;
posX-=menuWidth;}
if(this.isLTR){
if(posX+menuWidth>maxX){
var posX1=launcherLeft-menuWidth;
if(posX1>0){
posX=posX1;}
else{
posX=Math.max(minX,maxX-menuWidth);}}}
else{
if(posX<minX){
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{
this.menuTag.style.width=menuWidth+"px";
this.menuTag.style.height=menuHeight+"px";
this.menuTag.style.overflow="visible";}}
debug('show '+this.name+': '+posX+', '+posY);
this.menuTag.style.left=posX+"px";
this.menuTag.style.top=posY+"px";
this.menuTag.style.visibility="visible";
this.isVisible=true;
this.items[0].setSelected(true);
this.items[0].anchorTag.focus();/*
var coll=document.getElementsByTagName("SELECT");
if(coll!=null){
for(i=0;i<coll.length;i++){
if(intersect(this.menuTag,coll[i])==true){
if(coll[i].style.visibility!="collapse"){
coll[i].style.visibility="collapse";
this.hiddenItems.push(coll[i]);}}}}
coll=document.getElementsByTagName("IFRAME");
if(coll!=null){
for(i=0;i<coll.length;i++){
if(intersect(this.menuTag,coll[i])==true){
if(coll[i].style.visibility!="hidden"){
coll[i].style.visibility="hidden";
this.hiddenItems.push(coll[i]);}}}}*/
onmousedown_=document.onmousedown;
document.onmousedown=hideCurrentContextMenu;}}
function intersect(obj1,obj2){
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"));
if(lineIntersect(left1,right1,left2,right2)==true&&
lineIntersect(top1,bottom1,top2,bottom2)==true){
return true;}
return false;}
function lineIntersect(a,b,c,d){
if((a<=c&&c<=b)||(a<=d&&d<=b)||(c<=a&&d>=b)){
return true;}else{
return false;}}
function UilContextMenuHide(){
if(this.menuTag!=null){
debug('hide '+this.name);
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();}}
if(this.selectedItem!=null){
this.selectedItem.setSelected(false);}
this.menuTag.style.visibility="hidden";
this.isVisible=false;
this.isDismissable=true;
var itemCount=this.hiddenItems.length;
for(i=0;i<itemCount;i++){
var item=this.hiddenItems.pop();
item.style.visibility="visible";}
this.launcher=null;
document.onmousedown=onmousedown_;}}
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";
this.menuTag.onmouseover=contextMenuDismissDisable;
this.menuTag.onmouseout=contextMenuDismissEnable;
this.menuTag.oncontextmenu=contextMenuOnContextMenu;
var numItems=this.items.length;
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;}}}
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);}
var border=document.createElement("TABLE");
if(!this.isLTR)border.dir="RTL";
border.rules="none";
border.cellPadding=0;
border.cellSpacing=0;
border.border=0;
var borderBody=document.createElement("TBODY");
var borderRow=document.createElement("TR");
var borderData=document.createElement("TD");
var borderDiv=document.createElement("DIV");
borderDiv.className=this.menuBorderStyle;
borderData.appendChild(borderDiv);
borderRow.appendChild(borderData);
borderBody.appendChild(borderRow);
border.appendChild(borderBody);
var table=document.createElement("TABLE");
if(!this.isLTR)table.dir="RTL";
table.rules="none";
table.cellPadding=0;
table.cellSpacing=0;
table.width="100%";
table.border=0;
var tableBody=document.createElement("TBODY");
table.appendChild(tableBody);
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=this.menuTableStyle;
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);}
else{
tableBody2.appendChild(this.items[i].itemTag);}}
borderDiv.appendChild(table);
this.menuTag.appendChild(border);
document.body.appendChild(this.menuTag);}
if(recurse){
for(var i=0;i<this.items.length;i++){
if(this.items[i].submenu!=null){
this.items[i].submenu.create(recurse);}}}}
function UilContextMenuGetMenuItem(htmlElement){
if(htmlElement!=null){
if(htmlElement.nodeType==3){
htmlElement=htmlElement.parentNode;}
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){
return this.items[i];}
else if(this.items[i].submenu!=null&&
this.items[i].submenu.isVisible){
var item=this.items[i].submenu.getMenuItem(htmlElement);
if(item!=null){
return item;}}}}
return null;}
function UilContextMenuGetSelectedItem(){
var item=this.selectedItem;
if(item!=null&&item.submenu!=null&&item.submenu.isVisible){
return item.submenu.getSelectedItem();}
return item;}
function contextMenuDismissEnable(){
if(visibleMenu_!=null){
visibleMenu_.isDismissable=true;
if(visibleMenu_.isHyperlinkChild){
setMenuTimer();}}}
function contextMenuDismissDisable(){
if(visibleMenu_!=null){
visibleMenu_.isDismissable=false;
clearMenuTimer();}}
function contextMenuOnContextMenu(){
return false;}
function UilMenuItem(text,enabled,action,clientAction,submenu,icon,defItem,menuStyle,selectedMenuStyle){
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";
this.itemTag=null;
this.anchorTag=null;
this.arrowTag=null;
this.create=UilMenuItemCreate;
this.createSeparator=UilMenuItemCreateSeparator;
this.setSelected=UilMenuItemSetSelected;
this.updateStyle=UilMenuItemUpdateStyle;
this.getNextItem=UilMenuItemGetNextItem;
this.getPrevItem=UilMenuItemGetPrevItem;
if(this.submenu!=null){
this.action=null;}}
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&&!wclIsOpera_){
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();";
if(!wclIsOpera_)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.anchorTag.innerHTML;
this.anchorTag.className=this.menuStyle;
if(this.isDefault){
this.anchorTag.style.fontWeight="bold";}
var td=document.createElement("TD");
td.noWrap=true;
td.style.padding="3px";
td.appendChild(this.anchorTag);
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_;}
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=this.menuStyle;
this.itemTag.appendChild(leftPad);
this.itemTag.appendChild(td);
this.itemTag.appendChild(rightPad);
if(menuHasSubmenu){
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);}
this.updateStyle(this.itemTag);}}
function UilMenuItemCreateSeparator(tableBody,menuHasSubmenu){
var numCols=(menuHasSubmenu)?4:3;
for(var i=0;i<4;i++){
var tr=document.createElement("TR");
if(i==1){
tr.className="portlet-separator";}
else if(i==2){
tr.className="lwpMenuBackground";}
else{
tr.className="lwpMenuItem";}
var td=document.createElement("TD");
td.noWrap=true;
td.width="100%";
td.height="1px";
td.colSpan=numCols;
tr.appendChild(td);
tableBody.appendChild(tr);}}
function UilMenuItemSetSelected(isSelected){
if(isSelected&&!this.isSelected){
debug('selected: '+this.text);
if(this.parentMenu!=null&&
this.parentMenu.isVisible&&
this.parentMenu.selectedItem!=null&&
this.parentMenu.selectedItem!=this){
if(this.parentMenu.selectedItem.submenu!=null){
this.parentMenu.selectedItem.submenu.hide();}
this.parentMenu.selectedItem.setSelected(false);}
this.isSelected=true;
if(this.parentMenu!=null&&this.parentMenu.isVisible){
this.parentMenu.selectedItem=this;}
this.updateStyle(this.itemTag);}
else if(!isSelected&&this.isSelected){
debug('deselected: '+this.text);
if(this.submenu==null||(this.submenu!=null&&!this.submenu.isVisible)){
this.isSelected=false;
if(this.parentmenu!=null){
this.parentmenu.selectedItem=null;}
this.updateStyle(this.itemTag);}}}
function UilMenuItemUpdateStyle(tag,styleID){
if(tag!=null){
if(styleID==null){
styleID=this.menuStyle;
if(!this.isEnabled){
styleID=this.menuStyle;}
else if(this.isSelected){
styleID=this.selectedMenuStyle;}
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);}}}}
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];}}
return null;}}}
return null;}
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];}}
return null;}}}
return null;}
function menuItemLaunchAction(){
if(visibleMenu_!=null){
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{}}}}}
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);}}}}
function menuItemFocus(evt){
if(visibleMenu_!=null){
var item=visibleMenu_.getMenuItem(evt.target);
if(item!=null){
item.setSelected(true);}}}
function menuItemBlur(evt){
if(visibleMenu_!=null){
var item=visibleMenu_.getMenuItem(evt.target);
if(item!=null){}}}
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:
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:
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:
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:
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:
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
break;
case 27:
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
break;
case 13:
break;
default:
break;}}}
function menuItemMouseMove(evt){
if(visibleMenu_!=null){
var item=visibleMenu_.getMenuItem(evt.target);
if(item!=null){
if(!item.isSelected){
item.anchorTag.focus();}
if(item.submenu!=null&&!item.submenu.isVisible&&item.isEnabled){
item.submenu.show(item.anchorTag,item);}}}}
function menuItemMouseDown(evt){
menuItemLaunchAction();}
var allMenus_=new Array();
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;}
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)
var oldLauncher=launcher;
while((null !=launcher)&&(null==launcher.tagName)){
launcher=launcher.parentNode;}
if(null==launcher){
launcher=oldLauncher;}
if(eval(isDynamic)){
debug('showContextMenu: dynamic=true, load='+eval(doLoad)+', cache='+eval(isCacheable));
if(eval(doLoad)){
loadDynamicMenu(name);}
menu=getDynamicMenu(name,eval(isCacheable));
if(menu==null&&top.isContextMenuManager_!=null){
debug('showContextMenu: '+name+' added to queue');
top.contextMenuManagerRequest(name,window,launcher,isCacheable);}}
else{
debug('showContextMenu: static context 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();}
function hideCurrentContextMenu(forceHide){
if(visibleMenu_!=null&&(forceHide==true||visibleMenu_.isDismissable)){
if(visibleMenu_.isVisible){
visibleMenu_.hide();}
if(visibleMenu_.isDynamic&&!visibleMenu_.isCacheable){
uncacheContextMenu(visibleMenu_);}
visibleMenu_=null;}}
function uncacheContextMenu(menu){
debug('uncache menu: '+menu.name);
for(var i=0;i<menu.items.length;i++){
if(menu.items[i].submenu!=null){
uncacheContextMenu(menu.items[i].submenu);}}
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){
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){
if(recurse&&tag.offsetParent!=null){
size+=getTop(tag.offsetParent,recurse);}
if(tag!=null){
size+=tag.offsetTop;}}
return size;}
function loadDynamicMenu(menuURL){
debug('* loadDynamicMenu: '+menuURL);
var menu=getContextMenu(menuURL);
if(menu!=null){
if(menu.isVisible){
menu.hide();}
if(!menu.isCacheable){
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;}
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);}
ContextMenuBrowserDimensions.prototype.isOpera=function(){
return/Opera/.test(navigator.userAgent);;}





  
  	
  
        
 
 
delete djConfig.baseUrl;
