function initscroll(){
	if(navigator.appName=="Netscape"){var w=innerWidth;document.test.left=0}
else{var w=document.body.offsetWidth;test.style.left=0}}
	var n = (document.layers) ? 1:0;var ie = (document.all) ? 1:0;var loop, timer1, timer2;function makeObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'
	this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')
	this.up=goUp
	this.down=goDown
	this.obj = obj + "Object"
	eval(this.obj + "=this")
	return this}
function goDown(speed){
	clearTimeout(timer1);clearTimeout(timer2)
	this.css.top=parseInt(this.css.top)+3
	if(loop) timer1=setTimeout(this.obj+".down("+speed+")",speed)}
function goUp(speed){
	clearTimeout(timer2);clearTimeout(timer1)
	this.css.top=parseInt(this.css.top)-3
	if(loop) timer2=setTimeout(this.obj+".up("+speed+")",speed)}
function init1scroll()
{ testObj=makeObj('test2','test'); // id's der div-Bereiche
  init();
  loop=true; testObj.up(150); // Geschwindigkeit und Richtung: je kleiner die Zahl, umso schneller
}
// onload=init1scroll; --> Diese Zeile in die jeweilige Seite übernehmen...



var ErrorField="";
var chr_a="'";
var myold;
var myoldstyle;
var send_must_check=1;

function check_integer(form_name,name, msg_text, rest)
{ var my_f=document.forms[form_name].elements[name];
  var dummy=my_f.value;  
  dummy=dummy.replace(/\ /g,"");
  my_f.value=dummy;
  if (my_f.value == "") return;
  if (isNaN(my_f.value) || (my_f.value.indexOf(".")>=0))
  {  alert(msg_text);
     my_f.value="";
     my_f.focus();
  }
  var p=rest.indexOf('(',0);
  if (p>=0)
  { rest=rest.substring(p+1,10000);
    rest=rest.replace(/\)/g,"");
    d2=rest.split(',');
    var f1=parseInt(d2[0]);

    var f2=parseInt(d2[1]);

    if ((my_f.value<f1) || (my_f.value>f2))
    { alert('Bitte geben Sie einen Wert zwischen '+f1+' und '+f2+' ein!');
      my_f.value="";
      my_f.focus();
    }
  }    
}

function check_Currency(form_name,name, msg_text)
{ var my_f=document.forms[form_name].elements[name];
  var dummy=my_f.value;  
  dummy=dummy.replace(/\ /g,"");
  dummy=dummy.replace(/\,/g,".");
  my_f.value=dummy;
  if (my_f.value == "") return;
  if (isNaN(my_f.value))
  {  alert(msg_text);
     my_f.value="";
     my_f.focus();
  }  
}

function check_Date(form_name,name, msg_text)
{ var my_f=document.forms[form_name].elements[name];
  var dummy=my_f.value;  
  dummy=dummy.replace(/\ /g,"");
  my_f.value=dummy;
  if (my_f.value == "") return;
  dummy=dummy.match(/(\d+)\.(\d+)\.(\d+)/);
  if (dummy == null)
  {  alert(msg_text);
     my_f.value="";
     my_f.focus();
  }  
}

function check_EMail(form_name,name, msg_text)
{ var my_f=document.forms[form_name].elements[name];
  var dummy=my_f.value;  
  dummy=dummy.replace(/\ /g,"");
  my_f.value=dummy;
  if (my_f.value == "") return;
  dummy=dummy.match(/\@.*\..*/);
  if (dummy == null)
  {  alert(msg_text);
     my_f.value="";
     my_f.focus();
  }  
}

function detailFocus(e)
{ if(typeof e=="object"&&e!=null)
  { if (e.className == "pMustField")
    { e.className="pfocusField";
    }
    else
    { e.className="focusField";
    }
  }
  return true;
}

function detailFocusSelect(e)
{ 
}



function onKeyDown()
{
//  if (field.value.length > maxlimit)
//      {field.value = field.value.substring(0, maxlimit);}
}

