function login_sichtbar() {
document.getElementById("login").style.visibility = 'visible';
}
function login_unsichtbar() {
document.getElementById("login").style.visibility = 'hidden';
}
function upload_sichtbar() {
	document.getElementById("upload").style.visibility = 'visible';
	}
function bildschirmgroesse() { //zur Zeit nicht benutzt
	alert(screen.width + "x" + screen.height);
}
function form_sichtbar(index){
	document.getElementById("form").style.visibility = 'visible';
	new Ajax.Updater('form', 'test.php?action=show_details&index='+index, { method: 'get' });
	//alert(index);
}
function form_unsichtbar(){
	document.getElementById("form").style.visibility = 'hidden';
}
function transactionx(transaction){
	document.getElementById("inhalt").style.visibility = 'visible';
	new Ajax.Updater('inhalt', './index.php?action='+transaction, { method: 'get' });	
	//alert(transaction);
}
function search(search){
	document.getElementById("inhalt").style.visibility = 'visible';
	new Ajax.Updater('inhalt','./includes/class_forms.php?action=search_article&searchstring='+search, { method: 'get' });	
	alert(search);
}
function submitForm () {
	document.search_form.submit();
}
function transaction () {
	document.transaction_form.submit();
}
function Form_Validator(theForm)
{
  if (theForm.agb.checked == "")
    {
    alert("Bitte bestaetigen Sie, dass; Sie die AGB gelesen haben.");
    theForm.agb.focus();
    return (false);
    }
  if (theForm.remail.value == "")
  {
    alert("Geben Sie Emailadresse in das Feld \"Emailadresse\" ein.");
    theForm.remail.focus();
    return (false);
  }
  if (theForm.remail.value.length < 6)
  {
    alert("Geben Sie mindestens 6 Zeichen in das Feld \"Emailadresse\" ein.");
    theForm.remail.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@_0123456789.-";
  var checkStr = theForm.remail.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Geben Sie nur Buchstaben in das Feld \"Emailadresse\" ein.");
    theForm.remail.focus();
    return (false);
  }
  return (true);
}
