
// Formular check 

function chkFormular () {
  if (document.Formular.fname.value == "") {
    alert("Bitte Ihren Namen eingeben!");
    document.Formular.fname.focus();
    return false;
  }
  if (document.Formular.ftelefon.value == "") {
    alert("Bitte Ihre Telefonnummer eingeben!");
    document.Formular.ftelefon.focus();
    return false;
  }
  if (document.Formular.femail.value == "") {
    alert("Bitte Ihre E-Mail-Adresse eingeben!");
    document.Formular.femail.focus();
    return false;
  }
  if (document.Formular.femail.value.indexOf("@") == -1) {
    alert("Keine E-Mail-Adresse!");
    document.Formular.femail.focus();
    return false;
  }
  if (document.Formular.fwww.value.indexOf(".") == -1) {
    alert("Keine Web-Adresse!");
    document.Formular.fwww.focus();
    return false;
  }
}

// Windows Print Funktion 

function printPage() {
if (window.print) {
jetztdrucken = confirm('Wollen Sie diese Seite jetzt drucken?');
if (jetztdrucken) window.print();
   }
}



// PopUp

function popup(neu_width, neu_height, url, center) {
	neu_screenX = (center) ? ((screen.width-neu_width)/2) : 32;
	neu_screenY = (center) ? ((screen.height-neu_height-32)/2) : 32;
	neu_param = "directories=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes,width="+neu_width+",height="+neu_height+",screenX="+neu_screenX+",screenY="+neu_screenY;
	neu=window.open(url,"_popup",neu_param);
	neu.window.focus();
	neu.window.moveTo(neu_screenX, neu_screenY);
}


/*
Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use

Changes by D++ David Weber 2006
*/

//Enter "frombottom" or "fromtop"
var verticalpos="frombottom"


function JSFX_FloatTopDiv()
{
	var startX = -22,
	startY = 220;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y) { this.style.left=x+"px"; this.style.top=y+"px"; };
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		el.y -= startY;
		el.style.visibility = "visible";
		}
		return el;
	}
	window.stayTopLeft=function()
	{
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : document.body.scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		} else {
		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("claim");
	stayTopLeft();
}

// Pulldown Menu

function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("pulldownnav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


window.onload = function() {
startList();
JSFX_FloatTopDiv();
}

// Image New /Popup / Change
function new_window(theURL,winName,features,myWidth,myHeight,isCenter) {
  if(window.screen)if(isCenter)if(isCenter=="true") {
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function new_imagepopup(theURL,winName,altName,features,myWidth,myHeight,isCenter) {
  if(window.screen)if(isCenter)if(isCenter=="true") {
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  imagepopup = window.open('','',features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
  with (imagepopup) {
    document.open();
    document.write('<title>Images</title>');
    document.write('<meta http-equiv="imagetoolbar" content="no">');
    document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no">'
  )
  document.write('<a href="javascript:self.close()">');
  document.write('<img src="'+theURL+'" border="0" alt="'+altName+'" title="'+altName+'">')
  document.close();}
}

function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

var preloadFlag = false;
function preloadImages() {
  if (document.images) {
    for (var i=0; i<preloadImages.arguments.length; i++) {
      rslt = newImage(preloadImages.arguments[i]);
    }
    preloadFlag = true;
  }
}

function changeImages() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

