


function loadComplete(){
	parseExternalLinks();
	
}




function popup(obj,w,h) {
	var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
	if (!url) return true;
	if(w && h){
		var args = 'width='+w+',height='+h+',resizable=yes,scrollbars=yes';
	}
	else{
		var args = 'resizable=yes,hotkeys=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes';
	}
	pop = window.open(url,'',args);
	return (pop) ? false : true;
}



function parseExternalLinks(){
	for(i=0; i<document.getElementsByTagName("a").length; i++){
		zwobj = document.getElementsByTagName("a")[i];
		if((zwobj.getAttribute) ? zwobj.getAttribute('rel') == "external" : zwobj.rel == "external"){
			zwobj.onclick = function(){
				return popup(this);	
			}
		}
		else if((zwobj.getAttribute) ? zwobj.getAttribute('target') : zwobj.target == "_blank"){
			zwobj.onclick = function(){
				return popup(this);
			}
			zwobj.target="";
		}
	}
}



function getNewHttpObject() {
    var objType = false;
    try {
        objType = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        try {
            objType = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e) {
            objType = new XMLHttpRequest();
        }
    }
    return objType;
}

function getsrc(url,elementContainer){
	document.getElementById(elementContainer).innerHTML = '<blink>Loading...<\/blink>';
	var theHttpRequest = getNewHttpObject();
	theHttpRequest.onreadystatechange = function() {processAXAH(elementContainer);};
	theHttpRequest.open("GET", url);
	theHttpRequest.send(false);
	function processAXAH(elementContainer){
	   if (theHttpRequest.readyState == 4) {
		   if (theHttpRequest.status == 200) {
			   document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
		   } else {
			   document.getElementById(elementContainer).innerHTML="<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>";
		   }
	   }
	}			
}



