
//  Copyright Heiner Kuhlmann : hkuhlmann@dr-kuhlmann.com
//
//  The software is licensed under the GNU Library General Public License.
//  It comes with absolutely no warranty.
//
//  The function DHTML_init is based on the function provided by Stephan Münz

function DHTML_init() {
   this.DHTML     = false;
   this.DOM       = false;
   this.MS        = false;
   this.NS        = false;
   this.GECKO     = false;
   this.MSIE      = false;
   this.MSIE4     = false;
   this.NETSCAPE  = false;
   this.OPERA     = false;
   this.KONQUEROR = false;
   this.WINDOWS   = false;
   this.MAC       = false;
   this.LINUX     = false;
   this.JAVA      = false;
   this.FLASH     = false;
   this.min       = false;
   this.NS4       = false;
   this.IE4       = false;
   this.WIDTH     = 0;
   this.HIGHT     = 0;
   this.COLORS    = 0;
   this.VERSION   = 0;
   if (window.opera) this.OPERA = true;
   if (document.getElementById)
      { this.DHTML = true; this.DOM = true; }
   if (document.all && !this.OPERA)
      { this.DHTML = true; this.MS = true; }
   if (document.layers)
      { this.DHTML = true; this.NS = true; this.NETSCAPE = true; this.VERSION = 4; }
   if (navigator.userAgent.indexOf("Mozilla") >= 0) {
      if (navigator.userAgent.indexOf("Gecko") >= 0)          this.GECKO = true;
      else if (navigator.userAgent.indexOf("Konqueror") >= 0) this.KONQUEROR = true;
      else if (navigator.userAgent.indexOf("MSIE") >= 0)      this.MSIE = true;
      else if ( (navigator.userAgent.indexOf("I;") >= 0) ||
                (navigator.userAgent.indexOf("I)") >= 0) ||
                (navigator.userAgent.indexOf("U;") >= 0) ||
                (navigator.userAgent.indexOf("U)") >= 0) ||
                (navigator.userAgent.indexOf("N;") >= 0) ||
                (navigator.userAgent.indexOf("N)") >= 0))     this.NETSCAPE = true;
   }
   if ( (navigator.userAgent.indexOf("Win") >= 0) ||
        (navigator.userAgent.indexOf("Windows)") >= 0))
     this.WINDOWS = true;
   else if ( (navigator.userAgent.indexOf("Mac") >= 0) ||
             (navigator.userAgent.indexOf("Macintosh)") >= 0))
     this.MAC = true;
   else if (navigator.userAgent.indexOf("Mac") >= 0) this.LINUX = true;
   if (RegExp) {
       RE = /(\d)/;
       RE.exec(navigator.appVersion);
       this.VERSION = parseInt(RegExp.$1);
       if (this.GECKO && RegExp.$1 == "5") this.VERSION = 1;
       if (this.MSIE) {
           RE = /MSIE (\d)/;
           RE.exec(navigator.appVersion);
           this.VERSION = parseInt(RegExp.$1);
       }
   }
   if (window.clientWidth) {
      this.WIDTH = window.clientWidth;
      this.HIGHT = window.clientHeight;
   }
   else if (window.innerWidth) {
      this.WIDTH = window.innerWidth;
      this.HIGHT = window.innerHeight;
   }
   else if (!window.clientWidth && document.body && document.body.offsetWidth) {
      this.WIDTH = document.body.offsetWidth;
      this.HIGHT = document.body.offsetHeight;
   }
   if (screen.colorDepth)
      this.COLORS = Math.pow(2,screen.colorDepth);
   if (navigator.javaEnabled()) this.JAVA = true;
   if (navigator.plugins) {
      for (var i=0; i < navigator.plugins.length; i++)
         if (navigator.plugins[i].name.indexOf("Flash") >= 0) this.FLASH = true;
   }
   this.min   = ( this.NS || this.MSIE || this.DOM );
   this.NS4   = ( this.NS && this.VERSION == 4 );
   this.MSIE4 = ( ( ! this.OPERA) && this.MSIE && this.VERSION >= 4 );
   this.IE4   = this.MSIE4;
} DHTML_init
function DHTML_Window_Height () {
   if (window.clientHeight)
      return window.clientHeight;
   else if (window.innerHeight)
      return window.innerHeight;
   else if (!window.clientHeight && document.body && document.body.offsetHeight)
      return document.body.offsetHeight;
}; 
function DHTML_Window_Width () {
   if (window.clientWidth) 
      return window.clientWidth;
   else if (window.innerWidth)
      return window.innerWidth;
   else if (!window.clientWidth && document.body && document.body.offsetWidth)
      return document.body.offsetWidth;
}; 
browser_is = new DHTML_init();
function Dynamic_Button ( in_object, name, img_container ) {
   this.SuperClass = Dynamic_Images_Contructor;
   this.SuperClass   ( in_object, name, img_container );
   this.is_up        = true;
   this.is_flat      = true;
   this.is_active    = true;
   this.up           = Dynamic_Button_OP_Up;
   this.down         = Dynamic_Button_OP_Down;
   this.up();
}; 
function Dynamic_Flat_Button ( in_object, name, img_container ) {
   this.SuperClass = Dynamic_Button;
   this.SuperClass   (in_object, name, img_container);
   this.flat       = Dynamic_Button_OP_Flat;
}; 
function Dynamic_Active_Button ( in_object, name, img_container ) {
   this.SuperClass = Dynamic_Button;
   this.SuperClass   (in_object, name, img_container);
   this.activate   = Dynamic_Button_OP_Activate;
   this.deactivate = Dynamic_Button_OP_Deactivate;
}; 
function Dynamic_Active_Flat_Button ( in_object, name, img_container ) {
   this.SuperClass = Dynamic_Active_Button;
   this.SuperClass   (in_object, name, img_container);
   this.flat       = Dynamic_Button_OP_Flat;
   this.flat();
}; 
function Dynamic_On_Off_Button ( in_object, name, img_container, off_container ) {
   this.SuperClass    = Dynamic_Active_Flat_Button;
   this.SuperClass      (in_object, name, img_container);
   this.is_on         = true;
   this.on_container  = img_container.container;
   this.off_container = off_container.container;
   this.on            = Dynamic_Button_OP_On;
   this.off           = Dynamic_Button_OP_Off;
   this.toggle        = Dynamic_Button_OP_Toggle;
}; 
function Dynamic_Active_Flat_Comment_Button ( in_object, name, img_container, comment ) {
   this.SuperClass   = Dynamic_Active_Flat_Button;
   this.SuperClass     (in_object, name, img_container);
   this.comment      = new Dynamic_Layer ( comment, in_object );
   this.show_comment = Dynamic_Buttons_OP_Show_Comment;
   this.hide_comment = Dynamic_Images_OP_Hide_Comment;
   this.hide_comment ();
}; 
function Dynamic_On_Off_Comment_Button ( in_object, name, img_container, off_container, comment ) {
   this.SuperClass    = Dynamic_On_Off_Button;
   this.SuperClass      (in_object, name, img_container, off_container);
   this.comment       = new Dynamic_Layer ( comment, in_object );
   this.show_comment  = Dynamic_Buttons_OP_Show_Comment;
   this.hide_comment  = Dynamic_Images_OP_Hide_Comment;
   this.hide_comment ();
}; 
function Dynamic_Button_OP_Up () {
   this.is_up=true;
   this.is_flat=false;
   if ( ! this.is_active ) return;
   this.target.src=this.container[0].src;
}; 
function Dynamic_Button_OP_Down () {
   this.is_up=false;
   this.is_flat=false;
   if ( ! this.is_active ) return;
   this.target.src=this.container[1].src;
}; 
function Dynamic_Button_OP_Flat () {
   this.is_flat=true;
   if ( ! this.is_active ) return;
   this.target.src=this.container[3].src;
}; Dynamic_Button_OP_Flat
function Dynamic_Button_OP_Activate () {
   this.is_active=true;
   if (this.is_flat) this.flat();
   else if (this.is_up) this.up();
   else this.down();
}; 
function Dynamic_Button_OP_Deactivate () {
   this.target.src=this.container[2].src;
   this.is_active=false;
}; 
function Dynamic_Button_OP_On () {
   this.container=this.on_container;
   this.is_on=true;
   if (this.is_up) this.up();
   else this.down();
}; 
function Dynamic_Button_OP_Off () {
   this.container=this.off_container;
   this.is_on=false;
   if (this.is_up) this.up();
   else this.down();
}; 
function Dynamic_Button_OP_Toggle () {
   if (this.is_on) this.off();
   else this.on();
   return this.is_on;
}; 
function Dynamic_Buttons_OP_Show_Comment () {
   if ( this.is_active ) {
      this.comment.show ();
   };
}; 
function Dynamic_Visiblity_Layer (layer_id, in_object) {
   this.SuperClass     = Dynamic_Movable_Layer;
   this.SuperClass       (layer_id, in_object);
   this.clipping         = new Object();
   this.clipping.layer   = this;
   this.clipping.delay   = 20;              
   this.clipping.speed   = 1;               
   this.clipping.running = false;
   this.clipping.top     = 0;  
   this.clipping.left    = 0;  
   this.clipping.bottom  = 0;  
   this.clipping.right   = 0;  
   this.view_to          = Dynamic_Visiblity_Layer_OP_View_To; 
   this.clipping.final_action = null;
   this.clipp_next       = Dynamic_Visiblity_Layer_OP_Clip_Next; 
}; 
function Dynamic_Visiblity_Layer_OP_View_To ( left, top, right, bottom ) {
   if ( this.clipping.timeout ) clearTimeout ( this.clipping.timeout );
   if ( this.clipping.running && this.clipping.final_action ) {
      this.clipping.running = false;
      this.clipping.final_action();
   };
   this.clipping.running = true;
   this.clipping.left    = left;
   this.clipping.top     = top;
   this.clipping.right   = right;
   this.clipping.bottom  = bottom;
   if ( this.clip_area.top    != top    || this.clip_area.left  != left  ||
        this.clip_area.bottom != bottom || this.clip_area.right != right
      ) {
      if ( this.clipping.initial_action ) this.clipping.initial_action();
      this.clipping.timeout = setTimeout ( this.obj + ".clipp_next()", this.clipping.delay );
   } else {
      this.clip ( left, top, right, bottom );
   };
}; 
function Dynamic_Visiblity_Layer_OP_Clip_Component ( actual, target, delta, name ) {
   var use;
   if ( target > actual ) {
      if ( target - actual > delta ) {
         use = delta;
      } else return target - actual;
   } else if ( target < actual ) {
      if ( actual - target > delta ) {
         use = -delta;
      } else return target - actual;
   } else use = 0;
   return use;
}; 
function Dynamic_Visiblity_Layer_OP_Clip_Next() {
   var dtop, dleft, dright, dbottom;
   if ( this.clipping.running ) {
      dleft   = Dynamic_Visiblity_Layer_OP_Clip_Component ( this.clip_area.left,   this.clipping.left,   this.clipping.speed, "left" );
      dtop    = Dynamic_Visiblity_Layer_OP_Clip_Component ( this.clip_area.top,    this.clipping.top,    this.clipping.speed, "top" );
      dright  = Dynamic_Visiblity_Layer_OP_Clip_Component ( this.clip_area.right,  this.clipping.right,  this.clipping.speed, "right" );
      dbottom = Dynamic_Visiblity_Layer_OP_Clip_Component ( this.clip_area.bottom, this.clipping.bottom, this.clipping.speed, "bottom" );
      if ( dtop != 0 || dleft != 0 || dright != 0 || dbottom != 0 ) {
         this.clip ( this.clip_area.left + dleft, this.clip_area.top + dtop, this.clip_area.right + dright, this.clip_area.bottom + dbottom );
         this.clipping.timeout = setTimeout ( this.obj + ".clipp_next()", this.clipping.delay );
      } else {
         this.clipping.running = false;
         if (this.clipping.final_action) this.clipping.final_action();
      };
   };
}; 
function Dynamic_Clock ( in_object, name_h10, name_h1, name_m10, name_m1, name_colon, number_container, colon_container ) {
   this.hours_10     = new Dynamic_Images_Contructor ( in_object, name_h10,   number_container );
   this.hours_1      = new Dynamic_Images_Contructor ( in_object, name_h1,    number_container );
   this.minutes_10   = new Dynamic_Images_Contructor ( in_object, name_m10,   number_container );
   this.minutes_1    = new Dynamic_Images_Contructor ( in_object, name_m1,    number_container );
   this.colon        = new Dynamic_Images_Contructor ( in_object, name_colon, colon_container );
   this.obj          = name_h10+"Dynamic_Clock";
   eval (this.obj+"=this");
   this.delay        = 1000;
   this.alarm_on     = false;
   this.signal_alarm = false;
   this.alarm        = new Date();
   this.set_alarm    = Dynamic_Clock_OP_Set_Alarm;
   this.show         = Dynamic_Clock_OP_Show;
   this.show_time    = Dynamic_Clock_OP_Show_Time;
   this.delete_alarm = Dynamic_Clock_OP_Delete_Alarm;
   this.hide         = Dynamic_Clock_OP_Hide;
   this.alarm_action = null;
   this.running      = false;
   this.show();
}; 
function Dynamic_Clock_OP_Show_Time () {
   var now     = new Date();
   var hours   = now.getHours();
   var minutes = now.getMinutes();
   if ( this.running ) {
      this.hours_10.target.src=this.hours_10.container[Math.floor(hours/10)].src;
      this.hours_1.target.src=this.hours_1.container[(hours%10)].src;
      this.minutes_10.target.src=this.minutes_10.container[Math.floor(minutes/10)].src;
      this.minutes_1.target.src=this.minutes_1.container[(minutes%10)].src;
      if (now.getSeconds()%2 == 0) this.colon.target.src=this.colon.container[1].src
      else if ( this.alarm_on && (this.alarm.getTime()<now.getTime()) ) this.colon.target.src=this.colon.container[2].src
      else this.colon.target.src=this.colon.container[0].src;
      if ( this.signal_alarm && (this.alarm.getTime()<now.getTime()) && this.alarm_action ) {
         this.alarm_action();
         this.signal_alarm = false;
      };
      setTimeout(this.obj+".show_time()", this.delay);
   } else {
      this.hide();
   };
}; 
function Dynamic_Clock_OP_Show () {
   this.running = true;
   this.show_time();
}; 
function Dynamic_Clock_OP_Hide () {
   this.running = false;
   this.hours_10.target.src=this.colon.container[0].src;
   this.hours_1.target.src=this.colon.container[0].src;
   this.minutes_10.target.src=this.colon.container[0].src;
   this.minutes_1.target.src=this.colon.container[0].src;
   this.colon.target.src=this.colon.container[0].src;
}; 
function Dynamic_Clock_OP_Set_Alarm ( to_time ) {
   this.alarm.setTime ( to_time );
   this.signal_alarm = true;
   this.alarm_on     = true;
}; 
function Dynamic_Clock_OP_Delete_Alarm () {
   this.signal_alarm = false;
   this.alarm_on     = false;
}; 
function css(id,left,top,width,height,color,vis,z,other) {
	if (id=="START") return '<STYLE TYPE="text/css">\n'
	else if (id=="END") return '</STYLE>'
	var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
	if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
	if (arguments.length>=5 && height!=null) {
		str += ' height:'+height+'px;'
		if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
	}
	if (arguments.length>=6 && color!=null) str += (document.layers)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
	if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
	if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
	if (arguments.length==9 && other!=null) str += ' '+other
	str += '}\n'
	return str
}
function writeCSS(str,showAlert) {
	str = css('START')+str+css('END')
	document.write(str)
	if (showAlert) alert(str)
}
function Dynamic_Following_Layer ( layer_id, in_object, xoffset, yoffset ) {
   this.SuperClass1       = Dynamic_Rubber_Moving_Layer;
   this.SuperClass1         (layer_id, in_object);
   this.SuperClass2       = Dynamic_Location;
   this.SuperClass2         (layer_id, in_object);
   this.scrolled.parent   = this;
   this.scrolled.xoffset  = xoffset;
   this.scrolled.yoffset  = yoffset;
   this.scrolled.delay    = 1000;         
   this.moving.time       = 0;            
   this.moving.timemax    = 10000;        
   this.moving.delay      = 40;           
   this.moving.epsilon    = 0.1;          
   this.moving.x.init     = -200;         
   this.moving.x.center   = xoffset;      
   this.moving.x.rubber   = 0.02;         
   this.moving.x.damp     = 0.85;         
   this.moving.y.init     = -200;
   this.moving.y.center   = yoffset;
   this.moving.y.rubber   = 0.02;
   this.moving.y.damp     = 0.85;
   this.scrolled.onchange = Dynamic_Following_Layer_OP_Follow_Both;
   this.follow            = Dynamic_Following_Layer_OP_Start;
}; 
function Dynamic_Following_X_Layer ( layer_id, in_object, xoffset, yoffset ) {
   this.SuperClass        = Dynamic_Following_Layer;
   this.SuperClass          ( layer_id, in_object, xoffset, yoffset );
   this.scrolled.onchange = Dynamic_Following_Layer_OP_Follow_X;
}; 
function Dynamic_Following_Y_Layer ( layer_id, in_object, xoffset, yoffset ) {
   this.SuperClass       = Dynamic_Following_Layer;
   this.SuperClass         ( layer_id, in_object, xoffset, yoffset );
   this.scrolled.onchange = Dynamic_Following_Layer_OP_Follow_Y;
}; 
function Dynamic_Following_Layer_OP_Follow_Both () {
   this.parent.run();
   this.parent.show();
   this.parent.moving.x.center = this.x() + this.xoffset;
   this.parent.moving.y.center = this.y() + this.yoffset;
}; 
function Dynamic_Following_Layer_OP_Follow_X () {
   this.parent.moving.x.center = this.x() + this.xoffset;
   this.parent.run();
   this.parent.show();
}; 
function Dynamic_Following_Layer_OP_Follow_Y () {
   this.parent.moving.y.center = this.y() + this.yoffset;
   this.parent.run();
   this.parent.show();
}; 
function Dynamic_Following_Layer_OP_Start () {
   this.move();
   this.scrolled.onchange();
   this.scrolled.watch();
}; 
function Dynamic_History ( in_object, name, of_window, img_container ) {
   this.stack     = Array;
   this.last      = 0;
   this.location  = window.top.the_listing.location;
   this.button    = new Dynamic_Active_Button ( in_object, name, img_container );
   this.pop       = Dynamic_History_OP_Pop;
   this.push      = Dynamic_History_OP_Push;
   this.location  = of_window.location;
   this.button.deactivate();
} 
function Dynamic_Push_History () {
   if ( this.last == 0 ) this.button.activate();
   this.stack[this.last]=this.location.href;
   this.last++
} 
function Dynamic_History_OP_Push () {
   if ( this.last == 1 ) this.button.deactivate();
   if ( this.last > 0 ) {
      this.last--;
      this.location.replace (this.stack[this.last]);
   };
} 
function Dynamic_Locate_Image ( in_object, image_name ) {
   if (in_object) {
      if ( browser_is.DOM ) {
         return ( eval("document."+image_name) );
      } else {
         return ( in_object.layer.document.images[image_name] );
      };
   } else {
      return ( document.images[image_name] );
   };
}; 
function Dynamic_Image_Container () {
   this.container = new Array(Dynamic_Image_Container.arguments.length);
   for (var i=0; i<Dynamic_Image_Container.arguments.length; i++) {
      if (Dynamic_Image_Container.arguments[i] != '' ) {
         this.container[i] = new Image();
         this.container[i].src = Dynamic_Image_Container.arguments[i];
      };
   };
} 
function Dynamic_Images_Contructor ( in_object, name, img_container ) {
   this.target = Dynamic_Locate_Image ( in_object, name );
   if ( ! this.target ) alert ( "couldn't constuct Dynamic_Images with image " + name + ", may be it is not defined in HTML.");
   this.container  = img_container.container;
}; 
function Dynamic_Images ( in_object, name, img_container ) {
   this.SuperClass = Dynamic_Images_Contructor;
   this.SuperClass   ( in_object, name, img_container );
   this.delay      = 200;
   this.index      = 0;
   this.is_runnung = false;
   this.obj        = name+"Dynamic_Images";
   eval (this.obj+"=this");
   this.showing    = Dynamic_Images_OP_Show;
   this.next       = Dynamic_Images_OP_Next;
   this.prev       = Dynamic_Images_OP_Prev;
   this.first      = Dynamic_Images_OP_First;
   this.last       = Dynamic_Images_OP_Last;
   this.run        = Dynamic_Images_OP_Run;
   this.slide      = Dynamic_Images_OP_Slide;
   this.stop       = Dynamic_Images_OP_Stop;
   this.run_next   = Dynamic_Images_OP_Run_Next;
   this.slide_next = Dynamic_Images_OP_Slide_Next;
}; 
function Dynamic_Comment_Images ( in_object, name, img_container, comment ) {
   this.SuperClass = Dynamic_Images;
   this.SuperClass   ( in_object, name, img_container );
   this.comment       = new Dynamic_Layer ( comment, in_object );
   this.show_comment  = Dynamic_Images_OP_Show_Comment;
   this.hide_comment  = Dynamic_Images_OP_Hide_Comment;
   this.hide_comment();
}; 
function Dynamic_Images_OP_Show (index) {
   this.index = index;
   this.target.src=this.container[index].src;
}; 
function Dynamic_Images_OP_Next () {
   this.index = (this.index+1) % this.container.length;
   if ( this.index == 0 ) this.index = 1;
   this.target.src=this.container[this.index].src;
}; 
function Dynamic_Images_OP_Prev () {
   this.index = (this.index-1) % this.container.length;
   if ( this.index == 0 ) this.index = 1;
   this.target.src=this.container[this.index].src;
}; 
function Dynamic_Images_OP_First () {
   this.index = 0;
   this.target.src=this.container[0].src;
}; Dynamic_Images_OP_First
function Dynamic_Images_OP_Last () {
   this.index = this.container.length-1;
   this.target.src=this.container[this.index].src;
}; Dynamic_Images_OP_Last
function Dynamic_Images_OP_Run () {
   if ( this.is_running ) return;
   this.is_running = true;
   this.next();
   setTimeout(this.obj+".run_next()", this.delay);
}; Dynamic_Images_OP_Run
function Dynamic_Images_OP_Run_Next () {
   if ( this.is_running ) {
      this.next();
      setTimeout(this.obj+".run_next()", this.delay);
   } else {
      this.index = 0;
      this.target.src=this.container[0].src;
      if ( this.i_finished ) this.i_finished();
   };
}; Dynamic_Images_OP_Run_Next
function Dynamic_Images_OP_Slide () {
   if ( this.is_running ) return;
   this.is_running = true;
   this.first();
   setTimeout(this.obj+".slide_next()", this.delay);
}; 
function Dynamic_Images_OP_Slide_Next () {
   if ( this.is_running ) {
      if ( this.index == this.container.length-1 ) {
         this.index = 0;
         this.target.src=this.container[0].src;
         if ( this.i_finished ) this.i_finished();
         this.is_running = false;
      } else {
         this.next();
         setTimeout(this.obj+".slide_next()", this.delay);
      };
   } else {
      this.index = 0;
      this.target.src=this.container[0].src;
      if ( this.i_finished ) this.i_finished();
   };
}; 
function Dynamic_Images_OP_Stop () {
   this.is_running = false;
}; 
function Dynamic_Images_OP_Show_Comment () {
   this.comment.show ();
}; 
function Dynamic_Images_OP_Hide_Comment () {
   this.comment.hide ();
}; 
function layer_object ( layer_id, in_object ) {
   if (browser_is.NS4) {
      if ( in_object ) {
         return ( in_object.layer.layers[layer_id] );
      } else {
         return ( document.layers[layer_id] );
      };
   } else if (browser_is.MSIE4) {
      return ( document.all[layer_id] );
   } else if (browser_is.DOM) {
      return ( document.getElementById(layer_id) );
   } else {
      return ( null );
   };
}; 
function Dynamic_Locate_Layer ( in_object, layer_id ) {
   var layer;
   if (browser_is.NS4) {
      if ( in_object ) {
         layer = in_object.layer.layers[layer_id];
      } else {
         layer = document.layers[layer_id];
      };
   } else if (browser_is.MSIE4) {
      layer = document.all[layer_id];
   } else if (browser_is.DOM) {
      layer = document.getElementById(layer_id);
   };
   return layer;
}; 
function Dynamic_Layer ( layer_id, in_object ) {
   if (browser_is.NS4) {
      if ( in_object ) {
         this.layer = in_object.layer.layers[layer_id];
      } else {
         this.layer = document.layers[layer_id];
      };
      this.layer_id    = layer_id;
      if ( this.layer ) {
         this.is_visible  = (this.layer.visibility == 'hide');
         this.hide        = Dynamic_Layer_OP_NE_Hide;
         this.show        = Dynamic_Layer_OP_NE_Show;
         this.write       = Dynamic_Layer_OP_NE_Write; 
         this.set_bgcolor = Dynamic_Layer_OP_NE_Bgcolor;
         this.clip        = Dynamic_Layer_OP_NE_Clip;
         this.setsize     = Dynamic_Layer_OP_NE_Setsize;
         this.clip_area   = new Object;
      } else {
         alert ( "ERROR: couldn't find layer " + layer_id );
      };
   } else if (browser_is.MSIE4) {
      this.layer = document.all[layer_id];
      if ( this.layer ) {
         this.layer_id    = layer_id;
         this.is_visible  = (this.layer.style.visibility == 'hidden');
         this.hide        = Dynamic_Layer_OP_IE_Hide;
         this.show        = Dynamic_Layer_OP_IE_Show;
         this.write       = Dynamic_Layer_OP_IE_Write;
         this.set_bgcolor = Dynamic_Layer_OP_IE_Bgcolor;
         this.clip        = Dynamic_Layer_OP_IE_Clip;
         this.setsize     = Dynamic_Layer_OP_IE_Setsize;
         this.clip_area   = new Object;
      } else {
         alert ( "ERROR: couldn't find layer " + layer_id );
      };
   } else if (browser_is.DOM) {
      this.layer = document.getElementById(layer_id);
      if ( this.layer ) {
         this.layer_id    = layer_id;
         this.is_visible  = (this.layer.style.visibility == 'hidden');
         this.hide        = Dynamic_Layer_OP_IE_Hide;
         this.show        = Dynamic_Layer_OP_IE_Show;
         this.write       = Dynamic_Layer_OP_IE_Write;
         this.set_bgcolor = Dynamic_Layer_OP_IE_Bgcolor;
         this.clip        = Dynamic_Layer_OP_IE_Clip;
         this.setsize     = Dynamic_Layer_OP_IE_Setsize;
         this.clip_area   = new Object;
      } else {
         alert ( "ERROR: couldn't find layer " + layer_id );
      };
   };
   this.obj        = layer_id+"Dynamic_Layer";
   eval (this.obj+"=this");
}; 
function Dynamic_Layer_OP_IE_Hide () {
   this.layer.style.visibility = 'hidden';
   this.is_visible = true;
}; 
function Dynamic_Layer_OP_NE_Hide () {
   this.layer.visibility = 'hide';
   this.is_visible = true;
}; 
function Dynamic_Layer_OP_IE_Show () {
   this.layer.style.visibility = 'visible';
   this.is_visible = true;
}; 
function Dynamic_Layer_OP_NE_Show () {
   this.layer.visibility = 'show';
   this.is_visible = true;
}; 
function Dynamic_Layer_OP_IE_Write ( text ) {
   this.layer.innerHTML=text;
}; 
function Dynamic_Layer_OP_NE_Write (text) {
   this.layer.document.open();
   this.layer.document.write(text);
   this.layer.document.close();
}; 
function Dynamic_Layer_OP_IE_Bgcolor (color) {
   this.layer.style.backgroundColor = color;
}; 
function Dynamic_Layer_OP_NE_Bgcolor (color) {
   this.layer.document.bgColor = color;
};
function Dynamic_Layer_OP_NE_Clip ( left, top, right, bottom ) {
   this.layer.clip.top    = top;
   this.layer.clip.right  = right;
   this.layer.clip.bottom = bottom;
   this.layer.clip.left   = left;
   this.clip_area.top     = top;
   this.clip_area.right   = right;
   this.clip_area.bottom  = bottom;
   this.clip_area.left    = left;
}; 
function Dynamic_Layer_OP_IE_Clip ( left, top, right, bottom ) {
   this.layer.style.clip = "rect(" + top + "px " + right + "px " + bottom + "px " + left + "px)";
   this.clip_area.top    = top;
   this.clip_area.right  = right;
   this.clip_area.bottom = bottom;
   this.clip_area.left   = left;
}; 
function Dynamic_Layer_OP_NE_Setsize ( width, height ) {
   this.layer.resizeTo ( width, height );
}; 
function Dynamic_Layer_OP_IE_Setsize ( width, height ) {
   this.layer.style.width  = width;
   this.layer.style.height = height;
}; 
function Dynamic_Lissajous_Moving_Layer (layer_id, in_object) {
   this.SuperClass         = Dynamic_Movable_Layer;
   this.SuperClass           (layer_id, in_object);
   this.moving             = new Object();
   this.moving.layer       = this;
   this.moving.time        = 0;             
   this.moving.timemax     = 600;           
   this.moving.delay       = 20;            
   this.moving.x           = new Object();  
   this.moving.x.layer     = this;          
   this.moving.x.init      = 200;           
   this.moving.x.move      = Dynamic_Lissajous_Moving_OP_Move_Component;
   this.moving.x.amplitude = 100;
   this.moving.x.phase     =   0;
   this.moving.x.steps     = 100;
   this.moving.y           = new Object();  
   this.moving.y.layer     = this;          
   this.moving.y.init      = 100;
   this.moving.y.move      = Dynamic_Lissajous_Moving_OP_Move_Component;
   this.moving.y.amplitude = 100;
   this.moving.y.phase     =  25;
   this.moving.y.steps     = 100;
   this.move           = Dynamic_Lissajous_Moving_OP_Move;
   this.halt           = Dynamic_Lissajous_Moving_OP_Halt;
   this.toggle         = Dynamic_Lissajous_Moving_OP_Toggle;
   this.moving_next    = Dynamic_Lissajous_Moving_OP_Move_Next; 
}; 
function Dynamic_Lissajous_Moving_OP_Move () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action()
   };
   this.moving.running = true;
   this.moving.time    = 0;
   if ( this.moving.initial_action ) this.moving.initial_action();
   this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   this.moving.x.darc = 2.0 * Math.PI / this.moving.x.steps;
   this.moving.x.arc  = this.moving.x.darc * this.moving.x.phase;
   this.moving.x.step = this.moving.x.steps - 1;
   this.moving.y.darc = 2.0 * Math.PI / this.moving.y.steps;
   this.moving.y.arc  = this.moving.y.darc * this.moving.y.phase;
   this.moving.y.step = this.moving.y.steps - 1;
}; 
function Dynamic_Lissajous_Moving_OP_Halt () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = false;
}; 
function Dynamic_Lissajous_Moving_OP_Toggle () {
   if ( this.moving.running ) this.halt();
   else this.move();
}; 
function Dynamic_Lissajous_Moving_OP_Move_Component () {
   if ( this.step == 0 ) {
      this.arc  = this.darc * this.phase;
      this.step = this.steps - 1;
   } else {
      this.arc = this.arc + this.darc;
      this.step = this.step - 1;
   };
   return this.init + this.amplitude * Math.sin ( this.arc );
}; 
function Dynamic_Lissajous_Moving_OP_Move_Next() {
   var x;
   var y;
   if ( (this.moving.time > this.moving.timemax) | (!this.moving.running) ) {
      if ( this.moving.running && this.moving.final_action ) {
         this.moving.running = false;
         this.moving.final_action();
      };
   } else {
      this.moving.time = this.moving.time + 1;
       this.go_to ( this.moving.x.move(), this.moving.y.move() );
      this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   };
}; 
function Dynamic_Location ( layer_id ) {
   this.obj = layer_id+"Dynamic_Location";
   eval (this.obj+"=this");
   if (browser_is.NS4) {
      this.scrolled     = new Object();
      this.scrolled.x   = Dynamic_Location_OP_NE_Scrolled_X;
      this.scrolled.y   = Dynamic_Location_OP_NE_Scrolled_Y;
      this.event        = new Object();
      this.event.left   = Dynamic_Location_OP_NE_Event_Left_Button;
      this.event.right  = Dynamic_Location_OP_NE_Event_Right_Button;
      this.event.middle = Dynamic_Location_OP_NE_Event_Middle_Button
      this.event.x      = Dynamic_Location_OP_NE_Event_X;
      this.event.y      = Dynamic_Location_OP_NE_Event_Y;
   } else if (browser_is.MSIE4) {
      this.scrolled     = new Object();
      this.scrolled.x   = Dynamic_Location_OP_IE_Scrolled_X;
      this.scrolled.y   = Dynamic_Location_OP_IE_Scrolled_Y;
      this.event        = new Object();
      this.event.left   = Dynamic_Location_OP_IE_Event_Left_Button;
      this.event.right  = Dynamic_Location_OP_IE_Event_Right_Button;
      this.event.middle = Dynamic_Location_OP_IE_Event_Middle_Button
      this.event.x      = Dynamic_Location_OP_IE_Event_X;
      this.event.y      = Dynamic_Location_OP_IE_Event_Y;
   } else if (browser_is.DOM) {
      this.scrolled     = new Object();
      this.scrolled.x   = Dynamic_Location_OP_DOM_Scrolled_X;
      this.scrolled.y   = Dynamic_Location_OP_DOM_Scrolled_Y;
      this.event        = new Object();
      this.event.left   = Dynamic_Location_OP_DOM_Event_Left_Button;
      this.event.right  = Dynamic_Location_OP_DOM_Event_Right_Button;
      this.event.middle = Dynamic_Location_OP_DOM_Event_Middle_Button
      this.event.x      = Dynamic_Location_OP_DOM_Event_X;
      this.event.y      = Dynamic_Location_OP_DOM_Event_Y;
   };
   this.scrolled.obj = this.obj+"_scrolled";
   eval (this.scrolled.obj+"=this.scrolled");
   this.scrolled.watch           = Dynamic_Location_OP_Start_Watch;
   this.scrolled.unwatch         = Dynamic_Location_OP_Stop_Watch;
   this.scrolled.toggle_watching = Dynamic_Location_OP_Toggle_Watching;
   this.scrolled.watch_next      = Dynamic_Location_OP_Next_Watch;
   this.scrolled.delay           = 1000;
   this.scrolled.is_watching     = false;
   this.scrolled.last_x          = 0;
   this.scrolled.last_y          = 0;
}; 
function Dynamic_Location_OP_Start_Watch () {
   this.last_x = this.x () + 1;
   this.last_y = this.y () + 1;
   this.is_watching = true;
   this.timeout = setTimeout ( this.obj+".watch_next()", this.delay );
}; 
function Dynamic_Location_OP_Stop_Watch () {
   this.is_watching = false;
}; 
function Dynamic_Location_OP_Toggle_Watching () {
   if ( this.is_watching ) {
      this.unwatch() 
   } else {
      this.watch();
   };
}; 
function Dynamic_Location_OP_Next_Watch () {
   var act_x, act_y;
   if ( this.is_watching ) {
      act_x = this.x ();
      act_y = this.y ();
      if ( (this.last_x != act_x) || ( this.last_y != act_y ) ) {
         if ( this.onchange ) this.onchange ( act_x, act_y );
      };
      this.last_x = act_x;
      this.last_y = act_y;
      this.timeout = setTimeout ( this.obj+".watch_next()", this.delay );
   };
}; 
function Dynamic_Location_OP_IE_Scrolled_X () {
   return document.body.scrollLeft; 
}; 
function Dynamic_Location_OP_IE_Scrolled_Y () {
   return document.body.scrollTop;
}; 
function Dynamic_Location_OP_IE_Event_X ( Of_Event ) {
   return Of_Event.x + document.body.scrollLeft;
}; 
function Dynamic_Location_OP_IE_Event_Y ( Of_Event ) {
   return Of_Event.y + document.body.scrollTop;
}; 
function Dynamic_Location_OP_IE_Event_Left_Button ( Of_Event ) {
   return Of_Event.button == 1;
}; 
function Dynamic_Location_OP_IE_Event_Right_Button ( Of_Event ) {
   return Of_Event.button == 2;
}; 
function Dynamic_Location_OP_IE_Event_Middle_Button ( Of_Event ) {
   return Of_Event.button == 3;
}; 
function Dynamic_Location_OP_DOM_Scrolled_X () {
   return document.body.scrollLeft; 
}; 
function Dynamic_Location_OP_DOM_Scrolled_Y () {
   return document.body.scrollTop;
}; 
function Dynamic_Location_OP_DOM_Event_X ( Of_Event ) {
   return Of_Event.clientX + document.body.scrollLeft;
}; 
function Dynamic_Location_OP_DOM_Event_Y ( Of_Event ) {
   return Of_Event.clientY + document.body.scrollTop;
}; 
function Dynamic_Location_OP_DOM_Event_Left_Button ( Of_Event ) {
   return Of_Event.which == 1;
}; 
function Dynamic_Location_OP_DOM_Event_Right_Button ( Of_Event ) {
   return Of_Event.which == 2;
}; 
function Dynamic_Location_OP_DOM_Event_Middle_Button ( Of_Event ) {
   return Of_Event.which == 3;
}; 
function Dynamic_Location_OP_NE_Scrolled_X () {
   return window.pageXOffset;
}; 
function Dynamic_Location_OP_NE_Scrolled_Y () {
   return window.pageYOffset;
}; 
function Dynamic_Location_OP_NE_Event_X ( Of_Event ) {
   return Of_Event.pageX;
}; 
function Dynamic_Location_OP_NE_Event_Y ( Of_Event ) {
   return Of_Event.pageY;
}; 
function Dynamic_Location_OP_NE_Event_Left_Button ( Of_Event ) {
   return Of_Event.which == 1;
}; 
function Dynamic_Location_OP_NE_Event_Right_Button ( Of_Event ) {
   return Of_Event.which == 3;
}; 
function Dynamic_Location_OP_NE_Event_Middle_Button ( Of_Event ) {
   return Of_Event.which == 2;
}; 
function Dynamic_Mathematical_Moving_Layer (layer_id, in_object) {
   this.SuperClass     = Dynamic_Movable_Layer;
   this.SuperClass       (layer_id, in_object);
   this.moving         = new Object();
   this.moving.layer   = this;
   this.moving.delay   = 20;              
   this.moving.speed   = 1;               
   this.moving.running = false;
   this.moving.x         = new Object();  
   this.moving.x.layer   = this;          
   this.moving.x.target  = this.x;        
   this.moving.x.delta   =  0;            
   this.moving.y         = new Object();  
   this.moving.y.layer   = this;          
   this.moving.y.target  = this.y;        
   this.moving.y.delta   =  0;            
   this.move_straight    = Dynamic_Mathematical_Moving_OP_Move_Straight;
   this.move_to          = Dynamic_Mathematical_Moving_OP_Move_Straight;
   this.halt             = Dynamic_Mathemetical_Moving_OP_Halt;
   this.moving_next      = Dynamic_Mathematical_Moving_OP_Move_Next; 
}; 
function Dynamic_Mathematical_Moving_OP_Move_Straight ( to_x, to_y ) {
   var dx, dy, dd;
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = true;
   this.moving.x.target = to_x;
   this.moving.y.target = to_y;
   dx = to_x - this.x;
   dy = to_y - this.y;
   dd = Math.sqrt( dx * dx + dy * dy );
   if ( dd != 0 ) {
      this.moving.x.delta = this.moving.speed * dx / dd;
      this.moving.y.delta = this.moving.speed * dy / dd;
      if ( this.moving.initial_action ) this.moving.initial_action();
      this.moving_next  = Dynamic_Mathematical_Moving_OP_Move_Next; 
      this.moving.timeout = setTimeout ( this.obj + ".moving_next()", this.moving.delay );
   };
}; 
function Dynamic_Mathematical_Moving_OP_Move_Next() {
   var dx, dy;
   if ( this.moving.running ) {
      if ( Math.abs(this.x - this.moving.x.target) < Math.abs(this.moving.x.delta) ) {
         this.moving.x.delta = 0;
         dx = this.moving.x.target - this.x;
      } else dx = this.moving.x.delta;
      if ( Math.abs(this.y - this.moving.y.target) < Math.abs(this.moving.y.delta) ) {
         this.moving.y.delta = 0;
         dy = this.moving.y.target - this.y;
      } else dy = this.moving.y.delta;
      if ( (dx != 0) || (dy != 0) ) {
         this.go_by ( dx, dy );
         this.moving.timeout = setTimeout ( this.obj + ".moving_next()", this.moving.delay );
      } else {
         this.moving.running = false;
         if (this.moving.final_action) this.moving.final_action();
      };
   };
}; 
function Dynamic_Mathemetical_Moving_OP_Halt () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action )  {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = false;
}; 
function Dynamic_Mouse_Events ( layer_id ) {
   this.SuperClass = Dynamic_Location;
   this.SuperClass  ();
   this.obj = layer_id+"Dynamic_Mouse_Events";
   eval (this.obj+"=this");
   this.mouse = new Object();
   if (browser_is.NS4) {
      this.mouse.activate   = Dynamic_Mouse_NE_OP_Activate;
      this.mouse.deactivate = Dynamic_Mouse_NE_OP_Deactivate
   } else if (browser_is.MSIE4) {
      this.mouse.activate   = Dynamic_Mouse_IE_OP_Activate;
      this.mouse.deactivate = Dynamic_Mouse_IE_OP_Deactivate
   } else if (browser_is.DOM) {
      this.mouse.activate   = Dynamic_Mouse_DOM_OP_Activate;
      this.mouse.deactivate = Dynamic_Mouse_DOM_OP_Deactivate
   };
   this.mouse.is_down = false;
   this.mouse.down                = null;
   this.mouse.up                  = null;
   this.mouse.move                = null;
   this.mouse.drag                = null;
   this.mouse.new_watch           = Dynamic_Mouse_Target_Events;
   if ( ! window.top.Dynamic_Mouse_Event_Handler )
      window.top.Dynamic_Mouse_Event_Handler = new Object();
   this.mouse.handler             = window.top.Dynamic_Mouse_Event_Handler;
   this.mouse.handler.locate      = this;
   this.mouse.handler.targets     = null;
   this.mouse.handler.onmousedown = Dynamic_Mouse_OP_Event_Handler_On_Mouse_Down;
   this.mouse.handler.onmousemove = Dynamic_Mouse_OP_Event_Handler_On_Mouse_Move;
   this.mouse.handler.onmouseup   = Dynamic_Mouse_OP_Event_Handler_On_Mouse_Up;
}; 
function Dynamic_Mouse_Target_Events ( left, top, right, bottom ) {
   var me = new Object;
   me.next = this.handler.targets;
   this.handler.targets = me;
   me.mouse = this.handler.locate;
   me.top    = top;
   me.left   = left;
   me.bottom = bottom;
   me.right  = right;
   me.state_mouse_is_in   = false;
   me.state_mouse_is_down = false;
   me.is_active           = false;
   me.activate      = Dynamic_Mouse_OP_Activate_Target;
   me.deactivate    = Dynamic_Mouse_OP_Deactivate_Target;
   me.set_area      = Dynamic_Mouse_OP_Set_Target_Area;
   me.is_mouse_down = Dynamic_Mouse_OP_Is_In_Target_Down;
   me.is_mouse_in   = Dynamic_Mouse_OP_Is_In_Target;
   me.mouse_in   = null;
   me.mouse_out  = null;
   me.mouse_down = null;
   me.mouse_up   = null;
   return me;
}; 
function Dynamic_Mouse_NE_OP_Activate ( mousedown, mousemove, mouseup ) {
   var my_event = 0;
   if ( mousedown ) {
      document.onmousedown = this.handler.onmousedown;
      my_event = my_event | Event.MOUSEDOWN ;
   }
   if ( mousemove ) {
      document.onmousemove = this.handler.onmousemove;
      my_event = my_event | Event.MOUSEMOVE ;
   }
   if ( mouseup ) {
      document.onmouseup   = this.handler.onmouseup;
      my_event = my_event | Event.MOUSEUP ;
   }
   document.captureEvents( my_event )
}; 
function Dynamic_Mouse_NE_OP_Deactivate ( mousedown, mousemove, mouseup ) {
   var my_event = 0;
   if ( mousedown ) {
      document.onmousedown = null;
      my_event = my_event | Event.MOUSEDOWN ;
   }
   if ( mousemove ) {
      document.onmousemove = null;
      my_event = my_event | Event.MOUSEMOVE ;
   }
   if ( mouseup ) {
      document.onmouseup   = null;
      my_event = my_event | Event.MOUSEUP ;
   }
}; 
function Dynamic_Mouse_IE_OP_Activate ( mousedown, mousemove, mouseup ) {
   if ( mousedown ) document.onmousedown = this.handler.onmousedown;
   if ( mousemove ) document.onmousemove = this.handler.onmousemove;
   if ( mouseup )   document.onmouseup   = this.handler.onmouseup;
}; 
function Dynamic_Mouse_IE_OP_Deactivate ( mousedown, mousemove, mouseup ) {
   if ( mousedown ) document.onmousedown = null;
   if ( mousemove ) document.onmousemove = null;
   if ( mouseup )   document.onmouseup   = null;
}; 
function Dynamic_Mouse_DOM_OP_Activate ( mousedown, mousemove, mouseup ) {
   if ( mousedown ) document.addEventListener ( 'mousedown', this.handler.onmousedown, true );
   if ( mousemove ) document.addEventListener ( 'mousemove', this.handler.onmousemove, true );
   if ( mouseup )   document.addEventListener ( 'mouseup',   this.handler.onmouseup,   true );
}; 
function Dynamic_Mouse_DOM_OP_Deactivate ( mousedown, mousemove, mouseup ) {
   if ( mousedown ) document.addEventListener ( 'mousedown', this.handler.onmousedown, false );
   if ( mousemove ) document.addEventListener ( 'mousemove', this.handler.onmousemove, false );
   if ( mouseup )   document.addEventListener ( 'mouseup',   this.handler.onmouseup,   false );
}; 
function Dynamic_Mouse_OP_Event_Handler_On_Mouse_Down ( Of_Event ) {
   var me          = window.top.Dynamic_Mouse_Event_Handler;
   var target      = me.targets;
   var forward     = true;
   var not_acepted = true;
   var x;
   var y;
   if ( ! me.locate.event.left(Of_Event) ) return forward;
   me.locate.mouse.is_down = true;
   x = me.locate.event.x ( Of_Event );
   y = me.locate.event.y ( Of_Event );
   if ( me.locate.mouse.down ) forward = me.locate.mouse.down ( x, y );
   while ( target ) {
      if ( target.is_active ) {
         if ( not_acepted           &&
              ( target.top    < y ) &&
              ( target.left   < x ) &&
              ( target.bottom > y ) &&
              ( target.right  > x )    )
         {
            not_acepted = false;
            if ( ! target.state_mouse_is_in ) if ( target.mouse_in ) target.mouse_in ( x, y );
            if ( ! target.state_mouse_is_down ) if ( target.mouse_down ) target.mouse_down ( x, y );
         } else {
            if ( target.state_mouse_is_in ) if ( target.mouse_out ) target.mouse_out ( x, y );
         };
      };
      target = target.next;
   };
   return forward;
}; 
function Dynamic_Mouse_OP_Event_Handler_On_Mouse_Move ( Of_Event ) {
   var me          = window.top.Dynamic_Mouse_Event_Handler.locate;
   var target      = window.top.Dynamic_Mouse_Event_Handler.targets
   var forward     = true;
   var not_acepted = true;
   var x;
   var y;
   x = me.event.x ( Of_Event );
   y = me.event.y ( Of_Event );
   if ( me.mouse.drag && me.mouse.is_down ) forward = me.mouse.drag ( x, y );
   if ( me.mouse.move )                     forward = forward || me.mouse.move ( x, y );
   while ( target ) {
      if ( target.is_active ) {
         if ( target.state_mouse_is_down && target.mouse_drag ) target.mouse_drag;
         if ( not_acepted           &&
              ( target.top    < y ) &&
              ( target.left   < x ) &&
              ( target.bottom > y ) &&
              ( target.right  > x )    )
         {
            not_acepted = false;
            if ( ! target.state_mouse_is_in && target.mouse_in ) target.mouse_in ( x, y );
            target.state_mouse_is_in = true;
         } else {
            if ( target.state_mouse_is_in ) if ( target.mouse_out ) target.mouse_out ( x, y );
            target.state_mouse_is_in = false;
         };
      };
      target = target.next;
   };
   return forward;
}; 
function Dynamic_Mouse_OP_Event_Handler_On_Mouse_Up ( Of_Event ) {
   var me      = window.top.Dynamic_Mouse_Event_Handler;
   var target  = me.targets;
   var forward = true;
   var x;
   var y;
   if ( ! me.locate.event.left(Of_Event) ) return forward;
   me.locate.mouse.is_down = false;
   x = me.locate.event.x ( Of_Event );
   y = me.locate.event.y ( Of_Event );
   if ( me.locate.mouse.up ) forward = me.locate.mouse.up ( x, y );
   while ( target ) {
      if ( target.state_mouse_is_down ) {
         if ( target.is_active ) {
            if ( target.mouse_up ) target.mouse_up ( x, y );
         };
      };
      target = target.next;
   };
   return forward;
}; 
function Dynamic_Mouse_OP_Activate_Target () {
   this.is_active = true;
}; 
function Dynamic_Mouse_OP_Deactivate_Target () {
   this.is_active = false;
}; 
function Dynamic_Mouse_OP_Set_Target_Area ( left, top, right, bottom ) {
   this.top    = top;
   this.left   = left;
   this.bottom = bottom;
   this.right  = right;
}; 
function Dynamic_Mouse_OP_Is_In_Target_Down () {
   return this.state_mouse_is_down;
}; 
function Dynamic_Mouse_OP_Is_In_Target () {
   return this.state_mouse_is_in && this.is_active;
}; 
function Dynamic_Movable_Layer (layer_id, in_object ) {
   this.SuperClass = Dynamic_Layer;
   this.SuperClass   ( layer_id, in_object );
   if (browser_is.NS4) {
      this.go_to = Dynamic_Layer_OP_NS_GoTo;
      this.x     = this.layer.left;
      this.y     = this.layer.top;
      this.w     = this.layer.clip.width;
      this.h     = this.layer.clip.height;
   } else if (browser_is.MSIE4) {
      this.go_to = Dynamic_Layer_OP_IE_GoTo;
      this.x     = this.layer.offsetLeft;
      this.y     = this.layer.offsetTop;
      this.w     = this.layer.offsetWidth;
      this.h     = this.layer.offsetHeight;
   } else if (browser_is.DOM) {
      this.go_to = Dynamic_Layer_OP_DOM_GoTo;
      this.x     = this.layer.offsetLeft;
      this.y     = this.layer.offsetTop;
      this.w     = this.layer.offsetWidth;
      this.h     = this.layer.offsetHeight;
   };
   this.layer_id = layer_id;
   this.go_by    = Dynamic_Layer_OP_GoBy;
}; 
function Dynamic_Layer_OP_IE_GoTo(x,y) {
   if (typeof x == "number" ) {
      this.x = x;
      this.layer.style.pixelLeft = this.x;
   }
   if ( typeof y == "number" ) {
      this.y = y;
      this.layer.style.pixelTop = this.y;
   }
}; 
function Dynamic_Layer_OP_DOM_GoTo(x,y) {
   if (typeof x == "number" ) {
      this.x = x;
      this.layer.style.left = this.x + 'px';
   }
   if ( typeof y == "number" ) {
      this.y = y;
      this.layer.style.top = this.y + 'px';
   }
}; 
function Dynamic_Layer_OP_NS_GoTo(x,y) {
   if ( typeof x == "number" ) {
      this.x = x;
      this.layer.left = x;
   };
   if ( typeof y == "number" ) {
      this.y = y;
      this.layer.top = y;
   };
}; 
function Dynamic_Layer_OP_GoBy (x,y) {
   this.go_to ( this.x+x, this.y+y );
}; 
function Dynamic_Layer_OP_GoBy_X(x) {
   this.go_to ( this.x+x, null );
}; 
function Dynamic_Layer_OP_GoBy_Y (y) {
   this.go_to ( null, this.y+y );
}; 
function Dynamic_Go_In_Out_Layer ( layer_id, in_object, in_x, in_y, out_x, out_y ) {
   this.SuperClass        = Dynamic_Movable_Layer;
   this.SuperClass          (layer_id, in_object);
   this.in_out            = new Object;   
   this.in_out.in_x       = in_x;         
   this.in_out.in_y       = in_y;         
   this.in_out.out_x      = out_x;        
   this.in_out.out_y      = out_y;        
   this.in_out.at_in      = false;        
   this.move_in           = Dynamic_In_Out_Layer_OP_Go_To_In;
   this.move_out          = Dynamic_In_Out_Layer_OP_Go_To_Out;
   this.toggle            = Dynamic_In_Out_Layer_OP_Toggle;
   this.is_in             = Dynamic_In_Out_Layer_OP_Is_In;
   this.is_out            = Dynamic_In_Out_Layer_OP_Is_Out;
   this.parameter         = Dynamic_In_Out_Layer_OP_Parameter;
}; 
function Dynamic_Move_In_Out_Layer ( layer_id, in_object, in_x, in_y, out_x, out_y ) {
   this.SuperClass        = Dynamic_Rubber_Moving_Layer;
   this.SuperClass          (layer_id, in_object);
   this.in_out            = new Object;   
   this.in_out.in_x       = in_x;         
   this.in_out.in_y       = in_y;         
   this.in_out.out_x      = out_x;        
   this.in_out.out_y      = out_y;        
   this.in_out.at_in      = false;        
   this.moving.time       = 0;            
   this.moving.timemax    = 10000;        
   this.moving.delay      = 40;           
   this.moving.epsilon    = 0.1;          
   this.moving.x.init     = out_x;        
   this.moving.x.center   = out_x;        
   this.moving.x.rubber   = 0.02;         
   this.moving.x.damp     = 0.80;         
   this.moving.y.init     = out_y;
   this.moving.y.center   = out_y;
   this.moving.y.rubber   = 0.02;
   this.moving.y.damp     = 0.80;
   this.move_in           = Dynamic_In_Out_Layer_OP_To_In;
   this.move_out          = Dynamic_In_Out_Layer_OP_To_Out;
   this.toggle            = Dynamic_In_Out_Layer_OP_Toggle;
   this.is_in             = Dynamic_In_Out_Layer_OP_Is_In;
   this.is_out            = Dynamic_In_Out_Layer_OP_Is_Out;
   this.parameter         = Dynamic_In_Out_Layer_OP_Parameter;
   this.go_to ( this.in_out.out_x, this.in_out.out_y );
   this.move();
}; 
function Dynamic_Following_Move_In_Out_XY_Layer ( layer_id, in_object, in_x, in_y, out_x, out_y, xoffset, yoffset ) {
   this.SuperClass        = Dynamic_Following_Y_Layer;
   this.SuperClass          (layer_id, in_object, xoffset, yoffset );
   this.in_out            = new Object;   
   this.in_out.in_x       = in_x;         
   this.in_out.in_y       = in_y;         
   this.in_out.out_x      = out_x;        
   this.in_out.out_y      = out_y;        
   this.in_out.at_in      = false;        
   this.moving.time       = 0;            
   this.moving.timemax    = 10000;        
   this.moving.delay      = 40;           
   this.moving.epsilon    = 0.1;          
   this.moving.x.init     = out_x;        
   this.moving.x.center   = out_x;        
   this.moving.x.rubber   = 0.02;         
   this.moving.x.damp     = 0.80;         
   this.moving.y.init     = out_y;
   this.moving.y.center   = out_y;
   this.moving.y.rubber   = 0.02;
   this.moving.y.damp     = 0.80;
   this.move_in           = Dynamic_In_Out_Layer_OP_To_In;
   this.move_out          = Dynamic_In_Out_Layer_OP_To_Out;
   this.toggle            = Dynamic_In_Out_Layer_OP_Toggle;
   this.is_in             = Dynamic_In_Out_Layer_OP_Is_In;
   this.is_out            = Dynamic_In_Out_Layer_OP_Is_Out;
   this.parameter         = Dynamic_In_Out_Layer_OP_Parameter;
   this.go_to ( this.in_out.out_x, this.in_out.out_y );
   this.move();
}; 
function Dynamic_Following_Move_In_Out_Layer ( layer_id, in_object, in_x, out_x, xoffset, yoffset ) {
   this.SuperClass        = Dynamic_Following_Move_In_Out_XY_Layer;
   this.SuperClass          (layer_id, in_object, in_x, yoffset, out_x, yoffset, xoffset, yoffset );
}; 
function Dynamic_In_Out_Layer_OP_Parameter ( in_x, in_y, out_x, out_y ) {
   if ( in_x  != null) this.in_out.in_x  = in_x;
   if ( in_y  != null) this.in_out.in_y  = in_y;
   if ( out_x != null) this.in_out.out_x = out_x;
   if ( out_y != null) this.in_out.out_y = out_y;
   if ( this.in_out.at_in ) this.move_in(); else this.move_out();
}; 
function Dynamic_In_Out_Layer_OP_Go_To_In () {
   if ( Dynamic_In_Out_Layer_OP_Go_To_In.arguments.length == 0 ) {
      this.go_to ( this.in_out.in_x, this.in_out.in_y );
   } else if ( Dynamic_In_Out_Layer_OP_Go_To_In.arguments.length == 2 ) {
      this.go_to ( Dynamic_In_Out_Layer_OP_Go_To_In.arguments[0],
                   Dynamic_In_Out_Layer_OP_Go_To_In.arguments[1] );
   } else alert ( "Dynamic_In_Out_Layer_OP_Go_To_In called with " +
                  Dynamic_In_Out_Layer_OP_Go_To_In.arguments.length +
                  " but 0 or 2 arguments expected."             );
   this.in_out.at_in = true;
   this.show();
}; 
function Dynamic_In_Out_Layer_OP_To_In () {
   if ( Dynamic_In_Out_Layer_OP_To_In.arguments.length == 0 ) {
      this.moving.x.center = this.in_out.in_x;
      if ( this.in_out.in_y != null ) this.moving.y.center = this.in_out.in_y;
   } else if ( Dynamic_In_Out_Layer_OP_To_In.arguments.length == 2 ) {
      this.moving.x.center = Dynamic_In_Out_Layer_OP_To_In.arguments[0];
      this.moving.y.center = Dynamic_In_Out_Layer_OP_To_In.arguments[1];
   } else alert ( "Dynamic_In_Out_Layer_OP_To_In called with " +
                  Dynamic_In_Out_Layer_OP_To_In.arguments.length +
                  " but 0 or 2 arguments expected."             );
   this.in_out.at_in = true;
   this.show();
   this.run();
}; 
function Dynamic_In_Out_Layer_OP_Go_To_Out () {
   if ( Dynamic_In_Out_Layer_OP_Go_To_Out.arguments.length == 0 ) {
      this.go_to ( this.in_out.out_x, this.in_out.out_y );
   } else if ( Dynamic_In_Out_Layer_OP_Go_To_Out.arguments.length == 2 ) {
      this.go_to ( Dynamic_In_Out_Layer_OP_Go_To_Out.arguments[0],
                   Dynamic_In_Out_Layer_OP_Go_To_Out.arguments[1] );
   } else alert ( "Dynamic_In_Out_Layer_OP_Go_To_Out called with " +
                  Dynamic_In_Out_Layer_OP_Go_To_Out.arguments.length +
                  " but 0 or 2 arguments expected."             );
   this.in_out.at_in = false;
   this.show();
}; 
function Dynamic_In_Out_Layer_OP_To_Out () {
   if ( Dynamic_In_Out_Layer_OP_To_Out.arguments.length == 0 ) {
      this.moving.x.center = this.in_out.out_x;
      if ( this.in_out.out_y != null ) this.moving.y.center = this.in_out.out_y;
   } else if ( Dynamic_In_Out_Layer_OP_To_Out.arguments.length == 2 ) {
      this.moving.x.center = Dynamic_In_Out_Layer_OP_To_Out.arguments[0];
      this.moving.y.center = Dynamic_In_Out_Layer_OP_To_Out.arguments[1];
   } else alert ( "Dynamic_In_Out_Layer_OP_To_Out called with " +
                  Dynamic_In_Out_Layer_OP_To_Out.arguments.length +
                  " but 0 or 2 arguments expected."             );
   this.in_out.at_in = false;
   this.show();
   this.run();
}; 
function Dynamic_In_Out_Layer_OP_Toggle () {
   if ( this.is_in() ) this.move_out()
   else this.move_in();
}; 
function Dynamic_In_Out_Layer_OP_Is_In () {
   return ( this.in_out.at_in );
}; 
function Dynamic_In_Out_Layer_OP_Is_Out () {
   return ( ! this.in_out.at_in );
}; 
function Dynamic_On_Off_Input ( field_layer, button_layer, button_name,
                                img_on_container, img_off_container     ) {
   this.button   = new Dynamic_On_Off_Button ( button_layer, button_name,
                                               img_on_container, img_off_container );
   this.field    = field_layer;
   this.query    = 'Please insert/change the text';
   this.text     = '';
   this.get      = Dynamic_On_Off_Input_OP_Get;
   this.on       = Dynamic_On_Off_Input_OP_Enable;
   this.off      = Dynamic_On_Off_Input_OP_Disable;
   this.toggle   = Dynamic_On_Off_Input_OP_Toggle;
   this.button.deactivate();
} 
function Dynamic_On_Off_Input_With_Stack ( field_layer, button_layer, button_name,
                                           img_on_container, img_off_container     ) {
   this.SuperClass = Dynamic_On_Off_Input;
   this.SuperClass(field_layer, button_layer, button_name, img_on_container, img_off_container);
   this.on_stack = new Array();
   this.tx_stack = new Array();
   this.last     = 0;
   this.push     = Dynamic_On_Off_Input_OP_Push;
   this.pop      = Dynamic_On_Off_Input_OP_Pop;
} 
function Dynamic_On_Off_Input_OP_Get () {
   var i_got = prompt (this.query, this.text);
   if ( i_got == null ) return;
   if ( i_got != '') this.button.activate();
   if ( this.button.is_on ) {
      if ( this.text != i_got ) {
         if (this.do_on_change) this.do_on_change(i_got);
         this.text = i_got;
         this.button.on();
         if (this.text == '') {
            this.field.write('&nbsp;');
            this.button.deactivate();
         } else if (this.class_active) this.field.write('<p class="' + this.class_active + '">' + this.text);
         else this.field.write ('<font color="red">' + this.text + '</font>');
      };
   } else {
      if (this.do_on_change) this.do_on_change('');
      this.text = i_got;
      this.button.off();
      if (this.text == '') {
         this.field.write('&nbsp;');
         this.button.deactivate();
      } else if (this.class_inactive) this.field.write('<p class="' + this.class_inactive + '">' + this.text);
      else this.field.write (this.text);
   };
} 
function Dynamic_On_Off_Input_OP_Enable () {
   if (this.do_on_change) this.do_on_change(this.text);
   this.button.on();
   if (this.text == '') {
      this.field.write('&nbsp;');
      this.button.deactivate();
   } else if (this.class_active) this.field.write('<p class="' + this.class_active + '">' + this.text);
   else this.field.write ('<font color="red">' + this.text + '</font>');
} 
function Dynamic_On_Off_Input_OP_Disable () {
   if (this.do_on_change) this.do_on_change('');
   this.button.off();
   if (this.text == '') {
      this.field.write('&nbsp;');
      this.button.deactivate();
   } else if (this.class_inactive) this.field.write('<p class="' + this.class_inactive + '">' + this.text);
   else this.field.write (this.text);
} 
function Dynamic_On_Off_Input_OP_Toggle () {
   if (this.button.is_active) {
      if (this.button.is_on) this.off();
      else this.on();
   };
} 
function Dynamic_On_Off_Input_OP_Push ( ) {
   this.tx_stack[this.last] = this.text;
   this.on_stack[this.last] = this.button.is_on;
   this.last++;
} 
function Dynamic_On_Off_Input_OP_Pop ( ) {
   if (this.last < 1 ) return;
   this.last--;
   this.text = this.tx_stack[this.last];
   if (this.on_stack[this.last]) { 
      this.button.on();
      if (this.text == '') {
         this.field.write('&nbsp;');
         this.button.deactivate();
      } else {
         this.button.activate();
         if (this.class_active) this.field.write('<p class="' + this.class_active + '">' + this.text);
         else this.field.write ('<font color="red">' + this.text + '</font>');
      };
   } else {
      this.button.off();
      if (this.text == '') {
         this.field.write('&nbsp;');
         this.button.deactivate();
      } else {
         this.button.activate();
         if (this.class_inactive) this.field.write('<p class="' + this.class_inactive + '">' + this.text);
         else this.field.write (this.text);
      };
   };
} 
function Dynamic_Opening_Window (layer_id, in_object, x_max, y_max) {
   this.SuperClass              = Dynamic_Visiblity_Layer;
   this.SuperClass                (layer_id, in_object);
   this.opening                 = new Object;
   this.opening.layer           = this;
   this.opening.opened          = new Object;
   this.opening.opened.top      = 0;
   this.opening.opened.left     = 0;
   this.opening.opened.bottom   = 0;
   this.opening.opened.right    = 0;
   this.opening.closed          = new Object;
   this.opening.closed.top      = 0;
   this.opening.closed.left     = 0;
   this.opening.closed.bottom   = 0;
   this.opening.closed.right    = 0;
   this.opening.is_opening      = false;
   this.opening.open            = Dynamic_Opening_Window_OP_Open;
   this.opening.close           = Dynamic_Opening_Window_OP_Close;
   this.opening.toggle          = Dynamic_Opening_Window_OP_Clippling_Toggle;
   this.opening.sequence        = null;
   this.opening.centered        = Dynamic_Opening_Window_OP_Centered;
   this.opening.fall_down       = Dynamic_Opening_Window_OP_Falldown;
   this.opening.curtain         = Dynamic_Opening_Window_OP_Curtain;
   this.opening.uprise          = Dynamic_Opening_Window_OP_Uprise;
   this.opening.topleft         = Dynamic_Opening_Window_OP_Topleft;
   this.opening.topright        = Dynamic_Opening_Window_OP_Topright;
   this.opening.bottomleft      = Dynamic_Opening_Window_OP_Bottomleft;
   this.opening.bottomright     = Dynamic_Opening_Window_OP_Bottomright;
   this.opening.rightleft       = Dynamic_Opening_Window_OP_Rightleft;
   this.opening.leftright       = Dynamic_Opening_Window_OP_Leftright;
   this.opening.inverted        = Dynamic_Opening_Window_OP_Inverted;
   this.opening.initial_opening_action = null; 
   this.opening.final_opening_action   = null; 
   this.opening.initial_closing_action = null; 
   this.opening.final_closing_action   = null; 
}; 
function Dynamic_Opening_Window_OP_Open () {
   this.layer.clipping.final_action = null;
   this.layer.show();
   this.is_opening = true;
   this.layer.view_to ( this.opened.left,
                        this.opened.top,
                        this.opened.right,
                        this.opened.bottom
                      );
   this.layer.clipping.final_action  = this.final_opening_action;
   if ( this.initial_opening_action ) this.initial_opening_action ();
   if ( this.sequence )
      if ( this.sequence.open ) this.sequence.open();
}; 
function Dynamic_Opening_Window_OP_Close () {
   this.layer.clipping.final_action = null;
   this.is_opening = false;
   this.layer.view_to ( this.closed.left,
                        this.closed.top,
                        this.closed.right,
                        this.closed.bottom
                      );
   this.layer.clipping.final_action  = this.final_closing_action;
   if ( this.initial_closing_action ) this.initial_closing_action ();
   if ( this.sequence )
      if ( this.sequence.open ) this.sequence.open();
}; 
function Dynamic_Opening_Window_OP_Clippling_Toggle () {
  if ( this.is_opening ) this.close ()
  else this.open (); 
}; 
function Dynamic_Opening_Window_OP_Centered ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = (this.opened.top+this.opened.bottom)/2;
   this.closed.left   = (this.opened.right+this.opened.left)/2;
   this.closed.bottom = (this.opened.top+this.opened.bottom)/2;
   this.closed.right  = (this.opened.right+this.opened.left)/2;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Falldown ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.top;
   this.closed.left   = this.opened.left;
   this.closed.bottom = this.opened.top;
   this.closed.right  = this.opened.right;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Curtain ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.top;
   this.closed.left   = (this.opened.right+this.opened.left)/2;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = (this.opened.right+this.opened.left)/2;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Uprise ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.bottom;
   this.closed.left   = this.opened.left;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = this.opened.right;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Topleft ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.closed.top;
   this.closed.left   = this.closed.left;
   this.closed.bottom = this.closed.top;
   this.closed.right  = this.closed.left;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Topright ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.top;
   this.closed.left   = this.opened.right;
   this.closed.bottom = this.opened.top;
   this.closed.right  = this.opened.right;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Bottomleft ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.bottom;
   this.closed.left   = this.opened.left;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = this.opened.left;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Bottomright ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.bottom;
   this.closed.left   = this.opened.right;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = this.opened.right;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Rightleft ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.top;
   this.closed.left   = this.opened.right;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = this.opened.right;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Leftright ( left, top, right, bottom ) {
   if  ( bottom != null ) {
      this.opened.top    = top;
      this.opened.left   = left;
      this.opened.bottom = bottom;
      this.opened.right  = right;
   };
   this.closed.top    = this.opened.top;
   this.closed.left   = this.opened.left;
   this.closed.bottom = this.opened.bottom;
   this.closed.right  = this.opened.left;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Opening_Window_OP_Inverted () {
   var temp;
   temp                = this.closed.top;
   this.closed.top     = this.opened.top;
   this.opened.top     = temp;
   temp                = this.closed.left;
   this.closed.left    = this.opened.left;
   this.opened.left    = temp;
   temp                = this.closed.bottom;
   this.closed.bottom  = this.opened.bottom;
   this.opened.bottom  = temp;
   temp                = this.closed.right;
   this.closed.right   = this.opened.right;
   this.opened.right   = temp;
   this.layer.clip ( this.closed.left,
                     this.closed.top,
                     this.closed.right,
                     this.closed.bottom
                   );
}; 
function Dynamic_Physical_Moving_Layer (layer_id, in_object) {
   this.SuperClass     = Dynamic_Movable_Layer;
   this.SuperClass       (layer_id, in_object);
   this.moving         = new Object();
   this.moving.layer   = this;
   this.moving.time    = 0;             
   this.moving.timemax = 600;           
   this.moving.delay   = 20;            
   this.moving.x         = new Object();  
   this.moving.x.layer   = this;          
   this.moving.x.init    = 50;            
   this.moving.x.v0      = 1;             
   this.moving.x.acc0    = 0;             
   this.moving.x.damp    = 1;             
   this.moving.x.lost    = 0.9;           
   this.moving.x.rand    = 0;             
   this.moving.x.reflect = 0;             
   this.moving.x.max     = 600;           
   this.moving.x.min     = 0;             
   this.moving.x.move    = Dynamic_Physical_Moving_OP_Move_Component;
   this.moving.y         = new Object();  
   this.moving.y.layer   = this;          
   this.moving.y.init    = 50;
   this.moving.y.v0      = 2;
   this.moving.y.acc0    = 0.4;
   this.moving.y.damp    = 1;
   this.moving.y.lost    = 0.9;
   this.moving.y.rand    = 0;
   this.moving.y.reflect = 0;
   this.moving.y.max     = 350;
   this.moving.y.min     = 0; 
   this.moving.y.move    = Dynamic_Physical_Moving_OP_Move_Component;
   this.move           = Dynamic_Physical_Moving_OP_Move;
   this.halt           = Dynamic_Physical_Moving_OP_Halt;
   this.pause          = Dynamic_Physical_Moving_OP_Pause;
   this.run            = Dynamic_Physical_Moving_OP_Run;
   this.toggle         = Dynamic_Physical_Moving_OP_Toggle;
   this.moving_next    = Dynamic_Physical_Moving_OP_Move_Next; 
}; 
function Dynamic_Physical_Moving_OP_Move () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = true;
   this.moving.paused  = false;
   this.moving.time    = 0;
   this.moving.x.v     = this.moving.x.v0;
   this.moving.x.acc   = this.moving.x.acc0;
   this.moving.y.v     = this.moving.y.v0;
   this.moving.y.acc   = this.moving.y.acc0;
   this.moving_next    = Dynamic_Physical_Moving_OP_Move_Next;
   this.go_to ( this.moving.x.init, this.moving.y.init );
   if ( this.moving.initial_action ) this.moving.initial_action();
   this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
}; 
function Dynamic_Physical_Moving_OP_Halt () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action )  {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = false;
}; 
function Dynamic_Physical_Moving_OP_Move_Component ( Actual ) {
   var diff;
   if ( Actual + this.v < this.min ) {
      diff  = 2.0 * (this.min - Actual) - this.v;
      this.v = -this.v * this.lost;
      if ( this.Mirror_Min ) diff = this.Mirror_Min ( Actual, diff );
   } else if ( Actual + this.v > this.max ) {
      diff  = 2.0 * (this.max - Actual) - this.v;
      this.v = -this.v * this.lost;
      if ( this.Mirror_Max ) diff = this.Mirror_Max ( Actual, diff );
   } else {
      diff = this.v;
   };
   this.v = this.v * this.damp + this.acc + ( 2.0 * Math.random() - 1.0 ) * this.rand;
   return diff;
}; 
function Dynamic_Physical_Moving_OP_Move_Next() {
   if ( (this.moving.time > this.moving.timemax) | (!this.moving.running) ) {
      if ( this.moving.running && this.moving.final_action ) {
         this.moving.running = false;
         this.moving.final_action();
      };
   } else {
      this.moving.time = this.moving.time + 1;
      this.go_by ( this.moving.x.move ( this.x ),
                     this.moving.y.move ( this.y )
                   );
      if ( ! this.moving.paused )
         this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   };
}; 
function Dynamic_Physical_Moving_OP_Pause () {
   this.moving.paused = true;
}; 
function Dynamic_Physical_Moving_OP_Run () {
   if ( this.moving.running & (this.moving.time < this.moving.timemax) ) {
      this.moving.paused = false;
      if ( this.moving.timeout )
         this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   };
}; 
function Dynamic_Physical_Moving_OP_Toggle () {
   if ( this.moving.paused ) this.run();
   else                      this.pause();
}; 
var __pop_tick = "'";
function popup_info ( head ) {
   var n = window.open ( '', 'Info',
                         "status=no,scrollbars=yes,height=250,width=250" );
   n.focus();
   n.document.write ( '<HEAD><TITLE>Hinweis</TITLE></HEAD>' );
   if ( n.opener.document.bgColor )
      n.document.write ( '<BODY BGCOLOR=' + n.opener.document.bgColor + '>' )
   else
      n.document.write ( '<BODY>' );
   if ( n.opener.use_font_for_popup_info )
        var font = n.opener.use_font_for_popup_info
   else var font = '';
   if ( popup_info.arguments.length > 1 )
      n.document.write ( '<P><B><CENTER><FONT ' + font + '>' + head +
                         '</FONT></CENTER></B></P>' )
   else
      n.document.write ( '<P><FONT ' + font + '>' + head + '</FONT></P>' );
   for ( var i=1; i<popup_info.arguments.length; i++ )
      n.document.write ( '<P><FONT ' + font + '>' +
                          popup_info.arguments[i]  +
                         '</FONT></P>'
                       );
   n.document.write ( '<P><FONT ' + font +
                      '><a href="javascript:window.close();">' +
                      'fertig: Fenster schliessen</A></FONT><P>'
                    );
   n.document.close();
} 
function popup_info_url ( url ) {
   var n = window.open ( url, 'Info',
                         "status=no,scrollbars=yes,height=250,width=250" );
} 
function popup_image ( url, name, parameter ) {
   var n = window.open ( '', name, 
                         "status=no,scrollbars=yes," + parameter );
   n.document.write ( '<P><CENTER><IMG SRC="' + url + '" BORDER=0><BR>' );
   n.document.write ( '<a href="javascript:window.close();">fertig: Fenster schliessen</A></CENTER><P>'
                    );
   n.document.close();
}; 
function Dynamic_Rubber_Moving_Layer (layer_id, in_object) {
   this.SuperClass       = Dynamic_Movable_Layer;
   this.SuperClass         (layer_id, in_object);
   this.obj              = layer_id+"Dynamic_Images";
   eval (this.obj+"=this");
   this.moving           = new Object();
   this.moving.layer     = this;
   this.moving.time      = 0;             
   this.moving.timemax   = 600;           
   this.moving.delay     = 20;            
   this.moving.epsilon   = 0;             
   this.moving.x         = new Object();  
   this.moving.x.layer   = this;          
   this.moving.x.init    = 50;            
   this.moving.x.center  = 50;            
   this.moving.x.rubber  = 1;             
   this.moving.x.damp    = 1;             
   this.moving.x.move    = Dynamic_Rubber_Moving_OP_Move_Component;
   this.moving.x.v       = 0;
   this.moving.y         = new Object();  
   this.moving.y.layer   = this;          
   this.moving.y.init    = 0;
   this.moving.y.center  = 100;
   this.moving.y.rubber  = 1;
   this.moving.y.damp    = 1;
   this.moving.y.move    = Dynamic_Rubber_Moving_OP_Move_Component;
   this.moving.y.v       = 0;
   this.move             = Dynamic_Rubber_Moving_OP_Move;
   this.halt             = Dynamic_Rubber_Moving_OP_Halt;
   this.pause            = Dynamic_Rubber_Moving_OP_Pause;
   this.run              = Dynamic_Rubber_Moving_OP_Run;
   this.toggle           = Dynamic_Rubber_Moving_OP_Toggle;
   this.move_to          = Dynamic_Rubber_Moving_OP_Move_To;
   this.moving_next      = Dynamic_Rubber_Moving_OP_Move_Next; 
}; 
function Dynamic_Rubber_Moving_OP_Move () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.running = true;
   this.moving.paused  = false;
   this.moving.time    = 0;
   this.moving.x.v     = 0;
   this.moving.y.v     = 0;
   this.moving_next    = Dynamic_Rubber_Moving_OP_Move_Next;
   if ( this.moving.initial_action ) this.moving.initial_action();
   this.go_to ( this.moving.x.init, this.moving.y.init );
   this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
}; 
function Dynamic_Rubber_Moving_OP_Move_To ( x, y ) {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   if ( this.moving.running && this.moving.final_action ) {
      this.moving.running = false;
      this.moving.final_action();
   };
   this.moving.x.center = x;
   this.moving.y.center = y;
   this.moving.running  = true;
   this.moving.paused   = false;
   this.moving.time     = 0;
   this.moving_next     = Dynamic_Rubber_Moving_OP_Move_Next;
   if ( this.moving.initial_action ) this.moving.initial_action();
   this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
}; 
function Dynamic_Rubber_Moving_OP_Halt () {
   if ( this.moving.timeout ) clearTimeout ( this.moving.timeout );
   this.go_to ( this.moving.x.center,
                this.moving.y.center
              );
   if ( this.moving.running && this.moving.final_action )  {
      this.moving.running = false;
      this.moving.final_action();
   } else
      this.moving.running = false;
}; 
function Dynamic_Rubber_Moving_OP_Move_Component ( Actual ) {
   var diff;
   diff = this.v;
   this.v = this.v * this.damp + this.rubber * ( this.center - Actual - this.v );
   return diff;
}; 
function Dynamic_Rubber_Moving_OP_Move_Next() {
   if ( (this.moving.time > this.moving.timemax) | (!this.moving.running) ) {
      if ( this.moving.running && this.moving.final_action )
         this.moving.final_action();
      this.moving.running = false;
   } else if ( ( this.moving.epsilon == 0                        )                        ||
               ( Math.abs(this.x - this.moving.x.center) > 0.1   )                        ||
               ( Math.abs(this.y - this.moving.y.center) > 0.1   )                        ||
               ( Math.abs(this.moving.x.v) > this.moving.epsilon * this.moving.x.rubber ) ||
               ( Math.abs(this.moving.y.v) > this.moving.epsilon * this.moving.y.rubber )    ) {
         this.moving.time = this.moving.time + 1;
         this.go_by ( this.moving.x.move ( this.x ),
                      this.moving.y.move ( this.y )
                    );
         if ( ! this.moving.paused )
            this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   } else {
      this.pause();
   };
}; 
function Dynamic_Rubber_Moving_OP_Pause() {
   this.moving.paused = true;
}; 
function Dynamic_Rubber_Moving_OP_Run () {
   if ( this.moving.running & (this.moving.time < this.moving.timemax) ) {
      this.moving.paused = false;
      if ( this.moving.timeout )
         this.moving.timeout = setTimeout ( this.obj+".moving_next()", this.moving.delay );
   };
}; 
function Dynamic_Rubber_Moving_OP_Toggle () {
   if ( this.moving.paused ) this.run;
   else                      this.pause;
}; 
function Dynamic_Scaling_Image (layer_id, in_object, width, height, image ) {
   this.SuperClass                   = Dynamic_Movable_Layer;
   this.SuperClass                     (layer_id, in_object);
   this.scaling                      = new Object;
   this.scaling.layer                = this;
   this.scaling.images               = new Array (Dynamic_Scaling_Image.arguments.length-4);
   for ( var i=4; i<Dynamic_Scaling_Image.arguments.length; i++ ) {
      this.scaling.images[i-4]       = Dynamic_Scaling_Image.arguments[i];
   };
   this.scaling.at_upper             = new Object;
   this.scaling.at_upper.width       = width;
   this.scaling.at_upper.height      = height;
   this.scaling.at_upper.left        = 0;
   this.scaling.at_upper.top         = 0;
   this.scaling.at_lower             = new Object;
   this.scaling.at_lower.width       = 0;
   this.scaling.at_lower.height      = 0;
   this.scaling.at_lower.left        = 0;
   this.scaling.at_lower.top         = 0;
   this.scaling.is_scaling_up        = true;
   this.scaling.attributes           = '';
   this.scaling.speed                = 8;
   this.scaling.delay                = 50;
   this.scaling.actual               = new Object;
   this.scaling.actual.width         = width;
   this.scaling.actual.height        = height;
   this.scaling.actual.speed_x       = 5.66;
   this.scaling.actual.speed_y       = 5.66;
   this.scaling.actual.running       = false;
   this.scaling.actual.timeout       = null;
   this.scaling.actual.on_click      = null;
   this.scaling.actual.on_mouse_over = null;
   this.scaling.actual.on_mouse_out  = null;
   this.scaling.actual.image         = image;
   this.scaling.actual.image_index   = 0;
   this.scaling.upper                = Dynamic_Scaling_OP_Upper;
   this.scaling.lower                = Dynamic_Scaling_OP_Lower;
   this.scaling.up                   = Dynamic_Scaling_OP_Up;
   this.scaling.down                 = Dynamic_Scaling_OP_Down;
   this.scaling.toggle               = Dynamic_Scaling_OP_Toggle;
   this.scaling.reshow               = Dynamic_Scaling_OP_Reshow;
   this.scaling.next_image           = Dynamic_Scaling_OP_Next_Image;
   this.scaling.prev_image           = Dynamic_Scaling_OP_Prev_Image;
   this.scaling.first_image          = Dynamic_Scaling_OP_First_Image;
   this.scaling.last_image           = Dynamic_Scaling_OP_Last_Image;
   this.scaling.on_click_toggle      = Dynamic_Scaling_OP_Toggle_On_Click;
   this.scaling.respond_on_mouse     = Dynamic_Scaling_OP_Responde_On_Mouse;
   this.scaling.on_click_next_image  = Dynamic_Scaling_OP_Next_Image_On_Click;
   this.scaling.centered             = Dynamic_Scaling_OP_Centered;
   this.scaling.fall_down            = Dynamic_Scaling_OP_Falldown;
   this.scaling.uprise               = Dynamic_Scaling_OP_Uprise;
   this.scaling.topleft              = Dynamic_Scaling_OP_Top_Left;
   this.scaling.topright             = Dynamic_Scaling_OP_Top_Right;
   this.scaling.bottomleft           = Dynamic_Scaling_OP_Bottom_Left;
   this.scaling.bottomright          = Dynamic_Scaling_OP_Bottom_Right;
   this.scaling.rightleft            = Dynamic_Scaling_OP_Right_Left;
   this.scaling.leftright            = Dynamic_Scaling_OP_Left_Right;
   this.scaling.initial_up_action    = null; 
   this.scaling.final_up_action      = null; 
   this.scaling.initial_down_action  = null; 
   this.scaling.final_down_action    = null; 
   this.scaling.scale_next           = Dynamic_Scaling_OP_Scale_Next;
   if ( browser_is.NE ) {
      this.scaling.scale             = Dynamic_Scaling_OP_Scale_NE; 
      this.scaling.activate_scaling  = Dynamic_Scaling_OP_Scale_Speed_NE;
   } else {
      this.scaling.scale             = Dynamic_Scaling_OP_Scale;
      this.scaling.activate_scaling  = Dynamic_Scaling_OP_Scale_Speed;
   };
}; 
function Dynamic_Scaling_OP_Left_Right ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left;
   this.at_lower.top    = open_top + (open_height-closed_height)/2;
   this.lower();
}; 
function Dynamic_Scaling_OP_Right_Left ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left + (open_width-closed_width);
   this.at_lower.top    = open_top + (open_height-closed_height)/2;
   this.lower();
}; 
function Dynamic_Scaling_OP_Bottom_Right ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left + (open_width-closed_width);
   this.at_lower.top    = open_top + (open_height-closed_height);
   this.lower();
}; 
function Dynamic_Scaling_OP_Bottom_Left ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left;
   this.at_lower.top    = open_top + (open_height-closed_height);
   this.lower();
}; 
function Dynamic_Scaling_OP_Uprise ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left + (open_width-closed_width)/2;
   this.at_lower.top    = open_top + (open_height-closed_height);
   this.lower();
}; 
function Dynamic_Scaling_OP_Falldown ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left + (open_width-closed_width)/2;
   this.at_lower.top    = open_top;
   this.lower();
}; 
function Dynamic_Scaling_OP_Top_Right ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left + (open_width-closed_width);
   this.at_lower.top    = open_top;
   this.lower();
}; 
function Dynamic_Scaling_OP_Top_Left ( closed_width, closed_height, open_width, open_height, open_left, open_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = open_left;
   this.at_upper.top    = open_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = open_left;
   this.at_lower.top    = open_top;
   this.lower();
}; 
function Dynamic_Scaling_OP_Centered ( closed_width, closed_height, open_width, open_height, center_left, center_top ) {
   this.at_upper.width  = open_width;
   this.at_upper.height = open_height;
   this.at_upper.left   = center_left;
   this.at_upper.top    = center_top;
   this.at_lower.width  = closed_width;
   this.at_lower.height = closed_height;
   this.at_lower.left   = center_left + (open_width-closed_width)/2;
   this.at_lower.top    = center_top + (open_height-closed_height)/2;
   this.lower();
}; 
function Dynamic_Scaling_OP_Reshow () {
      this.scale ( this.actual.width, this.actual.height,
                   Dynamic_Scaling_OP_Shift_Component ( this.at_lower.left,   this.at_upper.left,
                                                        this.at_lower.width,  this.at_upper.width,  this.actual.width ),
                   Dynamic_Scaling_OP_Shift_Component ( this.at_lower.top,    this.at_upper.top,
                                                        this.at_lower.height, this.at_upper.height, this.actual.height )
                 );
}; 
function Dynamic_Scaling_OP_Toggle_On_Click ( enable_action ) {
   if ( enable_action ) this.actual.on_click = this.layer.obj + '.scaling.toggle();'
   else this.actual.on_click = null ;
   this.reshow ();
}; 
function Dynamic_Scaling_OP_Responde_On_Mouse ( enable_action ) {
   if ( enable_action ) {
      this.actual.on_mouse_over = this.layer.obj + '.scaling.up();';
      this.actual.on_mouse_out  = this.layer.obj + '.scaling.down();';
   } else {
      this.actual.on_mouse_over = null;
      this.actual.on_mouse_out  = null;
   };
   this.reshow ();
}; 
function Dynamic_Scaling_OP_Next_Image_On_Click ( enable_action ) {
   if ( enable_action ) this.actual.on_click = this.layer.obj + '.scaling.next_image();'
   else this.actual.on_click = null ;
   this.reshow ();
}; 
function Dynamic_Scaling_OP_Scale ( width, height, x, y ) {
   var head = middle = mouse_over = mouse_out = tail = '';
   if ( this.actual.on_mouse_over ) {
      head   = '<A HREF="#" ';
      middle = '>';
      mouse_over = 'onMouseOver="' + this.actual.on_mouse_over + '" ';
      tail   = '</A>';
   };
   if ( this.actual.on_mouse_out ) {
      head   = '<A HREF="#" ';
      middle = '>';
      mouse_out = 'onMouseOut="' + this.actual.on_mouse_out + '" ';
      tail   = '</A>';
   };
   if ( this.actual.on_click ) {
      head   = '<A HREF="javascript:' + this.actual.on_click + '" ';
      middle = '>';
      tail   = '</A>';
   };
  this.layer.write ( '<P>' + head + mouse_over + mouse_out + middle +
                     '<IMG SRC="' + this.actual.image + '" BORDER=0 WIDTH=' + width + ' HEIGHT=' + height + ' ' +
                     this.attributes + ' >' + tail + '</P>'
                   );
  this.actual.width  = width;
  this.actual.height = height;
  this.layer.go_to ( x, y );
}; 
function Dynamic_Scaling_OP_Scale_NE ( width, height, x, y ) {
  this.layer.write ( '<IMG SRC="' + this.actual.image + '" BORDER=0 WIDTH=' + width + ' HEIGHT=' + height + ' ' + this.attributes + ' >' );
  this.actual.width  = width;
  this.actual.height = height;
  this.layer.go_to ( x, y );
}; 
function Dynamic_Scaling_OP_Upper () {
   if ( this.actual.timeout ) clearTimeout ( this.actual.timeout );
   if ( this.running ) {
      if ( this.is_scaling_up ) {
         if ( this.final_up_action ) this.final_up_action();
      } else if ( this.final_down_action ) this.final_down_action();
      this.running = false;
   };
   this.is_scaling_up = true;
   this.scale ( this.at_upper.width, this.at_upper.height, this.at_upper.left, this.at_upper.top );
}; 
function Dynamic_Scaling_OP_Lower () {
   if ( this.actual.timeout ) clearTimeout ( this.actual.timeout );
   if ( this.running ) {
      if ( this.is_scaling_up ) {
         if ( this.final_up_action ) this.final_up_action();
      } else if ( this.final_down_action ) this.final_down_action();
      this.running = false;
   };
   this.is_scaling_up = false;
   this.scale ( this.at_lower.width, this.at_lower.height, this.at_lower.left, this.at_lower.top );
}; 
function Dynamic_Scaling_OP_Scale_Component ( the_final, the_actual, the_speed ) {
   var next = the_final;
   if ( the_final > the_actual ) {
      next = the_actual + the_speed;
      if ( next > the_final ) next = the_final;
   } else if ( the_final < the_actual ) {
      next = the_actual - the_speed;
      if ( next < the_final ) next = the_final;
   };
   return next;
}; 
function Dynamic_Scaling_OP_Shift_Component ( lower, upper, lower_width, upper_width, actual_width ) {
   return ( lower + (upper - lower) * (actual_width - lower_width) / (upper_width - lower_width) );
}; 
function Dynamic_Scaling_OP_Scale_Next () {
   var width, height, left, top;
   if ( this.running ) {
      if ( this.is_scaling_up ) {
         width  = Dynamic_Scaling_OP_Scale_Component ( this.at_upper.width,  this.actual.width,  this.actual.speed_x );
         height = Dynamic_Scaling_OP_Scale_Component ( this.at_upper.height, this.actual.height, this.actual.speed_y );
         left   = Dynamic_Scaling_OP_Shift_Component ( this.at_lower.left,   this.at_upper.left, this.at_lower.width,  this.at_upper.width,  width );
         top    = Dynamic_Scaling_OP_Shift_Component ( this.at_lower.top,    this.at_upper.top,  this.at_lower.height, this.at_upper.height, height );
         this.scale ( width, height, left, top );
         if ( width != this.at_upper.width || height != this.at_upper.height ) {
            this.actual.timeout = setTimeout ( this.layer.obj + ".scaling.scale_next()", this.delay );
         } else {
           this.running = false;
         };
      } else {
         width  = Dynamic_Scaling_OP_Scale_Component ( this.at_lower.width,  this.actual.width,  this.actual.speed_x );
         height = Dynamic_Scaling_OP_Scale_Component ( this.at_lower.height, this.actual.height, this.actual.speed_y );
         left   = Dynamic_Scaling_OP_Shift_Component ( this.at_lower.left,   this.at_upper.left, this.at_lower.width,  this.at_upper.width,  width );
         top    = Dynamic_Scaling_OP_Shift_Component ( this.at_lower.top,    this.at_upper.top,  this.at_lower.height, this.at_upper.height, height );
         this.scale ( width, height, left, top );
         if ( width != this.at_lower.width || height != this.at_lower.height ) {
            this.actual.timeout = setTimeout ( this.layer.obj + ".scaling.scale_next()", this.delay );
         } else {
           this.running = false;
         };
      };
   };
}; 
function Dynamic_Scaling_OP_Scale_Speed ( ) {
   dx = this.at_upper.width  - this.at_lower.width;
   dy = this.at_upper.height - this.at_lower.height;
   dd = Math.sqrt( dx * dx + dy * dy );
   if ( dd != 0 ) {
      this.actual.speed_x = this.speed * dx / dd;
      this.actual.speed_y = this.speed * dy / dd;
      return true;
   } else return false;
}; 
function Dynamic_Scaling_OP_Scale_Speed_NE ( ) {
   if ( this.at_upper.width != this.at_lower.width && this.at_upper.height != this.at_lower.height ) {
      this.actual.speed_x = (this.at_upper.width  - this.at_lower.width ) / 4;
      this.actual.speed_y = (this.at_upper.height - this.at_lower.height) / 4;
      return true;
   } else return false;
}; 
function Dynamic_Scaling_OP_Up () {
   var speed, dx, dy, dd;
   if ( this.actual.timeout ) clearTimeout ( this.actual.timeout );
   if ( this.running ) {
      if ( ! this.is_scaling_up && this.final_down_action ) this.final_down_action();
      this.running = false;
   };
   this.is_scaling_up = true;
   this.running = true;
   if ( this.activate_scaling() ) {
      if ( this.initial_up_action ) this.initial_up_action ();
      this.actual.timeout = setTimeout ( this.layer.obj + ".scaling.scale_next()", this.delay );
   };
}; 
function Dynamic_Scaling_OP_Down () {
   var dx, dy, dd;
   if ( this.actual.timeout ) clearTimeout ( this.actual.timeout );
   if ( this.running ) {
      if ( this.is_scaling_up && this.final_up_action ) this.final_up_action();
      this.running = false;
   };
   this.is_scaling_up = false;
   this.running = true;
   if ( this.activate_scaling() ) {
      if ( this.initial_down_action ) this.initial_down_action ();
      this.actual.timeout = setTimeout ( this.layer.obj + ".scaling.scale_next()", this.delay );
   };
}; 
function Dynamic_Scaling_OP_Toggle () {
   if ( this.is_scaling_up ) this.down()
   else this.up();
}; 
function Dynamic_Scaling_OP_Next_Image () {
   this.actual.image_index++;
   if ( this.actual.image_index >= this.images.length ) this.actual.image_index = 0;
   this.actual.image = this.images[this.actual.image_index];
   this.reshow ();
}; 
function Dynamic_Scaling_OP_Prev_Image () {
   if ( this.actual.image_index <= 0 ) this.actual.image_index = this.images.length-1
   else this.actual.image_index--;
   this.actual.image = this.images[this.actual.image_index];
   this.reshow ();
}; 
function Dynamic_Scaling_OP_First_Image () {
   this.actual.image_index = 0;
   this.actual.image = this.images[this.actual.image_index];
   this.reshow ();
}; 
function Dynamic_Scaling_OP_Last_Image () {
   this.actual.image_index = this.images.length-1;
   this.actual.image = this.images[this.actual.image_index];
   this.reshow ();
}; 
function Dynamic_Tree_Entry ( images_id, text_id, node_id, folder_id, level, folder_images, node_images, in_object ) {
   this.init = new Object;
   this.init.images_id     = images_id;
   this.init.text_id       = text_id;
   this.init.node_id       = node_id;
   this.init.folder_id     = folder_id;
   this.level              = level;
   this.is_folder          = node_images && folder_images;
   this.init.folder_images = folder_images;
   this.init.node_images   = node_images;
   this.init.in_object     = in_object;
   this.folder             = null;
   this.instantiate        = Dynamic_Tree_OP_Init_Entry;
   this.is_visible         = false;
   this.show_element       = true;
   this.hide               = Dynamic_Tree_OP_Hide;
   this.show               = Dynamic_Tree_OP_Show;
   this.open               = Dynamic_Tree_OP_Open;
   this.close              = Dynamic_Tree_OP_Close;
   this.toggle             = Dynamic_Tree_OP_Toggle;
   this.write              = Dynamic_Tree_OP_Write;
   this.highlight          = Dynamic_Tree_OP_Highlight_Entry;
   this.normal             = Dynamic_Tree_OP_Normal_Entry;
}; 
function Dynamic_Tree_OP_Init_Entry ( nn ) {
   if ( this.folder != null ) return;
   this.folder = new Object;
   if (browser_is.NS4) {
      if ( this.init.in_object ) {
         this.folder.images = this.init.in_object.layer.layers[this.init.images_id];
         this.folder.text   = this.init.in_object.layer.layers[this.init.text_id];
      } else {
         this.folder.images = document.layers[this.init.images_id];
         this.folder.text   = document.layers[this.init.text_id];
      };
      if ( this.folder.images ) {
         if ( this.folder.text ) {
            this.folder.text.visibility = this.folder.images.visibility;
            this.go_to                  = Dynamic_Tree_OP_NE_Goto;
            this.force_hide             = Dynamic_Tree_OP_NE_Hide;
            this.force_show             = Dynamic_Tree_OP_NE_Show;
            this.ll_write               = Dynamic_Tree_OP_NE_Write;
            this.ll_highlight           = Dynamic_Tree_OP_NE_Highlight;
            this.ll_normal              = Dynamic_Tree_OP_NE_Normal;
         } else {
            alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.images_id );
         };
      } else {
         alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.text_id );
      };
      this.folder.node_target   = this.folder.images.document.images[this.init.node_id];
      this.folder.folder_target = this.folder.images.document.images[this.init.folder_id];
   } else if (browser_is.MSIE4) {
      this.folder.images = document.all[this.init.images_id];
      this.folder.text   = document.all[this.init.text_id];
      if ( this.folder.images ) {
         if ( this.folder.text ) {
            this.folder.text.style.visibility = this.folder.images.style.visibility;
            this.go_to                        = Dynamic_Tree_OP_IE_Goto;
            this.force_hide                   = Dynamic_Tree_OP_IE_Hide;
            this.force_show                   = Dynamic_Tree_OP_IE_Show;
            this.ll_write                     = Dynamic_Tree_OP_IE_Write;
            this.ll_highlight                 = Dynamic_Tree_OP_IE_Highlight;
            this.ll_normal                    = Dynamic_Tree_OP_IE_Normal;
         } else {
            alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.images_id );
         };
      } else {
         alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.text_id );
      };
      this.folder.node_target   = this.folder.images.document.images[this.init.node_id];
      this.folder.folder_target = this.folder.images.document.images[this.init.folder_id];
   } else if (browser_is.DOM) {
      this.folder.images = document.getElementById(this.init.images_id);
      this.folder.text   = document.getElementById(this.init.text_id);
      if ( this.folder.images ) {
         if ( this.folder.text ) {
            this.folder.text.style.visibility = this.folder.images.style.visibility;
            this.go_to                        = Dynamic_Tree_OP_DOM_Goto;
            this.force_hide                   = Dynamic_Tree_OP_IE_Hide;
            this.force_show                   = Dynamic_Tree_OP_IE_Show;
            this.ll_write                     = Dynamic_Tree_OP_IE_Write;
            this.ll_highlight                 = Dynamic_Tree_OP_IE_Highlight;
            this.ll_normal                    = Dynamic_Tree_OP_IE_Normal;
         } else {
            alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.images_id );
         };
      } else {
         alert ( "ERROR in Dynamic_Tree_Entry: couldn't find layer " + this.init.text_id );
      };
      this.folder.node_target   = eval ( "document." +this.init.node_id );
      this.folder.folder_target = eval ( "document." +this.init.folder_id );
   } else {
      alert ( "ERROR in Dynamic_Tree_Entry: Unknown browser" );
   };
   this.folder.node_id    = this.init.node_id;
   this.folder.folder_id  = this.init.folder_id;
   this.folder.is_open    = true;
   this.text_offset       = 5;
   this.element_height    = 22;
   this.highlight_color   = '#7fffd4';
   this.normal_color      = 'white';
   if ( this.init.node_images && this.init.folder_images ) {
      this.folder.nodes   = this.init.node_images.container;
      this.folder.folders = this.init.folder_images.container;
   } else {
      this.folder.nodes   = null;
      this.open_node      = Dynamic_Tree_OP_Ignore;
      this.open_folder    = Dynamic_Tree_OP_Ignore;
   }
   this.folder.node_obj        = this.init.node_id+"Dynamic_Tree_Entry";
   eval (this.folder.node_obj+"=this");
   this.folder.node_folder       = this.init.folder_id+"Dynamic_Tree_Entry";
   eval (this.folder.folder_obj+"=this");
   this.force_hide ();
}; 
function Dynamic_Tree_OP_IE_Goto ( y ) {
   if (typeof y == "number" ) {
      this.folder.images.style.pixelTop = y;
      this.folder.text.style.pixelTop   = y + this.text_offset;
   }
}; 
function Dynamic_Tree_OP_DOM_Goto ( y ) {
   if (typeof y == "number" ) {
      this.folder.images.style.top = y;
      this.folder.text.style.top   = y + this.text_offset;
   }
}; 
function Dynamic_Tree_OP_NE_Goto ( y ) {
   if (typeof y == "number" ) {
      this.folder.images.top = y;
      this.folder.text.top   = y + this.text_offset;
   }
}; 
function Dynamic_Tree_OP_IE_Hide () {
   this.folder.images.style.visibility = 'hidden';
   this.folder.text.style.visibility   = 'hidden';
   this.is_visible = false;
} 
function Dynamic_Tree_OP_NE_Hide () {
   this.folder.images.visibility = 'hide';
   this.folder.text.visibility   = 'hide';
   this.is_visible = false;
} 
function Dynamic_Tree_OP_Hide () {
   if ( this.is_visible ) this.force_hide ();
} 
function Dynamic_Tree_OP_IE_Show () {
   this.folder.images.style.visibility = 'visible';
   this.folder.text.style.visibility   = 'visible';
   this.is_visible = true;
} 
function Dynamic_Tree_OP_NE_Show () {
   this.folder.images.visibility = 'show';
   this.folder.text.visibility   = 'show';
   this.is_visible = true;
} 
function Dynamic_Tree_OP_Show () {
   if ( ! this.is_visible ) {
      this.instantiate( 'Dynamic_Tree_OP_Show' );
      this.force_show ();
   };
} 
function Dynamic_Tree_OP_IE_Write ( text ) {
   this.folder.text.innerHTML = text;
} 
function Dynamic_Tree_OP_NE_Write ( text ) {
   this.folder.text.document.open();
   this.folder.text.document.write ( text );
   this.folder.text.document.close();
} 
function Dynamic_Tree_OP_Write ( text ) {
   this.instantiate('Dynamic_Tree_OP_Write');
   this.ll_write ( text );
}; 
function Dynamic_Tree_OP_IE_Highlight () {
   this.folder.text.style.backgroundColor = this.highlight_color;
} 
function Dynamic_Tree_OP_NE_Highlight () {
   this.folder.text.document.bgColor = this.highlight_color;
} 
function Dynamic_Tree_OP_Highlight_Entry () {
   this.instantiate('Dynamic_Tree_OP_Highlight_Entry');
   this.ll_highlight();
}; 
function Dynamic_Tree_OP_NE_Normal () {
   this.folder.text.document.bgColor = this.normal_color;
} 
function Dynamic_Tree_OP_IE_Normal () {
   this.folder.text.style.backgroundColor = this.normal_color;
} 
function Dynamic_Tree_OP_Normal_Entry () {
   this.instantiate('Dynamic_Tree_OP_Normal_Entry');
   this.ll_normal();
}; 
function Dynamic_Tree_OP_Open () {
   this.instantiate('Dynamic_Tree_OP_Open');
   this.folder.is_open           = true;
   if ( this.folder.node_target )
      this.folder.node_target.src = this.folder.nodes[0].src;
   this.folder.folder_target.src  = this.folder.folders[0].src;
}; 
function Dynamic_Tree_OP_Close () {
   this.instantiate('Dynamic_Tree_OP_Close');
   this.folder.is_open            = false;
   if ( this.folder.node_target )
      this.folder.node_target.src = this.folder.nodes[1].src;
   this.folder.folder_target.src  = this.folder.folders[1].src;
}; 
function Dynamic_Tree_OP_Toggle () {
   if ( this.folder.is_closed ) 
      this.open ()
   else
      this.close ()
}; 
function Dynamic_Tree_OP_Ignore () {
}; 
function Dynamic_Tree ( icon_path ) {
   if ( ! icon_path ) icon_path = '';
   this.folders            = new Dynamic_Image_Container ( icon_path + 'oa.gif',         icon_path + 'oz.gif' );
   this.nodes              = new Dynamic_Image_Container ( icon_path + 'mnode.gif',      icon_path + 'pnode.gif' );
   this.firstnodes         = new Dynamic_Image_Container ( icon_path + 'mfirstnode.gif', icon_path + 'pfirstnode.gif' );
   this.lastnodes          = new Dynamic_Image_Container ( icon_path + 'mlastnode.gif',  icon_path + 'plastnode.gif' );
   this.highlight_color    = "#7fffd4";
   this.normal_color       = "white";
   this.text_offset        = 5;
   this.element_height     = 22;
   this.width              = 200;
   this.Elements           = new Array ();
   this.Start              = 0;
   this.Length             = 5;
   this.showing_elements   = 0;
   this.top_offset         = 20;
   this.bottom_offset      = 20;
   this.tree_head_height   = 0;
   this.tree_head_pad      = 0;
   this.tree_head_color    = 'white';
   this.tree_header        = null;
   this.tree_foot_height   = 0;
   this.tree_foot_pad      = 0;
   this.tree_foot_color    = 'white';
   this.tree_footer        = null;
   this.is_showing         = false;
   this.run                = Dynamic_Tree_OP_Run;
   this.show               = Dynamic_Tree_OP_Show_Elements;
   this.open               = Dynamic_Tree_OP_Open_Folder;
   this.close              = Dynamic_Tree_OP_Close_Folder;
   this.open_all           = Dynamic_Tree_Open_All_Folders;
   this.close_all          = Dynamic_Tree_OP_Close_All_Folders;
   this.toggle             = Dynamic_Tree_OP_Toggle_Folder;
   this.new_folder         = Dynamic_Tree_OP_New_Folder;
   this.new_first_folder   = Dynamic_Tree_OP_New_First_Folder;
   this.new_last_folder    = Dynamic_Tree_OP_New_Last_Folder;
   this.new_document       = Dynamic_Tree_OP_New_Document;
   this.set_length         = Dynamic_Tree_OP_Set_Length;
   this.fit_length         = Dynamic_Tree_OP_Fit_Length;
   this.initialize         = Dynamic_Tree_OP_Fit_Length;
   this.highlight          = Dynamic_Tree_OP_Highlight;
   this.normal             = Dynamic_Tree_OP_Normal;
   this.configure_geometry = Dynamic_Tree_OP_Configure_Geometry;
   this.configure_header   = Dynamic_Tree_OP_Configure_Header;
   this.configure_footer   = Dynamic_Tree_OP_Configure_Footer;
   this.save               = Dynamic_Tree_OP_Save_Elements;
   this.restore            = Dynamic_Tree_OP_Restore_Elements;
}; 
function Dynamic_Tree_OP_Configure_Colors ( highlight_color, normal_color ) {
   this.highlight_color = highlight_color;
   if ( normal_color ) this.normal_color = normal_color;
   for ( i=0; i<this.Elements.lenght; i++ ) {
      this.Elements[i].normal_color    = this.normal_color;
      this.Elements[i].highlight_color = this.highlight_color;
   };
}; 
function Dynamic_Tree_OP_Configure_Icon_Geometry ( text_offset, element_height ) {
   this.text_offset    = text_offset;
   this.element_height = element_height;
   for ( i=0; i<this.Elements.lenght; i++ ) {
      this.Elements[i].text_offset = text_offset;
   };
}; 
function Dynamic_Tree_OP_Configure_Geometry ( width, top_offset, bottom_offset, padx, pady ) {
   this.width            = width;
   this.top_offset       = top_offset;
   if ( bottom_offset > 15 )
      this.bottom_offset = bottom_offset;
   else
      this.bottom_offset = 16;
   if ( padx != null ) this.x_border = padx;
   if ( pady != null ) this.y_border = pady;
   this.fit_length ();
   if ( this.Main ) this.Main.parameter ( this.x_border, this.y_border, this.width + this.left_offset + this.x_border, this.y_border );
}; 
function Dynamic_Tree_OP_Configure_Header ( height, padding, color ) {
   this.tree_head_height = height;
   this.tree_head_color  = color;
   this.tree_head_pad    = padding;
   this.fit_length ();
}; 
function Dynamic_Tree_OP_Configure_Footer ( height, padding, color ) {
   this.tree_foot_height = height;
   this.tree_foot_color  = color;
   this.tree_foot_pad    = padding;
   this.fit_length ();
}; 
function Dynamic_Tree_OP_Run () {
   if ( ! this.is_showing ) {
      this.is_showing = true;
      this.show ();
   };
}; 
function Dynamic_Tree_OP_Show_Elements () {
   if ( this.is_showing ) {
      var location = 0;
      this.showing_elements = 0;
      if ( this.tree_header ) {
         this.tree_header.go_to ( 1, 1 );
         this.tree_header.set_bgcolor ( this.tree_head_color );
         this.tree_header.setsize ( this.width, this.tree_head_height );
         this.tree_header.clip ( 0, 0, this.width, this.tree_head_height );
      };
      for ( i=0; i<this.Elements.length; i++ ) {
         if ( this.Elements[i].show_element ) {
            this.showing_elements++;
            if ( this.showing_elements > this.Start && this.showing_elements <= this.Start+this.Length) {
               this.Elements[i].show();
               this.Elements[i].go_to ( location );
               location += this.element_height;
            } else {
               this.Elements[i].hide();
            }
         } else {
            this.Elements[i].hide();
         }
      };
      if ( this.tree_footer ) {
         this.tree_footer.go_to ( 1, 1 + this.tree_head_height + this.tree_head_pad + this.Length * this.element_height + this.tree_foot_pad );
         this.tree_footer.set_bgcolor ( this.tree_foot_color );
         this.tree_footer.setsize ( this.width - 1, this.tree_foot_height );
         this.tree_footer.clip ( 0, 0, this.width - 1, this.tree_foot_height );
      };
   };
}; 
function Dynamic_Tree_OP_Save_Elements ( save_at ) {
   save_at.TreeSate    = new Array ();
   save_at.FolderState = new Array ();
   for ( i=0; i<this.Elements.length; i++ ) {
      save_at.TreeSate[i] = this.Elements[i].show_element;
      if ( this.Elements[i].is_folder )
         save_at.FolderState[i] = this.Elements[i].folder.is_open;
      else
         save_at.FolderState[i] = false;
   };
   save_at.TreeStart = this.Start;
}; 
function Dynamic_Tree_OP_Restore_Elements ( save_at ) {
   if ( save_at.TreeSate && save_at.FolderState ) {
      for ( i=0; i<this.Elements.length; i++ ) {
         if ( save_at.TreeSate[i] ) { 
            this.Elements[i].show_element = true
         } else {
            this.Elements[i].show_element = false
         };
         if ( save_at.FolderState[i] )
            this.Elements[i].open ();
         else
            if ( this.Elements[i].is_folder )
               this.Elements[i].close ();
      };
   };
   if ( save_at.TreeStart )
      this.Start = save_at.TreeStart;
   this.show ();
}; 
function Dynamic_Tree_OP_Open_Folder ( Index ) {
   if ( this.Elements[Index].is_folder ) {
      this.Elements[Index].open();
      var i = Index + 1;
      var level = this.Elements[Index].level;
      while ( i<this.Elements.length && (this.Elements[i].level > level) ) {
         if ( this.Elements[i].level == level + 1 )
            this.Elements[i].show_element = true;
         i++;
      };
      this.show ();
   };
}; 
function Dynamic_Tree_OP_Close_Folder ( Index ) {
   if ( this.Elements[Index].is_folder ) {
      this.Elements[Index].close();
      var i = Index + 1;
      var level = this.Elements[Index].level;
      while ( (i<this.Elements.length) && (this.Elements[i].level > level) ) {
         if ( this.Elements[i].is_folder )
            this.Elements[i].close();
         this.Elements[i].show_element = false;
         i++;
      };
      this.show ();
   };
}; 
function Dynamic_Tree_OP_Close_All_Folders () {
   this.Elements[0].open();
   for ( i=1; i<this.Elements.length; i++ ) {
      if ( this.Elements[i].is_folder )
         this.Elements[i].close();
      if ( this.Elements[i].level > 0 )
         this.Elements[i].show_element = false;
   };
   this.show ();
}; 
function Dynamic_Tree_Open_All_Folders () {
   for ( i=0; i<this.Elements.length; i++ ) {
      this.Elements[i].show_element = true;
      if ( this.Elements[i].is_folder )
         this.Elements[i].open();
   };
   this.show ();
}; 
function Dynamic_Tree_OP_Toggle_Folder ( Index ) {
   if ( this.Elements[Index].folder.is_open )
      this.close ( Index );
   else
      this.open ( Index );
}; 
function Dynamic_Tree_OP_New_Folder ( Index, Level, InObject ) {
   if ( Index == null ) Index = this.Elements.lenght;
   var entry = new Dynamic_Tree_Entry ( "n"+Index, "f"+Index, "node"+Index, "img"+Index, Level, this.folders, this.nodes, InObject );
   this.Elements[Index]  = entry;
   entry.text_offset     = this.text_offset;
   entry.highlight_color = this.highlight_color;
   entry.normal_color    = this.normal_color;
}; 
function Dynamic_Tree_OP_New_First_Folder ( Index, Level, InObject ) {
   if ( Index == null ) Index = this.Elements.lenght;
   var entry = new Dynamic_Tree_Entry ( "n"+Index, "f"+Index, "node"+Index, "img"+Index, Level, this.folders, this.firstnodes, InObject );
   this.Elements[Index]  = entry;
   entry.text_offset     = this.text_offset;
   entry.highlight_color = this.highlight_color;
   entry.normal_color    = this.normal_color;
}; 
function Dynamic_Tree_OP_New_Last_Folder ( Index, Level, InObject ) {
   if ( Index == null ) Index = this.Elements.lenght;
   var entry = new Dynamic_Tree_Entry ( "n"+Index, "f"+Index, "node"+Index, "img"+Index, Level, this.folders, this.lastnodes, InObject );
   this.Elements[Index]  = entry;
   entry.text_offset     = this.text_offset;
   entry.highlight_color = this.highlight_color;
   entry.normal_color    = this.normal_color;
}; 
function Dynamic_Tree_OP_New_Document ( Index, Level, InObject ) {
   if ( Index == null ) Index = this.Elements.lenght;
   var entry = new Dynamic_Tree_Entry ( "n"+Index, "f"+Index, "node"+Index, "img"+Index, Level, null, null, InObject );
   this.Elements[Index]  = entry;
   entry.text_offset     = this.text_offset;
   entry.highlight_color = this.highlight_color;
   entry.normal_color    = this.normal_color;
}; 
function Dynamic_Tree_OP_Set_Length ( no_elements ) {
   if ( no_elements < 3 ) no_elements = 3;
   this.Length = no_elements;
   this.show ();
}; 
function Dynamic_Tree_OP_Fit_Length () {
   this.set_length ( this.Elements.length );
}; 
function Dynamic_Tree_OP_Highlight ( Index ) {
   this.Elements[Index].highlight();
}; 
function Dynamic_Tree_OP_Normal ( Index ) {
   this.Elements[Index].normal();
}; 
function Dynamic_Moving_Tree ( icon_path, Main_Id, Frame_Id, left_offset, bg_color, frame_color ) {
   this.SuperClass = Dynamic_Tree;
   this.SuperClass   ( icon_path );
   if ( left_offset )   this.left_offset = left_offset; else this.left_offset = 35;
   this.bg_color      = bg_color;
   this.frame_color   = frame_color;
   this.x_border      = 5;
   this.y_border      = 5;
   this.Folder_Layer  = new Dynamic_Go_In_Out_Layer ( Frame_Id, null, this.left_offset, this.top_offset, -500, this.top_offset );
   this.Folder_Inner  = new Dynamic_Movable_Layer     ( 'treediv', this.Folder_Layer );
   if ( layer_object('header', this.Folder_Layer) ) {
      this.tree_header = new Dynamic_Movable_Layer    ( 'header', this.Folder_Layer);
      if ( Dynamic_Locate_Image(this.tree_header, 'treetopscrollup') )
         treetop_scrollup_button   = new Dynamic_Active_Flat_Button ( this.tree_header, 'treetopscrollup',   button_scrollup );
      if ( Dynamic_Locate_Image(this.tree_header, 'treetopscrolldown') )
         treetop_scrolldown_button = new Dynamic_Active_Flat_Button ( this.tree_header, 'treetopscrolldown', button_scrolldown );
      if ( Dynamic_Locate_Image(this.tree_header, 'treetoptree') )
         treetop_tree_button       = new Dynamic_Active_Flat_Button ( this.tree_header, 'treetoptree',       button_notree );
      if ( Dynamic_Locate_Image(this.tree_header, 'treetopopenall') ) {
         button_openall = new Dynamic_Image_Container ( icon_path + 'button_folder_open_up.gif',
                                                        icon_path + 'button_folder_open_down.gif',
                                                        icon_path + 'button_folder_open_inact.gif',
                                                        icon_path + 'button_folder_open_flat.gif' );
         treetop_openall_button    = new Dynamic_Active_Flat_Button ( this.tree_header, 'treetopopenall',    button_openall );
      };
      if ( Dynamic_Locate_Image(this.tree_header, 'treetopcloseall') ) {
         button_closeall = new Dynamic_Image_Container ( icon_path + 'button_folder_close_up.gif',
                                                         icon_path + 'button_folder_close_down.gif',
                                                         icon_path + 'button_folder_close_inact.gif',
                                                         icon_path + 'button_folder_close_flat.gif' );
         treetop_closeall_button   = new Dynamic_Active_Flat_Button ( this.tree_header, 'treetopcloseall',   button_closeall );
      };
   };
   if ( layer_object('footer', this.Folder_Layer) )
      this.tree_footer = new Dynamic_Movable_Layer    ( 'footer', this.Folder_Layer);
   if ( Main_Id ) { 
      this.Main = new Dynamic_Go_In_Out_Layer ( Main_Id,                          null,
                                                                   this.x_border, this.y_border,
                                                this.width       + this.x_border, this.y_border  );
      this.move_main = true;
      if ( browser_is.NS4 && layer_object('animation', this.Main) ) insert_animation( this.Main );
   } else {
      this.Main      = null;
      this.move_main = false;
   };
   this.is_running        = false;
   this.delay             = 100;
   this.initial_delay     = 500;
   this.step              = 1;
   this.obj               = Frame_Id+"Dynamic_Moving_Tree";
   eval (this.obj+"=this");
   this.Super_restore     = this.restore;
   this.Super_save        = this.save;
   this.set_length        = Dynamic_Tree_OP_Moving_Set_Length;
   this.scroll_up         = Dynamic_Tree_OP_Moving_up;
   this.start_scroll_up   = Dynamic_Tree_OP_Moving_start_up;
   this.stop_scroll_up    = Dynamic_Tree_OP_Moving_stop;
   this.run_scroll_up     = Dynamic_Tree_OP_Moving_run_up;
   this.scroll_down       = Dynamic_Tree_OP_Moving_down;
   this.start_scroll_down = Dynamic_Tree_OP_Moving_start_down;
   this.stop_scroll_down  = Dynamic_Tree_OP_Moving_stop;
   this.run_scroll_down   = Dynamic_Tree_OP_Moving_run_down;
   this.initialize        = Dynamic_Tree_OP_Moving_Initialize;
   this.move_in           = Dynamic_Tree_OP_Moving_move_in;
   this.move_out          = Dynamic_Tree_OP_Moving_move_out;
   this.toggle_in_out     = Dynamic_Tree_OP_Moving_toggle_in_out;
   this.fit_length        = Dynamic_Tree_OP_Moving_Fit_Length;
   this.save              = Dynamic_Tree_OP_Moving_Save;
   this.restore           = Dynamic_Tree_OP_Moving_Restore;
   if ( this.Main ) this.Main.show();
}; 
function Dynamic_Tree_OP_Moving_Initialize () {
   this.Folder_Layer.set_bgcolor ( this.frame_color );
   this.Folder_Inner.set_bgcolor ( this.bg_color );
   if ( verttree_button )
      if ( verttree_button.is_on ) {
        this.move_out ();
        if ( vertscrolldown_button ) vertscrolldown_button.deactivate();
        if ( vertscrollup_button )   vertscrollup_button.deactivate();
      } else {
        this.move_in ();
        if ( vertscrolldown_button ) vertscrolldown_button.activate();
        if ( vertscrollup_button )   vertscrollup_button.activate();
      };
}; 
function Dynamic_Tree_OP_Moving_Set_Length ( no_elements ) {
   if ( no_elements < 3 ) no_elements = 3;
   this.Length = no_elements;
   if ( browser_is.IE4 ) width = 500; else width = this.width;
   var layer_height = no_elements * this.element_height +
                                    this.tree_head_height + this.tree_head_pad +
                                    this.tree_foot_height + this.tree_foot_pad + 3;
   this.Folder_Layer.setsize ( width + 3, layer_height );
   this.Folder_Inner.setsize ( width, no_elements * this.element_height );
   this.Folder_Layer.clip    ( 0, 0, this.width + 3, layer_height );
   this.Folder_Inner.clip    ( 0, 0, this.width, no_elements * this.element_height );
   this.Folder_Inner.go_to   ( 1, 1 + this.tree_head_height + this.tree_head_pad );
   this.show ();
}; 
function Dynamic_Tree_OP_Moving_up () {
   if ( this.Start > this.step ) {
      this.Start = this.Start - this.step;
      this.show ();
   } else if ( this.Start > 0 ) {
      this.Start = 0;
      this.show ();
   } else {
      this.is_running = 0;
   };
}; 
function Dynamic_Tree_OP_Moving_down () {
   if ( this.Start < this.Elements.length - this.Length - this.step && this.showing_elements - this.Start > this.Length + this.step ) {
      this.Start = this.Start + this.step;
      this.show ();
   } else if ( this.Start < this.Elements.length - this.Length && this.showing_elements - this.Start > this.Length ) {
      this.Start = this.showing_elements - this.Length;
      this.show ();
   } else {
      this.is_running = 0;
   };
}; 
function Dynamic_Tree_OP_Moving_start_up () {
   this.step = 1;
   this.scroll_up ();
   if ( ! this.is_running ) {
      this.is_running = true;
      setTimeout(this.obj+".run_scroll_up()", this.initial_delay);
   };
}; 
function Dynamic_Tree_OP_Moving_run_up () {
   if ( this.is_running ) {
      this.scroll_up ();
      setTimeout(this.obj+".run_scroll_up()", this.delay);
      this.step = this.step * 1.1;
   };
}; 
function Dynamic_Tree_OP_Moving_start_down () {
   this.step = 1;
   this.scroll_down ();
   if ( ! this.is_running ) {
      this.is_running = true;
      setTimeout(this.obj+".run_scroll_down()", this.initial_delay);
   };
}; 
function Dynamic_Tree_OP_Moving_run_down () {
   if ( this.is_running ) {
      this.scroll_down ();
      setTimeout(this.obj+".run_scroll_down()", this.delay);
      this.step = this.step * 1.1;
   };
}; 
function Dynamic_Tree_OP_Moving_stop () {
   this.is_running = false;
}; 
function Dynamic_Tree_OP_Moving_move_out () {
   this.Folder_Layer.move_out();
   if ( this.move_main )        this.Main.move_in();
   if ( vertscrolldown_button ) vertscrolldown_button.deactivate();
   if ( vertscrollup_button )   vertscrollup_button.deactivate();
   if ( verttree_button ) {
      verttree_button.on();
      verttree_button.flat();
   };
   if ( tree_button ) {
      tree_button.on();
      tree_button.flat();
   };
}; 
function Dynamic_Tree_OP_Moving_move_in () {
   this.Folder_Layer.move_in();
   if ( this.move_main )        this.Main.move_out();
   if ( vertscrolldown_button ) vertscrolldown_button.activate();
   if ( vertscrollup_button )   vertscrollup_button.activate();
   if ( verttree_button ) {
      verttree_button.off();
      verttree_button.flat();
   };
   if ( tree_button ) {
      tree_button.off();
      tree_button.flat();
   };
}; 
function Dynamic_Tree_OP_Moving_toggle_in_out () {
   if ( this.Folder_Layer.is_in() ) {
      this.move_out ();
   } else {
      this.move_in ();
   };
}; 
function Dynamic_Tree_OP_Moving_Fit_Length () {
   this.set_length ( Math.floor((DHTML_Window_Height() - this.top_offset       - this.bottom_offset - 
                                                         this.tree_head_height - this.tree_head_pad -
                                                         this.tree_foot_height - this.tree_foot_pad - 3 ) / this.element_height) );
}; 
function Dynamic_Tree_OP_Moving_Save ( save_at ) {
   this.Super_save ( save_at );
   if ( verttree_button ) save_at.Tree_is_out = verttree_button.is_on;
}; 
function Dynamic_Tree_OP_Moving_Restore ( save_at ) {
   this.Super_restore ( save_at );
   if ( verttree_button )
      if ( save_at.Tree_is_out ) verttree_button.on (); else verttree_button.off (); 
   this.initialize ();
}; 
function Dynamic_Moving_Scrolling_Tree ( icon_path, Main_Id, Frame_Id,
                                         button_size, button_height, slider_height, left_offset, bg_color, frame_color, scroll_color
                                       ) {
   this.SuperClass = Dynamic_Moving_Tree;
   this.SuperClass   ( icon_path, Main_Id, Frame_Id, left_offset, bg_color, frame_color );
   if ( scroll_color )  this.scroll_color  = scroll_color;  else this.scroll_color  = '#cccccc';
   if ( button_size )   this.button_size   = button_size;   else this.button_size   = 13;
   if ( button_height ) this.button_height = button_height; else this.button_height = 8;
   if ( slider_height ) this.slider_height = slider_height; else this.slider_height = 30;
   this.Scroll        = new Dynamic_Movable_Layer               ( 'scrolldiv',    this.Folder_Inner );
   this.Scrollup      = new Dynamic_Movable_Layer               ( 'scrollup',     this.Folder_Inner );
   this.Scrolldown    = new Dynamic_Movable_Layer               ( 'scrolldown',   this.Folder_Inner );
   this.Scrollbutton  = new Dynamic_Movable_Layer               ( 'scrollbutton', this.Folder_Inner );
   this.SUPER_show    = this.show;
   this.show          = Dynamic_Tree_OP_Moving_Scrolling_Show_Elements;
   this.set_length    = Dynamic_Tree_OP_Moving_Scrolling_Set_Length;
   this.initialize    = Dynamic_Tree_OP_Moving_Scrolling_Initialize;
   this.fit_length    = Dynamic_Tree_OP_Moving_Scrolling_Fit_Length;
}; 
function Dynamic_Tree_OP_Moving_Scrolling_Initialize () {
   this.Scroll.go_to ( 0, 0 );
   this.Scroll.show ();
   this.Scrollup.go_to ( 0, this.button_size );
   this.Scrollup.show ();
   this.Scrolldown.show ();
   this.Scrollbutton.go_to ( 0, this.button_size + this.button_height );
   this.Scrollbutton.show ();
   this.Folder_Layer.move_in();
   if ( this.frame_color )  this.Folder_Layer.set_bgcolor ( this.frame_color );
   if ( this.bg_color )     this.Folder_Inner.set_bgcolor ( this.bg_color );
   if ( this.scroll_color ) this.Scroll.set_bgcolor       ( this.scroll_color );
   this.Folder_Layer.follow ();
   if ( verttree_button ) verttree_button.off();
}; 
function Dynamic_Tree_OP_Moving_Scrolling_Show_Elements () {
   this.SUPER_show ();
   if ( this.showing_elements > this.Start+this.Length )
      this.Scrollbutton.go_to ( 0, this.button_size + this.button_height - 1 +
                                          ( (this.Length * this.element_height - 2 * this.button_height + 2 -
                                             this.button_size - this.slider_height) * this.Start              ) /
                                          ( this.showing_elements - this.Length )                                         );
   else if ( this.Start > 0 )
      this.Scrollbutton.go_to ( 0, this.Length * this.element_height - this.button_height + 1 - this.slider_height );
   else
      this.Scrollbutton.go_to ( 0, this.button_size - 1 + this.button_height );
}; 
function Dynamic_Tree_OP_Moving_Scrolling_Set_Length ( no_elements ) {
   if ( no_elements < 3 ) no_elements = 3;
   this.Length = no_elements;
   this.Folder_Layer.setsize ( this.width + 3, no_elements * this.element_height + 3 +
                                               this.tree_head_height + this.tree_head_pad +
                                               this.tree_foot_height + this.tree_foot_pad   );
   this.Folder_Inner.setsize ( this.width, no_elements * this.element_height );
   this.Folder_Inner.clip    ( 0, 0, this.width, no_elements * this.element_height );
   this.Folder_Inner.go_to   ( 1, 1 + this.tree_head_height + this.tree_head_pad );
   this.Scrolldown.go_to     ( 0, no_elements * this.element_height - this.button_height );
   this.Scroll.setsize       ( this.button_size, no_elements * this.element_height  );
   this.show ();
}; 
function Dynamic_Tree_OP_Moving_Scrolling_Fit_Length () {
   this.set_length ( Math.floor((DHTML_Window_Height() - this.top_offset - this.bottom_offset - 3 -
                                                         this.tree_head_height - this.tree_head_pad -
                                                         this.tree_foot_height - this.tree_foot_pad   ) / this.element_height) );
}; 
function Dynamic_Scrolled_Tree ( icon_path, Main_Id, Frame_Id,
                                 button_size, button_height, slider_height, left_offset, bg_color, frame_color, scroll_color
                               ) {
   this.SuperClass = Dynamic_Moving_Scrolling_Tree;
   this.SuperClass   ( icon_path, Main_Id, Frame_Id,
                       button_size, button_height, slider_height, left_offset, bg_color, frame_color, scroll_color
                     );
}; 
