
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


////////////////   TOOPTIP   /////////////////////

var breite = 350;
var mausabstand = 15;
var ToolTippShow = false;
var ToolTipp = null;
var breite, dir, b_Breite, b_Dir, b_VDir;

function setToolTipp (breite){
	document.onmousemove = cursorMove;
	if (breite && breite>20) b_Breite = breite;
	ToolTipp = crossGetObject('ToolTipp');
	ToolTippShow = false;
}

function showToolTipp(title,msg,breite){
        var msg = 'Die pdf-Datei wird in einem zweiten Browserfenster angezeigt. Wird dieses geschlossen, ist das erste Browserfenster wieder sichtbar.'
	var rahmenfarbe='#FF9900';
	var cellpadding='5';
	var cellspacing='0';
	var schriftartoben='Verdana,Helvetica,Arial,sans-serif';
	var schriftartunten='Verdana,Helvetica,Arial,sans-serif';
	var textrichtungoben='left';
	var textrichtungunten='left';
	var textfarbeoben='#000000';
        var textfarbeunten='#000000';
	var rahmenstaerke='1';
	var bgcoloroben='#F3E0BC';
	var bgcolorunten='#F3E0BC';
        var rechtslinks='0';
	var untenoben='0';
	var schriftgroesseoben='10px';
	var schriftgroesseunten='10px';
	var fettoben='bold';
	var fettunten='normal';
	var rahmenart='none';


	var b_Back;
	var relWidth, relHeight;
	if (ToolTipp == null) return;
	if (breite && breite>20) b_Breite = breite;
	else b_Breite=350;
	msg = '<table width="' + b_Breite + '" cellpadding="'+cellpadding+'" cellspacing="'+cellspacing+'" style="border:'+rahmenstaerke+' '+rahmenfarbe+' '+rahmenart+';"><tr><td style="border-bottom:'+rahmenstaerke+' solid '+rahmenfarbe+'; border-top:'+rahmenstaerke+' solid '+rahmenfarbe+'; border-left:'+rahmenstaerke+' solid '+rahmenfarbe+'; border-right:'+rahmenstaerke+' solid '+rahmenfarbe+'; border: 1px solid '+rahmenfarbe+'; padding:1px; "><table width="100%" border="0" cellpadding="'+cellpadding+'" cellspacing="'+cellspacing+'"><tr><td bgcolor="'+bgcolorunten+'" align="'+textrichtungunten+'"><span style="font-family:'+schriftartunten+'; font-size: '+schriftgroesseunten+'; font-weight:'+fettunten+'; color:'+textfarbeunten+';">' + msg + '</span></td></tr></table>'
	
	if (!dir) b_Dir = rechtslinks;
	else b_Dir = dir;
	relWidth = crossInnerWindowWidth() + crossGetScroll("x");
	relHeight = crossInnerWindowHeight() + crossGetScroll("y");
	if (crossMouseX + b_Breite + mausabstand > relWidth)
		{b_Dir = 1;}
	else if (crossMouseX < b_Breite + mausabstand) b_Dir = 0;
	
	// EIGENE EINSTELLUNG: Text soll rechts von mauscursor angezeigt werden.
	b_Dir = 0;
	
	b_VDir = untenoben;
	if (crossMouseY + 65 > relHeight) b_VDir = 1;
	else if (crossMouseY - 65 < 0) b_VDir = 0;
	crossWrite(ToolTipp, msg);
	ToolTippShow = true;
	crossShowObject(ToolTipp);
}

function hideToolTipp(breite) {
	if (ToolTipp == null) return;
	crossHideObject(ToolTipp);
	ToolTippShow=false;
	crossMoveTo(ToolTipp, -350, 0);
}

function cursorMove(e) {
	var posX, posY;
	crossMousePosition(e);

	if(ToolTippShow){
		if(b_Dir==0){
			posX = crossMouseX + mausabstand;
			if (b_VDir==0) {posY = crossMouseY + mausabstand;}
			else {posY = crossMouseY - 65;}
		}else{
			posX = crossMouseX-b_Breite-mausabstand;
			if (b_VDir==0) {posY = crossMouseY + mausabstand;}
			else {posY = crossMouseY - 65;}
		}
		crossMoveTo(ToolTipp, posX, posY)
	}
}


var B_Type = new crossBrowserType();
function crossBrowserType() {
	this.IE = false;
	this.NS4 = false;
	this.NS6 = false;
	this.id = "";

	if (document.all) {this.IE = true; this.id = "IE";}
	else if (document.getElementById) {this.NS6 = true; this.id = "NS6";}
	else if (document.layers) {this.NS4 = true; this.id = "NS4";}
}

var crossMouseX, crossMouseY;
if (B_Type.NS4) document.captureEvents(Event.MOUSEMOVE);

function crossMousePosition(e) {
	if (B_Type.IE) {
		crossMouseX=event.x + document.body.scrollLeft;
		crossMouseY=event.y + document.body.scrollTop;
	}
	else {crossMouseX=e.pageX; crossMouseY=e.pageY;}
}


function crossGetObject(id) {
	var obj = null;
	if (B_Type.IE) obj=document.all[id];
	else if (B_Type.NS6) obj=document.getElementById(id);
	else if (B_Type.NS4) obj=document.layers[id];
	return obj;
}

function crossWrite(obj, text) {
	if (B_Type.IE) obj.innerHTML = text;
	else if (B_Type.NS6) obj.innerHTML = text;
	else if (B_Type.NS4){
		obj.document.open();
		obj.document.write(text);
		obj.document.close();
	}
}

function crossInnerWindowWidth() {
	var val;
	if (B_Type.IE) val=document.body.clientWidth;
	else if (B_Type.NS6) val=window.innerWidth;
	else if (B_Type.NS4) val=window.innerWidth;
	return val;
}

function crossOuterWindowWidth() {
	var val;
	if (B_Type.IE) val=document.body.offsetWidth;
	else if (B_Type.NS6) val=window.outerWidth;
	else if (B_Type.NS4) val=window.outerWidth;
	return val;
}

function crossInnerWindowHeight() {
	var val;
	if (B_Type.IE) val=document.body.clientHeight;
	else if (B_Type.NS6) val=window.innerHeight;
	else if (B_Type.NS4) val=window.innerHeight;
	return val;
}

function crossGetScroll(achse) {
	var val;
	if(!achse || achse == "y"){
		if (B_Type.IE) val=document.body.scrollTop;
		else if (B_Type.NS6) val=window.pageYOffset;
		else if (B_Type.NS4) val=window.pageYOffset;
	}else{
		if (B_Type.IE) val=document.body.scrollLeft;
		else if (B_Type.NS6) val=window.pageXOffset;
		else if (B_Type.NS4) val=window.pageXOffset;
	}
	return val;
}

function crossMoveTo(obj, x, y) {
	if (B_Type.IE) {obj.style.pixelLeft=x; obj.style.pixelTop=y;}
	else if (B_Type.NS4) {obj.left=x; obj.top=y;}
	else if (B_Type.NS6) {obj.style.left=x+"px"; obj.style.top=y+"px";}
}

function crossShowObject(obj) {
	if (B_Type.IE || B_Type.NS6) {obj.style.visibility="visible";}
	else if (B_Type.NS4) {obj.visibility="show";}
}

function crossHideObject(obj) {
	if (B_Type.IE || B_Type.NS6) {obj.style.visibility="hidden";}
	else if (B_Type.NS4) {obj.visibility="hide";}
}