// ------------------------------------------------
// Javascript fuer die Seite: www.nottebrock.de
// Code by:
//  Nottebrock Mediendesign | www.nottebrock.de
// ------------------------------------------------

function pruefe_kontakt(){
	var fehlt=''
	if (document.form1.vorname.value=='') fehlt+='Vorname\n'
	if (document.form1.name.value=='') fehlt+='Name\n'
	if (document.form1.email.value=='') fehlt+='E-Mail\n'
	if (fehlt!='') { alert ('Es fehlen noch folgende Angaben:\n\n'+fehlt);
	return false }
	else { if (document.form1.email.value.indexOf('@')==-1 || document.form1.email.value.indexOf('.')==-1) { alert ('Ihre E-Mail-Adresse ist ungueltig.'); return false; }
	else return true; }
}

function pruefe_newsletter(){
	var fehlt=''
	if (document.form1.email.value=='') fehlt+='E-Mail\n'
	if (fehlt!='') { alert ('Bitte geben Sie eine E-Mail-Adresse ein.');
	return false }
	else { if (document.form1.email.value.indexOf('@')==-1 || document.form1.email.value.indexOf('.')==-1) { alert ('Ihre E-Mail-Adresse ist ungueltig.'); return false; }
	else return true; }
}

function pruefe_pressekontakt(){
	var fehlt=''
	if (document.pressekontakt.verlag.value=='') fehlt+='Verlag/Titel\n'
	if (document.pressekontakt.vorname.value=='') fehlt+='Vorname\n'
	if (document.pressekontakt.name.value=='') fehlt+='Name\n'
	if (document.pressekontakt.strasse.value=='') fehlt+='Strasse\n'
	if (document.pressekontakt.plzort.value=='') fehlt+='PLZ Ort\n'
	if (document.pressekontakt.telefon.value=='') fehlt+='Telefon\n'
	if (document.pressekontakt.telefax.value=='') fehlt+='Telefax\n'
	if (document.pressekontakt.email.value=='') fehlt+='E-Mail\n'
	if (fehlt!='') { alert ('Es fehlen noch folgende Angaben:\n\n'+fehlt);
	return false }
	else { if (document.pressekontakt.email.value.indexOf('@')==-1 || document.pressekontakt.email.value.indexOf('.')==-1) { alert ('Ihre E-Mail-Adresse ist ungueltig.'); return false; }
	else return true; }
}

function oeffne_cdb(){ 
	popup = window.open("popup_cdb.htm","","resizable=no,menubar=no,toolbar=no,location=no,status=no,height=400,width=450,scrollbars=yes"); 
}

function newsletter(){ 
	popup = window.open("newsletter.html","","resizable=no,menubar=no,toolbar=no,location=no,status=no,height=500,width=400,scrollbars=yes"); 
}

function fensterzu() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
}

function homepage() { 
if (self.parent.frames.length != 0) {
	self.parent.close()	
	} else {
	window.close()
	}
	popup = window.open("index.html","","resizable=yes,menubar=yes,toolbar=yes,location=yes,status=yes,height=480,width=750,scrollbars=yes");
}

function autofocus_newsletter(){
	document.form1.email.focus();
	document.form1.email.select();
}

// Pop_up Fenster Projekte
function pop_up_projekte(ref){ 
	ref_datei = "refs/projekte_detail.php?gal="+ref+"&bild=1";
	popup = window.open(ref_datei,"Referenz","resizable=no,menubar=no,toolbar=no,location=no,status=no,height=410,width=710,scrollbars=no"); 
}

// Pop_up Fenster
function pop_up(which, title, width, height, scrollbars)
{
	my_pop_up= window.open(which, title,'width='+ width +',height=' + height + ',scrollbars=' + scrollbars + ',resizable=yes');
    if (my_pop_up != null) 
	{
    	if (my_pop_up.opener == null) 
		{
      		my_pop_up.opener = self
   		} 
		my_pop_up.window.focus();
	}
}