var TIPWIDTH=400;
var TIPHEIGHT=300;
var intWindowHeight, intWindowWidth;

var objBannerAnimation=null;
var arrFunctionCalls=new Array();

var IE=document.all?1:0;

function fnNavClick (param) {
	window.location.href=param;
}

function fnShowTip(event, strText) {

  if (IE) {
    intPosX=window.event.clientX;
    intPosY=window.event.clientY;
    intPosXabs=document.body.scrollLeft;
    intPosYabs=document.body.scrollTop;
  } else {
    intPosX=event.clientX;
    intPosY=event.clientY;
    intPosXabs=window.pageXOffset;
    intPosYabs=window.pageYOffset;
  }

  if (document.getElementById ("linktip").style.visibility="hidden") {
    if (intPosX<intWindowWidth/2) {
      document.getElementById ("linktip").style.left=intPosX+intPosXabs+15;
      document.getElementById ("linktip").style.right="";
    } else {
      document.getElementById ("linktip").style.right=intWindowWidth-intPosX-intPosXabs+15;
      document.getElementById ("linktip").style.left="";
    }
    if (intPosY<intWindowHeight/2) {
      document.getElementById ("linktip").style.top=intPosY+intPosYabs+15;
      document.getElementById ("linktip").style.bottom="";
    } else {
      document.getElementById ("linktip").style.bottom=intWindowHeight-intPosY-intPosYabs+15;
      document.getElementById ("linktip").style.top="";
    }
    document.getElementById ("linktip").innerHTML=strText;
    document.getElementById ("linktip").style.visibility="visible";
  }
}


function fnHideTip () {
  document.getElementById ("linktip").style.visibility="hidden";
}


function fnChangeFlyer () {
  intCurFlyer=(intCurFlyer+1)%arrFlyers.length;
  document.getElementById ("flyerwechsel").src=arrFlyers[intCurFlyer];
}


function fnPrintMe () {

	window.clearInterval(intAnimationTimer);

	var $strPage=$('#content');
	$strPage.find ('.noPrint').remove ();
	$strPage.find ('#picturebar').remove ();
	$strPage.find ('img').remove ();
	$strPage.find ('a')	.css ({'text-decoration': 'none', 'color': '#000'})
						.removeClass ('link_internal')
	$('head').find ('link').remove ();
	// $strPage.find ('td').css ({'font-size':'9px'});
	
	var strPage=$strPage.html ();

	$('body').html ('<STYLE type="text/css">body, td {font-family: Arial; text-align: justify;} h1 {text-align: center;}</STYLE>'+strPage);
  

  
}



function fnInit () {

  var blnScrollBars=false;

  if (IE) {
    intWindowWidth=document.body.clientWidth;
    intWindowHeight=document.body.clientHeight;
    if (document.body.clientWidth<(document.body.offsetWidth-10)) blnScrollBars=true;
  } else {
    intWindowWidth=window.innerWidth;
    intWindowHeight=window.innerHeight;    
    if (window.scrollMaxY) blnScrollBars=true;
  }

  if (document.getElementById ('shoutbox')) {
    document.getElementById ('shoutbox').style.left=(intWindowWidth-document.getElementById ('shoutbox').offsetWidth)/2;
    document.getElementById ('shoutbox').style.top=(intWindowWidth-document.getElementById ('shoutbox').offsetHeight)/2-200;
  }

  if (blnScrollBars) document.getElementById ('menu_up_line').style.display='';

  intCurFlyer=0;

  if (document.getElementById ('flyerwechseldiv') && arrFlyers.length>0) {
    document.getElementById ('flyerwechseldiv').innerHTML='<img id="flyerwechsel" src="/pics/clearpixel.gif">';
    fnChangeFlyer ();
    intInterval=window.setInterval ("fnChangeFlyer ()",5000);
  }

  if (document.getElementById ('picturebar')) document.getElementById ("picturebar").style.height=Math.max ((document.getElementById ("content").offsetHeight-25),document.getElementById ("pictureBarAdditionals").offsetHeight);
  for (var dummy=0; dummy<arrFunctionCalls.length; dummy++) arrFunctionCalls[dummy]();

}

	// $(document).ready (function () {
	
		// var appendMenu='';
		// $('.anchor_content').each (function (index) {		
			// appendMenu+='<a href="#anc_content'+index+'">'+$(this).attr ('title')+'</a>';	
			// $(this).prepend ('<a name="anc_content'+index+'"></a>');
			// $(this).append ('<a href="javascript: window.scrollTo(0,0);" style="float: right"><img border=0 align="absmiddle" src="/pics/up.gif">nach oben</a>');		
		// });
		// if (appendMenu) $('#menu').find ('hr:eq(0)').after (appendMenu+'<hr>');
	
	// });

