function HoleDatum(){
  var str = ""
    var clockwork = new Date();
    var Tag = clockwork.getDate();
    var Monat = clockwork.getMonth() + 1;
    var Jahr = clockwork.getYear();
    if (Tag < 10) { Tag = "0" + Tag }
    if (Monat < 10) { Monat = "0" + Monat }
    if (Jahr < 1900) { Jahr = Jahr + 1900 }
    str = (Tag+"."+Monat+"."+Jahr)
  return str;
}

function ZeigeDatum(){
  document.write(HoleDatum(''))
  return;
}

function ds_win(url) {       //Datenschutz
  var myLeft = (screen.Width -500)/2;
var myTop = (screen.Height -500)/2;
 //specify popup window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=500,height=500,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;


    if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup1', winfeatures);
    }
   // mywindow.focus();
  mywindow.location.href = url;
}

function tell_win(url) {       //Tellafriend
  var myLeft = (screen.Width -580)/2;
var myTop = (screen.Height -630)/2;
 //specify popup window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=580,height=630,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;


    if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup2', winfeatures);
    }
  mywindow.focus();
  mywindow.location.href = url;
}

function my_win(url) {          //Preisbeispiel
  var myLeft = (screen.Width -300)/2;
var myTop = (screen.Height -330)/2;
 //specify popup window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=300,height=330,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;


    if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup1', winfeatures);
    }
   // mywindow.focus();
  mywindow.location.href = url;
}

function suchenPopup(url)         //Suchoption auf Wahlheftseite
   {
    var myLeft = (screen.Width -400);
var myTop = 0;
var winfeatures="width=300,height=250,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;

  if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup2', winfeatures);
    }
  mywindow.focus();
  mywindow.location.href = url;

   }

function anZeigen(URL)                 //Zeitschriften-Details
   {
details = 0;
if(details.closed == false) {
details.close();
}
  details=  window.open(URL,"details","width=500, height=500 ,top=0 ,left=20,scrollbars=yes,resizable=no");
details.focus();
   }

function LZanZeigen(URL)                 //Links lesezirkel.de Seiten
   {
lz = 0;
if(lz.closed == false) {
lz.close();
}
lz=  window.open(URL,"lz","width=570 ,height=500,scrollbars=yes,resizable=no");
details.focus();
   }

function geo_anZeigen(URL)                 //Links lesezirkel.de Seiten
   {
geo = 0;
if(geo.closed == false) {
go.close();
}
  geo=  window.open(URL,"geo","width=710 ,height=600,scrollbars=no,resizable=no");
geo.focus();
   }

function adv_win(url) {       //Advent
  var myLeft = (screen.Width -620)/2;
var myTop = (screen.Height -650)/2;
 //specify popup window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=618,height=650,scrollbars=1,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;


    if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup1', winfeatures);
    }
   mywindow.focus();
  mywindow.location.href = url;
}

function adv_instantwin(url) {
  var myLeft = (screen.Width -600)/2;
var myTop = (screen.Height -620)/2;
 //specify popup window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=600,height=620,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";
winfeatures+=(winfeatures!='')?',':'';
winfeatures+=',left='+myLeft+',top='+myTop;


    if (!window.mywindow || window.mywindow.closed) {
    mywindow = window.open('', 'mypopup2', winfeatures);
    }
   mywindow.focus();
  mywindow.location.href = url;
}


function BlurLinks(){
var a = document.getElementsByTagName('a');
var x = a.length;

for(i=0;i<x;i++){
a[i].onfocus = new Function("this.blur();");
}
}

function PopUp(w,h,ziel) {
  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=no,location=no,toolbar=no,status=no";
  parameter += ",resizable=no,scrollbars=no";
  var Fenster = window.open(ziel,"PopUp",parameter);
  if (Fenster) Fenster.focus();
  return !Fenster;
}

function PopUpScroll(w,h,ziel) {
  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=no,location=no,toolbar=no,status=no";
  parameter += ",resizable=no,scrollbars=yes";
  var Fenster = window.open(ziel,"PopUpScroll",parameter);
  if (Fenster) Fenster.focus();
  return !Fenster;
}


/***********************************************
* Required field(s) validation v1.10- By NavSurf
* Visit Nav Surf at http://navsurf.com
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function formCheck(formobj){
        // Enter name of mandatory fields
        var fieldRequired = Array("nname", "vname", "strasse", "plz", "ort", "email");
        // Enter field description to appear in the dialog box
        var fieldDescription = Array("Nachname", "Vorname", "Strasse", "PLZ (Postleitzahl)", "Ort", "Email");
        // dialog message
        var alertMsg = "Bitte füllen Sie alle Felder aus:\n";

        var l_Msg = alertMsg.length;

        for (var i = 0; i < fieldRequired.length; i++){
                var obj = formobj.elements[fieldRequired[i]];
                if (obj){
                        switch(obj.type){
                        case "select-one":
                                if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        case "select-multiple":
                                if (obj.selectedIndex == -1){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        case "text":
                        case "textarea":
                                if (obj.value == "" || obj.value == null){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        default:
                        }
                        if (obj.type == undefined){
                                var blnchecked = false;
                                for (var j = 0; j < obj.length; j++){
                                        if (obj[j].checked){
                                                blnchecked = true;
                                        }
                                }
                                if (!blnchecked){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                        }
                }
        }

        if (alertMsg.length == l_Msg){
                return true;
        }else{
                alert(alertMsg);
                return false;
        }
}

function formCheck2(formobj){
        // Enter name of mandatory fields
        var fieldRequired = Array("nname_g", "vname_g", "strasse_g", "plz_g", "ort_g", "nname", "vname", "strasse", "plz", "ort", "telefon", "email");
        // Enter field description to appear in the dialog box
        var fieldDescription = Array("Nachname Empfänger", "Vorname Empänger", "Strasse Empfänger", "PLZ (Postleitzahl) Empfänger", "Ort Empfänger", "Nachname", "Vorname", "Strasse", "PLZ (Postleitzahl)", "Ort", "Telefon", "Email");
        // dialog message
        var alertMsg = "Bitte füllen Sie alle Felder aus:\n";

        var l_Msg = alertMsg.length;

        for (var i = 0; i < fieldRequired.length; i++){
                var obj = formobj.elements[fieldRequired[i]];
                if (obj){
                        switch(obj.type){
                        case "select-one":
                                if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        case "select-multiple":
                                if (obj.selectedIndex == -1){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        case "text":
                        case "textarea":
                                if (obj.value == "" || obj.value == null){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                                break;
                        default:
                        }
                        if (obj.type == undefined){
                                var blnchecked = false;
                                for (var j = 0; j < obj.length; j++){
                                        if (obj[j].checked){
                                                blnchecked = true;
                                        }
                                }
                                if (!blnchecked){
                                        alertMsg += " - " + fieldDescription[i] + "\n";
                                }
                        }
                }
        }

        if (alertMsg.length == l_Msg){
                return true;
        }else{
                alert(alertMsg);
                return false;
        }
}