<!-- //

/**
 *	seso media group <www.seso.at>
 *
 *	$URL: https://seso1.unfuddle.com/svn/seso1_webtelekomwartung/js/util.js $
 *	$Date: 2010-03-04 16:25:32 +0100 $
 *	$Revision: 131 $
 *	$Author: georg $
 */

/*******************************************************************************
	LOGGER
*******************************************************************************/

var BOOLEAN = 'boolean',
	NUMBER = 'number',
	STRING = 'string';

var debug = false;

function log(msg, clear) {
	
	if (debug === true) {
	
		var logger = document.getElementById('logger');
		
		if (!logger) {
			
			logger = document.createElement('DIV');
			logger.id = 'logger';
			logger.className = 'logger';
			
			document.getElementsByTagName('BODY')[0].appendChild(logger);
			
			logger = document.getElementById('logger');
		}
		
		if (clear === true) logger.innerHTML = '';
		
		if (typeof msg == 'object') {
			
			for (m in msg) {
				
				logger.innerHTML += m + ' => ' + msg[m]+'<br>';
			}
		}
		
		else logger.innerHTML += msg+'<br>';
	}
}

function printError(e) {
 	
 	var r = "";

 	r += "<strong>"+e.name+"</strong>";
 	r += "<p>"+e.fileName + " ["+e.lineNumber+"]</p>";
 	r += "<p><b>"+e.message+"</b></p>";
 	r += "<pre>"+e.stack+"</pre><hr>";
 	
 	return r;
}



/*******************************************************************************
	ENVIROMENT
*******************************************************************************/

function env() {

	var self = this;

	this.browser = checkBrowser();
	
	this.isIE = (self.browser.match(/ie/) !== null);

	this.flashVer = checkFlash();
	
	this.os = checkOS();

	
	
	function checkOS() {
		
		var agt = navigator.userAgent.toLowerCase();
		
		if (agt.indexOf("macintosh") != -1) return "mac";
		if (agt.indexOf("windows") != -1) return "win";
		
		return null;
	}


	function checkBrowser() {

		var agt = navigator.userAgent.toLowerCase();
	
		if (agt.indexOf("msie 8.0") != -1) return "ie8";
		if (agt.indexOf("msie 7.0") != -1) return "ie7";
		if (agt.indexOf("msie 6.0") != -1) return "ie6";
		if (agt.indexOf("firefox") != -1) return "firefox";
		if (agt.indexOf("safari/4") != -1) return "safari";
		if (agt.indexOf("safari/5") != -1) return "safari"; 
		if (agt.indexOf("safari") != -1) return "safari"; 
		if ((agt.indexOf("netscape/8") != -1) && (agt.indexOf("msie") != -1)) return "ns8-ie";
		if ((agt.indexOf("netscape/8") != -1) && (agt.indexOf("msie") == -1)) return "ns8-gecko";
		if (agt.indexOf("netscape/7") != -1) return "ns7";
		if (agt.indexOf("opera") != -1) return "opera";
		if (agt.indexOf("camino") != -1) return "camino";
		return null;
	}
	
	
	
	function checkFlash() {

		if (self.browser.match(/ie/) !== null) {
			
			if (typeof window.ActiveXObject != 'UNDEFINED') {

				var v = 0;
				var d = null;
				var a = null;
				var crash = false;
				
				try {
					
					a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
				}
				
				catch(e) {
				
					try { 
						
						a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
						v = [6,0,21];
						a.AllowScriptAccess = "always";
					}
					
					catch(e) {
						
						if (v[0] == 6) crash = true;
					}
					
					if (!crash) {
						
						try {
							
							a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
						}
						
						catch(e) {}
					}
				}
				
				if (!crash && a) { 

					try {
						
						d = a.GetVariable("$version");	
						if (d) return parseInt(d.split(" ")[1].split(",")[0]);
					}
					
					catch(e) {}
				}
			}
		}
		
		
		else {
			
			for (var i=0; i<navigator.plugins.length; i++) {
				
				if (navigator.plugins[i]['name'] == 'Shockwave Flash') {
				
					return navigator.plugins[i]['description'].split('Shockwave Flash ')[1].split('.')[0];
				}
			}
			
		}
	
		return 0;
	}
	

}

