diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index e50c2903807ff9e4cbc8bf17f65dcb1ed3c331af..beb9cab5c47d52d0e2470cb1a6b891e2e67c5237 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1075,7 +1075,7 @@ if ($_GET['propalid'] > 0)
 					}
 					else
 					{
-						print $html->textwithtooltip($text,$objp->description,4,'','',$i+1,$objp->ref.' - '.nl2br(stripslashes($objp->product)));
+						print $html->textwithtooltip($text,$objp->description,4,'','',$i,$objp->ref.' - '.nl2br(stripslashes($objp->product)));
 					}
 					print_date_range($objp->date_start,$objp->date_end);
 
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 0f9d7765ef30b09d3035a3b7ec978ad0405cafd9..f5070c1d7d52d4580ea083ece311df41ef6ead8a 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -68,14 +68,14 @@ class Form
      \brief     Affiche un texte+picto avec tooltip sur texte ou sur picto
      \param   text				  Texte � afficher
      \param   htmltext	    Contenu html du tooltip, cod� en html
-	   \param		tooltipon			1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip ajax
+	   \param		tooltipon			1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip Ajax
      \param		direction			-1=Le picto est avant, 0=pas de picto, 1=le picto est apr�s
      \param		img					  Code img du picto
      \return	string				Code html du texte,picto
   */
   function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$option='')
   {
-  	global $conf;
+  	global $conf,$langs;
 		
 		if (! $htmltext) return $text;
 		
@@ -88,15 +88,16 @@ class Form
     
     if ($conf->use_ajax && $tooltipon == 4)
     {
-    	$s = '<script type=\'text/javascript\'>
-    	function init() {
-    	//<![CDATA[
-    		new Tip(\'tip'.$i.'\', \''.$htmltext.'\',{title : \''.$option.'\'});
-      //]]>
-      }
-      Event.observe(window, \'load\', init, false);';
-    	$s.= '</script>';
-    	$s.= '<span id="tip'.$i.'">'.$text.'</span>';
+    	$s = '<div id="tip'.$i.'">'."\n";
+    	$s.= $text;
+    	$s.= '</div>'."\n";
+    	$s.= '<div id="tooltip_content" style="display:none">'."\n";
+    	$s.= $htmltext."\n";
+    	$s.= '</div>'."\n";
+    	$s.= '<script type=\'text/javascript\'>'."\n";
+    	$s.= 'TooltipManager.init("","",{width:500, shiftX:50});'."\n";
+      $s.= 'TooltipManager.addHTML("tip'.$i.'", "tooltip_content");'."\n";
+    	$s.= '</script>'."\n";
     }
     else
     {
diff --git a/htdocs/includes/scriptaculous/src/prototip.js b/htdocs/includes/scriptaculous/src/prototip.js
deleted file mode 100644
index 60b9053bc73c304026d8b84f749ca502566d5b85..0000000000000000000000000000000000000000
--- a/htdocs/includes/scriptaculous/src/prototip.js
+++ /dev/null
@@ -1,248 +0,0 @@
-//  Prototip 1.0.1.1
-//  by Nick Stakenburg - http://www.nickstakenburg.com
-//  25-07-2007
-//
-//  More information on this project:
-//  http://www.nickstakenburg.com/projects/prototip/
-//
-//  Licensed under the Creative Commons Attribution 3.0 License
-//  http://creativecommons.org/licenses/by/3.0/
-//
-
-var Tip = Class.create();
-Tip.prototype = {
-
-  initialize: function(element, content) {
-    this.element = $(element);
-    this.content = content;
-
-    this.options = Object.extend({
-      className: 'tooltip',
-      duration: 0.3,					// duration of the effect
-      effect: false,					// false, 'appear' or 'blind'
-      hook: false,						// { element: {'topLeft|topRight|bottomLeft|bottomRight'}, tip: {'topLeft|topRight|bottomLeft|bottomRight'}
-      offset: (arguments[2] && arguments[2].hook) ? {x:0, y:0} : {x:16, y:16},
-      fixed: false,						// follow the mouse if false
-      target: this.element,				// or another element
-      title: false,
-      viewport: true,					// keep within viewport if mouse is followed
-	  zIndex: 1200
-    }, arguments[2] || {});
-
-    this.target = $(this.options.target);
-
-    if (this.options.hook) {
-      this.options.fixed = true;
-      this.options.viewport = false;
-    }
-
-	if (this.options.effect) {
-	  this.queue = { position: 'end', limit: 1, scope: ''}
-	  var c = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
-	  for (var i=0; i<6; i++) {
-        var r = Math.floor(Math.random() * c.length);
-        this.queue.scope += c.substring(r,r+1);
-      }
-    }
-
-    this.setup();
-  },
-
-  setup: function() {
-    this.element.observe('mousemove', this.showTip.safeBind(this));
-    this.element.observe('mouseout', this.hideTip.safeBind(this));
-  },
-
-  buildTip: function() {
-    // IE select fix, this is placed first in case zIndex fails
-    if (Prototype.Browser.IE) {
-      this.underlay = document.createElement('iframe');
-      Element.setStyle(this.underlay, {
-        position: 'absolute',
-        display: 'none',
-        border: 0,
-        margin: 0,
-        opacity: 0.01,
-        padding: 0,
-        background: 'none',
-        zIndex: this.options.zIndex
-      });
-      document.body.appendChild(this.underlay);
-    }
-
-    // create a wrapper
-    this.wrapper = document.createElement('div');
-    Element.setStyle(this.wrapper, {
-      position: 'absolute',
-      zIndex: this.options.zIndex+1,
-      display: 'none'
-    });
-    if (this.options.width) this.wrapper.setStyle({ width: this.options.width+'px' });
-
-    // add the tooltip
-    this.tooltip = this.wrapper.appendChild(document.createElement('div'));
-    this.tooltip.className = this.options.className;
-    this.tooltip.style.position = 'relative';
-
-    // add the title
-    if (this.options.title) {
-      this.title = this.tooltip.appendChild(document.createElement('div'));
-      this.title.className = 'title';
-      Element.update(this.title, this.options.title);
-    }
-
-    // content
-    this.tip = this.tooltip.appendChild(document.createElement('div'));
-    this.tip.className = 'content';
-    Element.update(this.tip, this.content);
-
-    // add wrapper to the body
-    document.body.appendChild(this.wrapper);
-
-    // prepare for effects
-    var w = this.wrapper.getDimensions();
-    this.wrapper.setStyle({ width: w.width+'px', height: w.height+'px' });
-    if (Prototype.Browser.IE) this.underlay.setStyle({ width: w.width+'px', height: w.height+'px' });
-    Element.hide(this.tooltip);
-  },
-
-  showTip: function(event){
-    if (!this.wrapper) this.buildTip();
-    this.positionTip(event); // follow mouse
-    if (this.wrapper.visible() && this.options.effect != 'appear') return;
-
-    if (Prototype.Browser.IE) this.underlay.show(); // IE select fix
-    this.wrapper.show();
-
-    if (!this.options.effect) {
-      this.tooltip.show(); 
-    } else {
-      // stop running effect
-	  if (this.activeEffect) Effect.Queues.get(this.queue.scope).remove(this.activeEffect);
-      // start new
-	  this.activeEffect = Effect[Effect.PAIRS[this.options.effect][0]](this.tooltip, { duration: this.options.duration, queue: this.queue});
-	}
-  },
-
-  hideTip: function(event){
-    if(!this.wrapper.visible()) return;
-	
-	if (!this.options.effect) {
-      if (Prototype.Browser.IE) { this.underlay.hide(); } // select fix
-      this.tooltip.hide();
-      this.wrapper.hide();
-    }
-    else {
-      // stop running effect
-	  if (this.activeEffect) Effect.Queues.get(this.queue.scope).remove(this.activeEffect);
-      // start new
-	  this.activeEffect = Effect[Effect.PAIRS[this.options.effect][1]](this.tooltip, { duration: this.options.duration, queue: this.queue, afterFinish: function(){
-        if (Prototype.Browser.IE) this.underlay.hide(); // select fix
-        this.wrapper.hide();
-      }.bind(this)});
-    }
-  },
-
-  positionTip: function(event){
-    // calculate
-    var offset = {'left': this.options.offset.x,'top': this.options.offset.y};
-    var targetPosition = Position.cumulativeOffset(this.target);
-    var tipd = this.wrapper.getDimensions();
-    var pos = {
-      'left': (this.options.fixed) ? targetPosition[0] : Event.pointerX(event),
-      'top': (this.options.fixed) ? targetPosition[1] : Event.pointerY(event)
-    }
-
-    // add offsets
-    pos.left += offset.left;
-    pos.top += offset.top;
-
-    if (this.options.hook) {
-      var dims = {'target': this.target.getDimensions(), 'tip': tipd}
-      var hooks = {'target': Position.cumulativeOffset(this.target), 'tip': Position.cumulativeOffset(this.target)}
-
-      for(var z in hooks) {
-        switch(this.options.hook[z]){
-          case 'topRight':
-            hooks[z][0] += dims[z].width;
-            break;
-          case 'bottomLeft':
-            hooks[z][1] += dims[z].height;
-            break;
-          case 'bottomRight':
-            hooks[z][0] += dims[z].width;
-            hooks[z][1] += dims[z].height;
-            break;
-        }
-      }
-
-      // move based on hooks
-      pos.left += -1*(hooks.tip[0] - hooks.target[0]);
-      pos.top += -1*(hooks.tip[1] - hooks.target[1]);
-    }
-
-    // move tooltip when there is a different target when following mouse
-    if (!this.options.fixed && this.element !== this.target) {
-      var elementPosition = Position.cumulativeOffset(this.element);
-      pos.left += -1*(elementPosition[0] - targetPosition[0]);
-      pos.top += -1*(elementPosition[1] - targetPosition[1]);
-	}
-
-    if (!this.options.fixed && this.options.viewport) {
-      var scroll = this.getScrollOffsets();
-      var viewport = this.viewportSize();
-      var pair = {'left': 'width', 'top': 'height'};
-
-      for(var z in pair) {
-        if ((pos[z] + tipd[pair[z]] - scroll[z]) > viewport[pair[z]]) {
-          pos[z] = pos[z] - tipd[pair[z]] - 2*offset[z];
-		}
-      }
-    }
-
-    // position
-    this.wrapper.setStyle({
-      left: pos.left + 'px',
-      top: pos.top + 'px'
-    });
-
-    if (Prototype.Browser.IE) this.underlay.setStyle({ left: pos.left+'px', top: pos.top+'px' });
-  },
-
-  // Functions below hopefully won't be needed with prototype 1.6
-  viewportWidth: function(){
-    if (Prototype.Browser.Opera) return document.body.clientWidth;
-    return document.documentElement.clientWidth;
-  },
-
-  viewportHeight: function(){
-    if (Prototype.Browser.Opera) return document.body.clientHeight;
-    if (Prototype.Browser.WebKit) return this.innerHeight;
-    return document.documentElement.clientHeight;
-  },
-
-  viewportSize : function(){
-    return {'height': this.viewportHeight(), 'width': this.viewportWidth()};
-  },
-
-  getScrollLeft: function(){
-	  return this.pageXOffset || document.documentElement.scrollLeft;
-  },
-  
-  getScrollTop: function(){
-    return this.pageYOffset || document.documentElement.scrollTop;
-  },
-
-  getScrollOffsets: function(){
-    return {'left': this.getScrollLeft(), 'top': this.getScrollTop()}
-  }
-}
-
-/* fix for $A is not defined on Firefox */
-Function.prototype.safeBind = function() {
-  var __method = this, args = $A(arguments), object = args.shift();
-  return function() {
-	if (typeof $A == 'function')
-    return __method.apply(object, args.concat($A(arguments)));
-  }
-}
\ No newline at end of file
diff --git a/htdocs/includes/scriptaculous/src/window/MIT-LICENSE b/htdocs/includes/scriptaculous/src/window/MIT-LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..5bcdad1bd74ac281e0f1296300f9065705fded8c
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/MIT-LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/htdocs/includes/scriptaculous/src/window/README b/htdocs/includes/scriptaculous/src/window/README
new file mode 100644
index 0000000000000000000000000000000000000000..e2cb9608345930c047f25ddfdb69732bce3d8141
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/README
@@ -0,0 +1,182 @@
+== Installation/Usage
+
+Just copy windows.js in your javascript directory, and default.css + default directory in your stylesheets directory 
+See samples/index.html for more details and go on my web page : http://prototype-window.xilinus.com
+
+== Change log        
+- 04/23/07  V 1.3
+            - Added: getTitle
+            - Added: blur/focus function on Windows module
+            - Added: onBlur event  
+            - Fixed: WindowCloseKey works with URL content (iframe) 
+            - Fixed: Modal window with a parent != document.body
+            - Updated: prototype 1.5RC3
+            - Updated: Dialog handle resizable,minimizable, maximizable, draggable and closable options
+- 02/27/07  V 1.2
+            - Added: gridX and gridY constructor's options to snap move and resize 
+            - Added: Effect on modal overlay (fade/appear) only if effects.js in included.
+              You can change effect options (Windows.overlayShowEffectOptions and Windows.overlayHideEffectOptions).
+              
+            - Fixed: Multimodal mode.
+            - Fixed: Works on WebKit.
+              
+            - Beta: effects on minimize and maximize. You need to include window_effects.js to have them.
+            
+- 02/17/07  V 1.1
+            - Constructor has been simplified, now you can just do win = new Window(). By default id is automatically generated and can be passed as options
+              win = new Window({id: "my_id", width: 100, height: 100}) 
+              Backward compatibility with old constructor win = new Window("my_id", {width: 100, height: 100}) 
+            - Observer event can be passed as window option:   win = new Window({onClose: function() {alert('close')}}) 
+            - parent option can be id or element
+            - delegate has been removed (not really usefull) and0 setCloseCallback has been addedinstead. (It could be also passed as a constructor's option closeCallback: your_callcabck)
+              your_callcabck must return true to be able to close the window
+            - add onMove event
+            - fix constraint for minimized window
+            - destroyOnClose could be passed as constructor's option:  win = new Window({destroyOnClose: true}) 
+            - constraint works for maximized windows
+            - Dialog ok and cancel parameters has been renamed to onOk and onCancel for coherence (ok and cancel still works)
+            - Update to Prototype 1.5 and script.aculo.us 1.7
+
+- 01/14/07  V 1.00
+            - add changeClassName to change look and feel dynamically.
+            - add constraint move. Constraint can be on a div or document.
+            - full top and bottom bar are use to move window.
+            - fixed computation of window width or height.
+            - add setURL/getURL/refresh and setHTMLContent. Content can be change dynamically. 
+            - add tooltip.js add on. It's an add-on to add dynamically tooltips on a webpage (see samples/tooltips/tooltip.html)
+              Thanks to Jonathan Modell of  2moromedia.com.
+            
+- 12/06/06  V 0.99
+            - remove addClass that automatically tries to include default.css
+            - add wired move/resize
+            - fix recenterAuto
+            - add show to WindowStore to be able to open a window the first time, wihtout any cookie (check samples/window_store/html)
+
+- 11/06/06  V 0.98
+            - new optional behavior for multi-level modal window.
+            - Two new add-ons (in window_ext.js file) 
+               + WindowStore to save open/close window status.
+               + WindowCloseKey to handle escape key (or any keys) to close windows/dialogs
+
+- 10/26/06  V 0.97
+            - add recenterModal to constructor
+            - setAjaxContent eval response request
+            - modal window multi level
+            - fix close/closeAll issues
+            - add addCss (auto add default.css)
+            
+- 09/26/06  V 0.96.3
+      			- Fixed onClose, no more memory leak and nore issues with sound on IE (even on dialogs)
+      			- add getLocation
+      			- Debug select problem on Firefox
+      			- change mouseup event to onclick event
+      			- Fixed event propagation on mininize/maximize/close
+      			- Add frameborder=0
+      			- Add prototype_window_class_helper.rb by Jorge Díaz (http://xurde.info)
+      			
+- 07/22/06  V 0.96.2
+            - Fixed select issue in modal window			
+            
+- 07/15/06  V 0.96.1
+            - Bugs fixed
+            - Add isVisible()
+            - Update debug.js
+            
+- 07/11/06  V 0.96
+            - New events onShow, onHide, onFocus
+            - isVisible()
+            - Autofit width or height if width or (NOT AND) height is set to null in the constructor
+            - updateWidth / updateHeight if you need to update width or height (useful after changing window content if you do not want scrollbars)
+            - Add top, left to showCenter(modal, top, left) optional arguments if you need to center only left or top value.
+            
+- 06/30/06  V 0.95
+            - Now you can set windows or dialogs content with an Ajax request!!
+            - Fixed IE issue when you destroy window with an url that embeds mp3.
+            - Fixed buttonClass issue for Dialog.
+            - Update samples
+            
+- 06/24/06  V 0.90
+            - Valid XHTML 1.0 Strict!
+            - Fixed minimize function
+            - Fixed destroy on window without hide effects
+            - No more text selection while dragging
+            - Add onMinimize/onMaximize event
+            
+- 06/19/06  V 0.85.2
+            - Remove undeclared vars
+            - Set top/left to 0 if not specify
+            - Destroy objet after hide effect instead of before effect instead
+            - getSize
+            - add extended_debug.js (from Jason Pollard)
+            
+- 06/13/06  V 0.85.1
+            - IE bug fixed
+            
+- 06/12/06  V 0.85
+            - Autofit width or height for Dialog
+            - Better Move/Resize over 
+            - Allow select in modal window (even on IE)
+            - WARNING, ok callback for Dialog should returns true to close the dialog
+            - better window HTML code (no more div inside the td)
+            - Add themes
+            
+- 05/23/06  V 0.80
+            - Add setTitle
+            - Add setStatusBar
+            - Store minimize/maximize in the cookie (Thanks to Ifran)
+            - Add onload constructor parameter (Thanks to Ifran)
+            - Add button class for dialog (Thanks to Felix Shnir)
+            
+- 05/09/06  V 0.75
+            - Update with Script.aculo.us 1.6.1 and Prototype 1.5.0_rc1
+            - Remove PNG for dialog overlay, use opacity as done in lightbox V2
+            - Add Windows.focusedWindow and  Windows.closeAll
+            - Add name to iframe in case of url window
+            - Clean up code, use _ for private function (just name convention)
+            - Add Dialog.info function, usefull for for submit or notice info (in Rails)
+            - Add minimize and maximize buttons
+            - Add alert_lite.css without any images
+            - Debug
+            
+- 04/15/06  V 0.70
+					  - Add autoposition in setContent. The window will at the element location
+					  - Add draggable/closable parameter if you need to specify is the window is draggable/closable or not
+					  - Add parent parameter if you need a specific parent instead of body
+					  - Better resize
+					  - Add setCookie to store window location/size in a cookie
+					  - Add parent.html sample
+
+- 04/05/06  V 0.65 
+           - Update to Prototype 1.5.0_pre1, script.aculo.us 1.6.0
+				   - Add setDestoyOnClose
+				   - Add Windows Observer with onStartResize(), onEndResize(), onStartMove(), onEndMove(), onClose(), onDestroy() events
+				   - Add setContent(id, autoresize)
+
+- 03/29/06  V 0.6  
+           - Add Window delegate to manage close action
+			     - Add modal mode and Dialog class with common panels: alert, confirm
+				   - Clean HTML code and change caracters to lowercase to be XHTML compliant (thanks to nuxygen and Joseph)
+				   - Add showEffectOptions, hideEffectOptions, effectOptions to Window constructor (thanks to Jon)
+				   - Fix checkbox IE bug (big thanks to JCA)
+				   - Fix other little bugs (thanks to nuxygen, Dennis, and all who sent me emails)
+				   - Update samples/index.html
+				   - Add new sample usng frame (samples/inset.html and samples/inframe.html but use only samples/inset.html)
+				
+- 03/27/06 	V 0.51 
+           - New CSS theme structure 
+           - Add url: constructor parameter to have a window with an URL content
+				   - Add bottom/right constructor parameters	
+				   - Update sample files.
+			
+- 03/24/06  V 0.50 Initial revision
+
+
+== License
+
+it is licensed under the terms of the MIT License, see the included MIT-LICENSE file.
+
+== Thanks
+To all of you who sent me bugs, patches and feature requests
+
+http://www.ciudadmovil.com.co/q/mod/mapa/conexion.php
+http://www.desyr.net/
\ No newline at end of file
diff --git a/htdocs/includes/scriptaculous/src/window/debug.js b/htdocs/includes/scriptaculous/src/window/debug.js
new file mode 100644
index 0000000000000000000000000000000000000000..3d8f338836ec6730ff75f25ce4ae86954f22ed46
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/debug.js
@@ -0,0 +1,137 @@
+var debugWindow = null;
+function debug(text, reverse) {
+	if (debugWindow == null)
+ 		return;
+
+	time = "-"; //new Date();
+	if (reverse) {
+		$('debug').innerHTML = time + " " + text + "<br>"+ 	$('debug').innerHTML;
+		debugWindow.getContent().scrollTop=0;
+	}
+	else {
+		$('debug').innerHTML +=  time + " " + text + "<br>";
+		debugWindow.getContent().scrollTop=10000; // Far away 
+	}
+}
+
+function hideDebug() {
+	if (debugWindow) {
+		debugWindow.destroy();
+		debugWindow = null;
+	}
+}
+
+function showDebug(bShow) {
+ if (debugWindow == null) {
+  debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"})
+  debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div id='debug'></div>";
+  date=new Date;
+    date.setMonth(date.getMonth()+3);
+    
+  //debugWindow.setCookie(null, date);
+ }
+ if( typeof bShow == 'undefined' || bShow)debugWindow.show()
+}
+
+
+function clearDebug() {
+	if (debugWindow == null)
+ 		return;
+	$('debug').innerHTML = "";
+}
+
+/**
+ * document.createElement convenience wrapper
+ *
+ * The data parameter is an object that must have the "tag" key, containing
+ * a string with the tagname of the element to create.  It can optionally have
+ * a "children" key which can be: a string, "data" object, or an array of "data"
+ * objects to append to this element as children.  Any other key is taken as an
+ * attribute to be applied to this tag.
+ *
+ * Available under an MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * @param {Object} data The data representing the element to create
+ * @return {Element} The element created.
+ */
+function $E(data) {
+  var el;
+  if ('string'==typeof data) {
+      el=document.createTextNode(data);
+  } else {
+    //create the element
+    el=document.createElement(data.tag);
+    delete(data.tag);
+
+    //append the children
+    if ('undefined'!=typeof data.children) {
+      if ('string'==typeof data.children ||'undefined'==typeof data.children.length) {
+        //strings and single elements
+        el.appendChild($E(data.children));
+      } else {
+        //arrays of elements
+        for (var i=0, child=null; 'undefined'!=typeof (child=data.children[i]); i++) {
+            el.appendChild($E(child));
+        }
+      }
+      delete(data.children);
+    }
+
+    //any other data is attributes
+    for (attr in data) {
+      el[attr]=data[attr];
+    }
+  }
+
+  return el;
+}
+
+// FROM Nick Hemsley
+var Debug = {
+	inspectOutput: function (container, within) {
+		within = within || debugWindow.getContent()
+		
+		if (debugWindow == null)
+ 			return;
+
+		within.appendChild(container)
+	},
+	
+	inspect: function(object) {
+		var cont = $E({tag: "div", className: "inspector"})
+		Debug.inspectObj(object, cont)
+		debugWindow.getContent().appendChild(cont)
+	},
+	
+	inspectObj: function (object, container) {
+		for (prop in object) {
+			Debug.inspectOutput(Debug.inspectable(object, prop), container)
+		}
+	},
+	
+	inspectable: function(object, prop) {
+		cont = $E({tag: 'div', className: 'inspectable', children: [prop + " value: " + object[prop] ]})
+		cont.toInspect = object[prop]
+		Event.observe(cont, 'click', Debug.inspectClicked, false)
+		return cont
+	},
+	
+	inspectClicked: function(e) {
+		Debug.inspectContained(Event.element(e))
+		Event.stop(e)
+	},
+	
+	inspectContained: function(container) {
+		if (container.opened) {
+			container.parentNode.removeChild(container.opened)
+			delete(container.opened)
+		} else {
+			sibling = container.parentNode.insertBefore($E({tag: "div", className: "child"}), container.nextSibling)
+			if (container.toInspect)
+				Debug.inspectObj(container.toInspect, sibling)
+			container.opened = sibling
+		}
+	}
+}
+var inspect = Debug.inspect;
diff --git a/htdocs/includes/scriptaculous/src/window/extended_debug.js b/htdocs/includes/scriptaculous/src/window/extended_debug.js
new file mode 100644
index 0000000000000000000000000000000000000000..2b935b1b7dda57ff3203eb4673961fff1466304b
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/extended_debug.js
@@ -0,0 +1,113 @@
+var commandHistory;
+var historyIndex;
+
+function showExtendedDebug() {
+	if (debugWindow != null) {
+	  hideDebug();
+  }
+  
+	if (debugWindow == null) {
+	 	commandHistory = new Array();
+	 	historyIndex = 0;
+		
+		debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, minWidth:250, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"})
+		debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div font='monaco' id='debug' style='padding:3px;color:#0F0;font-family:monaco'></div>";
+
+		//create hourglass icon and attach events to it.
+		var cont = "<div id=\"debug_window_inspect\" style=\"width: 15px; height: 15px; background: transparent url(themes/default/inspect.gif) no-repeat 0 0; position:absolute; top:5px; left:70px; cursor:pointer; z-index:3000;\"></div>";
+
+		new Insertion.After('debug_window_maximize', cont);
+		Event.observe('debug_window_inspect', 'click', enterInspectionMode, false);
+
+		//create command text box
+		cont = "Eval:<input id=\"debug_window_command\" type=\"textbox\" style=\"width:150px; height: 12px; color: black;\">"
+		debugWindow.setStatusBar(cont);
+
+		Event.observe('debug_window_command', 'mousedown', donothing);
+		Event.observe('debug_window_command', 'keypress', evalJS, false);
+	}
+	debugWindow.show();		
+}
+
+function donothing(evt){
+		Field.activate('debug_window_command');
+		return false;
+}
+
+function evalJS(evt){
+	if(evt.keyCode == Event.KEY_RETURN){
+		var js = $F('debug_window_command');
+		try{
+			var ret = eval(js);
+			if(ret != null)
+				debug(ret);
+		}catch(e){
+			debug(e);
+		}
+		$('debug_window_command').value = '';
+
+		Field.activate('debug_window_command');
+		commandHistory.push(js);
+		historyIndex = 0;
+	}
+
+	if(evt.keyCode == Event.KEY_UP){
+		if(commandHistory.length > historyIndex){
+			historyIndex++;
+			var js = commandHistory[commandHistory.length-historyIndex];
+			$('debug_window_command').value = js;
+			Event.stop(evt);
+			Field.activate('debug_window_command');
+		}
+	}
+
+	if(evt.keyCode == Event.KEY_DOWN){
+		if(commandHistory.length >= historyIndex && historyIndex > 1){
+			historyIndex--;
+			var js = commandHistory[commandHistory.length-historyIndex];
+			$('debug_window_command').value = js;
+			Event.stop(evt);
+			Field.activate('debug_window_command');
+		}
+	}	
+}
+
+function enterInspectionMode(evt){
+	//stop observing magnifying glass
+	Event.stopObserving('debug_window_inspect', 'click', enterInspectionMode, false);
+	//change pointer
+	document.body.style.cursor='help';
+	//start observing mouse clicks
+	Event.observe(window, 'click', inspectItem, false);		
+}
+
+function inspectItem(evt){
+	// the element that triggered the event
+	var element = Event.element(evt);
+	if(element.id!="debug_window_inspect"){
+		clearDebug()
+		//change pointer
+		document.body.style.cursor='default';
+		debug(element.id);
+		inspect(element);
+		//stop observing mouse clicks
+		Event.stopObserving(window, 'click', inspectItem, false);
+		//alert('doing something');
+		//start observing mag
+		Event.observe('debug_window_inspect', 'click', enterInspectionMode, false);
+	}
+}
+
+function clearDebug() {
+	var win = $('debug');
+	if (win == null)
+		return;
+		
+	win.innerHTML=" ";
+	//clear inspections too
+	var divs = document.getElementsByClassName('inspector');
+	divs.each(function(div){
+		Element.remove(div);
+	});
+}
+
diff --git a/htdocs/includes/scriptaculous/src/window/tooltip.js b/htdocs/includes/scriptaculous/src/window/tooltip.js
new file mode 100644
index 0000000000000000000000000000000000000000..65e6106034c2733fbdcae4135ad26b41dc7d28b4
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/tooltip.js
@@ -0,0 +1,241 @@
+// Singleton class TooltipWindow
+// This class works with special className. The tooltip content could be in your HTML page as an hidden element or
+// can be retreive by an AJAX call.
+//
+// To work, You just need to set two class name on elements that should show tooltips
+// - One to say to TooltipManager that this element must have a tooltip ('tooltip' by default)
+// - Another to indicate how to find the tooltip content
+//   It could be html_XXXX if tootltip content is somewhere hidden in your page, XXX must be DOM ID of this hidden element
+//   It could be ajax_XXXX if tootltip content must be find by an ajax request, XXX will be the string send as id parameter to your server. 
+// Check samples/tooltips/tooltip.html to see how it works
+//
+TooltipManager = {
+  options: {cssClassName: 'tooltip', delayOver: 200, delayOut: 1000, shiftX: 10, shiftY: 10,
+            className: 'alphacube', width: 200, height: null, 
+            draggable: false, minimizable: false, maximizable: false, showEffect: Element.show, hideEffect: Element.hide},
+  ajaxInfo: null,
+  elements: null,
+  showTimer: null,
+  hideTimer: null,
+
+  // Init tooltip manager
+  // parameters:
+  // - cssClassName (string) : CSS class name where tooltip should be shown. 
+  // - ajaxOptions  (hash)   : Ajax options for ajax tooltip. 
+  //                           For examples {url: "/tooltip/get.php", options: {method: 'get'}} 
+  //                           see Ajax.Request documentation for details
+  //- tooltipOptions (hash)  : available keys
+  //                           - delayOver: int in ms (default 10) delay before showing tooltip
+  //                           - delayOut:  int in ms (default 1000) delay before hidding tooltip
+  //                           - shiftX:    int in pixels (default 10) left shift of the tooltip window 
+  //                           - shiftY:    int in pixels (default 10) top shift of the tooltip window 
+  //                           and All window options like showEffect: Element.show, hideEffect: Element.hide to remove animation
+  //                           default: {className: 'alphacube', width: 200, height: null, draggable: false, minimizable: false, maximizable: false}
+  
+  init: function(cssClassName, ajaxInfo, tooltipOptions) {
+    TooltipManager.options = Object.extend(TooltipManager.options, tooltipOptions || {});
+    
+    cssClassName = TooltipManager.options.cssClassName || "tooltip";
+    TooltipManager.ajaxInfo = ajaxInfo;
+    TooltipManager.elements = $$("." + cssClassName);
+    TooltipManager.elements.each(function(element) {
+      element = $(element)
+      var info = TooltipManager._getInfo(element);
+      if (info.ajax) {
+        element.ajaxId = info.id;
+        element.ajaxInfo = ajaxInfo;
+      }
+      else {
+        element.tooltipElement = $(info.id);
+      }
+      element.observe("mouseover", TooltipManager._mouseOver);
+      element.observe("mouseout", TooltipManager._mouseOut);
+    });
+    Windows.addObserver(this);
+  },
+  
+  addHTML: function(element, tooltipElement) {
+    element = $(element);
+    tooltipElement = $(tooltipElement);
+    element.tooltipElement = tooltipElement;
+    
+    element.observe("mouseover", TooltipManager._mouseOver);
+    element.observe("mouseout", TooltipManager._mouseOut);
+  },
+  
+  addAjax: function(element, ajaxInfo) {
+    element = $(element);
+    element.ajaxInfo = ajaxInfo;
+    element.observe("mouseover", TooltipManager._mouseOver);
+    element.observe("mouseout", TooltipManager._mouseOut);    
+  },
+    
+  addURL: function(element, url, width, height) {
+    element = $(element);
+    element.url = url;
+    element.frameWidth = width;
+    element.frameHeight = height;
+    element.observe("mouseover", TooltipManager._mouseOver);
+    element.observe("mouseout", TooltipManager._mouseOut);    
+  },
+    
+  close: function() {
+    if (TooltipManager.tooltipWindow)
+      TooltipManager.tooltipWindow.hide();
+  },
+  
+  preloadImages: function(path, images, extension) {
+    if (!extension)
+      extension = ".gif";
+      
+    //preload images
+    $A(images).each(function(i) {
+      var image = new Image(); 
+      image.src= path + "/" + i + extension; 
+    });
+  },
+  
+  _showTooltip: function(element) {
+    if (this.element == element)
+      return;
+    // Get original element
+    while (element && (!element.tooltipElement && !element.ajaxInfo && !element.url)) 
+      element = element.parentNode;
+    this.element = element;
+    
+    TooltipManager.showTimer = null;
+    if (TooltipManager.hideTimer)
+      clearTimeout(TooltipManager.hideTimer);
+    
+    var position = Position.cumulativeOffset(element);
+    var dimension = element.getDimensions();
+
+    if (! this.tooltipWindow)
+      this.tooltipWindow = new Window("__tooltip__", TooltipManager.options);
+      
+    this.tooltipWindow.hide();
+    this.tooltipWindow.setLocation(position[1] + dimension.height + TooltipManager.options.shiftY, position[0] + TooltipManager.options.shiftX);
+
+    Event.observe(this.tooltipWindow.element, "mouseover", function(event) {TooltipManager._tooltipOver(event, element)});
+    Event.observe(this.tooltipWindow.element, "mouseout", function(event) {TooltipManager._tooltipOut(event, element)});
+
+    // Reset width/height for computation
+    this.tooltipWindow.height = TooltipManager.options.height;
+    this.tooltipWindow.width = TooltipManager.options.width;
+
+    // Ajax content
+    if (element.ajaxInfo) {
+      var p = element.ajaxInfo.options.parameters;
+      var saveParam = p;
+      
+      // Set by CSS
+      if (element.ajaxId) {
+        if (p)
+          p += "&id=" + element.ajaxId;
+        else
+          p = "id=" + element.ajaxId;
+      }
+      element.ajaxInfo.options.parameters = p || "";
+      this.tooltipWindow.setHTMLContent("");
+      this.tooltipWindow.setAjaxContent(element.ajaxInfo.url, element.ajaxInfo.options);
+      element.ajaxInfo.options.parameters = saveParam;    
+    } 
+    // URL content
+    else if (element.url) {
+      this.tooltipWindow.setURL(element.url);
+      this.tooltipWindow.setSize(element.frameWidth, element.frameHeight);
+
+      // Set tooltip size
+      this.tooltipWindow.height = element.frameHeight;
+      this.tooltipWindow.width = element.frameWidth;
+    }
+    // HTML content
+    else
+      this.tooltipWindow.setHTMLContent(element.tooltipElement.innerHTML);
+
+    if (!element.ajaxInfo) {
+      this.tooltipWindow.show();
+      this.tooltipWindow.toFront();
+    }
+  },
+  
+  _hideTooltip: function(element) {
+    if (this.tooltipWindow) {
+      this.tooltipWindow.hide();
+      this.element = null;
+    }
+  },
+  
+  _mouseOver: function (event) {
+    var element = Event.element(event);
+    if (TooltipManager.showTimer) 
+      clearTimeout(TooltipManager.showTimer);
+    
+    TooltipManager.showTimer = setTimeout(function() {TooltipManager._showTooltip(element)}, TooltipManager.options.delayOver)
+  },
+  
+  _mouseOut: function(event) {
+    var element = Event.element(event);
+    if (TooltipManager.showTimer) {
+      clearTimeout(TooltipManager.showTimer);
+      TooltipManager.showTimer = null;
+      return;
+    }
+    if (TooltipManager.tooltipWindow)
+      TooltipManager.hideTimer = setTimeout(function() {TooltipManager._hideTooltip(element)}, TooltipManager.options.delayOut)
+  },
+  
+  _tooltipOver: function(event, element) {
+    if (TooltipManager.hideTimer) {
+      clearTimeout(TooltipManager.hideTimer);
+      TooltipManager.hideTimer = null;
+    }
+  },
+  
+  _tooltipOut: function(event, element) {
+    if (TooltipManager.hideTimer == null)
+      TooltipManager.hideTimer = setTimeout(function() {TooltipManager._hideTooltip(element)}, TooltipManager.options.delayOut)
+  },
+  
+  _getInfo: function(element) {
+    // Find html_ for static content
+    var id = element.className.split(' ').detect(function(name) {return name.indexOf("html_") == 0});
+    var ajax = true;
+    if (id)
+      ajax = false;
+    else 
+      // Find ajax_ for ajax content
+      id = element.className.split(' ').detect(function(name) {return name.indexOf("ajax_") == 0});
+    
+    id = id.substr(id.indexOf('_')+1, id.length)
+    return id ? {ajax: ajax, id: id} : null;
+  },
+  
+  onBeforeShow: function(eventName, win) {
+     var top = parseFloat(win.getLocation().top);
+     var dim = win.element.getDimensions();
+    
+     if (top + dim.height > TooltipManager._getScrollTop() + TooltipManager._getPageHeight()) {
+       var position = Position.cumulativeOffset(this.element);
+
+       var top = position[1] - TooltipManager.options.shiftY - dim.height;
+       win.setLocation(top, position[0] + TooltipManager.options.shiftX)
+     }
+   },
+
+	_getPageWidth: function(){
+		return window.innerWidth || document.documentElement.clientWidth || 0;
+	},
+	
+	_getPageHeight: function(){
+		return window.innerHeight || document.documentElement.clientHeight || 0;
+	},
+
+	_getScrollTop: function(){
+		return document.documentElement.scrollTop || window.pageYOffset || 0;
+	},
+
+	_getScrollLeft: function(){
+		return document.documentElement.scrollLeft || window.pageXOffset || 0;
+	}	
+};
diff --git a/htdocs/includes/scriptaculous/src/window/window.js b/htdocs/includes/scriptaculous/src/window/window.js
new file mode 100644
index 0000000000000000000000000000000000000000..5fc2533f87979c4f51b5ab8551c859f62a0b512c
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/window.js
@@ -0,0 +1,1843 @@
+// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// VERSION 1.3
+
+var Window = Class.create();
+
+Window.keepMultiModalWindow = false;
+Window.hasEffectLib = (typeof Effect != 'undefined');
+Window.resizeEffectDuration = 0.4;
+
+Window.prototype = {
+  // Constructor
+  // Available parameters : className, blurClassName, title, minWidth, minHeight, maxWidth, maxHeight, width, height, top, left, bottom, right, resizable, zIndex, opacity, recenterAuto, wiredDrag
+  //                        hideEffect, showEffect, showEffectOptions, hideEffectOptions, effectOptions, url, draggable, closable, minimizable, maximizable, parent, onload
+  //                        add all callbacks (if you do not use an observer)
+  //                        onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose
+  
+  initialize: function() {
+    var id;
+    var optionIndex = 0;
+    // For backward compatibility like win= new Window("id", {...}) instead of win = new Window({id: "id", ...})
+    if (arguments.length > 0) {
+      if (typeof arguments[0] == "string" ) {
+        id = arguments[0];
+        optionIndex = 1;
+      }
+      else
+        id = arguments[0] ? arguments[0].id : null;
+    }
+    
+    // Generate unique ID if not specified
+    if (!id)
+      id = "window_" + new Date().getTime();
+      
+    if ($(id))
+      alert("Window " + id + " is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor");
+
+    this.options = Object.extend({
+      className:         "dialog",
+      blurClassName:     null,
+      minWidth:          100, 
+      minHeight:         20,
+      resizable:         true,
+      closable:          true,
+      minimizable:       true,
+      maximizable:       true,
+      draggable:         true,
+      userData:          null,
+      showEffect:        (Window.hasEffectLib ? Effect.Appear : Element.show),
+      hideEffect:        (Window.hasEffectLib ? Effect.Fade : Element.hide),
+      showEffectOptions: {},
+      hideEffectOptions: {},
+      effectOptions:     null,
+      parent:            document.body,
+      title:             "&nbsp;",
+      url:               null,
+      onload:            Prototype.emptyFunction,
+      width:             200,
+      height:            300,
+      opacity:           1,
+      recenterAuto:      true,
+      wiredDrag:         false,
+      closeCallback:     null,
+      destroyOnClose:    false,
+      gridX:             1, 
+      gridY:             1      
+    }, arguments[optionIndex] || {});
+    if (this.options.blurClassName)
+      this.options.focusClassName = this.options.className;
+      
+    if (typeof this.options.top == "undefined" &&  typeof this.options.bottom ==  "undefined") 
+      this.options.top = this._round(Math.random()*500, this.options.gridY);
+    if (typeof this.options.left == "undefined" &&  typeof this.options.right ==  "undefined") 
+      this.options.left = this._round(Math.random()*500, this.options.gridX);
+
+    if (this.options.effectOptions) {
+      Object.extend(this.options.hideEffectOptions, this.options.effectOptions);
+      Object.extend(this.options.showEffectOptions, this.options.effectOptions);
+      if (this.options.showEffect == Element.Appear)
+        this.options.showEffectOptions.to = this.options.opacity;
+    }
+    if (Window.hasEffectLib) {
+      if (this.options.showEffect == Effect.Appear)
+        this.options.showEffectOptions.to = this.options.opacity;
+    
+      if (this.options.hideEffect == Effect.Fade)
+        this.options.hideEffectOptions.from = this.options.opacity;
+    }
+    if (this.options.hideEffect == Element.hide)
+      this.options.hideEffect = function(){ Element.hide(this.element); if (this.options.destroyOnClose) this.destroy(); }.bind(this)
+    
+    if (this.options.parent != document.body)  
+      this.options.parent = $(this.options.parent);
+      
+    this.element = this._createWindow(id);       
+    this.element.win = this;
+    
+    // Bind event listener
+    this.eventMouseDown = this._initDrag.bindAsEventListener(this);
+    this.eventMouseUp   = this._endDrag.bindAsEventListener(this);
+    this.eventMouseMove = this._updateDrag.bindAsEventListener(this);
+    this.eventOnLoad    = this._getWindowBorderSize.bindAsEventListener(this);
+    this.eventMouseDownContent = this.toFront.bindAsEventListener(this);
+    this.eventResize = this._recenter.bindAsEventListener(this);
+ 
+    this.topbar = $(this.element.id + "_top");
+    this.bottombar = $(this.element.id + "_bottom");
+    this.content = $(this.element.id + "_content");
+    
+    Event.observe(this.topbar, "mousedown", this.eventMouseDown);
+    Event.observe(this.bottombar, "mousedown", this.eventMouseDown);
+    Event.observe(this.content, "mousedown", this.eventMouseDownContent);
+    Event.observe(window, "load", this.eventOnLoad);
+    Event.observe(window, "resize", this.eventResize);
+    Event.observe(window, "scroll", this.eventResize);
+    Event.observe(this.options.parent, "scroll", this.eventResize);
+    
+    if (this.options.draggable)  {
+      var that = this;
+      [this.topbar, this.topbar.up().previous(), this.topbar.up().next()].each(function(element) {
+        element.observe("mousedown", that.eventMouseDown);
+        element.addClassName("top_draggable");
+      });
+      [this.bottombar.up(), this.bottombar.up().previous(), this.bottombar.up().next()].each(function(element) {
+        element.observe("mousedown", that.eventMouseDown);
+        element.addClassName("bottom_draggable");
+      });
+      
+    }    
+    
+    if (this.options.resizable) {
+      this.sizer = $(this.element.id + "_sizer");
+      Event.observe(this.sizer, "mousedown", this.eventMouseDown);
+    }  
+    
+    this.useLeft = null;
+    this.useTop = null;
+    if (typeof this.options.left != "undefined") {
+      this.element.setStyle({left: parseFloat(this.options.left) + 'px'});
+      this.useLeft = true;
+    }
+    else {
+      this.element.setStyle({right: parseFloat(this.options.right) + 'px'});
+      this.useLeft = false;
+    }
+    
+    if (typeof this.options.top != "undefined") {
+      this.element.setStyle({top: parseFloat(this.options.top) + 'px'});
+      this.useTop = true;
+    }
+    else {
+      this.element.setStyle({bottom: parseFloat(this.options.bottom) + 'px'});      
+      this.useTop = false;
+    }
+      
+    this.storedLocation = null;
+    
+    this.setOpacity(this.options.opacity);
+    if (this.options.zIndex)
+      this.setZIndex(this.options.zIndex)
+
+    if (this.options.destroyOnClose)
+      this.setDestroyOnClose(true);
+
+    this._getWindowBorderSize();
+    this.width = this.options.width;
+    this.height = this.options.height;
+    this.visible = false;
+    
+    this.constraint = false;
+    this.constraintPad = {top: 0, left:0, bottom:0, right:0};
+    
+    if (this.width && this.height)
+      this.setSize(this.options.width, this.options.height);
+    this.setTitle(this.options.title)
+    Windows.register(this);      
+  },
+  
+  // Destructor
+  destroy: function() {
+    this._notify("onDestroy");
+    Event.stopObserving(this.topbar, "mousedown", this.eventMouseDown);
+    Event.stopObserving(this.bottombar, "mousedown", this.eventMouseDown);
+    Event.stopObserving(this.content, "mousedown", this.eventMouseDownContent);
+    
+    Event.stopObserving(window, "load", this.eventOnLoad);
+    Event.stopObserving(window, "resize", this.eventResize);
+    Event.stopObserving(window, "scroll", this.eventResize);
+    
+    Event.stopObserving(this.content, "load", this.options.onload);
+
+    if (this._oldParent) {
+      var content = this.getContent();
+      var originalContent = null;
+      for(var i = 0; i < content.childNodes.length; i++) {
+        originalContent = content.childNodes[i];
+        if (originalContent.nodeType == 1) 
+          break;
+        originalContent = null;
+      }
+      if (originalContent)
+        this._oldParent.appendChild(originalContent);
+      this._oldParent = null;
+    }
+
+    if (this.sizer)
+        Event.stopObserving(this.sizer, "mousedown", this.eventMouseDown);
+
+    if (this.options.url) 
+      this.content.src = null
+
+     if(this.iefix) 
+      Element.remove(this.iefix);
+
+    Element.remove(this.element);
+    Windows.unregister(this);      
+  },
+    
+  // Sets close callback, if it sets, it should return true to be able to close the window.
+  setCloseCallback: function(callback) {
+    this.options.closeCallback = callback;
+  },
+  
+  // Gets window content
+  getContent: function () {
+    return this.content;
+  },
+  
+  // Sets the content with an element id
+  setContent: function(id, autoresize, autoposition) {
+    var element = $(id);
+    if (null == element) throw "Unable to find element '" + id + "' in DOM";
+    this._oldParent = element.parentNode;
+
+    var d = null;
+    var p = null;
+
+    if (autoresize) 
+      d = Element.getDimensions(element);
+    if (autoposition) 
+      p = Position.cumulativeOffset(element);
+
+    var content = this.getContent();
+    // Clear HTML (and even iframe)
+    this.setHTMLContent("");
+    content = this.getContent();
+    
+    content.appendChild(element);
+    element.show();
+    if (autoresize) 
+      this.setSize(d.width, d.height);
+    if (autoposition) 
+      this.setLocation(p[1] - this.heightN, p[0] - this.widthW);    
+  },
+  
+  setHTMLContent: function(html) {
+    // It was an url (iframe), recreate a div content instead of iframe content
+    if (this.options.url) {
+      this.content.src = null;
+      this.options.url = null;
+      
+  	  var content ="<div id=\"" + this.getId() + "_content\" class=\"" + this.options.className + "_content\"> </div>";
+      $(this.getId() +"_table_content").innerHTML = content;
+      
+      this.content = $(this.element.id + "_content");
+    }
+      
+    this.getContent().innerHTML = html;
+  },
+  
+  setAjaxContent: function(url, options, showCentered, showModal) {
+    this.showFunction = showCentered ? "showCenter" : "show";
+    this.showModal = showModal || false;
+  
+    options = options || {};
+
+    // Clear HTML (and even iframe)
+    this.setHTMLContent("");
+ 
+    this.onComplete = options.onComplete;
+    if (! this._onCompleteHandler)
+      this._onCompleteHandler = this._setAjaxContent.bind(this);
+    options.onComplete = this._onCompleteHandler;
+
+    new Ajax.Request(url, options);    
+    options.onComplete = this.onComplete;
+  },
+  
+  _setAjaxContent: function(originalRequest) {
+    Element.update(this.getContent(), originalRequest.responseText);
+    if (this.onComplete)
+      this.onComplete(originalRequest);
+    this.onComplete = null;
+    this[this.showFunction](this.showModal)
+  },
+  
+  setURL: function(url) {
+    // Not an url content, change div to iframe
+    if (this.options.url) 
+      this.content.src = null;
+    this.options.url = url;
+    var content= "<iframe frameborder='0' name='" + this.getId() + "_content'  id='" + this.getId() + "_content' src='" + url + "' width='" + this.width + "' height='" + this.height + "'> </iframe>";
+    $(this.getId() +"_table_content").innerHTML = content;
+    
+    this.content = $(this.element.id + "_content");
+  },
+
+  getURL: function() {
+  	return this.options.url ? this.options.url : null;
+  },
+
+  refresh: function() {
+    if (this.options.url)
+	    $(this.element.getAttribute('id') + '_content').src = this.options.url;
+  },
+  
+  // Stores position/size in a cookie, by default named with window id
+  setCookie: function(name, expires, path, domain, secure) {
+    name = name || this.element.id;
+    this.cookie = [name, expires, path, domain, secure];
+    
+    // Get cookie
+    var value = WindowUtilities.getCookie(name)
+    // If exists
+    if (value) {
+      var values = value.split(',');
+      var x = values[0].split(':');
+      var y = values[1].split(':');
+
+      var w = parseFloat(values[2]), h = parseFloat(values[3]);
+      var mini = values[4];
+      var maxi = values[5];
+
+      this.setSize(w, h);
+      if (mini == "true")
+        this.doMinimize = true; // Minimize will be done at onload window event
+      else if (maxi == "true")
+        this.doMaximize = true; // Maximize will be done at onload window event
+
+      this.useLeft = x[0] == "l";
+      this.useTop = y[0] == "t";
+
+      this.element.setStyle(this.useLeft ? {left: x[1]} : {right: x[1]});
+      this.element.setStyle(this.useTop ? {top: y[1]} : {bottom: y[1]});
+    }
+  },
+  
+  // Gets window ID
+  getId: function() {
+    return this.element.id;
+  },
+  
+  // Detroys itself when closing 
+  setDestroyOnClose: function() {
+    this.options.destroyOnClose = true;
+  },
+  
+  setConstraint: function(bool, padding) {
+    this.constraint = bool;
+    this.constraintPad = Object.extend(this.constraintPad, padding || {});
+    // Reset location to apply constraint
+    if (this.useTop && this.useLeft)
+      this.setLocation(parseFloat(this.element.style.top), parseFloat(this.element.style.left));
+  },
+  
+  // initDrag event
+
+  _initDrag: function(event) {
+    // No resize on minimized window
+    if (Event.element(event) == this.sizer && this.isMinimized())
+      return;
+
+    // No move on maximzed window
+    if (Event.element(event) != this.sizer && this.isMaximized())
+      return;
+      
+    if (Prototype.Browser.IE && this.heightN == 0)
+      this._getWindowBorderSize();
+    
+    // Get pointer X,Y
+    this.pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];
+    if (this.options.wiredDrag) 
+      this.currentDrag = this._createWiredElement();
+    else
+      this.currentDrag = this.element;
+      
+    // Resize
+    if (Event.element(event) == this.sizer) {
+      this.doResize = true;
+      this.widthOrg = this.width;
+      this.heightOrg = this.height;
+      this.bottomOrg = parseFloat(this.element.getStyle('bottom'));
+      this.rightOrg = parseFloat(this.element.getStyle('right'));
+      this._notify("onStartResize");
+    }
+    else {
+      this.doResize = false;
+
+      // Check if click on close button, 
+      var closeButton = $(this.getId() + '_close');
+      if (closeButton && Position.within(closeButton, this.pointer[0], this.pointer[1])) {
+        this.currentDrag = null;
+        return;
+      }
+
+      this.toFront();
+
+      if (! this.options.draggable) 
+        return;
+      this._notify("onStartMove");
+    }    
+    // Register global event to capture mouseUp and mouseMove
+    Event.observe(document, "mouseup", this.eventMouseUp, false);
+    Event.observe(document, "mousemove", this.eventMouseMove, false);
+    
+    // Add an invisible div to keep catching mouse event over iframes
+    WindowUtilities.disableScreen('__invisible__', '__invisible__', this.overlayOpacity);
+
+    // Stop selection while dragging
+    document.body.ondrag = function () { return false; };
+    document.body.onselectstart = function () { return false; };
+    
+    this.currentDrag.show();
+    Event.stop(event);
+  },
+  
+  _round: function(val, round) {
+    return round == 1 ? val  : val = Math.floor(val / round) * round;
+  },
+
+  // updateDrag event
+  _updateDrag: function(event) {
+    var pointer =  [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];  
+    var dx = pointer[0] - this.pointer[0];
+    var dy = pointer[1] - this.pointer[1];
+    
+    // Resize case, update width/height
+    if (this.doResize) {
+      var w = this.widthOrg + dx;
+      var h = this.heightOrg + dy;
+      
+      dx = this.width - this.widthOrg
+      dy = this.height - this.heightOrg
+      
+      // Check if it's a right position, update it to keep upper-left corner at the same position
+      if (this.useLeft) 
+        w = this._updateWidthConstraint(w)
+      else 
+        this.currentDrag.setStyle({right: (this.rightOrg -dx) + 'px'});
+      // Check if it's a bottom position, update it to keep upper-left corner at the same position
+      if (this.useTop) 
+        h = this._updateHeightConstraint(h)
+      else
+        this.currentDrag.setStyle({bottom: (this.bottomOrg -dy) + 'px'});
+        
+      this.setSize(w , h);
+      this._notify("onResize");
+    }
+    // Move case, update top/left
+    else {
+      this.pointer = pointer;
+      
+      if (this.useLeft) {
+        var left =  parseFloat(this.currentDrag.getStyle('left')) + dx;
+        var newLeft = this._updateLeftConstraint(left);
+        // Keep mouse pointer correct
+        this.pointer[0] += newLeft-left;
+        this.currentDrag.setStyle({left: newLeft + 'px'});
+      }
+      else 
+        this.currentDrag.setStyle({right: parseFloat(this.currentDrag.getStyle('right')) - dx + 'px'});
+      
+      if (this.useTop) {
+        var top =  parseFloat(this.currentDrag.getStyle('top')) + dy;
+        var newTop = this._updateTopConstraint(top);
+        // Keep mouse pointer correct
+        this.pointer[1] += newTop - top;
+        this.currentDrag.setStyle({top: newTop + 'px'});
+      }
+      else 
+        this.currentDrag.setStyle({bottom: parseFloat(this.currentDrag.getStyle('bottom')) - dy + 'px'});
+
+      this._notify("onMove");
+    }
+    if (this.iefix) 
+      this._fixIEOverlapping(); 
+      
+    this._removeStoreLocation();
+    Event.stop(event);
+  },
+
+   // endDrag callback
+   _endDrag: function(event) {
+    // Remove temporary div over iframes
+     WindowUtilities.enableScreen('__invisible__');
+    
+    if (this.doResize)
+      this._notify("onEndResize");
+    else
+      this._notify("onEndMove");
+    
+    // Release event observing
+    Event.stopObserving(document, "mouseup", this.eventMouseUp,false);
+    Event.stopObserving(document, "mousemove", this.eventMouseMove, false);
+
+    Event.stop(event);
+    
+    this._hideWiredElement();
+
+    // Store new location/size if need be
+    this._saveCookie()
+      
+    // Restore selection
+    document.body.ondrag = null;
+    document.body.onselectstart = null;
+  },
+
+  _updateLeftConstraint: function(left) {
+    if (this.constraint && this.useLeft && this.useTop) {
+      var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;
+
+      if (left < this.constraintPad.left)
+        left = this.constraintPad.left;
+      if (left + this.width + this.widthE + this.widthW > width - this.constraintPad.right) 
+        left = width - this.constraintPad.right - this.width - this.widthE - this.widthW;
+    }
+    return left;
+  },
+  
+  _updateTopConstraint: function(top) {
+    if (this.constraint && this.useLeft && this.useTop) {        
+      var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
+      
+      var h = this.height + this.heightN + this.heightS;
+
+      if (top < this.constraintPad.top)
+        top = this.constraintPad.top;
+      if (top + h > height - this.constraintPad.bottom) 
+        top = height - this.constraintPad.bottom - h;
+    }
+    return top;
+  },
+  
+  _updateWidthConstraint: function(w) {
+    if (this.constraint && this.useLeft && this.useTop) {
+      var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;
+      var left =  parseFloat(this.element.getStyle("left"));
+
+      if (left + w + this.widthE + this.widthW > width - this.constraintPad.right) 
+        w = width - this.constraintPad.right - left - this.widthE - this.widthW;
+    }
+    return w;
+  },
+  
+  _updateHeightConstraint: function(h) {
+    if (this.constraint && this.useLeft && this.useTop) {
+      var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
+      var top =  parseFloat(this.element.getStyle("top"));
+
+      if (top + h + this.heightN + this.heightS > height - this.constraintPad.bottom) 
+        h = height - this.constraintPad.bottom - top - this.heightN - this.heightS;
+    }
+    return h;
+  },
+  
+  
+  // Creates HTML window code
+  _createWindow: function(id) {
+    var className = this.options.className;
+    var win = document.createElement("div");
+    win.setAttribute('id', id);
+    win.className = "dialog";
+
+    var content;
+    if (this.options.url)
+      content= "<iframe frameborder=\"0\" name=\"" + id + "_content\"  id=\"" + id + "_content\" src=\"" + this.options.url + "\"> </iframe>";
+    else
+      content ="<div id=\"" + id + "_content\" class=\"" +className + "_content\"> </div>";
+
+    var closeDiv = this.options.closable ? "<div class='"+ className +"_close' id='"+ id +"_close' onclick='Windows.close(\""+ id +"\", event)'> </div>" : "";
+    var minDiv = this.options.minimizable ? "<div class='"+ className + "_minimize' id='"+ id +"_minimize' onclick='Windows.minimize(\""+ id +"\", event)'> </div>" : "";
+    var maxDiv = this.options.maximizable ? "<div class='"+ className + "_maximize' id='"+ id +"_maximize' onclick='Windows.maximize(\""+ id +"\", event)'> </div>" : "";
+    var seAttributes = this.options.resizable ? "class='" + className + "_sizer' id='" + id + "_sizer'" : "class='"  + className + "_se'";
+    var blank = "../themes/default/blank.gif";
+    
+    win.innerHTML = closeDiv + minDiv + maxDiv + "\
+      <table id='"+ id +"_row1' class=\"top table_window\">\
+        <tr>\
+          <td class='"+ className +"_nw'></td>\
+          <td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\
+          <td class='"+ className +"_ne'></td>\
+        </tr>\
+      </table>\
+      <table id='"+ id +"_row2' class=\"mid table_window\">\
+        <tr>\
+          <td class='"+ className +"_w'></td>\
+            <td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\
+          <td class='"+ className +"_e'></td>\
+        </tr>\
+      </table>\
+        <table id='"+ id +"_row3' class=\"bot table_window\">\
+        <tr>\
+          <td class='"+ className +"_sw'></td>\
+            <td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>\
+            <td " + seAttributes + "></td>\
+        </tr>\
+      </table>\
+    ";
+    Element.hide(win);
+    this.options.parent.insertBefore(win, this.options.parent.firstChild);
+    Event.observe($(id + "_content"), "load", this.options.onload);
+    return win;
+  },
+  
+  
+  changeClassName: function(newClassName) {    
+    var className = this.options.className;
+    var id = this.getId();
+    $A(["_close", "_minimize", "_maximize", "_sizer", "_content"]).each(function(value) { this._toggleClassName($(id + value), className + value, newClassName + value) }.bind(this));
+    this._toggleClassName($(id + "_top"), className + "_title", newClassName + "_title");
+    $$("#" + id + " td").each(function(td) {td.className = td.className.sub(className,newClassName); });
+    this.options.className = newClassName;
+  },
+  
+  _toggleClassName: function(element, oldClassName, newClassName) { 
+    if (element) {
+      element.removeClassName(oldClassName);
+      element.addClassName(newClassName);
+    }
+  },
+  
+  // Sets window location
+  setLocation: function(top, left) {
+    top = this._updateTopConstraint(top);
+    left = this._updateLeftConstraint(left);
+
+    var e = this.currentDrag || this.element;
+    e.setStyle({top: top + 'px'});
+    e.setStyle({left: left + 'px'});
+
+    this.useLeft = true;
+    this.useTop = true;
+  },
+    
+  getLocation: function() {
+    var location = {};
+    if (this.useTop)
+      location = Object.extend(location, {top: this.element.getStyle("top")});
+    else
+      location = Object.extend(location, {bottom: this.element.getStyle("bottom")});
+    if (this.useLeft)
+      location = Object.extend(location, {left: this.element.getStyle("left")});
+    else
+      location = Object.extend(location, {right: this.element.getStyle("right")});
+    
+    return location;
+  },
+  
+  // Gets window size
+  getSize: function() {
+    return {width: this.width, height: this.height};
+  },
+    
+  // Sets window size
+  setSize: function(width, height, useEffect) {    
+    width = parseFloat(width);
+    height = parseFloat(height);
+    
+    // Check min and max size
+    if (!this.minimized && width < this.options.minWidth)
+      width = this.options.minWidth;
+
+    if (!this.minimized && height < this.options.minHeight)
+      height = this.options.minHeight;
+      
+    if (this.options. maxHeight && height > this.options. maxHeight)
+      height = this.options. maxHeight;
+
+    if (this.options. maxWidth && width > this.options. maxWidth)
+      width = this.options. maxWidth;
+
+    
+    if (this.useTop && this.useLeft && Window.hasEffectLib && Effect.ResizeWindow && useEffect) {
+      new Effect.ResizeWindow(this, null, null, width, height, {duration: Window.resizeEffectDuration});
+    } else {
+      this.width = width;
+      this.height = height;
+      var e = this.currentDrag ? this.currentDrag : this.element;
+
+      e.setStyle({width: width + this.widthW + this.widthE + "px"})
+      e.setStyle({height: height  + this.heightN + this.heightS + "px"})
+
+      // Update content size
+      if (!this.currentDrag || this.currentDrag == this.element) {
+        var content = $(this.element.id + '_content');
+        content.setStyle({height: height  + 'px'});
+        content.setStyle({width: width  + 'px'});
+      }
+    }
+  },
+  
+  updateHeight: function() {
+    this.setSize(this.width, this.content.scrollHeight, true);
+  },
+  
+  updateWidth: function() {
+    this.setSize(this.content.scrollWidth, this.height, true);
+  },
+  
+  // Brings window to front
+  toFront: function() {
+    if (this.element.style.zIndex < Windows.maxZIndex)  
+      this.setZIndex(Windows.maxZIndex + 1);
+    if (this.iefix) 
+      this._fixIEOverlapping(); 
+  },
+   
+  getBounds: function(insideOnly) {
+    if (! this.width || !this.height || !this.visible)  
+      this.computeBounds();
+    var w = this.width;
+    var h = this.height;
+
+    if (!insideOnly) {
+      w += this.widthW + this.widthE;
+      h += this.heightN + this.heightS;
+    }
+    var bounds = Object.extend(this.getLocation(), {width: w + "px", height: h + "px"});
+    return bounds;
+  },
+      
+  computeBounds: function() {
+     if (! this.width || !this.height) {
+      var size = WindowUtilities._computeSize(this.content.innerHTML, this.content.id, this.width, this.height, 0, this.options.className)
+      if (this.height)
+        this.width = size + 5
+      else
+        this.height = size + 5
+    }
+
+    this.setSize(this.width, this.height);
+    if (this.centered)
+      this._center(this.centerTop, this.centerLeft);    
+  },
+  
+  // Displays window modal state or not
+  show: function(modal) {
+    this.visible = true;
+    if (modal) {
+      // Hack for Safari !!
+      if (typeof this.overlayOpacity == "undefined") {
+        var that = this;
+        setTimeout(function() {that.show(modal)}, 10);
+        return;
+      }
+      Windows.addModalWindow(this);
+      
+      this.modal = true;      
+      this.setZIndex(Windows.maxZIndex + 1);
+      Windows.unsetOverflow(this);
+    }
+    else    
+      if (!this.element.style.zIndex) 
+        this.setZIndex(Windows.maxZIndex + 1);        
+      
+    // To restore overflow if need be
+    if (this.oldStyle)
+      this.getContent().setStyle({overflow: this.oldStyle});
+      
+    this.computeBounds();
+    
+    this._notify("onBeforeShow");   
+    if (this.options.showEffect != Element.show && this.options.showEffectOptions)
+      this.options.showEffect(this.element, this.options.showEffectOptions);  
+    else
+      this.options.showEffect(this.element);  
+      
+    this._checkIEOverlapping();
+    WindowUtilities.focusedWindow = this
+    this._notify("onShow");   
+  },
+  
+  // Displays window modal state or not at the center of the page
+  showCenter: function(modal, top, left) {
+    this.centered = true;
+    this.centerTop = top;
+    this.centerLeft = left;
+
+    this.show(modal);
+  },
+  
+  isVisible: function() {
+    return this.visible;
+  },
+  
+  _center: function(top, left) {    
+    var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);    
+    var pageSize = WindowUtilities.getPageSize(this.options.parent);    
+    if (typeof top == "undefined")
+      top = (pageSize.windowHeight - (this.height + this.heightN + this.heightS))/2;
+    top += windowScroll.top
+    
+    if (typeof left == "undefined")
+      left = (pageSize.windowWidth - (this.width + this.widthW + this.widthE))/2;
+    left += windowScroll.left      
+    this.setLocation(top, left);
+    this.toFront();
+  },
+  
+  _recenter: function(event) {     
+    if (this.centered) {
+      var pageSize = WindowUtilities.getPageSize(this.options.parent);
+      var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);    
+
+      // Check for this stupid IE that sends dumb events
+      if (this.pageSize && this.pageSize.windowWidth == pageSize.windowWidth && this.pageSize.windowHeight == pageSize.windowHeight && 
+          this.windowScroll.left == windowScroll.left && this.windowScroll.top == windowScroll.top) 
+        return;
+      this.pageSize = pageSize;
+      this.windowScroll = windowScroll;
+      // set height of Overlay to take up whole page and show
+      if ($('overlay_modal')) 
+        $('overlay_modal').setStyle({height: (pageSize.pageHeight + 'px')});
+      
+      if (this.options.recenterAuto)
+        this._center(this.centerTop, this.centerLeft);    
+    }
+  },
+  
+  // Hides window
+  hide: function() {
+    this.visible = false;
+    if (this.modal) {
+      Windows.removeModalWindow(this);
+      Windows.resetOverflow();
+    }
+    // To avoid bug on scrolling bar
+    this.oldStyle = this.getContent().getStyle('overflow') || "auto"
+    this.getContent().setStyle({overflow: "hidden"});
+
+    this.options.hideEffect(this.element, this.options.hideEffectOptions);  
+
+     if(this.iefix) 
+      this.iefix.hide();
+
+    if (!this.doNotNotifyHide)
+      this._notify("onHide");
+  },
+
+  close: function() {
+    // Asks closeCallback if exists
+    if (this.visible) {
+      if (this.options.closeCallback && ! this.options.closeCallback(this)) 
+        return;
+
+      if (this.options.destroyOnClose) {
+        var destroyFunc = this.destroy.bind(this);
+        if (this.options.hideEffectOptions.afterFinish) {
+          var func = this.options.hideEffectOptions.afterFinish;
+          this.options.hideEffectOptions.afterFinish = function() {func();destroyFunc() }
+        }
+        else 
+          this.options.hideEffectOptions.afterFinish = function() {destroyFunc() }
+      }
+      Windows.updateFocusedWindow();
+      
+      this.doNotNotifyHide = true;
+      this.hide();
+      this.doNotNotifyHide = false;
+      this._notify("onClose");
+    }
+  },
+  
+  minimize: function() {
+    if (this.resizing)
+      return;
+    
+    var r2 = $(this.getId() + "_row2");
+    
+    if (!this.minimized) {
+      this.minimized = true;
+
+      var dh = r2.getDimensions().height;
+      this.r2Height = dh;
+      var h  = this.element.getHeight() - dh;
+
+      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
+        new Effect.ResizeWindow(this, null, null, null, this.height -dh, {duration: Window.resizeEffectDuration});
+      } else  {
+        this.height -= dh;
+        this.element.setStyle({height: h + "px"});
+        r2.hide();
+      }
+
+      if (! this.useTop) {
+        var bottom = parseFloat(this.element.getStyle('bottom'));
+        this.element.setStyle({bottom: (bottom + dh) + 'px'});
+      }
+    } 
+    else {      
+      this.minimized = false;
+      
+      var dh = this.r2Height;
+      this.r2Height = null;
+      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
+        new Effect.ResizeWindow(this, null, null, null, this.height + dh, {duration: Window.resizeEffectDuration});
+      }
+      else {
+        var h  = this.element.getHeight() + dh;
+        this.height += dh;
+        this.element.setStyle({height: h + "px"})
+        r2.show();
+      }
+      if (! this.useTop) {
+        var bottom = parseFloat(this.element.getStyle('bottom'));
+        this.element.setStyle({bottom: (bottom - dh) + 'px'});
+      }
+      this.toFront();
+    }
+    this._notify("onMinimize");
+    
+    // Store new location/size if need be
+    this._saveCookie()
+  },
+  
+  maximize: function() {
+    if (this.isMinimized() || this.resizing)
+      return;
+  
+    if (Prototype.Browser.IE && this.heightN == 0)
+      this._getWindowBorderSize();
+      
+    if (this.storedLocation != null) {
+      this._restoreLocation();
+      if(this.iefix) 
+        this.iefix.hide();
+    }
+    else {
+      this._storeLocation();
+      Windows.unsetOverflow(this);
+      
+      var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);
+      var pageSize = WindowUtilities.getPageSize(this.options.parent);    
+      var left = windowScroll.left;
+      var top = windowScroll.top;
+      
+      if (this.options.parent != document.body) {
+        windowScroll =  {top:0, left:0, bottom:0, right:0};
+        var dim = this.options.parent.getDimensions();
+        pageSize.windowWidth = dim.width;
+        pageSize.windowHeight = dim.height;
+        top = 0; 
+        left = 0;
+      }
+      
+      if (this.constraint) {
+        pageSize.windowWidth -= Math.max(0, this.constraintPad.left) + Math.max(0, this.constraintPad.right);
+        pageSize.windowHeight -= Math.max(0, this.constraintPad.top) + Math.max(0, this.constraintPad.bottom);
+        left +=  Math.max(0, this.constraintPad.left);
+        top +=  Math.max(0, this.constraintPad.top);
+      }
+      
+      var width = pageSize.windowWidth - this.widthW - this.widthE;
+      var height= pageSize.windowHeight - this.heightN - this.heightS;
+
+      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
+        new Effect.ResizeWindow(this, top, left, width, height, {duration: Window.resizeEffectDuration});
+      }
+      else {
+        this.setSize(width, height);
+        this.element.setStyle(this.useLeft ? {left: left} : {right: left});
+        this.element.setStyle(this.useTop ? {top: top} : {bottom: top});
+      }
+        
+      this.toFront();
+      if (this.iefix) 
+        this._fixIEOverlapping(); 
+    }
+    this._notify("onMaximize");
+
+    // Store new location/size if need be
+    this._saveCookie()
+  },
+  
+  isMinimized: function() {
+    return this.minimized;
+  },
+  
+  isMaximized: function() {
+    return (this.storedLocation != null);
+  },
+  
+  setOpacity: function(opacity) {
+    if (Element.setOpacity)
+      Element.setOpacity(this.element, opacity);
+  },
+  
+  setZIndex: function(zindex) {
+    this.element.setStyle({zIndex: zindex});
+    Windows.updateZindex(zindex, this);
+  },
+
+  setTitle: function(newTitle) {
+    if (!newTitle || newTitle == "") 
+      newTitle = "&nbsp;";
+      
+    Element.update(this.element.id + '_top', newTitle);
+  },
+   
+  getTitle: function() {
+    return $(this.element.id + '_top').innerHTML;
+  },
+  
+  setStatusBar: function(element) {
+    var statusBar = $(this.getId() + "_bottom");
+
+    if (typeof(element) == "object") {
+      if (this.bottombar.firstChild)
+        this.bottombar.replaceChild(element, this.bottombar.firstChild);
+      else
+        this.bottombar.appendChild(element);
+    }
+    else
+      this.bottombar.innerHTML = element;
+  },
+
+  _checkIEOverlapping: function() {
+    if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && (navigator.userAgent.indexOf('Opera')<0) && (this.element.getStyle('position')=='absolute')) {
+        new Insertion.After(this.element.id, '<iframe id="' + this.element.id + '_iefix" '+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+        this.iefix = $(this.element.id+'_iefix');
+    }
+    if(this.iefix) 
+      setTimeout(this._fixIEOverlapping.bind(this), 50);
+  },
+
+  _fixIEOverlapping: function() {
+      Position.clone(this.element, this.iefix);
+      this.iefix.style.zIndex = this.element.style.zIndex - 1;
+      this.iefix.show();
+  },
+  
+  _getWindowBorderSize: function(event) {
+    // Hack to get real window border size!!
+    var div = this._createHiddenDiv(this.options.className + "_n")
+    this.heightN = Element.getDimensions(div).height;    
+    div.parentNode.removeChild(div)
+
+    var div = this._createHiddenDiv(this.options.className + "_s")
+    this.heightS = Element.getDimensions(div).height;    
+    div.parentNode.removeChild(div)
+
+    var div = this._createHiddenDiv(this.options.className + "_e")
+    this.widthE = Element.getDimensions(div).width;    
+    div.parentNode.removeChild(div)
+
+    var div = this._createHiddenDiv(this.options.className + "_w")
+    this.widthW = Element.getDimensions(div).width;
+    div.parentNode.removeChild(div);
+    
+    var div = document.createElement("div");
+    div.className = "overlay_" + this.options.className ;
+    document.body.appendChild(div);
+    //alert("no timeout:\nopacity: " + div.getStyle("opacity") + "\nwidth: " + document.defaultView.getComputedStyle(div, null).width);
+    var that = this;
+    
+    // Workaround for Safari!!
+    setTimeout(function() {that.overlayOpacity = ($(div).getStyle("opacity")); div.parentNode.removeChild(div);}, 10);
+    
+    // Workaround for IE!!
+    if (Prototype.Browser.IE) {
+      this.heightS = $(this.getId() +"_row3").getDimensions().height;
+      this.heightN = $(this.getId() +"_row1").getDimensions().height;
+    }
+
+    // Safari size fix
+    if (Prototype.Browser.WebKit && Prototype.Browser.WebKitVersion < 420)
+      this.setSize(this.width, this.height);
+    if (this.doMaximize)
+      this.maximize();
+    if (this.doMinimize)
+      this.minimize();
+  },
+ 
+  _createHiddenDiv: function(className) {
+    var objBody = document.body;
+    var win = document.createElement("div");
+    win.setAttribute('id', this.element.id+ "_tmp");
+    win.className = className;
+    win.style.display = 'none';
+    win.innerHTML = '';
+    objBody.insertBefore(win, objBody.firstChild);
+    return win;
+  },
+  
+  _storeLocation: function() {
+    if (this.storedLocation == null) {
+      this.storedLocation = {useTop: this.useTop, useLeft: this.useLeft, 
+                             top: this.element.getStyle('top'), bottom: this.element.getStyle('bottom'),
+                             left: this.element.getStyle('left'), right: this.element.getStyle('right'),
+                             width: this.width, height: this.height };
+    }
+  },
+  
+  _restoreLocation: function() {
+    if (this.storedLocation != null) {
+      this.useLeft = this.storedLocation.useLeft;
+      this.useTop = this.storedLocation.useTop;
+      
+      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow)
+        new Effect.ResizeWindow(this, this.storedLocation.top, this.storedLocation.left, this.storedLocation.width, this.storedLocation.height, {duration: Window.resizeEffectDuration});
+      else {
+        this.element.setStyle(this.useLeft ? {left: this.storedLocation.left} : {right: this.storedLocation.right});
+        this.element.setStyle(this.useTop ? {top: this.storedLocation.top} : {bottom: this.storedLocation.bottom});
+        this.setSize(this.storedLocation.width, this.storedLocation.height);
+      }
+      
+      Windows.resetOverflow();
+      this._removeStoreLocation();
+    }
+  },
+  
+  _removeStoreLocation: function() {
+    this.storedLocation = null;
+  },
+  
+  _saveCookie: function() {
+    if (this.cookie) {
+      var value = "";
+      if (this.useLeft)
+        value += "l:" +  (this.storedLocation ? this.storedLocation.left : this.element.getStyle('left'))
+      else
+        value += "r:" + (this.storedLocation ? this.storedLocation.right : this.element.getStyle('right'))
+      if (this.useTop)
+        value += ",t:" + (this.storedLocation ? this.storedLocation.top : this.element.getStyle('top'))
+      else
+        value += ",b:" + (this.storedLocation ? this.storedLocation.bottom :this.element.getStyle('bottom'))
+        
+      value += "," + (this.storedLocation ? this.storedLocation.width : this.width);
+      value += "," + (this.storedLocation ? this.storedLocation.height : this.height);
+      value += "," + this.isMinimized();
+      value += "," + this.isMaximized();
+      WindowUtilities.setCookie(value, this.cookie)
+    }
+  },
+  
+  _createWiredElement: function() {
+    if (! this.wiredElement) {
+      if (Prototype.Browser.IE)
+        this._getWindowBorderSize();
+      var div = document.createElement("div");
+      div.className = "wired_frame " + this.options.className + "_wired_frame";
+      
+      div.style.position = 'absolute';
+      this.options.parent.insertBefore(div, this.options.parent.firstChild);
+      this.wiredElement = $(div);
+    }
+    if (this.useLeft) 
+      this.wiredElement.setStyle({left: this.element.getStyle('left')});
+    else 
+      this.wiredElement.setStyle({right: this.element.getStyle('right')});
+      
+    if (this.useTop) 
+      this.wiredElement.setStyle({top: this.element.getStyle('top')});
+    else 
+      this.wiredElement.setStyle({bottom: this.element.getStyle('bottom')});
+
+    var dim = this.element.getDimensions();
+    this.wiredElement.setStyle({width: dim.width + "px", height: dim.height +"px"});
+
+    this.wiredElement.setStyle({zIndex: Windows.maxZIndex+30});
+    return this.wiredElement;
+  },
+  
+  _hideWiredElement: function() {
+    if (! this.wiredElement || ! this.currentDrag)
+      return;
+    if (this.currentDrag == this.element) 
+      this.currentDrag = null;
+    else {
+      if (this.useLeft) 
+        this.element.setStyle({left: this.currentDrag.getStyle('left')});
+      else 
+        this.element.setStyle({right: this.currentDrag.getStyle('right')});
+
+      if (this.useTop) 
+        this.element.setStyle({top: this.currentDrag.getStyle('top')});
+      else 
+        this.element.setStyle({bottom: this.currentDrag.getStyle('bottom')});
+
+      this.currentDrag.hide();
+      this.currentDrag = null;
+      if (this.doResize)
+        this.setSize(this.width, this.height);
+    } 
+  },
+  
+  _notify: function(eventName) {
+    if (this.options[eventName])
+      this.options[eventName](this);
+    else
+      Windows.notify(eventName, this);
+  }
+};
+
+// Windows containers, register all page windows
+var Windows = {
+  windows: [],
+  modalWindows: [],
+  observers: [],
+  focusedWindow: null,
+  maxZIndex: 0,
+  overlayShowEffectOptions: {duration: 0.5},
+  overlayHideEffectOptions: {duration: 0.5},
+
+  addObserver: function(observer) {
+    this.removeObserver(observer);
+    this.observers.push(observer);
+  },
+  
+  removeObserver: function(observer) {  
+    this.observers = this.observers.reject( function(o) { return o==observer });
+  },
+  
+  // onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose
+  notify: function(eventName, win) {  
+    this.observers.each( function(o) {if(o[eventName]) o[eventName](eventName, win);});
+  },
+
+  // Gets window from its id
+  getWindow: function(id) {
+    return this.windows.detect(function(d) { return d.getId() ==id });
+  },
+
+  // Gets the last focused window
+  getFocusedWindow: function() {
+    return this.focusedWindow;
+  },
+
+  updateFocusedWindow: function() {
+    this.focusedWindow = this.windows.length >=2 ? this.windows[this.windows.length-2] : null;    
+  },
+  
+  // Registers a new window (called by Windows constructor)
+  register: function(win) {
+    this.windows.push(win);
+  },
+    
+  // Add a modal window in the stack
+  addModalWindow: function(win) {
+    // Disable screen if first modal window
+    if (this.modalWindows.length == 0) {
+      WindowUtilities.disableScreen(win.options.className, 'overlay_modal', win.overlayOpacity, win.getId(), win.options.parent);
+    }
+    else {
+      // Move overlay over all windows
+      if (Window.keepMultiModalWindow) {
+        $('overlay_modal').style.zIndex = Windows.maxZIndex + 1;
+        Windows.maxZIndex += 1;
+        WindowUtilities._hideSelect(this.modalWindows.last().getId());
+      }
+      // Hide current modal window
+      else
+        this.modalWindows.last().element.hide();
+      // Fucking IE select issue
+      WindowUtilities._showSelect(win.getId());
+    }      
+    this.modalWindows.push(win);    
+  },
+  
+  removeModalWindow: function(win) {
+    this.modalWindows.pop();
+    
+    // No more modal windows
+    if (this.modalWindows.length == 0)
+      WindowUtilities.enableScreen();     
+    else {
+      if (Window.keepMultiModalWindow) {
+        this.modalWindows.last().toFront();
+        WindowUtilities._showSelect(this.modalWindows.last().getId());        
+      }
+      else
+        this.modalWindows.last().element.show();
+    }
+  },
+  
+  // Registers a new window (called by Windows constructor)
+  register: function(win) {
+    this.windows.push(win);
+  },
+  
+  // Unregisters a window (called by Windows destructor)
+  unregister: function(win) {
+    this.windows = this.windows.reject(function(d) { return d==win });
+  }, 
+  
+  // Closes all windows
+  closeAll: function() {  
+    this.windows.each( function(w) {Windows.close(w.getId())} );
+  },
+  
+  closeAllModalWindows: function() {
+    WindowUtilities.enableScreen();     
+    this.modalWindows.each( function(win) {if (win) win.close()});    
+  },
+
+  // Minimizes a window with its id
+  minimize: function(id, event) {
+    var win = this.getWindow(id)
+    if (win && win.visible)
+      win.minimize();
+    Event.stop(event);
+  },
+  
+  // Maximizes a window with its id
+  maximize: function(id, event) {
+    var win = this.getWindow(id)
+    if (win && win.visible)
+      win.maximize();
+    Event.stop(event);
+  },
+
+  // Closes a window with its id
+  close: function(id, event) {
+    var win = this.getWindow(id);
+    if (win) 
+      win.close();
+    if (event)
+      Event.stop(event);
+  },
+  
+  blur: function(id) {
+    var win = this.getWindow(id);  
+    if (!win)
+      return;
+    if (win.options.blurClassName)
+      win.changeClassName(win.options.blurClassName);
+    if (this.focusedWindow == win)  
+      this.focusedWindow = null;
+    win._notify("onBlur");  
+  },
+  
+  focus: function(id) {
+    var win = this.getWindow(id);  
+    if (!win)
+      return;       
+    if (this.focusedWindow)
+      this.blur(this.focusedWindow.getId())
+
+    if (win.options.focusClassName)
+      win.changeClassName(win.options.focusClassName);  
+    this.focusedWindow = win;
+    win._notify("onFocus");
+  },
+  
+  unsetOverflow: function(except) {    
+    this.windows.each(function(d) { d.oldOverflow = d.getContent().getStyle("overflow") || "auto" ; d.getContent().setStyle({overflow: "hidden"}) });
+    if (except && except.oldOverflow)
+      except.getContent().setStyle({overflow: except.oldOverflow});
+  },
+
+  resetOverflow: function() {
+    this.windows.each(function(d) { if (d.oldOverflow) d.getContent().setStyle({overflow: d.oldOverflow}) });
+  },
+
+  updateZindex: function(zindex, win) { 
+    if (zindex > this.maxZIndex) {   
+      this.maxZIndex = zindex;    
+      if (this.focusedWindow) 
+        this.blur(this.focusedWindow.getId())
+    }
+    this.focusedWindow = win;
+    if (this.focusedWindow) 
+      this.focus(this.focusedWindow.getId())
+  }
+};
+
+var Dialog = {
+  dialogId: null,
+  onCompleteFunc: null,
+  callFunc: null, 
+  parameters: null, 
+    
+  confirm: function(content, parameters) {
+    // Get Ajax return before
+    if (content && typeof content != "string") {
+      Dialog._runAjaxRequest(content, parameters, Dialog.confirm);
+      return 
+    }
+    content = content || "";
+    
+    parameters = parameters || {};
+    var okLabel = parameters.okLabel ? parameters.okLabel : "Ok";
+    var cancelLabel = parameters.cancelLabel ? parameters.cancelLabel : "Cancel";
+
+    // Backward compatibility
+    parameters = Object.extend(parameters, parameters.windowParameters || {});
+    parameters.windowParameters = parameters.windowParameters || {};
+
+    parameters.className = parameters.className || "alert";
+
+    var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" 
+    var cancelButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " cancel_button'" 
+    var content = "\
+      <div class='" + parameters.className + "_message'>" + content  + "</div>\
+        <div class='" + parameters.className + "_buttons'>\
+          <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\
+          <input type='button' value='" + cancelLabel + "' onclick='Dialog.cancelCallback()' " + cancelButtonClass + "/>\
+        </div>\
+    ";
+    return this._openDialog(content, parameters)
+  },
+  
+  alert: function(content, parameters) {
+    // Get Ajax return before
+    if (content && typeof content != "string") {
+      Dialog._runAjaxRequest(content, parameters, Dialog.alert);
+      return 
+    }
+    content = content || "";
+    
+    parameters = parameters || {};
+    var okLabel = parameters.okLabel ? parameters.okLabel : "Ok";
+
+    // Backward compatibility    
+    parameters = Object.extend(parameters, parameters.windowParameters || {});
+    parameters.windowParameters = parameters.windowParameters || {};
+    
+    parameters.className = parameters.className || "alert";
+    
+    var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" 
+    var content = "\
+      <div class='" + parameters.className + "_message'>" + content  + "</div>\
+        <div class='" + parameters.className + "_buttons'>\
+          <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\
+        </div>";                  
+    return this._openDialog(content, parameters)
+  },
+  
+  info: function(content, parameters) {   
+    // Get Ajax return before
+    if (content && typeof content != "string") {
+      Dialog._runAjaxRequest(content, parameters, Dialog.info);
+      return 
+    }
+    content = content || "";
+     
+    // Backward compatibility
+    parameters = parameters || {};
+    parameters = Object.extend(parameters, parameters.windowParameters || {});
+    parameters.windowParameters = parameters.windowParameters || {};
+    
+    parameters.className = parameters.className || "alert";
+    
+    var content = "<div id='modal_dialog_message' class='" + parameters.className + "_message'>" + content  + "</div>";
+    if (parameters.showProgress)
+      content += "<div id='modal_dialog_progress' class='" + parameters.className + "_progress'>  </div>";
+
+    parameters.ok = null;
+    parameters.cancel = null;
+    
+    return this._openDialog(content, parameters)
+  },
+  
+  setInfoMessage: function(message) {
+    $('modal_dialog_message').update(message);
+  },
+  
+  closeInfo: function() {
+    Windows.close(this.dialogId);
+  },
+  
+  _openDialog: function(content, parameters) {
+    var className = parameters.className;
+    
+    if (! parameters.height && ! parameters.width) {
+      parameters.width = WindowUtilities.getPageSize(parameters.options.parent || document.body).pageWidth / 2;
+    }
+    if (parameters.id)
+      this.dialogId = parameters.id;
+    else { 
+      var t = new Date();
+      this.dialogId = 'modal_dialog_' + t.getTime();
+      parameters.id = this.dialogId;
+    }
+
+    // compute height or width if need be
+    if (! parameters.height || ! parameters.width) {
+      var size = WindowUtilities._computeSize(content, this.dialogId, parameters.width, parameters.height, 5, className)
+      if (parameters.height)
+        parameters.width = size + 5
+      else
+        parameters.height = size + 5
+    }
+    parameters.effectOptions = parameters.effectOptions ;
+    parameters.resizable   = parameters.resizable || false;
+    parameters.minimizable = parameters.minimizable || false;
+    parameters.maximizable = parameters.maximizable ||  false;
+    parameters.draggable   = parameters.draggable || false;
+    parameters.closable    = parameters.closable || false;
+    
+    var win = new Window(parameters);
+    win.getContent().innerHTML = content;
+    
+    win.showCenter(true, parameters.top, parameters.left);  
+    win.setDestroyOnClose();
+    
+    win.cancelCallback = parameters.onCancel || parameters.cancel; 
+    win.okCallback = parameters.onOk || parameters.ok;
+    
+    return win;    
+  },
+  
+  _getAjaxContent: function(originalRequest)  {
+      Dialog.callFunc(originalRequest.responseText, Dialog.parameters)
+  },
+  
+  _runAjaxRequest: function(message, parameters, callFunc) {
+    if (message.options == null)
+      message.options = {}  
+    Dialog.onCompleteFunc = message.options.onComplete;
+    Dialog.parameters = parameters;
+    Dialog.callFunc = callFunc;
+    
+    message.options.onComplete = Dialog._getAjaxContent;
+    new Ajax.Request(message.url, message.options);
+  },
+  
+  okCallback: function() {
+    var win = Windows.focusedWindow;
+    if (!win.okCallback || win.okCallback(win)) {
+      // Remove onclick on button
+      $$("#" + win.getId()+" input").each(function(element) {element.onclick=null;})
+      win.close();
+    }
+  },
+
+  cancelCallback: function() {
+    var win = Windows.focusedWindow;
+    // Remove onclick on button
+    $$("#" + win.getId()+" input").each(function(element) {element.onclick=null})
+    win.close();
+    if (win.cancelCallback)
+      win.cancelCallback(win);
+  }
+}
+/*
+  Based on Lightbox JS: Fullsize Image Overlays 
+  by Lokesh Dhakar - http://www.huddletogether.com
+
+  For more information on this script, visit:
+  http://huddletogether.com/projects/lightbox/
+
+  Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
+  (basically, do anything you want, just leave my name and link)
+*/
+
+if (Prototype.Browser.WebKit) {
+  var array = navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));
+  Prototype.Browser.WebKitVersion = parseFloat(array[1]);
+}
+
+var WindowUtilities = {  
+  // From dragdrop.js
+  getWindowScroll: function(parent) {
+    var T, L, W, H;
+    parent = parent || document.body;              
+    if (parent != document.body) {
+      T = parent.scrollTop;
+      L = parent.scrollLeft;
+      W = parent.scrollWidth;
+      H = parent.scrollHeight;
+    } 
+    else {
+      var w = window;
+      with (w.document) {
+        if (w.document.documentElement && documentElement.scrollTop) {
+          T = documentElement.scrollTop;
+          L = documentElement.scrollLeft;
+        } else if (w.document.body) {
+          T = body.scrollTop;
+          L = body.scrollLeft;
+        }
+        if (w.innerWidth) {
+          W = w.innerWidth;
+          H = w.innerHeight;
+        } else if (w.document.documentElement && documentElement.clientWidth) {
+          W = documentElement.clientWidth;
+          H = documentElement.clientHeight;
+        } else {
+          W = body.offsetWidth;
+          H = body.offsetHeight
+        }
+      }
+    }
+    return { top: T, left: L, width: W, height: H };
+  }, 
+  //
+  // getPageSize()
+  // Returns array with page width, height and window width, height
+  // Core code from - quirksmode.org
+  // Edit for Firefox by pHaez
+  //
+  getPageSize: function(parent){
+    parent = parent || document.body;              
+    var windowWidth, windowHeight;
+    var pageHeight, pageWidth;
+    if (parent != document.body) {
+      windowWidth = parent.getWidth();
+      windowHeight = parent.getHeight();                                
+      pageWidth = parent.scrollWidth;
+      pageHeight = parent.scrollHeight;                                
+    } 
+    else {
+      var xScroll, yScroll;
+
+      if (window.innerHeight && window.scrollMaxY) {  
+        xScroll = document.body.scrollWidth;
+        yScroll = window.innerHeight + window.scrollMaxY;
+      } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
+        xScroll = document.body.scrollWidth;
+        yScroll = document.body.scrollHeight;
+      } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
+        xScroll = document.body.offsetWidth;
+        yScroll = document.body.offsetHeight;
+      }
+
+
+      if (self.innerHeight) {  // all except Explorer
+        windowWidth = self.innerWidth;
+        windowHeight = self.innerHeight;
+      } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+        windowWidth = document.documentElement.clientWidth;
+        windowHeight = document.documentElement.clientHeight;
+      } else if (document.body) { // other Explorers
+        windowWidth = document.body.clientWidth;
+        windowHeight = document.body.clientHeight;
+      }  
+
+      // for small pages with total height less then height of the viewport
+      if(yScroll < windowHeight){
+        pageHeight = windowHeight;
+      } else { 
+        pageHeight = yScroll;
+      }
+
+      // for small pages with total width less then width of the viewport
+      if(xScroll < windowWidth){  
+        pageWidth = windowWidth;
+      } else {
+        pageWidth = xScroll;
+      }
+    }             
+    return {pageWidth: pageWidth ,pageHeight: pageHeight , windowWidth: windowWidth, windowHeight: windowHeight};
+  },
+
+  disableScreen: function(className, overlayId, overlayOpacity, contentId, parent) {
+    WindowUtilities.initLightbox(overlayId, className, function() {this._disableScreen(className, overlayId, overlayOpacity, contentId)}.bind(this), parent || document.body);
+  },
+
+  _disableScreen: function(className, overlayId, overlayOpacity, contentId) {
+    // prep objects
+    var objOverlay = $(overlayId);
+
+    var pageSize = WindowUtilities.getPageSize(objOverlay.parentNode);
+
+    // Hide select boxes as they will 'peek' through the image in IE, store old value
+    if (contentId && Prototype.Browser.IE) {
+      WindowUtilities._hideSelect();
+      WindowUtilities._showSelect(contentId);
+    }  
+  
+    // set height of Overlay to take up whole page and show
+    objOverlay.style.height = (pageSize.pageHeight + 'px');
+    objOverlay.style.display = 'none'; 
+    if (overlayId == "overlay_modal" && Window.hasEffectLib && Windows.overlayShowEffectOptions) {
+      objOverlay.overlayOpacity = overlayOpacity;
+      new Effect.Appear(objOverlay, Object.extend({from: 0, to: overlayOpacity}, Windows.overlayShowEffectOptions));
+    }
+    else
+      objOverlay.style.display = "block";
+  },
+  
+  enableScreen: function(id) {
+    id = id || 'overlay_modal';
+    var objOverlay =  $(id);
+    if (objOverlay) {
+      // hide lightbox and overlay
+      if (id == "overlay_modal" && Window.hasEffectLib && Windows.overlayHideEffectOptions)
+        new Effect.Fade(objOverlay, Object.extend({from: objOverlay.overlayOpacity, to:0}, Windows.overlayHideEffectOptions));
+      else {
+        objOverlay.style.display = 'none';
+        objOverlay.parentNode.removeChild(objOverlay);
+      }
+      
+      // make select boxes visible using old value
+      if (id != "__invisible__") 
+        WindowUtilities._showSelect();
+    }
+  },
+
+  _hideSelect: function(id) {
+    if (Prototype.Browser.IE) {
+      id = id ==  null ? "" : "#" + id + " ";
+      $$(id + 'select').each(function(element) {
+        if (! WindowUtilities.isDefined(element.oldVisibility)) {
+          element.oldVisibility = element.style.visibility ? element.style.visibility : "visible";
+          element.style.visibility = "hidden";
+        }
+      });
+    }
+  },
+  
+  _showSelect: function(id) {
+    if (Prototype.Browser.IE) {
+      id = id ==  null ? "" : "#" + id + " ";
+      $$(id + 'select').each(function(element) {
+        if (WindowUtilities.isDefined(element.oldVisibility)) {
+          // Why?? Ask IE
+          try {
+            element.style.visibility = element.oldVisibility;
+          } catch(e) {
+            element.style.visibility = "visible";
+          }
+          element.oldVisibility = null;
+        }
+        else {
+          if (element.style.visibility)
+            element.style.visibility = "visible";
+        }
+      });
+    }
+  },
+
+  isDefined: function(object) {
+    return typeof(object) != "undefined" && object != null;
+  },
+  
+  // initLightbox()
+  // Function runs on window load, going through link tags looking for rel="lightbox".
+  // These links receive onclick events that enable the lightbox display for their targets.
+  // The function also inserts html markup at the top of the page which will be used as a
+  // container for the overlay pattern and the inline image.
+  initLightbox: function(id, className, doneHandler, parent) {
+    // Already done, just update zIndex
+    if ($(id)) {
+      Element.setStyle(id, {zIndex: Windows.maxZIndex + 1});
+      Windows.maxZIndex++;
+      doneHandler();
+    }
+    // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
+    else {
+      var objOverlay = document.createElement("div");
+      objOverlay.setAttribute('id', id);
+      objOverlay.className = "overlay_" + className
+      objOverlay.style.display = 'none';
+      objOverlay.style.position = 'absolute';
+      objOverlay.style.top = '0';
+      objOverlay.style.left = '0';
+      objOverlay.style.zIndex = Windows.maxZIndex + 1;
+      Windows.maxZIndex++;
+      objOverlay.style.width = '100%';
+      parent.insertBefore(objOverlay, parent.firstChild);
+      if (Prototype.Browser.WebKit && id == "overlay_modal") {
+        setTimeout(function() {doneHandler()}, 10);
+      }
+      else
+        doneHandler();
+    }    
+  },
+  
+  setCookie: function(value, parameters) {
+    document.cookie= parameters[0] + "=" + escape(value) +
+      ((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") +
+      ((parameters[2]) ? "; path=" + parameters[2] : "") +
+      ((parameters[3]) ? "; domain=" + parameters[3] : "") +
+      ((parameters[4]) ? "; secure" : "");
+  },
+
+  getCookie: function(name) {
+    var dc = document.cookie;
+    var prefix = name + "=";
+    var begin = dc.indexOf("; " + prefix);
+    if (begin == -1) {
+      begin = dc.indexOf(prefix);
+      if (begin != 0) return null;
+    } else {
+      begin += 2;
+    }
+    var end = document.cookie.indexOf(";", begin);
+    if (end == -1) {
+      end = dc.length;
+    }
+    return unescape(dc.substring(begin + prefix.length, end));
+  },
+    
+  _computeSize: function(content, id, width, height, margin, className) {
+    var objBody = document.body;
+    var tmpObj = document.createElement("div");
+    tmpObj.setAttribute('id', id);
+    tmpObj.className = className + "_content";
+
+    if (height)
+      tmpObj.style.height = height + "px"
+    else
+      tmpObj.style.width = width + "px"
+  
+    tmpObj.style.position = 'absolute';
+    tmpObj.style.top = '0';
+    tmpObj.style.left = '0';
+    tmpObj.style.display = 'none';
+
+    tmpObj.innerHTML = content;
+    objBody.insertBefore(tmpObj, objBody.firstChild);
+
+    var size;
+    if (height)
+      size = $(tmpObj).getDimensions().width + margin;
+    else
+      size = $(tmpObj).getDimensions().height + margin;
+    objBody.removeChild(tmpObj);
+    return size;
+  }  
+}
+
diff --git a/htdocs/includes/scriptaculous/src/window/window_effects.js b/htdocs/includes/scriptaculous/src/window/window_effects.js
new file mode 100644
index 0000000000000000000000000000000000000000..6ad73cc052e80ee383e45226f8135da959bc0a54
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/window_effects.js
@@ -0,0 +1,157 @@
+Effect.ResizeWindow = Class.create();
+Object.extend(Object.extend(Effect.ResizeWindow.prototype, Effect.Base.prototype), {
+  initialize: function(win, top, left, width, height) {
+    this.window = win;
+    this.window.resizing = true;
+    
+    var size = win.getSize();
+    this.initWidth    = parseFloat(size.width);
+    this.initHeight   = parseFloat(size.height);
+
+    var location = win.getLocation();
+    this.initTop    = parseFloat(location.top);
+    this.initLeft   = parseFloat(location.left);
+
+    this.width    = width != null  ? parseFloat(width)  : this.initWidth;
+    this.height   = height != null ? parseFloat(height) : this.initHeight;
+    this.top      = top != null    ? parseFloat(top)    : this.initTop;
+    this.left     = left != null   ? parseFloat(left)   : this.initLeft;
+
+    this.dx     = this.left   - this.initLeft;
+    this.dy     = this.top    - this.initTop;
+    this.dw     = this.width  - this.initWidth;
+    this.dh     = this.height - this.initHeight;
+    
+    this.r2      = $(this.window.getId() + "_row2");
+    this.content = $(this.window.getId() + "_content");
+        
+    this.contentOverflow = this.content.getStyle("overflow") || "auto";
+    this.content.setStyle({overflow: "hidden"});
+    
+    // Wired mode
+    if (this.window.options.wiredDrag) {
+      this.window.currentDrag = win._createWiredElement();
+      this.window.currentDrag.show();
+      this.window.element.hide();
+    }
+
+    this.start(arguments[5]);
+  },
+  
+  update: function(position) {
+    var width  = Math.floor(this.initWidth  + this.dw * position);
+    var height = Math.floor(this.initHeight + this.dh * position);
+    var top    = Math.floor(this.initTop    + this.dy * position);
+    var left   = Math.floor(this.initLeft   + this.dx * position);
+
+    if (window.ie) {
+      if (Math.floor(height) == 0)  
+        this.r2.hide();
+      else if (Math.floor(height) >1)  
+        this.r2.show();
+    }      
+    this.r2.setStyle({height: height});
+    this.window.setSize(width, height);
+    this.window.setLocation(top, left);
+  },
+  
+  finish: function(position) {
+    // Wired mode
+    if (this.window.options.wiredDrag) {
+      this.window._hideWiredElement();
+      this.window.element.show();
+    }
+
+    this.window.setSize(this.width, this.height);
+    this.window.setLocation(this.top, this.left);
+    this.r2.setStyle({height: null});
+    
+    this.content.setStyle({overflow: this.contentOverflow});
+      
+    this.window.resizing = false;
+  }
+});
+
+Effect.ModalSlideDown = function(element) {
+  var windowScroll = WindowUtilities.getWindowScroll();    
+  var height = element.getStyle("height");  
+  element.setStyle({top: - (parseFloat(height) - windowScroll.top) + "px"});
+  
+  element.show();
+  return new Effect.Move(element, Object.extend({ x: 0, y: parseFloat(height) }, arguments[1] || {}));
+};
+
+
+Effect.ModalSlideUp = function(element) {
+  var height = element.getStyle("height");
+  return new Effect.Move(element, Object.extend({ x: 0, y: -parseFloat(height) }, arguments[1] || {}));
+};
+
+PopupEffect = Class.create();
+PopupEffect.prototype = {    
+  initialize: function(htmlElement) {
+    this.html = $(htmlElement);      
+    this.options = Object.extend({className: "popup_effect", duration: 0.4}, arguments[1] || {});
+    
+  },
+  show: function(element, options) { 
+    var position = Position.cumulativeOffset(this.html);      
+    var size = this.html.getDimensions();
+    var bounds = element.win.getBounds();
+    this.window =  element.win;      
+    // Create a div
+    if (!this.div) {
+      this.div = document.createElement("div");
+      this.div.className = this.options.className;
+      this.div.style.height = size.height + "px";
+      this.div.style.width  = size.width  + "px";
+      this.div.style.top    = position[1] + "px";
+      this.div.style.left   = position[0] + "px";   
+      this.div.style.position = "absolute"
+      document.body.appendChild(this.div);
+    }                                                   
+    if (this.options.fromOpacity)
+      this.div.setStyle({opacity: this.options.fromOpacity})
+    this.div.show();          
+    var style = "top:" + bounds.top + ";left:" +bounds.left + ";width:" + bounds.width +";height:" + bounds.height;
+    if (this.options.toOpacity)
+      style += ";opacity:" + this.options.toOpacity;
+    
+    new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._showWindow.bind(this)});    
+  },
+
+  hide: function(element, options) {     
+    var position = Position.cumulativeOffset(this.html);      
+    var size = this.html.getDimensions();    
+    this.window.visible = true; 
+    var bounds = this.window.getBounds();
+    this.window.visible = false; 
+
+    this.window.element.hide();
+
+    this.div.style.height = bounds.height;
+    this.div.style.width  = bounds.width;
+    this.div.style.top    = bounds.top;
+    this.div.style.left   = bounds.left;
+    
+    if (this.options.toOpacity)
+      this.div.setStyle({opacity: this.options.toOpacity})
+
+    this.div.show();                                 
+    var style = "top:" + position[1] + "px;left:" + position[0] + "px;width:" + size.width +"px;height:" + size.height + "px";
+
+    if (this.options.fromOpacity)
+      style += ";opacity:" + this.options.fromOpacity;
+    new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._hideDiv.bind(this)});    
+  },
+  
+  _showWindow: function() {
+    this.div.hide();
+    this.window.element.show(); 
+  },
+  
+  _hideDiv: function() {
+    this.div.hide();
+  }
+}
+
diff --git a/htdocs/includes/scriptaculous/src/window/window_ext.js b/htdocs/includes/scriptaculous/src/window/window_ext.js
new file mode 100644
index 0000000000000000000000000000000000000000..60efac61b4b733b04e090c5479c5d8e6e0692d77
--- /dev/null
+++ b/htdocs/includes/scriptaculous/src/window/window_ext.js
@@ -0,0 +1,115 @@
+// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
+// YOU MUST INCLUDE window.js BEFORE
+//
+// Object to store hide/show windows status in a cookie
+// Just add at the end of your HTML file this javascript line: WindowStore.init()
+WindowStore = {
+  doSetCookie: false,
+  cookieName:  "__window_store__",
+  expired:     null,
+  
+  // Init function with two optional parameters
+  // - cookieName (default = __window_store__)
+  // - expiration date (default 3 years from now)
+  init: function(cookieName, expired) {
+    WindowStore.cookieName = cookieName || WindowStore.cookieName
+
+    if (! expired) {
+      var today = new Date();
+      today.setYear(today.getYear()+1903);
+      WindowStore.expired = today;
+    }
+    else
+      WindowStore.expired = expired;
+
+    Windows.windows.each(function(win) {
+      win.setCookie(win.getId(), WindowStore.expired);
+    });
+
+    // Create observer on show/hide events
+    var myObserver = {
+    	onShow: function(eventName, win) {
+    	  WindowStore._saveCookie();
+    	},
+    	
+    	onClose: function(eventName, win) {
+    	  WindowStore._saveCookie();
+  	  },
+  	  
+    	onHide: function(eventName, win) {
+    	  WindowStore._saveCookie();
+    	}
+    }
+    Windows.addObserver(myObserver);
+
+    WindowStore._restoreWindows();
+    WindowStore._saveCookie();
+  },
+  
+  show: function(win) {
+    eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName));
+    if (cookie != null) {
+      if (cookie[win.getId()])
+        win.show();
+    }
+    else
+      win.show();
+  },
+
+  // Function to store windows show/hide status in a cookie 
+  _saveCookie: function() {
+    if (!doSetCookie)
+      return;
+    
+    var cookieValue = "{";
+    Windows.windows.each(function(win) {
+      if (cookieValue != "{")
+        cookieValue += ","
+      cookieValue += win.getId() + ": " + win.isVisible();
+    });
+    cookieValue += "}"
+  
+    WindowUtilities.setCookie(cookieValue, [WindowStore.cookieName, WindowStore.expired]);  
+  },
+
+  // Function to restore windows show/hide status from a cookie if exists
+  _restoreWindows: function() {
+    eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName));
+    if (cookie != null) {
+      doSetCookie = false;
+      Windows.windows.each(function(win) {
+        if (cookie[win.getId()])
+          win.show();
+      });
+    }
+    doSetCookie = true;
+  }
+}
+
+// Object to set a close key an all windows
+WindowCloseKey = {
+  keyCode: Event.KEY_ESC,
+  
+  init: function(keyCode) {
+    if (keyCode)
+      WindowCloseKey.keyCode = keyCode;      
+      
+    Event.observe(document, 'keydown', this._closeCurrentWindow.bindAsEventListener(this));   
+  },
+  
+  _closeCurrentWindow: function(event) {
+    var e = event || window.event
+  	var characterCode = e.which || e.keyCode;
+  	
+  	// Check if there is a top window (it means it's an URL content)
+  	var win = top.Windows.focusedWindow;
+    if (characterCode == WindowCloseKey.keyCode && win) {
+      if (win.cancelCallback) 
+        top.Dialog.cancelCallback();      
+      else if (win.okCallback) 
+        top.Dialog.okCallback();
+      else
+        top.Windows.close(top.Windows.focusedWindow.getId());
+    }
+  }
+}
\ No newline at end of file
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index db3585405dab26e6586dcfa6ffaa73391b3ee1b5..e118f6daf42cfbb1e9c427fa7a1c40db941cb808 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -648,7 +648,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
 
     // Affiche style sheets et link
     print '<link rel="stylesheet" type="text/css" title="default" href="'.DOL_URL_ROOT.'/'.$conf->css.'">'."\n";
