
//Break out of frames
    if (top.frames.length!=0)
    	top.location=self.document.location;
	
//Plattform-Check fuer Style-Sheet

		if (navigator.userAgent.indexOf('MSIE') != -1) 
			{
			document.write('<link rel="stylesheet" type="text/css" href="/styles_ie.css">');
			}
		else
			{
			document.write('<link rel="stylesheet" type="text/css" href="/styles_nn.css">');
			}
		

// preloading images

num = new Array (16);
for (i=0;i<=15;i++)
{ num[i] = new Image(); }
num[0].src="/images/nav_home_on.gif";
num[1].src="/images/nav_home_off.gif";
num[2].src="/images/nav_haus_on.gif";
num[3].src="/images/nav_haus_off.gif";
num[4].src="/images/nav_bieten_on.gif";
num[5].src="/images/nav_bieten_off.gif";
num[6].src="/images/nav_geburt_on.gif";
num[7].src="/images/nav_geburt_off.gif";
num[8].src="/images/nav_aktuell_on.gif";
num[9].src="/images/nav_aktuell_off.gif";
num[10].src="/images/nav_service_on.gif";
num[11].src="/images/nav_service_off.gif";
num[12].src="/images/nav_kontakt_on.gif";
num[13].src="/images/nav_kontakt_off.gif";
num[14].src="/images/nav_impressum_on.gif";
num[15].src="/images/nav_impressum_off.gif";

// image wechsel

function highlight(bild){
	document.images[bild].src = '/images/' + bild + '_on.gif';
	}
function darken(bild){
	document.images[bild].src = '/images/' + bild + '_off.gif';
	}

	//Formularcheck

function checkForm(xxx)
{
	var zahlen = /[0123456789]/;
	var buchst = /[A-Za-z]/;
	if(xxx.vname.value == '' || zahlen.exec(xxx.vname.value) != null)
	{
		errorMess('aaa');
		return false;
	}
	if(xxx.nname.value == '' || zahlen.exec(xxx.nname.value) != null)
	{
		errorMess('bbb');
		return false;
	}
	if(xxx.tel.value == '' || buchst.exec(xxx.tel.value) != null)
	{
		errorMess('ccc');
		return false;
	}
	if(xxx.message.value == '')
	{
		errorMess('ddd');
		return false;
	}
	return true;
}
function errorMess(welches)
	{
		var eins = '';
		var zwei = '';
		var drei = '';
		var vier = '';
		if(welches == 'aaa')eins = 'Vorname';
		if(welches == 'bbb')zwei = 'Nachname';
		if(welches == 'ccc')drei = 'Telefon';
		if(welches == 'ddd')vier = 'Nachricht';
	alert('Wir bitten Sie das Formular vollständig und korrekt auszufüllen!\nDas Feld: \n----- '+eins+zwei+drei+vier+' -----\nist noch nicht korrekt ausgefüllt worden!');
	}
	
function checkKursForm(xxx)
{
	var zahlen = /[0123456789]/;
	var buchst = /[A-Za-z]/;
	if(xxx.kursnr.value == '')
	{
		errorKursMess('kkk');
		xxx.kursnr.focus();
		return false;
	}
	if(xxx.vname.value == '' || zahlen.exec(xxx.vname.value) != null)
	{
		errorKursMess('eee');
		xxx.vname.focus();
		return false;
	}
	if(xxx.nname.value == '' || zahlen.exec(xxx.nname.value) != null)
	{
		errorKursMess('fff');
		xxx.nname.focus();
		return false;
	}
	if(xxx.adresse.value == '')
	{
		errorKursMess('ggg');
		xxx.adresse.focus();
		return false;
	}
	if(xxx.ort.value == '')
	{
		errorKursMess('hhh');
		xxx.ort.focus();
		return false;
	}
	if(xxx.tel.value == '' || buchst.exec(xxx.tel.value) != null)
	{
		errorKursMess('iii');
		xxx.tel.focus();
		return false;
	}
	if(xxx.mail.value == '' || xxx.mail.value.indexOf('@') == -1 || xxx.mail.value.indexOf('.') == -1)
	{
		errorKursMess('jjj');
		xxx.mail.focus();
		return false;
	}
	return true;
}
function errorKursMess(welches)
	{
		var eins = '';
		var zwei = '';
		var drei = '';
		var vier = '';
		var fuenf = '';
		var sechs = '';
		var sieben = '';
		if(welches == 'eee')eins = 'Vorname';
		if(welches == 'fff')zwei = 'Nachname';
		if(welches == 'ggg')drei = 'Adresse';
		if(welches == 'hhh')vier = 'PLZ / Ort';
		if(welches == 'iii')fuenf = 'Telefon';
		if(welches == 'jjj')sechs = 'eMail';
		if(welches == 'kkk')sieben = 'Kursnummer';
	alert('Wir bitten Sie das Formular vollständig und korrekt auszufüllen!\nDas Feld: \n----- '+eins +''+ zwei +''+ drei +''+ vier+''+ fuenf +''+ sechs +''+ sieben +' -----\nist noch nicht korrekt ausgefüllt worden!');
	}	
// Popup Teaser Homepage	
	function openTeaser(url,width,height,scrollbars)
	{
		var posx = screen.width/2 - width/2;  
		var posy = screen.height/2 - height/2;
		var propsZ=(document.all)?('top=' + posy + ',left=' + posx):('screenX=' + posx + ',screenY=' + posy);
		var props = 'width=' + width + ',height=' + height + ',scrollbars=' +scrollbars + ',' + propsZ;
		
		window.open(url, "", props);
	}		

// Popup Fenster
var bildpfad = '';
function openWin(pfad,breite,hoehe)	
{	
	var abstand = 10;
	bildpfad = pfad;
	var fensti = window.open('','zoom','width=540,height=' + (hoehe+70));
	with (fensti)
	{
		document.open();
		document.write('<html><head><title>ZoomImage</title></head><body leftmargin=0 topmargin=25 marginwidth="0" marginheight="25" bgcolor="#ffcc33">'
		+'<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">'
		+'	<tr>'
		+'		<td align="center"><a href="javascript:self.close();" title="Fenster schlie&szlig;en"><img src=' + bildpfad + ' width=' + breite + ' height=' + hoehe + ' border="0" alt="Fenster schlie&szlig;en"></a></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td><img src="images/trans.gif" width="1" height=' + abstand + ' border="0"></td>'
		+'	</tr>'	
		+'	<tr>'
		+'		<td align="right"><a href="javascript:self.close();"><img src="/images/button_schliessen.gif" width="104" height="16" alt="" border="0"></a></td>'
		+'	</tr>'
		+'</table>'
		+'</body></html>');
		document.close();
	}
	fensti.focus();
}
// -----------------BACKOFFICE------------------------------------------------------------------------
	
	function BO_openWin(url,width,height,scrollbars)
	{
		var posx = screen.width/2 - width/2;  
		var posy = screen.height/2 - height/2;
		var propsZ=(document.all)?('top=' + posy + ',left=' + posx):('screenX=' + posx + ',screenY=' + posy);
		var props = 'width=' + width + ',height=' + height + ',scrollbars=' +scrollbars + ',' + propsZ;
		window.open(url, "can", props);
	}	
	
	function BO_deleter(url)
	{
		var sicher = confirm("Sicher löschen?");
		if(sicher)self.location.href = url;
	}