/* Javascript Fehler unterdruecken */

/*
onerror = stopError;
function stopError()
{
return true;
}
*/


/* POPUP */
//
/* <a href="html-or.jpg" onclick="return popup(this,123,456)" title="..."> */
// or
/* <a href="html-or.jpg" onclick="popup(this)" title="..."> */

var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

function openimage(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 150;  // 150px*150px is the default size
  h = (h) ? h += 25 : 150;
  var args = 'width='+w+',height='+h+',resizable,status=no';
  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
  if (pop) return false;
  else return true;
}

function openpage(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 150;  // 150px*150px is the default size
  h = (h) ? h += 25 : 150;
  var args = 'width='+w+',height='+h+',resizable,scrollbars,status';
  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
  if (pop) return false;
  else return true;
}

window.onunload = popdown;
window.onfocus = popdown;

/* SEITE DRUCKEN */
function printPage() {
if (window.print) {
agree = confirm('Ein Klick auf OK genügt \nund die Seite kann gedruckt werden. \n\nBereit?');
if (agree) window.print();
}
}

/* ONLOAD IMAGE */
document.write("<style type='text/css'>#thephoto {visibility:hidden;}</style>");

function initImage() {
	imageId = 'thephoto';
	image = document.getElementById(imageId);
	setOpacity(image, 0);
	image.style.visibility = "visible";
	fadeIn(imageId,0);
}
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}
/* window.onload = function() {initImage()} */

/* VERTICAL MENU */
/* window.onload=navmenu; */
function navmenu(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('vmenu'+i)) {document.getElementById('vmenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function scriptload() {
navmenu('vmenu1')                  //ersters onload Script
initImage()                        //zweites onload Script
}








