function include(file) {
	var script = document.createElement('script');
    var type = document.createAttribute('type');
    type.nodeValue = 'text/javascript';
    script.setAttributeNode(type);
    var source = document.createAttribute('src');
    source.nodeValue = file;
    script.setAttributeNode(source);
    var head = document.getElementsByTagName('head')[0];
    head.appendChild(script);
}

//Image Preloader //
function preloader(images, callback){
	//alert("Preloader:"+images.join("\n"));
	//store the callback
	this.callback = callback; 

	//initialize internal state.
	this.nLoaded = 0;
	this.nProcessed = 0;
	this.aImages = new Array;

	//record the number of images.
	this.nImages = images.length;

	//for each image, call preload()
	for ( var i = 0; i < images.length; i++ ){
		this.preload(images[i]);
	}
}

preloader.prototype.preload = function(image){
	//create new Image object and add to array
	var oImage = new Image;
	this.aImages.push(oImage);

	//set up event handlers for the Image object
	oImage.onload = preloader.prototype.onload;
	oImage.onerror = preloader.prototype.onerror;
	oImage.onabort = preloader.prototype.onabort;

	//assign pointer back to this.
	oImage.opreloader = this;
	oImage.bLoaded = false;

   	//assign the .src property of the Image object
   	oImage.src = image;

}
preloader.prototype.onStatus  = function(current,count,total){}

preloader.prototype.onComplete = function(){
	this.nProcessed++;
	if (this.nProcessed == this.nImages ){
		this.callback(this.aImages, this.nLoaded);
	}
}

preloader.prototype.onload = function(){
	this.bLoaded = true;
	this.opreloader.nLoaded++;
	this.opreloader.onComplete();
	var img = this.src.substring(this.src.lastIndexOf("/")+1,this.src.length);
	this.opreloader.onStatus(img,this.opreloader.nProcessed,this.opreloader.nImages);
}

preloader.prototype.onerror = function(){
  	this.bError = true;
  	this.opreloader.onComplete();
}
	
preloader.prototype.onabort = function(){
	this.bAbort = true;
	this.opreloader.onComplete();
}
	


//Evolux Framework //	
	
