function rf() {
 $('#bilder').load(location.href+" #gallery>*");
}
function ak(id) {
$.ajax({
  url: '/bilder_2.php',
  type: 'GET',
  data: {'id': id},
  beforeSend: function(){
   parent.$('#bilder').fadeOut(500);
  },
  success: function( neueDaten ) {
    window.setTimeout( function() {
      parent.$('#bilder').html( neueDaten );
    },500);
  },
  complete: function(){
    parent.$('#bilder').fadeIn(500);
  }
});
}

function edit(id,start) {
 x = (screen.width - 800) / 2;
 ed = window.open("/admin/editor.php?id="+id+"&start="+start, "Editor", "resizable=yes,width=830,height=800,left="+x+",top=120");
 ed.focus();
}

function navi() {
 na = window.open("/admin", "na", "scrollbars=yes,resizable=yes,width=1100,height=800,left=0,top=0");
 na.focus();
}
function meta() {
 me = window.open("/admin/meta.php", "me", "scrollbars=yes,resizable=yes,width=510,height=450,left=20,top=20");
 me.focus();
}

function check() {
 if (document.kontakt.name.value=="") {
  alert("Bitte einen Namen eingeben!");
	document.kontakt.name.focus();
 }
 else if (document.kontakt.vorname.value=="") {
  alert("Bitte einen Vornamen eingeben!");
	document.kontakt.vorname.focus();
 }
 else if (document.kontakt.fon.value=="") {
  alert("Bitte eine Telefon-Nummer eingeben!");
	document.kontakt.fon.focus();
 }
 else if (document.kontakt.email.value=="" || document.kontakt.email.value.indexOf("@")==-1 || document.kontakt.email.value.indexOf(".")==-1) {
  alert("Bitte eine korrekte E-Mail-Adresse eingeben!");
	document.kontakt.email.focus();
 }
 else document.kontakt.submit();
}

