
if (self != top) top.location.replace(self.location);

function rightnow() {
  var rignow = new Date();
  var rignowyear = rignow.getYear();
  if (rignowyear < 2000) rignowyear = rignowyear + 1900;
  return rignowyear;
}

function setKoFo() {

// document.kontaktformular.recipient.value = "kontaktformular2008@zack-diebohne.de";
yiema = "kontaktformular"+rightnow()+"@zack-diebohne.de";
document.kontaktformular.recipient.value = yiema;

document.kontaktformular.print_blank_fields.value = "1";
document.kontaktformular.realname.value = document.kontaktformular.k_name_.value;
document.kontaktformular.email.value = document.kontaktformular.k_email.value;
document.kontaktformular.subject.value = "Kontaktformular ZACK, die Bohne!";
document.kontaktformular.print_config.value = "subject";
document.kontaktformular.sort.value = "order:k_name_,k_adres,k_tele_,k_email,k_woher,k_newsl,k_kauf_,k_text_";
document.kontaktformular.redirect.value = "/";
// document.form.required.value = "k_email_";
return null;
}
function sendekofo() {

  stc1 = document.kontaktformular.k_name_.value;
  stc2 = document.kontaktformular.k_email.value;
  stc3 = document.kontaktformular.k_text_.value;

  if (stc1.length < 1 || stc2.length < 1 || stc3.length < 1)
    {
    alert("Wie wär´s mit Daten?!\n* Diese Felder bitte auf jeden Fall ausfüllen!");
    if (stc3.length < 1) { document.kontaktformular.k_text_.focus(); }
    if (stc2.length < 1) { document.kontaktformular.k_email.focus(); }
    if (stc1.length < 1) { document.kontaktformular.k_name_.focus(); }
    }
  else
    {
    document.kontaktformular.submit();
    alert("Vielen Dank für Deine Nachricht!");
    }

}

function setFoFo() {

// document.forumformular.recipient.value = "forumformular2008@zack-diebohne.de";
yiema = "forumformular"+rightnow()+"@zack-diebohne.de";
document.forumformular.recipient.value = yiema;

document.forumformular.print_blank_fields.value = "1";
document.forumformular.realname.value = document.forumformular.k_name_.value;
document.forumformular.email.value = document.forumformular.k_email.value;
document.forumformular.subject.value = "Forumformular ZACK, die Bohne!";
document.forumformular.print_config.value = "subject";
document.forumformular.sort.value = "order:k_name_,k_adres,k_tele_,k_email,k_zeige,k_woher,k_text_";
document.forumformular.redirect.value = "http://www.zack-diebohne.de/forum.php";
// document.form.required.value = "k_email_";
return null;
}
function sendefofo() {

  stc1 = document.forumformular.k_name_.value;
  stc2 = document.forumformular.k_email.value;
  stc3 = document.forumformular.k_text_.value;

  if (stc1.length < 1 || stc2.length < 1 || stc3.length < 1)
    {
    alert("Wie wär´s mit Daten?!\n* Diese Felder bitte auf jeden Fall ausfüllen!");
    if (stc3.length < 1) { document.forumformular.k_text_.focus(); }
    if (stc2.length < 1) { document.forumformular.k_email.focus(); }
    if (stc1.length < 1) { document.forumformular.k_name_.focus(); }
    }
  else
    {
    document.forumformular.submit();
    alert("Vielen Dank für Deinen Forum-Text!");
    }

}

// Google AdSense START
// function ss(w,id) {window.status = w;a = document.getElementById(id);if (a) {bi = a.href.indexOf("&nm="); if (bi < 1) {a.href += "&nm=1";return true;}c = a.href.substring(0, bi+4); d = a.href.substring(bi+4, a.href.length);ei = d.indexOf("&");if (ei < 0) {f = d;r = '';} else {f = d.substring(0, ei);r = d.substring(ei, d.length); }var g = parseInt(f);  g++;a.href= c+g+r; }return true;}function st(id) {var a = document.getElementById(id);if (a) {a.myt = (new Date()).getTime();}}function su(id) {var a = document.getElementById(id);var b = (new Date()).getTime();if (a && a.myt && b) {var t = b - a.myt;var bi = a.href.indexOf("&clkt=");if (bi > 0) {var c = a.href.substring(0, bi+6); var d = a.href.substring(bi+6, a.href.length);var ei = d.indexOf("&");var r = '';if (ei >= 0)r = d.substring(ei, d.length);a.href = c + t + r; } else {a.href += "&clkt=" + t;}}return true;}function cs(){window.status='';} function jcc(a) {pha=document.getElementById(a); nc=pha.href.indexOf('&jca='); if(nc>=1) return; jca=(10809)-(602)-(571); if (a=='aw0') {jca+=(-5475);} else {jca=0;} phb=pha.href+'&jca='+jca; pha.href=phb;} function ha(a){  su(a); jcc(a); }function ca(a) {  su(a); jcc(a); top.location.href=document.getElementById(a).href;}function ga(o,e) {if (document.getElementById) {a=o.id.substring(1);p="";r="";g=e.target;if (g) {t=g.id;f=g.parentNode;if (f) {p=f.id;h=f.parentNode;if (h)r=h.id;}} else {h=e.srcElement;f=h.parentNode;if (f)p=f.id;t=h.id;}if (t==a||p==a||r==a)return true;su(a); jcc(a); top.location.href=document.getElementById(a).href;}}
// Google AdSense ENDE

function HideTheText1() {
  document.getElementById("askeys1").style.display="none";
}
function HideTheText2() {
  document.getElementById("askeys2").style.display="none";
}
function HideTheText3() {
  document.getElementById("askeys3").style.display="none";
}

function HideDivText() {
  document.getElementById("divtext").style.display="none";
}

function TheFinalCountDown() {
  // 100 = Minimum !
  // Zeitverzögerung wegen Ladevorgang...
  // 1 Minute = 1*60*1000
  window.setTimeout("HideTheText1();", 2000);
  window.setTimeout("HideTheText2();", 2200);
  window.setTimeout("HideTheText3();", 2400);
  window.setTimeout("HideDivText();", 2600);
}

try {
  // Nach dem Laden HideTopText durchführen, eigentlich sollte man hier
  // onDOMReady oder ähnliches benutzen = TODO
  $(document).ready(TheFinalCountDown);
  // IE Hover Flicker Fix zusätzlich zum Serverfix
  document.execCommand("BackgroundImageCache",false,true);
}
catch(e)
{
}