// function onKeyUp()
// {
// }



function detailLostFocus(e,Fieldtype)
{ if(typeof e=="object"&&e!=null)
  { if (e.className == "pfocusField")
    { e.className="pMustField";
    }
    else
    { e.className="pNotMustField";
    }
  }  
  if (Fieldtype.match(/INTEGER/) != null) { check_integer('my',e.name,'Bitte geben Sie nur Ziffer (0..9) ein!',Fieldtype); }
  if (Fieldtype == "DATE")    { check_Date('my',e.name,'Bitte geben Sie ein Datum im Format TT.MM.JJJJ ein!'); }
  if (Fieldtype == "EMAIL")   { check_EMail('my',e.name,'Bitte geben Sie eine gültige E-Mail-Adresse ein!'); }
}

function HilfeFenster(url,name)
{ window.open(
    url,   // URL (or "")
    name,  // name
    "width=600,height=400,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no,directories=no" );
}

function PrintFenster(name)
{  var url=document.location.href+"&PRINT=1&NOFRAME=1&TITLE="+name+"&"+myurl;
   if ((typeof window=='object') && (typeof window.wf0=='object'))
   { window.wf0.location=url;
   }
   else
   { if ((typeof window.parent=='object') && (typeof window.parent.wf0=='object'))
     { window.parent.wf0.location=url;
     }
     else
     { if ((typeof window.opener=='object') && (typeof window.opener.wf0=='object'))
       { window.opener.wf0.location=url;
       }
       else
       { window.open(url+'&ECLOSE=1',name,"width=140,height=110,resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,directories=no" );
       }
     }
   }
}

function SetzeStatusZeile()
{ window.status="Willkommen in der digitalen Welt";
  setTimeout('SetzeStatusZeile()', 100); 
}

function PageLoaded()
{ window.focus();
  SetzeStatusZeile();
  if ((ErrorField !="") && (typeof document.forms["my"]=="object"))
  { if (typeof document.forms["my"].elements[ErrorField ]=="object") { document.forms["my"].elements[ErrorField].focus(); }
  }
  if (typeof document.forms["login"]=="object")
  { if (typeof document.forms["login"].elements["ARGS.Name"]=="object") { document.forms["login"].elements["ARGS.Name"].focus(); }
    if (typeof document.forms["login"].elements["ARGS.Pass1"]=="object") { document.forms["login"].elements["ARGS.Pass1"].focus(); }
  }
  if (document.location.href.indexOf("PRINT=1")>=0)
  { window.print(document);
    if (document.location.href.indexOf("ECLOSE=1")>=0) { window.close(); }
  }
}


var toScroll=new Array()
var ie=document.all
var dom=document.getElementById
var firstNews_obj;
var secondNews_obj;

function newsScroll(name){
  var c=this; c.name=name; c.mc=0; c.i=2;
  return this;
}

newsScroll.prototype.addItem = function(text,link,font,fontSize,fontStyle){
  var c = this;
  if (link !=''){
    if (font != '')
      toScroll[c.mc]="<a href='"+link+"'><font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>"+text+"</font></a>";
    else
      toScroll[c.mc]="<a href='"+link+"'><font Class='"+fontStyle+"'>"+text+"</font></a>";
  }
  else { 
    if (font != '')
      toScroll[c.mc]="<font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>"+text+"</font>";
    else
      toScroll[c.mc]="<font Class='"+fontStyle+"'>"+text+"</font>";
  }
  c.mc++;
}

