// JavaScript Document

/*******************************************************************************/
/*                                                                             */
/* Es dient dazu, das Drop-Down-Menue der Direkt-Zu-Funktion in Portalseiten   */
/* zu steuern                                                                  */
/*                                                                             */
/*******************************************************************************/

<!-- hide this script from non-javascript-enabled browsers

function Go(quick1)
{
 if(quick1 == "nothing")
 {
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   return;
 }
 else
 {
   Woerter=quick1.split(" ");
   if (Woerter.length > 1)
   {
     switch(Woerter[0])
     {
       case "_self":
         top.location.href=Woerter[1]
         break;
       case "_blank":
         window.open(Woerter[1])
         break;
     }
   }else{
     top.location.href=quick1;
   }
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
 }

}
// stop hiding -->

/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/

/*******************************************************************************/
/*                                                                             */
/* Das Skript dient dazu, PopUps gesteuer öffnen zu können                     */
/*                                                                             */
/*******************************************************************************/

<!-- hide this script from non-javascript-enabled browsers
  function oeffneFenster(url, name, breite, hoehe){
  myWin = window.open(url, name, 'width='+breite+',height='+hoehe+',toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no');
  myWin.moveTo(100,100);
  myWin.focus();
  }
  function kontakt(){
  oeffneFenster('kontakt_html','Zweitfenster',450,280);
  }
// stop hiding -->

/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/

/*******************************************************************************/
/*                                                                             */
/* Saemtliche Rechte: Aktion Mensch - Einfach fuer Alle */
/* Lizenzbedingungen zur freien Nutzung: http://www.einfachfueralle.de/lizenz/ */
/*                                                                             */
/* Das Skript ist Teil des Komplexes zum Vergrößern und Vergkleinern der       */
/* Schrift auf Webseiten                                                       */
/*                                                                             */
/*                                                                             */
/*******************************************************************************/

<!-- hide this script from non-javascript-enabled browsers

function Cookiemanager(name,defaultExpiration,expirationUnits,defaultDomain,defaultPath) {
	this.name = name;
	this.defaultExpiration = this.getExpiration(defaultExpiration,expirationUnits);
	this.defaultDomain = (defaultDomain)?defaultDomain:(document.domain.search(/[a-zA-Z]/) == -1)?document.domain:document.domain.substring(document.domain.indexOf('.') + 1,document.domain.length);
	this.defaultPath = (defaultPath)?defaultPath:'/';
	this.cookies = new Object();
	this.expiration = new Object();
	this.domain = new Object();
	this.path = new Object();
	window.onunload = new Function (this.name+'.setDocumentCookies();');
	this.getDocumentCookies();
	}
Cookiemanager.prototype.getExpiration = function(expiration,units) {
	expiration = (expiration)?expiration:7;
	units = (units)?units:'days';
	var date = new Date();
	switch(units) {
		case 'years':
			date.setFullYear(date.getFullYear() + expiration);
			break;
		case 'months':
			date.setMonth(date.getMonth() + expiration);
			break;
		case 'days':
			date.setTime(date.getTime()+(expiration*24*60*60*1000));
			break;
		case 'hours':
			date.setTime(date.getTime()+(expiration*60*60*1000));
			break;
		case 'minutes':
			date.setTime(date.getTime()+(expiration*60*1000));
			break;
		case 'seconds':
			date.setTime(date.getTime()+(expiration*1000));
			break;
		default:
			date.setTime(date.getTime()+expiration);
			break;
		}
	return date.toGMTString();
	}
Cookiemanager.prototype.getDocumentCookies = function() {
	var cookie,pair;
	var cookies = document.cookie.split(';');
	var len = cookies.length;
	for(var i=0;i < len;i++) {
		cookie = cookies[i];
		while (cookie.charAt(0)==' ') cookie = cookie.substring(1,cookie.length);
		pair = cookie.split('=');
		this.cookies[pair[0]] = pair[1];
		}
	}
Cookiemanager.prototype.setDocumentCookies = function() {
	var expires = '';
	var cookies = '';
	var domain = '';
	var path = '';
	for(var name in this.cookies) {
		expires = (this.expiration[name])?this.expiration[name]:this.defaultExpiration;
		path = (this.path[name])?this.path[name]:this.defaultPath;
		domain = (this.domain[name])?this.domain[name]:this.defaultDomain;
		cookies = name + '=' + this.cookies[name] + '; expires=' + expires + '; path=' + path + '; domain=' + domain;
		document.cookie = cookies;
		}
	return true;
	}
Cookiemanager.prototype.getCookie = function(cookieName) {
	var cookie = this.cookies[cookieName]
	return (cookie)?cookie:false;
	}
Cookiemanager.prototype.setCookie = function(cookieName,cookieValue,expiration,expirationUnits,domain,path) {
	this.cookies[cookieName] = cookieValue;
	if (expiration) this.expiration[cookieName] = this.getExpiration(expiration,expirationUnits);
	if (domain) this.domain[cookieName] = domain;
	if (path) this.path[cookieName] = path;
	return true;
	}
var cookieManager = new Cookiemanager('cookieManager',1,'years');

// stop hiding -->

/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/



/*******************************************************************************/
/*                                                                             */
/* Saemtliche Rechte: Aktion Mensch - Einfach fuer Alle */
/* Lizenzbedingungen zur freien Nutzung: http://www.einfachfueralle.de/lizenz/ */
/*                                                                             */
/* Das Skript ist Teil des Komplexes zum Vergrößern und Vergkleinern der       */
/* Schrift auf Webseiten                                                       */
/*                                                                             */
/*                                                                             */
/*******************************************************************************/
<!-- hide this script from non-javascript-enabled browsers

