high = new Image(); high.src = "img/btn_g.png";
norm = new Image(); norm.src = "img/btn_b.png";

sh_top = 1;
sh_left = 2;

function NormBtn(id, btn) {
	with (document.images[id]) {
		src = btn.src; style.top = 0; style.left = 0;
	}
	with (document.getElementById(id+"_txt")) {
		style.top = 0; style.left = 0;
	}
}
function PushBtn(id, btn) {
	with (document.images[id]) {
		src = btn.src; style.top = sh_top; style.left = sh_left;
	}
	with (document.getElementById(id+"_txt")) {
		style.top = sh_top; style.left = sh_left;
	}
}

function Button(BtnId,BtnText,W,H,LinkRef,LinkTarget,Tipp) {
	var Zeilen = BtnText.match(/<br>/);
	AnzZeilen = 1;
	if (Zeilen) AnzZeilen = Zeilen.length + 1;

	if (LinkRef != "") {
		a_start = "				<a href='"+LinkRef+"' style='font-weight: bold;text-decoration: none;background-color: transparent;color:#000000;' target='"+LinkTarget+"'>";
		a_stopp = "				</a>";
	} else {
		a_start = "";
		a_stopp = "";
	}

	window.document.write( 										
		"<table cellpadding='0' cellspacing='0'>" +			
		"<tr>" +
		"	<td align='center' height='"+H+"'>" +
				a_start +
		"		<span id='"+BtnId+"' onMouseOver='NormBtn(id,high)' onMouseOut='NormBtn(id,norm)' onMouseDown='PushBtn(id,high)' onMouseUp='NormBtn(id,norm)'>" +
		"		<img src='"+norm.src+"' style='position: relative; top: 0; left: 0; width:"+W+";height:"+H+";margin: 0 0 0 0;' alt='"+Tipp+"' id='"+BtnId+"' border='0' align='absbottom'>" +
		"		<p id='"+BtnId+"_txt' class='btn_text' style ='margin-top: -"+(H/2+AnzZeilen*8)+"px'>"+BtnText+"</p>" +
		"		</span>" +
				a_stopp +
		"	</td>" +
		"</tr>" +
		"</table>"
	);
}

function GotoTop () {
	rframe=parent.rmain;
	rframe.location.href = rframe.location.pathname + "#top";
}


