var start_bg = 'start_erotik.jpg';
var start_btns = 'start_buttons.jpg';
var start_width = 800;
var start_height = 400;
var leave_website = "http://www.google.de";

function show_it() {
  var Wwidth = window.innerWidth || document.body.clientWidth;
  var Wheight = Wwidth;
  
  var divElement = document.createElement("div");
  divElement.style.backgroundImage = "url('"+start_bg+"')";
  divElement.style.width = start_width + "px";
  divElement.style.height = start_height + "px";
  divElement.style.marginTop = "100px";
  divElement.style.marginRight = "auto";
  divElement.style.marginLeft = "auto";
  divElement.style.display = "block";        
  var ieleft = ((Wwidth - start_width)/2);
  divElement.style.left = ieleft + "px";
  divElement.setAttribute("id", "oncenter");
  
  var divButtons = document.createElement("div");
  divButtons.style.width = "520px";
  divButtons.style.height = "100px";
  divButtons.style.paddingTop = "100px";
  divButtons.style.marginLeft = "auto";
  divButtons.style.display = "block";
  
  var startText = document.createElement("div");
  startText.style.width = "494px";
  startText.innerHTML = "Diese Seite ist nicht geeignet für Personen unter 18 Jahren. Bitte verlassen Sie diese Seite jetzt, wenn Sie unter 18 Jahre alt sind oder erotisches Bild- oder Textmaterial als anstößig empfinden. Gewalt als reale oder rohe Handlung, Gewalt gegen Kinder und Gewaltverherrlichung sowie jegliche Form von Kinderpornographie wird von den Betreibern dieser Seite auf das Schärfste verurteilt und ist weder Inhalt noch Intention jeglicher Darstellungen auf dieser Seite.";
  startText.style.backgroundColor = "#CCCCCC";
  startText.style.marginTop = "50px";
  startText.style.marginRight = "30px";
  startText.style.marginLeft = "auto";
  startText.style.display = "block";
  
  var goForm = document.createElement("div");
  goForm.setAttribute("style", "margin-right:20px;float:left;display:block;");
  goForm.style.width = "232px";
  goForm.style.height = "62px";
  goForm.style.display = "block";
  goForm.innerHTML = '<form method="post" action="" name="start_erotik_f"><input type="hidden" name="start_erotik" value="1" style="display:none;" /></form>';
  
  var goButton = document.createElement("a");
  goButton.setAttribute("style", "float:left;display:block;");
  goButton.style.backgroundImage = "url('"+start_btns+"')";
  goButton.style.backgroundPosition = " -4px -5px";
  goButton.style.width = "232px";
  goButton.style.height = "62px";
  goButton.style.display = "block";
  goButton.href = "javascript:document.start_erotik_f.submit();";
  goButton.onclick = function() {
    document.start_erotik_f.submit();
  }
  goButton.onmouseover = function() {
    goButton.style.backgroundPosition = " -4px -75px";
  }
  goButton.onmouseout = function() {
    goButton.style.backgroundPosition = " -4px -5px";
  }

  
  var leaveButton = document.createElement("a");
  leaveButton.setAttribute("style", "margin-right:20px;float:left;display:block;");
  leaveButton.style.backgroundImage = "url('"+start_btns+"')";
  leaveButton.style.backgroundPosition = " -4px -145px";
  leaveButton.style.width = "232px";
  leaveButton.style.height = "62px";
  leaveButton.style.display = "block";
  leaveButton.href = leave_website;
  /*leaveButton.onmouseover = function() {
    leaveButton.style.backgroundPosition = " -4px -215px";
  }
  leaveButton.onmouseout = function() {
    leaveButton.style.backgroundPosition = " -4px -145px";
  }*/
  
  var agbButton = document.createElement("a");
  agbButton.style.display = "block";
  agbButton.style.width = "50px";
  agbButton.href = "javascript:void(0);";
  agbButton.onclick = function() {
    toggle_agb();
  }
  agbButton.style.marginRight = "auto";
  agbButton.style.marginLeft = "auto";
  agbButton.innerHTML = "AGB";
  agbButton.style.color = "#fff";
  
  
  var divBig = document.createElement("div");
  divBig.style.backgroundColor = "#000000";
  divBig.style.position = "fixed";
  divBig.style.left = "0px";
  divBig.style.top = "0px";
  divBig.style.width = Wwidth + "px";
  divBig.style.height = Wheight + "px";
  divBig.style.zIndex = "9999";
  divBig.setAttribute("id", "div_big");
  
  window.document.body.appendChild(divBig);
  divBig.appendChild(divElement);
  divElement.appendChild(divButtons);
  divElement.appendChild(startText);
  divButtons.appendChild(leaveButton);
  divButtons.appendChild(goForm);
  goForm.appendChild(goButton);
  
  divBig.appendChild(agbButton);
}





function toggle_agb() {
  scroll(0,0);
  var agb = document.getElementById('agb');
  if(agb.style.display == 'none') {
    agb.style.display = 'block';
  } else {
    agb.style.display = 'none';
  }
}
