function openwin(url,width,height) {
	
	var winX = (screen.width - width) / 2;
	var winY = 50;
	width=width+20;
	height=height+20;
	var scrollbar_str="no";
	var scrollbar_int=0;
	if (width>800){
		scrollbar_str="yes";
		scrollbar_int=1;
	}
	if (height>580){
		scrollbar_str="yes";
		scrollbar_int=1;
	}
	p= "height=" +height +",width=" +width + ",top=" + winY+",left=" + winX + ",scrollbars="+scrollbar_str+",scrollbars="+scrollbar_int+", toolbars=no,resizable=no,status";
	nwin = window.open(url, "pwin", p);
	//nwin.document.title="Erklärendes Bild";
	if ((parseInt(navigator.appVersion) >= 4)|| (navigator.appName = 'Netscape')) { nwin.focus(); }
}

function jump(sl){
	location.href="#"+sl[sl.selectedIndex].value;
	parent.frames[1].focus();
	sl.selectedIndex = 0;
}

function anhang_openwin(url) {
	var width = 600;
	var height = 420;
	var winX = (screen.width - width) / 2;
	var winY = 50;
	width=width+20;
	height=height+20;
	p= "height=" +height +",width=" +width + ",top=" + winY+",left=" + winX + ",scrollbars=yes, toolbars=no,resizable=no,status";
	
	nwin = window.open(url, "notewin", p);
	if ((parseInt(navigator.appVersion) >= 4)|| (navigator.appName = 'Netscape')) { nwin.focus(); }
}

function anhang_openwin_700(url) {
	var width = 720;
	var height = 420;
	var winX = (screen.width - width) / 2;
	var winY = 50;
	width=width+20;
	height=height+20;
	p= "height=" +height +",width=" +width + ",top=" + winY+",left=" + winX + ",scrollbars=yes, toolbars=no,resizable=no,status";
	
	nwin = window.open(url, "notewin", p);
	if ((parseInt(navigator.appVersion) >= 4)|| (navigator.appName = 'Netscape')) { nwin.focus(); }
}

function openTable(url,width,height) {
	var winX = (screen.width - width) / 2;
	var winY = 50;
	width=width+20;
	height=height+20;
	var scrollbar_str="no";
	var scrollbar_int=0;
	p= "height=" +height +",width=" +width + ",top=" + winY+",left=" + winX + ",scrollbars="+scrollbar_str+",scrollbars="+scrollbar_int+", toolbars=no,resizable=no,status";
	nwin = window.open(url, "twin", p);
	//nwin.document.title="Erklärendes Bild";
	if ((parseInt(navigator.appVersion) >= 4)|| (navigator.appName = 'Netscape')) { nwin.focus(); }
}

// ------------------------------------------ Menu Functions -------------------------------------

var isNav4, isIE4
if (navigator.appName == "Netscape") {
  isNav4 = true;
}else if (navigator.appVersion.indexOf("MSIE") != -1) {
  isIE4 = true;
}
function findObj(n, d) { 
	var p,i,x;
	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=findObj(n,d.layers[i].document);
	if(!x && document.getElementById)
		x=document.getElementById(n);
	return x;
}	

function getMenuObj( obj ){
	if (isNav4) {
		theObj = findObj(obj,parent.menu.document);
	}
	if (isIE4) {
		theObj = eval('parent.menu.document.all.' + obj);
	}
	return theObj;
}

// ---------------------------------------------------------------------------------------------


function rename(titel) {
	parent.pdf.document.title = titel;

}



function getHighlightObj(id,subID){
	if (document.all){
		return eval("window.document.all.highlightRow"+id+"_"+subID);
	} else if (document.getElementById){
		return window.document.getElementById("highlightRow"+id+"_"+subID);
	}
}

var savedColor;

function highlightRow(obj,id){
	obj.style.backgroundColor = "#F3F3F3";
	var i = 1;
	var hObj;

	while (getHighlightObj(id,i) != null){
		hObj = getHighlightObj(id,i);
		savedColor = hObj.style.backgroundColor;
		hObj.style.backgroundColor = "#F6C93D";
		i++;
	}
}

function unhighlightRow(obj,id){
	obj.style.backgroundColor = "#FFFFFF";
	var i = 1;

	var hObj;
	while (getHighlightObj(id,i) != null){
		hObj = getHighlightObj(id,i);
		hObj.style.backgroundColor = savedColor;
		i++;
	}
}


var yPos = 0;
top.menu.scrollTo(0,0);
function autoScroll() {

//	Change these values to your needs!
//	START:


	var refreshTime		= 50;					// Refresh every x secs (1000 = 1 Sec.)
//	:END

	if (getScrollOffset("y") != yPos) {
		yPos = getScrollOffset("y");
		top.menu.scrollTo(0,yPos);
	}
	setTimeout("autoScroll()",refreshTime);
}

var ns4 = 0;
var ie4 = 0;
var w3c = 0;

function bVer() {
  // return version number (e.g., 4.03)
  msieIndex = navigator.appVersion.indexOf("MSIE") + 5;
  return(parseFloat(navigator.appVersion.substr(msieIndex,3)));
}

function initAutoscroll() {
	if (document.all) {
		ie4 = 1;
		layerRef="document.all.";
		elementStart = "";
		elementEnd = "";
		bodyRef="body";
		if (bVer() >= 6) {
//			bodyRef="documentElement";
		}
	} else if (document.layers) {
		ns4 = 1;
		layerRef="document.layers.";
		elementStart = "";
		elementEnd = "";
		styleRef="";
		showRef="show";
		hideRef="hide";
	} else if (document.getElementById) {
		w3c = 1;
		layerRef="document.getElementById";
		elementStart = "(\"";
		elementEnd = "\")";
		styleRef=".style";
		showRef="visible";
		hideRef="hidden";
	}
	setTimeout("autoScroll()",250);
}

function getScrollOffset(direction) {
	var offset = 0;
	if (ie4) {
		if (direction == "y") offset = eval('document.'+bodyRef+'.scrollTop');
		if (direction == "x") offset = eval('document.'+bodyRef+'.scrollLeft');
	} else if (ns4 || w3c) {
		if (direction == "y") offset = window.pageYOffset;
		if (direction == "x") offset = window.pageXOffset;
	}
	return offset;
}

initAutoscroll();

