function JSrot13(text) {var text = text.replace(/%/, "@");var rot13text_rotated = ""; /* the function will return this string */;for (i = 1 ; i < (text.length + 1); i++) {k = text.charCodeAt(i-1);if (k >= 97 && k <= 109) {k = k + 13;} else if (k >= 110 && k <= 122) {k = k - 13;} else if (k >= 65 && k <= 77) {k = k + 13;} else if (k >= 78 && k <= 90) {k = k - 13;}rot13text_rotated = rot13text_rotated + String.fromCharCode(k);}return rot13text_rotated;}function Securemail(maillink){var maillink_output;maillink_output = JSrot13(maillink);location.href= 'mailto:' + maillink_output;}function displaymailaddress(linktext){var linktext_output;linktext_output = JSrot13(linktext);linktext_output = linktext_output.replace(/@/, "<span style='display:none'> *secure E-Mailaddress* <\/span>@");document.write(linktext_output);}



/*
 * aScroller js
 * 
 * Copyright (C) 2005-2006
 * by Davide S. Casali
 * www.digitalhymn.com
 *
 * Last release: 2005-11-27
 *
 * Released under CC by-nc-sa 2.5
 * http://creativecommons.org/licenses/by-nc-sa/2.5/
 *
 */

/*
 * This is a simple JavaScript vertical scroller that is crossbrowser and also validates
 * as XHTML Strict.
 *
 * Usage:
 * (1) Define a <div> tag with a specified ID, containing the scrolling text. One <div> for each line.
 * (2) Define an INLINE CSS width and height (important, MUST be inline)
 * (3) Execute the divScroller function, passing id, mode (h or v),  speed (higher number means
 *     slower) and delay (in ms).
 *
 */

/****************************************************************************************************
 * Cross browser getElementByID.
 * From: www.quirksmode.org
 *
 * @param	id
 */