var env = new env();



/*******************************************************************************
	UTIL
*******************************************************************************/

function util() {

	this.config = {};

	var self = this;
	
	this.images = {};

	this.init = function() {
		
		util.fixPNGs(document.body, true);
		
		if (env.browser == 'ie6') {
			
			window.onresize = util.reposition;
		}

		try {
		
			for (u in this) {
	
				if (u != 'init' && self[u]['init'])
					eval('util.'+u+'.init();');
			}
		}
		
		catch(e) {

			log(printError(e));
		}
	};
	
this.reposition = function() {

		var div = document.getElementById('aon_container');
		
		if (!div) {
			return false;
		}
		
		div = div.getElementsByTagName('DIV')[0];

		if (document.body.offsetWidth < 932) {

			div.style.left = 0;
			div.style.marginLeft = 0;

		} else {
		
			div.style.left = '50%';
			div.style.marginLeft = '-472px';
		}
	};

	
	this.fixPNGs = function(div, check) {
		
		if (env.browser == 'ie6') {
			
			var imgs = div.getElementsByTagName('IMG');
			
			for (var i=0; i<imgs.length; i++) {

				if (imgs[i].src.indexOf('.png') != -1 && (!check || imgs[i].className.indexOf("leapPNG") == -1)) {

					imgs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgs[i].src+"', sizingMethod='scale')";
					imgs[i].src = util.images.blank;
				}
			}
			
			var inp = div.getElementsByTagName('INPUT');
			
			for (var i=0; i<inp.length; i++) {

				if (inp[i].type == 'image' && inp[i].src.indexOf('.png') != -1 && (!check || inp[i].className.indexOf("leapPNG") == -1)) {

					inp[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+inp[i].src+"', sizingMethod='crop')";
					inp[i].src = util.images.blank;
				}
			}
			
		}
	};

}


/*******************************************************************************
	AJAX-BRIDGE
*******************************************************************************/

util.prototype.ajax = function() {

	var self = this;
	
	var request = null;
	var response = null;
	
	var followAction = null;
	var followTimeout = 0;
	
	var queue = [];
	
	var busy = false;
	var actReq = null;
	
	var method = 'get';
	
	
	
	this.setMethod = function(m) {
		
		method = m;
	}
	
	
	
	function createRequest() {
	
	  	if (window.XMLHttpRequest) {
	  		
	  		request = new XMLHttpRequest(); // Mozilla, Safari, Opera, IE7
	  	}
	  	
	  	else if (window.ActiveXObject) {
	  		
	  		try {
	  			
	  			request = new ActiveXObject('Msxml2.XMLHTTP'); // IE5
	  		}
	  		
	  		catch (e) {
	  			
	  			try {
	  				
	  				request = new ActiveXObject('Microsoft.XMLHTTP'); // IE6
	  			}
	  			
	  			catch (e) {
	
	  				return false;
	  			}
	  		}
	  	}
	
	  	if (request == null) {
	
	  		return false;
	  	}
	}
	
	
	
	function send(target, parameters) {
		
		setLoading(true);
			
			if (request === null) {
			
				createRequest();
			}
	
	  	request.open(method, target, true);
	  	request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	  	request.send(parameters);
	  	request.onreadystatechange = interpretRequest;
	}
	
	
	
	function interpretRequest() {
	
		/*
		 * 0 = uninitialized
		 * 1 = loading
		 * 2 = loaded
		 * 3 = interactiv
		 * 4 = complete
		 */
		 
		if (request.readyState == 4) {
				
			if (request.status == 200) {
			
				var type = request.getResponseHeader('Content-Type');
				
				var pos = type.lastIndexOf(';');
				
				responseType = (pos == -1) ? type : type.substr(0,pos);
	
				switch (responseType) {
					
					case 'text/xml':
					case 'application/xml':
						response = parseXML(request.responseXML);
						break;
					
					case 'text/html':
						response = request.responseText;
						break;
					
					default: 
						alert('unknown responseHeader: ' + type);
						stop();
						break;
				}
				
				actReq = setTimeout(followAction, followTimeout);
			}
			
			else {
	
				log('could not finish request: status ' + request.status + '\n' + request.responseText);
			}
		}
	}
	
	
	
		this.sendRequest = function(target, parameters, action, timeout) {
	
		 	if (!timeout) timeout = 0;
	
		if (busy == false) {
			
			busy = true;
			
			followAction = action;
			followTimeout = timeout;
			send(target, parameters);
		}
		
		else {
		
			var i = queue.length;
			
			queue[i] = {};
			queue[i].target = target;
			queue[i].parameters = parameters;
			queue[i].action = action;
			queue[i].timeout = timeout;
		}
		}
		 
	
		
	this.getResponse = function() {
	  	
		clearTimeout(actReq);
		
		var r = response;
		
		var check = false;
		
		for (i=0; i<queue.length; i++) {
		
			if (queue[i] != null) {
				
				followAction = queue[i].action;
				followTimeout = queue[i].timeout;
				send(queue[i].target, queue[i].parameters);
				queue[i] = null;
				check = true;
				break;
			}
		}
		
		if (check == false) queue = new Array();
		
		busy = check;
		
		setLoading(false);
	  	
		return r;
	}
	
	
	
	function parseXML(xml) {
	
		var list = [];
		
		if (xml.firstChild.nodeType == 7) {
	
			xml = xml.firstChild.nextSibling.childNodes;
		}
	
		else xml = xml.firstChild.childNodes;
	
		for (var i=0; i<xml.length; i++) {
			
			if (xml[i].firstChild) {
			
				list.push(parseXMLObj(xml[i]));
			}
		}
		
		return list;
	}
	
	
	
	function parseXMLObj(xml) {
	
		var node = xml.firstChild;
		
		var obj = {};
	
		while (node) {
	
			if (node.firstChild) {
				
				if (node.firstChild.nodeValue) {
	
					obj[node.nodeName] = node.firstChild.nodeValue;
				}
				
				else if (node.firstChild.hasChildNodes()) {
					
					obj[node.nodeName] = parseXMLObj(node);
				}
			}
				
			else {
				
				obj[node.nodeName] = ' ';
			}
		
			node = node.nextSibling;
		}
		
		return obj;
	}
	
	
	function setLoading(flag) {
	
		// document.getElementById('loadingImg').style.display = (flag==true) ? 'block' : 'none';
	}

}

/*******************************************************************************
	TAB-BOX
*******************************************************************************/

util.prototype.tabBox = {

	cache : [],
	property : {
	
		headContainer: null,
		headlineTag: 'H2',
		activeTab: 0,
		idPrefix: 'tabBoxLink_'
	},

	
	setProperty : function(key, value) {
		
		this.property[key] = value;		
	},
	
	
	add : function(container, onOpen, onClose) {
		
		var item = {};
			item.container = container;
			item.onOpen = onOpen || null;
			item.onClose = onClose || null;
		
		this.cache.push(item);
	},
	
	
	
	init : function() {
	
		if (util.tabBox.cache.length > 0) {
			
			var headContainer = document.getElementById(util.tabBox.property.headContainer);
			
			if (headContainer) {
				
				var hash = window.location.hash.split("#")[1];

				var d, a, shadow;
			
				for (var t=0; t<util.tabBox.cache.length; t++) {
					
					var container = document.getElementById(util.tabBox.cache[t].container);
					
					if (container) {
						
						var title = container.getElementsByTagName(util.tabBox.property.headlineTag)[0];
					
						d = document.createElement('DIV');
						d.className = "tabHead";
						d.id = "tabHead_"+t;

						shadow = document.createElement('DIV');
						shadow.className = (t>0) ? "shadow" : "borderLeft";
							
						d.appendChild(shadow);
						
						a = document.createElement('A');
						a.id = util.tabBox.property.idPrefix+t;
						a.innerHTML = (title && title.firstChild) ? title.firstChild.nodeValue : 'undefined';
						
						if (hash == util.tabBox.cache[t].container) {
							
							util.tabBox.property.activeTab = t;
						}
						
						if (title) title.parentNode.removeChild(title);

						d.appendChild(a);

						headContainer.appendChild(d);
						
						if (env.isIE) {
							
							a.attachEvent("onclick", util.tabBox.selectTab);
						}
								
						else {
							
							a.addEventListener("click", util.tabBox.selectTab, false);
						}
					}
				}
				
				shadow = document.createElement('DIV');
				shadow.className = "shadow";
				
				headContainer.appendChild(shadow);
					

				d = document.createElement('DIV');
				d.className = "clear";
				
				document.getElementById(this.property['headContainer']).appendChild(d);
				
				if (!this.activeTab || this.activeTab > this.cache.length) this.activeTab = 0;
				
				this.selectTab(this.property.activeTab);
			}
		}
	},
	
	

	selectTab : function(e) {
		
		if (typeof e === NUMBER) {
			
			var index = e;
		}
		
		else {
		
			if (env.isIE) e.returnValue = false;
				else e.preventDefault();
			
			e = e.srcElement || e.target;
			
			var index = e.getAttribute('id').split(util.tabBox.property.idPrefix)[1];
		}

		if (index >= 0) {
	
			if (util.tabBox.property.activeTab != null) {
	
				document.getElementById("tabHead_"+util.tabBox.property.activeTab).className = "tabHead";
				document.getElementById(util.tabBox.cache[util.tabBox.property.activeTab].container).style.display = 'none';
				
				if (util.tabBox.cache[util.tabBox.property.activeTab].onClose !== null) {
					
					eval(util.tabBox.cache[util.tabBox.property.activeTab].onClose);
				}
			}
		
			document.getElementById("tabHead_"+index).className = "tabHead active";
			document.getElementById(util.tabBox.cache[index].container).style.display = 'block';
			
			if (util.tabBox.cache[index].onOpen !== null) {
				log(util.tabBox.cache[index].onOpen);
				eval(util.tabBox.cache[index].onOpen);
			}
			
			util.tabBox.property.activeTab = index;
		}
	},
	
	
	
	resetPlaceholder : function(id) {
		
		var node = document.getElementById(id);
		
		if (node) {
			
			var div = document.createElement('DIV');
				div.id = id;
			
			node.parentNode.replaceChild(div, node);
		}
	}

};


/*******************************************************************************
	ANIMATION
*******************************************************************************/

util.prototype.animation = function(div) {

	div.actionBuffer = {};
	div.busy = false;
	div.stack = [];
	
	div.instance = createInstance(div);
	
	
	function createInstance(div) {
		
		if (env.isIE) {
			
			if (!div.style.filter) div.style.filter = "alpha(opacity=100);";
		}
		
		else {
			
			if (!div.style.opacity) div.style.opacity = 1;
		}
		
		div.actionBuffer.opacity = null;
		
		if (div.getAttribute('id')) {
			
			var id = div.getAttribute('id');
		}
		
		else {
			
			var now = new Date().getTime();  
			var id = now+''+Math.round(Math.random()*1000);
			div.setAttribute('id', id);
		}
		
		return "document.getElementById('"+id+"').";
	}
	
	
	div.reset = function() {
		
		div.stack = [];
	}
	
	
	div.finish = function() {
		
		div.busy = false;
	
		if (div.stack.length > 0) {
			
			for (i in div.stack) {
				
				var e = div.stack[i];
				delete(div.stack[i]);
				eval(e);
				break;
			}
		}
	};
	
	
	div.onFinish = function(action) {
		
		div.stack.push(action);
	};
	
	
	div.slide = function(align, value, force) {
		
		if (div.busy && force !== true) {
			
			div.stack.push(div.instance+"slide('"+align+"', "+value+")");
		}
		
		else {
			
			div.busy = true;
		
			var left = parseInt(div.style.left.split('px')[0]);
			if (!left) left = 0;
			
			div.actionBuffer.start = left;
			div.actionBuffer.align = align;
			div.actionBuffer.target = parseInt(left) + parseInt(value);
			div.actionBuffer.dist = value;
			div.actionBuffer.step = 0;
			div.actionBuffer.slide = setInterval(div.instance+"slideStep();", util.config.speed);
		}
	};
	
	
	div.slideStep = function() {
	
		div.actionBuffer.step++;
	
		if (div.actionBuffer.step <= util.config.frames) {
			
			var pos = Math.ceil(div.actionBuffer.dist * Math.sin(div.actionBuffer.step * 1.5 / util.config.frames));
				pos = div.actionBuffer.start + pos;
				
			div.style[div.actionBuffer.align] = pos + 'px';
		}
		
		else {
	
			clearInterval(div.actionBuffer.slide);
			div.actionBuffer.slide = null;
			
			div.style[div.actionBuffer.align] = div.actionBuffer.target + 'px';
			
			div.finish();
		}
	};
	
	
	div.getOptacity = function() {
		
		try {
	
			if (env.isIE) {
				
				var o = div.style.filter.split('=')[1];
				if (o) o = parseInt(o.split(')')[0]/10);
				return o;
			}
			
			else {
				
				return parseInt(div.style.opacity*10);
			}
		}
		
		catch (e) {
			
			return null;
		}
	};
	
	
	div.fadeIn = function(force, lim) {
	
		if (div.busy && force !== true) {
			
			div.stack.push(div.instance+"fadeIn(false,"+lim+")");
		}
		
		else {
			
			div.busy = true;
			
			if (div.actionBuffer.fade) {
				
				clearInterval(div.actionBuffer.fade);
				div.actionBuffer.fade = null;
			}
	
			div.actionBuffer.incStep = 2;
			div.actionBuffer.opacity = div.getOptacity() || 0;
			div.actionBuffer.limit = lim || 10;
	
			if (div.actionBuffer.opacity != div.actionBuffer.limit) {
	
				if (util.config.doAnimation) {
	
					if (env.isIE) div.style.filter = "alpha(opacity="+(div.actionBuffer.opacity*10)+");";
						else div.style.opacity = div.actionBuffer.opacity/10;
					
					div.actionBuffer.fade = setInterval(div.instance+"fadeStep();", util.config.speed);
				}
				
				else {
	
					if (env.isIE) div.style.filter = "alpha(opacity="+(div.actionBuffer.limit*10)+");";
						else div.style.opacity = div.actionBuffer.limit/10;
					
					div.style.display = 'block';
	
					div.finish();
				}
			}
		}
	};
	
	
	div.fadeOut = function(force, lim) {
	
		if (div.busy && force !== true) {
	
			div.stack.push(div.instance+"fadeOut(false,"+lim+")");
		}
		
		else {
			
			div.busy = true;
			
			if (div.actionBuffer.fade) {
				
				clearInterval(div.actionBuffer.fade);
				div.actionBuffer.fade = null;
			}
	
			div.actionBuffer.incStep = -2;
			div.actionBuffer.opacity = div.getOptacity() || 10;
			div.actionBuffer.limit = lim || 0;
			
			if (div.actionBuffer.opacity != div.actionBuffer.limit) {
			
				if (util.config.doAnimation) {
	
					if (env.isIE) div.style.filter = "alpha(opacity="+(div.actionBuffer.opacity*10)+");";
						else div.style.opacity = div.actionBuffer.opacity/10;
			
					div.actionBuffer.fade = setInterval(div.instance+"fadeStep();", util.config.speed);
				}
				
				else {
					
					if (env.isIE) div.style.filter = "alpha(opacity="+(div.actionBuffer.limit*10)+");";
						else div.style.opacity = div.actionBuffer.limit/10;
					
					div.style.display = 'none';
					
					div.finish();
				}
			}
		}
	};
	
	
	div.fadeStep = function() {
	
		if (div.actionBuffer.fade) {
	
			div.actionBuffer.opacity += div.actionBuffer.incStep;
				
			if (env.isIE) div.style.filter = "alpha(opacity="+(div.actionBuffer.opacity*10)+");";
				else div.style.opacity = (div.actionBuffer.opacity/10);
	
			if (div.actionBuffer.opacity == div.actionBuffer.limit) {
				
				clearInterval(div.actionBuffer.fade);
				div.actionBuffer.fade = null;
				
				setTimeout(div.instance+"finish();", util.config.speed*5);
			}
		}
	}
};

	
	
/*******************************************************************************
	AUSTRIA-MAP
*******************************************************************************/

util.prototype.austriaMap = {

	imgCache : {

		vbg:{},
		tir:{},
		sbg:{},
		ktn:{},
		stmk:{},
		bgld:{},
		ooe:{},
		noe:{},
		wien:{}
	},
	
	property : {
		
		map: null,
		placeholder: null,
		imgPath: 'undefined'
	},

	setProperty : function(key, value) {
		
		this.property[key] = value;		
	},

	init : function() {
		
		if (util.austriaMap.property.map && util.austriaMap.property.placeholder) {
			
			util.austriaMap.imgCache.vbg.name = 'Vorarlberg';
			util.austriaMap.imgCache.tir.name = 'Tirol';
			util.austriaMap.imgCache.sbg.name = 'Salzburg';
			util.austriaMap.imgCache.ktn.name = 'K&auml;rnten';
			util.austriaMap.imgCache.stmk.name = 'Steiermark'; 
			util.austriaMap.imgCache.stmk.artl = ' in der'; 
			util.austriaMap.imgCache.bgld.name = 'Burgenland';
			util.austriaMap.imgCache.bgld.artl = ' im'; 
			util.austriaMap.imgCache.ooe.name = 'Ober&ouml;sterreich'; 
			util.austriaMap.imgCache.noe.name = 'Nieder&ouml;sterreich';
			util.austriaMap.imgCache.wien.name = 'Wien';
			
			for (img in util.austriaMap.imgCache) {
				
				if (img) {

					util.austriaMap.imgCache[img].img = new Image();
					util.austriaMap.imgCache[img].img.src = util.austriaMap.property.imgPath+img+".png";
				}
			}

			document.getElementById(util.austriaMap.property.placeholder).style.display = "block";
		}
	},

	select : function(id) {

		document.getElementById(util.austriaMap.property.placeholder).src = util.austriaMap.imgCache[id].img.src;
		util.fixPNGs(document.getElementById(util.austriaMap.property.placeholder).parentNode);
	},
	
	
	reset : function() {

		document.getElementById(util.austriaMap.property.placeholder).src = util.austriaMap.property.imgPath+"default.png";
		util.fixPNGs(document.getElementById(util.austriaMap.property.placeholder).parentNode);
	}
	
}	



/*******************************************************************************
	TOOLTIP
*******************************************************************************/
	
util.prototype.toolTip = {
	
	container: null,
	activeBox: null,
	cache: [],
			
	property : {
		
		autostart: true,
		idPrefix: 'toolTipContent_'
	},

	
	setProperty : function(key, value) {
		
		this.property[key] = value;		
	},

	
	init : function() {
		
		if (this.property.autostart == true) {

			var acros = document.getElementsByTagName('acronym');
			
			if (acros.length > 0) {
				
				util.toolTip.createBaseContainer();
				
				for (var i=0; i<acros.length; i++) {
					
					
					var div = document.createElement('DIV');
						div.id = util.toolTip.property.idPrefix+i
						div.className = 'toolTip';
						div.style.display = 'none';
						div.innerHTML = acros[i].getAttribute('title');
						
					util.toolTip.container.appendChild(div);
					util.toolTip.cache[i] = div;
					
					acros[i].id = 'toolTip_'+i;
					acros[i].removeAttribute('title');
					
					if (env.isIE) {
						
						acros[i].attachEvent("onmouseover", util.toolTip.open);
						acros[i].attachEvent("onmouseout", util.toolTip.close);
					}
							
					else {
						
						acros[i].addEventListener("mouseover", util.toolTip.open, false);
						acros[i].addEventListener("mouseout", util.toolTip.close, false);
					}
					
					
				}				
			}			
		}		
	},

	/*
	createBox : function(cid) {
	
		var dataDiv = document.getElementById('toolTipContent_' + cid);
	
		
	
		if (dataDiv) {
			
			div.innerHTML = dataDiv.innerHTML;
			dataDiv.parentNode.removeChild(dataDiv);
			
			var cl = dataDiv.className.split(' ');
			
			for (var i=1; i<cl.length; i++) {
				
				div.className += ' '+cl[i]; 
			}
		}
		
		div.id = util.toolTip.property.idPrefix+cid;
		div.className = 'toolTip';
		div.style.display = 'none';
		div.innerHTML
	
		util.toolTip.container.appendChild(div);
	
		util.toolTip.cache[cid] = div;
	},
	*/
	
	
	createBaseContainer : function() {
		
		var div = document.createElement('DIV');
			div.id = 'toolTipContainer';
		
		document.getElementsByTagName('DIV')[0].appendChild(div);
		
		util.toolTip.container = div;
	},
	
	
	open : function(e) {
	
		e = e.srcElement || e.target;
	
		var id = e.getAttribute('id');
		
		if (!id) {
			
			id = e.parentNode.getAttribute('id')
		}
		
		id = id.split('toolTip_')[1];
		
		if (id) {

			var box = document.getElementById(util.toolTip.property.idPrefix+id);
				box.style.display = 'block';
			
			util.toolTip.activeBox = box;
			
			document.onmousemove = util.toolTip.move;
		}
	},
	
	
	close : function(e) {
		
		util.toolTip.activeBox.style.display = 'none';
		util.toolTip.activeBox = null;
		document.onmousemove = null;
	},

	
	move : function(e) {
	
		if (util.toolTip.activeBox !== null) {
		
			if (env.isIE) {
				
				var x = window.event.clientX;
				var y = window.event.clientY;
				
				y += document.documentElement.scrollTop;			
			}
			
			else {
				
				var x = e.pageX;
				var y = e.pageY;
			}
			
			var h = util.toolTip.activeBox.offsetHeight;
			var bw = document.getElementsByTagName('BODY')[0].offsetWidth;
			
			x += 7;
			y -= (h+5);
			
			var lim = (x+7+200+15);
	
			if (lim > bw) x -= lim-bw;
	
			util.toolTip.activeBox.style.top = y + 'px';
			util.toolTip.activeBox.style.left = x + 'px';
		}
	}
			
			
}
	


/* POPUP */

function popUp(url,name,width,height) {
		
	var fenster = window.open(url,name,"width="+width+",height="+height+",toolbar=no,menubar=no,location=no,status=no,resizable=no,scrollbars=yes,top="+(screen.height/2 - height/2)+",left="+(screen.width/2 - width/2));
	return false;
}


// -->