//***************************************************************************************
// zum Sichtbar und Unsichtbarmachen von Untermenüs
//***************************************************************************************
function sichtbar(ids)
{
 pos = ids.indexOf("/");
 while (pos > 0)
 {
  ids1=ids.substr(0,pos);
  ids=ids.substr(pos+1);
  anzeigen=ids1.substr(ids1.length-1,1);
  ids1=ids1.substr(0,ids1.length-1);
  for (i=1; i<20; i++)
  {

   if (document.getElementById(ids1+i) == null)
    break;
   if (anzeigen == "1" && document.getElementById(ids1+i).style.display == "none")
    document.getElementById(ids1+i).style.display="block";
   else
    document.getElementById(ids1+i).style.display="none";
  }
  pos = ids.indexOf("/");
 }
}
function Fensterweite () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function Fensterhoehe () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function isnumeric(xZahl)
{
 var chkZ = 1;
 var zeich = "01234567890,."
 for(i=0;i<xZahl.length;++i)
 {
  if(zeich.indexOf(xZahl.charAt(i)) == -1)
   chkZ = -1;
 }
 if(chkZ == -1)
  return false;
 else
  return true;
}

function Datumpruefen(edat)
{
  xt = edat.substr(0,2) * 1;
  xm = edat.substr(3,2) * 1;
  xj = edat.substr(6,4) * 1;
  if(xj < 2000 || xj > 2100)
    return false;
  if(xm < 1 || xm > 12)
    return false;
  if(xt < 1 || xt > Monatsletzter(xj, xm))
    return false;
  return true;
}

function Monatsletzter(JJ, MM)
{
  if(MM == 1 || MM == 3 || MM == 5 || MM == 7 || MM == 8 || MM == 10 || MM == 12)
  {
    letzter = 31;
  }
  if(MM == 4 || MM == 6 || MM == 9 || MM == 11)
  {
    letzter = 30;
  }
  if(MM == 2)
  {
    letzter=28;
    if(JJ % 4 == 0)
      letzter++;
  }
  return letzter;
}