newsScroll.prototype.construct = function(){
  var c = this; theWidth = c.scrollerwidth; theHeight=c.scrollerheight; thebgColor = c.scrollerbgcolor; theBackground =c.scrollerbackground; theDelay=c.scrollerdelay;
  scroll_obj=eval(c.name);        
  if (ie||dom){
    document.writeln('<div id="main2" style="position:relative;width:'+theWidth+';height:'+theHeight+';overflow:hidden;background-color:'+thebgColor+' ;background-image:url('+theBackground+')">')
    document.writeln('<div style="position:absolute;width:'+theWidth+';height:'+theHeight+';clip:rect(0 '+theWidth+' '+theHeight+' 0);left:0;top:0">')
    document.writeln('<div id="firstNews" style="position:absolute;width:'+theWidth+';left:0;top:1">')
    document.write(toScroll[0])
    document.writeln('</div>')
    document.writeln('<div id="secondNews" style="position:absolute;width:'+theWidth+';left:0;top:0;visibility:hidden">')
    document.write(toScroll[dyndetermine=(toScroll.length==1)? 0 : 1])
    document.writeln('</div>')
    document.writeln('</div>')
    document.writeln('</div>')
  }
}

newsScroll.prototype.move = function(whichdiv){
  var c = this; theDelay = c.scrollerdelay; theHeight = c.scrollerheight; 
  scroll_obj=eval(c.name);
  tdiv=eval(whichdiv)

  if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
    tdiv.style.top=0+"px"
    setTimeout("scroll_obj.move(tdiv)",theDelay)
    setTimeout("scroll_obj.move2(secondNews_obj)",theDelay)
    //document.write('Got Milk?')
  return
  }
  if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
    tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
    setTimeout("scroll_obj.move(tdiv)",50)
  }
  else {
    tdiv.style.top=parseInt(theHeight)+"px"
    tdiv.innerHTML=toScroll[c.i]
    if (c.i==toScroll.length-1)
      c.i=0
    else
      c.i++
  }
}

newsScroll.prototype.move2 = function(whichdiv){
  var c = this; theDelay = c.scrollerdelay; theHeight= c.scrollerheight;
  scroll_obj=eval(c.name);
  tdiv2=eval(whichdiv)

  if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
    tdiv2.style.top=0+"px"
    setTimeout("scroll_obj.move2(tdiv2)",theDelay)
    setTimeout("scroll_obj.move(firstNews_obj)",theDelay)
    return
  }
  if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
    tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
    setTimeout("scroll_obj.move2(secondNews_obj)",50)
  }
  else {
    tdiv2.style.top=parseInt(theHeight)+"px"
    tdiv2.innerHTML=toScroll[c.i]
    if (c.i==toScroll.length-1)
      c.i=0
    else
      c.i++
  }
}

newsScroll.prototype.startScroll = function(){
  var c = this;
  scroll_obj=eval(c.name);        
  
  if (toScroll.length >2)
    c.i = 2;
  else
    c.i = 0;
  
  firstNews_obj=ie? firstNews : document.getElementById("firstNews")
  secondNews_obj=ie? secondNews : document.getElementById("secondNews")
  setTimeout("scroll_obj.move(firstNews_obj)",c.scrollerDelay);
  secondNews_obj.style.top=theHeight;
  secondNews_obj.style.visibility='visible'
}


var prompttext = new Array();
// prompttext['img'] = '';
prompttext['b'] = 'Bitte den Text eingeben, der fett dargestellt sein soll:';
prompttext['i'] = 'Bitte den Text eingeben, der kursiv dargestellt sein soll:';
//prompttext['s'] = 'Bitte den Text eingeben, der fett dargestellt sein soll:';
prompttext['u'] = 'Bitte den Text eingeben, der unterstrichen dargestellt sein soll:';
//prompttext['li'] = '';
//prompttext['url='] = '';
prompttext['url'] = 'Bitte den vollständigen Link hier angeben:';
//prompttext['urld'] = '';
//prompttext['mail'] = '';

var target = null;
function getTarget(el) {

  target = (document.getElementById)? document.getElementById(el):0;

}

function storeCursor(el) {

  if (document.all && el.createTextRange) el.cursorPos = document.selection.createRange().duplicate();

}