function Calender(obref, lang){
	var self = this;
	this.obref = obref;
	this.day_names_l = new Array();
	this.month_names_l = new Array();
	this.day_names_l['de'] = new Array('Mo','Di','Mi','Do','Fr','Sa','So');
	this.month_names_l['de'] = new Array('Jänner','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember');
	this.day_names_l['en'] = new Array('Mo','Tu','We','Th','Fr','Sa','Su');
	this.month_names_l['en'] = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
	this.day_names_l['fr'] = new Array('Lu','Ma','Me','Je','Ve','Sa','Di');
	this.month_names_l['fr'] = new Array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre');
	this.day_names_l['it'] = new Array('Lun','Mar','Mer','Gio','Ven','Sab','Dom');
	this.month_names_l['it'] = new Array('gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre');
	this.day_names = this.day_names_l[lang];
	this.month_names = this.month_names_l[lang];
	this.days = new Array();
	
	this.init = function(){
		html_output = '<div class="jsc_head"><a class="jsc_back" href="javascript:void(0);">&laquo;</a><h2></h2><a class="jsc_next" href="javascript:void(0);">&raquo;</a></div>\n';
		html_output += '<div class="jsc_body">\n';
		for(i=0;i<7;i++){
			html_output += '<span>' + self.day_names[i] + '</span>\n';
		}
		zw=0;
		for(i=0;i<41;i++){
			zw++;
			if(zw==6 || zw==7){
				html_output += '<a href="javascript:void(0);" class="jsc_special"></a>\n';
			}
			else{
				html_output += '<a href="javascript:void(0);"></a>\n';
			}
			if(zw==7){
				zw=0;
			}
		}
		html_output += '<a class="jsc_close" href="javascript:void(0);">x</a>\n';
		html_output += '</div>';
		self.obref.innerHTML = html_output;
		self.obref.getElementsByTagName('a')[self.obref.getElementsByTagName('a').length-1].onclick = function(){
			self.hide();
		}
		self.obref.getElementsByTagName('a')[0].onclick = function(){
			if(self.akt_month>1){
				self.setDate(self.akt_month-1, self.akt_year);
			}
			else{
				self.setDate(12, self.akt_year-1);
			}
		}
		self.obref.getElementsByTagName('a')[1].onclick = function(){
			if(self.akt_month<12){
				self.setDate(self.akt_month+1, self.akt_year);
			}
			else{
				self.setDate(1, self.akt_year+1);
			}
		}
		for(i=2;i<43;i++){
			self.obref.getElementsByTagName('a')[i].onclick = function(){
				self.itemOnClick(this);
			}
		}
		zw = new Date();
	}
	
	this.show = function(){
		self.obref.style.display = 'block';
	}
	
	this.hide = function(){
		self.obref.style.display = 'none';	
	}
	
	this.setDate = function(month, year){
		self.akt_month = month;
		self.akt_year = year;
		blankdays = new Date(year,month-1,1).getDay();
		blankdays += -1;
		if(blankdays<0){
			blankdays=6;
		}
		for(i=27;month-1==new Date(year,month-1,i).getMonth();i++){
			maxdays = i;
		}
		for(i=0;i<blankdays+1;i++){
			self.days[i] = '';
		}
		for(i=i-1;i<maxdays+blankdays;i++){
			self.days[i] = i-blankdays+1;
		}
		for(;i<41;i++){
			self.days[i] = '';
		}
		self.aktualHTML();
	}
	
	this.aktualHTML = function(){
		self.obref.getElementsByTagName('h2')[0].innerHTML = self.month_names[self.akt_month-1] + ' ' + self.akt_year;
		for(i=0;i<self.days.length;i++){
			self.obref.getElementsByTagName('a')[i+2].innerHTML = self.days[i];
			self.obref.getElementsByTagName('a')[i+2].className = self.obref.getElementsByTagName('a')[i+2].className.replace(/jsc_blank/gi, '');
			if(self.days[i]==""){
				self.obref.getElementsByTagName('a')[i+2].className += " jsc_blank";
			}
		}
	}
	
	this.itemOnClick = function(obj){
		if(obj.innerHTML!=''){
			self.callBackFunction(obj.innerHTML*1,self.akt_month,self.akt_year);
		}
	}
	this.hide();
	this.init();
	self.setDate(zw.getMonth()+1,zw.getFullYear());
}

function getCurrentStyle(obj, prop){  // Gibt den Wert des abgefragten CSS-Wertes zurück
	if(document.defaultView && document.defaultView.getComputedStyle){
		if(document.defaultView.getComputedStyle(obj,"").getPropertyValue(prop)){
			return document.defaultView.getComputedStyle(obj,"").getPropertyValue(prop);
		}
		return "";
	}
	else if(window.getComputedStyle){
		if(window.getComputedStyle(obj,"").getPropertyValue(prop)){
			return window.getComputedStyle(obj,"").getPropertyValue(prop);
		}
		return "";
	}
	else if(obj.currentStyle){
		if(obj.currentStyle.getAttribute(prop.replace(/\-/g, ""))){
			return obj.currentStyle.getAttribute(prop.replace(/\-/g, ""));
		}
		return "";
	}
	else{
		if(obj.style.getAttribute(prop.replace(/\-/g, ""))){
			return obj.style.getAttribute(prop.replace(/\-/g, ""));
		}
		return "";
	}
}