function getObj(name)
{
	if (document.getElementById)
	{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers)
	{
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
}

/****************************************************************************************************
 * Enables the scrolling for the specified div (matching id).
 *
 * @param	string id of the tag
 * @param	speed
 * @param	delay
 */
function divScroller(id, direction, speed, delay)
{
	if (document.getElementById)
	{
		// DOM3 = IE5+, NS6+, FF0.7+
		// *** Scroller
		var scroller = new getObj(id);
		
		// *** Debug force vars
		//scroller.style.height = "30px";
		//scroller.style.backgroundColor = "#FFEEEE";
		
		// *** Computed Styles
		//alert(scroller.obj.currentStyle.height);
		/*if (!scroller.style.height)
			if (scroller.obj.currentStyle)
				scroller.style.height = scroller.obj.currentStyle.height;
			else
				scroller.style.height = document.defaultView.getComputedStyle(scroller.obj, null).getPropertyValue("height");*/
		
		// *** Needed vars
		scroller.style.position = "relative";
		scroller.style.overflow = "hidden";
		
		// *** Generate scrolling inner <div>
		scroller.obj.innerHTML = "<div id=\"" + id + "_inner\">" + scroller.obj.innerHTML + "</div>";
		
		// *** Inner
		var inner = new getObj(id + "_inner");
		inner.style.position = "absolute";
		inner.style.left = parseInt(scroller.style.width) + "px";
		inner.style.top = parseInt(scroller.style.height) + "px";
		
		// *** Apply sub-styles
		//divScrollItemsStyler(id, direction);
		
		// *** Worker
		if (direction == "h" || direction == "horizontal")
		{
			// ****** HORIZONTAL
			// MouseOver: pauses the ticker
			scroller.obj.onmouseover = function() { divScroll_onMouseOver(id); };
			scroller.obj.onmouseout = function() { divScroll_onMouseOut(id); };
			
			// Create a temp element to evaluate the size (awful, but no better way to do this)
			fxpatch = navigator.userAgent.indexOf("Firefox") > -1 ? " left: -9000px;" : ""; // Firefox different CSS (on every other browser since IE5+ isn't needed)
			spanContent = "<span id=\"" + id + "_widthEval\" style=\"visibility: hidden; position: absolute; top: -100px; left: -1px; z-index: -10; white-space: nowrap;" + fxpatch + "\"><nobr>" + inner.obj.innerHTML + "</nobr></span>";
			if (document.createElement)
			{
				var span = document.createElement('span');
				span.innerHTML = spanContent;
				scroller.obj.appendChild(span);
			}
			else
			{
				document.write(spanContent);
			}
			var widthEval = new getObj(id + "_widthEval");
			
			// Setup the scrolling inner drawer
			inner.style.top = "0px";
			inner.style.whiteSpace = "nowrap";
			inner.style.width = widthEval.obj.offsetWidth + "px";
			limit = parseInt(inner.style.width);
			
			// Execute
			setTimeout("divScrollHelperH(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(speed));
		}
		else if (direction == "v" || direction == "vertical")
		{
			// ****** VERTICAL
			// Setup the scrolling inner drawer
			inner.style.left = "0px";
			inner.style.width = parseInt(scroller.style.width) + "px";
			limit = inner.obj.getElementsByTagName('div').length * parseInt(scroller.style.height);
			
			// Execute
			setTimeout("divScrollHelperV(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(speed));
		}
	}
}

/****************************************************************************************************
 * Helper for the HORIZONTAL scrolling for the specified div (matching id).
 * This is the real "ticker" function, executed to move the div.
 *
 * @param	string id of the tag
 * @param	pre-calculated height limit (to speed up execution)
 * @param	speed
 * @param	delay
 */
function divScrollHelperH(id, limit, speed, delay)
{
	if (document.getElementById)
	{
		// DOM3 = IE5+, NS6+, FF0.7+
		var scroller = new getObj(id);
		var inner = new getObj(id + "_inner");
		
		// *** Tick duration
		nextTick = speed;
		
		// *** Avoiding some errors
		if (!inner.style.left) inner.style.left = "0px";
		
		// *** Moving the inner div. At the end, restart.
		if (parseInt(inner.style.left) < -limit)
		{
			inner.style.left = parseInt(scroller.style.width) + "px";
		}
		else if (!scroller.obj.pause || scroller.obj.pause == false)
		{
			inner.style.left = (parseInt(inner.style.left) - 1) + "px";
			
			// Deceiving Opera8 stupidity
			//inner.style.width = parseInt(scroller.style.width) - (parseInt(inner.style.left) - 4) + "px";
		}
		
		// *** Bigger delay on item found
		// Skips borders to make transition without delays on loop
		/*if (!(parseInt(inner.style.left) == parseInt(scroller.style.width)) &&
			!(parseInt(inner.style.left) == -limit) &&
			(parseInt(inner.style.left) % parseInt(scroller.style.width)) == 0)
		{
			nextTick = delay;
		}*/
		
		// *** Tick!
		setTimeout("divScrollHelperH(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(nextTick));
	}
}

/****************************************************************************************************
 * Helper for the VERTICAL scrolling for the specified div (matching id).
 * This is the real "ticker" function, executed to move the div.
 *
 * @param	string id of the tag
 * @param	pre-calculated height limit (to speed up execution)
 * @param	speed
 * @param	delay
 */
function divScrollHelperV(id, limit, speed, delay)
{
	// DOM3 = IE5+, NS6+, FF0.7+
	var scroller = new getObj(id);
	var inner = new getObj(id + "_inner");
	
	// *** Tick duration
	nextTick = speed;
	
	// *** Avoiding some errors
	if (!inner.style.top) inner.style.top = "0px";
	
	// *** Moving the inner div. At the end, restart.
	if (parseInt(inner.style.top) < -limit)
	{
		inner.style.top = parseInt(scroller.style.height) + "px";
	}
	else
	{
		inner.style.top = (parseInt(inner.style.top) - 1) + "px";
	}
	
	// *** Bigger delay on item found
	// Skips borders to make transition without delays on loop
	if (!(parseInt(inner.style.top) == parseInt(scroller.style.height)) &&
		!(parseInt(inner.style.top) == -limit) &&
		(parseInt(inner.style.top) % parseInt(scroller.style.height)) == 0)
	{
		nextTick = delay;
	}
	
	// *** Tick!
	setTimeout("divScrollHelperV(\"" + id + "\", " + limit + ", " + speed + ", " + delay + ")", parseInt(nextTick));
}

/****************************************************************************************************
 * OnMouseOver helper for the HORIZONTAL scrolling for the specified div (matching id).
 *
 * @param	string id of the tag
 */
function divScroll_onMouseOver(id)
{
	var scroller = new getObj(id);
	scroller.obj.pause = true;
}

function divScroll_onMouseOut(id)
{
	var scroller = new getObj(id);
	scroller.obj.pause = false;
}

/****************************************************************************************************
 * Apply essential working styles to each <div> inside the scroller.
 *
 * @param	string id of the inner div
 */
function divScrollItemsStyler(id, direction)
{
	// DOM3 = IE5+, NS6+, FF0.7+
	var scroller = new getObj(id);
	var inner = new getObj(id + "_inner");
	
	elements = inner.obj.getElementsByTagName('div');
	
	for (var i = 0; i < elements.length; i++)
	{
		var item = elements.item(i);
		
		item.style.width = scroller.style.width;
	}
}















/***********************************************
* Random Order Content (from DIVs) script- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/

if (document.getElementById)
document.documentElement.className = 'jsclass'; //hide content for DOM capable browsers


var randomordercontentdisplay={
	divholders:new Object(),
	masterclass: "randomordercontent",

	init:function(){
		if (!document.getElementById)
			return
		var alldivs=document.getElementsByTagName("div")
		var randomcontentsearch=new RegExp(this.masterclass+"\\s+(group\\d+)", "i") //check for CSS class="randomcontent groupX" (x=integer)
		for (var i=0; i<alldivs.length; i++){
			if (randomcontentsearch.test(alldivs[i].className)){
				if (typeof this.divholders[RegExp.$1]=="undefined"){ //if object to hold this group of divs doesn't exist yet
					this.divholders[RegExp.$1]=new Object() //create object
					this.divholders[RegExp.$1].ref=[] //create array to hold each div within group
					this.divholders[RegExp.$1].contents=[] //create array to hold each div's content within group
				}
					this.divholders[RegExp.$1].ref.push(alldivs[i]) //add this div to the array
					this.divholders[RegExp.$1].contents.push(alldivs[i].innerHTML) //add this div's content to the array
			}
		}
	this.scrambleorder()
	},

	scrambleorder:function(){
		for (group in this.divholders){ //loop thru each array within object
			this.divholders[group].contents.sort(function() {return 0.5 - Math.random()}) //scramble contents array
			for (var i=0; i<this.divholders[group].ref.length; i++){
				this.divholders[group].ref[i].innerHTML=this.divholders[group].contents[i]
				this.divholders[group].ref[i].style.display="block"
			}
		}
	}
}








function stripeTables() {
	var tables = document.getElementsByTagName("table");
	var addClassName = " row_dark";
	for (var i=0; i<tables.length; i++) {
		if (tables[i].className.search(/edit_Farbige_Tabelle/)!=-1) {
			var rows = tables[i].getElementsByTagName("tr");
			for (var j=0; j<rows.length; j=j+1) {
				if (rows[j].className.search(/nocolor/)==-1) {
					rows[j].className = rows[j].className + addClassName;
					if (addClassName == " row_dark") {addClassName = ""} else {addClassName = " row_dark"}
				} else {
					rows[j].className = "transp";
				}
			}
		}
	}
}

function trim(str){
while(str.substring(0,1)==' ')str=str.substring(1,str.length);
while(str.substring(str.length-1,str.length)==' ')str=str.substring(0,str.length-1);
return str;
}




function showMessage(){
var content = ""
var maxlen
var hinweise = document.getElementsByName("Hinweis_MSG");
for (var i=0; i<hinweise.length; i++) {

	content = content + hinweise[i].innerHTML;


hinweise[i].style.display = "none";

}

if (trim(content) != "") {
	document.getElementById ('formular_meldung').innerHTML = content;

 TagToTip('formular_meldung', STICKY, true, CLOSEBTN,true,BORDERWIDTH,2,BORDERCOLOR,'#9BDF37',BGCOLOR, '#EBFFCF',TITLE,'Hinweis',PADDING,10,WIDTH,400,CENTERWINDOW,true,CENTERALWAYS,false);
document.getElementById ('formular_meldung').style.display = "none";
	}
}


Event.observe(window, 'load', function() { window.setTimeout("showMessage()",20) });
Event.observe(window, 'load', function() { stripeTables() }); 

