/*
 *  Videoload js Datei
 *  Enno Ostendorf, no@supersmart.de http://www.supersmart.de
 */
var VL_sld = new Array();
var VL_slid = new Array();
var VL_maxh = new Array();
var VL_trsws = new Array();
var VL_state = new Array( 0,0,0);
var VL_bval = 0;
var VL_bewd;
var VL_rezA;//cmu
var VL_topakt=1;
var bgpic=new Image();
var fgpic=new Image();
function VLTeas0( bg, fg, le ) {
 var id=Math.random()*9999;
 D.write( '<div id="'+id+'"></div>' );
 var xa = TgET( 'div', TgEaX(TgEaX(o=TgEI(id))));
 for (i=0;i<xa.length;i++){
     if ( xa[i].className.match( /\bbew\b/ ) ) {
       xa[i].style.backgroundImage = 'url('+bg+')';
       var im=TgEpx(xa[i]);
       var nwi = Math.round( le * xa[i].offsetWidth );
       im.style.backgroundImage='url('+fg+')';
       im.style.width=nwi+'px';
       o.style.display='none';
     }
 };
};
// Ajax-Feedback Funktion fürs Vormerken: Ändere Icon bei Rückgabe von 'vorgemerkt'
function VLVormerkShow(i,r,ni,oi,na,oa) {
    var p=TgEI(i);
    var q;
    if ( p.id.match(/vormx/) && r.match(/vorgemerkt/) ) {
p.id=p.id.replace(/vormx/,'vormz');
(q=TgET('img',p)[0]).style.backgroundImage='url('+ni+')';
q.alt=na; q.title=na;
    }
    else if ( p.id.match(/vormz/) && r.match(/entfernt/) ) {
p.id=p.id.replace(/vormz/,'vormx');
(q=TgET('img',p)[0]).style.backgroundImage='url('+oi+')';
q.alt=oa; q.title=oa;
    }
};
// Funktion bei Click auf Vormerken Button, markieren des divs und Aufruf AjaxCall, u1=url für vormerken Call, u2=url für entfernen call,
//ni=pfad zum neuen Buttonimage, oi=Pfad zum 1. Image, na=neues Image Alt-tag, oa=altes Image Alt-tag
function VLVormerk(o,m,u1,u2,ni,oi,na,oa){
    var u;
    if ( o.id.match(/vormz/g) ) u=u2;
    else {
u=u1;
o.id="vormx";
    }
    TsAC(m,u,new Function('res','VLVormerkShow("'+o.id+'",res,"'+ni+'","'+oi+'","'+na+'","'+oa+'");'));
};
// Buttonfunktion fuer Vormerk-Button, 2 Texte fuer nicht vorgemerkt und vorgemerkt
function VLVTmxi(o,a,v,t1,t2,l){
   Tmxi(o,a,v);
   if ( a==1 ) VLBewert(o,0);
   if ( o.id.match(/vormz/g) ) VLSetText(o,t2,l);
   else VLSetText(o,t1,l);
   if ( a==0 ) VLBewert(o,1);
};
function VLMLReDisplay(r){
    TgEI('mlta').innerHTML=r;
    var xa = TgET('div',TgEI('mlta'));
    var xb = TgET('script',TgEI('mlta'));
    var c=0;for(i=0;i<xa.length;i++){
        if (xa[i].className.match(/\bbew\b/)) {
            xa[i].id='vlbew'+c;
            var s=xb[c].innerHTML;
            s=s.substr( s.indexOf('(') + 1 );
            s=s.substr( 0, s.indexOf(')')  );
            var sa=s.split(/,\ /);
            VLBew2( 'vlbew'+c,sa[0],sa[1],sa[2],sa[3],sa[4] );
            c++;
        }
    }
};
function VLMLRemove(i){
    TsAC( 'POST',i,new Function('res','VLMLReDisplay(res);'))
};
function VLBew( bg, fg, le, te, li ) {
 var id=Math.random()*9999;
 D.write( '<div id="'+id+'"></div>' );
 var xa = TgET( 'div', TgEax(o=TgEI(id)));
 if ( !bg && !fg ) VL_bval=Math.round(le*57)+1;
 for (i=0;i<xa.length;i++){
     if ( xa[i].className.match( /\bbew\b/ ) ) {
       if (bg) xa[i].style.backgroundImage = 'url('+bg+')';
       var im=TgEpx(xa[i]);
       if (!im.className.match(/bewfg/)) im=TgEpX(im);
       var nwi = Math.round(le*57)+1;
       if ( nwi<1 ) nwi=1;
       if (fg) im.style.backgroundImage='url('+fg+')';
       im.style.width=nwi+'px';
       o.style.display='none';
     }
     else if ( xa[i].className.match(/ibew/) && te ) {
       if (li) TgEpx(xa[i]).innerHTML='<a href="'+li+'">'+te+'</a>';
       else TgEpx(xa[i]).innerHTML=te;
     };
 };
};
function VLBew2( id, bg, fg, le, te, li ) {
if ( !bg && !fg ) VL_bval=Math.round(le*57)+1;
var x=TgEI(id);
if ( x.className.match( /\bbew\b/ ) ) {
var im=TgEpx(x);
if (!im.className.match(/bewfg/)) im=TgEpX(im);
var nwi = Math.round(le*57)+1;
if ( nwi<1 ) nwi=1;
if (fg) im.style.backgroundImage='url('+fg+')';
im.style.width=nwi+'px';
}
else if ( x.className.match(/ibew/) && te ) { 
if (li) TgEpx(x).innerHTML='<a href="'+li+'">'+te+'</a>';
else TgEpx(x).innerHTML=te;
};
};
function VLbewmm(o) {
 alert(o.offsetWidth);
};
function VLSetText(o,t,l) {
 var x=o;
 while(x&&x.className&&!x.className.match(/\bibew\b/)) x=TgEpX(x);
 if ( l ) TgEpx(x).innerHTML='<a href="'+l+'">'+t+'</a>';
 else TgEpx(x).innerHTML=t;
};
function VLTmxi(o,a,v,t,l){ 
 Tmxi(o,a,v); 
 VLSetText(o,t,l); 
};
function VLDoSlide(n,h,s,f) {
    var nh;
    if ( f == 0 ) { nh=h+s; }
    else if ( f == 1 ) { nh=h+s; s=s+s; }
//cmu workaround for VLSlideInit, for "slide" is not available at Init
var maxh = VL_slid[n].offsetHeight;
//cmu small slides don't need adjustment for IEs, but larger ones do
if(TisIE && maxh>40) maxh -= 19;
    //cmu replaced VL_maxh[n]  with maxh
//if ( nh > VL_maxh[n] ) nh = VL_maxh[n];
if ( nh > maxh ) nh = maxh;
    VL_sld[n].style.height=nh+'px';
//cmu replaced VL_maxh[n]  with maxh
    //if ( nh < VL_maxh[n] ) setTimeout( 'VLDoSlide('+n+','+nh+','+s+','+f+')', 50 );
if ( nh < maxh ) setTimeout( 'VLDoSlide('+n+','+nh+','+s+','+f+')', 50 );
    else VL_state[n]=(VL_state[n]==0?1:2);
};
function VLUnDoSlide(n,h,s,f) {
    var nh;
    if ( f == 0 ) { nh=h-s; }
    else if ( f == 1 ) { nh=h-s; s=s+s; }
    if ( nh < 0 ) nh = 0;
    VL_sld[n].style.height=nh+'px';
    if ( nh > 0 ) setTimeout( 'VLUnDoSlide('+n+','+nh+','+s+','+f+')', 50 );
    else { VL_state[n]=0; VL_slid[n].style.display="none";}
};
// SlideTo(Slide Nummer,akt. Höhe,akt. Speed,gewünschte Höhe,Richtung [-1,1] )
function VLSlideTo(n,h,s,mh,f) {
    var nh=h+(f*s);s=s+s;
    if ((f<0&&nh<mh)||(f>0&&nh>mh)||nh==mh) {nh=mh;}
    VL_sld[n].style.height=nh+'px';
    if(nh!=mh) setTimeout( 'VLSlideTo('+n+','+nh+','+s+','+mh+','+f+')', 50 );
};
/* VLSlide( objekt, slidenr, text, speed, zielstatus[0=zu,1=auf] */
function VLSlide(o,n,s,sp,st) {
    if ( VL_state[n] != st ){
//cmu replaced VL_maxh with ch
var ch = VL_slid[n].style.height;
if ( st == 1 ) {
 if ( TgEax(o).className.match(/\bibb\b/) ) VLBewert(o,0);
VL_slid[n].style.display="block"; VLDoSlide(n,0,sp,1); }
//cmu replaced VL_maxh with ch
//else if ( st == 0 ) { VLUnDoSlide(n,VL_maxh[n],sp,1); }
else if ( st == 0 ) { VLUnDoSlide(n,ch,sp,1);}
else if ( st == 2 ) { VL_state[n]=st; VLDoSlide(n,ch,sp,1);}
   };
};
/* VLSlideA( slidenr, speed, zielstatus[0=zu,1=auf] */
function VLSlideA(n,sp,st) {
    if ( VL_state[n] != st ){
//cmu
var maxh = (TisIE?VL_slid[n].offsetHeight-19:VL_slid[n].offsetHeight);
if ( st == 1 ) { VL_slid[n].style.display="block"; VLDoSlide(n,0,sp,1); }
//cmu replaced VL_maxh with maxh
//else if ( st == 0 ) { VLUnDoSlide(n,VL_maxh[n],sp,1); }
else if ( st == 0 ) { VLUnDoSlide(n,maxh,sp,1); }
    };
};
function VLCC(e,o){
 var xp,yp;
 var xo=(p=TgEax(TgEax(TgEax(TgEax(o))))).offsetLeft;
 var yo=p.offsetTop>150?p.offsetTop+TgEI('bewd2').offsetTop-21+TgEI('b0').offsetTop:TgEax(TgEax(o)).offsetTop+196;
 xo=(xo==0)?-22:xo;
 if (TisIE){
     xp=window.event.x-(xo<200?89:0);
     yp=window.event.y-(yo>300?-32:6);
     //     alert(window.event.x);
     if (TisIE7) {
  xp=window.event.x-(xo>0?103:89);
  yp=(window.event.y<0?window.event.y+32:window.event.y-6);
     }
 }
 else {
     xp=e.pageX-xo-287;//747;
     yp=e.pageY-yo;//(196+TgEax(TgEax(o)).offsetTop);
 }
 //   alert(e.pageY+' '+yo);
 xp=Math.round(xp/5.3)/2;
 xp=Math.round(xp*10.6)+3;
 if (xp > 58 || xp < 0 || yp > 12 || yp < 0 ) { xp=VL_bval; }
 return xp;
};
function VLBewMM(e,o){
    var xp=VLCC(e,o);
    TgEpX(TgEpx(TgEpX(TgEpx(TgEI('bewd'))))).style.width=xp+'px';
if(TgEI('bewd2')) TgEpX(TgEpx(TgEpx(TgEI('bewd2')))).style.width=xp+'px';
};
function VLBewC(e,o,m,u){
    var xp=VLCC(e,o);
    var bew=Math.round((xp-3)/10.6);
    VL_bval=xp;
    (x=TgEpx(TgEI('bewd'))).innerHTML = "Meine Bewertung";//cmu
    TgEpX(TgEpx(TgEpX(x))).style.width=xp+'px';
if(TgEI('bewd2'))
 TgEpX(TgEpx(TgEpx(TgEI('bewd2')))).style.width=xp+'px';
if(!m)m = 'GET';
    TsAC(m,u,new Function('res','VLStatusShow(res);'),[['value',bew]]);
};
function VLStatusShow(r) {
    TgEI('bews').innerHTML=r;
if(TgEI('bews2'))
 TgEI('bews2').innerHTML=r;
    // Ausführen von JS Code aus der Antwort
    var sc;
    while (r.match(/<script/)){
        sc=r.slice(r.indexOf('<script type="text/javascript">')+31,r.indexOf('</script>'));
 r=r.slice(r.indexOf('</script>')+9);
        eval(sc);
    }
    // Ende Ausführung JS Code der Antwort
if (r) window.setTimeout('VLStatusShow("")',1000);
}
//diff to template
function VLBewout(e) {
 var xp,yp;
 if (TisIE){
   xp=window.event.x;
   yp=window.event.y-4;
//   alert(yp);
   if (TisIE7) { xp=window.event.x-100; yp=window.event.y; }
 }
 else {
   xp=e.clientX;
   yp=e.clientY;
   xp-=733;
 }
 if ( xp < 1 || xp > 57 || yp < 1 || yp > 13 ) TgEpX(TgEpx(VL_bewd)).style.width=VL_bval+'px';
};
function VLSlideInit(n){
    var xa=TgET('div');
    var ct=0;ct2=0;
    for(i=0;i<xa.length;i++){
 if(xa[i].className.match(/\bdetsli\b/)){
 xa[i].style.display="block";
     VL_maxh[ct2]=(TisIE?xa[i].offsetHeight-19:xa[i].offsetHeight);
     xa[i].style.display="none";VL_slid[ct2]=xa[i];ct2++;
 }
 if(xa[i].className.match(/\bdetsl\b/)){
 VL_sld[ct]=xa[i];ct++;
 }
    };
    VL_bewd = TgEpX(TgEpx(TgEI('bewd')));    
    var ma = VL_bewd;
    while ( !ma.className.match(/sboxfr/) ) ma = TgEax(ma);
    VL_tm = ma.offsetTop;
    // Aktivieren des n. Eintrags
    var x=TgEpx(TgEax(TgEax(TgEax(VL_bewd))));
    for( i=0; i<n; i++ ) x=TgEaX(x);
    VLBewert(x, 1);
    // Initialisieren der Bewertungsfunktion
//    if (!TisIE) VL_bewd.captureEvents(Event.MOUSEMOVE);
//    VL_bewd.onclick=VLBewC;
//    VL_bewd.onmousemove=VLBewMM;
//    VL_bewd.onmouseout=VLBewout;
};
function VLBewert(o,s){
 var x=o;
 while(x&&x.className&&!x.className.match(/\bibew\b/)) x=TgEpX(x);
 var xp = TgET('p',x)[0];
 var xd = TgET('div',x)[0];
 if (s==0){xp.style.display='block';xd.style.display='none';}
 else{xp.style.display='none';xd.style.display='block';}
};
function VLcheck(o) {
 var xa = TgET('input',o);
 for ( i=0;i<xa.length;i++ ) {
   if ( xa[i].className.match(/cb/) ) xa[i].checked='true';
 }
};
function VLbtov(o){
 var xa=TgET('div',o);
 var tt,tp;
 for( i=0;i<xa.length;i++ ) {
   if (xa[i].className.match(/\btst\b/)) tt=xa[i];
//   if (xa[i].className.match(/\bbtsi\b/)) tp=xa[i];
 }
 tt.style.display='block';
//   alert(tt.className);
};
function VLbtou(o){
// alert(o.className);
 var xa=TgET('div',o);
 var tt,tp;
 for( i=0;i<xa.length;i++ ) {
   if (xa[i].className.match(/\btst\b/)) tt=xa[i];
//   if (xa[i].className.match(/\bbtsi\b/)) tp=xa[i];
 }
 tt.style.display='none';
//   alert(tt.className);
};
function VLbti(){
 var id=Math.random()*9999;
 D.write( '<div class="btdum" id="'+id+'"></div>' );
 var xa = TgET( 'div', TgEax(o=TgEI(id)));
 o.parentNode.removeChild(o);
 for( i=0;i<xa.length;i++ ) {
   if (xa[i].className.match(/\btst\b/)) tt=xa[i];
//   if (xa[i].className.match(/\bbtsi\b/)) tp=xa[i];
 }
 tt.style.display='none';
};
function VLDummy(){};
function VLtrbgc(o,c){
 var xa = TgET('td',o);
 for (i=0;i<xa.length;i++){
   xa[i].style.backgroundColor=c;
 };
// alert(xa.length);
};
/* Trommel */
function sbov(o) {
  sbod=TgEI('sbdata'+(sbid=fpi(o)));
  sbX=TgEI(sbid).offsetLeft;
  tsw=sbod.getAttribute('tsw');
  sbod.setAttribute('scroll',0);
  if (VL_trsws[sbid]) window.clearTimeout(VL_trsws[sbid]);
}
function sbous(o) {
  s=TgET('div',o);
  sbod.setAttribute('scroll',1);
  di=sbd.getAttribute('direc');
  sp=sbd.getAttribute('speed');
  sbwi=sbd.getAttribute('sbwi');
  uid=sbd.getAttribute('uid');
  scroll(di,sp,sbwi,uid);
}
function sbou(o) {
  sbous(TgEax(o));
}
function scroll(di,sp,wi,id){
  sb=TgEI(id);
  sbd=TgEI('sbdata'+id);
  di=sbd.getAttribute('direc');
  sp=sbd.getAttribute('speed');
  sbX=sb.offsetLeft;
  sbX+=di*sp;
  if(sbX<-wi){sbX=0;}
  else if(sbX>0)sbX-=wi;
  sb.style.left=Math.round(sbX)+'px';
  if(sbd.getAttribute('scroll')==1) {
      VL_trsws[uid]=setTimeout('scroll('+di+','+sp+','+wi+','+id+')',100);
  }
}
function scrollby(a,id){
  sb=TgEI(id);
  sbX=sb.offsetLeft;
  sbX+=a;
  sb.style.left=Math.round(sbX)+'px';
}
function fpi(o){
  return TgEax(TgEax(o)).id;
};
function gwi(uid) {
  alert(TgEI('sbdata'+uid).offsetWidth);
};
function sbin(d,n){
  // Kalkuliere eine eindeutige ID
  while(TgEI(uid=Math.round(Math.random()*10000)));
  // Richte ein div ein zum speichern der Daten
  D.write('<div id="sbdata'+uid+'" class="dummy"></div>');
  sbd=TgEI('sbdata'+uid);
  sbd.setAttribute('uid',uid);
  if (!sbd.offsetWidth) {setTimeout('sbpin('+d+','+n+',"'+uid+'")',1000);}
  else{sbpin(d,n,uid);}
};
function sbpin(d,n,uid) {
  sbd=TgEI('sbdata'+uid);
  if (sbd.offsetWidth==0) {setTimeout('sbpin(d,n,uid)',1000); return 0};
  tsw=sbd.offsetWidth;
  sbd.setAttribute('direc',d);
  sbd.setAttribute('speed',n);
  sbd.setAttribute('tsw',tsw);
  sbd.setAttribute('scroll',1);
  xa=TgET('div',TgEax(TgEax(sbd)));
  f=0;
  // Zusammensuchen der divs und Werte setzen
  for(i=0;i<xa.length;i++){
//    alert(xa[i].className);
    if (xa[i].className.match(/sbbloco/)||xa[i].className.match(/sbblocu/)){xa[i].style.width=tsw+'px';xa[i].style.height='2px';}
//    else if (xa[i].className.match(/sbbl/)){b=xa[i].offsetWidth;xa[i].style.visibility="visible";}
    else if (xa[i].className.match(/sbso/)){xa[i].id=uid}
    else if (xa[i].className.match(/sbs/)){sbsd=xa[i]}
    else if (xa[i].className.match(/sbi$/)){tsh=xa[i].offsetHeight;f++}
    else if (xa[i].className.match(/sbc/)){sbc=xa[i]}
  };
//  sbd.setAttribute('tsbw',b);
  (at=document.createAttribute("tsh")).nodeValue=tsh;sbd.setAttributeNode(at);
  sbc.style.width=tsw+'px';
//  sbc.style.clip='rect(0px '+tsw+'px '+tsh+'px 0px)';
  // Marker Element ans Ende des source div setzen
  m=document.createElement('div');m.className='_sbid';
  sbsd.appendChild(m);
  s=TgEpx(sbsd)
  c=null;
  // Element für Element kopieren und ans Ende hängen is markerdiv
  while(!s.className.match(/_sbid/)){
    c=s.cloneNode(true);
    s.parentNode.appendChild(c);
    s=TgEpX(s);
  };
  // Markerdiv entfernen
  m.parentNode.removeChild(m);
  // Gesamtbreite setzen
  sbwi=f*108;
  sbsd.style.width=(sbwi*2+156)+'px';
  sbd.setAttribute('sbwi',sbwi);
  scroll(d,n,sbwi,uid);
}
// sbsp : Sushi Bar Speed (OBJECT,DIRECTION,SPEED)
function sbsp(o,d,s){
  xa=TgET('div',TgEax(o));
  for(i=0;i<xa.length;i++)
    if(xa[i].className.match(/sbso/)){
      sb=xa[i];i=xa.length;
    };
  sbous(TgEpx(sb));
  sbd=TgEI('sbdata'+sb.id);
  if(d!=0)sbd.setAttribute('direc',d);
  sbd.setAttribute('speed',s);
  sbwi=sbd.getAttribute('sbwi');
  if(sbd.getAttribute('scroll')==0){
    sbd.setAttribute('scroll',1);
    scroll(d,s,sbwi,sb.id);
  }
}
function sbspi(o,d,s){if(o.filters)o.filters.alpha.opacity='100';sbsp(o,d,s);}
function sbspo(o,d,s){if(o.filters)o.filters.alpha.opacity='80';sbsp(o,d,s);}
function VL_hitop(o,n) {
 var xa=TgET('div', (p=TgEax(TgEax(TgEax(o)))));
 for(i=0;i<xa.length;i++){
   if (xa[i].className.match(/\btop1\b/)&&!xa[i].className.match(/\btopx\b/)){
     xa[i].className='top1 topx';
//     alert( xa[i].className );
   };
 };
 ct=1;for(i=0;i<xa.length;i++){
   if (xa[i].className.match(/\btop1\b/)){
     if (ct==n) xa[i].className='top1';
     ct++;
   };
 };
 VL_topakt=n;
// alert(xa.length)
// var xa=TgET('div', (o=TgEpx(p=TgEI('top'))));
// xa[VL_topakt].display='none';
// VL_topakt=n;
};
/* Funktion swapClick - entnommen von http://videoload.de/c/92/65/04/9265048.js
*
* Funktions Parameter
1.) Bildname im "img" tag (id="")
2.) Rollover Bild
3.) Fixer Status Wert
4.) Popup URL
5.) Popup Breite
6.) Popup Laenge
7.) Popup Ausrichtung links
8.) Popup Ausrichtung oben
*/
var statusOld;
function swapClick(objName, swap, status, popUrl, popWidth, popHeight, popLeft, popTop) {
popWidth=618;
popHeight=413;
if(statusOld != "click"){
  TgEI(objName).style.backgroundImage='url('+swap+')';
//document.getElementById(objName).src = swap;
}
if(status == "click"){
statusOld = status;
  TgEI(objName).style.backgroundImage='url('+swap+')';
//document.getElementById(objName+"div").innerHTML = '<img id="'+objName+'" src="'+swap+'" border="0" alt="vorgemerkt" title="vorgemerkt">';
var popup = window.open( popUrl , "VODw", "width="+ popWidth +",height="+ popHeight +",left="+ popLeft +",top="+ popTop +"");
popup.focus();
}
}
/*
Suchbox.
*/
function VLCS() {if ((f=D.forms['vlsuche'])&&(b=f.q)&&!b.value) {b.value='*';}f.submit();};
function VLShowUserComment(m,u,o) {
if(o)VL_rezA = o;
if(!m)m='GET';
TsAC(m,u,new Function('res','VLDisplayUserComment(res);'));
};
function VLDisplayUserComment(r) {
   var al=TgfC(TgEI('userComment'),1);
   al.innerHTML = r;
   while (r.match(/<script/)){
        sc=r.slice(r.indexOf('<script type="text/javascript">')+31,r.indexOf('</script>'));
        r=r.slice(r.indexOf('</script>')+9);
        eval(sc);
    }
VLSlide(VL_rezA,0,'Jetzt Rezensieren',2,1);
};
function VLSaveRez(m,u) {
if(!m)m = 'POST';
TsAC(m,u,new Function('res','VLRezSaved(res);'),[['title',D.forms['rezsf'].ueberschrift.value],['text',D.forms['rezsf'].rezension.value]]);
};
function VLRezSaved(r) {
    var x=TgEI('rezbes');
    x.innerHTML=r;
    x.style.display='block';
};
function VLFinRez(o) {
    TgEI('rezbes').style.display='none';
    VLSlide(o,0,'Jetzt Bewerten',2,0);
    TgEI('rezslb').innerHTML='Rezension abgegeben';
    TgEI('rezbk').style.display='none';
};
function VLShowRez() {
 var x = TgEI('revo');
 TgEpx(TgEpx(x)).style.width=VL_bval+'px';
 TgEI('revot').innerHTML = document.forms['rezsf'].ueberschrift.value;
 //cmu get current date
 var now = new Date();
   var day = now.getDay();
   if(day < 10)
     day = "0"+day;
   var month = now.getMonth();
   if(month < 10)
     month = "0"+month;
   var date = day+"."+month+"."+now.getFullYear();
 TgEI('revod').innerHTML = date;
 var ali;
 if(document.forms['rezsf'].alias){
ali = document.forms['rezsf'].alias.value;
 }else{
  ali = TgEI('alias').firstChild.nodeValue;
 }
 TgEI('revoa').innerHTML = ali;
 TgEI('revoc').innerHTML = document.forms['rezsf'].rezension.value;
 x.style.display='block';
 TgEI('rezsp').style.display='inline';
 if (VL_state[0]>0){
 // alert(VL_slid[0].offsetHeight);
 // VL_maxh[0]=VL_slid[0].offsetHeight;
 // VL_maxh[0]=(VL_slid[0].offsetHeight>VL_maxh[0]?VL_slid[0].offsetHeight:VL_maxh[0]);
 //VLDoSlide(0,VL_slid[0].offsetHeight,5,2);
// SlideTo(Slide Nummer,akt. Höhe,akt. Speed,gewünschte Höhe,Richtung [-1,1] )
//function VLSlideTo(n,h,s,mh,f) {
 //cmu replace VL_maxh
 var mh=TisIE?VL_slid[0].offsetHeight-19:VL_slid[0].offsetHeight;
 var ch = VL_slid[0].style.height;
 //cmu replace VL_maxh
 //var dir=VL_maxh[0]>mh?1:-1;
 var dir=ch>mh?1:-1;
 VLSlideTo(0,ch,1,mh,dir);
 };
 // alert(className);
 // VL_bval;
 // alert('Hier');
};
function VLActUeb(o,m,i) {
  var c=m-o.value.length;
  if (c<0) { c=0; o.value=o.value.substr(0,m); }
  var cs=TgEI(i);
  cs.innerHTML=c;
//  alert(cs.innerHTML);
};
// Inserted by Christian Bayha
//edited by cmu
function openSAMLogin(url) {
 TgEI('loginBox').innerHTML = "<div id=\"login\" style=\"display:none;position:absolute;top:0px;left:-400px;\">" + "<iframe src=\"" + url + "\" width=\"400\"  height=\"500\" ></iframe></div>";
// show the iframe after 1.5 second, because if the user is already logged in, no iframe should be shown.
setTimeout(function(){TgEI('login').style.display="block"}, 1000);
}
// close the loginbox after a specific time, and reload the right column login.
//edited by cmu
function doneLogin(timeInMillis) {
 var loginBoxIframe = D.getElementById('loginBox').firstChild;
 if (loginBoxIframe) {
  var sbrLoginIframe = D.getElementById('sbr').getElementsByTagName("iframe")[0];
  if (sbrLoginIframe){
  sbrLoginIframe.src = sbrLoginIframe.src;
  }
 }
 setTimeout(function(){D.getElementById('loginBox').innerHTML = "";}, timeInMillis);
}
/* *******************************************************************
 *************Die nachfolgende Funktion für AJAX Aufrufe**************
 *************sollte eigentlich in der funcs.js stehen. **************
 *********************************************************************
 */
