function ShowHighLights()
{
	if (Ebene1 != "")
	{
		document.images["Img"+Ebene1].src = (Ebene2 != "") ? arrow1 : arrow2;
		if (document.getElementById) document.getElementById("TD"+Ebene1).bgColor = "#5a8bb0";
	}
	if (Ebene2 != "")
	{
		document.images["Img"+Ebene2].src = (Ebene3 != "") ? arrow1 : arrow2;
		if (document.getElementById) document.getElementById("Link"+Ebene2).className = "lay2_act";
	}
	if (Ebene3 != "")
	{
		document.images["Img"+Ebene3].src = (Ebene4 != "") ? arrow1 : arrow2;
		if (document.getElementById) document.getElementById("Link"+Ebene3).className = "lay2_act";
	}
	if (Ebene4 != "")
	{
		document.images["Img"+Ebene4].src = arrow2;
		if (document.getElementById) document.getElementById("Link"+Ebene4).className = "lay2_act";
	}
}


//if (DoBildWindowClose == "") DoBildWindowClose ='Bitte klicken zum Verkleinern';
function DoBild(BILD) {
	x = 220;
	y = 250;

	if (document.all) y = ( (document.body.scrollTop + 20) < y) ? y : (document.body.scrollTop + 20);
	else if (document.layers) y = (window.pageYOffset + 20 < y) ? y : (window.pageYOffset + 20);
	else if (document.getElementById&&!document.all) y = (window.pageYOffset + 20 < y) ? y : (window.pageYOffset + 20);

info1 = "<table border=0 cellspacing=0 cellpadding=3><tr><td bgcolor=#FFFFFF><a href=\"javascript:MM_showHideLayers('Layer1','','hide')\"><img src='" + BILD + "' alt='" + DoBildWindowClose + "' border=0></a></td></tr></table>";
	MM_showHideLayers('Layer1','','show');
	if(document.layers) {
		document.Layer1.left = x;
		document.Layer1.top = y;
		document.Layer1.document.write(info1);
		document.Layer1.document.close();
	} else {
		if (document.all) KL = Layer1;
		else KL = document.getElementById("Layer1");
		
		KL.style.left = x;
		KL.style.top = y;
		KL.innerHTML = info1;
	}
}

function MM_swapImgRestore() {
  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_findObj(n, d) {
  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() {
  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];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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];}
}

function OpenFoto(BildURL, x, y) {
var win = "";
win = window.open("","bild",'height=' + y + ',width=' + x +',location=0,status=0,toolbar=no,resizable=0,scrollbar=no,top=0,left=0');
win.document.writeln('<html><head><title>Das Bild</title>');
win.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
win.document.writeln('</head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
win.document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">');
win.document.writeln('<tr><td align="center">');
win.document.writeln('<a href="javascript:window.close()">');
win.document.writeln('<img src="' + BildURL + '" border=0  alt="Fenster schliessen">');
win.document.writeln('</a></td></tr></table></body></html>');
win.document.close();
//win.resizeTo(x,y);
win.focus();
}

//if (top.window.frames.length < 2 && top.window.name != "printversion") top.location.href="http://www.bankhaus-mustermann.de/frameset.php?pref=" + escape(window.location.pathname);

function BildDown(DownURL,winfeatures) {
	window.open(DownURL,'Filedown','top=0,left=0' + (winfeatures ? (','+winfeatures) : '') );
}

/***   Editable: ***/
var backcolor	= '#FFFFE1';		// Hintergrund
var bordercolor	= '#000000';		// Ramenfarbe
var textcolor	= '#000000';		// Textfarbe
var displaytime	= '1000000';		// Zeit
var tablewidth	= '230';			// Tabellenbreite in px
var object		= 'Layer2';			// objekt - Ebene ID
/*******************/
var tipTimer;	// dHTML Toolltip Timer

function locateObject(n, d) { //v3.0
  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=locateObject(n,d.layers[i].document); return x;
}

function hideKommentar() 
{	if (document.all) {
		locateObject(object).style.visibility="hidden";
		locateObject(object).style.left = 1;
		locateObject(object).style.top = 1;
		return false
	} else if (document.layers) {
		locateObject(object).visibility="hide";
		locateObject(object).left = 1;
		locateObject(object).top = 1;
		return false
	} else if (document.getElementById&&!document.all) {
		document.getElementById(object).style.visibility="hidden";
		document.getElementById(object).style.left = 1;
		document.getElementById(object).style.top = 1;
		return false;
	} else return true;
}

function showKommentar(e, tipContent)
{	window.clearTimeout(tipTimer);
	if (document.all)
	{		locateObject(object).style.top=document.body.scrollTop+event.clientY-10;
			locateObject(object).innerHTML='<table style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; border: '+bordercolor+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+backcolor+'" width="'+tablewidth+'" border="0" cellspacing="1" cellpadding="1"><tr><td><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table>';
			if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
			{	locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-50;
			} else locateObject(object).style.left=document.body.scrollLeft+event.clientX+30;
		locateObject(object).style.visibility="visible";
		tipTimer=window.setTimeout("hideKommentar('"+object+"')", displaytime);
		return true;
	} else if (document.layers)
	{	locateObject(object).document.write('<table width="'+tablewidth+'" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><table width="100%" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table></td></tr></table>')
		locateObject(object).document.close();
		locateObject(object).top=e.y-10;
		if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth)) locateObject(object).left = window.innerWidth - locateObject(object).clip.width-80;
		else locateObject(object).left=e.x+30;
		locateObject(object).visibility="show";
		tipTimer=window.setTimeout("hideKommentar('"+object+"')", displaytime);
		return true;
	} else if (document.getElementById&&!document.all)
	{	document.getElementById(object).style.top= window.pageYOffset + e.clientY-10;		
		document.getElementById(object).innerHTML='<table style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; border: '+bordercolor+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+backcolor+'" width="'+tablewidth+'" border="0" cellspacing="1" cellpadding="1"><tr><td><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table> ';
		if ((e.clientX + window.innerWidth - tablewidth - 80) > (window.pageXOffset + window.innerWidth)) document.getElementById(object).style.left = window.pageXOffset + e.clientX-tablewidth-50;
		else document.getElementById(object).style.left=window.pageXOffset + e.clientX+30;
		document.getElementById(object).style.visibility="visible";
		tipTimer=window.setTimeout("hideKommentar('"+object+"')", displaytime);
		return true;
	} else return true;
}

