[pLog-svn] r5651 - in plog/branches/lifetype-1.3-ajax: class/action class/action/admin class/config class/controller class/dao class/data/filter class/data/forms class/data/validator/rules class/database class/net class/template/menu class/template/smarty/plugins class/view class/view/admin class/view/renderer js/editor js/location js/tinymce js/tinymce/plugins/insertresource js/ui js/ui/pages js/yui js/yui/animation js/yui/connection js/yui/container js/yui/container/assets js/yui/dom js/yui/event js/yui/yahoo locale/admin templates/admin templates/admin/chooser

oscar at devel.lifetype.net oscar at devel.lifetype.net
Fri Jul 13 13:34:46 EDT 2007


Author: oscar
Date: 2007-07-13 13:34:45 -0400 (Fri, 13 Jul 2007)
New Revision: 5651

Added:
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogselectaction.class.php
   plog/branches/lifetype-1.3-ajax/class/data/filter/trimfilter.class.php
   plog/branches/lifetype-1.3-ajax/class/template/smarty/plugins/function.js.php
   plog/branches/lifetype-1.3-ajax/class/view/renderer/
   plog/branches/lifetype-1.3-ajax/class/view/renderer/ajaxviewrenderer.class.php
   plog/branches/lifetype-1.3-ajax/js/ui/dom.js
   plog/branches/lifetype-1.3-ajax/js/ui/menu.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/
   plog/branches/lifetype-1.3-ajax/js/ui/pages/addbloguser.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/blogsettings.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/default.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/editcustomfield.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/global.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/globalsettings.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/newcustomfield.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/newpost.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/templatechooser.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/userpictureselect.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/usersettings.js
   plog/branches/lifetype-1.3-ajax/js/yui/animation/
   plog/branches/lifetype-1.3-ajax/js/yui/animation/animation-min.js
   plog/branches/lifetype-1.3-ajax/templates/admin/formvalidateajax.template
   plog/branches/lifetype-1.3-ajax/templates/admin/validateajax.template
Removed:
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryajaxaction.class.php
   plog/branches/lifetype-1.3-ajax/js/ui/default.js
   plog/branches/lifetype-1.3-ajax/js/ui/external.js
Modified:
   plog/branches/lifetype-1.3-ajax/class/action/action.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddblogtemplateaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddbloguseraction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddcustomfieldaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkcategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlocationajaxaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddpostaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminadminblogselectaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogsettingsaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admindefaultaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditarticlecategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditbloguseraction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditcustomfieldaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoriesaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinksaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/admineditpostsaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminloginaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminlogoutaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminmainaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminnewblogtemplateaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminpermissionrequiredaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminpostmanagementcommonaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatearticlecategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateblogsettingsaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatebloguseraction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatecustomfieldaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkcategoryaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelocationajaxaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatepostaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateusersettingsaction.class.php
   plog/branches/lifetype-1.3-ajax/class/action/admin/adminusersettingsaction.class.php
   plog/branches/lifetype-1.3-ajax/class/config/properties.class.php
   plog/branches/lifetype-1.3-ajax/class/controller/admincontrollermap.properties.php
   plog/branches/lifetype-1.3-ajax/class/controller/controller.class.php
   plog/branches/lifetype-1.3-ajax/class/dao/bloginfo.class.php
   plog/branches/lifetype-1.3-ajax/class/dao/locationawaredbobject.class.php
   plog/branches/lifetype-1.3-ajax/class/dao/userpermission.class.php
   plog/branches/lifetype-1.3-ajax/class/data/forms/formvalidator.class.php
   plog/branches/lifetype-1.3-ajax/class/data/validator/rules/urlformatrule.class.php
   plog/branches/lifetype-1.3-ajax/class/database/dbobject.class.php
   plog/branches/lifetype-1.3-ajax/class/net/request.class.php
   plog/branches/lifetype-1.3-ajax/class/template/menu/menurenderer.class.php
   plog/branches/lifetype-1.3-ajax/class/view/admin/admindefaultview.class.php
   plog/branches/lifetype-1.3-ajax/class/view/admin/adminlinkslistview.class.php
   plog/branches/lifetype-1.3-ajax/class/view/admin/adminpostslistview.class.php
   plog/branches/lifetype-1.3-ajax/class/view/admin/adminresourceslistview.class.php
   plog/branches/lifetype-1.3-ajax/js/editor/lifetypeeditor.js
   plog/branches/lifetype-1.3-ajax/js/location/location.js
   plog/branches/lifetype-1.3-ajax/js/tinymce/plugins/insertresource/editor_plugin.js
   plog/branches/lifetype-1.3-ajax/js/tinymce/tiny_mce-plog-resourcelist.js
   plog/branches/lifetype-1.3-ajax/js/ui/autosave.js
   plog/branches/lifetype-1.3-ajax/js/ui/common.js
   plog/branches/lifetype-1.3-ajax/js/ui/core.js
   plog/branches/lifetype-1.3-ajax/js/ui/forms.js
   plog/branches/lifetype-1.3-ajax/js/ui/plogui.js
   plog/branches/lifetype-1.3-ajax/js/yui/connection/connection-min.js
   plog/branches/lifetype-1.3-ajax/js/yui/container/assets/container.css
   plog/branches/lifetype-1.3-ajax/js/yui/container/container-min.js
   plog/branches/lifetype-1.3-ajax/js/yui/container/container_core-min.js
   plog/branches/lifetype-1.3-ajax/js/yui/dom/dom-min.js
   plog/branches/lifetype-1.3-ajax/js/yui/event/event-min.js
   plog/branches/lifetype-1.3-ajax/js/yui/yahoo/yahoo-min.js
   plog/branches/lifetype-1.3-ajax/locale/admin/locale_en_UK.php
   plog/branches/lifetype-1.3-ajax/templates/admin/addbloguser.template
   plog/branches/lifetype-1.3-ajax/templates/admin/blogcategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/blogsettings.template
   plog/branches/lifetype-1.3-ajax/templates/admin/blogtemplates.template
   plog/branches/lifetype-1.3-ajax/templates/admin/blogusers.template
   plog/branches/lifetype-1.3-ajax/templates/admin/chooser/blogtemplatechooser.template
   plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteblogschooser.template
   plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteuserschooser.template
   plog/branches/lifetype-1.3-ajax/templates/admin/chooser/userpictureselect.template
   plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template
   plog/branches/lifetype-1.3-ajax/templates/admin/default.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editblog.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editbloguser.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editcomments.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editcustomfield.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editfriendgroups.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editfriends.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlink.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template
   plog/branches/lifetype-1.3-ajax/templates/admin/edittrackbacks.template
   plog/branches/lifetype-1.3-ajax/templates/admin/formvalidate.template
   plog/branches/lifetype-1.3-ajax/templates/admin/globalarticlecategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/globalsettings_general.template
   plog/branches/lifetype-1.3-ajax/templates/admin/header.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newcustomfield.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newlink.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newlinkcategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newpost.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/permissions.template
   plog/branches/lifetype-1.3-ajax/templates/admin/poststats.template
   plog/branches/lifetype-1.3-ajax/templates/admin/resourceinfo.template
   plog/branches/lifetype-1.3-ajax/templates/admin/resources.template
   plog/branches/lifetype-1.3-ajax/templates/admin/simpleheader.template
   plog/branches/lifetype-1.3-ajax/templates/admin/siteblogs.template
   plog/branches/lifetype-1.3-ajax/templates/admin/sitelocales.template
   plog/branches/lifetype-1.3-ajax/templates/admin/sitetemplates.template
   plog/branches/lifetype-1.3-ajax/templates/admin/siteusers.template
   plog/branches/lifetype-1.3-ajax/templates/admin/statistics.template
   plog/branches/lifetype-1.3-ajax/templates/admin/usersettings.template
   plog/branches/lifetype-1.3-ajax/templates/admin/validate.template
Log:
All the work from the last 7 days or so playing around with Ajax and some improvements to the admin interface.


Modified: plog/branches/lifetype-1.3-ajax/class/action/action.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/action.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/action.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -196,7 +196,7 @@
 		{
 			$this->_form->setFormIsValid( false );
 			
-			if( $this->_request->getValue( "output", "html" ) == "json" ) {
+			if( $this->_request->isAjax()) {
 				// if the output happens to be 'json'/ajax, then we can do some lighter processing
 				// all we need to output whenever there is a validation error when using ajax
 				// is the error message adn the FormValidator object containing information about
@@ -246,14 +246,15 @@
 		 * @param fieldName The name of the field from the form that we're going to validate
 		 * @param validator A valid class inheriting from the Validator base class and that implements
 		 * the validate() method, that will be used for validating fields.
-		 * @param onlyIfAvailable validate this field only if its value is not emtpy		 
+		 * @param onlyIfAvailable validate this field only if its value is not emtpy
+		 * @param errorMessage An optional error message that will be shown 
 		 * @return Always true
 		 * @see FormValidator
 		 * @see Validator
 		 */
-		function registerFieldValidator( $fieldName, $validator, $onlyIfAvailable = false )
+		function registerFieldValidator( $fieldName, $validator, $onlyIfAvailable = false, $errorMessage = "" )
 		{
-			$this->_form->registerFieldValidator( $fieldName, $validator, $onlyIfAvailable );
+			$this->_form->registerFieldValidator( $fieldName, $validator, $onlyIfAvailable, $errorMessage );
 			
 			return true;
 		}

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -201,16 +201,23 @@
          */
         function mustAuthenticatePage()
         {
-			$locale = $this->getLocale();		
-			$config =& Config::getConfig();			
-			$destinationUrl = $config->getValue( "logout_destination_url", "" );
-            if( $destinationUrl == "" ) {
-				$view = new AdminDefaultView();
+			$locale = $this->getLocale();
+			if( $this->_request->isAjax()) {
+				// if the client is expecting ajax output, then we should return an error
+				// message in json format
+				$view = $this->getAjaxErrorView();
 			}
-			else {
-				// nothing else to do, just redirect the browser once we've cleaned up the session
-				lt_include( PLOG_CLASS_PATH."class/view/redirectview.class.php" );				
-				$view = new RedirectView( $destinationUrl );							
+			else {		
+				$config =& Config::getConfig();			
+				$destinationUrl = $config->getValue( "logout_destination_url", "" );
+	            if( $destinationUrl == "" ) {
+					$view = new AdminDefaultView();
+				}
+				else {
+					// nothing else to do, just redirect the browser once we've cleaned up the session
+					lt_include( PLOG_CLASS_PATH."class/view/redirectview.class.php" );				
+					$view = new RedirectView( $destinationUrl );							
+				}
 			}
 			$view->setErrorMessage( $locale->tr("error_access_forbidden" ));			
 			

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -4,8 +4,7 @@
     lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/articlecategory.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/data/validator/emptyvalidator.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminarticlecategorieslistview.class.php" );
 
     /**
@@ -32,14 +31,19 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// register two validators
-			$this->registerFieldValidator( "categoryName", new StringValidator());
-			$this->registerFieldValidator( "categoryDescription", new StringValidator());
-			$this->registerFieldValidator( "categoryInMainPage", new EmptyValidator());
+			$this->registerFieldValidator( "categoryName", new StringValidator(), false, $this->_locale->tr( "error_empty_name" ));
+			$this->registerField( "categoryDescription" );
+			$this->registerField( "categoryInMainPage" );
 			// and the view we should show in case there is a validation error
 			$errorView = new AdminTemplatedView( $this->_blogInfo, "newpostcategory" );
 			$errorView->setErrorMessage( $this->_locale->tr("error_adding_article_category" ));			
 			$this->setValidationErrorView( $errorView );
 			
+			// data filtering
+			$f = new HtmlFilter();
+			$this->_request->registerFilter( "categoryName", $f );
+			$this->_request->registerFilter( "categoryDescription", $f );
+			
 			$this->requirePermission( "add_category" );
 
         }
@@ -47,15 +51,15 @@
 		function addArticleCategory()
 		{
 			// fetch the data, we already know it's valid and that we can trust it!
-        	$this->_categoryName     = Textfilter::filterAllHTML($this->_request->getValue( "categoryName" ));
-            $this->_categoryUrl      = $this->_request->getValue( "categoryUrl" );
+			$f = new HtmlFilter();
+        	$this->_categoryName     = $this->_request->getValue( "categoryName" );
             $this->_categoryInMainPage = Textfilter::checkboxToBoolean($this->_request->getValue( "categoryInMainPage" ));
-			$this->_categoryDescription = Textfilter::filterAllHTML($this->_request->getValue( "categoryDescription" ));
+			$this->_categoryDescription = $this->_request->getValue( "categoryDescription" );
 			
 			// create the object...
             $categories = new ArticleCategories();
             $category   = new ArticleCategory( $this->_categoryName,
-                                               $this->_categoryUrl,
+                                               "",
                                                $this->_blogInfo->getId(),
                                                $this->_categoryInMainPage,
 											   $this->_categoryDescription );

Deleted: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryajaxaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryajaxaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddarticlecategoryajaxaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,108 +0,0 @@
-<?php
-
-	lt_include( PLOG_CLASS_PATH."class/action/admin/ajax/adminajaxaction.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-
-    /**
-     * \ingroup Action
-     * @private
-     *
-     * Action that adds a new article category to the database.
-     */
-    class AdminAddArticleCategoryAjaxAction extends AdminAjaxAction 
-	{
-
-    	var $_categoryName;
-
-    	/**
-         * Constructor. If nothing else, it also has to call the constructor of the parent
-         * class, BlogAction with the same parameters
-         */
-        function AdminAddArticleCategoryAjaxAction( $actionInfo, $request )
-        {
-        	$this->AdminAjaxAction( $actionInfo, $request );
-        }
-
-        function validate()
-        {
-			// check if the user has the add_category permission
-            if( !$this->userHasPermission( "add_category" ) ) {
-	            $this->_view = new AdminXmlView( $this->_blogInfo, "response" );				
-	            $this->_view->setValue( "method", "addCategoryAjax" );
-            	$this->_view->setValue( "success", "0" );
-            	$this->_view->setValue( "message", $this->_locale->tr("error_permission_required") );    	            
-                return false;
-            }
-
-            // check if category name is empty
-        	$this->_categoryName     = Textfilter::filterAllHTML($this->_request->getValue( "categoryName" ));
-            $this->_categoryUrl      = "";
-            $this->_categoryInMainPage = 1;
-			$this->_categoryDescription = $this->_categoryName;
-			$this->_properties = "";	
-
-            if( empty($this->_categoryName) || $this->_categoryName == "" ) {
-	            $this->_view = new AdminXmlView( $this->_blogInfo, "response" );				
-	            $this->_view->setValue( "method", "addCategoryAjax" );
-            	$this->_view->setValue( "success", "0" );
-            	$this->_view->setValue( "message", $this->_locale->tr("error_adding_article_category") );    	            
-                return false;
-            }
-
-            return true;
-        }
-
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
-            // get the category name, it will be the only parameter
-        	$this->_categoryName = Textfilter::filterAllHTML($this->_request->getValue( "categoryName" ));
-            if( empty($this->_categoryName) || $this->_categoryName == "" ) {
-	            $this->_view = $this->getErrorView( $this->_locale->tr("error_adding_article_category"));    	            
-                return false;
-            }               
-	
-			// create the object...
-            $categories = new ArticleCategories();
-            $category   = new ArticleCategory( $this->_categoryName,
-                                               "",				// category URL, not used
-                                               $this->_blogInfo->getId(),
-                                               1,				 // show the category in the main page
-											   $this->_categoryName,		// category description, same as name
-											   0,
-											   "" );
-											   
-			// fire the pre event...
-			$this->notifyEvent( EVENT_PRE_CATEGORY_ADD, Array( "category" => &$category ));
-
-			$this->_view = new AdminAjaxView( $this->_blogInfo, "addCategoryAjax" );
-            
-            // once we have built the object, we can add it to the database!
-            $catId = $categories->addArticleCategory( $category );
-
-            // once we have built the object, we can add it to the database
-            if( $catId ) {
-            	$this->_view->setSuccess( true );
-            	$this->_view->setMessage( $this->_locale->pr("category_added_ok", $this->_categoryName ));
-            	$this->_view->setResult( $category );
-				
-				// fire the post event
-				$this->notifyEvent( EVENT_POST_CATEGORY_ADD, Array( "category" => &$category ));
-				
-				// clear the cache if everything went fine
-				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );							
-			}             
-            else {
-            	$this->_view->setSuccess( false );
-            	$this->_view->setMessage( $this->_locale->tr("error_adding_article_category") );              	 
-            }
-                
-            return true;	
-        }
-    }
-?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddblogtemplateaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddblogtemplateaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddblogtemplateaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -35,20 +35,22 @@
 
         function validate()
         {
+			$valid = parent::validate();
+	
             //
             // first of all, let's make sure that users are allowed to
             // add new templates
             //
             $config =& Config::getConfig();
-            if( !$config->getValue( "users_can_add_templates" )) {
-                $this->_view = new AdminBlogTemplateSetsListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_add_template_disabled"));
-                $this->setCommonData();
-
-                return false;
+            if( !$config->getValue( "users_can_add_templates" )) {	
+                $view = new AdminBlogTemplateSetsListView( $this->_blogInfo );
+                $view->setErrorMessage( $this->_locale->tr("error_add_template_disabled"));
+				$this->setValidationErrorView( $view );
+				$this->validationErrorProcessing();					
+				$valid = false;
             }
 
-			return parent::validate();
+			return( $valid );
 		}
 
         function _performUploadTemplate()
@@ -58,7 +60,7 @@
             $tmpFolder = $config->getValue( "temp_folder" );
 
             // move it to the temporary folder
-            $files    = HttpVars::getFiles();
+            $files = HttpVars::getFiles();
 
             if( count($files) == 0 || $files["templateFile"]["name"] == "") {
 				$this->_view = new AdminTemplatedView( $this->_blogInfo, "newblogtemplate" );

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddbloguseraction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddbloguseraction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddbloguseraction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -3,6 +3,7 @@
 	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
     lt_include( PLOG_CLASS_PATH."class/view/admin/adminnewbloguserview.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
     lt_include( PLOG_CLASS_PATH."class/view/admin/adminbloguserslistview.class.php" );
@@ -66,26 +67,23 @@
             return true;
         }
 
-        function perform()
-        {
+		function addBlogUser()
+		{
             $this->_notificationText = $this->_request->getValue( "newBlogUserText" );
-        	$this->_newUsername = Textfilter::filterAllHTML($this->_request->getValue( "newBlogUserName" ));
-			$this->_perms = $this->_request->getValue( "perm" );
-		
+        	$this->_newUsername = $this->_request->getFilteredValue( "newBlogUserName", new HtmlFilter());
+			$this->_perms = $this->_request->getValue( "perm" );			
+			
         	// see if the user exists
             $users = new Users();
             $userInfo = $users->getUserInfoFromUsername( $this->_newUsername );
             if( !$userInfo ) {
-            	$this->_view = new AdminNewBlogUserView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->pr("error_invalid_user"), $this->_newUsername );
-				$this->_form->setFieldValidationStatus( "newBlogUserName", false );
-                $this->setCommonData( true );
-
+				$this->_message = $this->_locale->pr("error_invalid_user", $this->_newUsername );
                 return false;
             }
 			$this->notifyEvent( EVENT_USER_LOADED, Array( "user" => &$userInfo ));			
-
+			
             // get the permissions that this user will be granted
+			$this->notifyEvent( EVENT_PRE_USER_UPDATE, Array( "user" => &$userInfo ));
             $userPerms = new UserPermissions();
 			if( is_array( $this->_perms )) {
 				foreach( $this->_perms as $val => $permId ) {
@@ -94,22 +92,32 @@
 				}
 			}
 			
-			$this->notifyEvent( EVENT_PRE_USER_UPDATE, Array( "user" => &$userInfo ));
-            if( !$res ) {
+			if( !$res ) {
+				$this->_message = $this->_locale->pr("error_adding_user", $userInfo->getUsername());
+				return( false );
+			}
+			$this->notifyEvent( EVENT_POST_USER_UPDATE, Array( "user" => &$userInfo ));			
+
+            // send a notification if enabled
+            if( $this->_sendNotification ) {
+            	$this->sendNotificationEmail( $userInfo );
+            }
+
+			$this->_message = $this->_locale->pr("user_added_to_blog_ok", $userInfo->getUsername());
+
+			return( true );
+		}
+
+        function perform()
+        {
+            if( !$this->addBlogUser()) {
             	// there was an error adding the user to the blog
             	$this->_view = new AdminNewBlogUserView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->pr("error_adding_user", $userInfo->getUsername()));
+                $this->_view->setErrorMessage( $this->_message );
                 $this->setCommonData();
-
                 return false;
             }
-			$this->notifyEvent( EVENT_POST_USER_UPDATE, Array( "user" => &$userInfo ));
 
-            // send a notification if enabled
-            if( $this->_sendNotification ) {
-            	$this->sendNotificationEmail( $userInfo );
-            }
-
 			if( $this->userHasPermission( "view_blog_users" ))  {
             	$this->_view = new AdminBlogUsersListView( $this->_blogInfo );
 			}
@@ -117,11 +125,22 @@
 				$this->_view = new AdminNewBlogUserView( $this->_blogInfo );
 			}
 				
-            $this->_view->setSuccessMessage( $this->_locale->pr("user_added_to_blog_ok", $userInfo->getUsername()));
+            $this->_view->setSuccessMessage( $this->_message );
             $this->setCommonData();
 
             return true;
         }
-        
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+            $this->_view = new AdminAjaxView( $this->_blogInfo );			
+            if( $this->addBlogUser())
+				$this->_view->setSuccessMessage( $this->_message );
+			else
+                $this->_view->setErrorMessage( $this->_message );
+
+            return true;			
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddcustomfieldaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddcustomfieldaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddcustomfieldaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -7,6 +7,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/admincustomfieldslistview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
 
     /**
      * \ingroup Action
@@ -28,9 +29,9 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// data validation
-			$this->registerFieldValidator( "fieldName", new StringValidator());
-			$this->registerFieldValidator( "fieldDescription", new StringValidator());
-			$this->registerFieldValidator( "fieldType", new IntegerValidator());
+			$this->registerFieldValidator( "fieldName", new StringValidator(), false, $this->_locale->tr("error_empty_name"));
+			$this->registerFieldValidator( "fieldDescription", new StringValidator(), false, $this->_locale->tr("error_empty_description"));
+			$this->registerFieldValidator( "fieldType", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value" ));
 			$this->_form->registerField( "fieldSearchable" );
 			$this->_form->registerField( "fieldHidden" );
 			$this->_form->registerField( "fieldId" );
@@ -41,15 +42,12 @@
 			
 			$this->requirePermission( "add_custom_field" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function addCustomField()
+		{
 			// fetch the data
-			$this->_fieldName = Textfilter::filterAllHTML($this->_request->getValue( "fieldName" ));
-			$this->_fieldDescription = Textfilter::filterAllHTML($this->_request->getValue( "fieldDescription" ));
+			$this->_fieldName = $this->_request->getValue( "fieldName", new HtmlFilter());
+			$this->_fieldDescription = $this->_request->getValue( "fieldDescription", new HtmlFilter());
 			$this->_fieldType = $this->_request->getValue( "fieldType" );
 			$this->_fieldSearchable = (int)($this->_request->getValue( "fieldSearchable" ) != "" );
 			$this->_fieldHidden = (int)($this->_request->getValue( "fieldHidden" ) != "" );
@@ -80,25 +78,52 @@
 			$this->notifyEvent( EVENT_PRE_CUSTOM_FIELD_ADD, Array( "field" => &$customField ));
 			
 			$result = $fields->addCustomField( $customField );
+			if( !$result ) 
+				return false;
+
+			// throw the post-event if all went fine
+			$this->notifyEvent( EVENT_POST_CUSTOM_FIELD_ADD, Array( "field" => &$customField ));
 			
+			return( $customField );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$customField = $this->addCustomField();
 			if( $this->userHasPermission( "view_custom_fields" ))
 				$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
 			else
 				$this->_view = new AdminTemplatedView( $this->_blogInfo, "newcustomfield" );
 											   
-			if( !$result ) {				
+			if( !$customField ) {				
 				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_custom_field" ));
 			}
 			else {
-				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_added_ok", $customField->getName()));
-				
-				// throw the post-event if all went fine
-				$this->notifyEvent( EVENT_POST_CUSTOM_FIELD_ADD, Array( "field" => &$customField ));
+				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_added_ok", $customField->getName()));				
 			}
 			
 			$this->setCommonData();		
-		
-            return true;
+			return( true );
         }
+
+		/**
+		 * Ajax-specific behaviour
+		 */
+		function performAjax()
+		{
+			$customField = $this->addCustomField();
+
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			if( !$customField )			
+				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_custom_field" ));
+			else
+				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_added_ok", $customField->getName()));
+
+			return( true );			
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -9,6 +9,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/emptyvalidator.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminnewlinkview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminlinkslistview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
 
     /**
      * \ingroup Action
@@ -24,6 +25,7 @@
         var $_linkDescription;
         var $_linkCategoryId;
 		var $_properties;
+		var $_message;
 
         /**
          * Constructor. If nothing else, it also has to call the constructor of the parent
@@ -34,30 +36,35 @@
             $this->AdminAction( $actionInfo, $request );
 			
 			// data validation
-			$this->registerFieldValidator( "linkName", new StringValidator());
-			$this->registerFieldValidator( "linkUrl", new HttpUrlValidator());
+			$this->registerFieldValidator( "linkName", new StringValidator(), false, $this->_locale->tr( "error_empty_name" ));
+			$this->registerFieldValidator( "linkUrl", new HttpUrlValidator(), false, $this->_locale->tr( "error_invalid_url" ));
 			// linkRssFeed will only be validated if it is available in the form
-			$this->registerFieldValidator( "linkRssFeed", new HttpUrlValidator(), true );
+			$this->registerFieldValidator( "linkRssFeed", new HttpUrlValidator(), true, $this->_locale->tr( "error_invalid_url" ));
 			$this->registerFieldValidator( "linkCategoryId", new IntegerValidator());
 			$this->registerFieldValidator( "linkDescription", new EmptyValidator());
 			$view = new AdminNewLinkView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_adding_link" ));
 			$this->setValidationErrorView( $view );
 			
+			// data filtering
+			$f = new HtmlFilter();
+			$this->_request->registerFilter( "linkName", $f );
+			$this->_request->registerFilter( "linkUrl", $f );
+			$this->_request->registerFilter( "linkDescription", $f );
+			$this->_request->registerFilter( "linkRssFeed", $f );
+			
+			// permission requirements
 			$this->requirePermission( "add_link" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function addLink()
+		{
 			// fetch the data
-            $this->_linkName = Textfilter::filterAllHTML($this->_request->getValue( "linkName" ));
-            $this->_linkUrl  = Textfilter::filterAllHTML($this->_request->getValue( "linkUrl" ));
+            $this->_linkName = $this->_request->getValue( "linkName" );
+            $this->_linkUrl  = $this->_request->getValue( "linkUrl" );
             $this->_linkCategoryId = $this->_request->getValue( "linkCategoryId" );
-            $this->_linkDescription = Textfilter::filterAllHTML($this->_request->getValue( "linkDescription" ));
-			$this->_linkRss = Textfilter::filterAllHTML($this->_request->getValue( "linkRssFeed" ));
+            $this->_linkDescription = $this->_request->getValue( "linkDescription" );
+			$this->_linkRss = $this->_request->getValue( "linkRssFeed" );
 			$this->_properties = Array();
 			
             // adds the new link to the database
@@ -67,28 +74,60 @@
 								   0, $this->_linkRss, $this->_properties );
 			$this->notifyEvent( EVENT_PRE_LINK_ADD, Array( "link" => &$link ));
             if( !$myLinks->addMyLink( $myLink, $this->_blogInfo->getId())) {
-                $this->_view = new AdminNewLinkView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_adding_link"));
-                $this->setCommonData();
-
-                return false;
+				$this->_message = $this->_locale->tr( "error_adding_link" );
+				return( false );
             }
 			$this->notifyEvent( EVENT_POST_LINK_ADD, Array( "link" => &$link ));			
+			
+			// clear the cache
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+			
+			// set the success message
+			$this->_message = $this->_locale->pr("link_added_ok", $myLink->getName());
 
+            // better to return true if everything fine
+            return( $myLink );			
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			if(!( $myLink = $this->addLink())) {
+            	$this->_view = new AdminNewLinkView( $this->_blogInfo );
+            	$this->_view->setErrorMessage( $this->_message );
+            	$this->setCommonData();
+				return( false );
+			}
+
 			// if the user has no permission to view the links, the we have to find another view
 			if( $this->userHasPermission( "view_links" ))
 	            $this->_view = new AdminLinksListView( $this->_blogInfo );
 			else
                 $this->_view = new AdminNewLinkView( $this->_blogInfo );
 			
-            $this->_view->setSuccessMessage( $this->_locale->pr("link_added_ok", $myLink->getName()));
+            $this->_view->setSuccessMessage( $this->_message );
             $this->setCommonData();
-			
-			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 
-            // better to return true if everything fine
-            return true;
+            return false;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );			
+			
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			if( $myLink = $this->addLink()) {
+				$this->_view->setValue( "link", $myLink );
+				$this->_view->setSuccess( true );
+			}
+			else {
+				$this->_view->setSuccess( false );				
+			}
+			$this->_view->setMessage( $this->_message );
+			
+			return( true );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkcategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlinkcategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -27,8 +27,10 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// data validation
-			$this->registerFieldValidator( "linkCategoryName", new StringValidator());
-			$this->setValidationErrorView( new AdminTemplatedView( $this->_blogInfo, "newlinkcategory" ));
+			$this->registerFieldValidator( "linkCategoryName", new StringValidator(), false, $this->_locale->tr("error_empty_name"));
+			$view = new AdminTemplatedView( $this->_blogInfo, "newlinkcategory" );
+			$view->setErrorMessage( $this->_locale->tr( "error_adding_link_category" ));
+			$this->setValidationErrorView( $view );
 			
 			$this->requirePermission( "add_link_category" );
         }

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlocationajaxaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlocationajaxaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddlocationajaxaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,6 +1,6 @@
 <?php
 
-	lt_include( PLOG_CLASS_PATH."class/action/admin/ajax/adminajaxaction.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
@@ -10,20 +10,28 @@
      * \ingroup Action
      * @private
      */
-	class AdminAddLocationAjaxAction extends AdminAjaxAction
+	class AdminAddLocationAjaxAction extends AdminAction
 	{
 		function AdminAddLocationAjaxAction( $actionInfo, $request )
 		{
 			$this->AdminAction( $actionInfo, $request );
 			
-			$this->registerFieldValidator( "lat", new StringValidator());
-			$this->registerFieldValidator( "long", new StringValidator());
-			$this->registerFieldValidator( "desc", new StringValidator());									
-			$this->setValidationErrorView( $this->getErrorView( $this->_locale->tr("error_adding_location" )));
+			$this->registerFieldValidator( "lat", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "long", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "desc", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));									
+			
+			$view = new AdminAjaxView( $this->_blogInfo );
+			$view->setValue( "message", $this->_locale->tr("error_adding_location" ));
+			$this->setValidationErrorView( $view );
 		}
 		
 		function perform()
 		{
+			die( "output not supported" );
+		}
+		
+		function performAjax()
+		{
 			// load data from the request
 			$lat = $this->_request->getValue( "lat" );
 			$long = $this->_request->getValue( "long" );
@@ -37,23 +45,20 @@
 				$desc							// description
 			);
 			
+            $this->_view = new AdminAjaxView( $this->_blogInfo, "addLocationAjax" );			
+			
 			// add the Location object and send an error if there was a problem
 			$locations = new Locations();
 			$res = $locations->addLocation( $loc );
 			if( !$res ) {
-				$this->_view = $this->getErrorView( $this->_locale->tr("error_adding_location" ));
-				$this->setCommonData();
+				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_location" ));
 				return( false );
 			}
 			
 			// everything went fine, we can send the confirmation
-            $this->_view = new AdminAjaxView( $this->_blogInfo, "response" );
-            $this->_view->setValue( "method", "addLocationAjax" );
+            $this->_view->setSuccessMessage( "message", $this->_locale->tr("location_added_ok" ));
+			$this->_view->setValue( "location", $loc );
 
-            $this->_view->setValue( "success", "1" );
-            $this->_view->setValue( "message", $this->_locale->tr("location_added_ok" ));
-			$this->_view->setValue( "result", $loc );
-
             return true;
 		}
     }

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddpostaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminaddpostaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,6 +16,8 @@
      */
     class AdminAddPostAction extends AdminPostManagementCommonAction
 	{
+		var $_article;
+		
     	/**
          * Constructor. If nothing else, it also has to call the constructor of the parent
          * class, BlogAction with the same parameters
@@ -25,17 +27,18 @@
         	$this->AdminPostManagementCommonAction( $actionInfo, $request );
         	
         	// for data validation purposes, posts must have at least a topic, an intro text, and a category
-        	$this->registerFieldValidator( "postText", new StringValidator());
-        	$this->registerFieldValidator( "postTopic", new StringValidator());
-        	$this->registerFieldValidator( "postCategories", new ArrayValidator());
-        	$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true );
+        	$this->registerFieldValidator( "postText", new StringValidator(), false, $this->_locale->tr("error_missing_post_text" ));
+        	$this->registerFieldValidator( "postTopic", new StringValidator(), false, $this->_locale->tr("error_missing_post_topic" ));
+        	$this->registerFieldValidator( "postCategories", new ArrayValidator(), false, $this->_locale->tr("error_no_category_selected"));
+        	$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true,  $this->_locale->tr("error_no_global_article_category_selected"));
+			$this->registerFieldValidator( "postUser", new IntegerValidator(), false, $this->_locale->tr("error_invalid_user" ));
+			$this->registerFieldValidator( "postStatus", new IntegerValidator(), false, $this->_locale->tr( "error_incorrect_value" ));
         	$view = new AdminNewPostView( $this->_blogInfo );
         	$view->setErrorMessage( $this->_locale->tr("error_adding_post"));
         	$this->setValidationErrorView( $view );
         	
         	// these fields do not need to be validated but should be there when we show the view once again
         	$this->registerField( "postSlug" );
-        	$this->registerField( "postStatus" );
         	$this->registerField( "sendNotification" );
         	$this->registerField( "sendTrackbacks" );
         	$this->registerField( "sendPings" );
@@ -44,7 +47,6 @@
         	$this->registerField( "customField" );
         	$this->registerField( "postDateTime" );
         	$this->registerField( "trackbackUrls" );
-			$this->registerField( "postUser" );
 
 			// security checks
 			$this->requirePermission( "add_post" );
@@ -102,13 +104,10 @@
 			
 			return $artId;
 		}
-
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
-            lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
+		
+		function saveArticle()
+		{
+          lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
 	        lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 
 			$this->_fetchCommonData();
@@ -118,11 +117,11 @@
             $this->_previewPost    = $this->_request->getValue( "previewPost" );
             $this->_addPost        = $this->_request->getValue( "addPost" );
 			$this->_saveDraft      = $this->_request->getValue( "isDraft" );
-	        
+
             // we know for sure that the information is correct so we can now add
             // the post to the database
 			$postText = Textfilter::xhtmlize($this->_postText);
-			
+
 			$article  = new Article( $this->_postTopic, 
 			                         $postText, 
 			                         $this->_postCategories,
@@ -136,25 +135,11 @@
 			$article->setDateObject( $this->_postTimestamp );
 			$article->setCommentsEnabled( $this->_commentsEnabled );
 			$article->setGlobalCategoryId( $this->_globalArticleCategoryId );
-		
+
 			// save the article to the db
 			$artId = $this->_savePostData( $article );
 			
-			// depending on the permission that the user has, we'll show one view or another
-			if( !$this->userHasPermission( "view_posts" ))
-				$view = "AdminNewPostView";
-			else
-				$view = "AdminPostsListView";			
-			
-        	// once we have built the object, we can add it to the database
-        	if( $artId ) {
-	            // clear autosave cookie
-	            $this->clearAutoSaveCookie();
-
-                $this->_view = new $view( $this->_blogInfo );
-            	//$article->setId( $artId );
-                $message = $this->_locale->tr("post_added_ok");
-                
+			if( $artId ) {
                 // train the filter, but only if enabled
 				if( $this->_config->getValue( "bayesian_filter_enabled" ) == true ) {
 		            lt_include( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
@@ -170,9 +155,43 @@
                     $message .= " ".$this->_locale->tr("send_notifications_ok");
         	    }
 
+				$this->notifyEvent( EVENT_POST_POST_ADD, Array( "article" => &$article )); 
+				
+				// empty the cache used by this blog
+                lt_include( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+
+				CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+			}
+			
+			return( $article );			
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$article = $this->saveArticle();
+  			
+			// depending on the permission that the user has, we'll show one view or another
+			if( !$this->userHasPermission( "view_posts" ))
+				$view = "AdminNewPostView";
+			else
+				$view = "AdminPostsListView";			
+			
+        	// once we have built the object, we can add it to the database
+			$message = "";
+        	if( $article ) {
+	            // clear autosave cookie
+	            $this->clearAutoSaveCookie();
+
+                $this->_view = new $view( $this->_blogInfo );
+            	//$article->setId( $artId );
+                $message = $this->_locale->tr("post_added_ok");
+                
                 // we only have to send trackback pings if the article was published
                 // otherwise there is no need to...
-				$article->setId( $artId );
+				//$article->setId( $artId );
                 if( $article->getStatus() == POST_STATUS_PUBLISHED) {
                 	// get the output from the xmlrpc pings but only if the user decided to do so!
 
@@ -212,14 +231,7 @@
 							$this->_view->setValue( "trackbackLinks", $trackbackLinks );            				
          				}
                     }
-                    $this->_view->setSuccessMessage( $message );
-					
-					$this->notifyEvent( EVENT_POST_POST_ADD, Array( "article" => &$article )); 
-					
-					// empty the cache used by this blog
-	                lt_include( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
-
-					CacheControl::resetBlogCache( $this->_blogInfo->getId());						
+                    $this->_view->setSuccessMessage( $message );											
                 }
                 else {
                 	$this->_view = new $view( $this->_blogInfo );
@@ -250,5 +262,29 @@
 	    	setcookie( $cookieBaseName.'postTopic', '', -1, '/' );
 	    	setcookie( $cookieBaseName.'postText', '', -1, '/' );
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			
+			if(( $article = $this->saveArticle())) {
+				if( $article->getStatus() == POST_STATUS_PUBLISHED ) {
+					$message = $this->_locale->tr( "post_added_ok" );
+				}
+				else {
+					$message = $this->_locale->tr( "post_added_not_published" );
+				}
+				$this->_view->setSuccessMessage( $message );
+				$this->_view->setValue( "article", $article );
+			}
+			else {
+				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_post" ));
+			}
+			
+			$this->clearAutoSaveCookie();
+			
+			return( true );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminadminblogselectaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminadminblogselectaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminadminblogselectaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -75,4 +75,4 @@
             return true;
         }
     }
-?>
+?>
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogselectaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogselectaction.class.php	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogselectaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,111 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/action.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admindashboardview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admindefaultview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/session/sessioninfo.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/misc/version.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * When the user fills in the login form, we jump to this action which will show
+     * another form when the user will choose to which of the blog he or she wants to
+     * carry out administrative tasks.
+     */
+    class AdminBlogSelectAction extends Action 
+	{
+
+        var $_locale;
+		var $_pm;
+		var $_config;
+		var $_userInfo;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminBlogSelectAction( $actionInfo, $request )
+        {
+        	$this->Action( $actionInfo, $request );
+
+            $this->_config =& Config::getConfig();
+            $this->_locale =& Locales::getLocale( $this->_config->getValue( "default_locale" ));			
+			// create a plugin manager
+			$this->_pm =& PluginManager::getPluginManager();
+        }
+
+		function validate()
+		{
+			// we need to check if there is a user session already created and if not,
+			// reject the request
+            // We have to update the userInfo in session after we check all situations
+            $session = HttpVars::getSession();
+            $sessionInfo = $session["SessionInfo"];
+
+            if( !$sessionInfo->getValue( "userInfo" )) {
+				$this->_view =  new AdminDefaultView();
+				$this->_view->setErrorMessage( $this->_locale->tr("error_access_forbidden" ));	
+				$result = false;
+			}
+			else { 
+				$this->_userInfo = $sessionInfo->getValue( "userInfo" );
+				$result = true;
+			}
+				
+			return( $result && parent::validate());
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$userInfo = $this->_userInfo;
+	
+            // get the list of blogs to which the user belongs
+			$users = new Users();
+            $userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
+
+            // but if he or she does not belong to any yet, we quit
+            if( empty($userBlogs)) {
+            	$this->_view = new AdminDefaultView();
+                $this->_view->setErrorMessage( $this->_locale->tr("error_dont_belong_to_any_blog"));
+				$this->setCommonData();
+
+                return false;
+            }
+			
+			$this->_pm->notifyEvent( EVENT_BLOGS_LOADED, Array( "blogs" => &$userBlogs, "from" => "Login" ));			
+			
+			// check if we are skipping the dashboard
+			if( $this->_config->getValue( "skip_dashboard" )) {
+				// get the first blog that came
+				$this->_blogInfo = $userBlogs[0];
+				// set it in the session
+            	$session = HttpVars::getSession();
+            	$sessionInfo->setValue( "blogInfo", $this->_blogInfo );
+            	$session["SessionInfo"] = $sessionInfo;
+            	HttpVars::setSession( $session );			
+            	// and then continue...
+            	if( $userInfo->hasPermissionByName( "new_post", $this->_blogInfo->getId()))
+					AdminController::setForwardAction( "newPost" );
+				else
+					AdminController::setForwardAction( "Manage" );
+			}
+			else {
+				$this->_view = new AdminDashboardView( $userInfo, $userBlogs );	
+			}
+            // better to return true if everything's fine
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogsettingsaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogsettingsaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminblogsettingsaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -34,5 +34,18 @@
             // better to return true if everything fine
             return true;
         }
+
+		/**
+		 * Ajax specific behaviour
+		 */
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setSuccess( true );
+			$this->_view->setValue( "bloginfo", $this->_blogInfo );
+			
+			return( true );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admindefaultaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admindefaultaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admindefaultaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -69,4 +69,4 @@
             return true;
         }
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditarticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditarticlecategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditarticlecategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -38,15 +38,25 @@
 			$this->requirePermission( "update_category" );
         }
 
+		function loadData()
+		{
+        	// fetch the category
+			$this->_categoryId = $this->_request->getValue( "categoryId" );
+            $categories = new ArticleCategories();
+            $category   = $categories->getCategory( $this->_categoryId, $this->_blogInfo->getId());
+
+			if( $category )
+				$this->notifyEvent( EVENT_CATEGORY_LOADED, Array( "category" => &$category ));
+
+			return( $category );
+		}
+
         /**
          * Carries out the specified action
          */
         function perform()
         {
-        	// fetch the category
-			$this->_categoryId = $this->_request->getValue( "categoryId" );
-            $categories = new ArticleCategories();
-            $category   = $categories->getCategory( $this->_categoryId, $this->_blogInfo->getId());
+			$category = $this->loadData();
             // show an error if we couldn't fetch the category
             if( !$category ) {
             	$this->_view = new AdminArticleCategoriesListView( $this->_blogInfo );
@@ -57,7 +67,6 @@
                 return false;
             }
 			
-			$this->notifyEvent( EVENT_CATEGORY_LOADED, Array( "category" => &$category ));			
             // otherwise show the form to edit its fields
         	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory" );
             $this->_view->setValue( "category", $category );
@@ -70,5 +79,21 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			
+			$category = $this->loadData();
+			if( $category ) {
+				$this->_view->setSuccess( true );
+				$this->_view->setValue( "category", $category );
+			}
+			else {
+				$this->_view->setSuccess( false );
+				$this->_view->setMessage( $this->_locale->tr("error_fetching_category" ));
+			}
+		}
     }
 ?>

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditbloguseraction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditbloguseraction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditbloguseraction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -30,17 +30,24 @@
 			$this->requirePermission( "update_blog_user");
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+		function loadUser()
+		{
 			// fetch the data, we already know it's valid and that we can trust it!
 			$userId = $this->_request->getValue( "userId" );
 			
 			// load the user
 			$users = new Users();
 			$userInfo = $users->getUserInfoFromId( $userId );
+
+			return( $userInfo );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$userInfo = $this->loadUser();
 			if( !$userInfo ) {
 				$errorView = new AdminBlogUsersListView( $this->_blogInfo );
 				$errorView->setErrorMessage( $this->_locale->tr("error_invalid_user_id" ));
@@ -52,10 +59,29 @@
 			$this->_view = new AdminTemplatedView( $this->_blogInfo, "editbloguser" );
 			$this->_view->setValue( "edituser", $userInfo );			
 	        $perms = new Permissions();
-			$this->_view->setValue( "perms", $perms->getAllPermissions());			
+			$this->_view->setValue( "perms", $perms->getAllPermissions());
 			$this->setCommonData();
 			
 			return( true );
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			
+			$userInfo = $this->loadUser();
+			if( !$userInfo ) {
+				$this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user_id" ));
+				return( false );
+			}			
+			
+			$this->_view->setValue( "bloguser", $userInfo );
+			$this->_view->setValue( "blog", $this->_blogInfo );
+			$this->_view->setValue( "permissions", $userInfo->getPermissions( $this->_blogInfo->getId()));
+			
+			// include also the permission that this user has in this blog
+			return( true );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditcustomfieldaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditcustomfieldaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditcustomfieldaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -14,7 +14,6 @@
      */
     class AdminEditCustomFieldAction extends AdminAction
 	{
-
     	var $_fieldId;
 
         function AdminEditCustomFieldAction( $actionInfo, $request )
@@ -26,36 +25,35 @@
 			$view = new AdminCustomFieldsListView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr( "error_fetching_custom_field" ));
 			$this->setValidationErrorView( $view );
-			// dummy validation data
-			$this->_form->registerField( "fieldName" );
-			$this->_form->registerField( "fieldDescription" );
-			$this->_form->registerField( "fieldType" );
-			$this->_form->registerField( "fieldSearchable" );
-			$this->_form->registerField( "fieldHidden" );
-			$this->_form->registerField( "fieldValues" );
 			
 			$this->requirePermission( "update_custom_field" );
         }
+
+		function getCustomField()
+		{
+        	// fetch the field information
+			$this->_fieldId = $this->_request->getValue( "fieldId" );
+			$fields = new CustomFields();
+			$field = $fields->getCustomField( $this->_fieldId );
+			
+			// fire the field loaded event, in case any plugin wants to do anything with it...
+			$this->notifyEvent( EVENT_CUSTOM_FIELD_LOADED, Array( "field" => &$field ));			
+			
+			return( $field );			
+		}
         
         /**
          * Carries out the specified action
          */
         function perform()
         {
-        	// fetch the field information
-			$this->_fieldId = $this->_request->getValue( "fieldId" );
-			$fields = new CustomFields();
-			$field = $fields->getCustomField( $this->_fieldId );
-			
             // show an error if we couldn't fetch the link
+			$field = $this->getCustomField();
             if( !$field ) {
             	$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
                 $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_custom_field"));
             }
-			else {
-				// fire the field loaded event, in case any plugin wants to do anything with it...
-				$this->notifyEvent( EVENT_CUSTOM_FIELD_LOADED, Array( "field" => &$field ));
-			
+			else {			
 				$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcustomfield" );
 				$this->_view->setValue( "fieldName", $field->getName());
 				$this->_view->setValue( "fieldDescription", $field->getDescription());
@@ -71,5 +69,20 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$field = $this->getCustomField();
+			if( !$field )
+				$this->_view->setErrorMessage($this->_locale->tr("error_fetching_custom_field"));
+			else {
+				$this->_view->setSuccess( true );
+				$this->_view->setValue( "customfield", $field );
+			}
+			
+			return( false );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -39,27 +39,35 @@
 			// permission checks
 			$this->requirePermission( "update_link" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function loadLink()
+		{
         	// fetch the link
 			$this->_linkId = $this->_request->getValue( "linkId" );
             $links = new MyLinks();
             $link  = $links->getMyLink( $this->_linkId, $this->_blogInfo->getId());
             // show an error if we couldn't fetch the link
             if( !$link ) {
+                return false;
+            }
+
+			$this->notifyEvent( EVENT_LINK_LOADED, Array( "link" => &$link ));			
+			
+			return( $link );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {			
+			$link = $this->loadLink();
+            if( !$link ) {
                 $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link"));
                 $this->setCommonData();
-
                 return false;
-            }
+            }			
 			
-			$this->notifyEvent( EVENT_LINK_LOADED, Array( "link" => &$link ));
-
-            // otherwise show the form to edit its fields
         	$this->_view = new AdminEditLinkView( $this->_blogInfo );
             $this->_view->setValue( "linkName", $link->getName());
             $this->_view->setValue( "linkDescription", $link->getDescription());
@@ -72,5 +80,22 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			$link = $this->loadLink();
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );			
+			if( $link ) {
+				$this->_view->setSuccess( true );
+				$this->_view->setValue( "link", $link );
+			}
+			else {
+				$this->_view->setSucess( false );
+				$this->_view->setMessage( $this->_locale->tr("error_fetching_link" ));
+			}
+			
+			return( false );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoriesaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoriesaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoriesaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -28,11 +28,41 @@
         {
             // get all the link categories
 			$searchTerms = $this->_request->getValue( "searchTerms" );
-            $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms ) );
+            $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms ));
             $this->setCommonData();
 
             // better to return true if everything fine
             return true;
         }
+
+		/**
+		 * Ajax-specific behaviour
+		 */
+		function performAjax()
+		{
+			if( $this->_request->loadAllData()) {
+				// in this case, we load all data
+				lt_include( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
+				$blogSettings = $this->_blogInfo->getSettings();
+				$linkCategoriesOrder = $blogSettings->getValue( "link_categories_order", MYLINKS_CATEGORIES_NO_ORDER );			
+				// get the link categories
+	            $linkCategories = new MyLinksCategories();
+	            $blogLinkCategories = $linkCategories->getMyLinksCategories( $this->_blogInfo->getId(), 
+				                                                             $linkCategoriesOrder );
+				// pass it to the view
+				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+				$this->_view = new AdminAjaxView( $this->_blogInfo );
+				$this->_view->setSuccess( true );
+				$this->_view->setValue( "linkcategories", $blogLinkCategories );															
+			}
+			else {
+				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+				$searchTerms = $this->_request->getValue( "searchTerms" );				
+				$this->_view = new AjaxViewRenderer( new AdminLinkCategoriesListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms )));
+				$this->_view->setSuccess( true );
+			}
+			
+			return( true );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinkcategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -35,24 +35,35 @@
 			// permission checks
 			$this->requirePermission( "update_link_category" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function getLinkCategory()
+		{
         	// fetch the category
 			$this->_categoryId = $this->_request->getValue( "categoryId" );
             $categories = new MyLinksCategories();
             $category   = $categories->getMyLinksCategory( $this->_categoryId, $this->_blogInfo->getId());
             // show an error if we couldn't fetch the category
             if( !$category ) {
-                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
-                $this->setCommonData();
-
                 return false;
             }
 			$this->notifyEvent( EVENT_LINK_CATEGORY_LOADED, Array( "linkcategory" => &$category ));
+			
+			return( $category );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$category = $this->getLinkCategory();
+			if( !$category ) {
+				$this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
+                $this->setCommonData();
+				return( false );
+			}
+						
             // otherwise show the form to edit its fields
         	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editlinkcategory" );
 			$this->_view->setValue( "linkCategoryName", $category->getName());
@@ -62,5 +73,23 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			$category = $this->getLinkCategory();
+			if( !$category ) {
+				$this->_view = $this->getAjaxErrorView();
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
+				return( false );
+			}
+						
+            // otherwise show the form to edit its fields
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+        	$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setValue( "linkcategory", $category );
+
+            // better to return true if everything fine
+            return true;			
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinksaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinksaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditlinksaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -35,6 +35,10 @@
 																
 																
 			$this->requirePermission( "view_links" );
+			
+			// get some information from the request			
+        	$this->_categoryId = $this->_request->getValue( "showCategory" );		
+			$this->_searchTerms = $this->_request->getValue( "searchTerms" );					
         }
 
         /**
@@ -42,10 +46,6 @@
          */
         function perform()
         {
-			// get the id of the category we'd like to load
-        	$this->_categoryId = $this->_request->getValue( "showCategory" );		
-			$this->_searchTerms = $this->_request->getValue( "searchTerms" );
-			
 			// and create the view with all the parameters we'll need
 			$this->_view = new AdminLinksListView( $this->_blogInfo, Array( "showCategory" => $this->_categoryId,
 																            "searchTerms" => $this->_searchTerms, 			
@@ -55,5 +55,19 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			if( $this->_request->loadAllData()) {
+			}
+			else {
+				$linksListView = new AdminLinksListView( $this->_blogInfo, Array( "showCategory" => $this->_categoryId,
+																 "searchTerms" => $this->_searchTerms, 			
+																 "showOrder" => $this->_linkCategoriesOrder ));
+				$linksListView->loadData();
+				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+				$this->_view = new AjaxViewRenderer( $linksListView );
+			}
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/admineditpostsaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/admineditpostsaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/admineditpostsaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -40,5 +40,26 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			// use the same view class as in the perform() method 
+			// but then convert it to Ajax with the help of this view renderer
+			lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+			// create the view
+			$articlesListView = new AdminPostsListView( $this->_blogInfo, 
+		    	Array( "showCategory" => $this->_request->getValue( "showCategory" ),
+		            	"showStatus" => $this->_request->getValue( "showStatus" ),
+						"showUser" => $this->_request->getValue( "showUser" ),
+						"showMonth" => $this->_request->getValue( "showMonth" ),
+						"searchTerms" => $this->_request->getValue( "searchTerms" ),
+						"showLocation" => $this->_request->getValue( "showLocation" )));
+			// inform it to load the data
+			$articlesListView->loadArticles();
+			// and finally attempt to convert it, it should work :)
+			$this->_view = new AjaxViewRenderer( $articlesListView );
+			$this->_view->setSuccess( true );			
+			return( true );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminloginaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminloginaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminloginaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -11,6 +11,7 @@
 	lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
 
     /**
      * \ingroup Action
@@ -27,6 +28,8 @@
         var $_userPassword;
         var $_op;
         var $_locale;
+		var $_pm;
+		var $_config;
 
     	/**
          * Constructor. If nothing else, it also has to call the constructor of the parent
@@ -44,48 +47,42 @@
 			$this->registerFieldValidator( "userPassword", new StringValidator());
 			$view = new AdminDefaultView();
 			$view->setErrorMessage( $this->_locale->tr("error_incorrect_username_or_password"));
-			$this->setValidationErrorView( $view );
+			$this->setValidationErrorView( $view );			
         }
 
 		function authenticateUser()
 		{
-			
-		}
-
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
         	// get the parameters, which have already been validated
-            $this->_userName     = Textfilter::filterAllHTML($this->_request->getValue( "userName" ));
+            $this->_userName     = $this->_request->getValue( "userName", new HtmlFilter());
             $this->_userPassword = $this->_request->getValue( "userPassword" );
 
 			// create a plugin manager
-			$pm =& PluginManager::getPluginManager();	
+			$this->_pm =& PluginManager::getPluginManager();	
 		
         	// try to authenticate the user
             $users = new Users();
             if( !$users->authenticateUser( $this->_userName, $this->_userPassword )) {
-            	$this->_view = new AdminDefaultView();
-                $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_username_or_password"));
-				$this->setCommonData();
-				
-				$pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
-                return false;
-            }
+				return( false );
+			}
 			
-            // if the user is correct, get and put his or her information in the session
-            $userInfo = $users->getUserInfoFromUsername( $this->_userName );
-			
+			// if the user is correct, get and put his or her information in the session
+            return( $users->getUserInfoFromUsername( $this->_userName ));
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$userInfo = $this->authenticateUser();
 			if( !$userInfo ) {
             	$this->_view = new AdminDefaultView();
                 $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_username_or_password"));
 				$this->setCommonData();
 				
-				$pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
+				$this->_pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
                 return false;
-			}
+            }
 			
 			// check if the user has the "login_perm" permission and is allowed to log in
 			if( !$userInfo->hasPermissionByName( "login_perm" )) {
@@ -93,13 +90,14 @@
                 $this->_view->setErrorMessage( $this->_locale->tr("error_cannot_login"));
 				$this->setCommonData();
 				
-				$pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
+				$this->_pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
                 return false;
 			}
 			
-			$pm->notifyEvent( EVENT_USER_LOADED, Array( "user" => &$userInfo, "from" => "Login" ));
+			$this->_pm->notifyEvent( EVENT_USER_LOADED, Array( "user" => &$userInfo, "from" => "Login" ));
 
             // get the list of blogs to which the user belongs
+			$users = new Users();
             $userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
 
             // but if he or she does not belong to any yet, we quit
@@ -118,27 +116,9 @@
             $sessionInfo->setValue( "userInfo", $userInfo );
             $session["SessionInfo"] = $sessionInfo;
             HttpVars::setSession( $session );
-			
-			$pm->notifyEvent( EVENT_BLOGS_LOADED, Array( "blogs" => &$userBlogs, "from" => "Login" ));			
-			
-			// check if we are skipping the dashboard
-			if( $this->_config->getValue( "skip_dashboard" )) {
-				// get the first blog that came
-				$this->_blogInfo = $userBlogs[0];
-				// set it in the session
-            	$session = HttpVars::getSession();
-            	$sessionInfo->setValue( "blogInfo", $this->_blogInfo );
-            	$session["SessionInfo"] = $sessionInfo;
-            	HttpVars::setSession( $session );			
-            	// and then continue...
-            	if( $userInfo->hasPermissionByName( "new_post", $this->_blogInfo->getId()))
-					AdminController::setForwardAction( "newPost" );
-				else
-					AdminController::setForwardAction( "Manage" );
-			}
-			else {
-				$this->_view = new AdminDashboardView( $userInfo, $userBlogs );	
-			}
+
+			AdminController::setForwardAction( "blogSelectLogin" );
+
             // better to return true if everything's fine
             return true;
         }
@@ -147,6 +127,48 @@
 		{
 			lt_include( PLOG_CLASS_PATH."class/view/ajax/ajaxview.class.php" );
 			$this->_view = new AjaxView();			
+			
+			$userInfo = $this->authenticateUser();
+			if( !$userInfo ) {
+                $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_username_or_password"));
+				$this->setCommonData();				
+				$this->_pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
+                return false;
+            }
+			
+			// check if the user has the "login_perm" permission and is allowed to log in
+			if( !$userInfo->hasPermissionByName( "login_perm" )) {
+                $this->_view->setErrorMessage( $this->_locale->tr("error_cannot_login"));
+				$this->_pm->notifyEvent( EVENT_LOGIN_FAILURE, Array( "user" => $this->_userName ));
+                return false;
+			}
+			
+			$this->_pm->notifyEvent( EVENT_USER_LOADED, Array( "user" => &$userInfo, "from" => "Login" ));
+
+            // get the list of blogs to which the user belongs
+			$users = new Users();
+            $userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
+
+            // but if he or she does not belong to any yet, we quit
+            if( empty($userBlogs)) {
+                $this->_view->setErrorMessage( $this->_locale->tr("error_dont_belong_to_any_blog"));
+                return false;
+            }
+
+            // We have to update the userInfo in session after we check all situations
+            $session = HttpVars::getSession();
+            $sessionInfo = $session["SessionInfo"];
+
+            $sessionInfo->setValue( "userInfo", $userInfo );
+            $session["SessionInfo"] = $sessionInfo;
+            HttpVars::setSession( $session );
+			
+			$this->_pm->notifyEvent( EVENT_BLOGS_LOADED, Array( "blogs" => &$userBlogs, "from" => "Login" ));			
+			
+			$this->_view->setSuccessMessage( $this->_locale->tr( "please_wait" ));
+			$this->_view->setValue( "userblogs", $userBlogs );
+            // better to return true if everything's fine
+            return true;			
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminlogoutaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminlogoutaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminlogoutaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -23,13 +23,8 @@
         	$this->AdminAction( $actionInfo, $request );
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
-            $config =& Config::getConfig();        	
-			
+		function doLogout()
+		{
 			$this->notifyEvent( EVENT_PRE_LOGOUT );
 
             // remove all the information from the session
@@ -38,8 +33,19 @@
             unset($session["SessionInfo"]);
             $session = Array();
             HttpVars::setSession( $session );
-            session_destroy();
-            
+            session_destroy();			
+
+			$this->notifyEvent( EVENT_POST_LOGOUT );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+            $this->doLogout();
+
+            $config =& Config::getConfig();		
             $destinationUrl = $config->getValue( "logout_destination_url", "" );
             if( $destinationUrl == "" ) {
 	            // and pass the locale to the template
@@ -54,12 +60,20 @@
 				// nothing else to do, just redirect the browser once we've cleaned up the session
 				$this->_view = new RedirectView( $destinationUrl );				
 			}
-		
-			
-			$this->notifyEvent( EVENT_POST_LOGOUT );
-
+					
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{			
+			$this->doLogout();
+			
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setSuccessMessage( $this->_locale->tr( "logout_message" ));
+			
+			return( true );
+		}
     }
 ?>

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminmainaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminmainaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminmainaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -2,6 +2,7 @@
 
 	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 
     /**
      * \ingroup Action
@@ -23,11 +24,8 @@
         	$this->AdminAction( $actionInfo, $request );
         }
 
-        /**
-         * Validate if everything is correct
-         */
-        function validate()
-        {
+		function doBlogSelect()
+		{
 	        // first of all, check if we have a valid blog id
 	        $this->_blogId = $this->_request->getValue( "blogId" );
             if( $this->_blogId == "" || $this->_blogId < 0 ) {
@@ -97,14 +95,15 @@
             $session["SessionInfo"]->setValue( "blogId", $this->_blogInfo->getId() );
             HttpVars::setSession( $session );
 
-            return true;
-        }
+            return true;			
+		}
 
         /**
          * Carries out the specified action
          */
         function perform()
         {
+			$this->doBlogSelect();
 			// we don't have to worry about much more here, we can let the
 			// $this->_nextAction action take care of everytyhing now...
 			// If $this->_nextAction is null, we use "newPost" as default nextAction
@@ -113,7 +112,8 @@
 
 			if ( $this->_nextAction ) {
 				AdminController::setForwardAction( $this->_nextAction );
-		    } else {
+		    } 
+			else {
 			    if( $this->userHasPermission( "new_post" ))
 					AdminController::setForwardAction( "newPost" );
 				else

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminnewblogtemplateaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminnewblogtemplateaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminnewblogtemplateaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -2,8 +2,8 @@
 
 	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
     lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/view/admin/adminerrorview.class.php" );
     lt_include( PLOG_CLASS_PATH."class/template/templatesets/templatesetstorage.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminblogtemplatesetslistview.class.php" );
 
     /**
      * \ingroup Action
@@ -29,8 +29,8 @@
             	$this->setCommonData();
             }
             else {
-            	$this->_view = new AdminErrorView( $this->_blogInfo );
-                $this->_view->setMessage( $this->_locale->tr("error_add_template_disabled"));
+            	$this->_view = new AdminBlogTemplateSetsListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_add_template_disabled"));
                 $this->setCommonData();
             }
 

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminpermissionrequiredaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminpermissionrequiredaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminpermissionrequiredaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,5 +16,12 @@
 			$this->_view->setErrorMessage( $this->_locale->tr( "error_permission_required" ));
 			$this->setCommonData();
 		}
+		
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setErrorMessage( $this->_locale->tr( "error_permission_required" ));
+		}
 	}
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminpostmanagementcommonaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminpostmanagementcommonaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminpostmanagementcommonaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -53,22 +53,24 @@
 		{
 
             // fetch the timestamp that the post will have
-          	$postDateTime = $this->_request->getValue( "postDateTime" );
-            $dateTimeParts = explode(" ", $postDateTime);
-            $dateParts = explode("/", $dateTimeParts[0] );
-            $timeParts = explode(":",$dateTimeParts[1] );
-            $this->_postDay = $dateParts[0];
-            $this->_postMonth = $dateParts[1];
-            $this->_postYear = $dateParts[2];
-            $this->_postHour = $timeParts[0];
-            $this->_postMinutes = $timeParts[1];
+          	$postDateTime = $this->_request->getValue( "postDateTime", "" );
+            $this->_postTimestamp = new Timestamp();
+			if( $postDateTime ) {
+	            $dateTimeParts = explode(" ", $postDateTime);
+	            $dateParts = explode("/", $dateTimeParts[0] );
+	            $timeParts = explode(":",$dateTimeParts[1] );
+	            $this->_postDay = $dateParts[0];
+	            $this->_postMonth = $dateParts[1];
+	            $this->_postYear = $dateParts[2];
+	            $this->_postHour = $timeParts[0];
+	            $this->_postMinutes = $timeParts[1];
 			
-            $this->_postTimestamp = new Timestamp();
-            $this->_postTimestamp->setMinutes( $this->_postMinutes );
-            $this->_postTimestamp->setHour( $this->_postHour );
-            $this->_postTimestamp->setDay( $this->_postDay );
-            $this->_postTimestamp->setMonth( $this->_postMonth );
-            $this->_postTimestamp->setYear( $this->_postYear );
+	            $this->_postTimestamp->setMinutes( $this->_postMinutes );
+	            $this->_postTimestamp->setHour( $this->_postHour );
+	            $this->_postTimestamp->setDay( $this->_postDay );
+	            $this->_postTimestamp->setMonth( $this->_postMonth );
+	            $this->_postTimestamp->setYear( $this->_postYear );
+			}
 		}
 		
 		/**

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatearticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatearticlecategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatearticlecategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -7,7 +7,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/emptyvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminarticlecategorieslistview.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
 
     /**
      * \ingroup Action
@@ -34,26 +34,29 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// data validation settings
-			$this->registerFieldValidator( "categoryName", new StringValidator());
+			$this->registerFieldValidator( "categoryName", new StringValidator(), false, $this->_locale->tr("error_empty_name"));
 			$this->registerFieldValidator( "categoryId", new IntegerValidator());
-			$this->registerFieldValidator( "categoryDescription", new StringValidator());
-			$this->registerFieldValidator( "categoryInMainPage", new EmptyValidator());
+			$this->registerField( "categoryDescription" );
+			$this->registerField( "categoryInMainPage" );
 			$errorView = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory" );
 			$errorView->setErrorMessage( $this->_locale->tr("error_updating_article_category" ));
 			$this->setValidationErrorView( $errorView );
 			
+			// data filtering
+			$f = new HtmlFilter();
+			$this->_request->registerFilter( "categoryName", $f );
+			$this->_request->registerFilter( "categoryDescription", $f );
+			
+			// permission checking
 			$this->requirePermission( "update_category" );			
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+		function updateCategory()
+		{
 			// get the data from the form
-        	$this->_categoryName = Textfilter::filterAllHTML($this->_request->getValue( "categoryName" ));
+        	$this->_categoryName = $this->_request->getValue( "categoryName" );
             $this->_categoryId   = $this->_request->getValue( "categoryId" );
-			$this->_categoryDescription = Textfilter::filterAllHTML($this->_request->getValue( "categoryDescription" ));
+			$this->_categoryDescription = $this->_request->getValue( "categoryDescription" );
             $this->_categoryInMainPage = $this->_request->getValue( "categoryInMainPage" );
 			$this->_properties = Array();		
 		
@@ -78,29 +81,47 @@
 			$category->setProperties( $this->_properties );
 			$category->setDescription( $this->_categoryDescription );
 			
+			$result = false;
+			if( $categories->updateCategory( $category )) {
+				// fire the post-event
+				$this->notifyEvent( EVENT_POST_CATEGORY_UPDATE, Array( "category" => &$category ));			
+				
+				// clear the cache
+				CacheControl::resetBlogCache( $this->_blogInfo->getId());				
+				
+				// make the category object available for the rest of methods in this class
+				$this->_category = $category;
+				
+				$result = true;
+			}			
+			
+			return( $result );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {	
+			$result = $this->updateCategory();
+	
 			if( $this->userHasPermission( "view_categories" ))
 				$this->_view = new AdminArticleCategoriesListView( $this->_blogInfo );			
 			else {
 				$this->_view = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory" );
-	            $this->_view->setValue( "category", $category );
-				$this->_view->setValue( "categoryName", $category->getName());
-				$this->_view->setValue( "categoryDescription", $category->getDescription());
-				$this->_view->setValue( "categoryInMainPage", $category->isInMainPage());
-				$this->_view->setValue( "categoryId", $category->getId());				
+	            $this->_view->setValue( "category", $this->_category );
+				$this->_view->setValue( "categoryName", $this->_category->getName());
+				$this->_view->setValue( "categoryDescription", $this->_category->getDescription());
+				$this->_view->setValue( "categoryInMainPage", $this->_category->isInMainPage());
+				$this->_view->setValue( "categoryId", $this->_category->getId());				
 			}
 			
-            if( !$categories->updateCategory( $category )) {
+            if( !$result ) {
                 $this->_view->setErrorMessage( $this->_locale->tr("error_updating_article_category"));
             }
 			else {
 				// if everything fine, load the list of categories
-				$this->_view->setSuccessMessage( $this->_locale->pr("article_category_updated_ok", $category->getName()));
-				
-				// fire the post-event
-				$this->notifyEvent( EVENT_POST_CATEGORY_UPDATE, Array( "category" => &$category ));			
-				
-				// clear the cache
-				CacheControl::resetBlogCache( $this->_blogInfo->getId());			
+				$this->_view->setSuccessMessage( $this->_locale->pr("article_category_updated_ok", $this->_category->getName()));				
 			}
 			
 			$this->setCommonData();			
@@ -108,5 +129,23 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			$result = $this->updateCategory();
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setSuccess( $result );
+			if( $result ) {
+
+				$this->_view->setMessage( $this->_locale->pr("article_category_updated_ok", $this->_category->getName()));
+				$this->_view->setValue( "category", $this->_category );
+			}
+			else {
+				$this->_view->setMessage( $this->_locale->tr("error_updating_article_category" ));
+			}
+
+			return( true );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateblogsettingsaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateblogsettingsaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -10,8 +10,8 @@
     lt_include( PLOG_CLASS_PATH."class/data/validator/domainvalidator.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/data/validator/rules/intrangerule.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
 
-
     /**
      * \ingroup Action
      * @private
@@ -31,15 +31,15 @@
         	// specific validator that does not allow an integer below 1
 			$val = new IntegerValidator();
 			$val->addRule( new IntRangeRule( 1, 99999999 ));
-			$this->registerFieldValidator( "blogMaxMainPageItems", $val );			
+			$this->registerFieldValidator( "blogMaxMainPageItems", $val, false, $this->_locale->tr("error_invalid_number"));	
 			// the rest of validators, as normal...
-			$this->registerFieldValidator( "blogMaxRecentItems", new IntegerValidator());
-			$this->registerFieldValidator( "blogName",  new BlogNameValidator());
-			$this->registerFieldValidator( "blogLocale", new StringValidator());
-			$this->registerFieldValidator( "blogTemplate", new StringValidator());
-			$this->registerFieldValidator( "blogCategory", new IntegerValidator());
-			$this->registerFieldValidator( "blogNumCommentsPerPage", $val );
-			$this->registerFieldValidator( "blogArticlesOrder", new IntegerValidator());
+			$this->registerFieldValidator( "blogMaxRecentItems", new IntegerValidator(), false, $this->_locale->tr("error_invalid_number"));
+			$this->registerFieldValidator( "blogName",  new BlogNameValidator(), false, $this->_locale->tr("error_invalid_blog_name"));
+			$this->registerFieldValidator( "blogLocale", new StringValidator(), false, $this->_locale->tr("error_incorrect_value"));
+			$this->registerFieldValidator( "blogTemplate", new StringValidator(), false, $this->_locale->tr("error_incorrect_template"));
+			$this->registerFieldValidator( "blogCategory", new IntegerValidator(), false, $this->_locale->tr("error_invalid_blog_category"));
+			$this->registerFieldValidator( "blogNumCommentsPerPage", $val, false, $this->_locale->tr("error_invalid_number"));
+			$this->registerFieldValidator( "blogArticlesOrder", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value"));
 			$this->registerField( "blogAbout" );
 			$this->registerField( "blogShowMoreEnabled" );
 			$this->registerField( "blogEnableHtmlarea" );
@@ -92,24 +92,23 @@
 				// force a validation error
                 if( !Subdomains::isDomainAvailable( $mainDomain ) || !Subdomains::isValidDomainName( $subDomain )) {
 					$valid = false;
-					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
+					$this->_form->setFieldValidationStatus( "blogSubDomain", false );
+					$this->_form->setFieldErrorMessage( "blogSubDomain", $this->_locale->tr("error_invalid_subdomain"));
 					$this->validationErrorProcessing();					
                 }
 				if( Subdomains::domainNameExists( $this->blogDomain, $this->_blogInfo->getId() )) {
 					$valid = false;
-					$this->_form->setFieldValidationStatus( "blogSubDomain", false );					
+					$this->_form->setFieldValidationStatus( "blogSubDomain", false );
+					$this->_form->setFieldErrorMessage( "blogSubDomain", $this->_locale->tr("error_invalid_domain"));
 					$this->validationErrorProcessing();					
 				}				
             }
 
 			return( $valid );			
 		}
-
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+		
+		function updateBlog()
+		{
 			$config =& Config::getConfig();	
 	
         	// fetch the settings from the db and update them accordingly
@@ -129,12 +128,11 @@
            	$blogSettings->setValue( "first_day_of_week",  $this->_request->getValue( "blogFirstDayOfWeek" ));
            	$blogSettings->setValue( "new_drafts_autosave_enabled", Textfilter::checkboxToBoolean($this->_request->getValue( "blogEnableAutosaveDrafts" )));
            	$blogSettings->setValue( "show_comments_max", $this->_request->getValue( "blogNumCommentsPerPage" ));
-			//$blogSettings->setValue( "comment_only_auth_users", Textfilter::checkboxToBoolean($this->_request->getValue( "blogCommentOnlyRegisteredUsers" )));
             $blogSettings->setValue( "comments_order", $this->_request->getValue( "blogCommentsOrder" ));
             $blogSettings->setValue( "articles_order", $this->_request->getValue( "blogArticlesOrder" ));
             $blogSettings->setValue( "default_send_notification", $this->_request->getValue( "blogSendNotification" ));
-            $this->_blogInfo->setAbout( Textfilter::filterAllHTML($this->_request->getValue( "blogAbout" )));
-            $this->_blogInfo->setBlog( Textfilter::filterAllHTML($this->_request->getValue( "blogName" )));
+            $this->_blogInfo->setAbout( $this->_request->getFilteredValue( "blogAbout", new HtmlFilter()));
+            $this->_blogInfo->setBlog( $this->_request->getFilteredValue( "blogName", new HtmlFilter()));
             $this->_blogInfo->setSettings( $blogSettings );
             $this->_blogInfo->setTemplate( $this->_request->getValue( "blogTemplate" ));
 			$this->_blogInfo->setProperties( $this->_request->getValue( "properties" ));
@@ -186,10 +184,6 @@
 			$this->notifyEvent( EVENT_PRE_BLOG_UPDATE, Array( "blog" => &$this->_blogInfo ));
 			$blogs = new Blogs();
             if( !$blogs->updateBlog( $this->_blogInfo )) {
-            	$this->_view = new AdminBlogSettingsView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
-               	$this->setCommonData();
-
                 return false;
             }
 
@@ -197,16 +191,50 @@
             $this->saveSession();
 
 			$this->notifyEvent( EVENT_POST_BLOG_UPDATE, Array( "blog" => &$this->_blogInfo ));
-            $this->_view = new AdminBlogSettingsView( $this->_blogInfo );
-            $this->_locale =& Locales::getLocale( $blogSettings->getValue( "locale" ));
-            $this->_view->setSuccessMessage( $this->_locale->pr("blog_settings_updated_ok", $this->_blogInfo->getBlog()));
+			
+			return( true );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+	        $this->_view = new AdminBlogSettingsView( $this->_blogInfo );
+			$blogSettings = $this->_blogInfo->getSettings();
+	        $this->_locale =& Locales::getLocale( $blogSettings->getValue( "locale" ));	
+			if( $this->updateBlog()) {
+	            $this->_view->setSuccessMessage( $this->_locale->pr("blog_settings_updated_ok", $this->_blogInfo->getBlog()));
+			}
+			else {
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+			}
+
             $this->setCommonData();
-
 			// clear the cache
 			CacheControl::resetBlogCache( $this->_blogInfo->getId());
 
             // better to return true if everything fine
             return true;
         }
+
+		/**
+		 * Ajax-specific behaviour
+		 */
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$blogSettings = $this->_blogInfo->getSettings();			
+	        $this->_locale =& Locales::getLocale( $blogSettings->getValue( "locale" ));				
+			if( $this->updateBlog()) {
+				$this->_view->setSuccessMessage( $this->_locale->pr("blog_settings_updated_ok", $this->_blogInfo->getBlog()));				
+			}
+			else {
+				$this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+			}
+			
+			return( true );
+		}
     }
 ?>

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatebloguseraction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatebloguseraction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatebloguseraction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -12,6 +12,9 @@
      */
     class AdminUpdateBlogUserAction extends AdminAction 
 	{	
+		var $_message;
+		var $_user;
+		
     	/**
          * Constructor. If nothing else, it also has to call the constructor of the parent
          * class, BlogAction with the same parameters
@@ -21,31 +24,26 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// register one validator
-			$this->registerFieldValidator( "userId", new IntegerValidator());
+			$this->registerFieldValidator( "userId", new IntegerValidator(), false, $this->_locale->tr("error_invalid_user"));
 			// and the view we should show in case there is a validation error
 			$errorView = new AdminBlogUsersListView( $this->_blogInfo );
-			$errorView->setErrorMessage( $this->_locale->tr("error_invalid_user_id" ));			
+			$errorView->setErrorMessage( $this->_locale->tr("error_invalid_user_id" ));
 			$this->setValidationErrorView( $errorView );
 			
 			$this->requirePermission( "update_blog_user");
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+		function updateUser()
+		{
 			// fetch the data, we already know it's valid and that we can trust it!
 			$userId = $this->_request->getValue( "userId" );
 			$this->_perms = $this->_request->getValue( "perm" );			
-			
+
 			// load the user
 			$users = new Users();
 			$userInfo = $users->getUserInfoFromId( $userId );
 			if( !$userInfo ) {
-				$errorView = new AdminBlogUsersListView( $this->_blogInfo );
-				$errorView->setErrorMessage( $this->_locale->tr("error_invalid_user_id" ));
-				$this->setCommonData();
+				$this->_message = $this->_locale->tr("error_invalid_user_id" );
 				return( false );
 			}
 			
@@ -65,11 +63,40 @@
 			
 			$this->notifyEvent( EVENT_POST_USER_UPDATE, Array( "user" => &$user ));			
 			
-            $this->_view = new AdminBlogUsersListView( $this->_blogInfo );
-            $this->_view->setSuccessMessage( $this->_locale->pr("user_permissions_updated_ok", $userInfo->getUsername()));
+			$this->_message = $this->_locale->pr("user_permissions_updated_ok", $userInfo->getUsername());
+			$this->_user = $userInfo;
+			
+			return( true );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$this->_view = new AdminBlogUsersListView( $this->_blogInfo );
+			if( !$this->updateUser())
+				$this->_view->setErrorMessage( $this->_message );
+			else 
+            	$this->_view->setSuccessMessage( $this->_message );				
+
             $this->setCommonData();			
 			
 			return( true );
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			if( !$this->updateUser())
+				$this->_view->setErrorMessage( $this->_message );
+			else {
+				$this->_view->setValue( "user", $this->_user );
+            	$this->_view->setSuccessMessage( $this->_message );
+			}
+			
+			return( true );			
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatecustomfieldaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatecustomfieldaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatecustomfieldaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -5,6 +5,7 @@
 	lt_include( PLOG_CLASS_PATH."class/dao/customfields/customfields.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );	
 
     /**
      * \ingroup Action
@@ -28,27 +29,26 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// data validation
-			$this->registerFieldValidator( "fieldName", new StringValidator());
-			$this->registerFieldValidator( "fieldDescription", new StringValidator());
-			$this->registerFieldValidator( "fieldType", new IntegerValidator());
-			$this->registerFieldValidator( "fieldId", new IntegerValidator());
-			$this->_form->registerField( "fieldSearchable" );
-			$this->_form->registerField( "fieldHidden" );
-			$this->_form->registerField( "fieldValues" );
-			$this->setValidationErrorView( new AdminTemplatedView( $this->_blogInfo, "editcustomfield" ));			
+			$this->registerFieldValidator( "fieldName", new StringValidator(), false, $this->_locale->tr("error_empty_name"));
+			$this->registerFieldValidator( "fieldDescription", new StringValidator(), false, $this->_locale->tr("error_empty_description"));
+			$this->registerFieldValidator( "fieldType", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "fieldId", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerField( "fieldSearchable" );
+			$this->registerField( "fieldHidden" );
+			$this->registerField( "fieldValues" );
+			$view = new AdminTemplatedView( $this->_blogInfo, "editcustomfield" );
+			$view->setErrorMessage( $this->_locale->tr("error_updating_custom_field" ));
+			$this->setValidationErrorView( $view );			
 			
 			$this->requirePermission( "update_custom_field" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function updateCustomField()
+		{
 			// fetch the fields from the request
 			$this->_fieldId = $this->_request->getValue( "fieldId" );
-			$this->_fieldName = Textfilter::filterAllHTML($this->_request->getValue( "fieldName" ));
-			$this->_fieldDescription = Textfilter::filterAllHTML($this->_request->getValue( "fieldDescription" )); 
+			$this->_fieldName = $this->_request->getValue( "fieldName", new HtmlFilter());
+			$this->_fieldDescription = $this->_request->getValue( "fieldDescription", new HtmlFilter());
 			$this->_fieldType = $this->_request->getValue( "fieldType" );
 			$this->_fieldSearchable = $this->_request->getValue( "fieldSearchable" );
 			$this->_fieldHidden = $this->_request->getValue( "fieldHidden" );
@@ -66,12 +66,8 @@
 			$fields = new CustomFields();
 			$field = $fields->getCustomField( $this->_fieldId );
 
-			// view that we're going to use for all different flows...
-			$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
-						
 			// field couldn't be loaded...
 			if( !$field ) {
-				$this->_view->setErrorMessage( $this->_locale->tr("error_updating_custom_field" ));
 				return false;			
 			}
 			
@@ -93,18 +89,44 @@
 											   
 			// check the result
 
-			if( !$result ) {
+			if( !$result )
+				return( false );
+				
+			$this->notifyEvent( EVENT_POST_CUSTOM_FIELD_UPDATE, Array( "field" => &$field ));
+
+			return( $field );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+			$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
+
+			$field = $this->updateCustomField();
+			if( !$field )
 				$this->_view->setErrorMessage( $this->_locale->tr("error_updating_custom_field" ));
-			}
-			else {
-				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_updated_ok", $field->getName()));
-				// fire the post-event
-				$this->notifyEvent( EVENT_POST_CUSTOM_FIELD_UPDATE, Array( "field" => &$field ));
-			}
-			
-			$this->setCommonData();			
+			else
+				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_updated_ok", $field->getName()));				
+				
+			$this->setCommonData();
 		
             return true;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+
+			$field = $this->updateCustomField();
+			if( !$field )
+				$this->_view->setErrorMessage( $this->_locale->tr("error_updating_custom_field" ));
+			else
+				$this->_view->setSuccessMessage( $this->_locale->pr( "custom_field_updated_ok", $field->getName()));				
+		
+            return true;			
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -8,6 +8,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/emptyvalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );	
 
     /**
      * \ingroup Action
@@ -33,10 +34,10 @@
 			
 			// set up the data validators
 			// data validation
-			$this->registerFieldValidator( "linkName", new StringValidator());
-			$this->registerFieldValidator( "linkUrl", new HttpUrlValidator());
+			$this->registerFieldValidator( "linkName", new StringValidator(), false, $this->_locale->tr( "error_empty_name" ));
+			$this->registerFieldValidator( "linkUrl", new HttpUrlValidator(), false, $this->_locale->tr( "error_invalid_url" ));
 			// linkRssFeed will only be validated if it is available in the form
-			$this->registerFieldValidator( "linkRssFeed", new HttpUrlValidator(), true );
+			$this->registerFieldValidator( "linkRssFeed", new HttpUrlValidator(), true, $this->_locale->tr( "error_invalid_url" ));
 			$this->registerFieldValidator( "linkCategoryId", new IntegerValidator());
 			$this->registerFieldValidator( "linkDescription", new EmptyValidator());
 			$this->registerFieldValidator( "linkId", new IntegerValidator());
@@ -47,28 +48,22 @@
 			// permission checks
 			$this->requirePermission( "update_link" );			
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function updateLink()
+		{
 			// data is fine, we have already validated it
-        	$this->_linkName = Textfilter::filterAllHTML($this->_request->getValue( "linkName" ));
-            $this->_linkDescription = Textfilter::filterAllHTML($this->_request->getValue( "linkDescription" ));
-            $this->_linkUrl  = Textfilter::filterAllHTML($this->_request->getValue( "linkUrl" ));
+			$f = new HtmlFilter();
+        	$this->_linkName = $this->_request->getValue( "linkName", $f );
+            $this->_linkDescription = $this->_request->getValue( "linkDescription", $f );
+            $this->_linkUrl = $this->_request->getValue( "linkUrl", $f );
             $this->_linkCategoryId = $this->_request->getValue( "linkCategoryId" );
             $this->_linkId = $this->_request->getValue( "linkId" );
-			$this->_linkFeed = Textfilter::filterAllHTML($this->_request->getValue( "linkRssFeed" ));
+			$this->_linkFeed = $this->_request->getValue( "linkRssFeed", $f );
 		
         	// fetch the link we're trying to update
             $links = new MyLinks();
             $link  = $links->getMyLink( $this->_linkId, $this->_blogInfo->getId());
             if( !$link ) {
-            	$this->_view = new AdminLinksListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link"));
-                $this->setCommonData();
-
                 return false;
             }
 
@@ -79,26 +74,55 @@
             $link->setUrl( $this->_linkUrl );
 			$link->setRssFeed( $this->_linkFeed );
 			$this->notifyEvent( EVENT_PRE_LINK_UPDATE, Array( "link" => &$link ));
+			
             // and now update it in the database
             if( !$links->updateMyLink( $link )) {
-            	$this->_view = new AdminLinksListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_link"));
-                $this->setCommonData();
-
                 return false;
             }
+
 			$this->notifyEvent( EVENT_POST_LINK_UPDATE, Array( "link" => &$link ));			
 			
 			// clear the cache
 			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
 			
-			// and go back to the view with the list of links
-            $this->_view = new AdminLinksListView( $this->_blogInfo );
-            $this->_view->setSuccessMessage( $this->_locale->pr("link_updated_ok", $link->getName()));
-            $this->setCommonData();
+			return( $link );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {	
+			if(( $link = $this->updateLink())) {
+            	$this->_view = new AdminLinksListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_link"));
+                $this->setCommonData();				
+			}
+			else {
+				// and go back to the view with the list of links
+	            $this->_view = new AdminLinksListView( $this->_blogInfo );
+	            $this->_view->setSuccessMessage( $this->_locale->pr("link_updated_ok", $link->getName()));
+	            $this->setCommonData();				
+			}
 
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			if(( $link = $this->updateLink())) {
+				$this->_view->setSuccess( true );
+				$this->_view->setMessage($this->_locale->pr("link_updated_ok", $link->getName()));
+			}
+			else {
+				$this->_view->setSuccess( false );
+				$this->_view->setMessage( $this->_locale->tr("error_updating_link" ));				
+			}
+
+			return( true );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkcategoryaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelinkcategoryaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -6,6 +6,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );    
+    lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );   
 
     /**
      * \ingroup Action
@@ -18,6 +19,8 @@
 
     	var $_categoryName;
         var $_categoryId;
+		var $_message;
+		var $_linkCategory;
 
     	/**
          * Constructor. If nothing else, it also has to call the constructor of the parent
@@ -28,8 +31,8 @@
         	$this->AdminAction( $actionInfo, $request );
 			
 			// data validation
-			$this->registerFieldValidator( "linkCategoryName", new StringValidator());
-			$this->registerFieldValidator( "linkCategoryId", new IntegerValidator());
+			$this->registerFieldValidator( "linkCategoryName", new StringValidator(), false, $this->_locale->tr( "error_empty_name" ));
+			$this->registerFieldValidator( "linkCategoryId", new IntegerValidator(), false, $this->_locale->tr( "error_fetching_link_category" ));
 			$errorView = new AdminTemplatedView( $this->_blogInfo, "editlinkcategory" );
 			$errorView->setErrorMessage( $this->_locale->tr("error_updating_link_category"));
 			$this->setValidationErrorView( $errorView );
@@ -37,22 +40,16 @@
 			// permission checks
 			$this->requirePermission( "update_link_category" );
         }
-        
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+
+		function updateLinkCategory()
+		{
         	// fetch the category we're trying to update
 			$this->_categoryId = $this->_request->getValue( "linkCategoryId" );
-			$this->_categoryName = Textfilter::filterAllHTML($this->_request->getValue( "linkCategoryName" ));
+			$this->_categoryName = $this->_request->getValue( "linkCategoryName", new HtmlFilter());
             $categories = new MyLinksCategories();
             $category   = $categories->getMyLinksCategory( $this->_categoryId, $this->_blogInfo->getId());
             if( !$category ) {
-            	$this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
-                $this->setCommonData();
-
+				$this->_message = $this->_locale->tr( "error_fetching_link_category" );
                 return false;
             }
 
@@ -60,23 +57,49 @@
             $category->setName( $this->_categoryName );
 			$this->notifyEvent( EVENT_PRE_LINK_CATEGORY_UPDATE, Array( "linkcategory" => &$category ));
             if( !$categories->updateMyLinksCategory( $category )) {
-            	$this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_link_category"));
-                $this->setCommonData();
-
+                $this->_message = $this->_locale->tr( "error_updating_link_category" );
                 return false;
             }
 			$this->notifyEvent( EVENT_POST_LINK_CATEGORY_UPDATE, Array( "linkcategory" => &$category ));			
 			
 			// clear the cache
 			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+			// set the success message
+			$this->_message = $this->_locale->pr("link_category_updated_ok", $category->getName());
+			
+			$this->_linkCategory = $category;
 
-            $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );
-            $this->_view->setSuccessMessage( $this->_locale->pr("link_category_updated_ok", $category->getName()));
+			return( true );
+		}
+        
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+            $this->_view = new AdminLinkCategoriesListView( $this->_blogInfo );	
+			if( !$this->updateLinkCategory()) {
+                $this->_view->setErrorMessage( $this->_message );
+			}
+			else {
+	            $this->_view->setSuccessMessage( $this->_message );				
+			}
+
             $this->setCommonData();
-
-            // better to return true if everything fine
             return true;
         }
+
+		/**
+		 * Ajax-specific behaviour
+		 */
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setSuccess( $this->updateLinkCategory());
+			$this->_view->setMessage( $this->_message );
+			$this->_view->setValue( "linkcategory", $this->_linkCategory );
+            return true;			
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelocationajaxaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelocationajaxaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatelocationajaxaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,6 +1,6 @@
 <?php
 
-	lt_include( PLOG_CLASS_PATH."class/action/admin/ajax/adminajaxaction.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
@@ -10,21 +10,29 @@
      * \ingroup Action
      * @private
      */
-	class AdminUpdateLocationAjaxAction extends AdminAjaxAction
+	class AdminUpdateLocationAjaxAction extends AdminAction
 	{
 		function AdminUpdateLocationAjaxAction( $actionInfo, $request )
 		{
-			$this->AdminAjaxAction( $actionInfo, $request );
+			$this->AdminAction( $actionInfo, $request );
 			
-			$this->registerFieldValidator( "locId", new IntegerValidator());
-			$this->registerFieldValidator( "lat", new StringValidator());
-			$this->registerFieldValidator( "long", new StringValidator());
-			$this->registerFieldValidator( "desc", new StringValidator());									
-			$this->setValidationErrorView( $this->getErrorView($this->_locale->tr("error_updating_location" )));
+			$this->registerFieldValidator( "locId", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "lat", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "long", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			$this->registerFieldValidator( "desc", new StringValidator(), false, $this->_locale->tr("error_incorrect_value" ));
+			
+			$view = new AdminAjaxView( $this->_blogInfo );
+			$view->setValue( "message", $this->_locale->tr("error_adding_location" ));
+			$this->setValidationErrorView( $view );
 		}
 		
 		function perform()
 		{
+			die( "output not supported" );
+		}		
+		
+		function performAjax()
+		{
 			// load data from the request
 			$id = $this->_request->getValue( "locId" );			
 			$lat = $this->_request->getValue( "lat" );
@@ -34,16 +42,15 @@
 			// load the location object and send an error if it does not exist
 			$locations = new Locations();
 			$loc = $locations->getLocation( $id );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
 			if( !$loc ) {
-				$this->_view = $this->getErrorView( $this->_locale->tr("error_updating_location" ));
-				$this->setCommonData();
+				$this->setErrorMessage( $this->_locale->tr("error_updating_location" ));
 				return( false );
 			}
 			
 			// check if the location belongs to the blog
 			if( $loc->getBlogId() != $this->_blogInfo->getId()) {
-				$this->_view = $this->getErrorView( $this->_locale->tr("error_updating_location" ));
-				$this->setCommonData();
+				$this->setErrorMessage( $this->_locale->tr("error_updating_location" ));
 				return( false );
 			}
 			
@@ -55,13 +62,11 @@
 
             $this->_view = new AdminAjaxView( $this->_blogInfo, "updateLocationAjax" );
             if( $res ) {
-                $this->_view->setSuccess( true );
-                $this->_view->setMessage( $this->_locale->tr("location_updated_ok" ));
-				$this->_view->setResult( $loc );
+                $this->_view->setSuccessMessage( $this->_locale->tr("location_updated_ok" ));
+				$this->_view->setValue( "location", $loc );
             }
             else {
-                $this->_view->setSuccess( false );
-                $this->_view->setMessage( $this->_locale->tr("error_updating_location" ));
+				$this->setErrorMessage( $this->_locale->tr("error_updating_location" ));
             }
 
             return true;

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatepostaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdatepostaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -34,11 +34,12 @@
         	$this->AdminPostManagementCommonAction( $actionInfo, $request );
         	
         	// for data validation purposes, posts must have at least a topic, an intro text, and a category
-        	$this->registerFieldValidator( "postText", new StringValidator());
-        	$this->registerFieldValidator( "postTopic", new StringValidator());
-        	$this->registerFieldValidator( "postCategories", new ArrayValidator());
-        	$this->registerFieldValidator( "postId", new IntegerValidator());
-        	$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true );
+        	$this->registerFieldValidator( "postText", new StringValidator(), false, $this->_locale->tr("error_missing_post_text" ));
+        	$this->registerFieldValidator( "postTopic", new StringValidator(), false, $this->_locale->tr("error_missing_post_topic" ));
+        	$this->registerFieldValidator( "postCategories", new ArrayValidator(), false, $this->_locale->tr("error_no_category_selected"));
+        	$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true,  $this->_locale->tr("error_no_global_article_category_selected"));
+			$this->registerFieldValidator( "postUser", new IntegerValidator(), false, $this->_locale->tr("error_invalid_user" ));
+			$this->registerFieldValidator( "postStatus", new IntegerValidator(), false, $this->_locale->tr( "error_incorrect_value" ));
 
         	$view = new AdminEditPostView( $this->_blogInfo );
 
@@ -57,7 +58,6 @@
         	// these fields do not need to be validated but should be there when we show the view once again
         	$this->registerField( "postExtendedText" );
         	$this->registerField( "postSlug" );
-        	$this->registerField( "postStatus" );
         	$this->registerField( "sendNotification" );
         	$this->registerField( "sendTrackbacks" );
         	$this->registerField( "sendPings" );
@@ -65,8 +65,7 @@
         	$this->registerField( "commentsEnabled" );
         	$this->registerField( "customField" );
         	$this->registerField( "postDateTime" );   
-        	$this->registerField( "trackbackUrls" );
-			$this->registerField( "postUser" );   	
+        	$this->registerField( "trackbackUrls" );   	
 
 			$this->requirePermission( "update_post" );
         }
@@ -241,5 +240,10 @@
 
             return true;
         }
+
+		function performAjax()
+		{
+			
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateusersettingsaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateusersettingsaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminupdateusersettingsaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -5,6 +5,8 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/passwordvalidator.class.php" );	
     lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/trimfilter.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );	
     lt_include( PLOG_CLASS_PATH."class/view/admin/adminuserprofileview.class.php" );
 
     /**
@@ -29,11 +31,11 @@
 			
             $this->registerField( "confirmPassword" );
 			$this->registerField( "userFullName" );
-			$this->registerFieldValidator( "userEmail", new EmailValidator());
-			$this->registerFieldValidator( "userPictureId", new IntegerValidator());
+			$this->registerFieldValidator( "userEmail", new EmailValidator(), false, $this->_locale->tr("error_incorrect_email_address" ));
+			$this->registerFieldValidator( "userPictureId", new IntegerValidator(), false, $this->_locale->tr("error_incorrect_value"  ));
 			$this->registerField( "userAbout" );
 			$this->registerField( "properties" );
-			$this->registerField( "userSettingsPassword" );
+			$this->registerField( "userSettingsPassword", new PasswordValidator(), true, $this->_locale->tr("error_invalid_password" ));
 			$view = new AdminUserProfileView( $this->_blogInfo, $this->_userInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_updating_user_settings"));
 			$this->setValidationErrorView( $view );
@@ -45,64 +47,87 @@
          */
         function validate()
         {
-            // if all correct, we can proceed
-            $this->_userPassword = trim($this->_request->getValue( "userSettingsPassword" ));
-            $this->_userConfirmPassword = trim($this->_request->getValue( "confirmPassword" ));
+			// use the FormValidator object to validate the data
+			$validationOk =  $this->_form->validate( $this->_request );	
+	
+			// validate that the password is confirmed
+            $this->_userPassword = $this->_request->getFilteredValue( "userSettingsPassword", new TrimFilter());
+            $this->_userConfirmPassword = $this->_request->getFilteredValue( "confirmPassword", new TrimFilter());
 			
-            $valid = parent::validate();		
-
             // check that the password is correct and confirm it
             if( $this->_userPassword != "" ) {
-            	$passwordVal = new PasswordValidator();
-            	if( !$passwordVal->validate( $this->_userPassword )) {
-					$this->_form->setFieldValidationStatus( "userSettingsPassword", false );					
-					$this->_view = $this->_validationErrorView;
-                	$this->setCommonData( true );
-                	return false;
-            	}
             	if( $this->_userPassword != $this->_userConfirmPassword ) {
 					$this->_form->setFieldValidationStatus( "confirmPassword", false );
-					$this->_view = $this->_validationErrorView;					
-                	$this->setCommonData( true );
-                	return false;
+					$this->_form->setFieldErrorMessage( "confirmPassword", $this->_locale->tr("error_passwords_dont_match"));					
+					$validationOk = false;
             	}
             }
 			
-			return $valid;
+			// if something went wrong... let's do somethinga about it :)
+			if( !$validationOk ) {
+				$this->validationErrorProcessing();
+			}
+
+			
+			return $validationOk;
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function perform()
-        {
+		function updateUser()
+		{
         	// update the user information
-            $this->_userInfo->setEmail( Textfilter::filterAllHTML($this->_request->getValue( "userEmail" )));
+			$f = new HtmlFilter();
+            $this->_userInfo->setEmail( $this->_request->getFilteredValue( "userEmail", $f ));
             if( $this->_userPassword != "" )
             	$this->_userInfo->setPassword( $this->_userPassword );
-            $this->_userInfo->setAboutMyself( Textfilter::filterAllHTML($this->_request->getValue( "userAbout" )));
-            $this->_userInfo->setFullName( Textfilter::filterAllHTML($this->_request->getValue( "userFullName" )));
+            $this->_userInfo->setAboutMyself( $this->_request->getFilteredValue( "userAbout", $f ));
+            $this->_userInfo->setFullName( $this->_request->getValue( "userFullName", $f ));
 			$this->_userInfo->setPictureId( $this->_request->getValue( "userPictureId" ));
 			$this->_userInfo->setProperties( $this->_request->getValue( "properties" ));
 			$this->notifyEvent( EVENT_PRE_USER_UPDATE, Array( "user" => &$this->_userInfo ));			
             $this->_session->setValue( "userInfo", $this->_userInfo );
             $this->saveSession();
 
+            $users = new Users();
+			if( !$users->updateUser( $this->_userInfo ))
+				return( false );
+
+			$this->notifyEvent( EVENT_POST_USER_UPDATE, Array( "user" => &$this->_userInfo ));
+            CacheControl::resetBlogCache( $this->_blogInfo->getId());
+
+			return( true );
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
             // update the user information
            	$this->_view =  new AdminUserProfileView( $this->_blogInfo, $this->_userInfo );
-            $users = new Users();
-            if( !$users->updateUser( $this->_userInfo ))
+
+            if( !$this->updateUser())
                 $this->_view->setErrorMessage( $this->_locale->tr("error_updating_user_settings"));
-			else {
+			else
 				$this->_view->setSuccessMessage( $this->_locale->pr("user_settings_updated_ok", $this->_userInfo->getUsername()));
-				// if everything fine, also say so...
-				$this->notifyEvent( EVENT_POST_USER_UPDATE, Array( "user" => &$this->_userInfo ));
-                CacheControl::resetBlogCache( $this->_blogInfo->getId());	
-			}
 
             $this->setCommonData();
 
             return true;
         }
+
+		/**
+		 * Ajax-specific behaviour
+		 */
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+            if( !$this->updateUser())
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_user_settings"));
+			else
+				$this->_view->setSuccessMessage( $this->_locale->pr("user_settings_updated_ok", $this->_userInfo->getUsername()));
+				
+			return( true );
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/action/admin/adminusersettingsaction.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/action/admin/adminusersettingsaction.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/action/admin/adminusersettingsaction.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -32,5 +32,13 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			$this->_view->setValue( "user", $this->_userInfo );
+			$this->_view->setSuccess( true );
+		}
     }
 ?>

Modified: plog/branches/lifetype-1.3-ajax/class/config/properties.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/config/properties.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/config/properties.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -152,5 +152,32 @@
         {
             return( array_key_exists( $key, $this->_props ));
         }
+
+		/**
+		 * Sets the whole array with values at once, optinally overwriting the current set of values
+		 *
+		 * @param values An associative array 
+		 */
+		function setValues( $values, $overwrite = false )
+		{
+			if( $overwrite ) {
+				$this->_props = $values;
+			}
+			else {
+				foreach( $values as $key => $value ) {
+					$this->setValue( $key, $value );
+				}
+			}
+			
+			return( true );
+		}
+		
+		/**
+		 * Class-specific code to serialize itself to JSon
+		 */
+		function toJson()
+		{
+			return( $this->getAsArray());
+		}
 	}
 ?>

Modified: plog/branches/lifetype-1.3-ajax/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/controller/admincontrollermap.properties.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/controller/admincontrollermap.properties.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -15,6 +15,7 @@
     // directly to the admin menu of the blog if he or she belongs to
     // only one)
     $actions["blogSelect"] = "AdminMainAction";
+	$actions["blogSelectLogin"] = "AdminBlogSelectAction";
 	$actions["Dashboard"] = "AdminMainAction";
 	$actions["Manage"] = "AdminManageAction";
     // form to add new posts
@@ -26,8 +27,6 @@
     $actions["newArticleCategory"] = "AdminNewArticleCategoryAction";
     // adds the category to the db
     $actions["addArticleCategory"] = "AdminAddArticleCategoryAction";
-    // adds the category to the db through Ajax
-    $actions["addArticleCategoryAjax"] = "AdminAddArticleCategoryAjaxAction";    
     // shows the settings of the blog
     $actions["blogSettings"] = "AdminBlogSettingsAction";
     // updates the settings of the blog

Modified: plog/branches/lifetype-1.3-ajax/class/controller/controller.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/controller/controller.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/controller/controller.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -341,8 +341,7 @@
 					$actionObject->setPreviousAction( $_plogController_previousAction );
 					
 					// determine whether we should be calling the Ajax stuff or the normal stuff
-					$outputFormat = $request->getValue( "output", "html" );
-					$outputFormat == "json" ? $method = "performAjax" : $method = "perform";
+					$request->isAjax() ? $method = "performAjax" : $method = "perform";
 					
 					if( $actionObject->canPerform()) {
 	                    // we can use the validate method to check the values of the form variables. If validate()

Modified: plog/branches/lifetype-1.3-ajax/class/dao/bloginfo.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/dao/bloginfo.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/dao/bloginfo.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -727,5 +727,19 @@
 			//return( get_object_vars( $this ));
 			return( parent::__sleep());
 		}
+		
+		/**
+		 * Class-specific code to serialize itself to JSon
+		 */	
+		function toJson()
+		{
+			// in addition to serializing the internal fields, we will also
+			// serialize the field that includes information about the owner
+			// (a UserInfo object)
+			$data = parent::toJson();
+			$data["owner"] = $this->getOwnerInfo();			
+			$data["blog_category"] = $this->getBlogCategory();
+			return( $data );
+		}
 	}
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/dao/locationawaredbobject.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/dao/locationawaredbobject.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/dao/locationawaredbobject.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -64,5 +64,17 @@
 		{
 			return( $this->getLocationId() != 0 );
 		}
+		
+		/**
+		 *
+		 */
+		function toJson()
+		{
+			$data = parent::toJson();
+			if( $this->hasLocationData()) 
+				$data["location"] = $this->getLocation();
+				
+			return( $data );
+		}
 	}
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/dao/userpermission.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/dao/userpermission.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/dao/userpermission.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,6 +16,7 @@
         var $_id;
         var $_perm;
 		var $_user;
+		var $_blog;
 
     	function UserPermission( $userId, $blogId, $permId, $id = -1 )
         {
@@ -120,5 +121,19 @@
 			
 			return( $this->_user );				
 		}
+		
+		/**
+		 * Some Ajax-specific behaviour for this class, in addition
+		 * to DbObject::toJson()
+		 * @see DbObject::toJson()
+		 */
+		function toJson()
+		{
+			$data = parent::toJson();
+			$data["user"] = $this->getUserInfo();
+			$data["permission"] = $this->getPermission();
+			
+			return( $data );
+		}
     }
-?>
+?>
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/class/data/filter/trimfilter.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/data/filter/trimfilter.class.php	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/class/data/filter/trimfilter.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,23 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/data/filter/filterbase.class.php" );
+
+	/**
+	 * \ingroup Filter
+	 *
+	 * Cleans up empty spaces at the begining and end of the string.
+	 */
+	class TrimFilter extends FilterBase
+	{
+		/**
+		 * Filters out all HTML code except the allowed tags
+		 *
+		 * @param data
+		 * @return The input string without HTML code
+		 */
+		function filter( $data )
+		{
+			return( parent::filter( trim( $data )));
+		}	
+	}
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/data/forms/formvalidator.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/data/forms/formvalidator.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/data/forms/formvalidator.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -58,11 +58,13 @@
 		 * @param validator A valid class inheriting from the Validator base class and that implements
 		 * the validate() method, that will be used for validating fields.
 		 * @param onlyIfAvailable validate this field only if its value is not emtpy
+		 * @param errorMessage
 		 * @return Always true
 		 */
-		function registerFieldValidator( $fieldName, $validatorClass, $onlyIfAvailable = false )
+		function registerFieldValidator( $fieldName, $validatorClass, $onlyIfAvailable = false, $errorMessage = "" )
 		{
-			$this->_fieldValidators["$fieldName"] = Array( "validator" => $validatorClass, "onlyIfAvailable" => $onlyIfAvailable );		
+			$this->_fieldValidators["$fieldName"] = Array( "validator" => $validatorClass, "onlyIfAvailable" => $onlyIfAvailable );
+			$this->setFieldErrorMessage( $fieldName, $errorMessage );
 		}
 		
 		/**
@@ -109,7 +111,6 @@
 				
 				$this->_validationResults["$fieldName"] = $validationResult;
 				$this->_fieldValues["$fieldName"] = $fieldValue;
-				$this->_fieldErrorMessages["$fieldName"] = "whatever message";
 				
 				// if one of the validations is false, then cancel the whole thing
 				$finalValidationResult = $finalValidationResult && $validationResult;				
@@ -266,11 +267,19 @@
 			$data = Array();
 			$data["fields"] = Array();
 			foreach( $this->_fieldValidators as $field => $validationInfo ) {
-				$data["fields"][] = Array( 
-					"field" => $field, 
-					"validated" => $this->isFieldValid( $field ), 
-					"message" => $this->getFieldErrorMessage( $field )
-				);
+				if( $this->isFieldValid( $field )) {
+					$data["fields"][] = Array( 
+						"field" => $field, 
+						"valid" => true
+					);
+				}
+				else {
+					$data["fields"][] = Array( 
+						"field" => $field, 
+						"valid" => false, 
+						"message" => $this->getFieldErrorMessage( $field )
+					);
+				}
 			}
 			
 			return( $data );

Modified: plog/branches/lifetype-1.3-ajax/class/data/validator/rules/urlformatrule.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/data/validator/rules/urlformatrule.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/data/validator/rules/urlformatrule.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -26,8 +26,10 @@
 define( "EW_ERR_URL_MISSING_QUERYSTRING", 180 );
 define( "EW_ERR_URL_MISSING_ANCHOR", 190 );
 
+define( "EW_ERR_URL_EMPTY_STRING", 200 );
 
 
+
     /**
      * \ingroup Validator_Rules
      *

Modified: plog/branches/lifetype-1.3-ajax/class/database/dbobject.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/database/dbobject.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/database/dbobject.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -66,9 +66,18 @@
     		return( $this->_fields );
     	}
 
+		/**
+		 * Returns an array with data that is going to be the serialized
+		 * representation of this object in Json notation, used for the 
+		 * communication with the Ajax-based front-end code
+		 *
+		 * @return An associative array
+		 */
 		function toJson()
 		{
 			$data = Array();
+			
+			$data["id"] = $this->getId();			
 			foreach( $this->getFieldGetters() as $field => $getter ) {
 				$data[$field] = $this->$getter();
 			}

Modified: plog/branches/lifetype-1.3-ajax/class/net/request.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/net/request.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/net/request.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -73,5 +73,27 @@
 			
 			return( $value );
 		}
+		
+		/**
+		 * Returns true if the request is an Ajax request. Ajax requests are detected
+		 * based on the existence of a parameter called 'output' in the request, whose
+		 * whose value should be 'json' or 'ajax'
+		 *
+		 * @return True if the request is an Ajax request
+		 */
+		function isAjax()
+		{
+			return( $this->getValue( "output", "") == "ajax" || $this->getValue( "output", "" ) == "json" );
+		}
+		
+		/**
+		 * Whether the code implementing the logic should load all available data or not
+		 *
+		 * @return True if all data should be loaded, false otherwise
+		 */
+		function loadAllData()
+		{
+			return( $this->getValue( "all", "") == "all" || $this->getValue( "all", "" ) == "1" );			
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/template/menu/menurenderer.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/template/menu/menurenderer.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/template/menu/menurenderer.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -189,7 +189,7 @@
 							$result .= "<li class=\"$cssClass\">".$this->_locale->tr($child->name)."</li>";
 						
 						if( $depth > 0 ) {					
-							$result .= $this->_render( $child, $depth, $activeOpt, false );
+							$result .= $this->_render( $child, $depth, $activeOpt, false );
 					    }
 					}
 				}

Added: plog/branches/lifetype-1.3-ajax/class/template/smarty/plugins/function.js.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/template/smarty/plugins/function.js.php	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/class/template/smarty/plugins/function.js.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Shortcut for generating <script type"..."></script> tags in HTML code
+ *
+ * @params src The link to the javascript file that we'd like to load
+ */
+function smarty_function_js($params, &$smarty)
+{
+    if( !isset( $params["src"] )) {
+        $smarty->trigger_error("js: missing 'src' parameter");
+        return;
+    }
+
+	return( "<script type=\"text/javascript\" src=\"".$params["src"]."\"></script>" );
+}
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/view/admin/admindefaultview.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/view/admin/admindefaultview.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/view/admin/admindefaultview.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -52,7 +52,7 @@
         	$template = $ts->Template( DEFAULTADMIN_TEMPLATE, "admin" );
             // assign all the values
             $template->assign( $this->_params->getAsArray());
-			
+
             // and send the results
             print $template->fetch();
         }

Modified: plog/branches/lifetype-1.3-ajax/class/view/admin/adminlinkslistview.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/view/admin/adminlinkslistview.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/view/admin/adminlinkslistview.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -33,44 +33,52 @@
 			$this->setValue( "searchTerms", $params["searchTerms"] );
 			$this->_page = $this->getCurrentPageFromRequest();
 		}
-
-        /**
-         * Carries out the specified action
-         */
-        function render()
-        {
+		
+		function loadData()
+		{
 			// get the parameters
-			$order = $this->getValue( "showOrder" );
-			$categoryId = $this->getValue( "showCategory");			
-			$searchTerms = $this->getValue( "searchTerms" );
+			$this->_categoryId = $this->getValue( "showCategory");			
+			$this->_searchTerms = $this->getValue( "searchTerms" );
         	// get all the links and throw the event
         	$links = new MyLinks();
-            $blogLinks = $links->getLinks( $this->_blogInfo->getId(), 
-			                               $categoryId,
-										   $searchTerms,
+            $this->_blogLinks = $links->getLinks( $this->_blogInfo->getId(), 
+			                               $this->_categoryId,
+										   $this->_searchTerms,
 										   $this->_page,
 										   DEFAULT_ITEMS_PER_PAGE );
-			$this->notifyEvent( EVENT_LINKS_LOADED, Array( "links" => &$blogLinks ));
+			$this->notifyEvent( EVENT_LINKS_LOADED, Array( "links" => &$this->_blogLinks ));
 			// get the number of links
-			$numLinks = $links->getNumLinks( $this->_blogInfo->getId(), $categoryId );
-            // get all the link categories but we have to respect the order that the user asked
-            $linkCategories = new MyLinksCategories();
-            $blogLinkCategories = $linkCategories->getMyLinksCategories( $this->_blogInfo->getId(), $order );
-			$this->notifyEvent( EVENT_LINK_CATEGORIES_LOADED, Array ( "linkcategories" => &$blogLinkCategories ));
+			$numLinks = $links->getNumLinks( $this->_blogInfo->getId(), $this->_categoryId );
 			
+			// put the links in the view
+            $this->setValue( "links", $this->_blogLinks );
+			
 			// prepare the pager
-			$pager = new Pager( "?op=editLinks&amp;showCategory={$categoryId}&amp;searchTerms={$searchTerms}&amp;page=",
+			$pager = new Pager( "?op=editLinks&amp;showCategory={$this->_categoryId}&amp;searchTerms={$this->_searchTerms}&amp;page=",
 			                    $this->_page,
 								$numLinks,
-								DEFAULT_ITEMS_PER_PAGE );
+								DEFAULT_ITEMS_PER_PAGE );			
+			$this->setValue( "pager", $pager );
+		}
 
-			// put the data in the view
-            $this->setValue( "links", $blogLinks );
-            $this->setValue( "linkscategories", $blogLinkCategories );
-            $this->setValue( "currentcategory", $categoryId );
-			$this->setValue( "searchTerms", $searchTerms );
-			$this->setValue( "pager", $pager );
-		
+        /**
+         * Carries out the specified action
+         */
+        function render()
+        {	
+			$this->loadData();
+			
+			// put some more data that is only meaningful for the HTML view here
+            // get all the link categories but we have to respect the order that the user asked
+            $linkCategories = new MyLinksCategories();
+			$order = $this->getValue( "showOrder" );
+            $this->_blogLinkCategories = $linkCategories->getMyLinksCategories( $this->_blogInfo->getId(), $order );
+			$this->notifyEvent( EVENT_LINK_CATEGORIES_LOADED, Array ( "linkcategories" => &$blogLinkCategories ));			
+            $this->setValue( "linkscategories", $this->_blogLinkCategories );
+
+            $this->setValue( "currentcategory", $this->_categoryId );
+			$this->setValue( "searchTerms", $this->_searchTerms );
+	
 			parent::render();
         }
     }

Modified: plog/branches/lifetype-1.3-ajax/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/view/admin/adminpostslistview.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/view/admin/adminpostslistview.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -127,11 +127,8 @@
 			$this->_locationId = $this->_getParameter( $params, "showLocation", -1 );
 		}
 		
-		/**
-		 * renders the view
-		 */
-		function render()
-		{			
+		function loadArticles()
+		{
             // fetch all the articles for edition, but we need to know whether we are trying to 
 			// search for some of them or simply filter them based on certain criteria
 			$blogSettings = $this->_blogInfo->getSettings();
@@ -168,11 +165,21 @@
 								$this->_itemsPerPage );
 
             $this->setValue( "posts", $posts );
+			$this->setValue( "pager", $pager );
 			
 			// throw the even in case somebody is listening to it
-			$this->notifyEvent( EVENT_POSTS_LOADED, Array( "posts" => &$posts ));
+			$this->notifyEvent( EVENT_POSTS_LOADED, Array( "posts" => &$posts ));			
+		}
+		
+		/**
+		 * renders the view
+		 */
+		function render()
+		{			
+			// load the articles
+			$this->loadArticles();
 			
-            // and the categories
+			// and now load the rest of stuff needed for the HTML view
             $categories = new ArticleCategories();
 			$blogSettings = $this->_blogInfo->getSettings();
 			$categoriesOrder = $blogSettings->getValue( "categories_order" );
@@ -210,9 +217,8 @@
 			$this->setValue( "poststatus", $postStatusList );
 			$this->setValue( "poststatusWithoutAll", $postStatusListWithoutAll );
 			$this->setValue( "searchTerms", $this->_searchTerms );
-			$this->setValue( "pager", $pager );
 			
 			parent::render();
 		}
 	}
-?>
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/class/view/admin/adminresourceslistview.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/view/admin/adminresourceslistview.class.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/class/view/admin/adminresourceslistview.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -9,6 +9,8 @@
 	
 	define( "ROOT_ALBUM_ID", 0 );
 	
+	define( "DEFAULT_RESOURCES_PER_PAGE", 30 );
+	
     /**
      * \ingroup View
      * @private
@@ -85,7 +87,7 @@
 																	  $this->_searchTerms,
 																	  $this->_locationId,
 					                                                  $this->_page,
-					                                                  DEFAULT_ITEMS_PER_PAGE );
+					                                                  DEFAULT_RESOURCES_PER_PAGE );
 																	  
 					// total number of resources in this album, used by the pager
 					$numResources = $galleryResources->getNumUserResources( $this->_blogInfo->getId(),
@@ -106,7 +108,7 @@
 																	  $this->_searchTerms,
 																	  $this->_locationId,
 					                                                  $this->_page,						
-					                                                  DEFAULT_ITEMS_PER_PAGE );
+					                                                  DEFAULT_RESOURCES_PER_PAGE );
 					// total number of resources for the pager
 					$numResources = $galleryResources->getNumUserResources( $this->_blogInfo->getId(),
 					                                                        GALLERY_NO_ALBUM,
@@ -154,7 +156,7 @@
 			$this->setValue( "resources", $resources );
 
 			// finally, create and export the pager
-			$pager = new Pager( $this->_pagerUrl, $this->_page, $numResources, DEFAULT_ITEMS_PER_PAGE );
+			$pager = new Pager( $this->_pagerUrl, $this->_page, $numResources, DEFAULT_RESOURCES_PER_PAGE );
 			$this->setValue( "pager", $pager );
 			$this->setValue( "searchTerms", $this->_searchTerms );
 			

Added: plog/branches/lifetype-1.3-ajax/class/view/renderer/ajaxviewrenderer.class.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/class/view/renderer/ajaxviewrenderer.class.php	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/class/view/renderer/ajaxviewrenderer.class.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,78 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/view/ajax/ajaxview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/serialize/serializerfactory.class.php" );
+
+	class AjaxViewRenderer extends AjaxView
+	{
+		function AjaxViewRenderer( $view )
+		{
+			$this->AjaxView();
+			
+			$this->_view = $view;
+		}
+		
+		function render()
+		{
+			// simply serialize the array with the parameters as json stream and send it to the client
+			lt_include( PLOG_CLASS_PATH."class/data/serialize/serializerfactory.class.php" );
+			
+			$data = $this->_view->_params->getAsArray();
+			
+			// some stuff that should not be serialized
+			$dontSerialize = Array(
+					"locale", "url", "config", "blogsettings", "menu", "userBlogs"
+				);			
+			
+			foreach( $data as $key => $value ) {
+				if( is_object( $value )) {
+					$methods = get_class_methods( $value );
+					foreach( $methods as $method ) {
+						if( strtolower( $method ) == "tojson" ) {
+							$data[$key] = $value->toJson();
+						}
+					}
+				}
+			}
+			
+			if( isset( $data["method"] )) {
+				$data["method"] = $data["op"];
+				$dontSerialize[] = "op";
+			}
+			
+			if( isset( $data["viewErrorMessage"] )) {
+				$data["message"] = $data["viewErrorMessage"];
+				$dontSerialize[] = "viewErrorMessage";
+			}
+			elseif( isset( $data["viewSuccessMessage"] )) {
+				$data["message"] = $data["viewSuccessMessage"];
+				$dontSerialize[] = "viewSuccessMessage";
+			}
+			
+			if( isset( $data["viewIsError"] )) {
+				if( $data["viewIsError"] )
+					$data["success"] = false;
+				else
+					$data["success"] = true;
+
+				$dontSerialize[] = "viewIsError";
+			}			
+			elseif( isset( $data["viewIsSuccess"] )) {
+				if( $data["viewIsSuccess"] )
+					$data["success"] = true;
+				else
+					$data["success"] = false;
+
+				$dontSerialize[] = "viewIsSuccess";
+			}			
+			
+			foreach( $dontSerialize as $var ) {
+				if( isset( $data[$var] )) unset( $data[$var] );
+			}
+					
+			$this->_params->setValues( $data );
+			
+			return( parent::render());
+		}
+	}
+?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/editor/lifetypeeditor.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/editor/lifetypeeditor.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/editor/lifetypeeditor.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -713,14 +713,35 @@
 	this.execute = function( txtId, param )
 	{
 		if ( txtId == 'postText' )
-			resource_list_window(1);
+			Lifetype.UI.Editor.openResourceListWindow(1);
 		else
-		    resource_list_window(2);
+		    Lifetype.UI.Editor.openResourceListWindow(2);
 		return '';
 	}
 }
 
 /**
+ * opens a window pointing to the list of resources so that we can easily add one to our current
+ * article
+ *
+ * @param type
+ * @return nothing
+ */
+Lifetype.UI.Editor.openResourceListWindow( type ) {
+	width  = 500;
+	height = 450;
+	
+	x = parseInt(screen.width / 2.0) - (width / 2.0);
+	y = parseInt(screen.height / 2.0) - (height / 2.0);
+
+	// type == 1 => intro text
+	// type == 2 => extended text
+	HelpWin = window.open( '?op=resourceList&mode='+type,'ResourceListWindow','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
+
+}
+
+
+/**
  * implements drop-down lists
  */
 Lifetype.UI.Editor.List = function( id, options )

Modified: plog/branches/lifetype-1.3-ajax/js/location/location.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/location/location.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/location/location.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -260,7 +260,7 @@
 
 	// built the URL to update the location
 	p = this.getPoint();
-	url = 'admin.php?op=updateLocation&locId=' + this.locationId + '&desc=' + encodeURIComponent( this.locationDesc ) + '&lat=' + p.lat() + '&long=' + p.lng();
+	url = 'admin.php?op=updateLocation&output=json&locId=' + this.locationId + '&desc=' + encodeURIComponent( this.locationDesc ) + '&lat=' + p.lat() + '&long=' + p.lng();
 
 	// make the HTTP request
 	var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:__handleUpdateLocationAjaxResponse, failure:__handleUpdateLocationAjaxResponse });
@@ -282,7 +282,7 @@
 	var message = msg.message;
 		
 	// there was an error, let's not continue...
-	if( success == 0 ) {
+	if( success == false ) {
 		window.alert(message);	
 		return( false );
 	}
@@ -291,9 +291,9 @@
 	window.alert( message );	
 	
 	// get the id of the updated location from the response message
-	var locId = msg.result._id;
+	var locId = msg.location.id;
 	// and the description
-	var locDesc = msg.result._desc;
+	var locDesc = msg.location.desc;
 	
 	// get the list that holds the locations and if it's there, then 
 	// update the one that we just moved around
@@ -313,7 +313,7 @@
 {
 	// built the URL to update the location
 	p = this.getPoint();
-	url = 'admin.php?op=addLocation&desc=' + encodeURIComponent( this.locationDesc ) + '&lat=' + p.lat() + '&long=' + p.lng();
+	url = 'admin.php?op=addLocation&output=json&desc=' + encodeURIComponent( this.locationDesc ) + '&lat=' + p.lat() + '&long=' + p.lng();
 
 	// make the HTTP request
 	var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:__handleAddLocationAjaxResponse, failure:__handleAddLocationAjaxResponse });
@@ -332,15 +332,15 @@
 	var message = msg.message;
 		
 	// there was an error, let's not continue...
-	if( success == 0 ) {
+	if( success == false ) {
 		window.alert(message);	
 		return( false );
 	}
 	
 	// get the id of the updated location from the response message
-	var locId = msg.result._id;
+	var locId = msg.location.id;
 	// and the description
-	var locDesc = msg.result._desc;
+	var locDesc = msg.location.desc;
 	
 	// get the list that holds the locations and if it's there, then 
 	// update the one that we just moved around

Modified: plog/branches/lifetype-1.3-ajax/js/tinymce/plugins/insertresource/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/tinymce/plugins/insertresource/editor_plugin.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/tinymce/plugins/insertresource/editor_plugin.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -197,7 +197,7 @@
 					if( attribs["width"] == undefined )
 						attribs["width"] = 320;			
 						
-					embedHTML = getFlashPlayerHTML( attribs["alt"], attribs["height"], attribs["width"] );
+					embedHTML = Lifetype.Media.getFlashPlayerHTML( attribs["alt"], attribs["height"], attribs["width"] );
 
 					// Insert embed/object chunk
 					chunkBefore = content.substring(0, startPos);

Modified: plog/branches/lifetype-1.3-ajax/js/tinymce/tiny_mce-plog-resourcelist.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/tinymce/tiny_mce-plog-resourcelist.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/tinymce/tiny_mce-plog-resourcelist.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,3 +1,29 @@
+Lifetype.UI.Pages.ResourceChooser = function() {}
+
+/**
+ * Adds some text where the cursor is.
+ *
+ * Works in IE and Mozilla 1.3b+
+ * In other browsers, it simply adds the text at the end of the current text
+ */
+Lifetype.UI.Pages.ResourceChooser.addText = function( input, insText ) 
+{
+	input.focus();
+	if( input.createTextRange ) {
+		parent.opener.document.selection.createRange().text += insText;
+	} 
+	else if( input.setSelectionRange ) {
+		var len = input.selectionEnd;
+		input.value = input.value.substr( 0, len ) + insText + input.value.substr( len );
+		input.setSelectionRange(len+insText.length,len+insText.length);
+	} 
+	else { 
+		input.value += insText; 
+	}
+}
+
+
+
 /*
  * Insert resource related javascript functions
  */
@@ -40,7 +66,7 @@
     // generate the link
     var htmlCode = _generateResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType );
 
-    addText( parent.opener.document.newPost.postText, htmlCode );
+    Lifetype.UI.Pages.ResourceChooser.addText( parent.opener.document.newPost.postText, htmlCode );
 }
 
 /*
@@ -70,7 +96,7 @@
 {
     var htmlCode = _generateAlbumLink( albumLink, albumName, albumDesc );
 
-    addText( parent.opener.document.newPost.postText, htmlCode );
+    Lifetype.UI.Pages.ResourceChooser.addText( parent.opener.document.newPost.postText, htmlCode );
 }
 
 function onCancel() {
@@ -96,6 +122,6 @@
 		tinyMCE.closeWindow(window);
 	}
 	else {
-		addText( parent.opener.document.newPost.postText, getFlashPlayerHTML( url, height, width ));
+		Lifetype.UI.Pages.ResourceChooser.addText( parent.opener.document.newPost.postText, Lifetype.Media.getFlashPlayerHTML( url, height, width ));
 	}
 }
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/autosave.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/autosave.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/autosave.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -76,7 +76,7 @@
 
 function backupPost()
 {
-	postTopic = $('postTopic').value;
+	postTopic = Lifetype.Dom.$('postTopic').value;
 	
 	if( htmlAreaEnabled )
 	{
@@ -84,7 +84,7 @@
 	}
 	else
 	{
-		postText = $('postText').value;
+		postText = Lifetype.Dom.$('postText').value;
 	}
 
 	if( postTopic.length > minBackupLength )
@@ -105,8 +105,8 @@
 	postNotSaved = getCookie( postNotSavedCookieName );
 	if ( postNotSaved == 1 )
 	{
-		$('autoSaveMessage').innerHTML = msgAutoSaveMessage;
-		Element.show($('autoSaveMessage'));
+		Lifetype.Dom.$('autoSaveMessage').innerHTML = msgAutoSaveMessage;
+		Lifetype.Dom.$('autoSaveMessage').style.display = 'block';
 	}
 	else
 	{
@@ -126,7 +126,7 @@
 
 function restoreAutoSave()
 {
-	$('postTopic').value = loadBackupPostFromCookie( postTopicCookieName );
+	Lifetype.Dom.$('postTopic').value = loadBackupPostFromCookie( postTopicCookieName );
 	
 	if( htmlAreaEnabled )
 	{
@@ -134,17 +134,19 @@
 	}
 	else
 	{
-		$('postText').value = loadBackupPostFromCookie( postTextCookieName );
+		Lifetype.Dom.$('postText').value = loadBackupPostFromCookie( postTextCookieName );
 	}
 	
-	$('autoSaveMessage').innerHTML = '';
-	Element.hide($('autoSaveMessage'));
+	Lifetype.Dom.$('autoSaveMessage').innerHTML = '';
+	//Element.hide(Lifetype.Dom.$('autoSaveMessage'));
+	Lifetype.Dom.$('autoSaveMessage').style.display = 'none';
 }
 
 function eraseAutoSave()
 {
 	deleteBackupPostFromCookie();
 	
-	$('autoSaveMessage').innerHTML = '';
-	Element.hide($('autoSaveMessage'));
+	Lifetype.Dom.$('autoSaveMessage').innerHTML = '';
+	//Element.hide(Lifetype.Dom.$('autoSaveMessage'));
+	Lifetype.Dom.$('autoSaveMessage').style.display = 'none';
 }
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/common.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/common.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/common.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,374 +1,13 @@
-/**
- * opens a window with some help information
- *
- * @param helpurl The destination url
- * @return nothing
- */ 
-function help_window(helpurl)
-{
-	HelpWin = window.open( helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
-}
+Lifetype.Media = function() {}
 
 /**
- * opens a window pointing to the list of resources so that we can easily add one to our current
- * article
- *
- * @param type
- * @return nothing
- */
-function resource_list_window( type ) {
-	width  = 500;
-	height = 450;
-	
-	x = parseInt(screen.width / 2.0) - (width / 2.0);
-	y = parseInt(screen.height / 2.0) - (height / 2.0);
-
-	// type == 1 => intro text
-	// type == 2 => extended text
-	HelpWin = window.open( '?op=resourceList&mode='+type,'ResourceListWindow','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
-
-}
-
-function userPictureSelectWindow()
-{
-	width  = 500;
-	height = 450;
-	
-	x = parseInt(screen.width / 2.0) - (width / 2.0);
-	y = parseInt(screen.height / 2.0) - (height / 2.0);
-	
-	UserPicture = window.open( '?op=userPictureSelect', 'UserPictureSelect','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
-}
-
-/**
- * resets the user picture/avatar in the profile page
- */
-function resetUserPicture()
-{
-    window.document.userSettings.userPictureId.value = 0;
-    // and reload the image path
-    window.document.userSettings.userPicture.src = 'imgs/no-user-picture.jpg';
-}
-
-/**
- * resets blogid in the general setting page
- */
-function resetBlogId()
-{
-    window.document.updateGlobalSettings.blogId.value = '';
-}
-
-/**
- * empties a drop-down list
- *
- * @param box The form object representing the drop-down list
- * @return nothing
- */
-function emptyList( box )
-{
-	while ( box.options.length ) box.options[0] = null;
-}
-
-/**
- * fill a list with data
- *
- * @param box
- * @param numElems
- * @return nothing
- */
-function fillList( box, numElems )
-{
-	for ( i = 1; i <= numElems; i++ ) {
-		option = new Option( i, i );
-		box.options[box.length] = option;
-	}
-	
-	box.selectedIndex=0;
-}
-
-/**
- * @private 
- * @param box
- * @return nothing
- */
-function changeList( box )
-{
-	daysMonth = days[box.options[box.selectedIndex].value-1];
-	emptyList( box.form.postDay );
-	fillList( box.form.postDay, daysMonth );
-}
-
-/**
- * Adds some text where the cursor is.
- *
- * Works in IE and Mozilla 1.3b+
- * In other browsers, it simply adds the text at the end of the current text
- */
-function addText( input, insText ) 
-{
-	input.focus();
-	if( input.createTextRange ) {
-		parent.opener.document.selection.createRange().text += insText;
-	} 
-	else if( input.setSelectionRange ) {
-		var len = input.selectionEnd;
-		input.value = input.value.substr( 0, len ) + insText + input.value.substr( len );
-		input.setSelectionRange(len+insText.length,len+insText.length);
-	} 
-	else { 
-		input.value += insText; 
-	}
-}
-
-/**
- * Used in the' user profile' screen where users can pick an image from their collection
- * and set it as their 'avatar'
- *
- * @param resId
- * @param url
- * @return nothing
- */
-function returnResourceInformation(resId, url)
-{
-	// set the picture id
-    parent.opener.document.userSettings.userPictureId.value = resId;
-    // and reload the image path
-    parent.opener.document.userSettings.userPicture.src = url;
-}
-
-/**
- * opens a window to see an screenshot from a template
- *
- * @param destination url
- */
-function openScreenshotWindow( destUrl )
-{
-	ScreenshotWindow = window.open( destUrl, 'Screenshot','scrollbars=yes,resizable=yes,toolbar=no,height=600,width=800');
-}
-
-/**
- * opens the window where users can choose their own template. The destination url is hardcoded
- */
-function openTemplateChooserWindow()
-{
-	width  = 500;
-	height = 450;
-	
-	x = parseInt(screen.width / 2.0) - (width / 2.0);
-	y = parseInt(screen.height / 2.0) - (height / 2.0);
-	
-	TemplateSelectorWindow = window.open( '?op=blogTemplateChooser', 'TemplateChooser','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
-}
-
-/**
- * tells the parent window which template we chose
- */
-function blogTemplateSelector( templateId )
-{
-	templateSelectList = parent.opener.document.blogSettings.blogTemplate;
-	
-	// loop throough the array with the different template sets and if we find the
-	// one that the use just selected, then automatically select it and quit the loop
-	for( i = 0; i < templateSelectList.options.length; i++ ) {
-		if( templateSelectList.options[i].value == templateId ) {
-			templateSelectList.selectedIndex = i;
-			break;
-		}
-	}
-	
-	window.close();
-}
-
-/**
- * in the "newBlogUser" screen, shows and hides the 'notification area', a textbox
- * where users can type some text that will be included in an email sent to the user that is
- * going to be invited to the blog
- */
-function toggleNotificationArea()
-{
-    var elem = document.getElementById('emailTextNotification');
-    if( elem.style.display == 'none' )
-      elem.style.display = '';
-    else
-      elem.style.display = 'none';
-      
-    return true;  
-}
-
-/**
- * the functions below are used in the "global settings" page, so that 
- * whole blocks of the html page can appear and disappear when needed
- */
-// there is no current section selected
-var currentSection='';
-sections = ["general","summary","templates","urls","email","uploads","helpers","interfaces","security","bayesian","resources","search"];
-
-function _toggle( sectionId )
-{
- // get the dom object with such section
- element = document.getElementById( sectionId );
- 
- currentStatus = element.style.display;
-
- // and toggle its visibility
- if( element.style.display == 'none' )
-   element.style.display = 'block';
- else
-   element.style.display = 'none';
-  
- return true;
-}
-
-function toggleSection(sectionId)
-{
- // if no section selected, do nothing
- if( sectionId == 'none' )
-   return false;
-
- toggleAll( false );
- 
- // and toggle the new one
- _toggle(sectionId);
-
- // now we have a new current section
- currentSection = sectionId;
-   
- return true;  
-}
-
-function toggleAll( enabled )
-{
-  if( enabled ) statusString = 'block';
-  else statusString = 'none';
-  
-  for( i = 0; i < sections.length; i++ ) {
-    element = document.getElementById( sections[i] );
-    element.style.display = statusString;
-  }
-}
-
-/**
- * generic function for moving elements from one list to another!
- */
-function moveElement(srcList, dstList)
-{
-	
-	// now find out which user we've selected from the first list
-	indexId = srcList.selectedIndex;
-	
-	// if no element was selected, quit
-	if( indexId == -1 )
-		return false;
-	
-	optText = srcList.options[indexId].text;
-	optId  = srcList.options[indexId].value;
-	
-	if( optId == -1 ) {
-		// do nothing, this is our special marker!
-		return false;
-	}
-	
-	// add the option to the opposite box
-	newOpt = new Option( optText, optId );
-	dstList.options[dstList.options.length] = newOpt;
-	
-	// and remove it from the current box
-	srcList.options[indexId] = null;
-	
-	return true;
-}
-
-/**
- * automatically selects all the elements of a list
- */
-function listSelectAll(listId)
-{
-	list = document.getElementById( listId );
-	for( i = 0; i < list.options.length; i++ ) {
-		list.options[i].selected = true;
-	}
-
-	return true;
-}
-
-function editBlogRemoveSelected()
-{
-	userList = document.getElementById( 'userList' );
-    length = userList.options.length;
-	for( i = 0; i < length; i++ ) {
-		if( userList.options[i] ) {
-			if( userList.options[i].selected ){
-				userList.options[i] = null;
-            	i--; 
-            	//length--;
-			}
-        }
-	}
-	return( true );
-}
-
-function MM_jumpMenu(targ,selObj,restore){ //v3.0 
-    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
-    if (restore) selObj.selectedIndex=0; 
-}
-
-function getPostEditFormElements( formId )
-{
-	var formData = '';
-	
-	form = document.getElementById( formId );
-	
-	for(i = 0; i < form.elements.length; i++ ) {
-		itemName = form.elements[i].name;
-		itemValue = form.elements[i].value;
-		
-		if( itemName != "op" ) {
-			// we don't want to send more than one "op" parameter... do we?
-			if( itemName == "postCategories[]" ) {
-				// we need to have a special case for this one because it's a list that
-				// allows multiple selection... only using the "value" attribute will
-				// return one of the items and we would like to have them all
-				for (var j = 0; j < form.elements[i].options.length; j++) {
-					if (form.elements[i].options[j].selected) 
-						formData = formData + itemName + "=" + form.elements[i].options[j].value + "&";
-				}
-			}
-			else if( itemName == "postText" && htmlAreaEnabled ) {
-			    if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postText')) + "&";
-				} else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postText')) + "&";
-				}
-			}
-			else if( itemName == "postExtendedText" && htmlAreaEnabled ) {
-				if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postExtendedText')) + "&";
-			    } else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postExtendedText')) + "&";
-                }
-			}
-			else {
-				// for all other elements, normal handling
-				if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(itemValue) + "&";
-				} else {
-				    formData = formData + itemName + "=" + escape(itemValue) + "&";
-			    }
-			}
-		}
-    }	
-    
-    return formData;
-}
-
-/**
  * Returns the HTML code required to embed the Flash MP3 and video player, given
  * a URL to a playable media file.
  *
  * @param url
  * @return
  */
-function getFlashPlayerHTML( url, height, width ) 
+Lifetype.Media.getFlashPlayerHTML = function( url, height, width ) 
 {
     var playerUrl = plogBaseUrl + "/flash/mp3player/mp3player.swf";
 	

Modified: plog/branches/lifetype-1.3-ajax/js/ui/core.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/core.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/core.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -99,4 +99,9 @@
 Lifetype.JSon.decode = function( code )
 {
 	return( eval('(' + code + ')'));
-}
\ No newline at end of file
+}
+
+/**
+ * Base Pages namespace
+ */
+Lifetype.UI.Pages = function() {}
\ No newline at end of file

Deleted: plog/branches/lifetype-1.3-ajax/js/ui/default.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/default.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/default.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,193 +0,0 @@
-function externalLinks()
-{
-    if (!document.getElementsByTagName) return;
-
-    var anchors = document.getElementsByTagName("a");
-
-    for (var i = 0; i < anchors.length; i++)
-    {
-        var anchor = anchors[i];
-
-        if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
-        {
-            anchor.target = "_blank";
-        }
-    }
-}
-
-window.onload = externalLinks;
-
-function verifyOneCheckMinimum(formName, msg, prefix)
-{
-    n = "all";
-
-    if (prefix)
-    {
-        n = prefix + n;
-    }
-
-    f = document.getElementById(formName);
-    i = 0;
-    j = 0;
-
-    while (e = f.elements[i])
-    {
-        if (e.type == "checkbox" && e.id != n && e.checked)
-        {
-            if (!prefix || e.id.indexOf(prefix) != -1)
-            {
-                j++;
-            }
-        }
-
-        i++;
-    }
-
-    result = (j > 0);
-
-    if (!result && msg)
-    {
-        alert(msg);
-    }
-
-    return result;
-}
-
-function submitForm(formName, opValue, msg)
-{
-    if (msg)
-    {
-        if (!verifyOneCheckMinimum(formName))
-        {
-            alert(msg);
-            return false;
-        }
-    }
-
-    f = document.getElementById(formName);
-    f.op.value = opValue;
-    return true;
-}
-
-function toggleAllChecks(formName, prefix)
-{
-    n = "all";
-
-    if (prefix)
-    {
-        n = prefix + n;
-    }
-
-    i = 0;
-    e = document.getElementById(n);
-    s = e.checked;
-    f = document.getElementById(formName);
-
-    while (e = f.elements[i])
-    {
-        if (e.type == "checkbox" && e.id != n)
-        {
-            if (!prefix || e.id.indexOf(prefix) != -1)
-            {
-                e.checked = s;
-            }
-        }
-
-        i++;
-    }
-}
-
-// In LifeType 1.2 imeplemtation, we don't have the Role object.
-// So, I just defined two kind of permission group here, it can help user configure thier blog user permission easily.
-var permissionSets = new Array();
-permissionSets["basic_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 36, 37 );
-permissionSets["full_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 );
-
-function togglePermissionSets(formName, permissionSet)
-{
-	if(permissionSet == "")
-		return;
-
-    f = document.getElementById(formName);
-	i = 0;
-    while (e = f.elements[i])
-    {
-        if (e.type == "checkbox" && e.id != "sendNotification")
-        {
-            if( inArray(permissionSets[permissionSet], e.value) )
-            	e.checked = 1;
-            else
-            	e.checked = 0;
-        }
-        i++;
-    }
-}
-
-// Returns true if the passed value is found in the
-// array. Returns false if it is not.
-function inArray(a, v, c)
-{
-	var i;
-	for (i=0; i < a.length; i++) {
-		// use === to check for Matches. ie., identical (===),
-		if(c){ //performs match even the string is case sensitive
-			if (a[i].toLowerCase() == v.toLowerCase()) {
-				return true;
-			}
-		}else{
-			if (a[i] == v) {
-				return true;
-			}
-		}
-	}
-	return false;
-}
-
-function confirmDlg(l, msg)
-{
-    if (confirm(msg))
-    {
-        if (typeof(l) == 'string')
-        {
-            document.location.href = l;
-        }
-        else
-        {
-            document.location.href = l.href;
-        }
-    }
-
-    return false;
-}
-
-function popUp(l, n, f)
-{
-    if (!window.focus)
-    {
-        return true;
-    }
-
-    if (typeof(l) == 'string')
-    {
-        window.open(l, n, f);
-    }
-    else
-    {
-        window.open(l.href, n, f);
-    }
-
-    return false;
-}
-
-function goTo(l)
-{
-    window.location.href = l;
-}
-
-function goToIf(l, msg)
-{
-    if (confirm(msg))
-    {
-        window.location.href = l;
-    }
-}

Added: plog/branches/lifetype-1.3-ajax/js/ui/dom.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/dom.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/dom.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,54 @@
+/**
+ * DOM manipulation utilities
+ */
+Lifetype.Dom = function() 
+{
+	// nothing yet
+}
+
+Lifetype.Dom.$ = function( f )
+{
+	return( document.getElementById( f ));
+}
+
+Lifetype.Dom.$F = function( f )
+{
+	return( document.getElementById( f ).value );
+}
+
+/**
+ * Hides an element from the DOM, only if exists
+ *
+ * @param elemId
+ */
+Lifetype.Dom.hide = function( elemId )
+{
+	elem = document.getElementById( elemId );
+	if( elem )
+		elem.style.display = 'none';
+}
+
+/**
+ * Shows an existing element in the DOM, only if exists
+ *
+ * @param elemId
+ */
+Lifetype.Dom.show = function( elemId )
+{
+	elem = document.getElementById( elemId );
+	if( elem )
+		elem.style.display = 'block';
+}
+
+/**
+ * sets the innerHTML property of the given element
+ *
+ * @param elemId
+ * @param content
+ */
+Lifetype.Dom.setContent = function( elemId, content )
+{
+	elem = document.getElementById( elemId );
+	if( elem ) 
+		elem.innerHTML = content;
+}
\ No newline at end of file

Deleted: plog/branches/lifetype-1.3-ajax/js/ui/external.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/external.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/external.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,9 +0,0 @@
-function externalLinks() { 
- if (!document.getElementsByTagName) return; 
- var anchors = document.getElementsByTagName("a"); 
- for (var i=0; i<anchors.length; i++) { 
-  var anchor = anchors[i]; 
-  if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
-   anchor.target = "_blank"; 
-  } 
-}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/forms.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/forms.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/forms.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -53,7 +53,184 @@
 	}
 }
 
+/**
+ * @static
+ * Appends an item to a list
+ * @param fieldName
+ * @param value
+ * @param ite
+ */
+Lifetype.Forms.List.appendToList = function( fieldName, value, item )
+{
+	return( Lifetype.Forms.List.appendToExternalList( document, fieldName, value, item ));
+}
 
+/**
+ * @static
+ * Appends an item to a list, which may not be inside the current document (hence the
+ * 'dest' parameter)
+ * @param dest
+ * @param fieldName
+ * @param value
+ * @param ite
+ */
+Lifetype.Forms.List.appendToExternalList = function( dest, fieldName, value, item )
+{
+	dstList = dest.getElementById( fieldName );
+
+	// check if the element is already there
+	found = false;
+	j = 0;
+	while( j < dstList.options.length && !found ) {
+		if( dstList.options[j].text == item && dstList.options[j].value == value ) {
+			// element found!
+			found = true;
+		}
+		j++;
+	}
+
+	// add the element only if not found
+	if( !found ) {
+		newOpt = new Option( item, value );
+		dstList.options[dstList.options.length] = newOpt;
+	}
+
+	return true;
+}
+
+/**
+ * automatically selects all the elements of a list
+ *
+ * @param listId
+ */
+Lifetype.Forms.List.selectAll = function( listId )
+{
+	list = document.getElementById( listId );
+	for( i = 0; i < list.options.length; i++ ) {
+		list.options[i].selected = true;
+	}
+
+	return true;
+}
+
+/**
+ * empties a drop-down list
+ *
+ * @param box The form object representing the drop-down list
+ * @return nothing
+ */
+Lifetype.Forms.List.emptyList = function( listId )
+{	
+	box = Lifetype.Dom.$( listId );
+	while ( box.options.length ) box.options[0] = null;
+}
+
+/**
+ * Toggles all checkboxes within a form
+ */
+Lifetype.Forms.toggleAllChecks = function(formName, prefix)
+{
+    n = "all";
+
+    if (prefix)
+    {
+        n = prefix + n;
+    }
+
+    i = 0;
+    e = document.getElementById(n);
+    s = e.checked;
+    f = document.getElementById(formName);
+
+    while (e = f.elements[i])
+    {
+        if (e.type == "checkbox" && e.id != n)
+        {
+            if (!prefix || e.id.indexOf(prefix) != -1)
+            {
+                e.checked = s;
+            }
+        }
+
+        i++;
+    }
+}
+
+/**
+ * @static
+ * Processes responses for forms submitted via Ajax
+ * @param formId
+ * @param postUrl
+ */
+Lifetype.Forms.AjaxFormProcessor = function( formId, postUrl )
+{
+	var formObject = document.getElementById( formId ); 
+	YAHOO.util.Connect.setForm(formObject); 
+	var cObj = YAHOO.util.Connect.asyncRequest('POST', postUrl,
+		callback = {
+			success: function( o ) {
+				// decode the JSon response from the server
+				response = Lifetype.JSon.decode( o.responseText );
+				
+				// shorter way to access the form object
+				form = response.form;						
+
+				// 'deactivate' all field messages
+				elements = YAHOO.util.Dom.getElementsByClassName('fieldValidationError','div');
+				for( i = 0; i < elements.length; i++ ) {
+					elements[i].style.display = 'none';
+				}
+				
+				// and all other messages
+				document.getElementById( "FormInfo" ).style.display = 'none';
+				document.getElementById( "FormError" ).style.display = 'none';
+				
+				// was it successful?
+				if( response.success == false ) {							
+					// process the information from the 'form' object
+					for( i = 0; i < form.fields.length; i++ ) {
+						fObject = form.fields[i];
+						// is the field valid?
+						if( fObject.valid == false ) {
+							// We've also got the name of the field that caused the error and 
+							// the error message that should be displayed, so we can do it right away
+							if(( elem = YAHOO.util.Dom.get( "field_" + fObject.field ))) {
+								elem.style.display = 'block';
+								elem.innerHTML = '<span style="background:red;color:white;font-weight:bold">&nbsp;!&nbsp;</span>&nbsp;' + fObject.message;
+							}
+						}
+						else {
+							// there was no error, so we can hide the error message if there was one previously displayed
+							if(( elem = YAHOO.util.Dom.get( "field_" + fObject.field ))) {
+								elem.style.display = 'none';
+							}
+						}
+					}				
+				
+					// display the general error message by setting it into its container
+					if(( elem = YAHOO.util.Dom.get( "FormErrorMessage" ))) {
+						elem.innerHTML = response.message;
+					}
+					if(( elem = YAHOO.util.Dom.get( "FormError" ))) {					
+						elem.style.display = 'block';
+					}
+					
+					return( true );
+				}
+				else {
+					// display the general error message by setting it into its container
+					// and making the block visible
+					if(( elem = YAHOO.util.Dom.get( "FormInfoMessage" )))
+						elem.innerHTML = response.message;
+					if(( elem = YAHOO.util.Dom.get( "FormInfo" )))
+						elem.style.display = 'block';				
+				}									
+			}			
+		}
+	);
+}
+
+
 //
 // :TODO:
 // Move the functions above to the Lifetype.Forms.List namespace
@@ -152,28 +329,4 @@
 {
 	element = dest.getElementById( fieldName );
 	element.value = value;
-}
-
-function appendDocumentList(dest, fieldName, value, item )
-{
-	dstList = dest.getElementById( fieldName );
-	
-	// check if the element is already there
-	found = false;
-	j = 0;
-	while( j < dstList.options.length && !found ) {
-		if( dstList.options[j].text == item && dstList.options[j].value == value ) {
-			// element found!
-			found = true;
-		}
-		j++;
-	}
-	
-	// add the element only if not found
-	if( !found ) {
-		newOpt = new Option( item, value );
-		dstList.options[dstList.options.length] = newOpt;
-	}
-	
-	return true;
 }
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/menu.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/menu.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/menu.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,9 @@
+Lifetype.UI.Menu = function() {}
+
+Lifetype.UI.Menu.MM_jumpMenu = function(targ,selObj,restore) 
+{ 
+	//v3.0 
+    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
+    if (restore) selObj.selectedIndex=0; 
+}
+

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/addbloguser.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/addbloguser.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/addbloguser.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,50 @@
+
+// In LifeType 1.2 imeplemtation, we don't have the Role object.
+// So, I just defined two kind of permission group here, it can help user configure thier blog user permission easily.
+var permissionSets = new Array();
+permissionSets["basic_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 36, 37 );
+permissionSets["full_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 );
+
+Lifetype.UI.Pages.AddBlogUser = function() {}
+
+Lifetype.UI.Pages.AddBlogUser.togglePermissionSets = function(formName, permissionSet)
+{
+	if(permissionSet == "")
+		return;
+
+    f = document.getElementById(formName);
+	i = 0;
+    while (e = f.elements[i])
+    {
+        if (e.type == "checkbox" && e.id != "sendNotification")
+        {
+            if( Lifetype.UI.Pages.AddBlogUser.inArray(permissionSets[permissionSet], e.value) )
+            	e.checked = 1;
+            else
+            	e.checked = 0;
+        }
+        i++;
+    }
+}
+
+/**
+ * Returns true if the passed value is found in the
+ * array. Returns false if it is not.
+ */
+Lifetype.UI.Pages.AddBlogUser.inArray = function(a, v, c)
+{
+	var i;
+	for (i=0; i < a.length; i++) {
+		// use === to check for Matches. ie., identical (===),
+		if(c){ //performs match even the string is case sensitive
+			if (a[i].toLowerCase() == v.toLowerCase()) {
+				return true;
+			}
+		}else{
+			if (a[i] == v) {
+				return true;
+			}
+		}
+	}
+	return false;
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/blogsettings.js
===================================================================

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/default.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/default.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/default.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,30 @@
+Lifetype.UI.Pages.Default = function() {}
+
+Lifetype.UI.Pages.Default.submitHook = function()
+{
+	var formObject = document.getElementById( 'loginForm' ); 
+	YAHOO.util.Connect.setForm(formObject); 
+	var cObj = YAHOO.util.Connect.asyncRequest('POST', '?op=Login&output=json',
+		callback = {
+			success: function( o ) {
+				// decode the JSon response from the server
+				response = Lifetype.JSon.decode( o.responseText );
+				
+				Lifetype.Dom.hide( "FormInfo" );
+				Lifetype.Dom.hide( "FormError" );
+				
+				if( response.success ) {
+					Lifetype.Dom.setContent( "FormInfoMessage", response.message );
+					Lifetype.Dom.show( "FormInfo" );
+
+					// move to the blog selection
+					window.location.href = '?op=blogSelectLogin';
+				}
+				else {
+					Lifetype.Dom.setContent( "FormErrorMessage", response.message );
+					Lifetype.Dom.show( "FormError" );
+				}
+			}
+		}
+	);		
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/editcustomfield.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/editcustomfield.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/editcustomfield.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,11 @@
+/**
+ * Javascript code used in editcustomfield.template
+ */
+
+Lifetype.UI.Pages.UpdateCustomField = function() {}
+
+Lifetype.UI.Pages.UpdateCustomField.onSubmitHook = function()
+{
+	Lifetype.Forms.List.selectAll('fieldValues');
+	Lifetype.Forms.AjaxFormProcessor(document.getElementById('updateCustomField').id,'?op=updateCustomField&output=json');
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/global.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/global.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/global.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,22 @@
+/**
+ * General javascript functions used in more than one page
+ */
+
+Lifetype.UI.Pages.Global = function() {}
+
+Lifetype.UI.Pages.Global.switchMassiveOption = function()
+{
+	if ( Lifetype.Dom.$('massiveChangeOption').style.display == 'none' )
+	{
+		Lifetype.Dom.show( 'massiveChangeOption' );
+		Lifetype.Dom.$('optionIconLink').innerHTML = hideMassiveChangeOption;
+		Lifetype.Dom.$('optionIconLink').title = hideMassiveChangeOption;
+	}
+	else
+	{
+		Lifetype.Dom.hide( 'massiveChangeOption' );
+		Lifetype.Dom.$('optionIconLink').innerHTML = showMassiveChangeOption;
+		Lifetype.Dom.$('optionIconLink').title = showMassiveChangeOption;
+	}
+}
+

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/globalsettings.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/globalsettings.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/globalsettings.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,10 @@
+/**
+ * resets blogid in the general setting page
+ */
+
+Lifetype.Pages.GlobalSettings = function() {}
+
+Lifetype.Pages.GlobalSettings.resetBlogId = function()
+{
+    window.document.updateGlobalSettings.blogId.value = '';
+}

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/newcustomfield.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/newcustomfield.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/newcustomfield.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,27 @@
+/**
+ * Javascript code used in newcustomfield.template
+ */
+
+Lifetype.UI.Pages.NewCustomField = function() {}
+
+Lifetype.UI.Pages.NewCustomField.onSubmitHook = function()
+{
+	Lifetype.Forms.List.selectAll('fieldValues');
+	Lifetype.Forms.AjaxFormProcessor(document.getElementById('newCustomField').id,'?op=addCustomField&output=json');
+}
+
+Lifetype.UI.Pages.NewCustomField.fieldTypeOnChangeHandler = function( select )
+{
+	if( select.selectedIndex == 4 )
+		Lifetype.Dom.show( 'fieldValuesBlock' );
+	else
+		Lifetype.Dom.hide( 'fieldValuesBlock' );
+}
+
+Lifetype.UI.Pages.NewCustomField.addFieldValue = function()
+{
+	newValue = window.prompt('Enter new value for the custom field');
+	if(newValue != null ) {
+		Lifetype.Forms.List.appendToList( 'fieldValues', newValue, newValue);
+	}
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/newpost.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/newpost.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/newpost.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,173 @@
+/*****
+ * Code to add categories via Ajax
+ *****/
+Lifetype.UI.Pages.NewPost = function() {}
+
+/**
+ * The following functions are called when clicking the "add category" button
+ */
+Lifetype.UI.Pages.NewPost.addArticleCategoryAjax = function() 
+{
+	var categoryName = Lifetype.Dom.$F('newArticleCategory');
+	if (categoryName != '') {
+		var params = 'op=addArticleCategory' + '&categoryName=' + encodeURIComponent(categoryName) + "&output=json";
+		
+		// build the full URL
+		var url = plogAdminBaseUrl + "?" + params;
+		
+		var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:Lifetype.UI.Pages.NewPost.addArticleCategoryOption, failure:Lifetype.UI.Pages.NewPost.addArticleCategoryOption } ); 
+		
+		// show the "loading" message
+		Lifetype.Dom.$( 'newArticleCategory' ).value = msgSaving;
+		Lifetype.Dom.$( 'addArticleCategory' ).disabled = 1;
+	}
+}
+
+/**
+ * when adding a new form, checks that there is at least one category selected
+ */
+Lifetype.UI.Pages.NewPost.submitNewPost = function(form)
+{
+	if( form.postCategories.selectedIndex == -1 ) {
+		// we have no category selected!
+		window.alert(msgErrorNoCategorySelected);
+		return false;
+    }  
+    
+	return true;
+}
+
+/**
+ * Callback for the 'add category' feature
+ */
+Lifetype.UI.Pages.NewPost.addArticleCategoryOption = function( o )
+{
+	//put returned XML in the textarea
+	var msg = Lifetype.JSon.decode( o.responseText );
+	var success = msg.success;
+	var message = msg.message;
+	if (!success) {
+		window.alert(message);
+	}
+	else {
+		var catId = msg.category.id;
+		var catName = msg.category.name;
+	    for(i=Lifetype.Dom.$( 'postCategories' ).length; i>0; i--)
+	    {
+			tmpText = Lifetype.Dom.$( 'postCategories' ).options[i-1].text;
+			tmpValue = Lifetype.Dom.$( 'postCategories' ).options[i-1].value;
+			tmpSelected = Lifetype.Dom.$( 'postCategories' ).options[i-1].selected;
+			Lifetype.Dom.$( 'postCategories' ).options[i] = new Option( tmpText, tmpValue );
+			Lifetype.Dom.$( 'postCategories' ).options[i].selected = tmpSelected;
+	    }
+	    Lifetype.Dom.$( 'postCategories' ).options[0] = new Option( catName, catId );
+	    Lifetype.Dom.$( 'postCategories' ).options[0].selected = true;
+	    Lifetype.Dom.$( 'newArticleCategory' ).value = '';
+	    Lifetype.Dom.$( 'addArticleCategory' ).disabled = 0;
+	}
+}
+
+/**
+ * Save the article via Ajax in the background
+ */
+/**
+ * The following functions are called when clicking the "save draft and continue" button
+ */
+Lifetype.UI.Pages.NewPost.saveDraftArticleAjax = function()
+{
+	// if there is no category selected, then we won't save a draft!
+	form = document.getElementById( "newPost" );
+
+	if( form.postTopic.value == '' ) {
+		window.alert( msgErrorPostTopic );
+		return false;
+	}
+
+    // Can't use form.postText.value, becasue the form.postText.value still "null"
+    if( htmlAreaEnabled ) {
+		postText = tinyMCE.getContent('postText');
+	} else {
+		postText = form.postText.value;
+    }
+
+    if (postText == '') {
+		window.alert( msgErrorPostText );
+		return false;
+	}
+
+	if( !Lifetype.UI.Pages.NewPost.submitNewPost( form ))
+		return false;	
+
+    var formData = Lifetype.UI.Pages.NewPost.getPostEditFormElements( "newPost" );
+
+	var params = 'op=saveDraftArticleAjax&'+formData;
+	var url = plogAdminBaseUrl + "?" + params;
+	
+	var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:Lifetype.UI.Pages.NewPost.saveDraftArticleResponse }); 
+}
+
+/**
+ * Callback for the "save draft" functionality
+ */
+Lifetype.UI.Pages.NewPost.saveDraftArticleResponse = function(originalRequest)
+{
+	// fetcth the json response
+	var msg = Lifetype.JSon.decode( originalRequest.responseText );
+	
+	var id = msg.result._id;
+	var message = msg.message;
+	$( 'postId' ).value = id;
+	window.alert(message);
+}
+
+/**
+ * Gets all the fields from the "new post" form
+ */
+Lifetype.UI.Pages.NewPost.getPostEditFormElements = function( formId )
+{
+	var formData = '';
+	
+	form = document.getElementById( formId );
+	
+	for(i = 0; i < form.elements.length; i++ ) {
+		itemName = form.elements[i].name;
+		itemValue = form.elements[i].value;
+		
+		if( itemName != "op" ) {
+			// we don't want to send more than one "op" parameter... do we?
+			if( itemName == "postCategories[]" ) {
+				// we need to have a special case for this one because it's a list that
+				// allows multiple selection... only using the "value" attribute will
+				// return one of the items and we would like to have them all
+				for (var j = 0; j < form.elements[i].options.length; j++) {
+					if (form.elements[i].options[j].selected) 
+						formData = formData + itemName + "=" + form.elements[i].options[j].value + "&";
+				}
+			}
+			else if( itemName == "postText" && htmlAreaEnabled ) {
+			    if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postText')) + "&";
+				} else {
+				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postText')) + "&";
+				}
+			}
+			else if( itemName == "postExtendedText" && htmlAreaEnabled ) {
+				if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postExtendedText')) + "&";
+			    } else {
+				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postExtendedText')) + "&";
+                }
+			}
+			else {
+				// for all other elements, normal handling
+				if ( blogLocale == "UTF-8" ) {
+				    formData = formData + itemName + "=" + encodeURIComponent(itemValue) + "&";
+				} else {
+				    formData = formData + itemName + "=" + escape(itemValue) + "&";
+			    }
+			}
+		}
+    }	
+    
+    return formData;
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,30 @@
+Lifetype.UI.Pages.Resources = function() {}
+
+Lifetype.UI.Pages.Resources.mouseOver = function( elem )
+{
+	//elem.style.background = "red";
+}
+
+Lifetype.UI.Pages.Resources.mouseOut = function( elem )
+{
+	//elem.style.background = "white";
+}
+
+Lifetype.UI.Pages.Resources.clickHandler = function( elem )
+{
+	checkbox = Lifetype.Dom.$( "checkbox_" + elem.id );
+	if( checkbox.checked == false ) {
+		// toggle the checkbox assigned to this item
+		checkbox.checked = true;
+	
+		// and the background color of the element
+		elem.style.background = "blue";
+	}
+	else {
+		// toggle the checkbox assigned to this item
+		checkbox.checked = false;
+
+		// and the background color of the element
+		elem.style.background = "white";
+	}
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/templatechooser.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/templatechooser.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/templatechooser.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,48 @@
+/**
+ * Javascript code used by the blog template chooser
+ */
+Lifetype.UI.Pages.TemplateChooser = function() {}
+
+/**
+ * opens the window where users can choose their own template. The destination url is hardcoded
+ */
+Lifetype.UI.Pages.TemplateChooser.openTemplateChooserWindow = function()
+{
+	width  = 500;
+	height = 450;
+	
+	x = parseInt(screen.width / 2.0) - (width / 2.0);
+	y = parseInt(screen.height / 2.0) - (height / 2.0);
+	
+	TemplateSelectorWindow = window.open( '?op=blogTemplateChooser', 'TemplateChooser','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
+}
+
+/**
+ * tells the parent window which template we chose
+ */
+Lifetype.UI.Pages.TemplateChooser.blogTemplateSelector = function( templateId )
+{
+	templateSelectList = parent.opener.document.blogSettings.blogTemplate;
+	
+	// loop throough the array with the different template sets and if we find the
+	// one that the use just selected, then automatically select it and quit the loop
+	for( i = 0; i < templateSelectList.options.length; i++ ) {
+		if( templateSelectList.options[i].value == templateId ) {
+			templateSelectList.selectedIndex = i;
+			break;
+		}
+	}
+	
+	window.close();
+}
+
+/**
+ * opens a window to see an screenshot from a template
+ *
+ * @param destination url
+ */
+Lifetype.UI.Pages.TemplateChooser.openScreenshotWindow = function( destUrl )
+{
+	ScreenshotWindow = window.open( destUrl, 'Screenshot','scrollbars=yes,resizable=yes,toolbar=no,height=600,width=800');
+}
+

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/userpictureselect.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/userpictureselect.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/userpictureselect.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,17 @@
+Lifetype.UI.Pages.UserPictureSelect = function() {}
+
+/**
+ * Used in the' user profile' screen where users can pick an image from their collection
+ * and set it as their 'avatar'
+ *
+ * @param resId
+ * @param url
+ * @return nothing
+ */
+Lifetype.UI.Pages.UserPictureSelect.returnResourceInformation = function(resId, url)
+{
+	// set the picture id
+    parent.opener.document.userSettings.userPictureId.value = resId;
+    // and reload the image path
+    parent.opener.document.userSettings.userPicture.src = url;
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/usersettings.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/usersettings.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/usersettings.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,26 @@
+/** 
+ * Javascript code used in usersettings.template
+ */
+
+Lifetype.UI.Pages.UserSettings = function() {}
+
+Lifetype.UI.Pages.UserSettings.userPictureSelectWindow = function()
+{
+	width  = 500;
+	height = 450;
+	
+	x = parseInt(screen.width / 2.0) - (width / 2.0);
+	y = parseInt(screen.height / 2.0) - (height / 2.0);
+	
+	UserPicture = window.open( '?op=userPictureSelect', 'UserPictureSelect','top='+y+',left='+x+',scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width);
+}
+
+/**
+ * resets the user picture/avatar in the profile page
+ */
+Lifetype.UI.Pages.UserSettings.resetUserPicture = function()
+{
+    window.document.userSettings.userPictureId.value = 0;
+    // and reload the image path
+    window.document.userSettings.userPicture.src = 'imgs/no-user-picture.jpg';
+}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/plogui.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/plogui.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/ui/plogui.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,24 +1,9 @@
 /**
- * when adding a new form, checks that there is at least one category selected
- */
-function submitNewPost(form)
-{
-	if( form.postCategories.selectedIndex == -1 ) {
-		// we have no category selected!
-		window.alert(msgErrorNoCategorySelected);
-		return false;
-    }  
-    
-	return true;
-}
-
-/**
  * this function is the one called when clicking the "add category" button
  */
 //
 // declaration of the namespaces
 //
-Lifetype.UI.Pages = function() {}
 Lifetype.UI.Pages.EditPosts = function() {}
 
 /**
@@ -48,24 +33,6 @@
 	}
 }
 
-function addArticleCategoryOption(originalRequest)
-{
-	//put returned XML in the textarea
-	var xmldoc = originalRequest.responseXML;
-	var success = xmldoc.getElementsByTagName('success')[0].firstChild.nodeValue;
-	var message = xmldoc.getElementsByTagName('message')[0].firstChild.nodeValue;
-	if (success=='0') {
-		window.alert(message);
-		$( 'newArticleCategory' ).value = '';
-		$( 'addArticleCategory' ).disabled = 0;
-	}
-	else {
-		document.getElementById("postsList").op.value = op;
-		document.getElementById("postsList").submit();
-	}
-}
-
-
 Lifetype.UI.Pages.EditResources = function() {}
 /**
  * Submit hook used for the 'bulk edit' in the resources.templ
@@ -149,22 +116,6 @@
 	}
 }
 
-function switchMassiveOption()
-{
-	if ( $('massiveChangeOption').style.display == 'none' )
-	{
-		Element.show($('massiveChangeOption'));
-		$('optionIconLink').innerHTML = hideMassiveChangeOption;
-		$('optionIconLink').title = hideMassiveChangeOption;
-	}
-	else
-	{
-		Element.hide($('massiveChangeOption'));
-		$('optionIconLink').innerHTML = showMassiveChangeOption;
-		$('optionIconLink').title = showMassiveChangeOption;
-	}
-}
-
 function showProgressBar( elementToHide )
 {
    button = document.getElementById( elementToHide );
@@ -200,164 +151,4 @@
 	iframe.src = url;
 	
 	return( true );
-}
-
-/*****
- * Code to add categories via Ajax
- *****/
-Lifetype.UI.Pages.NewPost = function() {}
-
-/**
- * The following functions are called when clicking the "add category" button
- */
-Lifetype.UI.Pages.NewPost.addArticleCategoryAjax = function() 
-{
-	var categoryName = $F('newArticleCategory');
-	if (categoryName != '') {
-		var params = 'op=addArticleCategoryAjax' + '&categoryName=' + encodeURIComponent(categoryName);
-		
-		// build the full URL
-		var url = plogAdminBaseUrl + "?" + params;
-		
-		var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:Lifetype.UI.Pages.NewPost.addArticleCategoryOption, failure:Lifetype.UI.Pages.NewPost.addArticleCategoryOption } ); 
-		
-		// show the "loading" message
-		$( 'newArticleCategory' ).value = msgSaving;
-		$( 'addArticleCategory' ).disabled = 1;
-	}
-}
-
-/**
- * Callback for the 'add category' feature
- */
-Lifetype.UI.Pages.NewPost.addArticleCategoryOption = function(originalRequest)
-{
-	//put returned XML in the textarea
-	var msg = Lifetype.JSon.decode( originalRequest.responseText );
-	var success = msg.success;
-	var message = msg.message;
-	if (!success) {
-		window.alert(message);
-	}
-	else {
-		var catId = msg.result._id;
-		var catName = msg.result._name;
-	    for(i=$( 'postCategories' ).length; i>0; i--)
-	    {
-			tmpText = $( 'postCategories' ).options[i-1].text;
-			tmpValue = $( 'postCategories' ).options[i-1].value;
-			tmpSelected = $( 'postCategories' ).options[i-1].selected;
-			$( 'postCategories' ).options[i] = new Option( tmpText, tmpValue );
-			$( 'postCategories' ).options[i].selected = tmpSelected;
-	    }
-	    $( 'postCategories' ).options[0] = new Option( catName, catId );
-	    $( 'postCategories' ).options[0].selected = true;
-	    $( 'newArticleCategory' ).value = '';
-	    $( 'addArticleCategory' ).disabled = 0;
-	}
-}
-
-/**
- * Save the article via Ajax in the background
- */
-/**
- * The following functions are called when clicking the "save draft and continue" button
- */
-Lifetype.UI.Pages.NewPost.saveDraftArticleAjax = function()
-{
-	// if there is no category selected, then we won't save a draft!
-	form = document.getElementById( "newPost" );
-
-	if( form.postTopic.value == '' ) {
-		window.alert( msgErrorPostTopic );
-		return false;
-	}
-
-    // Can't use form.postText.value, becasue the form.postText.value still "null"
-    if( htmlAreaEnabled ) {
-		postText = tinyMCE.getContent('postText');
-	} else {
-		postText = form.postText.value;
-    }
-
-    if (postText == '') {
-		window.alert( msgErrorPostText );
-		return false;
-	}
-
-	if( !submitNewPost( form ))
-		return false;	
-
-    var formData = Lifetype.UI.Pages.NewPost.getPostEditFormElements( "newPost" );
-
-	var params = 'op=saveDraftArticleAjax&'+formData;
-	var url = plogAdminBaseUrl + "?" + params;
-	
-	var transaction = YAHOO.util.Connect.asyncRequest( 'GET', url, { success:Lifetype.UI.Pages.NewPost.saveDraftArticleResponse }); 
-}
-
-/**
- * Callback for the "save draft" functionality
- */
-Lifetype.UI.Pages.NewPost.saveDraftArticleResponse = function(originalRequest)
-{
-	// fetcth the json response
-	var msg = Lifetype.JSon.decode( originalRequest.responseText );
-	
-	var id = msg.result._id;
-	var message = msg.message;
-	$( 'postId' ).value = id;
-	window.alert(message);
-}
-
-/**
- * Gets all the fields from the "new post" form
- */
-Lifetype.UI.Pages.NewPost.getPostEditFormElements = function( formId )
-{
-	var formData = '';
-	
-	form = document.getElementById( formId );
-	
-	for(i = 0; i < form.elements.length; i++ ) {
-		itemName = form.elements[i].name;
-		itemValue = form.elements[i].value;
-		
-		if( itemName != "op" ) {
-			// we don't want to send more than one "op" parameter... do we?
-			if( itemName == "postCategories[]" ) {
-				// we need to have a special case for this one because it's a list that
-				// allows multiple selection... only using the "value" attribute will
-				// return one of the items and we would like to have them all
-				for (var j = 0; j < form.elements[i].options.length; j++) {
-					if (form.elements[i].options[j].selected) 
-						formData = formData + itemName + "=" + form.elements[i].options[j].value + "&";
-				}
-			}
-			else if( itemName == "postText" && htmlAreaEnabled ) {
-			    if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postText')) + "&";
-				} else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postText')) + "&";
-				}
-			}
-			else if( itemName == "postExtendedText" && htmlAreaEnabled ) {
-				if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postExtendedText')) + "&";
-			    } else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postExtendedText')) + "&";
-                }
-			}
-			else {
-				// for all other elements, normal handling
-				if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(itemValue) + "&";
-				} else {
-				    formData = formData + itemName + "=" + escape(itemValue) + "&";
-			    }
-			}
-		}
-    }	
-    
-    return formData;
 }
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/js/yui/animation/animation-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/animation/animation-min.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/yui/animation/animation-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,75 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}
+YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}
+var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}
+return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';}
+return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;}
+start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr]['by'][i];}}else{end=start+attributes[attr]['by'];}}
+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;this.runtimeAttributes[attr].unit=(isset(attributes[attr].unit))?attributes[attr]['unit']:this.getDefaultUnit(attr);},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}
+this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);};this.stop=function(finish){if(finish){this.currentFrame=this.totalFrames;this._onTween.fire();}
+YAHOO.util.AnimMgr.stop(this);};var onStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var attr in this.attributes){this.setRuntimeAttribute(attr);}
+isAnimated=true;actualFrames=0;startTime=new Date();};var onTween=function(){var data={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};data.toString=function(){return('duration: '+data.duration+', currentFrame: '+data.currentFrame);};this.onTween.fire(data);var runtimeAttributes=this.runtimeAttributes;for(var attr in runtimeAttributes){this.setAttribute(attr,this.doMethod(attr,runtimeAttributes[attr].start,runtimeAttributes[attr].end),runtimeAttributes[attr].unit);}
+actualFrames+=1;};var onComplete=function(){var actual_duration=(new Date()-startTime)/1000;var data={duration:actual_duration,frames:actualFrames,fps:actualFrames/actual_duration};data.toString=function(){return('duration: '+data.duration+', frames: '+data.frames+', fps: '+data.fps);};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};this._onStart=new YAHOO.util.CustomEvent('_start',this,true);this.onStart=new YAHOO.util.CustomEvent('start',this);this.onTween=new YAHOO.util.CustomEvent('tween',this);this._onTween=new YAHOO.util.CustomEvent('_tween',this,true);this.onComplete=new YAHOO.util.CustomEvent('complete',this);this._onComplete=new YAHOO.util.CustomEvent('_complete',this,true);this._onStart.subscribe(onStart);this._onTween.subscribe(onTween);this._onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=1000;this.delay=1;this.registerElement=function(tween){queue[queue.length]=tween;tweenC
 ount+=1;tween._onStart.fire();this.start();};this.unRegister=function(tween,index){tween._onComplete.fire();index=index||getIndex(tween);if(index!=-1){queue.splice(index,1);}
+tweenCount-=1;if(tweenCount<=0){this.stop();}};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[0].isAnimated()){this.unRegister(queue[0],0);}}
+queue=[];thread=null;tweenCount=0;}
+else{this.unRegister(tween);}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}
+if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)
+{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}
+tween._onTween.fire();}
+else{YAHOO.util.AnimMgr.stop(tween,i);}}};var getIndex=function(anim){for(var i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return i;}}
+return-1;};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}
+if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}
+tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}
+for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}
+return[tmp[0][0],tmp[0][1]];};};(function(){YAHOO.util.ColorAnim=function(el,attributes,duration,method){YAHOO.util.ColorAnim.superclass.constructor.call(this,el,attributes,duration,method);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var superclass=Y.ColorAnim.superclass;var proto=Y.ColorAnim.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("ColorAnim "+id);};proto.patterns.color=/color$/i;proto.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;proto.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;proto.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;proto.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;proto.parseColor=function(s){if(s.length==3){return s;}
+var c=this.patterns.hex.exec(s);if(c&&c.length==4){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];}
+c=this.patterns.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}
+c=this.patterns.hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}
+return null;};proto.getAttribute=function(attr){var el=this.getEl();if(this.patterns.color.test(attr)){var val=YAHOO.util.Dom.getStyle(el,attr);if(this.patterns.transparent.test(val)){var parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(parent&&this.patterns.transparent.test(val)){parent=parent.parentNode;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperCase()=='HTML'){val='#fff';}}}}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.doMethod=function(attr,start,end){var val;if(this.patterns.color.test(attr)){val=[];for(var i=0,len=start.length;i<len;++i){val[i]=superclass.doMethod.call(this,attr,start[i],end[i]);}
+val='rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')';}
+else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.setRuntimeAttribute=function(attr){superclass.setRuntimeAttribute.call(this,attr);if(this.patterns.color.test(attr)){var attributes=this.attributes;var start=this.parseColor(this.runtimeAttributes[attr].start);var end=this.parseColor(this.runtimeAttributes[attr].end);if(typeof attributes[attr]['to']==='undefined'&&typeof attributes[attr]['by']!=='undefined'){end=this.parseColor(attributes[attr].by);for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}
+this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
+return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}
+return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d)==1){return b+c;}
+if(!p){p=d*.3;}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d)==1){return b+c;}
+if(!p){p=d*.3;}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}
+if((t/=d/2)==2){return b+c;}
+if(!p){p=d*(.3*1.5);}
+if(!a||a<Math.abs(c)){a=c;var s=p/4;}
+else{var s=p/(2*Math.PI)*Math.asin(c/a);}
+if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
+return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
+if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}
+return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}
+return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}
+return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(function(){YAHOO.util.Motion=function(el,attributes,duration,method){if(el){YAHOO.util.Motion.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Motion.superclass;var proto=Y.Motion.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Motion "+id);};proto.patterns.points=/^points$/i;proto.setAttribute=function(attr,val,unit){if(this.patterns.points.test(attr)){unit=unit||'px';superclass.setAttribute.call(this,'left',val[0],unit);superclass.setAttribute.call(this,'top',val[1],unit);}else{superclass.setAttribute.call(this,attr,val,unit);}};proto.getAttribute=function(attr){if(this.patterns.points.test(attr)){var val=[superclass.getAttribute.call(this,'left'),superclass.getAttribute.call(this,'top')];}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.doMethod=function(attr,start,end){var val=null;if(this.patterns.points.test(attr)){var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.setRuntimeAttribute=function(attr){if(this.patterns.points.test(attr)){var el=this.getEl();var attributes=this.attributes;var start;var control=attributes['points']['control']||[];var end;var i,len;if(control.length>0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];}
+control=tmp;}
+if(Y.Dom.getStyle(el,'position')=='static'){Y.Dom.setStyle(el,'position','relative');}
+if(isset(attributes['points']['from'])){Y.Dom.setXY(el,attributes['points']['from']);}
+else{Y.Dom.setXY(el,Y.Dom.getXY(el));}
+start=this.getAttribute('points');if(isset(attributes['points']['to'])){end=translateValues.call(this,attributes['points']['to'],start);var pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;i<len;++i){control[i]=translateValues.call(this,control[i],start);}}else if(isset(attributes['points']['by'])){end=[start[0]+attributes['points']['by'][0],start[1]+attributes['points']['by'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}
+this.runtimeAttributes[attr]=[start];if(control.length>0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}
+this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}
+else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}
+return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}
+return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/connection/connection-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/connection/connection-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/connection/connection-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,12 +1,17 @@
 /*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 0.12.2
+version: 2.2.2
 */
-YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_header:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded',_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(id)
+
+YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded; charset=UTF-8',_use_default_xhr_header:true,_default_xhr_header:'XMLHttpRequest',_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function()
+{if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,'click',function(e){var obj=YAHOO.util.Event.getTarget(e);if(obj.type=='submit'){YAHOO.util.Connect._submitElementValue=encodeURIComponent(obj.name)+"="+encodeURIComponent(obj.value);}})
+return true;}
+return false;})(),setProgId:function(id)
 {this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)
-{this._use_default_post_header=b;},setPollingInterval:function(i)
+{this._use_default_post_header=b;},setDefaultXhrHeader:function(b)
+{this._use_default_xhr_header=b;},setPollingInterval:function(i)
 {if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)
 {var obj,http;try
 {http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}
@@ -23,45 +28,45 @@
 {return o;}},asyncRequest:function(method,uri,callback,postData)
 {var o=this.getConnectionObject();if(!o){return null;}
 else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri,postData);this.releaseObject(o);return;}
-if(method=='GET'){if(this._sFormData.length!=0){uri+=((uri.indexOf('?')==-1)?'?':'&')+this._sFormData;}
+if(method.toUpperCase()=='GET'){if(this._sFormData.length!=0){uri+=((uri.indexOf('?')==-1)?'?':'&')+this._sFormData;}
 else{uri+="?"+this._sFormData;}}
-else if(method=='POST'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}
-o.conn.open(method,uri,true);if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader('Content-Type',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}
-if(this._has_http_headers){this.setHeader(o);}
+else if(method.toUpperCase()=='POST'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}
+o.conn.open(method,uri,true);if(this._use_default_xhr_header){if(!this._default_headers['X-Requested-With']){this.initHeader('X-Requested-With',this._default_xhr_header,true);}}
+if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader('Content-Type',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}
+if(this._has_default_headers||this._has_http_headers){this.setHeader(o);}
 this.handleReadyState(o,callback);o.conn.send(postData||null);return o;}},handleReadyState:function(o,callback)
 {var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}
-this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState==4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}
+this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState===4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}
 oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)
 {if(!callback){this.releaseObject(o);return;}
 var httpStatus,responseObject;try
-{if(o.conn.status!==undefined&&o.conn.status!=0){httpStatus=o.conn.status;}
+{if(o.conn.status!==undefined&&o.conn.status!==0){httpStatus=o.conn.status;}
 else{httpStatus=13030;}}
 catch(e){httpStatus=13030;}
-if(httpStatus>=200&&httpStatus<300){try
-{responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
+if(httpStatus>=200&&httpStatus<300||httpStatus===1223){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
 else{callback.success.apply(callback.scope,[responseObject]);}}}
-catch(e){}}
-else{try
-{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
+else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
 else{callback.failure.apply(callback.scope,[responseObject]);}}
 break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
 else{callback.failure.apply(callback.scope,[responseObject]);}}}}
-catch(e){}}
 this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)
 {var obj={};var headerObj={};try
 {var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(':');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}
 catch(e){}
-obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
+obj.tId=o.tId;obj.status=(o.conn.status==1223)?204:o.conn.status;obj.statusText=(o.conn.status==1223)?"No Content":o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
 return obj;},createExceptionObject:function(tId,callbackArg,isAbort)
 {var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}
 else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}
 if(callbackArg){obj.argument=callbackArg;}
-return obj;},initHeader:function(label,value)
-{if(this._http_header[label]===undefined){this._http_header[label]=value;}
-else{this._http_header[label]=value+","+this._http_header[label];}
-this._has_http_headers=true;},setHeader:function(o)
-{for(var prop in this._http_header){if(this._http_header.hasOwnProperty(prop)){o.conn.setRequestHeader(prop,this._http_header[prop]);}}
-delete this._http_header;this._http_header={};this._has_http_headers=false;},setForm:function(formId,isUpload,secureUri)
+return obj;},initHeader:function(label,value,isDefault)
+{var headerObj=(isDefault)?this._default_headers:this._http_headers;if(headerObj[label]===undefined){headerObj[label]=value;}
+else{headerObj[label]=value+","+headerObj[label];}
+if(isDefault){this._has_default_headers=true;}
+else{this._has_http_headers=true;}},setHeader:function(o)
+{if(this._has_default_headers){for(var prop in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,prop)){o.conn.setRequestHeader(prop,this._default_headers[prop]);}}}
+if(this._has_http_headers){for(var prop in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,prop)){o.conn.setRequestHeader(prop,this._http_headers[prop]);}}
+delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers
+this._default_headers={};this._has_default_headers=false;},setForm:function(formId,isUpload,secureUri)
 {this.resetFormState();var oForm;if(typeof formId=='string'){oForm=(document.getElementById(formId)||document.forms[formId]);}
 else if(typeof formId=='object'){oForm=formId;}
 else{return;}
@@ -71,24 +76,24 @@
 {case'select-one':case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].attributes['value'].specified?oElement.options[j].value:oElement.options[j].text)+'&';}
 else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].hasAttribute('value')?oElement.options[j].value:oElement.options[j].text)+'&';}}}
 break;case'radio':case'checkbox':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
-break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit==false){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';hasSubmit=true;}
+break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit===false){if(this._hasSubmitListener){this._sFormData+=this._submitElementValue+'&';}
+else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
+hasSubmit=true;}
 break;default:this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';break;}}}
 this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId='yuiIO'+this._transaction_id;if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof secureUri=='boolean'){io.src='javascript:false';}
 else if(typeof secureURI=='string'){io.src=secureUri;}}
 else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
 io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},appendPostData:function(postData)
 {var formElements=[];var postMessage=postData.split('&');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf('=');if(delimitPos!=-1){formElements[i]=document.createElement('input');formElements[i].type='hidden';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}
-return formElements;},uploadFile:function(id,callback,uri,postData){var frameId='yuiIO'+id;var io=document.getElementById(frameId);this._formNode.action=uri;this._formNode.method='POST';this._formNode.target=frameId;if(this._formNode.encoding){this._formNode.encoding='multipart/form-data';}
-else{this._formNode.enctype='multipart/form-data';}
+return formElements;},uploadFile:function(id,callback,uri,postData){var frameId='yuiIO'+id;var uploadEncoding='multipart/form-data';var io=document.getElementById(frameId);this._formNode.setAttribute('action',uri);this._formNode.setAttribute('method','POST');this._formNode.setAttribute("target",frameId);if(this._formNode.encoding){this._formNode.encoding=uploadEncoding;}
+else{this._formNode.enctype=uploadEncoding;}
 if(postData){var oElements=this.appendPostData(postData);}
-this._formNode.submit();if(oElements&&oElements.length>0){try
-{for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}
-catch(e){}}
+this._formNode.submit();if(oElements&&oElements.length>0){for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}
 this.resetFormState();var uploadCallback=function()
 {var obj={};obj.tId=id;obj.argument=callback.argument;try
 {obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}
 catch(e){}
-if(callback.upload){if(!callback.scope){callback.upload(obj);}
+if(callback&&callback.upload){if(!callback.scope){callback.upload(obj);}
 else{callback.upload.apply(callback.scope,[obj]);}}
 if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);}
 else if(window.detachEvent){io.detachEvent('onload',uploadCallback);}
@@ -99,6 +104,6 @@
 {if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];}
 this.handleTransactionResponse(o,callback,true);return true;}
 else{return false;}},isCallInProgress:function(o)
-{if(o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;}
+{if(o.conn){return o.conn.readyState!==4&&o.conn.readyState!==0;}
 else{return false;}},releaseObject:function(o)
-{o.conn=null;o=null;}};
\ No newline at end of file
+{o.conn=null;o=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/container/assets/container.css
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/container/assets/container.css	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/container/assets/container.css	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,211 +1,233 @@
-/*
-Copyright (c) 2006, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-Version 0.11.4
-*/
-
-.overlay {
-	position:absolute;
-	display:block;
-}
-
-.tt {
-	visibility:hidden;
-	position:absolute;
-	color:#333;
-	background-color:#FDFFB4;
-	font-family:arial,helvetica,verdana,sans-serif;
-	padding:2px;
-	border:1px solid #FCC90D;
-	font:100% sans-serif;
-	width:auto;
-}
-
-* html body.masked select {
-	visibility:hidden;
-}
-
-* html div.panel-container select {
-	visibility:inherit;
-}
-
-* html div.drag select {
-	visibility:hidden;
-}
-
-* html div.hide-select select {
-	visibility:hidden;
-}
-
-.mask {
-	z-index:0;   
-	display:none;
-	position:absolute;
-	top:0;
-	left:0;
-	-moz-opacity: 0.5;
-	opacity:.50;
-	filter: alpha(opacity=50);
-	background-color:#CCC;
-}
-
-.hide-scrollbars * {
-	overflow:hidden;
-}
-
-.hide-scrollbars textarea, .hide-scrollbars select {
-	overflow:hidden;
-	display:none;
-}
-
-.show-scrollbars textarea, .show-scrollbars select {
-	overflow:visible;
-}
-
-.panel-container {
-	position:absolute;
-	background-color:transparent;
-	z-index:6;
-	visibility:hidden;
-	overflow:visible;
-	width:auto;
-}
-
-.panel-container.matte {
-	padding:3px;
-	background-color:#FFF;
-}
-
-.panel-container.matte .underlay {
-	display:none;
-}
-
-.panel-container.shadow {
-	padding:0px;
-	background-color:transparent;
-}
-
-.panel-container.shadow .underlay {
-	visibility:inherit;
-	position:absolute;
-	background-color:#CCC;
-	top:3px;left:3px;
-	z-index:0;
-	width:100%;
-	height:100%;
-	-moz-opacity: 0.7;
-	opacity:.70;
-	filter:alpha(opacity=70);
-	zoom:1;
-}
-
-.panel {
-	visibility:hidden;
-	border-collapse:separate;
-	position:relative;
-	left:0px;top:0px;
-	font:1em Arial;
-	background-color:#FFF;
-	border:1px solid #000;
-	z-index:1;
-	overflow:hidden;
-}
-
-.panel .hd {
-	background-color:#3d77cb;
-	color:#FFF;
-	font-size:100%;
-	line-height:100%;
-	border:1px solid #FFF;
-	border-bottom:1px solid #000;
-	font-weight:bold;
-	overflow:hidden;
-	padding:4px;
-}
-
-.panel .bd {
-	overflow:hidden;
-	padding:4px;
-}
-
-.panel .bd p {
-	margin:0 0 1em;
-}
-
-.panel .close {
-	position:absolute;
-	top:5px;
-	right:4px;
-	z-index:6;
-	height:12px;
-	width:12px;
-	margin:0px;
-	padding:0px;
-	background-repeat:no-repeat;
-	cursor:pointer;
-	visibility:inherit;
-}
-
-.panel .close.nonsecure {
-	background-image:url(http://us.i1.yimg.com/us.yimg.com/i/nt/ic/ut/alt3/close12_1.gif);
-}
-
-.panel .close.secure {
-	background-image:url(https://a248.e.akamai.net/sec.yimg.com/i/nt/ic/ut/alt3/close12_1.gif);
-}
-
-.panel .ft {
-	padding:4px;
-	overflow:hidden;
-}
-
-.simple-dialog .bd .icon {
-	background-repeat:no-repeat;
-	width:16px;
-	height:16px;
-	margin-right:10px;
-	float:left;
-}
-
-.dialog .ft, .simple-dialog .ft {
-	padding-bottom:5px;
-	padding-right:5px;
-	text-align:right;
-}
-
-.dialog form, .simple-dialog form {
-	margin:0;
-}
-
-.button-group button {
-	font:100 76% verdana;
-	text-decoration:none;
-	background-color: #E4E4E4;
-	color: #333;
-	cursor: hand;
-	vertical-align: middle;
-	border: 2px solid #797979;
-	border-top-color:#FFF;
-	border-left-color:#FFF;
-	margin:2px;
-	padding:2px;
-}
-
-.button-group button.default {
-	font-weight:bold;
-}
-
-.button-group button:hover, .button-group button.hover { 
-	border:2px solid #90A029;
-	background-color:#EBF09E;
-	border-top-color:#FFF;
-	border-left-color:#FFF;
-}
-
-.button-group button:active { 
-	border:2px solid #E4E4E4;
-	background-color:#BBB;
-	border-top-color:#333;
-	border-left-color:#333;
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+.yui-overlay {
+	position:absolute;
+	display:block;
+}
+
+.yui-tt {
+	visibility:hidden;
+	position:absolute;
+	color:#333;
+	background-color:#FDFFB4;
+	font-family:arial,helvetica,verdana,sans-serif;
+	padding:2px;
+	border:1px solid #FCC90D;
+	font:100% sans-serif;
+	width:auto;
+}
+
+* html body.masked select {
+	visibility:hidden;
+}
+
+* html div.yui-panel-container select {
+	visibility:inherit;
+}
+
+* html div.drag select {
+	visibility:hidden;
+}
+
+* html div.hide-select select {
+	visibility:hidden;
+}
+
+.mask {
+    z-index:0;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+    background-color:#CCC;
+}
+
+.hide-scrollbars * {
+	overflow:hidden;
+}
+
+.hide-scrollbars textarea, .hide-scrollbars select {
+	overflow:hidden;
+	display:none;
+}
+
+.show-scrollbars textarea, .show-scrollbars select {
+	overflow:visible;
+}
+
+.yui-panel-container {
+	position:absolute;
+	background-color:transparent;
+	z-index:6;
+	visibility:hidden;
+	overflow:visible;
+	width:auto;
+}
+
+.yui-panel-container.focused {
+}
+
+
+.yui-panel-container.matte {
+	padding:3px;
+	background-color:#FFF;
+}
+
+.yui-panel-container.matte .underlay {
+	display:none;
+}
+
+.yui-panel-container.shadow {
+	padding:0px;
+	background-color:transparent;
+}
+
+.yui-panel-container.shadow .underlay {
+	visibility:inherit;
+	position:absolute;
+	background-color:#000;
+	top:3px;left:3px;
+	z-index:0;
+	width:100%;
+	height:100%;
+    -moz-opacity: 0.12;
+    opacity:.12;
+    filter:alpha(opacity=12);
+	zoom:1;
+}
+
+.yui-panel {
+	visibility:hidden;
+	border-collapse:separate;
+	position:relative;
+	left:0px;top:0px;
+	font:1em Arial;
+	background-color:#FFF;
+	border:1px solid #000;
+	z-index:1;
+	overflow:hidden;
+}
+
+.yui-panel .hd {
+	background-color:#3d77cb;
+	color:#FFF;
+	font-size:100%;
+	line-height:100%;
+	border:1px solid #FFF;
+	border-bottom:1px solid #000;
+	font-weight:bold;
+	overflow:hidden;
+	padding:4px;
+}
+
+.yui-panel .bd {
+	overflow:hidden;
+	padding:4px;
+}
+
+.yui-panel .bd p {
+	margin:0 0 1em;
+}
+
+.yui-panel .container-close {
+	position:absolute;
+	top:5px;
+	right:4px;
+	z-index:6;
+	height:12px;
+	width:12px;
+	margin:0px;
+	padding:0px;
+	background:url(close12_1.gif) no-repeat;
+	cursor:pointer;
+	visibility:inherit;
+}
+
+.yui-panel .ft {
+	padding:4px;
+	overflow:hidden;
+}
+
+.yui-simple-dialog .bd .yui-icon {
+	background-repeat:no-repeat;
+	width:16px;
+	height:16px;
+	margin-right:10px;
+	float:left;
+}
+
+.yui-simple-dialog .bd span.blckicon {
+	background: url("blck16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.alrticon {
+	background: url("alrt16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.hlpicon {
+	background: url("hlp16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.infoicon {
+	background: url("info16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.warnicon {
+	background: url("warn16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.tipicon {
+	background: url("tip16_1.gif") no-repeat;
+}
+
+.yui-dialog .ft, 
+.yui-simple-dialog .ft {
+	padding-bottom:5px;
+	padding-right:5px;
+	text-align:right;
+}
+
+.yui-dialog form, 
+.yui-simple-dialog form {
+	margin:0;
+}
+
+.button-group button {
+	font:100 76% verdana;
+	text-decoration:none;
+	background-color: #E4E4E4;
+	color: #333;
+	cursor: hand;
+	vertical-align: middle;
+	border: 2px solid #797979;
+	border-top-color:#FFF;
+	border-left-color:#FFF;
+	margin:2px;
+	padding:2px;
+}
+
+.button-group button.default {
+	font-weight:bold;
+}
+
+.button-group button:hover, 
+.button-group button.hover {
+	border:2px solid #90A029;
+	background-color:#EBF09E;
+	border-top-color:#FFF;
+	border-left-color:#FFF;
+}
+
+.button-group button:active {
+	border:2px solid #E4E4E4;
+	background-color:#BBB;
+	border-top-color:#333;
+	border-left-color:#333;
 }
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/container/container-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/container/container-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/container/container-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,142 +1,162 @@
-/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.4 */
-YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};YAHOO.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(key,propertyObject){},getConfig:function(){},getProperty:function(key){},resetProperty:function(key){},setProperty:function(key,value,silent){},queueProperty:function(key,value){},refireEvent:function(key){},applyConfig:function(userConfig,init){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(key,handler,obj,override){},unsubscribeFromConfigEvent:function(key,handler,obj){},checkBoolean:function(val){if(typeof val=='boolean'){return true;}else{return false;}},checkNumber:function(val){if(isNaN(val)){return false;}else{return true;}}};YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent("configChanged");this.queueInProgress=false;var config={};var initialConfig={};var eventQueue=[];var fireEvent=function(key,value){
 key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){property.event.fire(value);}};this.addProperty=function(key,propertyObject){key=key.toLowerCase();config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner,true);}
-this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}};this.getConfig=function(){var cfg={};for(var prop in config){var property=config[prop];if(typeof property!='undefined'&&property.event){cfg[prop]=property.value;}}
-return cfg;};this.getProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.value;}else{return undefined;}};this.resetProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){this.setProperty(key,initialConfig[key].value);}else{return undefined;}};this.setProperty=function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=config[key];if(typeof property!='undefined'&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
-return true;}}else{return false;}}};this.queueProperty=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(typeof value!='undefined'&&property.validator&&!property.validator(value)){return false;}else{if(typeof value!='undefined'){property.value=value;}else{value=property.value;}
-var foundDuplicate=false;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey.toLowerCase()==key){eventQueue[i]=null;eventQueue.push([key,(typeof value!='undefined'?value:queueItemValue)]);foundDuplicate=true;break;}}}
-if(!foundDuplicate&&typeof value!='undefined'){eventQueue.push([key,value]);}}
-if(property.supercedes){for(var s=0;s<property.supercedes.length;s++){var supercedesCheck=property.supercedes[s];for(var q=0;q<eventQueue.length;q++){var queueItemCheck=eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey.toLowerCase()==supercedesCheck.toLowerCase()){eventQueue.push([queueItemCheckKey,queueItemCheckValue]);eventQueue[q]=null;break;}}}}}
-return true;}else{return false;}};this.refireEvent=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event&&typeof property.value!='undefined'){if(this.queueInProgress){this.queueProperty(key);}else{fireEvent(key,property.value);}}};this.applyConfig=function(userConfig,init){if(init){initialConfig=userConfig;}
-for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}};this.refresh=function(){for(var prop in config){this.refireEvent(prop);}};this.fireQueue=function(){this.queueInProgress=true;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=config[key];property.value=value;fireEvent(key,value);}}
-this.queueInProgress=false;eventQueue=[];};this.subscribeToConfigEvent=function(key,handler,obj,override){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
-return true;}else{return false;}};this.unsubscribeFromConfigEvent=function(key,handler,obj){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}};this.toString=function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
-return output;};this.outputEventQueue=function(){var output="";for(var q=0;q<eventQueue.length;q++){var queueItem=eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
-return output;};};YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
-return false;};YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}};YAHOO.widget.Module.IMG_ROOT="http://us.i1.yimg.com/us.yimg.com/i/";YAHOO.widget.Module.IMG_ROOT_SSL="https://a248.e.akamai.net/sec.yimg.com/i/";YAHOO.widget.Module.CSS_MODULE="module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL="javascript:false";YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,childNodesInDOM:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,beforeInitEvent:null,initEvent:null,appendEvent:null,beforeRenderEvent:null,renderEvent:null,changeHeaderEvent:null,changeBodyEvent:null,changeFooterEvent:null,changeContentEvent:null,destroyEvent:null,beforeShowEvent:null,showEvent:null,beforeHideEvent:null,hideEvent:null,initEvents:function(){this.beforeInitEvent=new YAHOO.util.CustomEvent("beforeInit");thi
 s.initEvent=new YAHOO.util.CustomEvent("init");this.appendEvent=new YAHOO.util.CustomEvent("append");this.beforeRenderEvent=new YAHOO.util.CustomEvent("beforeRender");this.renderEvent=new YAHOO.util.CustomEvent("render");this.changeHeaderEvent=new YAHOO.util.CustomEvent("changeHeader");this.changeBodyEvent=new YAHOO.util.CustomEvent("changeBody");this.changeFooterEvent=new YAHOO.util.CustomEvent("changeFooter");this.changeContentEvent=new YAHOO.util.CustomEvent("changeContent");this.destroyEvent=new YAHOO.util.CustomEvent("destroy");this.beforeShowEvent=new YAHOO.util.CustomEvent("beforeShow");this.showEvent=new YAHOO.util.CustomEvent("show");this.beforeHideEvent=new YAHOO.util.CustomEvent("beforeHide");this.hideEvent=new YAHOO.util.CustomEvent("hide");},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function()
 {var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty("visible",{value:true,handler:this.configVisible,validator:this.cfg.checkBoolean});this.cfg.addProperty("effect",{suppressEvent:true,supercedes:["visible"]});this.cfg.addProperty("monitorresize",{value:true,handler:this.configMonitorResize});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
-if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("DIV");el.id=elId;}}
-this.element=el;if(el.id){this.id=el.id;}
-var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
-this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
-this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;}
-resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth,nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
-if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",this.onDomResize,this,true);}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
-if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
-this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
-this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
-if(typeof bodyContent=="string")
-{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
-this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
-this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
-if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
-this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
-this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
-var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
-if(element){element.appendChild(me.element);me.appendEvent.fire();}};if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
-if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
-if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
-if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
-this.renderEvent.fire();return true;},destroy:function(){if(this.element){var parent=this.element.parentNode;}
-if(parent){parent.removeChild(this.element);}
-this.element=null;this.header=null;this.body=null;this.footer=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.util.Event.removeListener(this.resizeMonitor,"resize",this.onDomResize);this.resizeMonitor=null;}}};YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;};YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay.IFRAME_SRC="p
 romo/m/irs/blank.gif";YAHOO.widget.Overlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="overlay";YAHOO.widget.Overlay.prototype.beforeMoveEvent=null;YAHOO.widget.Overlay.prototype.moveEvent=null;YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
-if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
-this.initEvent.fire(YAHOO.widget.Overlay);};YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);this.beforeMoveEvent=new YAHOO.util.CustomEvent("beforeMove",this);this.moveEvent=new YAHOO.util.CustomEvent("move",this);};YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty("x",{handler:this.configX,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("y",{handler:this.configY,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("xy",{handler:this.configXY,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("context",{handler:this.configContext,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("fixedcenter",{value:false,handler:this.configFixedCenter,validator:this.cfg.checkBoolean,supercedes:["iframe","visible"]});this.cfg.add
 Property("width",{handler:this.configWidth,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("height",{handler:this.configHeight,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("zIndex",{value:null,handler:this.configzIndex});this.cfg.addProperty("constraintoviewport",{value:false,handler:this.configConstrainToViewport,validator:this.cfg.checkBoolean,supercedes:["iframe","x","y","xy"]});this.cfg.addProperty("iframe",{value:(this.browser=="ie"?true:false),handler:this.configIframe,validator:this.cfg.checkBoolean,supercedes:["zIndex"]});};YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);};YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");};YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass
 (this.element,"show-scrollbars");};YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility");var effect=this.cfg.getProperty("effect");var effectInstances=[];if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
-var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
-if(effect){if(visible){if(currentVis!="visible"){this.beforeShowEvent.fire();for(var j=0;j<effectInstances.length;j++){var e=effectInstances[j];if(j===0&&!YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
-e.animateIn();}}}}else{if(currentVis!="visible"){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
-if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var k=0;k<effectInstances.length;k++){var h=effectInstances[k];if(k===0&&!YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
-h.animateOut();}}}else{if(currentVis=="visible"){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}};YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}};YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}};YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
-if(this.iframe){if(zIndex<=0){zIndex=1;}
-YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
-YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);};YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.before
 MoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.showIframe=function(){if(this.iframe){this.iframe.style.display="block";}}
-YAHOO.widget.Overlay.prototype.hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}}
-YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showIframe,this)){this.showEvent.subscribe(this.showIframe,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideIframe,this)){this.hideEvent.subscribe(this.hideIframe,this,true);}
-var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
-if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=this.imageRoot+YAHOO.widget.Overlay.IFRAME_SRC;}
-var parent=this.element.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
-YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){this.showIframe();}else{this.hideIframe();}}
-var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
-YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=this.element.clientWidth;var height=this.element.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
-this.showEvent.unsubscribe(this.showIframe,this);this.hideEvent.unsubscribe(this.hideIframe,this);}};YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}};YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
-if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}};YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
-if(!contextAlign){contextAlign=contextArgs[2];}
-if(element&&context){var elementRegion=YAHOO.util.Dom.getRegion(element);var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}};switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}};YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=p
 os[1];var offsetHeight=this.element.offsetHeight;var offsetWidth=this.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
-if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
-this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);};YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.element.style.left=parseInt(x,10)+"px";this.element.style.top=parseInt(y,10)+"px";this.syncPosition();this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);};YAHOO.widget.Overlay.prototype.onDomResize=funct
 ion(e,obj){YAHOO.widget.Overlay.superclass.onDomResize.call(this,e,obj);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
-this.iframe=null;YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;};YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){YAHOO.widget.Overlay.windowScrollEvent.fire();};YAHOO.widget.Overlay.windowResizeHandler=function(e){YAHOO.widget.Overlay.windowResizeEvent.fire();};YAHOO.widget.Overlay._initialized=null;if(YAHOO.widget.Overlay._initialized===null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
-YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},getActive:function(){},focus:function(overlay){},remove:function(overlay){},blurAll:function(){},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
-this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){this.blurAll();activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex,10)+2));}
-this.overlays.sort(this.compareZIndexDesc);}};this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){activeOverlay=null;for(var o=0;o<this.overlays.length;o++){YAHOO.util.Dom.removeClass(this.overlays[o].element,YAHOO.widget.OverlayManager.CSS_FOCUSED);}};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
-if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus");overlay.blurEvent=new YAHOO.util.CustomEvent("blur");var mgr=this;overlay.focus=function(){mgr.focus(this);this.focusEvent.fire();};overlay.blur=function(){mgr.blurAll();this.blurEvent.fire();};var focusOnDomEvent=function(e,obj){overlay.focus();};var focusevent=this.cfg.getProperty("focusevent");YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.setProperty("zIndex",0);}
-this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
-if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var p=0;p<this.overlays.length;p++){if(this.overlays[p].id==overlay){return this.overlays[p];}}}
-return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
-var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
-if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
-function handleKeyPress(e,obj){var keyPressed=e.charCode||e.keyCode;if(!keyData.shift){keyData.shift=false;}
-if(!keyData.alt){keyData.alt=false;}
-if(!keyData.ctrl){keyData.ctrl=false;}
-if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){if(keyPressed==keyData.keys[i]){keyEvent.fire(keyPressed,e);break;}}}else{if(keyPressed==keyData.keys){keyEvent.fire(keyPressed,e);}}}}
-this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
-this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
-this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.prototype.enabled=null;YAHOO.util.KeyListener.prototype.enable=function(){};YAHOO.util.KeyListener.prototype.disable=function(){};YAHOO.util.KeyListener.prototype.enabledEvent=null;YAHOO.util.KeyListener.prototype.disabledEvent=null;YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Tooltip,YAHOO.widget.Overlay);YAHOO.widget.Tooltip.CSS_TOOLTIP="tt";YAHOO.widget.Tooltip.prototype.init=function(el,userConfig){if(document.readyState&&document.readyState!="complete"){var deferredInit=function(){this.init(el,userConfig);};YAHOO.util.Event.addListener(window,"load",deferredInit,this,true);}else{YAHOO.widget.Tooltip.superclass.init.call(this,el);this.
 beforeInitEvent.fire(YAHOO.widget.Tooltip);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true);}
-this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.render(this.cfg.getProperty("container"));this.initEvent.fire(YAHOO.widget.Tooltip);}};YAHOO.widget.Tooltip.prototype.initDefaultConfig=function(){YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty("preventoverlap",{value:true,validator:this.cfg.checkBoolean,supercedes:["x","y","xy"]});this.cfg.addProperty("showdelay",{value:200,handler:this.configShowDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("autodismissdelay",{value:5000,handler:this.configAutoDismissDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("hidedelay",{value:250,handler:this.configHideDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("text",{handler:this.configText,suppressEvent:true});this.cfg.addProperty("container",{value:document.body,handler:this.configContainer});};YAHOO.widget.Tooltip.prototype.configText=function(type,args,obj
 ){var text=args[0];if(text){this.setBody(text);}};YAHOO.widget.Tooltip.prototype.configContainer=function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true);}};YAHOO.widget.Tooltip.prototype.configContext=function(type,args,obj){var context=args[0];if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true);}else{this.cfg.setProperty("context",[context],true);}
-context=this.cfg.getProperty("context");}
-if(this._context){for(var c=0;c<this._context.length;++c){var el=this._context[c];YAHOO.util.Event.removeListener(el,"mouseover",this.onContextMouseOver);YAHOO.util.Event.removeListener(el,"mousemove",this.onContextMouseMove);YAHOO.util.Event.removeListener(el,"mouseout",this.onContextMouseOut);}}
-this._context=context;for(var d=0;d<this._context.length;++d){var el2=this._context[d];YAHOO.util.Event.addListener(el2,"mouseover",this.onContextMouseOver,this);YAHOO.util.Event.addListener(el2,"mousemove",this.onContextMouseMove,this);YAHOO.util.Event.addListener(el2,"mouseout",this.onContextMouseOut,this);}}};YAHOO.widget.Tooltip.prototype.onContextMouseMove=function(e,obj){obj.pageX=YAHOO.util.Event.getPageX(e);obj.pageY=YAHOO.util.Event.getPageY(e);};YAHOO.widget.Tooltip.prototype.onContextMouseOver=function(e,obj){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
-var context=this;YAHOO.util.Event.addListener(context,"mousemove",obj.onContextMouseMove,obj);if(context.title){obj._tempTitle=context.title;context.title="";}
-obj.showProcId=obj.doShow(e,context);};YAHOO.widget.Tooltip.prototype.onContextMouseOut=function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null;}
-if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null;}
-if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
-obj.hideProcId=setTimeout(function(){obj.hide();},obj.cfg.getProperty("hidedelay"));};YAHOO.widget.Tooltip.prototype.doShow=function(e,context){var yOffset=25;if(this.browser=="opera"&&context.tagName=="A"){yOffset+=12;}
-var me=this;return setTimeout(function(){if(me._tempTitle){me.setBody(me._tempTitle);}else{me.cfg.refireEvent("text");}
-me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY);}
-YAHOO.util.Event.removeListener(context,"mousemove",me.onContextMouseMove);me.show();me.hideProcId=me.doHide();},this.cfg.getProperty("showdelay"));};YAHOO.widget.Tooltip.prototype.doHide=function(){var me=this;return setTimeout(function(){me.hide();},this.cfg.getProperty("autodismissdelay"));};YAHOO.widget.Tooltip.prototype.preventOverlap=function(pageX,pageY){var height=this.element.offsetHeight;var elementRegion=YAHOO.util.Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;var mousePoint=new YAHOO.util.Point(pageX,pageY);if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5));}};YAHOO.widget.Tooltip.prototype.toString=function(){return"Tooltip "+this.id;};YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Panel,YAHOO.widget.Overlay);YAHOO.widget.Panel.CSS_PANEL="panel";YAHOO.widget.Panel.CSS_PAN
 EL_CONTAINER="panel-container";YAHOO.widget.Panel.prototype.showMaskEvent=null;YAHOO.widget.Panel.prototype.hideMaskEvent=null;YAHOO.widget.Panel.prototype.init=function(el,userConfig){YAHOO.widget.Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Panel);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true);}
-this.beforeRenderEvent.subscribe(function(){var draggable=this.cfg.getProperty("draggable");if(draggable){if(!this.header){this.setHeader("&nbsp;");}}},this,true);var me=this;this.showMaskEvent.subscribe(function(){var checkFocusable=function(el){if(el.tagName=="A"||el.tagName=="BUTTON"||el.tagName=="SELECT"||el.tagName=="INPUT"||el.tagName=="TEXTAREA"||el.tagName=="FORM"){if(!YAHOO.util.Dom.isAncestor(me.element,el)){YAHOO.util.Event.addListener(el,"focus",el.blur);return true;}}else{return false;}};this.focusableElements=YAHOO.util.Dom.getElementsBy(checkFocusable);},this,true);this.hideMaskEvent.subscribe(function(){for(var i=0;i<this.focusableElements.length;i++){var el2=this.focusableElements[i];YAHOO.util.Event.removeListener(el2,"focus",el2.blur);}},this,true);this.initEvent.fire(YAHOO.widget.Panel);};YAHOO.widget.Panel.prototype.initEvents=function(){YAHOO.widget.Panel.superclass.initEvents.call(this);this.showMaskEvent=new YAHOO.util.CustomEvent("showMask");this.hid
 eMaskEvent=new YAHOO.util.CustomEvent("hideMask");this.dragEvent=new YAHOO.util.CustomEvent("drag");};YAHOO.widget.Panel.prototype.initDefaultConfig=function(){YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty("close",{value:true,handler:this.configClose,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("draggable",{value:true,handler:this.configDraggable,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("underlay",{value:"shadow",handler:this.configUnderlay,supercedes:["visible"]});this.cfg.addProperty("modal",{value:false,handler:this.configModal,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("keylisteners",{handler:this.configKeyListeners,suppressEvent:true,supercedes:["visible"]});};YAHOO.widget.Panel.prototype.configClose=function(type,args,obj){var val=args[0];var doHide=function(e,obj){obj.hide();};if(val){if(!this.close){this.close=document.createEleme
 nt("DIV");YAHOO.util.Dom.addClass(this.close,"close");if(this.isSecure){YAHOO.util.Dom.addClass(this.close,"secure");}else{YAHOO.util.Dom.addClass(this.close,"nonsecure");}
-this.close.innerHTML="&nbsp;";this.innerElement.appendChild(this.close);YAHOO.util.Event.addListener(this.close,"click",doHide,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}};YAHOO.widget.Panel.prototype.configDraggable=function(type,args,obj){var val=args[0];if(val){if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","move");this.registerDragDrop();}}else{if(this.dd){this.dd.unreg();}
-if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","auto");}}};YAHOO.widget.Panel.prototype.configUnderlay=function(type,args,obj){var val=args[0];switch(val.toLowerCase()){case"shadow":YAHOO.util.Dom.removeClass(this.element,"matte");YAHOO.util.Dom.addClass(this.element,"shadow");if(!this.underlay){this.underlay=document.createElement("DIV");this.underlay.className="underlay";this.underlay.innerHTML="&nbsp;";this.element.appendChild(this.underlay);}
-this.sizeUnderlay();break;case"matte":YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.addClass(this.element,"matte");break;default:YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.removeClass(this.element,"matte");break;}};YAHOO.widget.Panel.prototype.configModal=function(type,args,obj){var modal=args[0];if(modal){this.buildMask();if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMask,this)){this.showEvent.subscribe(this.showMask,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMask,this)){this.hideEvent.subscribe(this.hideMask,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.sizeMask,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.destroyEvent,this.removeMask,this)){this.destroyEvent.subscribe(this.removeMask,this,true);}}else{this.beforeShowEvent.unsubscribe(this.showMask,this);this.hideEvent.unsubscribe(this.hideMask,this);YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.destroyEvent.unsubscribe(this.removeMask,this);}};YAHOO.widget.Panel.prototype.removeMask=function(){if(this.mask){if(this.mask.parentNode){this.mask.parentNode.removeChild(this.mask);}
-this.mask=null;}}
-YAHOO.widget.Panel.prototype.configKeyListeners=function(type,args,obj){var listeners=args[0];if(listeners){if(listeners instanceof Array){for(var i=0;i<listeners.length;i++){var listener=listeners[i];if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true);}}}else{if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true);}}}};YAHOO.widget.Panel.prototype.buildWrapper=function(){var elementParent=this.element.parentNode;var elementClone=this.element.cloneNode(true);this.innerElement=elementClone;this.innerElement.style.visibility="inherit";YAHOO.util.Dom.addClass(this.innerElement,YAHOO.widget.Panel.CSS_PANEL);var wrapper=document.createElement("DIV");wrapper.className=YAHOO.widget.Panel.CSS_PANEL_CONTAINER;wrapper.id=elementClone.id+"_c";wrapper.appendChild(elementClone);if(elementParent){elementParent.replaceChild(wrapper,this.element);}
-this.element=wrapper;var childNodes=this.innerElement.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
-this.initDefaultConfig();};YAHOO.widget.Panel.prototype.sizeUnderlay=function(){if(this.underlay&&this.browser!="gecko"&&this.browser!="safari"){this.underlay.style.width=this.innerElement.offsetWidth+"px";this.underlay.style.height=this.innerElement.offsetHeight+"px";}};YAHOO.widget.Panel.prototype.onDomResize=function(e,obj){YAHOO.widget.Panel.superclass.onDomResize.call(this,e,obj);var me=this;setTimeout(function(){me.sizeUnderlay();},0);};YAHOO.widget.Panel.prototype.registerDragDrop=function(){if(this.header){this.dd=new YAHOO.util.DD(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h";}
-var me=this;this.dd.startDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.addClass(me.element,"drag");}
-if(me.cfg.getProperty("constraintoviewport")){var offsetHeight=me.element.offsetHeight;var offsetWidth=me.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=window.scrollX||document.documentElement.scrollLeft;var scrollY=window.scrollY||document.documentElement.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;this.minX=leftConstraint;this.maxX=rightConstraint;this.constrainX=true;this.minY=topConstraint;this.maxY=bottomConstraint;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}
-me.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&this.browser=="gecko"){this.showMacGeckoScrollbars();}
-me.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.removeClass(me.element,"drag");}
-me.dragEvent.fire("endDrag",arguments);};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}};YAHOO.widget.Panel.prototype.buildMask=function(){if(!this.mask){this.mask=document.createElement("DIV");this.mask.id=this.id+"_mask";this.mask.className="mask";this.mask.innerHTML="&nbsp;";var maskClick=function(e,obj){YAHOO.util.Event.stopEvent(e);};var firstChild=document.body.firstChild;if(firstChild){document.body.insertBefore(this.mask,document.body.firstChild);}else{document.body.appendChild(this.mask);}}};YAHOO.widget.Panel.prototype.hideMask=function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();YAHOO.util.Dom.removeClass(document.body,"masked");}};YAHOO.widget.Panel.prototype.showMask=function(){if(this.cfg.getProperty("modal")&&this.mask){YAHOO.util.Dom.addClass(document.body,"masked");this.sizeMask();this.mask
 .style.display="block";this.showMaskEvent.fire();}};YAHOO.widget.Panel.prototype.sizeMask=function(){if(this.mask){this.mask.style.height=YAHOO.util.Dom.getDocumentHeight()+"px";this.mask.style.width=YAHOO.util.Dom.getDocumentWidth()+"px";}};YAHOO.widget.Panel.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");};YAHOO.widget.Panel.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");};YAHOO.widget.Panel.prototype.render=function(appendToNode){return YAHOO.widget.Panel.superclass.render.call(this,appendToNode,this.innerElement);};YAHOO.widget.Panel.prototype.toString=function(){return"Panel "+this.id;};YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.cal
 l(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Dialog,YAHOO.widget.Panel);YAHOO.widget.Dialog.CSS_DIALOG="dialog";YAHOO.widget.Dialog.prototype.beforeSubmitEvent=null;YAHOO.widget.Dialog.prototype.submitEvent=null;YAHOO.widget.Dialog.prototype.manualSubmitEvent=null;YAHOO.widget.Dialog.prototype.asyncSubmitEvent=null;YAHOO.widget.Dialog.prototype.formSubmitEvent=null;YAHOO.widget.Dialog.prototype.cancelEvent=null;YAHOO.widget.Dialog.prototype.initDefaultConfig=function(){YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.doSubmit=function(){var method=this.cfg.getProperty("postmethod");switch(method){case"async":YAHOO.util.Connect.setForm(this.form);var cObj=YAHOO.util.Connect.asyncRequest('POST',this.form.action,this.callback);this.asyncSubmitEvent.fire();break;case"form":this.form.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}};this.cfg.addProp
 erty("postmethod",{value:"async",validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false;}else{return true;}}});this.cfg.addProperty("buttons",{value:"none",handler:this.configButtons});};YAHOO.widget.Dialog.prototype.initEvents=function(){YAHOO.widget.Dialog.superclass.initEvents.call(this);this.beforeSubmitEvent=new YAHOO.util.CustomEvent("beforeSubmit");this.submitEvent=new YAHOO.util.CustomEvent("submit");this.manualSubmitEvent=new YAHOO.util.CustomEvent("manualSubmit");this.asyncSubmitEvent=new YAHOO.util.CustomEvent("asyncSubmit");this.formSubmitEvent=new YAHOO.util.CustomEvent("formSubmit");this.cancelEvent=new YAHOO.util.CustomEvent("cancel");};YAHOO.widget.Dialog.prototype.init=function(el,userConfig){YAHOO.widget.Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Dialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.ap
 plyConfig(userConfig,true);}
-this.renderEvent.subscribe(this.registerForm,this,true);this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.beforeRenderEvent.subscribe(function(){var buttonCfg=this.cfg.getProperty("buttons");if(buttonCfg&&buttonCfg!="none"){if(!this.footer){this.setFooter("");}}},this,true);this.initEvent.fire(YAHOO.widget.Dialog);};YAHOO.widget.Dialog.prototype.registerForm=function(){var form=this.element.getElementsByTagName("FORM")[0];if(!form){var formHTML="<form name=\"frm_"+this.id+"\" action=\"\"></form>";this.body.innerHTML+=formHTML;form=this.element.getElementsByTagName("FORM")[0];}
-this.firstFormElement=function(){for(var f=0;f<form.elements.length;f++){var el=form.elements[f];if(el.focus){if(el.type&&el.type!="hidden"){return el;}}}
-return null;}();this.lastFormElement=function(){for(var f=form.elements.length-1;f>=0;f--){var el=form.elements[f];if(el.focus){if(el.type&&el.type!="hidden"){return el;}}}
-return null;}();this.form=form;if(this.cfg.getProperty("modal")&&this.form){var me=this;var firstElement=this.firstFormElement||this.firstButton;if(firstElement){this.preventBackTab=new YAHOO.util.KeyListener(firstElement,{shift:true,keys:9},{fn:me.focusLast,scope:me,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}
-var lastElement=this.lastButton||this.lastFormElement;if(lastElement){this.preventTabOut=new YAHOO.util.KeyListener(lastElement,{shift:false,keys:9},{fn:me.focusFirst,scope:me,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}};YAHOO.widget.Dialog.prototype.configButtons=function(type,args,obj){var buttons=args[0];if(buttons!="none"){this.buttonSpan=null;this.buttonSpan=document.createElement("SPAN");this.buttonSpan.className="button-group";for(var b=0;b<buttons.length;b++){var button=buttons[b];var htmlButton=document.createElement("BUTTON");htmlButton.setAttribute("type","button");if(button.isDefault){htmlButton.className="default";this.defaultHtmlButton=htmlButton;}
-htmlButton.appendChild(document.createTextNode(button.text));YAHOO.util.Event.addListener(htmlButton,"click",button.handler,this,true);this.buttonSpan.appendChild(htmlButton);button.htmlButton=htmlButton;if(b===0){this.firstButton=button.htmlButton;}
-if(b==(buttons.length-1)){this.lastButton=button.htmlButton;}}
-this.setFooter(this.buttonSpan);this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");}else{if(this.buttonSpan){if(this.buttonSpan.parentNode){this.buttonSpan.parentNode.removeChild(this.buttonSpan);}
-this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}};YAHOO.widget.Dialog.prototype.configOnSuccess=function(type,args,obj){};YAHOO.widget.Dialog.prototype.configOnFailure=function(type,args,obj){};YAHOO.widget.Dialog.prototype.doSubmit=function(){};YAHOO.widget.Dialog.prototype.focusFirst=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
-if(this.firstFormElement){this.firstFormElement.focus();}else{this.focusDefaultButton();}};YAHOO.widget.Dialog.prototype.focusLast=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
-var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){this.focusLastButton();}else{if(this.lastFormElement){this.lastFormElement.focus();}}};YAHOO.widget.Dialog.prototype.focusDefaultButton=function(){if(this.defaultHtmlButton){this.defaultHtmlButton.focus();}};YAHOO.widget.Dialog.prototype.blurButtons=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.blur();}}};YAHOO.widget.Dialog.prototype.focusFirstButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.focus();}}};YAHOO.widget.Dialog.prototype.focusLastButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[buttons.length-1].htmlButton;if(html){html.focus();}}};YAHOO.widget.Dialog.prototype.validate=function(){return true;};YAHOO.widget.Dialog.prototype.submit
 =function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}};YAHOO.widget.Dialog.prototype.cancel=function(){this.cancelEvent.fire();this.hide();};YAHOO.widget.Dialog.prototype.getData=function(){var form=this.form;var data={};if(form){for(var i in this.form){var formItem=form[i];if(formItem){if(formItem.tagName){switch(formItem.tagName){case"INPUT":switch(formItem.type){case"checkbox":data[i]=formItem.checked;break;case"textbox":case"text":case"hidden":data[i]=formItem.value;break;}
-break;case"TEXTAREA":data[i]=formItem.value;break;case"SELECT":var val=[];for(var x=0;x<formItem.options.length;x++){var option=formItem.options[x];if(option.selected){var selval=option.value;if(!selval||selval===""){selval=option.text;}
-val[val.length]=selval;}}
-data[i]=val;break;}}else if(formItem[0]&&formItem[0].tagName){switch(formItem[0].tagName){case"INPUT":switch(formItem[0].type){case"radio":for(var r=0;r<formItem.length;r++){var radio=formItem[r];if(radio.checked){data[radio.name]=radio.value;break;}}
-break;case"checkbox":var cbArray=[];for(var c=0;c<formItem.length;c++){var check=formItem[c];if(check.checked){cbArray[cbArray.length]=check.value;}}
-data[formItem[0].name]=cbArray;break;}}}}}}
-return data;};YAHOO.widget.Dialog.prototype.toString=function(){return"Dialog "+this.id;};YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.SimpleDialog,YAHOO.widget.Dialog);YAHOO.widget.SimpleDialog.ICON_BLOCK="nt/ic/ut/bsc/blck16_1.gif";YAHOO.widget.SimpleDialog.ICON_ALARM="nt/ic/ut/bsc/alrt16_1.gif";YAHOO.widget.SimpleDialog.ICON_HELP="nt/ic/ut/bsc/hlp16_1.gif";YAHOO.widget.SimpleDialog.ICON_INFO="nt/ic/ut/bsc/info16_1.gif";YAHOO.widget.SimpleDialog.ICON_WARN="nt/ic/ut/bsc/warn16_1.gif";YAHOO.widget.SimpleDialog.ICON_TIP="nt/ic/ut/bsc/tip16_1.gif";YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG="simple-dialog";YAHOO.widget.SimpleDialog.prototype.initDefaultConfig=function(){YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty("icon",{value:"none",handler:this.configIcon,suppressEvent:true});this.cfg.addProperty("text",{value:"",handler:this.co
 nfigText,suppressEvent:true,supercedes:["icon"]});};YAHOO.widget.SimpleDialog.prototype.init=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true);}
-this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(YAHOO.widget.SimpleDialog);};YAHOO.widget.SimpleDialog.prototype.registerForm=function(){YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";};YAHOO.widget.SimpleDialog.prototype.configIcon=function(type,args,obj){var icon=args[0];if(icon&&icon!="none"){var iconHTML="<img src=\""+this.imageRoot+icon+"\" class=\"icon\" />";this.body.innerHTML=iconHTML+this.body.innerHTML;}};YAHOO.widget.SimpleDialog.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}};YAHOO.widget.SimpleDialog.prototype.toString=function(){return"SimpleDialog "+this.id;};YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;}
-this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;};YAHOO.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new YAHOO.util.CustomEvent("beforeAnimateIn");this.beforeAnimateOutEvent=new YAHOO.util.CustomEvent("beforeAnimateOut");this.animateInCompleteEvent=new YAHOO.util.CustomEvent("animateInComplete");this.animateOutCompleteEvent=new YAHOO.util.CustomEvent("animateOutComplete");this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.ani
 mOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);};YAHOO.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate();};YAHOO.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.toString=function(){var output="ContainerEffect";if(this.ove
 rlay){output+=" ["+this.overlay.toString()+"]";}
-return output;};YAHOO.widget.ContainerEffect.FADE=function(overlay,dur){var fade=new YAHOO.widget.ContainerEffect(overlay,{attributes:{opacity:{from:0,to:1}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element);fade.handleStartAnimateIn=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
-if(obj.overlay.underlay){obj.initialUnderlayOpacity=YAHOO.util.Dom.getStyle(obj.overlay.underlay,"opacity");obj.overlay.underlay.style.filter=null;}
-YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
-if(obj.overlay.underlay){YAHOO.util.Dom.setStyle(obj.overlay.underlay,"opacity",obj.initialUnderlayOpacity);}
-obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(obj.overlay.underlay){obj.overlay.underlay.style.filter=null;}};fade.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
-YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",1);obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};YAHOO.widget.ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||YAHOO.util.Dom.getX(overlay.element);var y=overlay.cfg.getProperty("y")||YAHOO.util.Dom.getY(overlay.element);var clientWidth=YAHOO.util.Dom.getClientWidth();var offsetWidth=overlay.element.offsetWidth;var slide=new YAHOO.widget.ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=(-25-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";};slide.handleTweenAnimateIn=function(type,args,obj){var pos=YAHOO.ut
 il.Dom.getXY(obj.overlay.element);var currentX=pos[0];var currentY=pos[1];if(YAHOO.util.Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");}
-obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};slide.handleStartAnimateOut=function(type,args,obj){var clientWidth=YAHOO.util.Dom.getViewportWidth();var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var x=pos[0];var y=pos[1];var currentTo=obj.animOut.attributes.points.to;obj.animOut.attributes.points.to=[(clientWidth+25),y];};slide.handleTweenAnimateOut=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var x=pos[0];var y=pos[1];obj.overlay.cfg.setProperty("xy",[x,y],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");var offsetWidth=obj.overlay.element.offsetWidth;obj.overlay.cfg.setProperty
 ("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();return slide;};
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};YAHOO.util.Config.CONFIG_CHANGED_EVENT="configChanged";YAHOO.util.Config.BOOLEAN_TYPE="boolean";YAHOO.util.Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,checkBoolean:function(val){return(typeof val==YAHOO.util.Config.BOOLEAN_TYPE);},checkNumber:function(val){return(!isNaN(val));},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value);}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key,this.owner);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner);}
+this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}},getConfig:function(){var cfg={};for(var prop in this.config){var property=this.config[prop];if(property&&property.event){cfg[prop]=property.value;}}
+return cfg;},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value;}else{return undefined;}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!YAHOO.lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);}
+return true;}else{return false;}},setProperty:function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
+return true;}}else{return false;}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(!YAHOO.lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false;}else{if(!YAHOO.lang.isUndefined(value)){property.value=value;}else{value=property.value;}
+var foundDuplicate=false;var iLen=this.eventQueue.length;for(var i=0;i<iLen;i++){var queueItem=this.eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!YAHOO.lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break;}}}
+if(!foundDuplicate&&!YAHOO.lang.isUndefined(value)){this.eventQueue.push([key,value]);}}
+if(property.supercedes){var sLen=property.supercedes.length;for(var s=0;s<sLen;s++){var supercedesCheck=property.supercedes[s];var qLen=this.eventQueue.length;for(var q=0;q<qLen;q++){var queueItemCheck=this.eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break;}}}}}
+return true;}else{return false;}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!YAHOO.lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key);}else{this.fireEvent(key,property.value);}}},applyConfig:function(userConfig,init){if(init){this.initialConfig=userConfig;}
+for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}},refresh:function(){for(var prop in this.config){this.refireEvent(prop);}},fireQueue:function(){this.queueInProgress=true;for(var i=0;i<this.eventQueue.length;i++){var queueItem=this.eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=this.config[key];property.value=value;this.fireEvent(key,value);}}
+this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
+return true;}else{return false;}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
+return output;},outputEventQueue:function(){var output="";for(var q=0;q<this.eventQueue.length;q++){var queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
+return output;}};YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent(YAHOO.util.CONFIG_CHANGED_EVENT,this);this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];};YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
+return false;};YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}else{}};YAHOO.widget.Module.IMG_ROOT=null;YAHOO.widget.Module.IMG_ROOT_SSL=null;YAHOO.widget.Module.CSS_MODULE="yui-module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";YAHOO.widget.Module.textResizeEvent=new YAHOO.util.CustomEvent("textResize");YAHOO.widget.Module._EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"};YAHOO.widget.Module._DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes
 :["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true}};YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,initEvents:function(){var EVENT_TYPES=YAHOO.widget.Module._EVENT_TYPES;this.beforeInitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_INIT,this);this.initEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.INIT,this);this.appendEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.APPEND,this);this.beforeRenderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_RENDER,this);this.renderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.RENDER,this);this.changeHeaderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_HEADER,this);this.changeBodyEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_BODY,this);this.changeFooterEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_FOOTER,this);this.changeContentEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_CONTENT,this);this.de
 stroyEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.DESTORY,this);this.beforeShowEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SHOW,this);this.showEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW,this);this.beforeHideEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_HIDE,this);this.hideEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE,this);},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),
 initDefaultConfig:function(){var DEFAULT_CONFIG=YAHOO.widget.Module._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
+if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("div");el.id=elId;}}
+this.element=el;if(el.id){this.id=el.id;}
+var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
+this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
+this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;}
+resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth;var nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
+var fireTextResize=function(){YAHOO.widget.Module.textResizeEvent.fire();};if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.widget.Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!YAHOO.widget.Module.textResizeInitialized){if(!YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",fireTextResize)){YAHOO.util.Event.addListener(this.resizeMonitor,"resize",fireTextResize);}
+YAHOO.widget.Module.textResizeInitialized=true;}}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("div");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
+if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
+this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("div");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
+this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("div");this.body.className=YAHOO.widget.Module.CSS_BODY;}
+if(typeof bodyContent=="string")
+{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
+this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("div");this.body.className=YAHOO.widget.Module.CSS_BODY;}
+this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("div");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
+if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
+this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("div");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
+this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
+var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
+if(element){element.appendChild(me.element);me.appendEvent.fire();}};if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
+if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
+if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
+if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
+this.renderEvent.fire();return true;},destroy:function(){var parent;if(this.element){YAHOO.util.Event.purgeElement(this.element,true);parent=this.element.parentNode;}
+if(parent){parent.removeChild(this.element);}
+this.element=null;this.header=null;this.body=null;this.footer=null;for(var e in this){if(e instanceof YAHOO.util.CustomEvent){e.unsubscribeAll();}}
+YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}}};YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;};YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay._EVENT_TYPE
 S={"BEFORE_MOVE":"beforeMove","MOVE":"move"};YAHOO.widget.Overlay._DEFAULT_CONFIG={"X":{key:"x",validator:YAHOO.lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:YAHOO.lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:YAHOO.lang.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:YAHOO.lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.widget.Module.prototype.browser=="ie"?true:false),validator:YAHOO.lang.isBoolean,supercedes:["zIndex"]}};YAHOO.widget.Overlay.IFRAME_SRC="javascript:false;";YAHOO.widget.Ove
 rlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="yui-overlay";YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
+this.initEvent.fire(YAHOO.widget.Overlay);};YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);var EVENT_TYPES=YAHOO.widget.Overlay._EVENT_TYPES;this.beforeMoveEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_MOVE,this);this.moveEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.MOVE,this);};YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);var DEFAULT_CONFIG=YAHOO.widget.Overlay._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONF
 IG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.config
 ConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});};YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);};YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");};YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass(this.element,"show-scrollbars");};YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility"
 );if(currentVis=="inherit"){var e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=YAHOO.util.Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break;}
+e=e.parentNode;}
+if(currentVis=="inherit"){currentVis="visible";}}
+var effect=this.cfg.getProperty("effect");var effectInstances=[];if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
+var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
+if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();for(var j=0;j<effectInstances.length;j++){var ei=effectInstances[j];if(j===0&&!YAHOO.util.Config.alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
+ei.animateIn();}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
+if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var k=0;k<effectInstances.length;k++){var h=effectInstances[k];if(k===0&&!YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
+h.animateOut();}}else if(currentVis===""){YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}};YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}};YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}};YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
+if(this.iframe){if(zIndex<=0){zIndex=1;}
+YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
+YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);};YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.before
 MoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.showIframe=function(){if(this.iframe){this.iframe.style.display="block";}};YAHOO.widget.Overlay.prototype.hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}};YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showIframe,this)){this.showEvent.subscribe(this.showIframe,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideIframe,this)){this.hideEvent.subscribe(this.hideIframe,this,true);}
+var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
+if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=YAHOO.widget.Overlay.IFRAME_SRC;}
+var parent=this.element.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
+YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){this.showIframe();}else{this.hideIframe();}}
+var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
+YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=this.element.clientWidth;var height=this.element.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
+this.showEvent.unsubscribe(this.showIframe,this);this.hideEvent.unsubscribe(this.hideIframe,this);}};YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}};YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
+if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}};YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
+if(!contextAlign){contextAlign=contextArgs[2];}
+if(element&&context){var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}};switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}};YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];var offsetHeight=this.element.offsetHeight;var
  offsetWidth=this.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
+if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
+this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);};YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);};YAHOO.widget.Overlay.prototype.onDomResize=function(e,obj){YAHOO.widget.Overlay.superclass.onDom
 Resize.call(this,e,obj);var me=this;setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context");},0);};YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
+this.iframe=null;YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;};YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){if(YAHOO.widget.Module.prototype.browser=="ie"||YAHOO.widget.Module.prototype.browser=="ie7"){if(!window.scrollEnd){window.scrollEnd=-1;}
+clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){YAHOO.widget.Overlay.windowScrollEvent.fire();},1);}else{YAHOO.widget.Overlay.windowScrollEvent.fire();}};YAHOO.widget.Overlay.windowResizeHandler=function(e){if(YAHOO.widget.Module.prototype.browser=="ie"||YAHOO.widget.Module.prototype.browser=="ie7"){if(!window.resizeEnd){window.resizeEnd=-1;}
+clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){YAHOO.widget.Overlay.windowResizeEvent.fire();},100);}else{YAHOO.widget.Overlay.windowResizeEvent.fire();}};YAHOO.widget.Overlay._initialized=null;if(YAHOO.widget.Overlay._initialized===null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
+YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
+this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){if(activeOverlay!=o){if(activeOverlay){activeOverlay.blur();}
+activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex,10)+2));}
+this.overlays.sort(this.compareZIndexDesc);o.focusEvent.fire();}}};this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);if(o.element){YAHOO.util.Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);}
+o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent.unsubscribeAll();o.blurEvent.unsubscribeAll();o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].blur();}};this._onOverlayBlur=function(p_sType,p_aArgs){activeOverlay=null;};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
+if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(p_oEvent){var oTarget=YAHOO.util.Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||YAHOO.util.Dom.isAncestor(oClose,oTarget))){this.blur();}
+else{this.focus();}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay);},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus",overlay);overlay.blurEvent=new YAHOO.util.CustomEvent("blur",overlay);var mgr=this;overlay.focus=function(){mgr.focus(this);};overlay.blur=function(){if(mgr.getActive()==this){YAHOO.util.Dom.removeClass(this.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.blurEvent.fire();}};overlay.blurEvent.subscribe(mgr._onOverlayBlur);overlay.hideEvent.subscribe(overlay.blur);overlay.destroyEvent.subscribe(this._onOverlayDestroy,overlay,this);YAHOO.util.Event.addListener(overlay.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,overlay);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.
 setProperty("zIndex",0);}
+this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
+if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var p=0;p<this.overlays.length;p++){if(this.overlays[p].id==overlay){return this.overlays[p];}}}
+return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}};YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Tooltip,YAHOO.widget.Overlay);YAHOO.widget.Tooltip.CSS_TOOLTIP="yui-tt";YAHOO.widget.Tooltip._DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:YAHOO.lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:YAHOO.lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:YAHOO.lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,
 validator:YAHOO.lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"}};YAHOO.widget.Tooltip.prototype.init=function(el,userConfig){if(document.readyState&&document.readyState!="complete"){var deferredInit=function(){this.init(el,userConfig);};YAHOO.util.Event.addListener(window,"load",deferredInit,this,true);}else{YAHOO.widget.Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Tooltip);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.render(this.cfg.getProperty("container"));this.initEvent.fire(YAHOO.widget.Tooltip);}};YAHOO.widget.Tooltip.prototype.initDefaultConfig=function(){YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);var DEFAULT_CONFIG=YAHOO.widget.Tooltip._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.conf
 igHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});};YAHOO.widget.Tooltip.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);}};YAHOO.widget.Tooltip.prototype.configContainer=function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true);}};YAHOO.widget.Tooltip.prototype._removeEventListeners=function(){var aElements=this._context;if(aElements){var nElements=aElements.length;if(nElements>0){var i=nElements-1,oElement;do{oElement=aElements[i];YAHOO.util.Event.removeListener(oElement,"mouseover",this.onContextMouseOver);YAHOO.util.Event.removeListener(oElement,"mousemove",this.onContextMo
 useMove);YAHOO.util.Event.removeListener(oElement,"mouseout",this.onContextMouseOut);}
+while(i--);}}};YAHOO.widget.Tooltip.prototype.configContext=function(type,args,obj){var context=args[0];if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true);}else{this.cfg.setProperty("context",[context],true);}
+context=this.cfg.getProperty("context");}
+this._removeEventListeners();this._context=context;var aElements=this._context;if(aElements){var nElements=aElements.length;if(nElements>0){var i=nElements-1,oElement;do{oElement=aElements[i];YAHOO.util.Event.addListener(oElement,"mouseover",this.onContextMouseOver,this);YAHOO.util.Event.addListener(oElement,"mousemove",this.onContextMouseMove,this);YAHOO.util.Event.addListener(oElement,"mouseout",this.onContextMouseOut,this);}
+while(i--);}}}};YAHOO.widget.Tooltip.prototype.onContextMouseMove=function(e,obj){obj.pageX=YAHOO.util.Event.getPageX(e);obj.pageY=YAHOO.util.Event.getPageY(e);};YAHOO.widget.Tooltip.prototype.onContextMouseOver=function(e,obj){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
+var context=this;YAHOO.util.Event.addListener(context,"mousemove",obj.onContextMouseMove,obj);if(context.title){obj._tempTitle=context.title;context.title="";}
+obj.showProcId=obj.doShow(e,context);};YAHOO.widget.Tooltip.prototype.onContextMouseOut=function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null;}
+if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null;}
+if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
+obj.hideProcId=setTimeout(function(){obj.hide();},obj.cfg.getProperty("hidedelay"));};YAHOO.widget.Tooltip.prototype.doShow=function(e,context){var yOffset=25;if(this.browser=="opera"&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12;}
+var me=this;return setTimeout(function(){if(me._tempTitle){me.setBody(me._tempTitle);}else{me.cfg.refireEvent("text");}
+me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY);}
+YAHOO.util.Event.removeListener(context,"mousemove",me.onContextMouseMove);me.show();me.hideProcId=me.doHide();},this.cfg.getProperty("showdelay"));};YAHOO.widget.Tooltip.prototype.doHide=function(){var me=this;return setTimeout(function(){me.hide();},this.cfg.getProperty("autodismissdelay"));};YAHOO.widget.Tooltip.prototype.preventOverlap=function(pageX,pageY){var height=this.element.offsetHeight;var elementRegion=YAHOO.util.Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;var mousePoint=new YAHOO.util.Point(pageX,pageY);if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5));}};YAHOO.widget.Tooltip.prototype.destroy=function(){this._removeEventListeners();YAHOO.widget.Tooltip.superclass.destroy.call(this);};YAHOO.widget.Tooltip.prototype.toString=function(){return"Tooltip "+this.id;};YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el
 ,userConfig);};YAHOO.extend(YAHOO.widget.Panel,YAHOO.widget.Overlay);YAHOO.widget.Panel.CSS_PANEL="yui-panel";YAHOO.widget.Panel.CSS_PANEL_CONTAINER="yui-panel-container";YAHOO.widget.Panel._EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"};YAHOO.widget.Panel._DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:YAHOO.lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(YAHOO.util.DD?true:false),validator:YAHOO.lang.isBoolean,supercedes:["visible"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:YAHOO.lang.isBoolean,supercedes:["visible"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};YAHOO.widget.Panel.prototype.init=function(el,userConfig){YAHOO.widget.Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Panel);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Panel.CSS_PANEL);this.buildWrapper();if(userCon
 fig){this.cfg.applyConfig(userConfig,true);}
+this.beforeRenderEvent.subscribe(function(){var draggable=this.cfg.getProperty("draggable");if(draggable){if(!this.header){this.setHeader("&#160;");}}},this,true);this.renderEvent.subscribe(function(){var sWidth=this.cfg.getProperty("width");if(!sWidth){this.cfg.setProperty("width",(this.element.offsetWidth+"px"));}});var me=this;var doBlur=function(){this.blur();};this.showMaskEvent.subscribe(function(){var checkFocusable=function(el){var sTagName=el.tagName.toUpperCase(),bFocusable=false;switch(sTagName){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!YAHOO.util.Dom.isAncestor(me.element,el)){YAHOO.util.Event.addListener(el,"focus",doBlur,el,true);bFocusable=true;}
+break;case"INPUT":if(el.type!="hidden"&&!YAHOO.util.Dom.isAncestor(me.element,el)){YAHOO.util.Event.addListener(el,"focus",doBlur,el,true);bFocusable=true;}
+break;}
+return bFocusable;};this.focusableElements=YAHOO.util.Dom.getElementsBy(checkFocusable);},this,true);this.hideMaskEvent.subscribe(function(){for(var i=0;i<this.focusableElements.length;i++){var el2=this.focusableElements[i];YAHOO.util.Event.removeListener(el2,"focus",doBlur);}},this,true);this.beforeShowEvent.subscribe(function(){this.cfg.refireEvent("underlay");},this,true);this.initEvent.fire(YAHOO.widget.Panel);};YAHOO.widget.Panel.prototype.initEvents=function(){YAHOO.widget.Panel.superclass.initEvents.call(this);var EVENT_TYPES=YAHOO.widget.Panel._EVENT_TYPES;this.showMaskEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW_MASK,this);this.hideMaskEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE_MASK,this);this.dragEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.DRAG,this);};YAHOO.widget.Panel.prototype.initDefaultConfig=function(){YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);var DEFAULT_CONFIG=YAHOO.widget.Panel._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CON
 FIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:DEFAULT_CONFIG.DRAGGABLE.value,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});};YAHOO.widget.Panel.prototype.configClose=function(type,args,obj){va
 r val=args[0];var doHide=function(e,obj){obj.hide();};if(val){if(!this.close){this.close=document.createElement("span");YAHOO.util.Dom.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);YAHOO.util.Event.addListener(this.close,"click",doHide,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}};YAHOO.widget.Panel.prototype.configDraggable=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.DD){this.cfg.setProperty("draggable",false);return;}
+if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","move");this.registerDragDrop();}}else{if(this.dd){this.dd.unreg();}
+if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","auto");}}};YAHOO.widget.Panel.prototype.configUnderlay=function(type,args,obj){var val=args[0];switch(val.toLowerCase()){case"shadow":YAHOO.util.Dom.removeClass(this.element,"matte");YAHOO.util.Dom.addClass(this.element,"shadow");if(!this.underlay){this.underlay=document.createElement("div");this.underlay.className="underlay";this.underlay.innerHTML="&#160;";this.element.appendChild(this.underlay);}
+this.sizeUnderlay();break;case"matte":YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.addClass(this.element,"matte");break;default:YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.removeClass(this.element,"matte");break;}};YAHOO.widget.Panel.prototype.configModal=function(type,args,obj){var modal=args[0];if(modal){this.buildMask();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.showMask,this)){this.beforeShowEvent.subscribe(this.showMask,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMask,this)){this.hideEvent.subscribe(this.hideMask,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.sizeMask,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.destroyEvent,this.removeMask,this)){this.destroyEvent.subscribe(this.removeMask,this,true);}
+this.cfg.refireEvent("zIndex");}else{this.beforeShowEvent.unsubscribe(this.showMask,this);this.hideEvent.unsubscribe(this.hideMask,this);YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.destroyEvent.unsubscribe(this.removeMask,this);}};YAHOO.widget.Panel.prototype.removeMask=function(){var oMask=this.mask;if(oMask){this.hideMask();var oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask);}
+this.mask=null;}};YAHOO.widget.Panel.prototype.configKeyListeners=function(type,args,obj){var listeners=args[0];if(listeners){if(listeners instanceof Array){for(var i=0;i<listeners.length;i++){var listener=listeners[i];if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true);}}}else{if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true);}}}};YAHOO.widget.Panel.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");};YAHOO.widget.Panel.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");};YAHOO.widget.Panel.prototype.configzIndex=function(type,args,obj){YAHOO.widget.Panel.superclass.configzIndex.call(this,type,args,obj);var maskZ=0;var currentZ=YAHOO.util.Dom.getStyle(this.element,"zIndex");if(this.mask){if(!currentZ||isNaN(currentZ)){currentZ=0;}
+if(currentZ===0){this.cfg.setProperty("zIndex",1);}else{maskZ=currentZ-1;YAHOO.util.Dom.setStyle(this.mask,"zIndex",maskZ);}}};YAHOO.widget.Panel.prototype.buildWrapper=function(){var elementParent=this.element.parentNode;var originalElement=this.element;var wrapper=document.createElement("div");wrapper.className=YAHOO.widget.Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement);}
+wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;YAHOO.util.Dom.setStyle(this.innerElement,"visibility","inherit");};YAHOO.widget.Panel.prototype.sizeUnderlay=function(){if(this.underlay&&this.browser!="gecko"&&this.browser!="safari"){this.underlay.style.width=this.innerElement.offsetWidth+"px";this.underlay.style.height=this.innerElement.offsetHeight+"px";}};YAHOO.widget.Panel.prototype.onDomResize=function(e,obj){YAHOO.widget.Panel.superclass.onDomResize.call(this,e,obj);var me=this;setTimeout(function(){me.sizeUnderlay();},0);};YAHOO.widget.Panel.prototype.registerDragDrop=function(){if(this.header){if(!YAHOO.util.DD){return;}
+this.dd=new YAHOO.util.DD(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h";}
+var me=this;this.dd.startDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.addClass(me.element,"drag");}
+if(me.cfg.getProperty("constraintoviewport")){var offsetHeight=me.element.offsetHeight;var offsetWidth=me.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=window.scrollX||document.documentElement.scrollLeft;var scrollY=window.scrollY||document.documentElement.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;this.minX=leftConstraint;this.maxX=rightConstraint;this.constrainX=true;this.minY=topConstraint;this.maxY=bottomConstraint;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}
+me.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&this.browser=="gecko"){this.showMacGeckoScrollbars();}
+me.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.removeClass(me.element,"drag");}
+me.dragEvent.fire("endDrag",arguments);};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}};YAHOO.widget.Panel.prototype.buildMask=function(){if(!this.mask){this.mask=document.createElement("div");this.mask.id=this.id+"_mask";this.mask.className="mask";this.mask.innerHTML="&#160;";var maskClick=function(e,obj){YAHOO.util.Event.stopEvent(e);};var firstChild=document.body.firstChild;if(firstChild){document.body.insertBefore(this.mask,document.body.firstChild);}else{document.body.appendChild(this.mask);}}};YAHOO.widget.Panel.prototype.hideMask=function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();YAHOO.util.Dom.removeClass(document.body,"masked");}};YAHOO.widget.Panel.prototype.showMask=function(){if(this.cfg.getProperty("modal")&&this.mask){YAHOO.util.Dom.addClass(document.body,"masked");this.sizeMask();this.mask
 .style.display="block";this.showMaskEvent.fire();}};YAHOO.widget.Panel.prototype.sizeMask=function(){if(this.mask){this.mask.style.height=YAHOO.util.Dom.getDocumentHeight()+"px";this.mask.style.width=YAHOO.util.Dom.getDocumentWidth()+"px";}};YAHOO.widget.Panel.prototype.render=function(appendToNode){return YAHOO.widget.Panel.superclass.render.call(this,appendToNode,this.innerElement);};YAHOO.widget.Panel.prototype.destroy=function(){YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);if(this.close){YAHOO.util.Event.purgeElement(this.close);}
+YAHOO.widget.Panel.superclass.destroy.call(this);};YAHOO.widget.Panel.prototype.toString=function(){return"Panel "+this.id;};YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Dialog,YAHOO.widget.Panel);YAHOO.widget.Dialog.CSS_DIALOG="yui-dialog";YAHOO.widget.Dialog._EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"};YAHOO.widget.Dialog._DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:"none"}};YAHOO.widget.Dialog.prototype.initDefaultConfig=function(){YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};var DEFAULT_CONFIG=YAHOO.widget.Dialog._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_M
 ETHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false;}else{return true;}}});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value});};YAHOO.widget.Dialog.prototype.initEvents=function(){YAHOO.widget.Dialog.superclass.initEvents.call(this);var EVENT_TYPES=YAHOO.widget.Dialog._EVENT_TYPES;this.beforeSubmitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SUBMIT,this);this.submitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.SUBMIT,this);this.manualSubmitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.MANUAL_SUBMIT,this);this.asyncSubmitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.ASYNC_SUBMIT,this);this.formSubmitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.FORM_SUBMIT,this);this.cancelEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CANCEL,this);};YAHOO.widget.Dialog.prototype.init=function(el,userConfig){YAHOO.widget.Dialog.superclass.init.call(this,el);this.beforeInitEven
 t.fire(YAHOO.widget.Dialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.beforeRenderEvent.subscribe(function(){var buttonCfg=this.cfg.getProperty("buttons");if(buttonCfg&&buttonCfg!="none"){if(!this.footer){this.setFooter("");}}},this,true);this.initEvent.fire(YAHOO.widget.Dialog);};YAHOO.widget.Dialog.prototype.doSubmit=function(){var pm=this.cfg.getProperty("postmethod");switch(pm){case"async":var method=this.form.getAttribute("method")||'POST';method=method.toUpperCase();YAHOO.util.Connect.setForm(this.form);var cObj=YAHOO.util.Connect.asyncRequest(method,this.form.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":this.form.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}};YAHOO.widget.Dialog.prototype._onFormKeyDown=function(p_oEvent){var oTarget=YAHOO.util.Event.getTarget(p_oEvent),nCharCode=YAHOO.util.Event.getCharCode(p_oEvent);if(nChar
 Code==13&&oTarget.tagName&&oTarget.tagName.toUpperCase()=="INPUT"){var sType=oTarget.type;if(sType=="text"||sType=="password"||sType=="checkbox"||sType=="radio"||sType=="file"){this.defaultHtmlButton.click();}}};YAHOO.widget.Dialog.prototype.registerForm=function(){var form=this.element.getElementsByTagName("form")[0];if(!form){var formHTML="<form name=\"frm_"+this.id+"\" action=\"\"></form>";this.body.innerHTML+=formHTML;form=this.element.getElementsByTagName("form")[0];}
+this.firstFormElement=function(){for(var f=0;f<form.elements.length;f++){var el=form.elements[f];if(el.focus&&!el.disabled){if(el.type&&el.type!="hidden"){return el;}}}
+return null;}();this.lastFormElement=function(){for(var f=form.elements.length-1;f>=0;f--){var el=form.elements[f];if(el.focus&&!el.disabled){if(el.type&&el.type!="hidden"){return el;}}}
+return null;}();this.form=form;if(this.form&&(this.browser=="ie"||this.browser=="ie7"||this.browser=="gecko")){YAHOO.util.Event.addListener(this.form,"keydown",this._onFormKeyDown,null,this);}
+if(this.cfg.getProperty("modal")&&this.form){var me=this;var firstElement=this.firstFormElement||this.firstButton;if(firstElement){this.preventBackTab=new YAHOO.util.KeyListener(firstElement,{shift:true,keys:9},{fn:me.focusLast,scope:me,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}
+var lastElement=this.lastButton||this.lastFormElement;if(lastElement){this.preventTabOut=new YAHOO.util.KeyListener(lastElement,{shift:false,keys:9},{fn:me.focusFirst,scope:me,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}};YAHOO.widget.Dialog.prototype.configClose=function(type,args,obj){var val=args[0];var doCancel=function(e,obj){obj.cancel();};if(val){if(!this.close){this.close=document.createElement("div");YAHOO.util.Dom.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);YAHOO.util.Event.addListener(this.close,"click",doCancel,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}};YAHOO.widget.Dialog.prototype.configButtons=function(type,args,obj){var buttons=args[0];if(buttons!="none"){this.buttonSpan=null;this.buttonSpan=document.creat
 eElement("span");this.buttonSpan.className="button-group";for(var b=0;b<buttons.length;b++){var button=buttons[b];var htmlButton=document.createElement("button");htmlButton.setAttribute("type","button");if(button.isDefault){htmlButton.className="default";this.defaultHtmlButton=htmlButton;}
+htmlButton.appendChild(document.createTextNode(button.text));YAHOO.util.Event.addListener(htmlButton,"click",button.handler,this,true);this.buttonSpan.appendChild(htmlButton);button.htmlButton=htmlButton;if(b===0){this.firstButton=button.htmlButton;}
+if(b==(buttons.length-1)){this.lastButton=button.htmlButton;}}
+this.setFooter(this.buttonSpan);this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");}else{if(this.buttonSpan){if(this.buttonSpan.parentNode){this.buttonSpan.parentNode.removeChild(this.buttonSpan);}
+this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}};YAHOO.widget.Dialog.prototype.focusFirst=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
+if(this.firstFormElement){this.firstFormElement.focus();}else{this.focusDefaultButton();}};YAHOO.widget.Dialog.prototype.focusLast=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
+var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){this.focusLastButton();}else{if(this.lastFormElement){this.lastFormElement.focus();}}};YAHOO.widget.Dialog.prototype.focusDefaultButton=function(){if(this.defaultHtmlButton){this.defaultHtmlButton.focus();}};YAHOO.widget.Dialog.prototype.blurButtons=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.blur();}}};YAHOO.widget.Dialog.prototype.focusFirstButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.focus();}}};YAHOO.widget.Dialog.prototype.focusLastButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[buttons.length-1].htmlButton;if(html){html.focus();}}};YAHOO.widget.Dialog.prototype.configPostMethod=function(type,args,obj){var postmethod=args[0];this.r
 egisterForm();YAHOO.util.Event.addListener(this.form,"submit",function(e){YAHOO.util.Event.stopEvent(e);this.submit();this.form.blur();},this,true);};YAHOO.widget.Dialog.prototype.validate=function(){return true;};YAHOO.widget.Dialog.prototype.submit=function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}};YAHOO.widget.Dialog.prototype.cancel=function(){this.cancelEvent.fire();this.hide();};YAHOO.widget.Dialog.prototype.getData=function(){var oForm=this.form;if(oForm){var aElements=oForm.elements,nTotalElements=aElements.length,oData={},sName,oElement,nElements;for(var i=0;i<nTotalElements;i++){sName=aElements[i].name;function isFormElement(p_oElement){var sTagName=p_oElement.tagName.toUpperCase();return((sTagName=="INPUT"||sTagName=="TEXTAREA"||sTagName=="SELECT")&&p_oElement.name==sName);}
+oElement=YAHOO.util.Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];var sType=oElement.type,sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked;}
+else if(sType!="radio"){oData[sName]=oElement.value;}
+break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":var aOptions=oElement.options,nOptions=aOptions.length,aValues=[],oOption,sValue;for(var n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text;}
+aValues[aValues.length]=sValue;}}
+oData[sName]=aValues;break;}}
+else{var sType=oElement[0].type;switch(sType){case"radio":var oRadio;for(var n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break;}}
+break;case"checkbox":var aValues=[],oCheckbox;for(var n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value;}}
+oData[sName]=aValues;break;}}}}}
+return oData;};YAHOO.widget.Dialog.prototype.destroy=function(){var Event=YAHOO.util.Event,oForm=this.form,oFooter=this.footer;if(oFooter){var aButtons=oFooter.getElementsByTagName("button");if(aButtons&&aButtons.length>0){var i=aButtons.length-1;do{Event.purgeElement(aButtons[i],false,"click");}
+while(i--);}}
+if(oForm){Event.purgeElement(oForm);this.body.removeChild(oForm);this.form=null;}
+YAHOO.widget.Dialog.superclass.destroy.call(this);};YAHOO.widget.Dialog.prototype.toString=function(){return"Dialog "+this.id;};YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.SimpleDialog,YAHOO.widget.Dialog);YAHOO.widget.SimpleDialog.ICON_BLOCK="blckicon";YAHOO.widget.SimpleDialog.ICON_ALARM="alrticon";YAHOO.widget.SimpleDialog.ICON_HELP="hlpicon";YAHOO.widget.SimpleDialog.ICON_INFO="infoicon";YAHOO.widget.SimpleDialog.ICON_WARN="warnicon";YAHOO.widget.SimpleDialog.ICON_TIP="tipicon";YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.widget.SimpleDialog._DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};YAHOO.widget.SimpleDialog.prototype.initDefaultConfig=function(){YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);var DEFAULT_CONFIG=YAHOO.widget.Simp
 leDialog._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes});};YAHOO.widget.SimpleDialog.prototype.init=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true);}
+this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(YAHOO.widget.SimpleDialog);};YAHOO.widget.SimpleDialog.prototype.registerForm=function(){YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";};YAHOO.widget.SimpleDialog.prototype.configIcon=function(type,args,obj){var icon=args[0];if(icon&&icon!="none"){var iconHTML="";if(icon.indexOf(".")==-1){iconHTML="<span class=\"yui-icon "+icon+"\" >&#160;</span>";}else{iconHTML="<img src=\""+this.imageRoot+icon+"\" class=\"yui-icon\" />";}
+this.body.innerHTML=iconHTML+this.body.innerHTML;}};YAHOO.widget.SimpleDialog.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}};YAHOO.widget.SimpleDialog.prototype.toString=function(){return"SimpleDialog "+this.id;};YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;}
+this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;};YAHOO.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new YAHOO.util.CustomEvent("beforeAnimateIn",this);this.beforeAnimateOutEvent=new YAHOO.util.CustomEvent("beforeAnimateOut",this);this.animateInCompleteEvent=new YAHOO.util.CustomEvent("animateInComplete",this);this.animateOutCompleteEvent=new YAHOO.util.CustomEvent("animateOutComplete",this);this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnima
 teOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);};YAHOO.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate();};YAHOO.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.toString=function(){var output="Containe
 rEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";}
+return output;};YAHOO.widget.ContainerEffect.FADE=function(overlay,dur){var fade=new YAHOO.widget.ContainerEffect(overlay,{attributes:{opacity:{from:0,to:1}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element);fade.handleStartAnimateIn=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
+if(obj.overlay.underlay){obj.initialUnderlayOpacity=YAHOO.util.Dom.getStyle(obj.overlay.underlay,"opacity");obj.overlay.underlay.style.filter=null;}
+YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
+if(obj.overlay.underlay){YAHOO.util.Dom.setStyle(obj.overlay.underlay,"opacity",obj.initialUnderlayOpacity);}
+obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(obj.overlay.underlay){obj.overlay.underlay.style.filter=null;}};fade.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
+YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",1);obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};YAHOO.widget.ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||YAHOO.util.Dom.getX(overlay.element);var y=overlay.cfg.getProperty("y")||YAHOO.util.Dom.getY(overlay.element);var clientWidth=YAHOO.util.Dom.getClientWidth();var offsetWidth=overlay.element.offsetWidth;var slide=new YAHOO.widget.ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=(-25-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";};slide.handleTweenAnimateIn=function(type,args,obj){var pos=YAHOO.ut
 il.Dom.getXY(obj.overlay.element);var currentX=pos[0];var currentY=pos[1];if(YAHOO.util.Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");}
+obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};slide.handleStartAnimateOut=function(type,args,obj){var vw=YAHOO.util.Dom.getViewportWidth();var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var yso=pos[1];var currentTo=obj.animOut.attributes.points.to;obj.animOut.attributes.points.to=[(vw+25),yso];};slide.handleTweenAnimateOut=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var xto=pos[0];var yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();retu
 rn slide;};YAHOO.register("container",YAHOO.widget.Module,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/container/container_core-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/container/container_core-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/container/container_core-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,86 +1,100 @@
-/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.4 */
-YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};YAHOO.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(key,propertyObject){},getConfig:function(){},getProperty:function(key){},resetProperty:function(key){},setProperty:function(key,value,silent){},queueProperty:function(key,value){},refireEvent:function(key){},applyConfig:function(userConfig,init){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(key,handler,obj,override){},unsubscribeFromConfigEvent:function(key,handler,obj){},checkBoolean:function(val){if(typeof val=='boolean'){return true;}else{return false;}},checkNumber:function(val){if(isNaN(val)){return false;}else{return true;}}};YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent("configChanged");this.queueInProgress=false;var config={};var initialConfig={};var eventQueue=[];var fireEvent=function(key,value){
 key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){property.event.fire(value);}};this.addProperty=function(key,propertyObject){key=key.toLowerCase();config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner,true);}
-this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}};this.getConfig=function(){var cfg={};for(var prop in config){var property=config[prop];if(typeof property!='undefined'&&property.event){cfg[prop]=property.value;}}
-return cfg;};this.getProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.value;}else{return undefined;}};this.resetProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){this.setProperty(key,initialConfig[key].value);}else{return undefined;}};this.setProperty=function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=config[key];if(typeof property!='undefined'&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
-return true;}}else{return false;}}};this.queueProperty=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(typeof value!='undefined'&&property.validator&&!property.validator(value)){return false;}else{if(typeof value!='undefined'){property.value=value;}else{value=property.value;}
-var foundDuplicate=false;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey.toLowerCase()==key){eventQueue[i]=null;eventQueue.push([key,(typeof value!='undefined'?value:queueItemValue)]);foundDuplicate=true;break;}}}
-if(!foundDuplicate&&typeof value!='undefined'){eventQueue.push([key,value]);}}
-if(property.supercedes){for(var s=0;s<property.supercedes.length;s++){var supercedesCheck=property.supercedes[s];for(var q=0;q<eventQueue.length;q++){var queueItemCheck=eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey.toLowerCase()==supercedesCheck.toLowerCase()){eventQueue.push([queueItemCheckKey,queueItemCheckValue]);eventQueue[q]=null;break;}}}}}
-return true;}else{return false;}};this.refireEvent=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event&&typeof property.value!='undefined'){if(this.queueInProgress){this.queueProperty(key);}else{fireEvent(key,property.value);}}};this.applyConfig=function(userConfig,init){if(init){initialConfig=userConfig;}
-for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}};this.refresh=function(){for(var prop in config){this.refireEvent(prop);}};this.fireQueue=function(){this.queueInProgress=true;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=config[key];property.value=value;fireEvent(key,value);}}
-this.queueInProgress=false;eventQueue=[];};this.subscribeToConfigEvent=function(key,handler,obj,override){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
-return true;}else{return false;}};this.unsubscribeFromConfigEvent=function(key,handler,obj){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}};this.toString=function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
-return output;};this.outputEventQueue=function(){var output="";for(var q=0;q<eventQueue.length;q++){var queueItem=eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
-return output;};};YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
-return false;};YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}};YAHOO.widget.Module.IMG_ROOT="http://us.i1.yimg.com/us.yimg.com/i/";YAHOO.widget.Module.IMG_ROOT_SSL="https://a248.e.akamai.net/sec.yimg.com/i/";YAHOO.widget.Module.CSS_MODULE="module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL="javascript:false";YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,childNodesInDOM:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,beforeInitEvent:null,initEvent:null,appendEvent:null,beforeRenderEvent:null,renderEvent:null,changeHeaderEvent:null,changeBodyEvent:null,changeFooterEvent:null,changeContentEvent:null,destroyEvent:null,beforeShowEvent:null,showEvent:null,beforeHideEvent:null,hideEvent:null,initEvents:function(){this.beforeInitEvent=new YAHOO.util.CustomEvent("beforeInit");thi
 s.initEvent=new YAHOO.util.CustomEvent("init");this.appendEvent=new YAHOO.util.CustomEvent("append");this.beforeRenderEvent=new YAHOO.util.CustomEvent("beforeRender");this.renderEvent=new YAHOO.util.CustomEvent("render");this.changeHeaderEvent=new YAHOO.util.CustomEvent("changeHeader");this.changeBodyEvent=new YAHOO.util.CustomEvent("changeBody");this.changeFooterEvent=new YAHOO.util.CustomEvent("changeFooter");this.changeContentEvent=new YAHOO.util.CustomEvent("changeContent");this.destroyEvent=new YAHOO.util.CustomEvent("destroy");this.beforeShowEvent=new YAHOO.util.CustomEvent("beforeShow");this.showEvent=new YAHOO.util.CustomEvent("show");this.beforeHideEvent=new YAHOO.util.CustomEvent("beforeHide");this.hideEvent=new YAHOO.util.CustomEvent("hide");},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function()
 {var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty("visible",{value:true,handler:this.configVisible,validator:this.cfg.checkBoolean});this.cfg.addProperty("effect",{suppressEvent:true,supercedes:["visible"]});this.cfg.addProperty("monitorresize",{value:true,handler:this.configMonitorResize});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
-if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("DIV");el.id=elId;}}
-this.element=el;if(el.id){this.id=el.id;}
-var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
-this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
-this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;}
-resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth,nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
-if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",this.onDomResize,this,true);}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
-if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
-this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
-this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
-if(typeof bodyContent=="string")
-{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
-this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
-this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
-if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
-this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
-this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
-var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
-if(element){element.appendChild(me.element);me.appendEvent.fire();}};if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
-if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
-if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
-if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
-this.renderEvent.fire();return true;},destroy:function(){if(this.element){var parent=this.element.parentNode;}
-if(parent){parent.removeChild(this.element);}
-this.element=null;this.header=null;this.body=null;this.footer=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.util.Event.removeListener(this.resizeMonitor,"resize",this.onDomResize);this.resizeMonitor=null;}}};YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;};YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay.IFRAME_SRC="p
 romo/m/irs/blank.gif";YAHOO.widget.Overlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="overlay";YAHOO.widget.Overlay.prototype.beforeMoveEvent=null;YAHOO.widget.Overlay.prototype.moveEvent=null;YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
-if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
-this.initEvent.fire(YAHOO.widget.Overlay);};YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);this.beforeMoveEvent=new YAHOO.util.CustomEvent("beforeMove",this);this.moveEvent=new YAHOO.util.CustomEvent("move",this);};YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty("x",{handler:this.configX,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("y",{handler:this.configY,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("xy",{handler:this.configXY,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("context",{handler:this.configContext,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("fixedcenter",{value:false,handler:this.configFixedCenter,validator:this.cfg.checkBoolean,supercedes:["iframe","visible"]});this.cfg.add
 Property("width",{handler:this.configWidth,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("height",{handler:this.configHeight,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("zIndex",{value:null,handler:this.configzIndex});this.cfg.addProperty("constraintoviewport",{value:false,handler:this.configConstrainToViewport,validator:this.cfg.checkBoolean,supercedes:["iframe","x","y","xy"]});this.cfg.addProperty("iframe",{value:(this.browser=="ie"?true:false),handler:this.configIframe,validator:this.cfg.checkBoolean,supercedes:["zIndex"]});};YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);};YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");};YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass
 (this.element,"show-scrollbars");};YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility");var effect=this.cfg.getProperty("effect");var effectInstances=[];if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
-var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
-if(effect){if(visible){if(currentVis!="visible"){this.beforeShowEvent.fire();for(var j=0;j<effectInstances.length;j++){var e=effectInstances[j];if(j===0&&!YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
-e.animateIn();}}}}else{if(currentVis!="visible"){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
-if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var k=0;k<effectInstances.length;k++){var h=effectInstances[k];if(k===0&&!YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
-h.animateOut();}}}else{if(currentVis=="visible"){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}};YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}};YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}};YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
-if(this.iframe){if(zIndex<=0){zIndex=1;}
-YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
-YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);};YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.before
 MoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.showIframe=function(){if(this.iframe){this.iframe.style.display="block";}}
-YAHOO.widget.Overlay.prototype.hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}}
-YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showIframe,this)){this.showEvent.subscribe(this.showIframe,this,true);}
-if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideIframe,this)){this.hideEvent.subscribe(this.hideIframe,this,true);}
-var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
-if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=this.imageRoot+YAHOO.widget.Overlay.IFRAME_SRC;}
-var parent=this.element.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
-YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){this.showIframe();}else{this.hideIframe();}}
-var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
-YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=this.element.clientWidth;var height=this.element.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
-this.showEvent.unsubscribe(this.showIframe,this);this.hideEvent.unsubscribe(this.hideIframe,this);}};YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}};YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
-if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}};YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
-if(!contextAlign){contextAlign=contextArgs[2];}
-if(element&&context){var elementRegion=YAHOO.util.Dom.getRegion(element);var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}};switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}};YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=p
 os[1];var offsetHeight=this.element.offsetHeight;var offsetWidth=this.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
-if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
-this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);};YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.element.style.left=parseInt(x,10)+"px";this.element.style.top=parseInt(y,10)+"px";this.syncPosition();this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);};YAHOO.widget.Overlay.prototype.onDomResize=funct
 ion(e,obj){YAHOO.widget.Overlay.superclass.onDomResize.call(this,e,obj);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
-this.iframe=null;YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;};YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){YAHOO.widget.Overlay.windowScrollEvent.fire();};YAHOO.widget.Overlay.windowResizeHandler=function(e){YAHOO.widget.Overlay.windowResizeEvent.fire();};YAHOO.widget.Overlay._initialized=null;if(YAHOO.widget.Overlay._initialized===null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
-YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},getActive:function(){},focus:function(overlay){},remove:function(overlay){},blurAll:function(){},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
-this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){this.blurAll();activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex,10)+2));}
-this.overlays.sort(this.compareZIndexDesc);}};this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){activeOverlay=null;for(var o=0;o<this.overlays.length;o++){YAHOO.util.Dom.removeClass(this.overlays[o].element,YAHOO.widget.OverlayManager.CSS_FOCUSED);}};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
-if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus");overlay.blurEvent=new YAHOO.util.CustomEvent("blur");var mgr=this;overlay.focus=function(){mgr.focus(this);this.focusEvent.fire();};overlay.blur=function(){mgr.blurAll();this.blurEvent.fire();};var focusOnDomEvent=function(e,obj){overlay.focus();};var focusevent=this.cfg.getProperty("focusevent");YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.setProperty("zIndex",0);}
-this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
-if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var p=0;p<this.overlays.length;p++){if(this.overlays[p].id==overlay){return this.overlays[p];}}}
-return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
-var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
-if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
-function handleKeyPress(e,obj){var keyPressed=e.charCode||e.keyCode;if(!keyData.shift){keyData.shift=false;}
-if(!keyData.alt){keyData.alt=false;}
-if(!keyData.ctrl){keyData.ctrl=false;}
-if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){if(keyPressed==keyData.keys[i]){keyEvent.fire(keyPressed,e);break;}}}else{if(keyPressed==keyData.keys){keyEvent.fire(keyPressed,e);}}}}
-this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
-this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
-this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.prototype.enabled=null;YAHOO.util.KeyListener.prototype.enable=function(){};YAHOO.util.KeyListener.prototype.disable=function(){};YAHOO.util.KeyListener.prototype.enabledEvent=null;YAHOO.util.KeyListener.prototype.disabledEvent=null;
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};YAHOO.util.Config.CONFIG_CHANGED_EVENT="configChanged";YAHOO.util.Config.BOOLEAN_TYPE="boolean";YAHOO.util.Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,checkBoolean:function(val){return(typeof val==YAHOO.util.Config.BOOLEAN_TYPE);},checkNumber:function(val){return(!isNaN(val));},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value);}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key,this.owner);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner);}
+this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}},getConfig:function(){var cfg={};for(var prop in this.config){var property=this.config[prop];if(property&&property.event){cfg[prop]=property.value;}}
+return cfg;},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value;}else{return undefined;}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!YAHOO.lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);}
+return true;}else{return false;}},setProperty:function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
+return true;}}else{return false;}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(!YAHOO.lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false;}else{if(!YAHOO.lang.isUndefined(value)){property.value=value;}else{value=property.value;}
+var foundDuplicate=false;var iLen=this.eventQueue.length;for(var i=0;i<iLen;i++){var queueItem=this.eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!YAHOO.lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break;}}}
+if(!foundDuplicate&&!YAHOO.lang.isUndefined(value)){this.eventQueue.push([key,value]);}}
+if(property.supercedes){var sLen=property.supercedes.length;for(var s=0;s<sLen;s++){var supercedesCheck=property.supercedes[s];var qLen=this.eventQueue.length;for(var q=0;q<qLen;q++){var queueItemCheck=this.eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break;}}}}}
+return true;}else{return false;}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!YAHOO.lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key);}else{this.fireEvent(key,property.value);}}},applyConfig:function(userConfig,init){if(init){this.initialConfig=userConfig;}
+for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}},refresh:function(){for(var prop in this.config){this.refireEvent(prop);}},fireQueue:function(){this.queueInProgress=true;for(var i=0;i<this.eventQueue.length;i++){var queueItem=this.eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=this.config[key];property.value=value;this.fireEvent(key,value);}}
+this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
+return true;}else{return false;}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
+return output;},outputEventQueue:function(){var output="";for(var q=0;q<this.eventQueue.length;q++){var queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
+return output;}};YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent(YAHOO.util.CONFIG_CHANGED_EVENT,this);this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];};YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
+return false;};YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}else{}};YAHOO.widget.Module.IMG_ROOT=null;YAHOO.widget.Module.IMG_ROOT_SSL=null;YAHOO.widget.Module.CSS_MODULE="yui-module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";YAHOO.widget.Module.textResizeEvent=new YAHOO.util.CustomEvent("textResize");YAHOO.widget.Module._EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"};YAHOO.widget.Module._DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes
 :["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true}};YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,initEvents:function(){var EVENT_TYPES=YAHOO.widget.Module._EVENT_TYPES;this.beforeInitEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_INIT,this);this.initEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.INIT,this);this.appendEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.APPEND,this);this.beforeRenderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_RENDER,this);this.renderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.RENDER,this);this.changeHeaderEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_HEADER,this);this.changeBodyEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_BODY,this);this.changeFooterEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_FOOTER,this);this.changeContentEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_CONTENT,this);this.de
 stroyEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.DESTORY,this);this.beforeShowEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SHOW,this);this.showEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW,this);this.beforeHideEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_HIDE,this);this.hideEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE,this);},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),
 initDefaultConfig:function(){var DEFAULT_CONFIG=YAHOO.widget.Module._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
+if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("div");el.id=elId;}}
+this.element=el;if(el.id){this.id=el.id;}
+var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
+this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
+this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;}
+resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth;var nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
+var fireTextResize=function(){YAHOO.widget.Module.textResizeEvent.fire();};if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.widget.Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!YAHOO.widget.Module.textResizeInitialized){if(!YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",fireTextResize)){YAHOO.util.Event.addListener(this.resizeMonitor,"resize",fireTextResize);}
+YAHOO.widget.Module.textResizeInitialized=true;}}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("div");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
+if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
+this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("div");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
+this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("div");this.body.className=YAHOO.widget.Module.CSS_BODY;}
+if(typeof bodyContent=="string")
+{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
+this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("div");this.body.className=YAHOO.widget.Module.CSS_BODY;}
+this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("div");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
+if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
+this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("div");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
+this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
+var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
+if(element){element.appendChild(me.element);me.appendEvent.fire();}};if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
+if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
+if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
+if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
+this.renderEvent.fire();return true;},destroy:function(){var parent;if(this.element){YAHOO.util.Event.purgeElement(this.element,true);parent=this.element.parentNode;}
+if(parent){parent.removeChild(this.element);}
+this.element=null;this.header=null;this.body=null;this.footer=null;for(var e in this){if(e instanceof YAHOO.util.CustomEvent){e.unsubscribeAll();}}
+YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}}};YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;};YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay._EVENT_TYPE
 S={"BEFORE_MOVE":"beforeMove","MOVE":"move"};YAHOO.widget.Overlay._DEFAULT_CONFIG={"X":{key:"x",validator:YAHOO.lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:YAHOO.lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:YAHOO.lang.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:YAHOO.lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.widget.Module.prototype.browser=="ie"?true:false),validator:YAHOO.lang.isBoolean,supercedes:["zIndex"]}};YAHOO.widget.Overlay.IFRAME_SRC="javascript:false;";YAHOO.widget.Ove
 rlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="yui-overlay";YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
+if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
+this.initEvent.fire(YAHOO.widget.Overlay);};YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);var EVENT_TYPES=YAHOO.widget.Overlay._EVENT_TYPES;this.beforeMoveEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_MOVE,this);this.moveEvent=new YAHOO.util.CustomEvent(EVENT_TYPES.MOVE,this);};YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);var DEFAULT_CONFIG=YAHOO.widget.Overlay._DEFAULT_CONFIG;this.cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONF
 IG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.config
 ConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});};YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);};YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");};YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass(this.element,"show-scrollbars");};YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility"
 );if(currentVis=="inherit"){var e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=YAHOO.util.Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break;}
+e=e.parentNode;}
+if(currentVis=="inherit"){currentVis="visible";}}
+var effect=this.cfg.getProperty("effect");var effectInstances=[];if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
+var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
+if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();for(var j=0;j<effectInstances.length;j++){var ei=effectInstances[j];if(j===0&&!YAHOO.util.Config.alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
+ei.animateIn();}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
+if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var k=0;k<effectInstances.length;k++){var h=effectInstances[k];if(k===0&&!YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
+h.animateOut();}}else if(currentVis===""){YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}};YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}};YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}};YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
+if(this.iframe){if(zIndex<=0){zIndex=1;}
+YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
+YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);};YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.before
 MoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);};YAHOO.widget.Overlay.prototype.showIframe=function(){if(this.iframe){this.iframe.style.display="block";}};YAHOO.widget.Overlay.prototype.hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}};YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showIframe,this)){this.showEvent.subscribe(this.showIframe,this,true);}
+if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideIframe,this)){this.hideEvent.subscribe(this.hideIframe,this,true);}
+var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
+if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=YAHOO.widget.Overlay.IFRAME_SRC;}
+var parent=this.element.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
+YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){this.showIframe();}else{this.hideIframe();}}
+var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
+YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=this.element.clientWidth;var height=this.element.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
+this.showEvent.unsubscribe(this.showIframe,this);this.hideEvent.unsubscribe(this.hideIframe,this);}};YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}};YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
+if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}};YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
+if(!contextAlign){contextAlign=contextArgs[2];}
+if(element&&context){var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}};switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}};YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];var offsetHeight=this.element.offsetHeight;var
  offsetWidth=this.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
+if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
+this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);};YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);};YAHOO.widget.Overlay.prototype.onDomResize=function(e,obj){YAHOO.widget.Overlay.superclass.onDom
 Resize.call(this,e,obj);var me=this;setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context");},0);};YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
+this.iframe=null;YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;};YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){if(YAHOO.widget.Module.prototype.browser=="ie"||YAHOO.widget.Module.prototype.browser=="ie7"){if(!window.scrollEnd){window.scrollEnd=-1;}
+clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){YAHOO.widget.Overlay.windowScrollEvent.fire();},1);}else{YAHOO.widget.Overlay.windowScrollEvent.fire();}};YAHOO.widget.Overlay.windowResizeHandler=function(e){if(YAHOO.widget.Module.prototype.browser=="ie"||YAHOO.widget.Module.prototype.browser=="ie7"){if(!window.resizeEnd){window.resizeEnd=-1;}
+clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){YAHOO.widget.Overlay.windowResizeEvent.fire();},100);}else{YAHOO.widget.Overlay.windowResizeEvent.fire();}};YAHOO.widget.Overlay._initialized=null;if(YAHOO.widget.Overlay._initialized===null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
+YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
+this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){if(activeOverlay!=o){if(activeOverlay){activeOverlay.blur();}
+activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex,10)+2));}
+this.overlays.sort(this.compareZIndexDesc);o.focusEvent.fire();}}};this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);if(o.element){YAHOO.util.Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);}
+o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent.unsubscribeAll();o.blurEvent.unsubscribeAll();o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].blur();}};this._onOverlayBlur=function(p_sType,p_aArgs){activeOverlay=null;};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
+if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(p_oEvent){var oTarget=YAHOO.util.Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||YAHOO.util.Dom.isAncestor(oClose,oTarget))){this.blur();}
+else{this.focus();}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay);},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus",overlay);overlay.blurEvent=new YAHOO.util.CustomEvent("blur",overlay);var mgr=this;overlay.focus=function(){mgr.focus(this);};overlay.blur=function(){if(mgr.getActive()==this){YAHOO.util.Dom.removeClass(this.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.blurEvent.fire();}};overlay.blurEvent.subscribe(mgr._onOverlayBlur);overlay.hideEvent.subscribe(overlay.blur);overlay.destroyEvent.subscribe(this._onOverlayDestroy,overlay,this);YAHOO.util.Event.addListener(overlay.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,overlay);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.
 setProperty("zIndex",0);}
+this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
+if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var p=0;p<this.overlays.length;p++){if(this.overlays[p].id==overlay){return this.overlays[p];}}}
+return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}};YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;}
+this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;};YAHOO.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new YAHOO.util.CustomEvent("beforeAnimateIn",this);this.beforeAnimateOutEvent=new YAHOO.util.CustomEvent("beforeAnimateOut",this);this.animateInCompleteEvent=new YAHOO.util.CustomEvent("animateInComplete",this);this.animateOutCompleteEvent=new YAHOO.util.CustomEvent("animateOutComplete",this);this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnima
 teOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);};YAHOO.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate();};YAHOO.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.toString=function(){var output="Containe
 rEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";}
+return output;};YAHOO.widget.ContainerEffect.FADE=function(overlay,dur){var fade=new YAHOO.widget.ContainerEffect(overlay,{attributes:{opacity:{from:0,to:1}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element);fade.handleStartAnimateIn=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
+if(obj.overlay.underlay){obj.initialUnderlayOpacity=YAHOO.util.Dom.getStyle(obj.overlay.underlay,"opacity");obj.overlay.underlay.style.filter=null;}
+YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
+if(obj.overlay.underlay){YAHOO.util.Dom.setStyle(obj.overlay.underlay,"opacity",obj.initialUnderlayOpacity);}
+obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(obj.overlay.underlay){obj.overlay.underlay.style.filter=null;}};fade.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
+YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",1);obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};YAHOO.widget.ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||YAHOO.util.Dom.getX(overlay.element);var y=overlay.cfg.getProperty("y")||YAHOO.util.Dom.getY(overlay.element);var clientWidth=YAHOO.util.Dom.getClientWidth();var offsetWidth=overlay.element.offsetWidth;var slide=new YAHOO.widget.ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=(-25-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";};slide.handleTweenAnimateIn=function(type,args,obj){var pos=YAHOO.ut
 il.Dom.getXY(obj.overlay.element);var currentX=pos[0];var currentY=pos[1];if(YAHOO.util.Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");}
+obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};slide.handleStartAnimateOut=function(type,args,obj){var vw=YAHOO.util.Dom.getViewportWidth();var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var yso=pos[1];var currentTo=obj.animOut.attributes.points.to;obj.animOut.attributes.points.to=[(vw+25),yso];};slide.handleTweenAnimateOut=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var xto=pos[0];var yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();retu
 rn slide;};YAHOO.register("container_core",YAHOO.widget.Module,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/dom/dom-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/dom/dom-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/dom/dom-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1 +1,59 @@
-/* Copyright (c) 2006, Yahoo! Inc. All rights reserved.  Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.3 */ YAHOO.util.Dom=function(){var ua=navigator.userAgent.toLowerCase();var isOpera=(ua.indexOf('opera')>-1);var isSafari=(ua.indexOf('safari')>-1);var isIE=(window.ActiveXObject);var id_counter=0;var util=YAHOO.util;var property_cache={};var toCamel=function(property){var convert=function(prop){var test=/(-[a-z])/i.exec(prop);return prop.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());};while(property.indexOf('-')>-1){property=convert(property);}return property;};var toHyphen=function(property){if(property.indexOf('-')>-1){return property;}var converted='';for(var i=0,len=property.length;i<len;++i){if(property.charAt(i)==property.charAt(i).toUpperCase()){converted=converted+'-'+property.charAt(i).toLowerCase();}else{converted=converted+property.charAt(i);}}return converted;};var cacheConvertedProperties=function(property
 ){property_cache[property]={camel:toCamel(property),hyphen:toHyphen(property)};};return{get:function(el){if(!el){return null;}if(typeof el!='string'&&!(el instanceof Array)){return el;}if(typeof el=='string'){return document.getElementById(el);}else{var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=util.Dom.get(el[i]);}return collection;}return null;},getStyle:function(el,property){var f=function(el){var value=null;var dv=document.defaultView;if(!property_cache[property]){cacheConvertedProperties(property);}var camel=property_cache[property]['camel'];var hyphen=property_cache[property]['hyphen'];if(property=='opacity'&&el.filters){value=1;try{value=el.filters.item('DXImageTransform.Microsoft.Alpha').opacity/100;}catch(e){try{value=el.filters.item('alpha').opacity/100;}catch(e){}}}else if(el.style[camel]){value=el.style[camel];}else if(isIE&&el.currentStyle&&el.currentStyle[camel]){value=el.currentStyle[camel];}else if(dv&&dv.getComputedStyl
 e){var computed=dv.getComputedStyle(el,'');if(computed&&computed.getPropertyValue(hyphen)){value=computed.getPropertyValue(hyphen);}}return value;};return util.Dom.batch(el,f,util.Dom,true);},setStyle:function(el,property,val){if(!property_cache[property]){cacheConvertedProperties(property);}var camel=property_cache[property]['camel'];var f=function(el){switch(property){case'opacity':if(isIE&&typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}else{el.style.opacity=val;el.style['-moz-opacity']=val;el.style['-khtml-opacity']=val;}break;default:el.style[camel]=val;}};util.Dom.batch(el,f,util.Dom,true);},getXY:function(el){var f=function(el){if(el.offsetParent===null||this.getStyle(el,'display')=='none'){return false;}var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){do
 c=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}}if(isSafari&&this.getStyle(el,'position')=='absolute'){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}if(el.parentNode){parentNode=el.parentNode;}else{parentNode=null;}while(parentNode&&parentNode.tagName.toUpperCase()!='BODY'&&parentNode.tagName.toUpperCase()!='HTML'){if(util.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}if(parentNode.parentNode){parentNode=parentNode.parentNode;}else{parentNode=null;}}return pos;};return util.Dom.b
 atch(el,f,util.Dom,true);},getX:function(el){var f=function(el){return util.Dom.getXY(el)[0];};return util.Dom.batch(el,f,util.Dom,true);},getY:function(el){var f=function(el){return util.Dom.getXY(el)[1];};return util.Dom.batch(el,f,util.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}var pageXY=this.getXY(el);if(pageXY===false){return false;}var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}var newXY=this.getXY(el);if(!noRetry&&(newXY[0]!=pos[0]||newXY[1]!=pos[1])){this.setXY(el,pos,true);}};util.Dom.batch(el,f,util.Dom,true);},setX:fu
 nction(el,x){util.Dom.setXY(el,[x,null]);},setY:function(el,y){util.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new YAHOO.util.Region.getRegion(el);return region;};return util.Dom.batch(el,f,util.Dom,true);},getClientWidth:function(){return util.Dom.getViewportWidth();},getClientHeight:function(){return util.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return util.Dom.hasClass(el,className)};return util.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el['className']);};return util.Dom.batch(el,f,util.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}el['className']=[el['className'],className].join(' ');};util.Dom.batch(el,f,util.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$
 )','g');var f=function(el){if(!this.hasClass(el,className)){return;}var c=el['className'];el['className']=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};util.Dom.batch(el,f,util.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;};var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}el['className']=el['className'].replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};util.Dom.batch(el,f,util.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=util.Dom.get(el);}else{el={};}if(!el.id){el.id=prefix+id_counter++;}return el.id;};return util.Dom.batch(el,f,util.Dom,true);},isAncestor:function(haystack,needle){haystack=util.Dom.get(haystack);if(!haystack||!needle){retur
 n false;}var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}parent=parent.parentNode;}return false;}};return util.Dom.batch(needle,f,util.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return util.Dom.batch(el,f,util.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';root=util.Dom.get(root)||document;var nodes=[];var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}return nodes;},batch:function(el,method,o,override){var id=el;el=util.Dom.get(el);var scope=(ove
 rride)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}return method.call(scope,el,o);}var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=id[i];}collection[collection.length]=method.call(scope,el[i],o);}return collection;},getDocumentHeight:function(){var scrollHeight=-1,windowHeight=-1,bodyHeight=-1;var marginTop=parseInt(util.Dom.getStyle(document.body,'marginTop'),10);var marginBottom=parseInt(util.Dom.getStyle(document.body,'marginBottom'),10);var mode=document.compatMode;if((mode||isIE)&&!isOpera){switch(mode){case'CSS1Compat':scrollHeight=((window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:-1);windowHeight=[document.documentElement.clientHeight,self.innerHeight||-1].sort(function(a,b){return(a-b);})[1];bodyHeight=document.body.offsetHeight+marginTop+marginBottom;break;default:scrollHeight=document.body.scrollHeight;bodyHeight=document.body.clientHeight;}}else{scrollHeight=document.documentElement.scrollHeight;w
 indowHeight=self.innerHeight;bodyHeight=document.documentElement.clientHeight;}var h=[scrollHeight,windowHeight,bodyHeight].sort(function(a,b){return(a-b);});return h[2];},getDocumentWidth:function(){var docWidth=-1,bodyWidth=-1,winWidth=-1;var marginRight=parseInt(util.Dom.getStyle(document.body,'marginRight'),10);var marginLeft=parseInt(util.Dom.getStyle(document.body,'marginLeft'),10);var mode=document.compatMode;if(mode||isIE){switch(mode){case'CSS1Compat':docWidth=document.documentElement.clientWidth;bodyWidth=document.body.offsetWidth+marginLeft+marginRight;break;default:bodyWidth=document.body.clientWidth;docWidth=document.body.scrollWidth;break;}}else{docWidth=document.documentElement.clientWidth;bodyWidth=document.body.offsetWidth+marginLeft+marginRight;}var w=Math.max(docWidth,bodyWidth);return w;},getViewportHeight:function(){var height=-1;var mode=document.compatMode;if((mode||isIE)&&!isOpera){switch(mode){case'CSS1Compat':height=document.documentElement.clientHe
 ight;break;default:height=document.body.clientHeight;}}else{height=self.innerHeight;}return height;},getViewportWidth:function(){var width=-1;var mode=document.compatMode;if(mode||isIE){switch(mode){case'CSS1Compat':width=document.documentElement.clientWidth;break;default:width=document.body.clientWidth;}}else{width=self.innerWidth;}return width;}};}();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b
 ,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
+if(propertyCache[property]){return propertyCache[property];}
+var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
+propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
+var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
+return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
+return val/100;break;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
+if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
+break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
+el.style[property]=val;};}
+YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}
+if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
+return c;}
+if(el){return el;}
+return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
+var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}
+var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}
+else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
+parentNode=parentNode.offsetParent;}}
+if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
+parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
+{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
+parentNode=parentNode.parentNode;}
+return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
+var pageXY=this.getXY(el);if(pageXY===false){return false;}
+var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
+if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
+if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
+if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
+if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
+el.className=[el.className,className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
+var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
+var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
+el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
+if(!el.id){el.id=prefix+id_counter++;}
+return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
+var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
+else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
+else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
+else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
+parent=parent.parentNode;}
+return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
+var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
+for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
+return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
+return method.call(scope,el,o);}
+var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
+collection[collection.length]=method.call(scope,el[i],o);}
+return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
+return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
+return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region
  {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
+this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/event/event-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/event/event-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/event/event-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1 +1,87 @@
-/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt Version: 0.11.4*/ YAHOO.util.CustomEvent=function(_1,_2,_3){this.type=_1;this.scope=_2||window;this.silent=_3;this.subscribers=[];if(!this.silent){}};YAHOO.util.CustomEvent.prototype={subscribe:function(fn,_5,_6){this.subscribers.push(new YAHOO.util.Subscriber(fn,_5,_6));},unsubscribe:function(fn,_7){var _8=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_7)){this._delete(i);_8=true;}}return _8;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return;}var _12=[];for(var i=0;i<arguments.length;++i){_12.push(arguments[i]);}if(!this.silent){}for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}var _13=(s.override)?s.obj:this.scope;s.fn.call(_13,this.type,_12,s.obj);}}},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._del
 ete(len-1-i);}},_delete:function(_14){var s=this.subscribers[_14];if(s){delete s.fn;delete s.obj;}this.subscribers.splice(_14,1);},toString:function(){return "CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,_16){this.fn=fn;this.obj=obj||null;this.override=(_16);};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){return (this.fn==fn&&this.obj==obj);};YAHOO.util.Subscriber.prototype.toString=function(){return "Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var _17=false;var _18=[];var _19=[];var _20=[];var _21=[];var _22=[];var _23=0;var _24=[];var _25=[];var _26=0;return {POLL_RETRYS:200,POLL_INTERVAL:50,EL:0,TYPE:1,FN:2,WFN:3,SCOPE:3,ADJ_SCOPE:4,isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),addDelayedListener:function(el,_28
 ,fn,_29,_30){_19[_19.length]=[el,_28,fn,_29,_30];if(_17){_23=this.POLL_RETRYS;this.startTimeout(0);}},startTimeout:function(_31){var i=(_31||_31===0)?_31:this.POLL_INTERVAL;var _32=this;var _33=function(){_32._tryPreloadAttach();};this.timeout=setTimeout(_33,i);},onAvailable:function(_34,_35,_36,_37){_24.push({id:_34,fn:_35,obj:_36,override:_37});_23=this.POLL_RETRYS;this.startTimeout(0);},addListener:function(el,_38,fn,_39,_40){if(!fn||!fn.call){return false;}if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=(this.on(el[i],_38,fn,_39,_40)&&ok);}return ok;}else{if(typeof el=="string"){var oEl=this.getEl(el);if(_17&&oEl){el=oEl;}else{this.addDelayedListener(el,_38,fn,_39,_40);return true;}}}if(!el){return false;}if("unload"==_38&&_39!==this){_20[_20.length]=[el,_38,fn,_39,_40];return true;}var _43=(_40)?_39:el;var _44=function(e){return fn.call(_43,YAHOO.util.Event.getEvent(e),_39);};var li=[el,_38,fn,_44,_43];var _47=_18.length;_18[_47]=li;i
 f(this.useLegacyEvent(el,_38)){var _48=this.getLegacyIndex(el,_38);if(_48==-1||el!=_21[_48][0]){_48=_21.length;_25[el.id+_38]=_48;_21[_48]=[el,_38,el["on"+_38]];_22[_48]=[];el["on"+_38]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),_48);};}_22[_48].push(li);}else{if(el.addEventListener){el.addEventListener(_38,_44,false);}else{if(el.attachEvent){el.attachEvent("on"+_38,_44);}}}return true;},fireLegacyEvent:function(e,_49){var ok=true;var le=_22[_49];for(var i=0,len=le.length;i<len;++i){var li=le[i];if(li&&li[this.WFN]){var _51=li[this.ADJ_SCOPE];var ret=li[this.WFN].call(_51,e);ok=(ok&&ret);}}return ok;},getLegacyIndex:function(el,_53){var key=this.generateId(el)+_53;if(typeof _25[key]=="undefined"){return -1;}else{return _25[key];}},useLegacyEvent:function(el,_55){if(!el.addEventListener&&!el.attachEvent){return true;}else{if(this.isSafari){if("click"==_55||"dblclick"==_55){return true;}}}return false;},removeListener:function(el,_56,fn,_57){if(!
 fn||!fn.call){return false;}var i,len;if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],_56,fn)&&ok);}return ok;}}if("unload"==_56){for(i=0,len=_20.length;i<len;i++){var li=_20[i];if(li&&li[0]==el&&li[1]==_56&&li[2]==fn){_20.splice(i,1);return true;}}return false;}var _58=null;if("undefined"==typeof _57){_57=this._getCacheIndex(el,_56,fn);}if(_57>=0){_58=_18[_57];}if(!el||!_58){return false;}if(this.useLegacyEvent(el,_56)){var _59=this.getLegacyIndex(el,_56);var _60=_22[_59];if(_60){for(i=0,len=_60.length;i<len;++i){li=_60[i];if(li&&li[this.EL]==el&&li[this.TYPE]==_56&&li[this.FN]==fn){_60.splice(i,1);}}}}else{if(el.removeEventListener){el.removeEventListener(_56,_58[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_56,_58[this.WFN]);}}}delete _18[_57][this.WFN];delete _18[_57][this.FN];_18.splice(_57,1);return true;},getTarget:function(ev,_62){var t=ev.targe
 t||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(_64){if(_64&&_64.nodeName&&"#TEXT"==_64.nodeName.toUpperCase()){return _64.parentNode;}else{return _64;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},getXY:function(ev){return [this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(e
 v.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){return ev.charCode||((ev.type=="keypress")?ev.keyCode:0);},_getCacheIndex:function(el,_68,fn){for(var i=0,len=_18.length;i<len;++i){var li=_18[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_68){return i;}}return -1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+_26;++_26;el.id=id;}return id;},_isValidCollection:function(o){return (o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},_load:function(e){_17=true;var EU=YAHOO.util.Event;EU._simpleRemove(window,"load",EU._load);},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var _72=!_17;if(!_7
 2){_72=(_23>0);}var _73=[];for(var i=0,len=_19.length;i<len;++i){var d=_19[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE],d[this.ADJ_SCOPE]);delete _19[i];}else{_73.push(d);}}}_19=_73;var _75=[];for(i=0,len=_24.length;i<len;++i){var _76=_24[i];if(_76){el=this.getEl(_76.id);if(el){var _77=(_76.override)?_76.obj:el;_76.fn.call(_77,_76.obj);delete _24[i];}else{_75.push(_76);}}}_23=(_73.length===0&&_75.length===0)?0:_23-1;if(_72){this.startTimeout();}this.locked=false;return true;},purgeElement:function(el,_78,_79){var _80=this.getListeners(el,_79);if(_80){for(var i=0,len=_80.length;i<len;++i){var l=_80[i];this.removeListener(el,l.type,l.fn);}}if(_78&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],_78,_79);}}},getListeners:function(el,_82){var _83=[];if(_18&&_18.length>0){for(var i=0,len=_18.length;i<len;++i){var l=_18[i];if(l&&l[this.EL]===el&&(!_82||_82===l[this.TYPE])){_83.push(
 {type:l[this.TYPE],fn:l[this.FN],obj:l[this.SCOPE],adjust:l[this.ADJ_SCOPE],index:i});}}}return (_83.length)?_83:null;},_unload:function(e){var EU=YAHOO.util.Event;for(var i=0,len=_20.length;i<len;++i){var l=_20[i];if(l){var _84=(l[EU.ADJ_SCOPE])?l[EU.SCOPE]:window;l[EU.FN].call(_84,EU.getEvent(e),l[EU.SCOPE]);delete _20[i];l=null;}}if(_18&&_18.length>0){var j=_18.length;while(j){var _86=j-1;l=_18[_86];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],_86);}l=null;j=j-1;}EU.clearCache();}for(i=0,len=_21.length;i<len;++i){delete _21[i][0];delete _21[i];}EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return [dd.scrollTop,dd.scrollLeft];}else{if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}}},_simpleAdd:function(el,_88,fn,_89){if(el.addEventLis
 tener){el.addEventListener(_88,fn,(_89));}else{if(el.attachEvent){el.attachEvent("on"+_88,fn);}}},_simpleRemove:function(el,_90,fn,_91){if(el.removeEventListener){el.removeEventListener(_90,fn,(_91));}else{if(el.detachEvent){el.detachEvent("on"+_90,fn);}}}};}();YAHOO.util.Event.on=YAHOO.util.Event.addListener;if(document&&document.body){YAHOO.util.Event._load();}else{YAHOO.util.Event._simpleAdd(window,"load",YAHOO.util.Event._load);}YAHOO.util.Event._simpleAdd(window,"unload",YAHOO.util.Event._unload);YAHOO.util.Event._tryPreloadAttach();}
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
+var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
+if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
+this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
+var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
+return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
+var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
+var argslength=args.length;if(!this.silent){}
+for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}
+var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
+ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
+if(false===ret){if(!this.silent){}
+return false;}}}
+return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
+return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
+this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
+return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}
+return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
+if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
+return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
+if(!el){return false;}
+if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
+var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
+var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
+legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
+return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
+le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
+return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
+return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
+return ok;}
+if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
+if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}
+return false;}
+var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
+if(index>=0){cacheItem=listeners[index];}
+if(!el||!cacheItem){return false;}
+if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
+delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
+return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
+return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
+return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
+return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
+c=c.caller;}}
+return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
+return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
+return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
+if(this.isIE&&!DOMReady){return false;}
+this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
+var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
+item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
+for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
+retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
+this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}
+if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
+for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
+return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
+l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
+unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
+j=j-1;}
+l=null;EU.clearCache();}
+for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
+legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if
 (EU.isIE){document.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"></script>');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}
+EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
+YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
+subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
+this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
+return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
+return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
+return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
+if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
+var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
+if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
+function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
+if(!keyData.alt){keyData.alt=false;}
+if(!keyData.ctrl){keyData.ctrl=false;}
+if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
+this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
+this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
+this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
+(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/yui/yahoo/yahoo-min.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/yui/yahoo/yahoo-min.js	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/js/yui/yahoo/yahoo-min.js	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1 +1,17 @@
-/* Copyright (c) 2006, Yahoo! Inc. All rights reserved.Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.4*/ if(typeof YAHOO=="undefined"){YAHOO={};}YAHOO.namespace=function(ns){if(!ns||!ns.length){return null;}var _2=ns.split(".");var _3=YAHOO;for(var i=(_2[0]=="YAHOO")?1:0;i<_2.length;++i){_3[_2[i]]=_3[_2[i]]||{};_3=_3[_2[i]];}return _3;};YAHOO.log=function(_5,_6,_7){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(_5,_6,_7);}else{return false;}};YAHOO.extend=function(_9,_10){var f=function(){};f.prototype=_10.prototype;_9.prototype=new f();_9.prototype.constructor=_9;_9.superclass=_10.prototype;if(_10.prototype.constructor==Object.prototype.constructor){_10.prototype.constructor=_10;}};YAHOO.namespace("util");YAHOO.namespace("widget");YAHOO.namespace("example");
\ No newline at end of file
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.2.2
+*/
+
+if(typeof YAHOO=="undefined"){var YAHOO={};}
+YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
+return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
+if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
+var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
+if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj=='object'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
+return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
+var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
+if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}
+var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/locale/admin/locale_en_UK.php
===================================================================
--- plog/branches/lifetype-1.3-ajax/locale/admin/locale_en_UK.php	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/locale/admin/locale_en_UK.php	2007-07-13 17:34:45 UTC (rev 5651)
@@ -44,7 +44,7 @@
 $messages['manageCustomFields'] = 'Manage Custom Fields';
 $messages['blogCustomFields'] = 'Custom Fields';
 $messages['newCustomField'] = 'New Custom Field';
-$messages['resourceCenter'] = 'Resource Centre';
+$messages['resourceCenter'] = 'Media';
 $messages['resources'] = 'Resources';
 $messages['newResourceAlbum'] = 'New Album';
 $messages['newResource'] = 'New Resource';
@@ -1191,7 +1191,7 @@
 
 /// new strings in LT 1.3 ///
 // friend management
-$messages['friendManagement'] = 'Friend Management';
+$messages['friendManagement'] = 'Friends';
 $messages['friend'] = 'Friend'; 
 $messages['friends'] = 'Friends'; 
 $messages['manageFriends'] = 'Friend Management';
@@ -1260,4 +1260,10 @@
 $messages['error_incorrect_friend_id'] = 'The friend identifier is not correct.';
 $messages['friend_deleted_ok'] = 'Friend "%s" deleted successfully.';
 $messages['friends_deleted_ok'] = '%s friends deleted successfully.';
+
+////
+// added in LT 1.3
+////
+$messages['error_incorrect_value'] = 'The value is not correct';
+
 ?>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/addbloguser.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/addbloguser.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/addbloguser.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,6 +1,6 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/addbloguser.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=newBlogUser title=$locale->tr("newBlogUser")}
-
  <form name="addBlogUser" id="addBlogUser" action="admin.php" method="post">
    <fieldset class="inputField">
   
@@ -35,7 +35,7 @@
       <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>     
         {$locale->tr("quick_permission_selection")}
         </br>
-        <select name="preselection" onChange="togglePermissionSets('addBlogUser', this.value);">
+        <select name="preselection" onChange="Lifetype.UI.Pages.AddBlogUser.togglePermissionSets('addBlogUser', this.value);">
           <option value=""/>{$locale->tr("select")}</option>
           <option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
           <option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/blogcategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/blogcategories.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/blogcategories.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -32,7 +32,7 @@
  <table id="list" class="info" summary="{$locale->tr("editBlogCategories")}">
   <thead>
    <tr>
-    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deleteCategories');" /></th>
+    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteCategories');" /></th>
     <th style="width:75%;">{$locale->tr("category")}</th>
     <th style="width:15%;">{$locale->tr("blogs")}</th>
     <th style="width:10%;">{$locale->tr("actions")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/blogsettings.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/blogsettings.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/blogsettings.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,18 +1,17 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/templatechooser.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogSettings title=$locale->tr("blogSettings")}
-
- <form name="blogSettings" action="admin.php" method="post">
+<form name="blogSettings" id="blogSettings" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=updateBlogSettings&output=json');return(false);">
   <fieldset class="inputField">
     <legend>{$locale->tr("blogSettings")}</legend> 
-  {include file="$admintemplatepath/successmessage.template"}
-  {include file="$admintemplatepath/errormessage.template"}
+	{include file="$admintemplatepath/formvalidateajax.template"}
 
     <div class="field">
       <label for="blogName">{$locale->tr("name")}</label>
       <span class="required">*</span>
       <div class="formHelp">{$locale->tr("blog_name_help")}</div>
       <input type="text" name="blogName" id="blogName" style="width:100%" value="{$blogName}" />
-      {include file="$admintemplatepath/validate.template" field=blogName message=$locale->tr("error_invalid_blog_name")}
+      {include file="$admintemplatepath/validateajax.template" field=blogName}
     </div>
 
     {if $blogDomainsEnabled}
@@ -32,8 +31,8 @@
         </option>
        {/foreach}
       </select>
-      {include file="$admintemplatepath/validate.template" field=blogSubDomain message=$locale->tr("error_invalid_subdomain")}
-      {include file="$admintemplatepath/validate.template" field=blogMainDomain message=$locale->tr("error_invalid_domain")}
+      {include file="$admintemplatepath/validateajax.template" field=blogSubDomain}
+      {include file="$admintemplatepath/validateajax.template" field=blogMainDomain}
     </div>
     {/if}
 
@@ -54,7 +53,7 @@
 	   </option>
       {/foreach}
       </select>
-      {include file="$admintemplatepath/validate.template" field=blogLocale message=$locale->tr("error_invalid_locale")}
+      {include file="$admintemplatepath/validateajax.template" field=blogLocale message=$locale->tr("error_invalid_locale")}
     </div>
 
     {if $location_data_enabled}
@@ -79,7 +78,7 @@
 	   </option>
       {/foreach}
       </select>
-      {include file="$admintemplatepath/validate.template" field=blogCategory message=$locale->tr("error_invalid_blog_category")}
+      {include file="$admintemplatepath/validateajax.template" field=blogCategory}
     </div>
 
     <div class="field">
@@ -87,7 +86,7 @@
      <span class="required">*</span>
      <div class="formHelp">{$locale->tr("max_main_page_items_help")}</div>
      <input type="text" name="blogMaxMainPageItems" id="blogMaxMainPageItems" value="{$blogMaxMainPageItems}"/>
-     {include file="$admintemplatepath/validate.template" field=blogMaxMainPageItems message=$locale->tr("error_invalid_number")}
+     {include file="$admintemplatepath/validateajax.template" field=blogMaxMainPageItems}
     </div>
 
     <div class="field">
@@ -95,7 +94,7 @@
      <span class="required">*</span>
      <div class="formHelp">{$locale->tr("max_recent_items_help")}</div>
      <input type="text" name="blogMaxRecentItems" id="blogMaxRecentItems" value="{$blogMaxRecentItems}" />
-     {include file="$admintemplatepath/validate.template" field=blogMaxRecentItems message=$locale->tr("error_invalid_number")}
+     {include file="$admintemplatepath/validateajax.template" field=blogMaxRecentItems}
     </div>
 
     <div class="field">
@@ -108,8 +107,8 @@
         <option value="{$template->getName()}"{if $template->getName() == $blogTemplateSet->getName()} selected="selected" {/if}>{$template->getName()}</option>
        {/foreach}
       </select>
-      <a href="javascript:openTemplateChooserWindow();">{$locale->tr("choose")}...</a>
-      <br/>{include file="$admintemplatepath/validate.template" field=blogTemplate message=$locale->tr("error_incorrect_template")}
+      <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openTemplateChooserWindow();">{$locale->tr("choose")}...</a>
+      <br/>{include file="$admintemplatepath/validateajax.template" field=blogTemplate}
      </div>
 
      <div class="field">
@@ -152,7 +151,7 @@
      <label for="blogNumCommentsPerPage">{$locale->tr("show_comments_max")}</label>
      <div class="formHelp">{$locale->tr("show_comments_max_help")}</div>
      <input type="text" name="blogNumCommentsPerPage" id="blogNumCommentsPerPage" value="{$blogNumCommentsPerPage}" />
-     {include file="$admintemplatepath/validate.template" field=blogNumCommentsPerPage message=$locale->tr("error_invalid_number")}
+     {include file="$admintemplatepath/validateajax.template" field=blogNumCommentsPerPage}
     </div>     
 
      <div class="field">
@@ -360,7 +359,6 @@
            value="20">+20 {$locale->tr("hours")} ({$timeNow+20*3600|date_format:"%H:%M"})
        </option>
       </select>
-      {** include file="$admintemplatepath/validate.template" field=blogTimeOffset message=$locale->tr("error_incorrect_time_offset") **}
 	 </div>  
      
     </fieldset>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/blogtemplates.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/blogtemplates.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/blogtemplates.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
   <table id="list" class="info" summary="{$locale->tr("blogTemplates")}" id="list">
    <thead>
     <tr>
-      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('editTemplates');" /></th>
+      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('editTemplates');" /></th>
       <th style="width:90%;">{$locale->tr("template")}</th>
       <th style="width:10%;">{$locale->tr("actions")}</th>
     </tr>
@@ -33,7 +33,7 @@
     </td>
     <td  class="col_highlighted">
 	 {if $sitetemplate->hasScreenshot()}
-	  <a href="javascript:openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');">{$sitetemplate->getName()}</a>
+	  <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');">{$sitetemplate->getName()}</a>
 	 {else}
       {$sitetemplate->getName()}
 	 {/if} 
@@ -48,7 +48,7 @@
       </a>
       {/check_perms}
 	  {if $sitetemplate->hasScreenshot()}
-	    <a href="javascript:openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');" title="{$locale->tr("preview")}">
+	    <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');" title="{$locale->tr("preview")}">
 		  <img src="imgs/admin/icon_image-16.png" title="{$locale->tr("preview")}" />
 		</a>
 	  {/if}		  

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/blogusers.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/blogusers.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/blogusers.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
             <table id="list" class="info" summary="{$locale->tr("showBlogUsers")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('blogUsers');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('blogUsers');" /></th>
                         <th style="width:20%;">{$locale->tr("username")}</th>
                         <th style="width:40%;">{$locale->tr("full_name")}</th>                        
                         <th style="width:30%;">{$locale->tr("email")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/chooser/blogtemplatechooser.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/chooser/blogtemplatechooser.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/chooser/blogtemplatechooser.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,4 +1,5 @@
 {include file="$admintemplatepath/chooser/header.template"}
+{js src="js/ui/pages/templatechooser.js"}
 <div id="container">
 <table id="list" class="info" summary="{$locale->tr("template")}">
  <thead>
@@ -12,8 +13,8 @@
   {/if} 
     <td>
      {assign var=templateName value=$template->getName()}
-     <b>{$templateName}</b>&nbsp;(<a href="javascript:blogTemplateSelector('{$templateName}')">{$locale->tr("select")}</a>)<br/>
-     <a href="javascript:blogTemplateSelector('{$templateName}')"><img src="{$template->getScreenshotUrl()}" alt="{$templateName}" height="150" width="200" /></a>
+     <b>{$templateName}</b>&nbsp;(<a href="javascript:Lifetype.UI.Pages.TemplateChooser.blogTemplateSelector('{$templateName}')">{$locale->tr("select")}</a>)<br/>
+     <a href="javascript:Lifetype.UI.Pages.TemplateChooser.blogTemplateSelector('{$templateName}')"><img src="{$template->getScreenshotUrl()}" alt="{$templateName}" height="150" width="200" /></a>
     </td>
   {if ($smarty.foreach.template.iteration % 2) == 0}     
    </tr> 

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteblogschooser.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteblogschooser.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteblogschooser.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -55,7 +55,7 @@
 	     {if $mode=="1"}
           <a href="#" onclick="setDocumentField(parent.opener.document,'blogName','{$siteblog->getBlog()|escape:javascript}');setDocumentField(parent.opener.document,'blogId','{$siteblog->getId()}');window.close()">
 		 {else}
-		  <a href="#" onclick="appendDocumentList(parent.opener.document,'blogList','{$siteblog->getId()}','{$siteblog->getBlog()|escape:javascript}');window.close()">
+		  <a href="#" onclick="Lifetype.Forms.List.appendToExternalList(parent.opener.document,'blogList','{$siteblog->getId()}','{$siteblog->getBlog()|escape:javascript}');window.close()">
 		 {/if}
 		 {$siteblog->getBlog()}
 		</a>
@@ -77,7 +77,7 @@
 		  {if $mode=="1"}
             <a href="#" onclick="setDocumentField(parent.opener.document,'blogName','{$siteblog->getBlog()|escape:javascript}');setDocumentField(parent.opener.document,'blogId','{$siteblog->getId()}');window.close()">
 		  {else}
-		    <a href="#" onclick="appendDocumentList(parent.opener.document,'blogList','{$siteblog->getId()}','{$siteblog->getBlog()|escape:javascript}');window.close()">		 
+		    <a href="#" onclick="Lifetype.Forms.List.appendToExternalList(parent.opener.document,'blogList','{$siteblog->getId()}','{$siteblog->getBlog()|escape:javascript}');window.close()">		 
 		  {/if}
 		  <img src="imgs/admin/icon_arrow-16.png" alt="{$locale->tr("select_user")}" />
 		 </a>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteuserschooser.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteuserschooser.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/chooser/siteuserschooser.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -66,7 +66,7 @@
 						    {if $mode=="1"}
                               <a href="javascript:setDocumentField(top.document, 'userName','{$siteuser->getUsername()}');setDocumentField(top.document,'userId','{$siteuser->getId()}');window.close()">
 							{else}
-							  <a href="javascript:appendDocumentList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
+							  <a href="javascript:Lifetype.Forms.List.appendToExternalList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
 							{/if}
 							  {$siteuser->getUsername()}
 							</a>
@@ -92,7 +92,7 @@
 						    {if $mode=="1"}
                               <a href="javascript:setDocumentField(top.document, 'userName','{$siteuser->getUsername()}');setDocumentField(top.document,'userId','{$siteuser->getId()}');window.close()">
 							{else}
-							  <a href="javascript:appendDocumentList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
+							  <a href="javascript:Lifetype.Forms.List.appendToExternalList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
 							{/if}
 							  <img src="imgs/admin/icon_arrow-16.png" alt="{$locale->tr("select_user")}" />
 							</a>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/chooser/userpictureselect.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/chooser/userpictureselect.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/chooser/userpictureselect.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/chooser/header.template"}
-<script type="text/javascript" src="js/ui/plogui.js"></script>
+{js src="js/ui/plogui.js"}
+{js src="js/ui/pages/userpictureselect.js"}
 {literal}
 <style type="text/css">
 #resource_list_upload
@@ -81,12 +82,12 @@
 <tr>
  <td>
   {if $resource->hasPreview()}
-   <a href="javascript:returnResourceInformation('{$resource->getId()}','{$url->resourcePreviewLink($resource)}');window.close();"><img src="{$url->resourcePreviewLink($resource)}" alt="Preview" /></a>
+   <a href="javascript:Lifetype.UI.Pages.UserPictureSelect.returnResourceInformation('{$resource->getId()}','{$url->resourcePreviewLink($resource)}');window.close();"><img src="{$url->resourcePreviewLink($resource)}" alt="Preview" /></a>
   {/if}
  <a target="_blank" href="{$url->resourceLink($resource)}"><br/>{$resource->getFileName()}</a>
  </td>
  <td>
- <a href="javascript:returnResourceInformation('{$resource->getId()}','{$url->rawResourcePreviewLink($resource)}');window.close();">{$locale->tr("select")}</a>
+ <a href="javascript:Lifetype.UI.Pages.UserPictureSelect.returnResourceInformation('{$resource->getId()}','{$url->rawResourcePreviewLink($resource)}');window.close();">{$locale->tr("select")}</a>
  </td> 
 </tr>
 {/foreach}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -17,7 +17,7 @@
             <table id="list" class="info" summary="{$locale->tr("blogCustomFields")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('customFields');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('customFields');" /></th>
                         <th style="width:25%;">{$locale->tr("name")}</th>
                         <th style="width:40%">{$locale->tr("description")}</th>
                         <th style="width:15%">{$locale->tr("type")}</th>                        

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/default.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/default.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/default.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,10 +1,10 @@
 {include file="$blogtemplate/simpleheader.template"}
+{js src="js/ui/pages/default.js"}
 	<div class="loginBox" style="padding-top: 180px;">
-	   <form name="loginForm" method="post" action="admin.php">
+	   <form name="loginForm" id="loginForm" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.Default.submitHook();return(false);">
 		  <fieldset class="inputField">
 		   <h4>{$locale->tr("login")}</h4> 
-            {include file="$blogtemplate/errormessage.template" message=$viewErrorMessage}
-            {include file="$blogtemplate/successmessage.template" message=$viewSuccessMessage}
+			{include file="$blogtemplate/formvalidateajax.template"}
 		   {if $viewIsError=="" && $viewIsSuccess==""}
 		     <div class="welcomeMessage">
 		   	   {$locale->tr("welcome_message")}
@@ -26,5 +26,4 @@
 		</div> 
        </form>		
 	</div>
-
-{include file="$blogtemplate/simplefooter.template"}
+{include file="$blogtemplate/simplefooter.template"}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -40,7 +40,7 @@
  <table class="info" id="info" summary="{$locale->tr("editArticleCategories")}">
   <thead>
    <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deleteCategories');" /></th>
+    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteCategories');" /></th>
     <th style="width:50%;">{$locale->tr("category")}</th>
     <th style="width:20%">{$locale->tr("posts")}</th>
     <th style="width:20%">{$locale->tr("show_in_main_page")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,26 +1,26 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editArticleCategories title=$locale->tr("editArticleCategories")}
 
- <form name="editArticleCategory" action="admin.php" method="post">
+ <form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
 
   <fieldset class="inputField">
    <legend>{$locale->tr("editArticleCategories")}</legend>
-   {include file="$admintemplatepath/formvalidate.template"}
+   {include file="$admintemplatepath/formvalidateajax.template"}
 
    <div class="field">
     <label for="categoryName">{$locale->tr("name")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("category_name_help")}</div>
     <input type="text" id="categoryName" name="categoryName" value="{$categoryName|escape:"html"}"/>
-    {include file="$admintemplatepath/validate.template" field=categoryName message=$locale->tr("error_empty_name")}
+    {include file="$admintemplatepath/validateajax.template" field=categoryName}
    </div>
 
    <div class="field">
     <label for="categoryDescription">{$locale->tr("description")}</label>
-    <span class="required">*</span>
+    <span class="required"></span>
     <div class="formHelp">{$locale->tr("category_description_help")}</div>
     <textarea name="categoryDescription" id="categoryDescription" cols="60" rows="5">{$categoryDescription}</textarea>
-    {include file="$admintemplatepath/validate.template" field=categoryDescription message=$locale->tr("error_empty_description")}
+    {include file="$admintemplatepath/validateajax.template" field=categoryDescription}
   </div>
 
    <div class="field">
@@ -40,6 +40,5 @@
     <input type="hidden" name="categoryId" value="{$categoryId}" />
   </div>
 </form>
-
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editblog.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editblog.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editblog.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,7 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("editBlog")}
 
- <form name="blogSettings" action="admin.php" method="post" onsubmit="listSelectAll('userList');">
+ <form name="blogSettings" action="admin.php" method="post" onsubmit="Lifetype.Forms.List.selectAll('userList');">
    <fieldset class="inputField">
     <legend>{$locale->tr("editBlog")}</legend>
 	{include file="$admintemplatepath/formvalidate.template"}
@@ -93,7 +93,7 @@
         <option value="{$template->getName()}"{if $template->getName() == $blogTemplateSet->getName()} selected="selected" {/if}>{$template->getName()}</option>
        {/foreach}
       </select>
-      <a href="javascript:openTemplateChooserWindow();">{$locale->tr("select")}</a>
+      <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openTemplateChooserWindow();">{$locale->tr("select")}</a>
      </div>
 
     <div class="field">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editbloguser.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editbloguser.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editbloguser.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,16 +1,15 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/addbloguser.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=showBlogUsers title=$locale->tr("editBlogUser")}
-
- <form name="editBlogUser" id="editBlogUser" action="admin.php" method="post">
+<form name="editBlogUser" id="editBlogUser" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=updateBlogUser&output=json');return(false);"> 
    <fieldset class="inputField">
   
      <legend>{$locale->tr("newBlogUser")}</legend>
-     {include file="$admintemplatepath/formvalidate.template"}
+     {include file="$admintemplatepath/formvalidateajax.template"}
 
      <div class="field">
       <label for="newBlogUserName">{$locale->tr("username")}</label>
       <input type="text" disabled="disabled" id="newBlogUsername" name="newBlogUserName" value="{$edituser->getUsername()}" />
-      {include file="$admintemplatepath/validate.template" field=newBlogUserName message=$locale->tr("error_invalid_user")}
      </div>
 
      <div class="field">
@@ -19,7 +18,7 @@
       <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>
         {$locale->tr("quick_permission_selection")}
         </br>
-        <select name="preselection" onChange="togglePermissionSets('editBlogUser', this.value);">
+        <select name="preselection" onChange="Lifetype.UI.Pages.AddBlogUser.togglePermissionSets('editBlogUser', this.value);">
           <option value=""/>{$locale->tr("select")}</option>
           <option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
           <option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editcomments.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editcomments.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editcomments.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,19 +1,20 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editComments title=$locale->tr("editComments")}
-	<script type="text/javascript" src="js/ui/plogui.js"></script>
-	<script type="text/javascript">
+{js src="js/ui/plogui.js"}
+{js src="js/ui/pages/global.js"}
+<script type="text/javascript">
 		var errorCommentStatusMsg = '{$locale->tr("error_comment_status")}';
 		var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
 		var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
-	</script>
-	<script type="text/javascript">
-	{literal}
-	YAHOO.util.Event.addListener( window, "load", function() {
-			var t = new Lifetype.UI.TableEffects( "list" );
-			t.stripe();
-			t.highlightRows();
-		});
-	{/literal}
+</script>
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects( "list" );
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
 	</script>	
         <div id="list_nav_bar">
             <div id="list_nav_select">		
@@ -53,7 +54,7 @@
         <form id="postCommentsList" action="admin.php" method="post">
 		{check_perms perm=update_comment}	
         <div class="optionIcon">
-			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 		</div>
 		{/check_perms}
         <div id="list">
@@ -62,7 +63,7 @@
             <table id="list" class="info" summary="{$locale->tr("editComments")}">
                 <thead>
                     <tr>					
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('postCommentsList');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postCommentsList');" /></th>
                         <th style="width:25%;">{$locale->tr("topic")}</th>						
                         <th style="width:45%;">{$locale->tr("text")}</th>
                         <th style="width:5%;">{$locale->tr("author")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editcustomfield.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editcustomfield.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editcustomfield.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,17 +1,18 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/newcustomfield.js"}
+{js src="js/ui/pages/editcustomfield.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogCustomFields title=$locale->tr("editCustomField")}
-
- <form name="editCustomField" method="post" action="admin.php" onSubmit="listSelectAll('fieldValues');return true">
+<form name="updateCustomField" id="updateCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.UpdateCustomField.onSubmitHook();return false">
   <fieldset class="inputField">
    <legend>{$locale->tr("editCustomField")}</legend>
-   {include file="$admintemplatepath/formvalidate.template"} 
+   {include file="$admintemplatepath/formvalidateajax.template"} 
    
    <div class="field">
     <label for="fieldName">{$locale->tr("name")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("field_name_help")}</div>
     <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
-    {include file="$admintemplatepath/validate.template" field=fieldName message=$locale->tr("error_empty_name")}
+    {include file="$admintemplatepath/validateajax.template" field=fieldName}
    </div>
 
    <div class="field">
@@ -19,14 +20,14 @@
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("field_description_help")}</div>
     <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
-    {include file="$admintemplatepath/validate.template" field=fieldDescription message=$locale->tr("error_empty_description")}
+    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
    </div>
   
    <div class="field">
     <label for="fieldType">{$locale->tr("type")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("field_type_help")}</div>
-    <select name="fieldType" id="fieldType" {literal}onChange="elem=document.getElementById('fieldValuesBlock');if(this.selectedIndex==4){elem.style.display='block';}else{elem.style.display='none';}"{/literal}>
+    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.NewCustomField.fieldTypeOnChangeHandler(this)">
      <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
      <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
      <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
@@ -45,8 +46,8 @@
 		{/foreach}
 		</select>
 		<br />
-		<input type="button" class="button" {literal}onClick="newValue=window.prompt('Enter new value for the custom field');if(newValue!=null){appendDocumentList(document,'fieldValues',newValue,newValue);}"{/literal} value="{$locale->tr("add")}" />
-		<input type="button" class="button" onClick="removeSelectedItemsFromList(document.getElementById('fieldValues'))" value="{$locale->tr("remove_selected")}" />
+		<input type="button" class="button" onClick="Lifetype.UI.Pages.NewCustomField.addFieldValue()" value="{$locale->tr("add")}" />
+		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
    </div>
      
    <div class="field">
@@ -66,6 +67,5 @@
     <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
   </div> 	
  </form>
-
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editfriendgroups.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editfriendgroups.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editfriendgroups.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -32,7 +32,7 @@
  <table class="info">
   <thead>
    <tr>
-    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('friendGroups');" /></th>
+    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('friendGroups');" /></th>
     <th style="width:500px;">{$locale->tr("name")}</th>
     <th style="width:170px;">{$locale->tr("friends")}</th>
     <th style="width:95px;">{$locale->tr("actions")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editfriends.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editfriends.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editfriends.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -42,7 +42,7 @@
  <table class="info">
   <thead>
    <tr>
-    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deleteFriends');" /></th>
+    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteFriends');" /></th>
     <th style="width:110px;">{$locale->tr("friend")}</th>
     <th style="width:160px;">{$locale->tr("blog")}</th>
     <th style="width:110px;">{$locale->tr("group")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlink.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlink.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlink.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,18 +1,16 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editLinks title=$locale->tr("editLink")}
-
-   <form name="newLink" action="admin.php" method="post"> 
-      
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">       
         <fieldset class="inputField">
         <legend>{$locale->tr("editLink")}</legend>
-		{include file="$admintemplatepath/formvalidate.template"}
+		{include file="$admintemplatepath/formvalidateajax.template"}
 
         <div class="field">
             <label for="linkName">{$locale->tr("name")}</label>
             <span class="required">*</span>
             <div class="formHelp">{$locale->tr("link_name_help")}</div>
             <input type="text" name="linkName" id="linkName" value="{$linkName|escape:"html"}" />
-			{include file="$admintemplatepath/validate.template" field=linkName message=$locale->tr("error_empty_name")}
+			{include file="$admintemplatepath/validateajax.template" field=linkName message=$locale->tr("error_empty_name")}
         </div>
 		
         <div class="field">
@@ -20,7 +18,7 @@
             <span class="required">*</span>
             <div class="formHelp">{$locale->tr("link_url_help")}</div>
             <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
-			{include file="$admintemplatepath/validate.template" field=linkUrl message=$locale->tr("error_invalid_url")}
+			{include file="$admintemplatepath/validateajax.template" field=linkUrl message=$locale->tr("error_invalid_url")}
         </div>		
 
         <div class="field">
@@ -35,7 +33,7 @@
             <span class="required"></span>
             <div class="formHelp">{$locale->tr("link_feed_help")}</div>
             <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
-			{include file="$admintemplatepath/validate.template" field=linkRssFeed message=$locale->tr("error_invalid_url")}			
+			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed message=$locale->tr("error_invalid_url")}			
         </div>			
 
         <div class="field">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -40,7 +40,7 @@
  <table id="list" class="info" summary="{$locale->tr("editLinkCategories")}">
   <thead>
    <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('linkCategories');" /></th>
+    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('linkCategories');" /></th>
     <th style="width:75%">{$locale->tr("name")}</th>
     <th style="width:15%">{$locale->tr("links")}</th>
     <th style="width:10%;">{$locale->tr("actions")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,15 +1,15 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editLinkCategories title=$locale->tr("editLinkCategory")}
-<form name="editLinkCategory" method="post" action="admin.php">
+<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?admin.php?output=json');return(false);">
    <fieldset class="inputField">
-   {include file="$admintemplatepath/formvalidate.template"}   
+   {include file="$admintemplatepath/formvalidateajax.template"}   
    <legend>{$locale->tr("editLinkCategory")}</legend>
    <div class="field">
      <label for="linkCategoryName">{$locale->tr("name")}</label>
      <span class="required">*</span>
      <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
-     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName|escape:"html"}"/>
-     {include file="$admintemplatepath/validate.template" field=linkUrl message=$locale->tr("error_empty_name")}     
+     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
+     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
    </div>
   </fieldset> 
   <div class="buttons">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,6 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editLinks title=$locale->tr("editLinks")}
-  <script type="text/javascript" src="js/ui/plogui.js"></script>
+ <script type="text/javascript" src="js/ui/plogui.js"></script>
+{js src="js/ui/pages/global.js"}
   <script type="text/javascript">
     var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
     var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
@@ -50,7 +51,7 @@
 <form id="links" action="admin.php" method="post">
 {check_perms perm="update_link"}
  <div class="optionIcon">
-   <a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}"  onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+   <a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}"  onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
  </div>
 {/check_perms}
 <div id="list">
@@ -59,7 +60,7 @@
 <table id="list" class="info" summary="{$locale->tr("editLinks")}">
  <thead>
   <tr>
-   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('links');" /></th>  
+   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('links');" /></th>  
    <th style="width:30%;">{$locale->tr("name")}</th>
    <th style="width:40%;">{$locale->tr("url")}</th>
    <th style="width:15%;">{$locale->tr("category")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPosts")}
+{js src="js/ui/pages/global.js"}
 	<script type="text/javascript" src="js/ui/plogui.js"></script>
 	<script type="text/javascript">
 		var errorPostStatusMsg = '{$locale->tr("error_post_status")}';
@@ -103,7 +104,7 @@
         <form id="postsList" action="admin.php" method="post">
 	    {check_perms perm=update_post}
         <div class="optionIcon">
-			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 		</div>
 		{/check_perms}
         <div id="list">
@@ -112,7 +113,7 @@
             <table id="list" class="info" summary="{$locale->tr("editPosts")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('postsList');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postsList');" /></th>
                         <th style="width:40%;">{$locale->tr("topic")}</th>
                         <th style="width:10%;">{$locale->tr("date")}</th>
                         <th style="width:10%;">{$locale->tr("author")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/edittrackbacks.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/edittrackbacks.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/edittrackbacks.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editTrackbacks title=$locale->tr("editTrackbacks")}
+{js src="js/ui/pages/global.js"}
 	<script type="text/javascript" src="js/ui/plogui.js"></script>
 	<script type="text/javascript">
 		var errorTrackbackStatusMsg = '{$locale->tr("error_trackback_status")}';
@@ -54,7 +55,7 @@
         <form id="postTrackbacksList" action="admin.php" method="post">
 		{check_perms perm=update_trackback}
         <div class="optionIcon">
-			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+			<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 		</div>
 		{/check_perms}
         <div id="list">
@@ -63,7 +64,7 @@
             <table id="list" class="info" summary="{$locale->tr("editTrackbacks")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('postTrackbacksList');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postTrackbacksList');" /></th>
                         <th style="width:25%;">{$locale->tr("topic")}</th>						
                         <th style="width:45%;">{$locale->tr("text")}</th>
                         <th style="width:5%;">{$locale->tr("author")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/formvalidate.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/formvalidate.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/formvalidate.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,9 +1,9 @@
 {**
   Please use this smarty code to carry our form validations
 **}
-  {if $form->formHasRun()}
-    {if !$form->formIsValid()}
-	  {include file="$admintemplatepath/errormessage.template" message=$message}
-    {/if}
-  {/if}  
-  {include file="$admintemplatepath/successmessage.template" message=$message}
+{if $form->formHasRun()}
+  {if !$form->formIsValid()}
+    {include file="$admintemplatepath/errormessage.template" message=$message}
+  {/if}
+{/if}  
+{include file="$admintemplatepath/successmessage.template" message=$message}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/templates/admin/formvalidateajax.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/formvalidateajax.template	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/formvalidateajax.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1,11 @@
+{**
+  Please use this smarty code to carry our form validations
+**}
+<div id="FormError" {if $viewErrorMessage == ""}style="display:none"{/if}>
+  <img src="imgs/admin/icon_warning-16.png" alt="Info" class="InfoIcon" />
+  <p class="ErrorText" id="FormErrorMessage">{$viewErrorMessage}</p>
+</div>  
+<div id="FormInfo" {if $viewSuccessMessage == ""}style="display:none"{/if}>
+  <img src="imgs/admin/icon_info-16.png" alt="Info" class="InfoIcon" />
+  <p class="InfoText" id="FormInfoMessage">{$viewSuccessMessage}</p>
+</div>
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/globalarticlecategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/globalarticlecategories.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/globalarticlecategories.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -31,7 +31,7 @@
  <table id="list" class="info" summary="{$locale->tr("editArticleCategories")}">
   <thead>
    <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deleteCategories');" /></th>
+    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteCategories');" /></th>
     <th style="width:90%;">{$locale->tr("category")}</th>  
     <th style="width:10%;">{$locale->tr("actions")}</th>
    </tr>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/globalsettings_general.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/globalsettings_general.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/globalsettings_general.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,3 +1,4 @@
+{js src="js/ui/pages/globalsettings.js"}
 <div style="padding-left:10px;" id="general">
    <!-- enable or disable comments globally -->
    <div class="field">
@@ -125,7 +126,7 @@
 	<a href="#" onclick="window.open('?op=siteBlogsChooser','BlogChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
 	 {$locale->tr("select")}
 	</a>
-	&nbsp;<a href="javascript:resetBlogId();">{$locale->tr("reset")}</a>
+	&nbsp;<a href="javascript:Lifetype.Pages.GlobalSettings.resetBlogId();">{$locale->tr("reset")}</a>
    </div>
    <!-- default_global_article_category_id -->
    <div class="field">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/header.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/header.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/header.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -26,35 +26,35 @@
 	var plogBlogId = "{$blog->getId()}";
 	var GB_ROOT_DIR = "{$url->getBaseUrl(false)}/js/greybox/";
 </script>
-<script type="text/javascript" src="js/cookie/cookie.js"></script>
-<script type="text/javascript" src="js/prototype/prototype.js"></script>
+{js src="js/cookie/cookie.js"}
 <!-- Yahoo UI Library -->
-<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
-<script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
-<script type="text/javascript" src="js/yui/event/event-min.js"></script>
-<script type="text/javascript" src="js/yui/connection/connection-min.js"></script>
+{js src="js/yui/yahoo/yahoo-min.js"} 
+{js src="js/yui/dom/dom-min.js"} 
+{js src="js/yui/event/event-min.js"}
+{js src="js/yui/connection/connection-min.js"}
 <!-- LifeType UI Library -->
-<script type="text/javascript" src="js/ui/core.js"></script>
-<script type="text/javascript" src="js/ui/default.js"></script>
-<script type="text/javascript" src="js/ui/common.js"></script>
-<script type="text/javascript" src="js/ui/forms.js"></script>
-<script type="text/javascript" src="js/ui/plogui.js"></script>
-<script type="text/javascript" src="js/ui/tableeffects.js"></script>
-<script type="text/javascript" src="js/ui/overlay.js"></script>
+{js src="js/ui/core.js"}
+{js src="js/ui/common.js"}
+{js src="js/ui/forms.js"}
+{js src="js/ui/plogui.js"}
+{js src="js/ui/tableeffects.js"}
+{js src="js/ui/overlay.js"}
+{js src="js/ui/dom.js"}
+{js src="js/ui/menu.js"}
 {if $location_data_enabled}
 <!-- Location libraries -->
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$google_maps_api_key}"></script>
-<script type="text/javascript" src="js/location/location.js"></script>
+{js src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=$google_maps_api_key"}
+{js src="js/location/location.js"}
 {/if}
 {if $blogEnablePullDownMenu}
-  <script type="text/javascript" src="js/JSCookMenu/JSCookMenu.js"></script>
+  {js src="js/JSCookMenu/JSCookMenu.js"}
   <link rel="stylesheet" href="js/JSCookMenu/ThemeOffice/theme.css" type="text/css" />
-  <script type="text/javascript" src="js/JSCookMenu/ThemeOffice/theme.js"></script>
+  {js src="js/JSCookMenu/ThemeOffice/theme.js"}
 {/if}
 <!-- Greybox -->
-<script type="text/javascript" src="js/greybox/AJS.js"></script>
-<script type="text/javascript" src="js/greybox/AJS_fx.js"></script>
-<script type="text/javascript" src="js/greybox/gb_scripts.js"></script>
+{js src="js/greybox/AJS.js"}
+{js src="js/greybox/AJS_fx.js"}
+{js src="js/greybox/gb_scripts.js"}
 <link href="js/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
 
 </head>
@@ -89,7 +89,7 @@
 
    	<div style="text-align: right; padding-right: 5px;">
 		({$user->getUsername()})
-   		<select name="userBlog" id="userBlog" onchange="MM_jumpMenu('parent',this,0)">
+   		<select name="userBlog" id="userBlog" onchange="Lifetype.UI.Menu.MM_jumpMenu('parent',this,0)">
      	{foreach from=$userBlogs item=userBlog}
      		<option value="admin.php?op=blogSelect&amp;blogId={$userBlog->getId()}" {if $userBlog->getId() == $blog->getId()}selected="selected"{/if}>{$userBlog->getBlog()}</option>
        	{/foreach}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newcustomfield.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newcustomfield.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newcustomfield.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,17 +1,16 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/newcustomfield.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=newCustomField title=$locale->tr("newCustomField")}
-
- <form name="newCustomField" method="post" action="admin.php" onSubmit="listSelectAll('fieldValues');return true">
+<form name="newCustomField" id="newCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.NewCustomField.onSubmitHook();return false">
   <fieldset class="inputField">
    <legend>{$locale->tr("newCustomField")}</legend>
-   {include file="$admintemplatepath/formvalidate.template"}   
-   
+   {include file="$admintemplatepath/formvalidateajax.template"}      
    <div class="field">
     <label for="fieldName">{$locale->tr("name")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("field_name_help")}</div>
     <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
-    {include file="$admintemplatepath/validate.template" field=fieldName message=$locale->tr("error_empty_name")}
+    {include file="$admintemplatepath/validateajax.template" field=fieldName}
    </div>
    
    <div class="field">
@@ -19,14 +18,14 @@
     <span class="required"></span>
     <div class="formHelp">{$locale->tr("field_description_help")}</div>
     <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
-    {include file="$admintemplatepath/validate.template" field=fieldDescription message=$locale->tr("error_empty_description")}
+    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
    </div>
    
    <div class="field">
     <label for="fieldType">{$locale->tr("type")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("field_type_help")}</div>
-    <select name="fieldType" id="fieldType" {literal}onChange="elem=document.getElementById('fieldValuesBlock');if(this.selectedIndex==4){elem.style.display='block';}else{elem.style.display='none';}"{/literal}>
+    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.NewCustomField.fieldTypeOnChangeHandler(this)">
      <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
      <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
      <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
@@ -45,8 +44,8 @@
 		{/foreach}
 		</select>
 		<br />
-		<input type="button" class="button" {literal}onClick="newValue=window.prompt('Enter new value for the custom field');if(newValue!=null){appendDocumentList(document,'fieldValues',newValue,newValue);}"{/literal} value="{$locale->tr("add")}" />
-		<input type="button" class="button" onClick="removeSelectedItemsFromList(document.getElementById('fieldValues'))" value="{$locale->tr("remove_selected")}" />
+		<input type="button" class="button" onClick="Lifetype.UI.Pages.NewCustomField.addFieldValue()" value="{$locale->tr("add")}" />
+		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
    </div>
 
    <div class="field">
@@ -65,6 +64,5 @@
     <input type="submit" name="{$locale->tr("add")}" value="{$locale->tr("add")}" />
   </div>  
  </form>
- 
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newlink.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newlink.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newlink.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -6,18 +6,18 @@
 {if $smarty.request.linkUrl}
 	{assign var=linkUrl value=$smarty.request.linkUrl}
 {/if}
-   <form name="newLink" action="admin.php" method="post"> 
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);"> 
       
         <fieldset class="inputField">
         <legend>{$locale->tr("newLink")}</legend>
-		{include file="$admintemplatepath/formvalidate.template"}
+		{include file="$admintemplatepath/formvalidateajax.template"}
 
         <div class="field">
             <label for="linkName">{$locale->tr("name")}</label>
             <span class="required">*</span>
             <div class="formHelp">{$locale->tr("link_name_help")}</div>
             <input type="text" name="linkName" id="linkName" value="{$linkName}" />
-			{include file="$admintemplatepath/validate.template" field=linkName message=$locale->tr("error_empty_name")}
+			{include file="$admintemplatepath/validateajax.template" field=linkName}
         </div>
 
         <div class="field">
@@ -25,7 +25,7 @@
             <span class="required">*</span>
             <div class="formHelp">{$locale->tr("link_url_help")}</div>
             <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
-			{include file="$admintemplatepath/validate.template" field=linkUrl message=$locale->tr("error_invalid_url")}
+			{include file="$admintemplatepath/validateajax.template" field=linkUrl}
         </div>
 
         <div class="field">
@@ -40,7 +40,7 @@
             <span class="required"></span>
             <div class="formHelp">{$locale->tr("link_feed_help")}</div>
             <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
-			{include file="$admintemplatepath/validate.template" field=linkRssFeed message=$locale->tr("error_invalid_url")}			
+			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed}			
         </div>		
 
         <div class="field">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newlinkcategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newlinkcategory.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newlinkcategory.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,15 +1,15 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newLinkCategory title=$locale->tr("newLinkCategory")}
- <form name="newLinkCategory" action="admin.php" method="post">
+ <form name="newLinkCategory" action="admin.php" method="post" id="newLinkCategory" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
    <fieldset class="inputField">
    <legend>{$locale->tr("newLinkCategory")}</legend>   
-   {include file="$admintemplatepath/formvalidate.template"}   
+   {include file="$admintemplatepath/formvalidateajax.template"}   
    <div class="field">
      <label for="linkCategoryName">{$locale->tr("name")}</label>
      <span class="required">*</span>
      <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
      <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
-     {include file="$admintemplatepath/validate.template" field=linkUrl message=$locale->tr("error_empty_name")}     
+     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}     
    </div>
   </fieldset> 
   <div class="buttons">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newpost.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newpost.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newpost.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,4 +1,5 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/newpost.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=newPost title=$locale->tr("newPost")}
 {assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
  <script type="text/javascript" src="js/ui/plogui.js"></script>
@@ -37,6 +38,7 @@
 {
 	if( preview ) {	
 		document.newPost.op.value="previewPost";
+		document.newPost.target="admin";
 		window.open("", t, "scrollbars=yes,resizable=yes,toolbar=no" );
 		return true;
 	}
@@ -44,7 +46,10 @@
 		document.newPost.op.value="addPost";
 		document.newPost.target="";
 		document.newPost.action="admin.php";
-		return true;
+
+		Lifetype.Forms.AjaxFormProcessor(document.getElementById('newPost').id,'?output=json');
+
+		return false;
 	}
 }
 {/literal}
@@ -55,13 +60,13 @@
    <legend>{$locale->tr("newPost")}</legend>
    <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">
 	   <div id="autoSaveMessage" style="display: none;"></div>
-	   {include file="$admintemplatepath/formvalidate.template"}  
+	   {include file="$admintemplatepath/formvalidateajax.template"}  
 	   <div class="field">
 	     <label for="postTopic">{$locale->tr("topic")}</label>
 		 <span class="required">*</span>
 		 <div class="formHelp">{$locale->tr("topic_help")}</div>
 	     <input type="text" name="postTopic" style="width:100%" id="postTopic" value="{$postTopic|escape:"html"}" />
-	     {include file="$admintemplatepath/validate.template" field=postTopic message=$locale->tr("error_missing_post_topic")}
+	     {include file="$admintemplatepath/validateajax.template" field=postTopic}
 	   </div>
 	   
 	   <!-- text field custom fields -->
@@ -75,7 +80,7 @@
 	     <textarea {if $htmlarea==1}rows="20"{else}rows="15"{/if} id="postText" name="postText" style="width:100%">{$postText}</textarea>
 	     <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mceinsertresource',true);{else}javascript:ed1.execute('postText','7_but_res',''){/if}">{$locale->tr("insert_media")}</a> |
              <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mcemoremore');{else}javascript:ed1.execute('postText','8_but_more',''){/if}">{$locale->tr("insert_more")}</a>
-	     {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}   
+	     {include file="$admintemplatepath/validateajax.template" field=postText}   
 	   </div>
 
           <div class="field">
@@ -172,7 +177,7 @@
          </select>
          <input type="text" name="newArticleCategory" id="newArticleCategory" style="width:100px; margin-top:3px;" size="16" value="" />
          <input type="button" name="addArticleCategory" id="addArticleCategory" style="width:35px; margin-top:3px;" value="{$locale->tr("add")}" onclick="Lifetype.UI.Pages.NewPost.addArticleCategoryAjax()" />
-        {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_category_selected")}	   
+        {include file="$admintemplatepath/validateajax.template" field=postCategories}	   
 	   </div>
 	   
       <div class="field">
@@ -191,7 +196,7 @@
 	           {/foreach}
 	       {/if}
          </select>
-        {include file="$admintemplatepath/validate.template" field=globalArticleCategoryId message=$locale->tr("error_no_global_article_category_selected")}	   
+        {include file="$admintemplatepath/validateajax.template" field=globalArticleCategoryId}	   
        </div>	  
 
 	   <!-- list custom fields -->

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,25 +1,23 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newArticleCategory title=$locale->tr("newArticleCategory")}
-
- <form name="addArticleCategory" method="post" action="admin.php">
+<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=addArticleCategory&output=json');return(false);">
   <fieldset class="inputField">
    <legend>{$locale->tr("newArticleCategory")}</legend>
-   {include file="$admintemplatepath/formvalidate.template"}   
+   {include file="$admintemplatepath/formvalidateajax.template"}
    
    <div class="field">
     <label for="categoryName">{$locale->tr("name")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("category_name_help")}</div>
     <input type="text" value="{$categoryName}" id="categoryName" name="categoryName" />
-    {include file="$admintemplatepath/validate.template" field=categoryName message=$locale->tr("error_empty_name")}
+    {include file="$admintemplatepath/validateajax.template" field=categoryName}
    </div>
    
    <div class="field">
     <label for="categoryDescription">{$locale->tr("description")}</label>
-    <span class="required">*</span>
+    <span class="required"></span>
     <div class="formHelp">{$locale->tr("category_description_help")}</div>	
     <textarea name="categoryDescription" cols="60" id="categoryDescription" rows="5">{$categoryDescription}</textarea>
-    {include file="$admintemplatepath/validate.template" field=categoryDescription message=$locale->tr("error_empty_description")}  
    </div>
    
    <div class="field">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/permissions.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/permissions.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/permissions.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -9,7 +9,7 @@
  <table id="list" class="info" summary="{$locale->tr("permissionsList")}">
   <thead>
    <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deletePermissions');" /></th>
+    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deletePermissions');" /></th>
     <th style="width:30%;">{$locale->tr("name")}</th>
     <th style="width:50%;">{$locale->tr("description")}</th>
     <th style="width:5%">{$locale->tr("core_perm")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/poststats.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/poststats.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/poststats.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
             <table id="list" class="info" summary="{$locale->tr("editPosts")}">
                 <thead>
                     <tr>
-                        <th style="width:10px;"><input class="checkbox" type="checkbox" class="check" name="all" id="all" value="1" onclick="toggleAllChecks('postStats');" /></th>
+                        <th style="width:10px;"><input class="checkbox" type="checkbox" class="check" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postStats');" /></th>
                         <th style="width:500px;">{$locale->tr("referrer")}</th>
 						<th style="width:70px;">{$locale->tr("hits")}</th>						
                         <th style="width:100px;">{$locale->tr("date")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/resourceinfo.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/resourceinfo.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/resourceinfo.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,15 +1,24 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=resources title=$locale->tr("editResource")}
+{if $resource->isImage()}
+ {assign var=imgPath value=$url->resourceMediumSizePreviewLink($resource)}
+{elseif $resource->isSound()}
+ {assign var=imgPath value="imgs/admin/icon_sound-48.png"}
+{elseif $resource->isVideo()}
+ {assign var=imgPath value="imgs/admin/icon_video-48.png"}
+{elseif $resource->isZip()}
+ {assign var=imgPath value="imgs/admin/icon_compressed-48.png"}
+{else} 
+ {assign var=imgPath value="imgs/admin/icon_file-48.png"}
+{/if}
 <form name="updateResourceInfo" method="post" action="admin.php">
  <fieldset class="inputField">
   <legend>{$locale->tr("editResource")}</legend>
-  <div style="float:left;width:70%;border-right:1px solid #BEBEBE;">
    <div class="field">
-    <label for="resourceLink">{$locale->tr("file")}</label>
-	<div class="formHelp"></div>
+   	<img src="{$imgPath}" alt="Preview" style="display:block;" />
 	<span id="resourceLink"><a target="_blank" href="{$url->resourceLink($resource)}">{$resource->getFileName()}</a></span>
    </div>
-   <div class="field">
+    <div class="field">
     <label for="resourceInformation">{$locale->tr("information")}</label>
 	<div class="formHelp">{$locale->tr("resource_information_help")}</div>
 	{assign var=metadata value=$resource->getMetadataReader()}
@@ -73,9 +82,7 @@
     <textarea name="resourceDescription" id="resourceDescription" rows="7" cols="60">{$resourceDescription}</textarea>
    </div>
   </div>
-  <div style="float:center">
-   	<img src="{$imgPath}" alt="Preview" style="display:block;margin-left:auto;margin-right:auto" /><br/>
-  </div> 
+
 </fieldset> 
 <div class="buttons">
  {if $resource->isImage()}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/resources.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/resources.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/resources.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,20 +1,67 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=resources title=$locale->tr("resources")}
+{js src="js/ui/pages/global.js"}
+{js src="js/ui/pages/resources.js"}
   <script type="text/javascript" src="js/ui/plogui.js"></script>
   <script type="text/javascript">
     var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
     var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
 	var errorLocationMsg = '{$locale->tr("error_post_location")}';
   </script>
-<script type="text/javascript">
 {literal}
-YAHOO.util.Event.addListener( window, "load", function() {
-		var t = new Lifetype.UI.TableEffects( "list" );
-		t.stripe();
-		t.highlightRows();
-	});
+<style type="text/css">
+/* ******************  albums  *************** */
+
+div.album {
+	text-align: center;
+        float: left;
+        width:150px;
+		height:100px;
+        margin-bottom:20px;
+        margin-right:5px;
+}
+
+div.file {
+	text-align: center;
+	align:center;
+	float: left;
+	width:150px;
+	height:170px;
+	margin-bottom:5px;
+	margin-right:5px;
+	padding-top:5px;
+}
+
+.clearer {
+	clear : both;
+	height : 1px;
+	font-size : 1px;
+}
+   
+a img {border:none;}
+#album a:link {color: #004ca1;}
+#album a:visited {color: #b50394;}
+#album a:hover, #album a:active, #album a:focus {color: #004ca1;background:none;}
+
+/*.pictureFrame {
+	border: 1px solid #dfdfdf;
+	background-color: #ffffff;
+	padding-top:5px;
+	padding-left:5px;
+	padding-right:5px;
+	padding-bottom:15px;
+	width:120px;	
+	text-align:center;
+}
+
+.picture {
+	align:center;
+	border: 1px solid #dfdfdf;
+	width:120px;	
+}*/
+</style>
 {/literal}
-</script>
+
 <div id="list_nav_bar">
 <div id="list_nav_select">
 <form id="viewResources" action="admin.php" method="post">
@@ -69,96 +116,86 @@
 
 <form id="Resources" method="post" action="admin.php">
 <div class="optionIcon">
-  <a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+  <a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 </div>
 <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
-<table id="list" class="info" summary="{$locale->tr("resources")}">
- <thead>
-  <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('Resources');" /></th>
-    <th style="width:90%;">{$locale->tr("name")}</th>
-    <th style="width:10%;">{$locale->tr("actions")}</th>
- </tr>
-</thead>
-<tbody> 
-{if $album && $pager->getCurrentPage() == 1}
-<tr>
- <td>&nbsp;</td>
- <td>
-  <a href="admin.php?op=resources&amp;albumId={$album->getParentId()}&amp;page=1"><img src="imgs/admin/icon_folder-72.png" border="0" alt="Parent" /></a><br/>
-  <a href="admin.php?op=resources&amp;albumId={$album->getParentId()}&amp;page=1">{$locale->tr("up")}</a>
- </td>
-</tr>
-{/if}
-{foreach from=$albums item=resalbum}
-<tr>
- <td>
-  <input type="checkbox" class="checkbox" value="{$resalbum->getId()}" name="albumIds[{$resalbum->getId()}]" />
- </td>
- <td>
-    <a href="admin.php?op=resources&amp;albumId={$resalbum->getId()}&amp;page=1"><img src="imgs/admin/icon_folder-72.png" border="0" alt="folder" /></a><br/>
-    <a href="admin.php?op=resources&amp;albumId={$resalbum->getId()}&amp;page=1">{$resalbum->getName()}</a><br/>
-	{if $location_data_enabled}
-	{$locale->tr("locations")}: <a href="javascript:void(0)" onClick="window.open('?op=adminLocationDisplay&albumId={$resalbum->getId()}','LocationViewer','scrollbars=no,resizable=no,toolbar=no,height=500,width=590')">{$locale->tr("view")}</a>
-	{/if}
- </td>
- <td>
-  <div class="list_action_button"> 
-    <a href="?op=editResourceAlbum&amp;albumId={$resalbum->getId()}" title="{$locale->tr("edit")}">
-     <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
-    </a>
-    <a href="?op=deleteResourceAlbum&amp;albumId={$resalbum->getId()}" title="{$locale->tr("delete")}">
-     <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-    </a>    
-  </div>  
- </td>
-</tr>
-{/foreach}
-{foreach from=$resources item=resource}
-<tr>
- <td>
-   <input type="checkbox"  class="checkbox" value="{$resource->getId()}" name="resourceIds[{$resource->getId()}]" />
- </td>
- <td>
-  <a href="admin.php?op=resourceInfo&amp;resourceId={$resource->getId()}">
-  {if $resource->hasPreview()}
-     <img src="{$url->resourcePreviewLink($resource)}" alt="{$locale->tr("preview")}" />
-  {else}
-   {if $resource->isSound()}
-    <img alt="Sound" src="imgs/admin/icon_sound-48.png" style="border:0px;" />
-   {elseif $resource->isVideo()}
-    <img alt="Video" src="imgs/admin/icon_video-48.png" style="border:0px;" />
-   {elseif $resource->isZip()}
-    <img alt="Zip" src="imgs/admin/icon_compressed-48.png" style="border:0px;" />   
-   {else}
-    <img alt="File" src="imgs/admin/icon_file-48.png" style="border:0px;" />
-   {/if}
+
+<div id="album">
+
+	<div class="clearer">&nbsp;</div>
+
+  {if $pager->getCurrentPage() == 1}
+	<div class="album">
+	<a href="admin.php?op=resources&amp;albumId={$album->getParentId()}&amp;page=1">
+    	<img src="{$url->getTemplateFile("imgs/parentfolder.gif")}" alt="{$locale->tr("parent")}" /></a>
+    	<p>{$locale->tr("parent")}</p>
+	</div>
   {/if}
-  </a><br/>
-  <a href="admin.php?op=resourceInfo&amp;resourceId={$resource->getId()}">{$resource->getFileName()}</a>
-  {if $resource->hasLocationData()}
-    {assign var=location value=$resource->getLocation()}
-	<br/>
-	{$locale->tr("location")}: <a href="javascript:void(0)" onClick="window.open('?op=adminLocationDisplay&locId={$location->getId()}','Location Viewer','scrollbars=no,resizable=no,toolbar=no,height=500,width=590')">{$location->getDescription()}</a>
+
+  {if $pager->getCurrentPage() == 1}
+	{assign var="counter" value=1}
+   	{assign var=children value=$album->getChildren()}
+   	{foreach from=$children item=childalbum}
+	<div class="album">
+   	<a href="admin.php?op=resources&amp;albumId={$childalbum->getId()}&amp;page=1">
+   	<img src="{$url->getTemplateFile("imgs/folder.gif")}" alt="{$childalbum->getName()}" /></a>
+   	<p>{$childalbum->getName()} ({$childalbum->getNumResources()})</p>
+   		{assign var="counter" value="`$counter+1`"}
+   		{if $counter%3 == 0}
+   		{/if}
+	</div>
+   	{/foreach}
   {/if}
- </td>
- <td>
-  <div class="list_action_button"> 
-    <a href="?op=resourceInfo&amp;resourceId={$resource->getId()}" title="{$locale->tr("edit")}">
-     <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
-    </a>
-    <a href="?op=deleteResource&amp;resourceId={$resource->getId()}" title="{$locale->tr("delete")}">
-     <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-    </a>    
-  </div>
- </td>
-</tr>
+
+<!-- show the resources here -->
+
+ {** assign var=resources value=$album->getResources() **}
+ {** use the code above if you want to display all the resources at once, or leave it commented **}
+ {** if you would like to use the new paged display that was introduced in lifetype 1.1 **} 
+ {foreach from=$resources item=resource}
+	<div id="res_{$resource->getId()}" class="file" onMouseOver="Lifetype.UI.Pages.Resources.mouseOver(this)" onMouseOut="Lifetype.UI.Pages.Resources.mouseOut(this)" onClick="Lifetype.UI.Pages.Resources.clickHandler(this)">
+    <input type="checkbox" name="res_{$resource->getId()}" id="checkbox_res_{$resource->getId()}" value="{$resource->getId()}" style="display:none">		
+   	{if $resource->hasPreview()}
+	<div class="pictureFrame">	
+	 <div class="picture">
+   	  <a href="?op=resourceInfo&amp;resourceId={$resource->getId()}">
+    	<img alt="{$resource->getDescription()}" src="{$url->resourcePreviewLink($resource)}" />
+      </a>
+     </div>
+    </div>
+	{$resource->getFileName()}<br/>
+   	{else}
+   		<a href="{$url->resourceLink($resource)}"><br/>
+   	{if $resource->isSound()}
+    	<img alt="Sound" src="{$url->getTemplateFile("imgs/sound.gif")}" /></a><br/>
+   	{elseif $resource->isVideo()}
+    	<img alt="Video" src="{$url->getTemplateFile("imgs/video.gif")}" /></a><br/>
+   	{elseif $resource->isZip()}
+    	<img alt="Zip" src="{$url->getTemplateFile("imgs/compressed.gif")}" /></a><br/>
+   	{else}
+   		<img alt="File" src="{$url->getTemplateFile("imgs/file.gif")}" /></a><br/>
+   	{/if}  
+   	{$resource->getFileName()}
+   	{/if}
+   	{assign var=metadata value=$resource->getMetadataReader()}
+  	{$metadata->getRoundedSize()}<br/>
+   	{if $resource->isImage()}
+  		{$metadata->getWidth()} x {$metadata->getHeight()}<br/>
+   	{elseif $resource->isSound()}
+  		{$metadata->getFormat()|upper} {$metadata->getSampleRate()} bps<br/>
+   	{elseif $resource->isVideo()}
+  		{$metadata->getFormat()|upper} {$metadata->getWidth()} x {$metadata->getHeight()}, {$metadata->getLengthString()}<br/>
+   	{elseif $resource->isZip()}
+   		{$metadata->getTotalFiles()} {$locale->tr("files")}<br/>
+   	{/if}
+  	</div>
 {/foreach}
-</tbody>
-</table>
+<div class="clearer">&nbsp;</div>
 </div>
+
+</div>
 <a name="bulkEdit"></a>
 <div id="list_action_bar">
   {assign var=quota value=$blog->getResourcesQuota()}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/simpleheader.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/simpleheader.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/simpleheader.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -14,12 +14,14 @@
 <!--[if IE ]>
 <link rel="stylesheet" href="styles/admin-ie.css" type="text/css" media="screen" />
 <![endif] -->
-<script type="text/javascript" src="js/ui/default.js"></script>
-<script type="text/javascript" src="js/ui/core.js"></script>
-<script type="text/javascript" src="js/ui/tableeffects.js"></script>
-<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
-<script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
-<script type="text/javascript" src="js/yui/event/event-min.js"></script>
+{js src="js/ui/core.js"}
+{js src="js/ui/forms.js"}
+{js src="js/ui/dom.js"}
+{js src="js/ui/tableeffects.js"}
+{js src="js/yui/yahoo/yahoo-min.js"} 
+{js src="js/yui/dom/dom-min.js"} 
+{js src="js/yui/event/event-min.js"}
+{js src="js/yui/connection/connection-min.js"}
 {if $templatename=="default"}{** only to be used in the login page! **}
 <style type="text/css">{literal}
 html,body

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/siteblogs.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/siteblogs.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/siteblogs.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("editSiteBlogs")}
+{js src="js/ui/pages/global.js"}
 <script type="text/javascript" src="js/ui/plogui.js"></script>
 <script type="text/javascript">
 	var errorStatusMsg = '{$locale->tr("error_select_status")}';
@@ -42,7 +43,7 @@
  <form id="editBlogs" method="post" action="admin.php">
 {check_perms adminperm=update_site_blog}	
      <div class="optionIcon">
-		<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+		<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 	</div>
 {/check_perms}	
   <div id="list"> 
@@ -51,7 +52,7 @@
    <table id="list" class="info" summary="{$locale->tr("editSiteBlogs")}">
     <thead>
      <tr>
-      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('editBlogs');" /></th>
+      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('editBlogs');" /></th>
       <th style="width:35%;">{$locale->tr("blog")}</th>
       <th style="width:25%">{$locale->tr("owner")}</th>
       <th style="width:15%;">{$locale->tr("status")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/sitelocales.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/sitelocales.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/sitelocales.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
    <table id="list" class="info" summary="{$locale->tr("siteLocales")}">
     <thead>
      <tr>
-      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('editLocales');" /></th>
+      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('editLocales');" /></th>
       <th style="width:10%;">{$locale->tr("locale")}</th>
       <th style="width:15%;">{$locale->tr("locale_encoding")}</th>
       <th style="width:60%;">{$locale->tr("description")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/sitetemplates.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/sitetemplates.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/sitetemplates.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
   <table id="list" class="info" summary="{$locale->tr("siteTemplates")}">
    <thead>
     <tr>
-      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('siteTemplates');" /></th>
+      <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('siteTemplates');" /></th>
       <th style="width:90%;">{$locale->tr("template")}</th>
       <th style="width:10%;">{$locale->tr("actions")}</th>
     </tr>
@@ -29,7 +29,7 @@
     </td>
     <td  class="col_highlighted">
 	 {if $sitetemplate->hasScreenshot()}
-	  <a href="javascript:openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');">{$sitetemplate->getName()}</a>
+	  <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');">{$sitetemplate->getName()}</a>
 	 {else}
       {$sitetemplate->getName()}
 	 {/if} 
@@ -42,7 +42,7 @@
       </a>
       {/check_perms}
 	  {if $sitetemplate->hasScreenshot()}
-	    <a href="javascript:openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');" title="{$locale->tr("preview")}">
+	    <a href="javascript:Lifetype.UI.Pages.TemplateChooser.openScreenshotWindow('{$sitetemplate->getScreenshotUrl()}');" title="{$locale->tr("preview")}">
 		  <img src="imgs/admin/icon_image-16.png" alt="{$locale->tr("preview")}" />
 		</a>
 	  {/if}	  

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/siteusers.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/siteusers.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/siteusers.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,6 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editSiteUsers title=$locale->tr("editSiteUsers")} 
 <script type="text/javascript" src="js/ui/plogui.js"></script>
+{js src="js/ui/pages/global.js"}
 <script type="text/javascript">
 	var errorStatusMsg = '{$locale->tr("error_select_status")}';
 	var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
@@ -52,7 +53,7 @@
 	
 			{check_perms adminperm=update_user}	
 			     <div class="optionIcon">
-					<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
+					<a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="Lifetype.UI.Pages.Global.switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
 				</div>
 			{/check_perms}	
 	
@@ -62,7 +63,7 @@
             <table id="list" class="info" summary="{$locale->tr("editSiteUsers")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('siteUsers');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('siteUsers');" /></th>
                         <th style="width:5%;">UID</th>
                         <th style="width:20%;">{$locale->tr("username")}</th>
                         <th style="width:30%;">{$locale->tr("full_name")}</th>                        

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/statistics.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/statistics.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/statistics.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -16,7 +16,7 @@
             <table id="list" class="info" summary="{$locale->tr("Stats")}">
                 <thead>
                     <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('postStats');" /></th>
+                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postStats');" /></th>
                         <th style="width:65%;">{$locale->tr("referrer")}</th>                        
 						<th style="width:15%;">{$locale->tr("hits")}</th>
                         <th style="width:10%;">{$locale->tr("date")}</th>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/usersettings.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/usersettings.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/usersettings.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -1,11 +1,10 @@
 {include file="$admintemplatepath/header.template"}
+{js src="js/ui/pages/usersettings.js"}
 {include file="$admintemplatepath/navigation.template" showOpt=userSettings title=$locale->tr("userSettings")}
-
-  <form name="userSettings" action="admin.php" method="post">
+<form name="userSettings" id="userSettings" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=updateUserSettings&output=json');return(false);">
     <fieldset class="inputField">
      <legend>{$locale->tr("userSettings")}</legend>
-        {include file="$admintemplatepath/successmessage.template"}
-        {include file="$admintemplatepath/errormessage.template"}
+        {include file="$admintemplatepath/formvalidateajax.template"}
      <div style="float:left;width:73%;border-right:1px solid #DEDEDE;">
       <div class="field">
         <label for="userName">{$locale->tr("username")}</label>
@@ -23,11 +22,11 @@
        <label for="userSettingsPassword">{$locale->tr("password")}</label>
        <div class="formHelp">{$locale->tr("password_help")}</div>
        <input type="password" name="userSettingsPassword" value="{$userSettingsPassword}" id="userSettingsPassword" />
-       {include file="$admintemplatepath/validate.template" field=userSettingsPassword message=$locale->tr("error_invalid_password")}
+       {include file="$admintemplatepath/validateajax.template" field=userSettingsPassword}
        <br/>
        <label for="confirmPassword">{$locale->tr("confirm_password")}</label><br/>
        <input type="password" name="confirmPassword" value="" id="confirmPassword" />
-       {include file="$admintemplatepath/validate.template" field=confirmPassword message=$locale->tr("error_passwords_dont_match")}       
+       {include file="$admintemplatepath/validateajax.template" field=confirmPassword}       
      </div>
  
      <div class="field">
@@ -35,7 +34,7 @@
        <span class="required">*</span>
        <div class="formHelp">{$locale->tr("email_help")}</div>
        <input type="text" name="userEmail" value="{$userEmail}" id="userEmail" />
-       {include file="$admintemplatepath/validate.template" field=userEmail message=$locale->tr("error_incorrect_email_address")}		 
+       {include file="$admintemplatepath/validateajax.template" field=userEmail}		 
      </div>
 
      <div class="field">
@@ -49,7 +48,7 @@
      <div class="field">
        <label for="userPictureId">{$locale->tr("picture")}</label>
        <br/>
-       {if $user->hasPicture()} 
+       {if $user->hasPicture()}
 	     {assign var=userPicture value=$user->getPicture()}
 	     {assign var=imgInfo value=$userPicture->getMetadataReader()}
 	     <img alt="Picture" src="{$userPicture->getPreviewLink()}" id="userPicture"  style="display:block;margin-left:auto;margin-right:auto" />
@@ -57,20 +56,18 @@
 	     <img alt="Picture" src="imgs/no-user-picture.jpg" id="userPicture" style="display:block;margin-left:auto;margin-right:auto"/>	
        {/if}
 	   <div class="formHelp">{$locale->tr("user_picture_help")}</div>
-       <a href="javascript:userPictureSelectWindow();">{$locale->tr("choose")}...</a>
+       <a href="javascript:Lifetype.UI.Pages.UserSettings.userPictureSelectWindow();">{$locale->tr("choose")}...</a>
 	   |
-	   <a href="javascript:resetUserPicture();">{$locale->tr("reset")}</a>
+	   <a href="javascript:Lifetype.UI.Pages.UserSettings.resetUserPicture();">{$locale->tr("reset")}</a>
        <input type="hidden" name="userPictureId" id="userPictureId" value="{$user->getPictureId()}" />
      </div>
     </div>
     </fieldset>
-
     <div class="buttons">
      <input type="reset" name="reset" value="{$locale->tr("reset")}" />
      <input type="submit" name="Update" value="{$locale->tr("update")}"/>
      <input type="hidden" name="op" value="updateUserSettings" />
    </div>
-
  </form>
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/validate.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/validate.template	2007-07-13 09:03:34 UTC (rev 5650)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/validate.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -3,7 +3,7 @@
 	{if !$form->isFieldValid($field)}
 		<div class="fieldValidationError">
 		  <span style="background:red;color:white;font-weight:bold">&nbsp;!&nbsp;</span>&nbsp;
-		  {$message}
+		  {if $mesage != ""}{$message}{else}{$form->getFieldErrorMessage($field)}{/if}
 		</div>  
 	{/if}
 {/if}
\ No newline at end of file

Added: plog/branches/lifetype-1.3-ajax/templates/admin/validateajax.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/validateajax.template	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/validateajax.template	2007-07-13 17:34:45 UTC (rev 5651)
@@ -0,0 +1 @@
+<div id="field_{$field}" class="fieldValidationError" style="display:none"></div>
\ No newline at end of file



More information about the pLog-svn mailing list