var hidden=1;
function build_url(fname) {
   jd=document.forms[fname];
   url='suche_';
   jgroup=jd.s_group.value;
   url+=(jgroup!='all')?jgroup:'saracus';
   jwort=jd.wort.value;
   if (jwort=='') {
      //if (hidden==0) show_hide_such(0);
      return;
   }
   jwort2=jwort.replace(/ä/g, ":a");
   jwort=jwort2.replace(/ö/g, ":o");
   jwort2=jwort.replace(/ü/g, ":u");
   jwort=jwort2.replace(/Ä/g, ":A");
   jwort2=jwort.replace(/Ö/g, ":O");
   jwort=jwort2.replace(/Ü/g, ":U");
   jwort2=jwort.replace(/ß/g, ":s");
   url+='_'+encodeURIComponent(jwort2)+'.html';
   self.document.location.href=url;
}
function handle_key(js_test) {
   ev=window.event||event||null;
   cc=ev.charCode||ev.keyCode||ev.which;
   return (cc==js_test)?true:false;
}
function show_hide_such(va1) {
   if (va1==1) {
      if (hidden==0) {
         show_hide_such(0);
         return;
      }
      hidden=0;
      jQuery("#such_text").show(200);
      jQuery("#such_input").show(200);
      document.such.wort.focus();
   } else {
      hidden=1;
      jQuery("#such_text").hide(200);
      jQuery("#such_input").hide(200);
   }
}
function popup(js_link,height,width){
   windownew = window.open(js_link,'neu','toolbar=0, location=0, directories=0, tatus=0, menubar=0, scrollbars=1, resizable=1, width=' + width + ',height=' + height);
}

function send_mail(){
   window.open('send_email.contero?id='+document.location.href,'EMail','width=300, height=130');
}
function drucken(){
   var temp=navigator.appName;
   if(temp=="Netscape Navigator" || temp=="Netscape"){
      document.druck.method='get';
   }

   window.open("","ohne","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=650,height=600");
   document.druck.target="ohne";
   document.druck.submit();
}
function slideSwitch() {
    var $active = jQuery('#slideshow IMG.active');
    if ( $active.length == 0 ) $active = jQuery('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : jQuery('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

jQuery(document).ready(function($) {
    setInterval( "slideSwitch()", 5000 );
});
