var oe=function(Fehler,Datei,Zeile){alert('Es ist der JS- Fehler: '+Fehler+', in der Datei: '+Datei+', in der Zeile: '+Zeile+'Aufgetreten.');};var oe2=function(){return true;};
window.onerror=oe;
var tmp = null,$GLOBALS = {};
$GLOBALS.ctr = 0;
var $ = function(Obj,Doc)
{
	return (Doc||document).getElementById(Obj);
}
var $T = function(Tag,Parent)
{
	Tag=Tag?Tag:'*';
	return ((Tag=='*') && !document.getElementsByTagName('*').length)?(Parent||document).all:(Parent||document).getElementsByTagName(Tag);
}
var $C = function(className, Tag) {
    var muster = new RegExp("(^| )" + className + "($| )");
    var alles = $T();
    var gefunden = [];
	for(i=0;i<alles.length;i++){
		if (alles[i].tagName && (alles[i].tagName.toLowerCase() == Tag) && alles[i].className && (alles[i].className != "")) {
            if (alles[i].className.match(muster)) {
                gefunden[gefunden.length] = alles[i];
			}
        }
	}
    return gefunden;
};
String.prototype.trim = function()
{
	return this.replace(/\s+$/,'').replace(/^\s+/,'');
}
function init()
{
	if($('email')){
		$('email').onfocus = function()
		{
			if(this.value.trim() == 'E-Mail-Adresse'){
				this.value = '';
			}
		};
		$('telefon').onfocus = function()
		{
			if(this.value.trim() == 'Telefon (optional)'){
				this.value = '';
			}
		}
		$('Name').onfocus = function()
		{
			if(this.value.trim() == 'Name'){
				this.value = '';
			}
		};
		$('text').onfocus = function()
		{
			if(this.value.trim() == 'Nachricht'){
				this.value = '';
			}
		};
		$('email').onblur = function()
		{
			if(this.value.trim() == ''){
				this.value = 'E-Mail-Adresse';
				$('pruefen').style.visibility='hidden';
			}
			else{
				$('pruefen').style.visibility='visible';
			}
		};
		$('telefon').onblur = function()
		{
			if(this.value.trim() == ''){
				this.value = 'Telefon (optional)';
				$('pruefen').style.visibility='hidden';
			}else{
				$('pruefen').style.visibility='visible';
			}
		};
		$('Name').onblur = function()
		{
			if(this.value.trim() == ''){
				this.value = 'Name';
				$('pruefen').style.visibility='hidden';
			}else{
				$('pruefen').style.visibility='visible';
			}
		};
		$('text').onblur = function()
		{
			if(this.value.trim() == ''){
				this.value = 'Nachricht';
				$('pruefen').style.visibility='hidden';
			}else{
				$('pruefen').style.visibility='visible';
			}
		};
	}
	if($('post'))$('post').onsubmit = function()
	{
		return confirm(
			'Sind all Ihre Angaben Korrekt?' + "\n\n" + 
			'Name: ' + $('Name').value  + "\n" + 
			'Telefon: ' + $('telefon').value + "\n" + 
			'E-Mail: ' + $('email').value
		);
	};
	if($C('open','div').length){
		$GLOBALS.ctr = 30;
	}
	var a=$T('a');
	for(var i=0;i<a.length;i++){// http://www.tomislav.net/gestrichelte-linie-um-link-verstecken.htm
		a[i].onmousedown = function()
		{
			this.onfocus = function()
			{
				this.blur();
			};
		};
		a[i].onmouseout = function()
		{
			this.onfocus = function(){}
		};
		a[i].onmousemove = a[i].onmouseout;
	}
	if($('fe_wo'))$T('a',$('fe_wo'))[0].onclick = function()
	{//copyright by Tomsilav Kramaric
		var list = $C('fe_wo','div');
		if(!$GLOBALS.ctr){
			for(var x=0;x<list.length;x++){
				list[x].style.height = '2px';
				list[x].style.display = 'block';
			}
			$GLOBALS.ctr = 1;
			window.tmr = window.setInterval(
				function()
				{
					$GLOBALS.ctr++;
					for(var x=0;x<list.length;x++){
						list[x].style.height = $GLOBALS.ctr + 'px';
					}
					if($GLOBALS.ctr==30){
						window.clearInterval(window.tmr);
					}
				},
				30
			);
			return false;
		}
		else if($GLOBALS.ctr==30){
			for(var x=0;x<list.length;x++){
				list[x].style.height = '29px';
				$GLOBALS.ctr = 29;
			}
			window.tmr = window.setInterval(
				function()
				{
					$GLOBALS.ctr--;
					for(var x=0;x<list.length;x++){
						if($GLOBALS.ctr){
							list[x].style.height = $GLOBALS.ctr + 'px';
						}
						else list[x].style.display = 'none';
					}
					if(!$GLOBALS.ctr){
						window.clearInterval(window.tmr);
					}
				},
				30
			);
			return false;
		}
		return false;
	};
}
function myFunc()
{
	document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,105,110,102,111,64,108,97,110,100,104,97,117,115,45,115,99,104,108,101,105,46,100,101,34,32,115,116,121,108,101,61,34,99,111,108,111,114,58,114,101,100,34,62,105,110,102,111,64,108,97,110,100,104,97,117,115,45,115,99,104,108,101,105,46,100,101,60,47,97,62));
}
window.onload = init;