function parseAufklapp(object){
	zh2=0;
	for(i=0; i<object.childNodes.length; i++){
		if(object.childNodes[i].nodeName.toLowerCase() == "h2"){
			object.childNodes[i].className += " closed";
			object.childNodes[i].number = zh2;
			object.childNodes[i].innerHTML = '<a href="javascript:void(0);" id="atipp_'+zh2+'"><span>Details einblenden &nbsp; </span>' + object.childNodes[i].innerHTML + '</a>';
			object.childNodes[i].getElementsByTagName("a")[0].onclick = function(){
				if(document.getElementById("divtipp_" + this.parentNode.number).className == "closed"){
					document.getElementById("divtipp_" + this.parentNode.number).className = "opened";
					this.className = "opened";
					this.getElementsByTagName("span")[0].innerHTML = "Details ausblenden &nbsp;";
				}
				else{
					document.getElementById("divtipp_" + this.parentNode.number).className = "closed";
					this.getElementsByTagName("span")[0].innerHTML = "Details einblenden &nbsp;";
					this.className = "";
				}
				this.blur();
			}
			zh2++;
		}
		else if(object.childNodes[i].nodeName.toLowerCase() == "div"){
			object.childNodes[i].className = "closed";
			object.childNodes[i].number = zh2-1;
			object.childNodes[i].id = "divtipp_" + (zh2-1);
		}
	}
	if(document.location.hash.split('#').join('')!=""){
		document.getElementById("atipp_" + document.location.hash.split('#').join('')).onclick();
	}
}


function parseSections(object, lang){
	zh2=0;
	if(lang=="de"){
		txt_einbl = "Details einblenden&nbsp;";
		txt_ausbl = "Details einblenden&nbsp;";
	}
	else if(lang=="it"){
		txt_einbl = "mostrare dettagli&nbsp;";
		txt_ausbl = "chiudere dettagli&nbsp;";
	}
	else{
		txt_einbl = "Show details&nbsp;";
		txt_ausbl = "Hide details&nbsp;";
	}
	for(i=0; i<object.childNodes.length; i++){
		if(object.childNodes[i].nodeName.toLowerCase() == "h2"){
			object.childNodes[i].className += " closed";
			object.childNodes[i].number = zh2;
			object.childNodes[i].innerHTML = '<a href="javascript:void(0);" id="atipp_'+zh2+'"><span>' + txt_einbl + '</span>' + object.childNodes[i].innerHTML + '</a>';
			object.childNodes[i].getElementsByTagName("a")[0].onclick = function(){
				if(document.getElementById("divtipp_" + this.parentNode.number).className == "closed"){
					document.getElementById("divtipp_" + this.parentNode.number).className = "opened";
					this.className = "opened";
					this.getElementsByTagName("span")[0].innerHTML = txt_ausbl;
				}
				else{
					document.getElementById("divtipp_" + this.parentNode.number).className = "closed";
					this.getElementsByTagName("span")[0].innerHTML = txt_einbl;
					this.className = "";
				}
				this.blur();
			}
			zh2++;
		}
		else if(object.childNodes[i].nodeName.toLowerCase() == "div"){
			object.childNodes[i].className = "closed";
			object.childNodes[i].number = zh2-1;
			object.childNodes[i].id = "divtipp_" + (zh2-1);
		}
	}
	if(document.location.hash.split('#').join('')!=""){
		document.getElementById("atipp_" + document.location.hash.split('#').join('')).onclick();
	}
}