-    print '<link rel="stylesheet" type="text/css" media="print" HREF="'.DOL_URL_ROOT.'/theme/print.css">'."\n";
+    print '<link rel="stylesheet" type="text/css" media="print" href="'.DOL_URL_ROOT.'/theme/print.css">'."\n";
+    
+    // Style sheets pour la class Window
+    print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/default.css">'."\n";
+    print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/alphacube.css">'."\n";
 
     // Definition en alternate style sheet des feuilles de styles les plus maintenues
     // Les navigateurs qui supportent sont rares. Plus aucun connu.
@@ -672,7 +676,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
         print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/scriptaculous.js"></script>'."\n";
         print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/effects.js"></script>'."\n";
         print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/controls.js"></script>'."\n";
-        print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/prototip.js"></script>'."\n";
+        //print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/prototip.js"></script>'."\n";
+        print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/window.js"></script>'."\n";
+        print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/tooltip.js"></script>'."\n";
         
     }
     
diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php
index 94f47fb1ccd74628151ae757af3a80d3d50db3e4..cd5f58c0d7de96b0fd931f3b0db2813121d1a38d 100644
--- a/htdocs/theme/auguria/auguria.css.php
+++ b/htdocs/theme/auguria/auguria.css.php
@@ -1259,22 +1259,3 @@ form.inplaceeditor-form a { /* The cancel link */
 	background-position : bottom;
 	cursor:pointer;
 }
