// Javascript Fehler unterdruecken
onerror = stopError;
function stopError()
{
return true;
}
// Umgebungsvariablen auslesen
	// convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();
    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);
    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);
    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
    var is_webtv = (agt.indexOf("webtv") != -1); 
    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;
    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

myload=0;
// blur focus
function nix(x)
	{
	if(x.blur)x.blur();
	}
	
// Navigation Tabellenzellen Rollover
function tdover(x)
	{
	if (is_nav4) return;
	if (x<40) document.getElementById("tv"+x).style.background="#ffffff";
	document.getElementById("td"+x).style.background="#ffffff";
	if (x<40) document.getElementById("tn"+x).style.background="#ffffff";
	flay();
	}
	
var movie;

function flay()
	{
	movie=findeFlash('swfmov');
	movie.Play();
	}
	
function findeFlash(flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if(document.layers) {
      if(document.embeds) {
        var movie = document.embeds[flash];
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var movie = document.getElementById(flash);
    if (movie.SetVariable) {
      return movie;
    }
    var movies = movie.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    movie = movies[0];
    if (movie.SetVariable) {
      return movie;
    }
    return;
  }
	
function tdout(x,y)
	{
	bcolor="#e40051";
	if (x>9) bcolor="#FF1742";
	if (x>19) bcolor="#bababa";
	if (y)
		{
		if (y==1) bcolor="#FF1742"
		if (y==2) bcolor="#BABABA"
//		if (y==3) bcolor="#fabfc9"
//		if (y==4) bcolor="#94163b"
//		if (y==5) bcolor="#aa113f"
//		if (y==6) bcolor="#cb0447"
//		if (y==7) bcolor="#e40051"
		}
	if (is_nav4) return;
	if (x<40) document.getElementById("tv"+x).style.background=bcolor;
	document.getElementById("td"+x).style.background=bcolor;
	if (x<40) document.getElementById("tn"+x).style.background=bcolor;
	}
// preload images, mouseover
function initImages()
	{
	imo = new Array(); // Mouseover-Bilder
	ino = new Array(); // Normal-Zustand-Bilder
	if (document.images)
		{
		for (i=0;i<50;i++) 
			{
			ll=0;
			if (is_nav4) ll=document.layers.length;
			for (l=-1; l<ll; l++)
				{
				dok=document;
				if ((is_nav4)*(l!=-1)) dok=document.layers[l].document;
				if (dok.images["b"+i])
					{
					// Folder ermitteln
					url=dok.images["b"+i].src;
					found=url.split("/");
					nfound=found[found.length-1].split(".");
					nlength=nfound[0].length-1;
					folder=url.replace(found[found.length-1],"");
					name=nfound[0].substr(0,nlength);
					imo[i] = new Image(); imo[i].src = folder+name+"1."+nfound[1];
					ino[i] = new Image(); ino[i].src = url;
					}
				}
			}
		}
	myload=1;setTimeout("flay()",1500);
	}
function vover(x)
	{
	tdover(x);
	over(x);
	}
function vout(x,y)
	{
	tdout(x,y);
	out(x);
	}
function over(x) // x=Bildnummer
	{
	if (!myload) return;
	if (myload==0) return;
	dok=document;
	xx="b"+x;
	dok.images[xx].src = imo[x].src;
	flay();
	}
function out(x)
	{
	if (!myload) return;
	if (myload==0) return;
	dok=document;
	xx="b"+x;
	if (dok.images[xx].src.indexOf("1.")>-1) dok.images[xx].src = ino[x].src;
	}
// PopUp Fenster öffnen
var ioWindow;
function openWindow(url,x,y)
	{
	if (ioWindow) {if (!ioWindow.closed) ioWindow.close()}
	h=screen.availHeight-40;
	w=screen.availWidth-40;
	t=(h-y)/2; if (t<0) t=0;
	u=(w-x)/2; if (w<0) w=0;
	ioWindow = window.open(url,"popup",'width='+x+',height='+y+',left='+u+',top='+t+',scrollbars=no');
	ioWindow.focus();
	}	
	
// Formular-Buttons Rollover
function butover(x)
	{
	if (is_nav4) return;
	url=x.src;
	found=url.split("/");
	nfound=found[found.length-1].split(".");
	nlength=nfound[0].length-1;
	folder=url.replace(found[found.length-1],"");
	name=nfound[0].substr(0,nlength);
	x.src = folder+name+"1."+nfound[1];
	}
	
function butout(x)
	{
	if (is_nav4) return;
	url=x.src;
	found=url.split("/");
	nfound=found[found.length-1].split(".");
	nlength=nfound[0].length-1;
	folder=url.replace(found[found.length-1],"");
	name=nfound[0].substr(0,nlength);
	x.src = folder+name+"0."+nfound[1];
	}

// Formular-Interaktivität
function fok(x)
	{
	if ((is_nav4)+(is_opera)) return;
	if (x.name=="sbeg") x.style.background='white';
	else
		{
		x.style.border='1px dotted #b0123b';
		x.style.color='#b0123b';
		stdcolor="#212121";
		if (is_ie) stdcolor="#ffffff";
		for (f=0;f<(document.forms.length);f++)
			{
			for (i=0;i<(document.forms[f].elements.length);i++)
				{
				if (document.forms[f].elements[i].name==x.name) 
					{
					for (e=0;e<(document.forms[f].elements.length);e++)
						{
						if (document.forms[f].elements[e].type=="submit") document.forms[f].elements[e].style.border='1px solid '+stdcolor;
						}
					}
				}
			}
		}
	}
	
function blu(x)
	{
	if ((is_nav4)+(is_opera)) return;
	if (x.name=="sbeg")
		{
		if (x.value!='') 
			{
			x.style.background='#C7617C';
			}
		else
			{
			x.style.background='#eaa8ba';
			}
		}
	else
		{
		x.style.border='1px solid #212121';
		x.style.color='#212121';
		if (x.value!='') 
			{
			x.style.color='#bbbbbb';
			x.style.border='1px solid #bbbbbb';
			}
		for (f=0;f<(document.forms.length);f++)
			{
			for (i=0;i<(document.forms[f].elements.length);i++)
				{
				if (document.forms[f].elements[i].name==x.name) 
					{
					for (e=0;e<(document.forms[f].elements.length);e++)
						{
						if (document.forms[f].elements[e].type=="submit") document.forms[f].elements[e].style.border='1px dotted black';
						}
					}
				}
			}
		}
	}
blinck=1;
emailvalue=false;
namevalue=false;
function lightEmail()
	{
	if ((is_nav4)+(is_opera)) return;
	if (top.window.location.name!="email") hideLightEmail();
	else
		{
		if (blinck==0) {hideLightEmail();blinck=1;} else {showLightEmail();blinck=0;}
		setTimeout("lightEmail()",500*(1.5-blinck));
		}
	}
function showLightEmail()
	{
	for (f=0;f<(document.forms.length);f++)
		{
		for (i=0;i<(document.forms[f].elements.length);i++)
			{
			if (document.forms[f].elements[i].name=="Email") 
				{
				if (document.forms[f].elements[i].value.indexOf("@")>-1) emailvalue=true;
				else
					{
					document.forms[f].elements[i].style.border='1px dotted #b0123b';
					}
				}
			if (document.forms[f].elements[i].name=="Name") 
				{
				if (document.forms[f].elements[i].value!="") namevalue=true;
				else
					{
					document.forms[f].elements[i].style.border='1px dotted #b0123b';
					}
				}
			if ((emailvalue==true)*(namevalue==true)) top.window.location.name="";
			}
		}
	}
function hideLightEmail()
	{
	for (f=0;f<(document.forms.length);f++)
		{
		for (i=0;i<(document.forms[f].elements.length);i++)
			{
			if (document.forms[f].elements[i].name=="Email") 
				{
				document.forms[f].elements[i].style.border='1px solid #212121';
				}
			if (document.forms[f].elements[i].name=="Name") 
				{
				document.forms[f].elements[i].style.border='1px solid #212121';
				}
			}
		}
	}