var _root;
var evoluX = {
	//Initialisierungsmethode
	init: function(){
		document.write("<div id='_root'>.</div>"); //Schreiben des _root divs
		_root = $("_root"); //Speichern des _root divs in var _root
		_root.innerHTML = ""; //Leeren des Inhalts	
		_root.name = "_root"; //Setzen des Namens
		evoluX.images = new Array(); //Setzen des preload-Arrays 
		evoluX._id = [0]; //Setzen des Id-Array
		evoluX._depth = [0]; //Setze depth-Array
		evoluX.fps = 12; //Setzen der Wiederholrate
		evoluX.Drag = {Element:false,lock:true,staticX:false,staticY:false}; //Setzen des DragElements
		if (document.layers) document.captureEvents(Event.MOUSEMOVE) ;
		
		document.onmousemove = function(e){
			_root._xmouse = e? e.pageX : window.event.x ;
			_root._ymouse = e? e.pageY : window.event.y ;
			// F�r ie. Rausfinden ob in quickmode
			var docEl = (typeof document.compatMode != "undefined" 
			&& document.compatMode != "BackCompat")? "documentElement" : "body" ;
			
			if (document.all && !document.captureEvents){
				_root._xmouse += document[docEl].scrollLeft ;
				_root._ymouse += document[docEl].scrollTop ;
			}
			//Abfrage f�r Drag & Drop
			if (evoluX.Drag.Element){
				if(evoluX.Drag.lock == true){
					evoluX.Drag.Element.setProperty("_x",_root._xmouse);
					evoluX.Drag.Element.setProperty("_y",_root._ymouse);
				}else{
					if(evoluX.Drag.staticX != false && evoluX.Drag.staticY != false){
						//_root.innerHTML += "Bewege Objekt.. statische werte gesetzt!!!"
						evoluX.Drag.Element.setProperty("_x",(evoluX.Drag.staticX + _root._xmouse));
						evoluX.Drag.Element.setProperty("_y",(evoluX.Drag.staticY + _root._ymouse));
					}else{
						//_root.innerHTML += "Setze statisches X und Y<br>";
						evoluX.Drag.staticX = evoluX.Drag.Element._x - _root._xmouse;
						evoluX.Drag.staticY = evoluX.Drag.Element._y - _root._ymouse;
					}
				}
			}else{
				evoluX.Drag.staticX = false;
				evoluX.Drag.staticY = false;
			}
		}
	},
	
	//Methode zum zur�ckgeben des n�chsten Layers
	getNextHighestDepth: function(){
		evoluX._depth.add(evoluX._depth.last()+1);
		return evoluX._depth.last();
	},
	
	//Methode zum zur�ckgeben der n�chsten freien Id
	getNextFreeId: function(){
		evoluX._id.add(evoluX._id.last()+1);
		return evoluX._id.last();
	},
	
	//Klasse zum Erstellen einer neuen Box
	emptyBox: function(name, width, height, posx, posy, attach_on,element,propsArray){
		//alert("Erstelle objekt "+name+" mit posx:"+posx+" und posy:"+posy+" element:"+element);
		if(!element) element = "div";
		var myEl = document.createElement(element);
		myEl.id = evoluX.getNextFreeId();
		
		if(element == "a"){
			myEl.href = propsArray[0][1];
			myEl.innerHTML = propsArray[1][1];
		}else{
			//Wenn Eigenschaften-Array �bergeben
			//dann setze diese f�r das Objekt
			if(propsArray){
				for(var i=0;i<propsArray.length;i++){
					myEl[propsArray[i][0]] = propsArray[i][1];
				}
			}
		}
		//if(element == "input")alert("name:"+name+" :"+attach_on);
		attach_on.appendChild(myEl);
		this.obj = $(myEl.id);
		this.obj.drag = false;

		//Zuweisen der Eigenschaften an das Objekt
		this.obj._alpha = 100; 
		this.obj._name	= name
		this.obj._type	= "emptyBox";
		this.obj._depth	= evoluX.getNextHighestDepth();
		this.obj.style.zIndex = this.obj._depth;  //Setzen der Ebene des Objektes
		
		//Wenn _root Ebene dann schreibe Obj. in window 
		if($("_root") == attach_on){window[name] = this.obj;}; 
		
		//Erstelle neues Objekt in attach_on und f�lle mit Div-Obj.
		attach_on[name] = this.obj; 
		
		//Setze Parent
		this.obj._parent = attach_on;
		
		//Methode zum setzen der Objekt-Eigenschaften
		this.obj.setProperty = function(prop,value){
			if(value != "undefined"){
				switch(prop)
				{
					case "_x":
						this._x = value;
						this.style.left	= this._x + "px";
						break;
					case "_y":
						this._y = value;
						this.style.top	= this._y + "px";
						break;
					case "_width":
						if(value){
							this._width = value;
							this.style.width = this._width + "px";
						}
						break;
					case "_height":
						if(value){
							this._height = value;
							this.style.height = this._height + "px";
						}
						break;	
					case "_alpha":
						this._alpha = value;
						if(evoluX.Browser.IE()){				
							this.style.filter="alpha(opacity="+this._alpha+")";
						}else{
							this.style.opacity = this._alpha / 100;
						}
						break
					case "_bgcolor":
						this._bgcolor = value;
						this.style.backgroundColor = this._bgcolor;
						break
					case "_bgimage":
						if(value){
							evoluX.images.add(value);
							this._bgimage = value;
							this.style.backgroundImage = "url("+value+")";
						}
						break
					case "_bgrepeat":
						if(value){
							this._bgrepeat = value;
							this.style.backgroundRepeat = value;
						}
						break
					case "_visible":
						if(value == true){
							this.style.visibility = "";
						}else{
							this.style.visibility = "hidden";
						}
						break
					case "_position":
						if(posx != "undefined" && posy != "undefined"){
							this._position = value;
							this.style.position = value;
						}
						break
					default:
						alert("unbekannte Eigenschaft:"+prop);
						break
				}
			}
		}
		//Deaktiviere wiederholung des Hintergrundbildes
		this.obj.setProperty("_bgrepeat","no-repeat");
		//Setze �bergebene Parameter als eigenschaften
		var propsArray = [["_x",posx],["_y",posy],["_width",width],
						  ["_height",height],["_position","absolute"]];
			
		for (var i=0;i<propsArray.length;i++){
			this.obj.setProperty(propsArray[i][0],propsArray[i][1]);
		}
		
		
		//Methode zum l�schen des Objekts
		this.obj.remove = function(){
			this.parentNode.removeChild(this);
		}
		//Methode zum setzen des n�chst h�heren Layers
		this.obj.setNextHighestDepth = function(){
			this._depth = evoluX.getNextHighestDepth();
			this.style.zIndex = this._depth;
		}
		this.obj.setDepth = function(depth){
			this._depth = depth;
			this.style.zIndex = this._depth;
		}
		//Weiterleitungsmethoden f�r eigene Events
		this.obj.onmousedown = function(){this.onPress();}
		this.obj.onmouseup = function(){this.onRelease();}
		this.obj.onmouseover = function(){this.onRollOver();}
		this.obj.onmouseout = function(){this.onRollOut();}
		this.obj.onmousemove = function(){this.onMouseMove();}
		//Methoden f�r Ereignisse
		this.obj.onPress = function(){};
		this.obj.onRelease = function(){};
		this.obj.onRollOver = function(){}
		this.obj.onRollOut = function(){}
		this.obj.onSetFocus = function(){}
		this.obj.onMouseMove = function(){}
		
		//Methoden f�r Drag & Drop
		this.obj.startDrag = function(lock){
			if(!evoluX.Drag.Element){
				evoluX.Drag.lock = lock;
				evoluX.Drag.Element = this;
			}
		}
		this.obj.stopDrag = function(){
			evoluX.Drag.Element = false;
		}
		//Methode gibt true zur�ck wenn auf TabBox Ebene
		this.obj.attachedOnTabBox = function(){
			if(this._parent._type == "ui.tabBox"){
				return true;
			}else{return false;}
		}
		//Wenn this auf TabBox und ist "emptyBox"
		if(this.obj.attachedOnTabBox()
		    && this.obj._type == "emptyBox"){
			this.obj._parent.connectedList.add(this.obj);
			this.obj.setProperty("_visible",false);
		}
		this.obj.setTextFormat = function(tfObj){
			if(tfObj){
				var tfArray = ["fontFamily","fontStyle","fontSize","fontWeight","fontStretch",
							   "font","wordSpacing","textDecoration","textTransform","color","border","textAlign"]
				
				for(var i=0;i<tfArray.length;i++){
					if(tfObj[tfArray[i]]){
						this.style[tfArray[i]] = tfObj[tfArray[i]];
					}
				}
			}
		}
		this.obj.tooltip = function(txt){
			if(this.status != "deactivated"){
				this.title = txt;
			}else
			{
				this.backupTitle = txt;
			}
		}
	},
	preloader: function(imgArray,callback){
		return new preloader(imgArray.uniq(),callback);
	}
}
evoluX.Browser = {
	IE: function(){
		if(navigator.userAgent.indexOf("MSIE") >=0) {
			return true;
		}else{
			return false;
		}
	}
}
evoluX.ui = {
	link: function(name,linkdest,linkname,posx,posy,attach_on){
		new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"a",[["href",linkdest],["name",linkname]]);
	},
	textBox: function(name, width, height, posx, posy, attach_on){
		new evoluX.emptyBox(name, width, height, posx, posy, attach_on);
		this.obj = attach_on[name];
		
		//Methode zum setzen des Textes
		this.obj.setText = function(text){
			this.innerHTML = text.split("  ").join("&nbsp;&nbsp;");
		}
	},
	tabMenu: function(name, width, height, posx, posy, attach_on){
			new evoluX.emptyBox(name, width, height, posx, posy, attach_on);
			this.obj = attach_on[name];
			this.obj._type	= "ui.tabMenu";
			this.obj.connectedList = new Array();
			this.obj.connected_status = false;
			this.obj._selectedTab = "";
			
			this.obj.connect = function(tabBox){
				if(tabBox._type = "Widget.tabBox"){
					this.connected_status = true;
					this.connectedBox = tabBox;
					
					tabBox.connected_status = true;
					tabBox.connectedBox = this;
				}
			}
			this.obj.disconnect = function(){
				if(this.connected()){
					this.connected_status = false;
					this.connectedBox.disconnect();
				}
			}
			this.obj.connected = function(){
				return this.connected_status;
			}
			this.obj.getSelected = function(){
				return this._selectedTab;
			}
	},
	tabBox: function(name, width, height, posx, posy, attach_on){
		new evoluX.emptyBox(name, width, height, posx, posy, attach_on);
		this.obj = attach_on[name];
		this.obj._type	= "ui.tabBox";
		this.obj.connectedList = new Array();
		this.obj.connected_status = false;
		
		this.obj.connect = function(tabMenu){
			if(tabMenu._type = "Widget.tabMenu"){
				this.connected_status = true;
				this.connectedBox = tabMenu;
				
				tabMenu.connected_status = true;
				tabMenu.connectedBox = this;
			}
		}
		this.obj.disconnect = function(){
			if(this.connected()){
				this.connected_status = false;
				this.connectedBox.disconnect();
			}
		}
		this.obj.connected = function(){
			return this.connected_status;
		}
	},
	selectBox: function(name, width, height, posx, posy, attach_on){
		//Wenn nicht IE, dann ziehe 13 pixel ab.
		if(!evoluX.Browser.IE()){ width-=10;height-=10;}
		new evoluX.emptyBox(name, width, height, posx, posy, attach_on);
		this.obj = attach_on[name];
		this.obj._type	= "ui.selectBox";
		this.obj.style.overflow = "scroll";
		this.obj.style.overflowX = "hidden";
		this.obj.style.padding = 5;
		this.props = "";
		this.obj._multiselect = false;
		
		this.obj.setMultiSelect = function(value){
			this._multiselect = value;
		}
		this.obj.setEntries = function(entryArray,pColor){
			this.entries = new Array();
			this.pColor = pColor;
			attach_on[name].innerHTML = "";
			for(var i=0;i<entryArray.length;i++){
				var currentID = evoluX.getNextFreeId();
				new evoluX.emptyBox(currentID,"undefined","undefined","undefined","undefined",attach_on[name]);
				var currentEntry = attach_on[name][currentID];
				currentEntry.selected = false;
				currentEntry.innerHTML = entryArray[i].name;
				currentEntry.props = entryArray[i];
				this.entries.add(currentEntry);
				
				currentEntry.onmousedown = function(){
					if(!this._parent._multiselect){
						this.style.backgroundColor = pColor;
						this.selected = true;
						for(var i=0;i<this._parent.entries.length;i++){
							if(this._parent.entries[i] != this){
								this._parent.entries[i].setProperty("_bgcolor" ,"transparent");
								this._parent.entries[i].selected = false;
							}
						}
					}else{
						if(!this.style.backgroundColor ||
						this.style.backgroundColor == "transparent"){
							this.style.backgroundColor = pColor;
							this.selected = true;
						}else{
							this.style.backgroundColor = "transparent";
							this.selected = false;
						}
					}
					//this._parent.onEntrySelect(this.props);
					GLOB_A2bo24k0skas_parent = this._parent;
					GLOB_ik94ksad49skjd_props = this.props;
					this._parent.props = this.props;
					setTimeout("GLOB_A2bo24k0skas_parent.onEntrySelect(GLOB_ik94ksad49skjd_props)",50);
					if(this._parent.mark)this._parent.markEntryByProperty(this._parent.mark.prop,this._parent.mark.value,this._parent.mark.color);
				}
			}
		}
		this.obj.selectEntryByProperty = function(prop,value){
			if(this.entries && this.pColor){
				for(var i=0;i<this.entries.length;i++){
					if(this.entries[i].props[prop] == value){
						this.entries[i].setProperty("_bgcolor",this.pColor);
						this.onEntrySelect(this.entries[i].props);
						this.props = this.entries[i].props;
						this.entries[i].selected = true;
						return;
					}
				}
			}
		}
		this.obj.setEntryByProperty = function(prop,value){
			this.selectEntryByProperty(prop,value);
		}
		this.obj.resetSelection = function(){
			if(this.entries){
				for(var i=0;i<this.entries.length;i++){
					this.entries[i].setProperty("_bgcolor" ,"transparent");
					this.entries[i].selected = false;
				}
			}
		}
		this.obj.selectAll = function(){
			for(var i=0;i<this.entries.length;i++){
				this.entries[i].setProperty("_bgcolor" ,this.pColor);
				this.onEntrySelect(this.entries[i].props);
				this.props = this.entries[i].props;
				this.entries[i].selected = true;
			}
		}
		this.obj.getSelected = function(){
			if(!this._multiselect){
				return this.props;
			}else{
				var selectedArray = new Array();
				for(i=0;i<this.entries.length;i++){
					if(this.entries[i].selected){
						selectedArray.add(this.entries[i].props);
					}
				}
				return selectedArray;
			}
		}
		this.obj.markEntryByProperty = function(prop,value,color){
			this.mark = new Object();
			this.mark.prop = prop;
			this.mark.value = value;
			this.mark.color = color;
			if(this.entries){
				for(var i=0;i<this.entries.length;i++){
					if(this.entries[i].props[prop] == value){
						this.entries[i].setProperty("_bgcolor",color);
						return;
					}
				}
			}
		}
		this.obj.onEntrySelect = function(entryObj){
		}
	},
	imageBox: function(name, image, posx, posy, attach_on){
		new evoluX.emptyBox(name,"undefined", "undefined", posx, posy, attach_on,"img",[["src",image]]);
		this.obj = attach_on[name];
		this.obj._type	= "ui.imageBox";
		evoluX.images.add(image);
		
		//Methode zum setzen des Bildes
		this.obj.setImage = function(image){
			this.src = image;
		}
	},
	Forms :{
		action : function(name, posx, posy, dest, method, target, attach_on){
			var myEl = document.createElement("form");
			myEl.id = evoluX.getNextFreeId();
			myEl.action = dest;
			myEl.name = name;
			myEl.enctype= "multipart/form-data";
			myEl.method = "post";
			if(target)myEl.target = target;
			myEl.id = evoluX.getNextFreeId();
			attach_on.appendChild(myEl);
			this.obj = $(myEl.id);
			this.obj.style.position = "absolute";
			this.obj.style.left = posx;
			this.obj.style.top = posy;
			attach_on[name] = this.obj;
			this.obj._parent = attach_on;
			
			
			
			
			/*
			if(target){
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"form",[["action",dest],["enctype",enctype],["method",method],["target",target],["name",name]]);
			}else{
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"form",[["action",dest],["enctype",enctype],["method",method],["name",name]]);
			}
			*/
			this.obj = attach_on[name];
			//this.obj._type	= "forms.action";
			
		},
		Buttons:{
			checkbox:function(name, checked, posx, posy, attach_on){
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"input",[["type","checkbox"],["name",name]]);
				this.obj = attach_on[name];
				this.obj._type	= "button.checkbox";
				
				//Methode zum setzen des Textes
				this.obj.setChecked = function(value){
					this.checked = parseInt(value);
				}
				this.obj.isChecked = function(){
					if(this.checked == true)return 1;
					if(this.checked == false)return 0;
				}
				this.obj.setChecked(checked);
			},
			normal: function(name,text,posx,posy,attach_on){
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"input",[["type","button"]]);
				this.obj = attach_on[name];
				this.obj._type	= "button.normal";
				//Methode zum setzen des Textes
				this.obj.setText = function(text){
					this.value = text;
				}
				this.obj.setText(text);
			},
			submit: function(name,text,posx,posy,attach_on){
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on,"input",[["type","submit"]]);
				this.obj = attach_on[name];
				this.obj._type	= "button.submit";
				//Methode zum setzen des Textes
				this.obj.setText = function(text){
					this.value = text;
				}
				this.obj.setText(text);
			},
			image: function(name, width, height, posx, posy, eventPics, attach_on, btnType){
				this.btnType = btnType;
				if(!btnType){
					new evoluX.emptyBox(name, width, height, posx, posy, attach_on);
				}else{
					switch(btnType)
					{
						case "button":
							new evoluX.emptyBox(name, width, height, posx, posy, attach_on,"input",[["type","button"]]);
							break;
						case "submit":
							new evoluX.emptyBox(name, width, height, posx, posy, attach_on,"input",[["type","submit"]]);
							break;
					}
					attach_on[name].setProperty("_bgcolor","#d4d0c8");
				}
				this.obj = attach_on[name];
				this.obj._type	= "button.image";
				
				evoluX.images.push(eventPics.normal,eventPics.rollover,eventPics.pressed,eventPics.rollover);
				
				
				//Methoden f�r mausEvents
				this.obj.onmouseout = function(){
					if(this.eventPics)this.setProperty("_bgimage",this.eventPics.normal);
					this.onRollOut();
				}
				this.obj.onmouseover = function(){
					if(this.eventPics)this.setProperty("_bgimage",this.eventPics.rollover);
					this.onRollOver();
				}
				this.obj.onmousedown = function(){
					if(this.eventPics)this.setProperty("_bgimage",this.eventPics.pressed);
					this.onPress();
				}
				this.obj.onmouseup = function(){
					if(this.eventPics)this.setProperty("_bgimage",this.eventPics.rollover);
					this.onRelease();
				}
				
				//Methode zum setzen des Textes
				this.obj.setText = function(text){
					this.value = text;
					this.innerHTML = text;
				}
				
				//Methode zum setzen der EventPics
				this.obj.setEventPics = function(eventPics){
					this.eventPics = eventPics;
					this.style.border = 0;
					this.setProperty("_bgimage",eventPics.normal);
				}
				
				if(eventPics){this.obj.setEventPics(eventPics);}
			},
			extended:function(name, width, height, posx, posy, eventPics, attach_on, btnType){
				new evoluX.ui.Forms.Buttons.image(name, width, height, posx, posy, eventPics, attach_on, btnType)
				this.obj = attach_on[name];
				this.obj._type	= "button.extended";
				this.obj.status = "activated";
				//Methoden zum aktivieren und deaktivieren eines Buttons
				this.obj.deactivate = function(){
					if(this.title)
					{
						this.backupTitle = this.title;
						this.tooltip('');
					}
					this.status = "deactivated";
					this.setProperty("_bgimage",eventPics.deactive);
				}
				this.obj.activate = function(){
					this.status = "activated";
					if(this.backupTitle)
					{
						this.tooltip(this.backupTitle);
					}
					this.setProperty("_bgimage",eventPics.normal);
				}
				
				this.obj.onmouseover = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.rollover);
						this.onRollOver();
					}
				}
				this.obj.onmouseout = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.normal);
						this.onRollOut();
					}
				}
				this.obj.onmousedown = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.pressed);
						this.onPress();
					}
				}
				this.obj.onmouseup = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.rollover);
						this.onRelease();
					}
				}
			},
			tab:function(name, width, height, posx, posy, eventPics, attach_on){
				new evoluX.ui.Forms.Buttons.image(name, width, height, posx, posy, eventPics, attach_on)
				this.obj = attach_on[name];
				this.obj._type	= "button.tab";
				this.obj.status = "activated";
				
				//Methode gibt true zur�ck wenn auf TabMenu Ebene
				this.obj.attachedOnTabMenu = function(){
					if(this._parent._type == "ui.tabMenu"){
						return true;
					}else{ return false;}
				}
				//Methode zum inaktiv setzen der verbundenen Buttons
				this.obj.setAllConnectedNormal = function(){
					for(var i=0;i<this._parent.connectedList.length;i++){
						if(this._parent.connectedList[i]._name != this._name){
							if(this._parent.connected()){
								var currentBox = this._parent.connectedBox.connectedList[i];
								//currentBox.resetChildsVisibility();								
								currentBox.setProperty("_visible",false);
							}
							this._parent.connectedList[i].activate();
						}else{
							if(this._parent.connected()){
								var currentBox = this._parent.connectedBox.connectedList[i];
								currentBox.setProperty("_visible",true);
							}
						}
					}
					this.setNextHighestDepth();
				}
				//Methoden zum setzen des Status
				this.obj.activate = function(){
					this.status = "activated";
					this.setProperty("_bgimage",eventPics.normal);
					this.setNextHighestDepth();
				}
				this.obj.deactivate = function(){
					this.status = "deactivated";
					this.setProperty("_bgimage",eventPics.deactive);
				}
				this.obj.setPressed = function(){
					this.status = "pressed_lock";
					this.setProperty("_bgimage",eventPics.pressed);
					if(this.attachedOnTabMenu){
						this._parent._selectedTab = this._name;
						this.setAllConnectedNormal();
					}
					this.onSelect();
				}
				//Methoden f�r mausEvents
				this.obj.onmouseout = function(){
					if(this.status == "activated"){
						//this.setProperty("_bgimage",eventPics.normal);
						this.onRollOut();
					}
				}
				this.obj.onmouseover = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.rollover);
					}
					this.onRollOver();
				}
				this.obj.onmousedown = function(){
					if(this.status == "activated"){
						//this.setPressed();
						this.onPress();
					}
					
				}
				this.obj.onmouseup = function(){
					if(this.status == "activated"){
						this.setProperty("_bgimage",eventPics.normal);
						this.onRelease();
						this.setPressed();
					}
				}
				this.obj.onSelect = function(){
				}
				//Wenn this auf TabMenu
				if(this.obj.attachedOnTabMenu){
					this.obj._parent.connectedList.add(this.obj);
				}
			}
		},
		Text : {
			input: function(name, size, posx, posy, attach_on,password){
				if(!evoluX.Browser.IE())size -=7;
				type="text";if(password == true)type="password";
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on, "input", [["type",type],["name",name],["size",size]]);
				this.obj = attach_on[name];
				this.obj._type	= "text.input";
				
				//Methode zum setzen der max.Textl�nge
				this.obj.setMaxLength = function(tlength){
					if(!tlength.isNaN)this.style.maxlength = tlength;
				}
				//Methode zum setzen von Text
				this.obj.setText = function(text){
					this.value = text;
				}
				
			},
			password: function(name, size, posx, posy, attach_on){
				new evoluX.ui.Forms.Text.input(name, size, posx, posy, attach_on,true);
				this.obj = attach_on[name];
				this.obj._type	= "text.password";
				
				//Methode zum setzen von Text
				this.obj.setText = function(text){
					this.value = text;
				}
			},
			area: function(name, cols, rows, posx, posy, attach_on){
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on, "textarea", [["cols",cols],["rows",rows],["name",name]]);
				this.obj = attach_on[name];
				this.obj._type	= "text.area";
				this.obj.style.overflow = "auto";
				
				//Methode zum setzen von Text
				this.obj.setText = function(text){
					this.value = text;
				}
			},
			file: function(name, size, posx, posy, attach_on){
				/*
				new evoluX.emptyBox(name, "undefined", "undefined", posx, posy, attach_on, "input", [["type","file"],["size",size],["name",name]]);
				
				this.obj = attach_on[name];
				this.obj._type	= "text.file";
				
				//Methode zum setzen von Text
				this.obj.setText = function(text){
					this.value = text;
				}*/
				var myEl = document.createElement("input");
				myEl.id = evoluX.getNextFreeId();
				myEl.type = "file";
				myEl.size= size;
				myEl.name = "ggg";
				myEl.id = evoluX.getNextFreeId();
				attach_on.appendChild(myEl);
				this.obj = $(myEl.id);
				this.obj._fuckyou = "blabla";
				this.obj.name = "ggg";
				this.obj.style.position = "absolute";
				this.obj.style.left = posx;
				this.obj.style.top = posy;
				attach_on[name] = this.obj;
				this.obj._parent = attach_on;
			},
			hidden: function(name, text, attach_on){
				/*
				new evoluX.emptyBox(name, "undefined", "undefined", "undefined", "undefined", attach_on, "input", [["type","hidden"],["name",name]]);
				this.obj = attach_on[name];
				this.obj._type	= "text.hidden";
				this.obj.value = text;
				*/
				var myEl = document.createElement("input");
				myEl.id = evoluX.getNextFreeId();
				myEl.type = "hidden";
				myEl.value= text;
				myEl.name = name;
				myEl.id = evoluX.getNextFreeId();
				attach_on.appendChild(myEl);
				this.obj = $(myEl.id);
				//obj.style.left = posx;
				//obj.style.top = posy;
				attach_on[name] = this.obj;
				this.obj._parent = attach_on;
				
				//Methode zum setzen von Text
				this.obj.setText = function(text){
					this.value = text;
				}
			}
		}
	}		
}
evoluX.Ajax = {	
	Request : function (method, dest , data){	
		//alert("AJAX Request");
		//Herausfinden ob IE oder Mozilla Browser
		var http = false;
		try{
			http = new ActiveXObject("Msxml2.XMLHTTP");} 
			catch(e) {try {http = new ActiveXObject("Microsoft.XMLHTTP");} 
			catch(yae) {http = false;} 
			if (!http && typeof XMLHttpRequest != '"undefined"'){
				http = new XMLHttpRequest();
			}
		}
		if(!http){
			alert(unescape("Ihr Browser ist nicht Ajax f%E4hig! Bitte installieren sie ein Update oder verwenden sie einen anderen Browser"));
			return false;
		}
		//Browsercaching verhindern
		data += "&nocache="+new Date().getTime();
		if(method == "POST"){ //Wenn Methode POST
			//alert(dest+"?"+data);
			http.open(method, dest, false);
			http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			http.send(encodeURI(data));
		}else{ //Wenn Methode GET
			http.open(method, dest+"?"+data, false);
			http.send(encodeURI(data));
			//http.send(data);
		}
		//alert(http.responseText);
		if (http.responseText)return http.responseText
	}
}

//Funktion zum zur�ckgeben eines Obj. anhand der ID
function $(element){
	return document.getElementById(element);
}

//Methode add an Array-Obj h�ngen
Array.prototype.add = function (obj){
	this[this.length] = obj;
}
//Methode last an Array-Obj h�ngen
Array.prototype.last = function (obj){
	return this[this.length -1];
}

//Methode zum l�schen aller doppelten Eintr�ge aus einem Array
Array.prototype.uniq = function(){
	var array = new Array();
	for(i=0;i<this.length;i++){
		if(!array.isDuplicate(this[i])){
			array.add(this[i]);
		}
	}
	return array;
}
//Methode zum zur�ckgeben, ob sich ein Wert schon in einem Array befindet
Array.prototype.isDuplicate = function(value){
	for(x=0;x<this.length;x++){
 		if(this[x] == value){
 			return true;
 		}
 	}
 	return false;
}
evoluX.init(); //Initialisiere evoluX Framework
var eX = evoluX;