pspopupcount = 0;
zindexcount = 100;
function psPopup(width, height, src, title){
	pspopupcount++;
	mypopup = document.createElement("div");
	mypopup.id = "pspopup_" + pspopupcount;
	mypopup = document.body.appendChild(mypopup);
	mypopup.appendChild(document.createElement("div"));
	mypopup.appendChild(document.createElement("div"));
	mypopup.getElementsByTagName("div")[0].appendChild(document.createElement("a"));
	mypopup.getElementsByTagName("div")[0].appendChild(document.createTextNode(title));
	mypopup.className = "pspopup";
	mypopup.getElementsByTagName("div")[0].className = "pspopup_title";
	mypopup.getElementsByTagName("div")[1].className = "pspopup_content";
	mypopup.getElementsByTagName("div")[1].id = "pspopupc_" + pspopupcount;
	mypopup.getElementsByTagName("div")[0].getElementsByTagName("a")[0].className = "pspopup_close";
	mypopup.getElementsByTagName("div")[0].getElementsByTagName("a")[0].href = 'javascript:void(0);';
	mypopup.getElementsByTagName("div")[0].getElementsByTagName("a")[0].onclick = function(){
		psPopupClose(this.parentNode.parentNode);
	}
	if(width!=""){
		mypopup.style.width = width;
	}
	else{
		mypopup.style.float = "left";
	}
	if(height!=""){
		mypopup.style.height = height;
	}
	mypopup.style.left = "200px";
	mypopup.style.top = "150px";
	mypopup.style.zIndex = zindexcount;
	zindexcount++;
	mypopup.getElementsByTagName("div")[0].onmousedown = function(e){
		psPopupDrag(this.parentNode, e);
	}
	if(src.search(/\.jpg$/)!=-1 || src.search(/\.bmp$/)!=-1 || src.search(/\.jpeg$/)!=-1 || src.search(/\.gif$/)!=-1 || src.search(/\.png$/)!=-1){
		mypopup.getElementsByTagName("div")[1].innerHTML = '<img src="' + src + '" />';
	}
	else{
		getsrc(src, mypopup.getElementsByTagName("div")[1].id);
	}
}
function psPopupClose(object){
	object.parentNode.removeChild(object);
}
function psPopupDrag(object, e){
	akt_object = object;
	object.style.zIndex = zindexcount;
	zindexcount++;
	object.firstx = getMousePos(e)[0];
	object.firsty = getMousePos(e)[1];
	object.firstpx = object.style.left.replace(/(.*)px/, "$1")*1;
	object.firstpy = object.style.top.replace(/(.*)px/, "$1")*1;
}
function psPopupDragIng(e){
	if(akt_object){
		if(akt_object.firstx){
			akt_object.style.left = akt_object.firstpx - (akt_object.firstx-getMousePos(e)[0]) + "px";
			akt_object.style.top = akt_object.firstpy - (akt_object.firsty-getMousePos(e)[1]) + "px";
			if(akt_object.style.left.replace(/(.*)px/, "$1")*1<0){
				akt_object.style.left="0px";
			}
			if(akt_object.style.top.replace(/(.*)px/, "$1")*1<0){
				akt_object.style.top="0px";
			}
		}
	}
}
function psPopupDrop(object){
	akt_object = false;
	object.firstx = false;
	object.firsty = false;
}
function getMousePos(e) {
	if (document.all) {
		mousex=event.x + document.documentElement.scrollLeft; 
		mousey=event.y + document.documentElement.scrollTop;
	}
	else {mousex=e.pageX; mousey=e.pageY;}
	return new Array(mousex, mousey);
}
document.onmousemove = function(e){
	psPopupDragIng(e);
}
document.onmouseup = function(e){
	akt_object = false;
}
akt_object=false;

// -->


<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->