var efa_default = 100;
var efa_increment = 10;
var efa_smaller = ['<span class="schnell">Schriftgr&ouml;&szlig;e:<' +'/span><span class="schnell">',
	'<span style="font-size:90%">A</span>',
	'Schrift verkleinern',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	' | '
	]

var efa_reset = ['',
	'<span style="font-size:120%">A</span>',
	'Schriftgr&ouml;&szlig;e normal',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	' | '
	]

var efa_bigger = ['',
	'<span style="font-size:140%">A</span>',
	'Schrift vergr&ouml;&szlig;ern',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'<' + '/span>'
	]


function Efa_Fontsize(increment,smaller,reset,bigger,def) {
	this.w3c = (document.getElementById);
	this.ms = (document.all);
	this.userAgent = navigator.userAgent.toLowerCase();
	this.isOldOp = ((this.userAgent.indexOf('opera') != -1)&&(parseFloat(this.userAgent.substr(this.userAgent.indexOf('opera')+5)) <= 7));

	if ((this.w3c || this.ms) && !this.isOldOp && !this.isMacIE) {
		this.name = "efa_fontSize";
		this.cookieName = 'efaSize';
		this.increment = increment;
		this.def = def;
		this.defPx = Math.round(16*(def/100))
		this.base = 1;
		this.pref = this.getPref();
		this.testHTML = '<div id="efaTest" style="position:absolute;visibility:hidden;line-height:1em;">&nbsp;</div>';
		this.smallerLink = this.getLinkHtml(-1,smaller);
		this.resetLink = this.getLinkHtml(0,reset);
		this.biggerLink = this.getLinkHtml(1,bigger);
	} else {
		this.smallerLink = '';
		this.resetLink = '';
		this.biggerLink = '';
		this.efaInit = new Function('return true;');
	}

	this.allLinks = this.smallerLink + this.resetLink + this.biggerLink;
}

Efa_Fontsize.prototype.efaInit = function() {
		document.writeln(this.testHTML);
		this.body = (this.w3c)?document.getElementsByTagName('body')[0].style:document.all.tags('body')[0].style;
		this.efaTest = (this.w3c)?document.getElementById('efaTest'):document.all['efaTest'];
		var h = (this.efaTest.clientHeight)?parseInt(this.efaTest.clientHeight):(this.efaTest.offsetHeight)?parseInt(this.efaTest.offsetHeight):999;
		if (h < this.defPx) this.base = this.defPx/h;
		this.body.fontSize = Math.round(this.pref*this.base) + '%';
}

Efa_Fontsize.prototype.getLinkHtml = function(direction,properties) {
	var html = properties[0] + '<a href="#" onclick="efa_fontSize.setSize(' + direction + '); return false;"';
	html += (properties[2])?'title="' + properties[2] + '"':'';
	html += (properties[3])?'class="' + properties[3] + '"':'';
	html += (properties[4])?'id="' + properties[4] + '"':'';
	html += (properties[5])?'name="' + properties[5] + '"':'';
	html += (properties[6])?'accesskey="' + properties[6] + '"':'';
	html += (properties[7])?'onmouseover="' + properties[7] + '"':'';
	html += (properties[8])?'onmouseout="' + properties[8] + '"':'';
	html += (properties[9])?'onfocus="' + properties[9] + '"':'';
	return html += '>'+ properties[1] + '<' + '/a>' + properties[10];
}

Efa_Fontsize.prototype.getPref = function() {
	var pref = this.getCookie(this.cookieName);
	if (pref) return parseInt(pref);
	else return this.def;
}

Efa_Fontsize.prototype.setSize = function(direction) {
	this.pref = (direction)?this.pref+(direction*this.increment):this.def;
	this.setCookie(this.cookieName,this.pref);
	this.body.fontSize = Math.round(this.pref*this.base) + '%';
}

Efa_Fontsize.prototype.getCookie = function(cookieName) {
	var cookie = cookieManager.getCookie(cookieName);
	return (cookie)?cookie:false;
}

Efa_Fontsize.prototype.setCookie = function(cookieName,cookieValue) {
	return cookieManager.setCookie(cookieName,cookieValue);
}

var  efa_fontSize = new Efa_Fontsize(efa_increment,efa_smaller,efa_reset,efa_bigger,efa_default);

// stop hiding -->


/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/

/*******************************************************************************/
/* Dieses Skript prueft das Eingabefeld Alternativtext im Templateformular bei */
/* der Bearbeitung eines Templates                                             */
/*                                                                             */
/*******************************************************************************/


function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

function checkForm_formular_editor()
{

//====== Prueft Feld Alternativtext ======
if(document.formular_editor.bildname.value=="" ||document.formular_editor.bildname.value=="Alternativtext")
{
alert ("Bitte geben Sie einen Alternativtext für das Bild ein.");
document.formular_editor.bildname.focus();
return false;
}
}
//-->
/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/
/*******************************************************************************/
/* Dieses Skript prueft das Eingabefeld Alternativtext im Templateformular bei */
/* der Neuanlage von Templates                                                 */
/*                                                                             */
/*******************************************************************************/

function pruefeForm(aForm){
	for (var i = 0; i < aForm.elements.length; i++) {
    	var ele=aForm.elements[i];
        if(ele.name.substring(0,8)=='bildname' && ele.value.length==0){
        	alert('Bitte geben Sie einen Alternativtext für das Bild ein.');
            ele.focus();
            return false;
        }
	}
    return true;
}

/*******************************************************************************/
/*                                                                             */
/* S K R I P T   E N D E                                                       */
/*                                                                             */
/*******************************************************************************/

