<!--
function zeit() {
	var heute = new Date();
	var jahr = heute.getFullYear();
	var monat = heute.getMonth()+1;
	var tag = heute.getDate();
	var stunde = heute.getHours();
	var minute = heute.getMinutes();
	var sekunde = heute.getSeconds();
	monat = ((monat < 10 ) ? "0" + monat : monat);
	tag = ((tag < 10 ) ? "0" + tag : tag);
	stunde = ((stunde < 10 ) ? "0" + stunde : stunde);
	minute = ((minute < 10 ) ? "0" + minute : minute);
	sekunde = ((sekunde < 10 ) ? "0" + sekunde : sekunde);
	document.getElementById("zeit").innerHTML = "<h4 class=\"h4Page\">Aktuelle Ortszeit: </h4>" + (tag + "." + monat + "." + jahr + ", " + stunde + ":" + minute + ":" + sekunde + " Uhr");
	setTimeout("zeit()",1000);
	//setInterval("zeit()",1000);
}
function showFlyer(url) {
	var intWidth = 668;
	var intLeft = ((screen.availWidth-intWidth)/2);
	var fenster = window.open(url, "fentster1", "width="+intWidth+",height="+screen.availheight+",left="+intLeft+",location=no,resizeable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,top=0");
	if(fenster) fenster.focus();
	return false;
}
function showTab(Ident) {
	document.getElementById('tabAnfrage'+Ident).style.display = 'block';
	document.getElementById('trAnfrage'+Ident).style.display  = 'block';
}
/*function showSub(Ident,Left,Width) {
	if(Ident=="2509"){
		document.getElementById('schwerpunkte').src='images/construct/button_schwerpunkte_active.gif';	
	}
	
	document.getElementById('divSub'+Ident).style.display = 'block';
	if(Left!=null) {
		document.getElementById('divSub'+Ident).style.left = Left+'px';
	}
	if(Width!=null) {
		document.getElementById('divSub'+Ident).style.width = Width+'px';
	}
}
function hideSub(Ident) {
	document.getElementById('divSub'+Ident).style.display = 'none';
	if(Ident=="2509"){
		document.getElementById('schwerpunkte').src='images/construct/button_schwerpunkte_inactive.gif';
	}
}
function showSchwerpunkte() {
document.getElementById('schwerpunkte').src='images/construct/button_schwerpunkte_active.gif';
showSub('2509','143','530');	
}
function hideSchwerpunkte() {
document.getElementById('schwerpunkte').src='images/construct/button_schwerpunkte_inactive.gif';
hideSub('2509');	
}*/
function showSub(Ident,Id,Left,Width) {
	//if(Ident=="1004"){
		//document.getElementById('unternehmen').src='images/construct/btn_unternehmen_active.jpg';
	//}
	document.getElementById(Id).src = 'fonts/navimages/'+Id+'_active.gif';
	document.getElementById('divSub'+Ident).style.display = 'block';
	if(Left!=null) {
		//alert(Left);
		document.getElementById('divSub'+Ident).style.left = Left+'px';
	}
	if(Width!=null) {
		//document.getElementById('divSub'+Ident).style.width = Width+'px';
		document.getElementById('divSub'+Ident).style.width = 'auto';
		//document.getElementById('divSub'+Ident).style.minWidth = '100px';
	}
}
function hideSub(Ident,Id,Active) {
	document.getElementById('divSub'+Ident).style.display = 'none';
	//if(Ident=="1004"){
		//document.getElementById('unternehmen').src='images/construct/btn_unternehmen_inactive.jpg';
	//}
	document.getElementById(Id).src = 'fonts/navimages/'+Id+'_inactive.gif';

	if (Active==true) {
		document.getElementById(Id).src = 'fonts/navimages/'+Id+'_active.gif';
	}
}
function showFlyout(Ident,Id,Left) {
	//document.getElementById(Id).src = 'fonts/'+Id+'_active.gif';
	var dist, xwert;
	width = document.body.clientWidth;
	if (width > 900) {
		dist = (width-900) / 2;
	} else {
		dist = 0;
	}
	
	if (navigator.appName.indexOf("Explorer") != -1) {
		xwert = xsPos(Id)-dist+1;
	} else {
		xwert = xsPos(Id)-dist;
	}
	showSub(Ident,Id,xwert,'0');
	
	/*if (navigator.appName.indexOf("Explorer") != -1) {
		dist = 0;
	} else if (navigator.appName.indexOf("Opera") != -1) {
		if (ScrollbarWidth > 3) { 
			ScrollbarWidth = ScrollbarWidth-9;
		}
		dist = 190-ScrollbarWidth;
		//alert (ScrollbarWidth);
	} else if (navigator.userAgent.indexOf("Safari") != -1) {
		if (ScrollbarWidth != 0) { 
			ScrollbarWidth = ScrollbarWidth-8;
		}
		dist = 190-ScrollbarWidth;
	} else {
		if (ScrollbarWidth != 0) { 
			ScrollbarWidth = ScrollbarWidth-8;
		}
		dist = 190-ScrollbarWidth;
	}*/
}
function hideFlyout(Ident,Id,Active) {
	//document.getElementById(Id).src = 'fonts/'+Id+'_inactive.gif';
	hideSub(Ident,Id,Active);	
}
function showBody(DIV) {
	document.getElementById(DIV).style.display = 'block';
}
function hideBody(DIV) {
	document.getElementById(DIV).style.display = 'block';
}
function hideBody2() {
	document.getElementById('divBodyHide').src = 'http://10.0.0.170/record/current.jpg?rand='+Math.floor(Math.random()*1000000);
}
function showFoto(DIV,IMG,ID,WIDTH,URL) {
	var intTop =  (document.body.parentNode.scrollTop)+200;
	var intLeft = ((screen.availWidth-WIDTH)/2);
	//var intLeft = ((980-WIDTH)/2)+140;
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = URL+ID;
}
function hideFoto(DIV,IMG) {
	document.getElementById(DIV).style.display = 'none';
	document.getElementById(IMG).src = 'images/active/iEmpty.gif';
}
function showImage(DIV,IMG,ID,WIDTH) {
	var intTop =  document.body.parentNode.scrollTop+120;
	var intLeft = ((screen.availWidth-WIDTH)/2);
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = 'images/active/structurecontentbig.php?Ident='+ID;
}
function nextHeader(IMG,ID) {
	alert(IMG+' '+ID);
	document.getElementById(ID).src = 'images/active/structureimages.php?Ident='+IMG+1;
}
function previousHeader(ID,IMG) {
	//alert(IMG+' '+ID);
	document.getElementById(ID).src = 'images/active/structurecontentbig.php?Ident='+IMG-1;
}
function PW_btnOver(Button) { //v1.00
	document.getElementById(Button+'N').style.display = 'none';
	document.getElementById(Button+'O').style.display = 'block';
}
function PW_btnOut(Button) { //v1.00
	document.getElementById(Button+'O').style.display = 'none';
	document.getElementById(Button+'N').style.display = 'block';
}
function PW_divBlock(Ident,Show) {
	if (Show) {
		document.getElementById('divBlock'+Ident+'S').style.display = 'none';
		document.getElementById('divBlock'+Ident+'H').style.display = 'block';
	} else {
		document.getElementById('divBlock'+Ident+'S').style.display = 'block';
		document.getElementById('divBlock'+Ident+'H').style.display = 'none';
	}
}
function PW_popWindow(URL,Width,Height) { //v1.00
	var intWidth,intHeight,intLeft,intTop;
	intWidth  = Width;
	intHeight = Height;
	intLeft   = (screen.width / 2) - (intWidth / 2);
	intTop    = (screen.height / 2) - (intHeight / 2);
	window.open(URL,'newWindow','scrollbars=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);
}
function PW_fldClear(Field,Standard) {
	if (document.getElementById(Field).value==Standard) {
		document.getElementById(Field).value = '';
	}
}
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_validateForm() { //v5.00
  var i,p,q,nt,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) {
		test=args[i+2];
		val=MM_findObj(args[i]);
    if (val) {
				nt = (args[i+1]=='' ? val.name : args[i+1]);
		if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); p1=val.indexOf('.');
        if ((p<1 || p==(val.length-1)) || (p1<1 || p1==(val.length-1))) errors+='- '+nt+' muss eine gültige Adresse beinhalten!\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nt+' muss eine Zahl beinhalten!\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nt+' muss eine Zahl zwischen '+min+' und '+max+' beinhalten!\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nt+' muss angegeben werden!\n'; }
  } if (errors) alert('Folgende Fehler sind aufgetreten:\n\n'+errors);
  document.MM_returnValue = (errors == '');
}
//Example: preloadImages('file.gif', 'http://www.x.com/y.gif');
function preloadImages()
{
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}

// Bildposition
//ermittlung der y-position eines elements
function ysPos(what){
if(document.all)
return yIE(eval('document.'+what));
else if(document.layers)
return eval('document.'+what+'.y');
else if(document.getElementById)
return yIE(document.getElementById(what));
}
//ermittlung der x-position eines elements
function xsPos(what){
if(document.all)
return xIE(eval('document.'+what));
else if(document.layers)
return eval('document.'+what+'.x');
else if(document.getElementById)
return xIE(document.getElementById(what));
}
//dieses skript nicht direkt aufrufen
function yIE(what){
if(what.offsetParent)
return parseInt(what.offsetTop + yIE(what.offsetParent));
else
return parseInt(what.offsetTop);
}
//dieses skript nicht direkt aufrufen
function xIE(what){
if(what.offsetParent)
return parseInt(what.offsetLeft + xIE(what.offsetParent));
else
return parseInt(what.offsetLeft);
}
// Bildposition

//-->