document.write('<script language="VBScript" type="text/vbscript"\> \n');
document.write('// Visual basic helper required to detect Flash Player ActiveX control version information\n');
document.write('Function VBGetSwfVer(i)\n');
document.write('  on error resume next\n');
document.write('  Dim swControl, swVersion\n');
document.write('  swVersion = 0\n');
document.write('  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('  if (IsObject(swControl)) then\n');
document.write('    swVersion = swControl.GetVariable("$version")\n');
document.write('  end if\n');
document.write('  VBGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('//\n ');
document.write('</script\>');

<!-- // Detect Client Browser type

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// Cant detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
{

 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// loop backwards through the versions until we find the newest version	
	
	for (i=25;i>0;i--) {	
		
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
			
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		
		
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
}

// Version check based upon the values entered above in "Globals"
var fl = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);






function drawFlash(pfad, width, height, wmode, bgcolor, id, alt, rw){
	ausgabe = "";
	if(fl){
		params = false;
		if(pfad.indexOf("?") != -1){
			params = pfad.split("?")[1];
			pfad = pfad.split("?")[0];
		}
		ausgabe += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" name="flash" width="' + width + '" id="' + id + '" height="' + height + '" align="middle">';
		ausgabe += '<param name="allowScriptAccess" value="sameDomain" />';
		if(wmode!=""){ausgabe += '<param name="wmode" value="' + wmode + '" />';}
		if(bgcolor!=""){ausgabe += '<param name="bgcolor" value="' + bgcolor + '" />';}
		if(params){ausgabe += '<param name="flashvars" value="' + params + '" />';}
		ausgabe += '<param name="movie" value="' + pfad + '" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />';
		ausgabe += '<embed src="' + pfad + '" width="' + width + '" height="' + height + '"';
		if(wmode!=""){ausgabe += ' wmode="' + wmode + '"';}
		if(bgcolor!=""){ausgabe += ' bgcolor="' + bgcolor + '"';}
		if(params){ausgabe += ' flashvars="' + params + '"';}
		ausgabe += ' menu="false" align="middle" quality="high" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flash" />';
		ausgabe += '</object>';
	}
	else{
		ausgabe += alt;
	}
	if(rw){
		document.write(ausgabe);
	}
	return ausgabe;
}


var zxr=1;

function showtest(){
	if (zxr==1){
	showIn();
	}else{
	showOut();
}
}

function showOut(){
	if(zxr==0){
	document.getElementById("korper").style.display="none";
	zxr=1;
	}
	}
function showIn(){	
	if(zxr==1){
	document.getElementById("korper").style.display="block";
	zxr=0;
	}
	}

var zxr2=1;

function showtest2(){
	if (zxr2==1){
	showIn2();
	}else{
	showOut2();
}
}

function showOut2(){
	if(zxr2==0){
	document.getElementById("korper2").style.display="none";
	zxr2=1;
	}
	}
function showIn2(){	
	if(zxr2==1){
	document.getElementById("korper2").style.display="block";
	zxr2=0;
	}
	}


function DrMenu(menuid){
	var self = this;
	this.menuid = menuid;
	this.active_items = new Array();  // Array für aktive Elemente
	this.html_menu = document.getElementById(this.menuid);  // Referenz auf die UL des Menus
	this.menu_event = "over"; // over oder click möglich
	this.show_parent_active = true; // wenn der/die Parent(s) aktiv bleiben sollen wird über die .hover classe gesteuert
	this.linkOut = true;  // ob beim überfahren einens anderen Menüpunktes das aktive Submenu verschwinden soll.
	this.needIeSelectBoxBugFix = ((navigator.appVersion.indexOf("MSIE 5") != -1 || navigator.appVersion.indexOf("MSIE 6") != -1) && navigator.userAgent.indexOf("Opera")==-1); // ob der IeSelectBoxBug gefixt werden muss
	this.init = function(){
		this.html_menu.obref = this;  // Referenz auf das DrMenu-Object
		this.html_menu.innerHTML = this.html_menu.innerHTML.replace(/<UL([^>]*)>/gi, '<div$1>').replace(/<\/UL>/gi, "</div>").replace(/<LI([^>]*)>/gi, '<span$1>').replace(/<\/LI>/gi, "</span>");  // ul wird durch div ersetzt und li durch span
		for(i=0; i<this.html_menu.getElementsByTagName("a").length; i++){  // Ereignissfunktionen werden gesetzt
			if(this.menu_event=="over" && this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div").length>0){  // Wenn der Link ein Submenü beinhaltet
				this.html_menu.getElementsByTagName("a")[i].onmouseover = this.itemOver;
				this.html_menu.getElementsByTagName("a")[i].onmouseout = this.itemOut;
				this.html_menu.getElementsByTagName("a")[i].className += " nextlevel";
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].onmouseover = this.drOver;
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].onmouseout = this.drOut;
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].style.display = "block";  // Das Submenü wird sichtbar gemacht (für die Breitenfeststellung nötig)
				this.setClassWidth(this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0]);  // Breitenfeststellung und Setzung
			}
			else if(this.menu_event=="over" && this.linkOut){  // Wenn der Link kein Submenü beinhaltet
				this.html_menu.getElementsByTagName("a")[i].onmouseover = this.lwsmItemOver;
			}
			else if(this.menu_event=="click" && this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div").length>0){
				this.html_menu.getElementsByTagName("a")[i].onclick = this.itemOver;
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].style.display = "block";  // Das Submenü wird sichtbar gemacht (für die Breitenfeststellung nötig)
				this.setClassWidth(this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0]);  // Breitenfeststellung und Setzung
			}
		}
		for(i=this.html_menu.getElementsByTagName("a").length-1; i>=0; i--){
			if(this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div").length>0){
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].style.display = "none";
				this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].style.width = this.html_menu.getElementsByTagName("a")[i].parentNode.getElementsByTagName("div")[0].zw_width
			}
		}
	}
	this.lwsmItemOver = function(){
		for(i=0; i<this.parentNode.parentNode.getElementsByTagName("div").length; i++){
			if(this.parentNode.parentNode.getElementsByTagName("div")[i].style.display == "block"){
				self.itemOutTime(this.parentNode.parentNode.getElementsByTagName("div")[i].parentNode.getElementsByTagName("a")[0]);
			}
		}
	}
	this.itemOver = function(){
		zw = true;
		for(i=0; i<this.parentNode.getElementsByTagName("div").length; i++){
			if(this.parentNode.getElementsByTagName("div")[i].style.display == "block"){
				zw=false;
				break;
			}
		}
		if(zw){		
			for(i=0; i<	self.active_items.length; i++){
				self.itemOutTime(self.active_items[i]);
			}
			old_items = self.active_items;
			self.active_items = new Array();
			for(zw=this;zw; zw=zw.parentNode.parentNode.parentNode.getElementsByTagName("a")[0]){
				if(!zw.parentNode.getElementsByTagName("div")[0]){
					zw=false;
					break;
				}
				zw.parentNode.getElementsByTagName("div")[0].style.display = "block";
				self.active_items[self.active_items.length] = zw;
				if(zw.parentNode.parentNode.id==self.menuid){
					zw=false;
					break;
				}
			}
		}
		this.parentNode.getElementsByTagName("div")[0].style.display = "block";
		if(self.show_parent_active){
			this.className += " hover";
		}
		if(old_items){
			for(i=0; i<old_items.length; i++){
				zw=false;
				for(j=0; j<self.active_items.length; j++){
					if(old_items[i].parentNode.innerHTML == self.active_items[j].parentNode.innerHTML){
						zw=true;
						break;
					}
				}
				if(!zw){
					self.itemOutTime(old_items[i]);
				}
			}
			old_items = false;
		}
		if(this.timeout){
			clearTimeout(this.timeout);
		}
	}
	this.drOver = function(){
		this.parentNode.getElementsByTagName("a")[0].onmouseover();
	}
	this.drOut = function(){
		this.parentNode.getElementsByTagName("a")[0].onmouseout();
	}
	this.itemOut = function(){
		this.timeout = setTimeout(function(a,b) { return function() { b.itemOutTime(a); } } (this,self), 300);
	}
	this.itemOutTime = function(object){
		object.parentNode.getElementsByTagName("div")[0].style.display = "none";
		object.className = object.className.replace(/hover/g, "");
	}
	this.setClassWidth = function(object){
		maxwidth = 0;
		for(j=0; j<object.childNodes.length; j++){
			if(object.childNodes[j].getElementsByTagName){
				if(object.childNodes[j].getElementsByTagName("a")[0].offsetWidth>maxwidth){
					maxwidth = object.childNodes[j].getElementsByTagName("a")[0].offsetWidth;
				}
			}
		}
		for(j=0; j<object.childNodes.length; j++){
			if(object.childNodes[j].getElementsByTagName){
				if((maxwidth - getCurrentStyle(object.childNodes[j].getElementsByTagName("a")[0], 'padding-left').replace(/px/, "") - getCurrentStyle(object.childNodes[j].getElementsByTagName("a")[0], 'padding-right').replace(/px/, "")) < 0){
					object.childNodes[j].getElementsByTagName("a")[0].style.width = "0px";
				}
				else{
					object.childNodes[j].getElementsByTagName("a")[0].style.width = (maxwidth - getCurrentStyle(object.childNodes[j].getElementsByTagName("a")[0], 'padding-left').replace(/px/, "") - getCurrentStyle(object.childNodes[j].getElementsByTagName("a")[0], 'padding-right').replace(/px/, "")) + "px";
				}
				if(navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1){
					object.childNodes[j].getElementsByTagName("a")[0].style.width = maxwidth;
				}
				if(object.childNodes[j].getElementsByTagName("div").length>0){
					object.childNodes[j].getElementsByTagName("div")[0].style.left = maxwidth + "px";
				}
			}
		}
		object.zw_width = maxwidth + "px";
		if(self.needIeSelectBoxBugFix){  // Nur für IE 5 bis 6
			zw_iframe = document.createElement("iframe");
			object.insertBefore(zw_iframe, object.firstChild);
			zw_iframe.style.position = "absolute";
			zw_iframe.style.filter = 'alpha(opacity=0)';
			zw_iframe.style.left = (getCurrentStyle(object, "border-left-width").replace(/px/g, "")*(-1)) + (getCurrentStyle(object, "padding-left").replace(/px/g, "")*(-1)) + "px";
			zw_iframe.style.top = (getCurrentStyle(object, "border-top-width").replace(/px/g, "")*(-1)) + (getCurrentStyle(object, "padding-top").replace(/px/g, "")*(-1)) + "px";
			zw_iframe.style.width = (object.zw_width.replace(/px/g, "")*1) + (getCurrentStyle(object, "border-left-width").replace(/px/g, "")*1) + (getCurrentStyle(object, "border-right-width").replace(/px/g, "")*1) + (getCurrentStyle(object, "padding-left").replace(/px/g, "")*1) + (getCurrentStyle(object, "padding-right").replace(/px/g, "")*1) + "px";
			zw_iframe.style.height = (object.offsetHeight*1) + (getCurrentStyle(object, "border-top-width").replace(/px/g, "")*1) + (getCurrentStyle(object, "border-bottom-width").replace(/px/g, "")*1) + (getCurrentStyle(object, "padding-top").replace(/px/g, "")*1) + (getCurrentStyle(object, "padding-bottom").replace(/px/g, "")*1) + "px";
		}
	}
}




