<!--
function initMenu(){
	var menu = document.getElementById('menu');
	var gmenu = menu.getElementsByTagName('li');

	menu.className="menu";

	for (var i=0; i<gmenu.length; i++){
		if (gmenu.item(i).getElementsByTagName('ul')[0]){
			setFunction(gmenu.item(i),'mouseover',showMenu);
			setFunction(gmenu.item(i),'mouseout',hideMenu);
		}
	}
}

function setFunction(mid,moo,functionName){
	eval('mid.on'+moo+'=functionName');
}

function Wait(){
	setTimeout("hidden()", 1000);
}

function hideMenu(){
	this.getElementsByTagName('ul')[0].style.visibility = "hidden";
}

function showMenu(){
	this.getElementsByTagName('ul')[0].style.visibility = "visible";
}

function WriteLayerCSS(LName,funct,wert) {
	if (document.getElementById){
		var newLayer = document.getElementById(LName).style;
		newLayer[funct]=wert;
	}
}

function WriteLayer(LName,funct,wert) {
	if (document.getElementById){
		var newLayer = document.getElementById(LName);
		newLayer[funct]=wert;
	}
}

function PrintPage() { 
	var sOption="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=580,height=580,left=100,top=25"; 

	var sWinHTML = document.getElementById('content').innerHTML;
	var strBereich = document.title;
	var strBodyClass = document.body.className;
	var strBodyId = document.body.id;
      
	var winprint=window.open("","",sOption); 
       winprint.document.open(); 
       winprint.document.write('<html><head><title>' + document.title + '</title><link rel="stylesheet" href="style/news.css" type="text/css"><link rel="stylesheet" href="style/agentes_print.css" type="text/css"><link rel="stylesheet" href="style/typo3cache.css" type="text/css"></head><body id="printpage">'); 
       winprint.document.write('<img src="image/print_alt_bg.jpg">');
       winprint.document.write('<div id="content">'+sWinHTML+'</div><script type="text/javascript">window.print();</script>');
       winprint.document.write('</body></html>');
       winprint.document.close(); 
       winprint.focus(); 
}

/////////////////////////////////////////////////////////
/// Formular Modifikationen by stephan.kaestner@nexum.de
/////////////////////////////////////////////////////////
function isEmail(string)
{
  var atloc,dotloc,i,ch;

  if(string.length<6) return false;
  atloc = string.indexOf('@');
  dotloc = string.lastIndexOf('.');
  if(atloc==-1 || dotloc==-1 || atloc>dotloc || dotloc==(string.length-1) || (string.length-4)>dotloc) return false;
  if(string.indexOf('@',atloc+1)!=-1) return false;
  for(i=0; i<string.length; i++)
  {
    ch = string.charAt(i);
    if(!((i<dotloc && ch>='0' && ch<='9') || (ch>='A' && ch<='Z') || (ch>='a' && ch<='z') || (i<=dotloc && (ch=='.' || ch=='@' || ch=='-' || ch=='_' || ch=='+'))))
      return false;
  }
  return true;
}

function setValue(isDelete, uncheckedValue, checkedValue, hidden, checkbox) {
	if (isDelete) {
		if (checkbox.checked) {
			hidden.value = uncheckedValue;
		} else {
			hidden.value = '';
		}		
	} else {
		if (checkbox.checked) {
			hidden.value = checkedValue;
		} else {
			hidden.value = uncheckedValue;
		}		
	}
}


function check()
{

var form = document.contactform;

for(;;)
{  
  // Abfragen

  if(form.Name.value == "")
  {
    alert('Bitte geben Sie Ihren Namen an.')
    form.Name.focus();
    break; 
  }

  if(form.Email.value == "")
  {
    alert('Bitte geben Sie Ihre E-Mail-Adresse an.')
    form.Email.focus();
    break; 
  }

  if(!isEmail(form.Email.value))
  {
    alert('Bitte geben Sie eine gültige E-Mail-Adresse an.')
    form.Email.focus();
    break; 
  }
  
  
  if(form.Anfrage.value == "")
  {
    alert('Bitte geben Sie eine Anfage ein.')
    form.Anfrage.focus();
    break; 
  }
  
  form.submit();
  break;
}
}

//-->