if ( WebmerkQueryA == "" ) WebmerkQueryA='PC-Systeme: Dr�cken Sie Strg + D; Apple-Macintosh-Systeme: Dr�cken Sie Befehlstaste + D';
if ( WebmerkQueryB == "" ) WebmerkQueryB='PC-Systeme: Dr�cken Sie Strg + G; Apple-Macintosh-Systeme: Dr�cken Sie Befehlstaste + G';
if ( WebmerkFavtext == "" ) WebmerkFavtext = "MORGAN-REKOFA GmbH";
if ( WebmerkQuery == "" ) WebmerkQuery = "M�chten Sie MORGAN-REKOFA Webseite zu Ihren Favoriten hinzuf�gen?";

function Webmerk() {
	if (document.all) // IE
	{
		if (confirm(WebmerkQuery)) window.external.addFavorite('http://www.morgan-rekofa.de',WebmerkFavtext);
	}
	else if (document.layers) // NS 4
	{
		alert(WebmerkQueryA);
	} else if (!document.all && document.getElementById) {
		if(navigator.appName == "Netscape") { // NS > 6
			alert(WebmerkQueryA );
		}
	}
}

//*******************************************

var ISZero = 0;

function MakeFontSize(PLUSSize) {
	FontnameArr = new Array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large");
	if ( (ISZero <= -3 && PLUSSize > 0) || (ISZero >= 7 && PLUSSize < 0) || (ISZero < 7 && ISZero > -3) ) {
		ISZero += PLUSSize;
		for(i=0; i < document.styleSheets[0].rules.length; i++)
		{
			if (document.styleSheets[0].rules[i].style.fontSize != null) {
				FontString = new String(document.styleSheets[0].rules[i].style.fontSize);
				ISFONTNONAME = -1;
				for (j = 0; j < FontnameArr.length; j++) {
					if (FontString == FontnameArr[j]) {
						ISFONTNONAME = j;
						break;
					}
				}
				
				if (ISFONTNONAME == -1) {
					ClassFontSize = (FontString.substr(0, FontString.length-2)) * 1;
					ClassFontFormat = FontString.substr(FontString.length-2, 2);
					if (ClassFontSize > 1 ) {
						ClassFontSize += PLUSSize;
						document.styleSheets[0].rules[i].style.fontSize = (ClassFontSize +  ClassFontFormat);
					}
				} else {
					ISFONTNONAME += PLUSSize
					if (ISFONTNONAME > -1 && ISFONTNONAME < FontnameArr.length)
						document.styleSheets[0].rules[i].style.fontSize = FontnameArr[ISFONTNONAME];
				}
			}
		}
	}
}