function putStr(text) {

  if (target) {

    if (document.all && target.cursorPos) {

      target.cursorPos.text = text;

    } else if (typeof(target.selectionStart) != 'undefined') {

      var sStart = target.selectionStart;
      var sEnd = target.selectionEnd;
      target.value = target.value.substr(0, sStart) + text + target.value.substr(sEnd, target.value.length);
      target.selectionStart = (sStart == sEnd)? sStart + text.length:sStart;
      target.selectionEnd = sStart + text.length;

    } else {

      target.value += text;

    }

    target.focus();
    storeCursor(target);

  }

}

function applyUBB(style) {

  if (target) {

    var selectedtext = '';
    if (document.all && target.cursorPos) {
      selectedtext = target.cursorPos.text;
    } else if (typeof(target.selectionStart) != 'undefined') {
      selectedtext = target.value.substr(target.selectionStart, target.selectionEnd - target.selectionStart);
    }

    if (!selectedtext) selectedtext = prompt(prompttext[style], '');
    if (!selectedtext) { target.focus(); return; }

    if (style == 'url=') {
      var description = prompt(prompttext['urld'], '');
      if (!description) { target.focus(); return; }
      selectedtext = '[url='+selectedtext+']'+description+'[/url]';
    } else {
      selectedtext = '['+style+']'+selectedtext+'[/'+style+']';
    }

    putStr(selectedtext);

  }

}

function onButton(t)
{ myoldstyle=t.className;
  if ((typeof myoldstyle=="string")&&(myoldstyle!=""))
  { t.className=t.className+"_a";
  }
  else
  { myold=t.style.backgroundColor;
    t.style.backgroundColor='#EDE8D2';
  }
}


function insert_count(e,max,k) 
{ var x;
  if (max != 0)
  { if (!e.which) keyCode = event.keyCode; // ie5+ op5+
    else keyCode = e.which; // nn6+

    x=document.getElementById(k.name+"_counter");
    if (x != null)
    { if (k.value.length<max+1)
        x.innerHTML = "(" + (max-k.value.length) + "/"+max+")";
      else 
      { k.value = k.value.substring(0,max);
        x.innerHTML="(0/"+max+")";
      }
    }
  }
}



function Buttonout(t)
{ if ((typeof myoldstyle=="string")&&(myoldstyle!=""))
  { t.className=myoldstyle;
  }
  else
  { t.style.backgroundColor=myold;
  }
}



function reLink(id)
{ document.getElementById(id).click();
}

function oeffne_kalender(formname,fieldname,pers,name)
{  var features="";
   features += "resizable=no";
   features += ",scrollbars=no";
   features += ",height=400";
   features += ",width=600";
   features += ",location=no";
   features += ",menubar=no";
   features += ",toolbar=no";
   features += ",statusbar=no";
   features += ",status=no";
   features += ",directories=no";
   features += ",dependent=no";
   
   features += ",screenX=10,screenY=10";
   features += ",left=10,top=10";

   var popup_url = '/cgi-bin/hkkal.pl?pers='+pers+'&NOFRAME=1&ARG_SEARCH=1&ARG_OLD_VALUE='+window.document.forms[formname].elements[fieldname].value+'&ARG_MY_FORM='+formname+'&ARG_MY_FIELD='+fieldname;

   w = window.open( popup_url, name, features);
}

function checkform()
{ var t=document.forms[0];
  var n="";
  var p;
  var ty;
  var r=-1;

  for (var i = 0; i < t.length; ++i) 
  { p=t.elements[i].name.indexOf('.R.',0);
    if (p>=0)
    { n=t.elements[i].name.match(/SET\./i);
      if (n != null)
      { ty=t.elements[i].type;
        if (ty == "text")         { if (t.elements[i].value == "") { r=i; } }
        else if (ty == "radio")    { ; }
        else if (ty == "submit")   { ; }
        else if (ty == "checkbox") { ; }
        else if (ty == "select-one") { ; }
        else if (ty == "hidden") { ; }
        else if (ty == "textarea") { if (t.elements[i].value == "") { r=i; } }
        else { alert("Unbekannte datentyp entdeckt: "+t.elements[i].name+" Typ: "+ty); }
      }
    }
  }
  if ((r != "-1") && (send_must_check == 1))
  { alert("Mindestens ein Pflichtfeld ist nicht gefüllt. Bitte vervollständigen Sie die Eingabe.");
    t.elements[r].focus();
    return false;
  }
  else
  { return true;
  }
}