/*
 *  Funktion zur Generierung eines Ajax Aufrufs (SendAjaxCall)
 *  TsAC( Methode, URL, Funktion, Login, Password, ParamName1, ParamValue1, ParamName2, ParamValue2, ... )
 *    Methode = [GET|POST|PUT]
 *    URL = Adresse
 *    Funktion = Callbackfunktion nach erfolgreichem Aufruf der URL
 *    Login = Benutzername für erforderl. Authentifizierung
 *    Password = Password für erforderl. Authentifizierung
 *    bel. Anzahl Parameter, die dem aufzurufenden Script übergeben werden in der Form
 *    ParamName1=ParamValue1&ParamName2=ParamValue2
 *    Problem: Dateiuploads
 */
function TsAC(m,u,f,pa,l,p) {
    var r; // Reservierung des Objektes
    try {r=new ActiveXObject("Msxml2.XMLHTTP");}
    catch(e){
try {r=new XMLHttpRequest();}
catch(e){
try{r=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e) {r=null}
}
    }
    if(r){
var vs='';
if(pa&&pa.length>0) {
for(i=0;i<pa.length;i++){ // Aufbau des Parameterstrings
vs+=pa[i][0]+'='+pa[i][1]+'&';
}
// Im Falle eines GET Requests mÃ¼ssen die Parameter an die URL gehÃ¤ngt werden
if(m.match(/get/gi)) { u+='&'+vs; }
}
else vs='';
r.open(m,u,true,l,p); // Ã-ffnen des Requests
r.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); // Setzten des Content-Typs und CharEncodings zur Parameterverarbeitung auf dem Server
if (m.match(/post/gi)){
r.setRequestHeader('Content-length', vs.length); // Setzten der Content-length
r.setRequestHeader('Connection', 'close');
};
r.onreadystatechange=function() { // Ã?bergabe der Callbackfunktion
if(r.readyState==4 ) {
f(r.responseText);
}
}
r.send(vs); // Senden der Parameter
}
}
function VLSetAlias(o,m,u) {
TsAC(m,u,new Function('res','VLAliasSet(res);'),[['value',o.value]]);
//  alert(TgEI('ali2a').innerHTML);
};
function VLAliasSet(r) {
var al=TgEI('ali');
al.innerHTML=r;
};
function VLMiss(o,m,u,i){
    var d=TgEpX(o);
    d.id="markmiss"+Math.random();
    TsAC(m,u,new Function('res','VLMissShow(res,"'+d.id+'");'),[['cid',d.id],['uc',i]]);
};
function VLMissShow(r,i) {
    TgEI(i).innerHTML=r;
    // Ausführen von JS Code aus der Antwort
    var sc;
    while (r.match(/<script/)){
        sc=r.slice(r.indexOf('<script type="text/javascript">')+31,r.indexOf('</script>'));
 r=r.slice(r.indexOf('</script>')+9);
        eval(sc);
    }
};
function VLRezBew(o,m,u,i,b){
    var d=o;
    while (!d.className.match(/mihd/)) d=TgEpX(d);
    d.innerHTML="";
    d.id="markbew"+Math.random();
    TsAC(m,u,new Function('res','VLRBShow(res,"'+d.id+'");'),[['cid',d.id],['bewert',b],['uc',i]]);
};
function VLRBShow(r,i) {
    TgEI(i).innerHTML=r;
    // Ausführen von JS Code aus der Antwort
    var sc;
    while (r.match(/<script/)){
        sc=r.slice(r.indexOf('<script type="text/javascript">')+31,r.indexOf('</script>'));
 r=r.slice(r.indexOf('</script>')+9);
        eval(sc);
    }
};
//VLRezPage(method, url, offset,
//if offset=-1 show short view
function VLRezPage(m,u,off) {
    TsAC(m,u,new Function('res','VLShowPage(res);'),[['rez_start',off]]);
};
function VLShowPage(r) {
TgEI('det2').innerHTML=r;
// Ausführen von JS Code aus der Antwort
    var sc;
    while (r.match(/<script/)){
        sc=r.slice(r.indexOf('<script type="text/javascript">')+31,r.indexOf('</script>'));
 r=r.slice(r.indexOf('</script>')+9);
        eval(sc);
    }
}
