function openPic(url,winName,winParams)	{
	var theWindow = window.open("/"+url,winName,winParams);
	if (theWindow)	{theWindow.focus();}
}



  // decrypt helper function
function decryptCharcode(n,start,end,offset) {
	n = n + offset;
	if (offset > 0 && n > end)	{
		n = start + (n - end - 1);
	} else if (offset < 0 && n < start)	{
		n = end - (start - n - 1);
	}
	return String.fromCharCode(n);
}
  // decrypt string
function decryptString(enc,offset) {
	var dec = "";
	var len = enc.length;
	for(var i=0; i < len; i++)	{
		var n = enc.charCodeAt(i);
		if (n >= 0x2B && n <= 0x39)	{
			dec += decryptCharcode(n,0x2B,0x3A,offset);	// 0-9 . , - + / :
		} else if (n >= 0x40 && n <= 0x5A)	{
			dec += decryptCharcode(n,0x40,0x5A,offset);	// A-Z @
		} else if (n >= 0x61 && n <= 0x7A)	{
			dec += decryptCharcode(n,0x61,0x7A,offset);	// a-z
		} else {
			dec += enc.charAt(i);
		}
	}
	return dec;
}
  // decrypt spam-protected emails
function linkTo_UnCryptMailto(s)	{
	location.href = decryptString(s,-4);
}


/*
function UnCryptMailto(s) {	//
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(1));
	}
	return r;
}


function linkTo_UnCryptMailto(s)	{	//
	location.href=UnCryptMailto(s);
}
*/


    function change_screen_trailer(pfad, breite, hoehe, scroll, windowName){
        if (screen.width <= 800){
            if((breite + 10) >  screen.availWidth){breite = screen.availWidth - 10;};
            if((hoehe + 29) >  screen.availHeight){hoehe = screen.availHeight - 29;};
            screen_width = (screen.availWidth - breite - 10) / 2;
            screen_height = (screen.availHeight - hoehe - 29) / 2;
            screen_trailer = window.open(pfad, windowName, "width=" + breite + ", height=" + hoehe + ", top=" + screen_height + ", left=" + screen_width + ", scrollbars=" + scroll);
            screen_trailer.focus();
        }
        if (screen.width > 800){
            screen_width = (screen.availWidth - breite - 10) / 2;
            screen_height = (screen.availHeight - hoehe - 29) / 2;
            screen_trailer = window.open(pfad, windowName, "width=" + breite + ", height=" + hoehe + ", top=" + screen_height + ", left=" + screen_width + ", scrollbars=" + scroll);
            screen_trailer.focus();
        }
    }
    
    function change_screen_trainerintro(pfad, breite, hoehe, scroll, windowName){
        screen_width = (screen.availWidth - breite - 10) / 2;
        screen_height = (screen.availHeight - hoehe - 29) / 2;
        screen_trailer = window.open(pfad, windowName, "width=" + breite + ", height=" + hoehe + ", top=" + screen_height + ", left=" + screen_width + ", scrollbars=" + scroll);
        screen_trailer.focus();
    }

function printPage() {
if (window.print) {
jetztdrucken = confirm('Seite drucken ?');
if (jetztdrucken) window.print();
   }
}









function hinweis(bild1) {

	document.getElementById(bild1).style.display = "";

}

function hinweisentfernen(bild1) {

	document.getElementById(bild1).style.display = "none";

}


function hinweisnews(bild1) {

	document.getElementById(bild1).style.display = "";

}




function hinweis(bild2) {

	document.getElementById(bild2).style.display = "";

}

function hinweisentfernen(bild2) {

	document.getElementById(bild2).style.display = "none";

}


function hinweisnews(bild2) {

	document.getElementById(bild2).style.display = "";

}




function hinweis(bild3) {

	document.getElementById(bild3).style.display = "";

}

function hinweisentfernen(bild3) {

	document.getElementById(bild3).style.display = "none";

}


function hinweisnews(bild3) {

	document.getElementById(bild3).style.display = "";

}





function hinweis(bild4) {

	document.getElementById(bild4).style.display = "";

}

function hinweisentfernen(bild4) {

	document.getElementById(bild4).style.display = "none";

}


function hinweisnews(bild4) {

	document.getElementById(bild4).style.display = "";

}


function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 

function screencheck() {
	var hohe = screen.availHeight;

	if (hohe < 750) {
		document.getElementById("balken").style.marginTop = "0px";
		document.getElementById("balken").style.top = "0px";
	}
}