function send_form(form_name,fieldname1,value1,fieldname2,value2)
{ if (checkform())
  { if ((typeof document.forms[form_name]!='undefined')&&(typeof document.forms[form_name].elements[fieldname1]!='undefined')) { document.forms[form_name].elements[fieldname1].value=value1; }
    if ((typeof document.forms[form_name]!='undefined')&&(typeof document.forms[form_name].elements[fieldname2]!='undefined')) { document.forms[form_name].elements[fieldname2].value=value2; }

    document.forms[form_name].submit();
    return true;
  }
  else
  { return false;
  }
}

function buttom()
{  document.write('<hr>');
   document.write('<p align="justify"><font size=2><a href="../formular.htm">');
   document.write('<img border="0" src="../bewerben.jpg"></a> <a target="_self" href="http://www.equisto.de/my_first_shop_166581"><img border="0" src="/scr/fanartikel.gif"></font></a>');
   document.write('</p>');
}


var dLM = new Date(Date.parse(document.lastModified));

var day = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
var month = new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");

var date = dLM.getDate();
var day = day[dLM.getDay()];
var year = dLM.getFullYear();
var month = month[dLM.getMonth()];
var hours = dLM.getHours();
var minutes = dLM.getMinutes();
var seconds = dLM.getSeconds();
var dayarray=new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag")
var montharray=new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember")

function last_mod()
{ if (date<10) date = "0"+date;
  if (month<10) month = "0"+month;
  if (hours<10) hours = "0"+hours;
  if (minutes<10) minutes = "0"+minutes;
  if (seconds<10) seconds = "0"+seconds;

  document.write("Letzte Änderung: "+day+", "+date+". "+month+" "+year+", um "+hours+":"+minutes+":"+seconds+"<br>");
}

function getthedate()
{ var mydate=new Date();
  var year=mydate.getYear();
  if (year < 1000) year+=1900;
  var day=mydate.getDay();
  var month=mydate.getMonth();
  var daym=mydate.getDate();
  if (daym<10) daym="0"+daym;
  var hours=mydate.getHours();
  var minutes=mydate.getMinutes();
  var seconds=mydate.getSeconds();
  var dn="";
  if (hours>=12) dn="";
  if (hours>12) { hours=hours-0; }
  
  d = new Date();
  Time24H = new Date();
  Time24H.setTime(d.getTime() + (d.getTimezoneOffset()*60000) + 3600000);
  InternetTime = Math.round((Time24H.getHours()*60+Time24H.getMinutes()) / 1.44);
  if (InternetTime < 10) InternetTime = '00'+InternetTime
  else if (InternetTime < 100) InternetTime = '0'+InternetTime;
  
  if (hours==0)  hours=12;
  if (minutes<=9)  minutes="0"+minutes;
  if (seconds<=9)  seconds="0"+seconds;

  var cdate='<a href="internetzeit_beschreibung.htm">'+dayarray[day]+",  "+daym+" . "+montharray[month]+" "+year+" | "+hours+":"+minutes+":"+seconds+" "+dn+" | @"+InternetTime+"</a>";
  if (document.all) document.all.clock.innerHTML=cdate
  else if (document.getElementById)
  document.getElementById("clock").innerHTML=cdate
  else
  document.write(cdate);  
}

function datum_uhrzeit_zeigen()
{ document.write('bitte warten...');

  if (!document.all&&!document.getElementById) getthedate();

  window.onload=goforit;
}

function goforit()
{ if (document.all||document.getElementById) setInterval("getthedate()",1000);
}