//window.addEvent('domready', function(){
//	parseExternalLinks();
//	
//});


function DoDelete(params,text) {
    if (confirm(text)){
	    window.location = params;
    }
}

function DoDone(params,text) {
    if (confirm(text)){
	    window.location = params;
    }
}

function DeleteRow(params,text) {
    if (confirm(text)){
	document.getElementById(params).style.display= "none";
	document.getElementById(params+'_status').value = 'deleted';
    }
}


//Function used to update page content with new xhtml fragments by using a javascript object, the dom, and http.
function add_row(url,elementContainer){
    var microtime = 0;
    
    today = new Date();
    microtime = today.getMilliseconds() + today.getSeconds()*1000 + today.getMinutes()*60*1000 + today.getHours()*60*60*1000;

    var url = url + "&" + microtime;
    var theHttpRequest = getNewHttpObject();
    
    
    theHttpRequest.onreadystatechange = function() {processNEWROW(elementContainer);};
    theHttpRequest.open("GET", url);
    theHttpRequest.send(false);

    function processNEWROW(elementContainer){
        if (theHttpRequest.readyState == 4) {
            if (theHttpRequest.status == 200) {
                var wrapper = document.getElementById(elementContainer);
                var newrow = document.createElement("div");
                wrapper.appendChild(newrow);
                newrow.innerHTML = theHttpRequest.responseText;							
            } 
        }
    }
}