-
-/* ============================================================================== */
-/*  Ajax - Tooltip                                                                */
-/* ============================================================================== */
-.tooltip {
-     width: 500px;
-     color: #fff;
-     }
-.tooltip .title {
-     background: #0F6788;
-     font: 15px Arial, Helvetica, sans-serif;
-     font-weight: bold;
-     padding: 5px;
-     }
-.tooltip .content {
-     background: dodgerblue;
-     font: 11px Arial, Helvetica, sans-serif;
-     padding: 5px;
-     }
\ No newline at end of file
diff --git a/htdocs/theme/common/window/alphacube.css b/htdocs/theme/common/window/alphacube.css
new file mode 100644
index 0000000000000000000000000000000000000000..7d2790e75e17646df829ea5fb3ce8257723032cf
--- /dev/null
+++ b/htdocs/theme/common/window/alphacube.css
@@ -0,0 +1,150 @@
+.overlay_alphacube {
+	background-color: #85BBEF;
+	filter:alpha(opacity=60);
+	-moz-opacity: 0.6;
+	opacity: 0.6;
+}
+
+.alphacube_nw {
+	background: transparent url(alphacube/left-top.gif) no-repeat 0 0;			
+  width:10px;
+  height:25px;
+}
+
+.alphacube_n {
+  background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;			
+  height:25px;
+}
+
+.alphacube_ne {
+  background: transparent url(alphacube/right-top.gif) no-repeat 0 0;			
+  width:10px;	  
+  height:25px;
+}
+
+.alphacube_w {
+  background: transparent url(alphacube/frame-left.gif) repeat-y top left;			
+  width:7px;
+}
+
+.alphacube_e {
+  background: transparent url(alphacube/frame-right.gif) repeat-y top right;			
+  width:7px;	  
+}
+
+.alphacube_sw {
+  background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;			
+  width:7px;
+  height:7px;
+}
+
+.alphacube_s {
+  background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;			
+  height:7px;
+}
+
+.alphacube_se, .alphacube_sizer  {
+  background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;			
+  width:7px;
+  height:7px;
+}
+
+.alphacube_sizer {
+	cursor:se-resize;	
+}
+
+.alphacube_close {
+	width: 23px;
+	height: 23px;
+	background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;			
+	position:absolute;
+	top:0px;
+	right:11px;
+	cursor:pointer;
+	z-index:1000;
+}
+
+.alphacube_minimize {
+	width: 23px;
+	height: 23px;
+	background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;			
+	position:absolute;
+	top:0px;
+	right:55px;
+	cursor:pointer;
+	z-index:1000;
+}
+
+.alphacube_maximize {
+	width: 23px;
+	height: 23px;
+	background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;			
+	position:absolute;
+	top:0px;
+	right:33px;
+	cursor:pointer;
+	z-index:1000;
+}
+
+.alphacube_title {
+	float:left;
+	height:14px;
+	font-size:14px;
+	text-align:center;
+	margin-top:2px;
+	width:100%;
+	color:#123456;
+}
+
+.alphacube_content {
+	overflow:auto;
+	color: #000;
+	font-family: Tahoma, Arial, sans-serif;
+  font: 12px arial;
+	background:#FDFDFD;
+}
+
+/* For alert/confirm dialog */
+.alphacube_window {
+	border:1px solid #F00;	
+	background: #FFF;
+	padding:20px;
+	margin-left:auto;
+	margin-right:auto;
+	width:400px;
+}
+
+.alphacube_message {
+  font: 12px arial;
+	text-align:center;
+	width:100%;
+	padding-bottom:10px;
+}
+
+.alphacube_buttons {
+	text-align:center;
+	width:100%;
+}
+
+.alphacube_buttons input {
+	width:20%;
+	margin:10px;
+}
+
+.alphacube_progress {
+	float:left;
+	margin:auto;
+	text-align:center;
+	width:100%;
+	height:16px;
+	background: #FFF url('alert/progress.gif') no-repeat center center
+}
+
+.alphacube_wired_frame {
+	background: #FFF;
+	filter:alpha(opacity=60);
+	-moz-opacity: 0.6;
+	opacity: 0.6;	
+}
+
+
diff --git a/htdocs/theme/common/window/alphacube/bottom-left-c.gif b/htdocs/theme/common/window/alphacube/bottom-left-c.gif
new file mode 100644
index 0000000000000000000000000000000000000000..531acdc513d068f75e8a1ccf78d2103b0a167cf1
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/bottom-left-c.gif differ
diff --git a/htdocs/theme/common/window/alphacube/bottom-middle.gif b/htdocs/theme/common/window/alphacube/bottom-middle.gif
new file mode 100644
index 0000000000000000000000000000000000000000..d4ce3be02ce72c51d28af307b19cea24abdf4b52
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/bottom-middle.gif differ
diff --git a/htdocs/theme/common/window/alphacube/bottom-right-c.gif b/htdocs/theme/common/window/alphacube/bottom-right-c.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2164c22c144145a4c74cf0fb2893b14f7e77fc8f
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/bottom-right-c.gif differ
diff --git a/htdocs/theme/common/window/alphacube/button-close-focus.gif b/htdocs/theme/common/window/alphacube/button-close-focus.gif
new file mode 100644
index 0000000000000000000000000000000000000000..99f635c102c7e1732e8dad6ff0b1cd0e31171cbe
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/button-close-focus.gif differ
diff --git a/htdocs/theme/common/window/alphacube/button-max-focus.gif b/htdocs/theme/common/window/alphacube/button-max-focus.gif
new file mode 100644
index 0000000000000000000000000000000000000000..1708a1e0d159dd33d23bd65e156fb1b3ed447c5e
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/button-max-focus.gif differ
diff --git a/htdocs/theme/common/window/alphacube/button-min-focus.gif b/htdocs/theme/common/window/alphacube/button-min-focus.gif
new file mode 100644
index 0000000000000000000000000000000000000000..ff69d1b20f4dc3ebb721164c9730f01a8a1b614d
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/button-min-focus.gif differ
diff --git a/htdocs/theme/common/window/alphacube/frame-left.gif b/htdocs/theme/common/window/alphacube/frame-left.gif
new file mode 100644
index 0000000000000000000000000000000000000000..543f13db6634b6db7d10ed20e7a564264618f878
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/frame-left.gif differ
diff --git a/htdocs/theme/common/window/alphacube/frame-right.gif b/htdocs/theme/common/window/alphacube/frame-right.gif
new file mode 100644
index 0000000000000000000000000000000000000000..5d7afef939b7a9d40743adcbfd7ead7318246ad5
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/frame-right.gif differ
diff --git a/htdocs/theme/common/window/alphacube/left-top.gif b/htdocs/theme/common/window/alphacube/left-top.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8373aaae17fe72765f15da9688380f515bdee11d
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/left-top.gif differ
diff --git a/htdocs/theme/common/window/alphacube/right-top.gif b/htdocs/theme/common/window/alphacube/right-top.gif
new file mode 100644
index 0000000000000000000000000000000000000000..77cf65ef8686b01bb4b80b00ed9504ce8beb2769
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/right-top.gif differ
diff --git a/htdocs/theme/common/window/alphacube/top-middle.gif b/htdocs/theme/common/window/alphacube/top-middle.gif
new file mode 100644
index 0000000000000000000000000000000000000000..9cab17d53de3e1df534c9d2e93b8c7eee08b8dee
Binary files /dev/null and b/htdocs/theme/common/window/alphacube/top-middle.gif differ
diff --git a/htdocs/theme/common/window/default.css b/htdocs/theme/common/window/default.css
new file mode 100644
index 0000000000000000000000000000000000000000..6ab13789d248322dde1ed56e002b294533041861
--- /dev/null
+++ b/htdocs/theme/common/window/default.css
@@ -0,0 +1,155 @@
+.overlay_dialog {
+	background-color: #666666;
+	filter:alpha(opacity=60);
+	-moz-opacity: 0.6;
+	opacity: 0.6;
+}
+
+.overlay___invisible__ {
+  background-color: #666666;
+	filter:alpha(opacity=0);
+	-moz-opacity: 0;
+	opacity: 0;
+}
+
+.dialog_nw {
+	width: 9px;
+	height: 23px;
+	background: transparent url(default/top_left.gif) no-repeat 0 0;		
+}
+
+.dialog_n {
+	background: transparent url(default/top_mid.gif) repeat-x 0 0;	
+	height: 23px;
+}
+
+.dialog_ne {
+	width: 9px;
+	height: 23px;
+	background: transparent url(default/top_right.gif) no-repeat 0 0;		
+}
+
+.dialog_e {
+	width: 2px;
+	background: transparent url(default/center_right.gif) repeat-y 0 0;	
+}
+
+.dialog_w {
+	width: 2px;
+	background: transparent url(default/center_left.gif) repeat-y 0 0;		
+}
+
+.dialog_sw {
+	width: 9px;
+	height: 19px;
+	background: transparent url(default/bottom_left.gif) no-repeat 0 0;			
+}
+
+.dialog_s {
+	background: transparent url(default/bottom_mid.gif) repeat-x 0 0;		
+	height: 19px;
+}
+
+.dialog_se {
+	width: 9px;
+	height: 19px;
+	background: transparent url(default/bottom_right.gif) no-repeat 0 0;			
+}
+
+.dialog_sizer {
+	width: 9px;
+	height: 19px;
+	background: transparent url(default/sizer.gif) no-repeat 0 0;	
+	cursor:se-resize;	
+}
+
+.dialog_close {
+	width: 14px;
+	height: 14px;
+	background: transparent url(default/close.gif) no-repeat 0 0;			
+	position:absolute;
+	top:5px;
+	left:8px;
+	cursor:pointer;
+	z-index:2000;
+}
+
+.dialog_minimize {
+	width: 14px;
+	height: 15px;
+	background: transparent url(default/minimize.gif) no-repeat 0 0;			
+	position:absolute;
+	top:5px;
+	left:28px;
+	cursor:pointer;
+	z-index:2000;
+}
+
+.dialog_maximize {
+	width: 14px;
+	height: 15px;
+	background: transparent url(default/maximize.gif) no-repeat 0 0;			
+	position:absolute;
+	top:5px;
+	left:49px;
+	cursor:pointer;
+	z-index:2000;
+}
+
+.dialog_title {
+	float:left;
+	height:14px;
+	font-family: Tahoma, Arial, sans-serif;
+	font-size:12px;
+	text-align:center;
+	width:100%;
+	color:#000;
+}
+
+.dialog_content {
+	overflow:auto;
+	color: #DDD;
+	font-family: Tahoma, Arial, sans-serif;
+	font-size: 10px;
+	background-color:#123;
+}
+
+.top_draggable, .bottom_draggable {
+  cursor:move;
+}
+
+.status_bar {
+  font-size:12px;
+}
+.status_bar input{
+  font-size:12px;
+}
+
+.wired_frame {
+	display: block;
+  position: absolute;
+  border: 1px #000 dashed;
+}
+
+/* DO NOT CHANGE THESE VALUES*/
+.dialog {
+	display: block;
+	position: absolute;
+}
+
+.dialog table.table_window  { 
+  border-collapse: collapse; 
+  border-spacing: 0; 
+  width: 100%;
+	margin: 0px;
+	padding:0px;
+}
+
+.dialog table.table_window td , .dialog table.table_window th { 
+  padding: 0; 
+}
+
+.dialog .title_window {
+  -moz-user-select:none;
+}                                                    
+
diff --git a/htdocs/theme/common/window/default/bottom_left.gif b/htdocs/theme/common/window/default/bottom_left.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4c73d3563531b3470951a5d45e5302f79cc4af45
Binary files /dev/null and b/htdocs/theme/common/window/default/bottom_left.gif differ
diff --git a/htdocs/theme/common/window/default/bottom_mid.gif b/htdocs/theme/common/window/default/bottom_mid.gif
new file mode 100644
index 0000000000000000000000000000000000000000..9205d30190bae1048b906fe5d348e1087b3894e0
Binary files /dev/null and b/htdocs/theme/common/window/default/bottom_mid.gif differ
diff --git a/htdocs/theme/common/window/default/bottom_right.gif b/htdocs/theme/common/window/default/bottom_right.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8d002eeb82f27cc58aef04616f9818618a6a8bc1
Binary files /dev/null and b/htdocs/theme/common/window/default/bottom_right.gif differ
diff --git a/htdocs/theme/common/window/default/bottom_right_resize.gif b/htdocs/theme/common/window/default/bottom_right_resize.gif
new file mode 100644
index 0000000000000000000000000000000000000000..649b0d870dd137007a578158ae2e1f3a2e23d14f
Binary files /dev/null and b/htdocs/theme/common/window/default/bottom_right_resize.gif differ
diff --git a/htdocs/theme/common/window/default/center_left.gif b/htdocs/theme/common/window/default/center_left.gif
new file mode 100644
index 0000000000000000000000000000000000000000..79e7a1cca64733b76c7bf467a0f3537cd3f33adf
Binary files /dev/null and b/htdocs/theme/common/window/default/center_left.gif differ
diff --git a/htdocs/theme/common/window/default/center_right.gif b/htdocs/theme/common/window/default/center_right.gif
new file mode 100644
index 0000000000000000000000000000000000000000..554c55c864eef11da4a6815bf3ff80a8899678cd
Binary files /dev/null and b/htdocs/theme/common/window/default/center_right.gif differ
diff --git a/htdocs/theme/common/window/default/clear.gif b/htdocs/theme/common/window/default/clear.gif
new file mode 100644
index 0000000000000000000000000000000000000000..c10b166944c3396d48d5ec868f5935d857fb1524
Binary files /dev/null and b/htdocs/theme/common/window/default/clear.gif differ
diff --git a/htdocs/theme/common/window/default/close.gif b/htdocs/theme/common/window/default/close.gif
new file mode 100644
index 0000000000000000000000000000000000000000..31ef5a3948ae1217506138bb95833431bd2147dd
Binary files /dev/null and b/htdocs/theme/common/window/default/close.gif differ
diff --git a/htdocs/theme/common/window/default/inspect.gif b/htdocs/theme/common/window/default/inspect.gif
new file mode 100644
index 0000000000000000000000000000000000000000..ebeeb02f692029521bdd12892d1db67ac1bb1a13
Binary files /dev/null and b/htdocs/theme/common/window/default/inspect.gif differ
diff --git a/htdocs/theme/common/window/default/maximize.gif b/htdocs/theme/common/window/default/maximize.gif
new file mode 100644
index 0000000000000000000000000000000000000000..892a0f08c9f8a729a81fcd4ae65caf5c9d17b75a
Binary files /dev/null and b/htdocs/theme/common/window/default/maximize.gif differ
diff --git a/htdocs/theme/common/window/default/minimize.gif b/htdocs/theme/common/window/default/minimize.gif
new file mode 100644
index 0000000000000000000000000000000000000000..a7214167b7edb283924a402c2c4539ed4ac93412
Binary files /dev/null and b/htdocs/theme/common/window/default/minimize.gif differ
diff --git a/htdocs/theme/common/window/default/overlay.png b/htdocs/theme/common/window/default/overlay.png
new file mode 100644
index 0000000000000000000000000000000000000000..648e71ed690467b76d820ae039563f270bc4e904
Binary files /dev/null and b/htdocs/theme/common/window/default/overlay.png differ
diff --git a/htdocs/theme/common/window/default/resize.gif b/htdocs/theme/common/window/default/resize.gif
new file mode 100644
index 0000000000000000000000000000000000000000..c44070259c4be0caba2140b1001c5b61908194df
Binary files /dev/null and b/htdocs/theme/common/window/default/resize.gif differ
diff --git a/htdocs/theme/common/window/default/sizer.gif b/htdocs/theme/common/window/default/sizer.gif
new file mode 100644
index 0000000000000000000000000000000000000000..649b0d870dd137007a578158ae2e1f3a2e23d14f
Binary files /dev/null and b/htdocs/theme/common/window/default/sizer.gif differ
diff --git a/htdocs/theme/common/window/default/top_left.gif b/htdocs/theme/common/window/default/top_left.gif
new file mode 100644
index 0000000000000000000000000000000000000000..774538ac6abb275b9ddf8ee365f5944766024b30
Binary files /dev/null and b/htdocs/theme/common/window/default/top_left.gif differ
diff --git a/htdocs/theme/common/window/default/top_mid.gif b/htdocs/theme/common/window/default/top_mid.gif
new file mode 100644
index 0000000000000000000000000000000000000000..6124e78bd3b4a051ed3e38ffbf3bb21bcb25a89f
Binary files /dev/null and b/htdocs/theme/common/window/default/top_mid.gif differ
diff --git a/htdocs/theme/common/window/default/top_right.gif b/htdocs/theme/common/window/default/top_right.gif
new file mode 100644
index 0000000000000000000000000000000000000000..fbc94bf2b945280883bf2720b4b2140d3c7e0941
Binary files /dev/null and b/htdocs/theme/common/window/default/top_right.gif differ
diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php
index 2910cbb962e3b448a9f9c8e50d966b2c9468a9a2..ab7ea6a9e6a60f309601e4fa0210985d3e2af935 100644
--- a/htdocs/theme/eldy/eldy.css.php
+++ b/htdocs/theme/eldy/eldy.css.php
@@ -1367,22 +1367,3 @@ div.menuFleche
 	position:relative;
 
 }
-
-/* ============================================================================== */
-/*  Ajax - Tooltip                                                                */
-/* ============================================================================== */
-.tooltip {
-     width: 500px;
-     color: #fff;
-     }
-.tooltip .title {
-     background: #0F6788;
-     font: 15px Arial, Helvetica, sans-serif;
-     font-weight: bold;
-     padding: 5px;
-     }
-.tooltip .content {
-     background: dodgerblue;
-     font: 11px Arial, Helvetica, sans-serif;
-     padding: 5px;
-     }
\ No newline at end of file