function roll(num) {
  document.getElementById(num).className="da";
}

function unroll(num) {
  document.getElementById(num).className="weg";
}

function doit () {

// Diashow-Script von Thomas Salvador, http://www.brauchbar.de
// Freeware. Nutzung erlaubt, solange diese Copyrightmeldung
// unveraendert erhalten bleibt.



if (!(document.images)) {return;}
  if (fotos[pos]) {
   document.bild.src=fotos[pos];
   if (pos == max) { pos = Math.floor(Math.random() * (max - min)); }
   setTimeout("doit();",speed);
   pos++;
   
}
}

function CheckKontaktFormular() {

  var vn = document.getElementById('vorname').value;
  var nn = document.getElementById('nachname').value;
  var ort = document.getElementById('plzort').value;
  var email = document.getElementById('email').value;
  var ta = document.getElementById('textarea').value;
  if (vn == '' || nn == '' || ort == '' || email == '' || ta == '') {
    alert('Bitte alle Felder ausfuellen');
    return false;
  } else {
    return true;
  }
}



/*
function initMenu() {

  $('#lmenu ul').hide();
  $('#lmenu ul:first').show();
  $('#lmenu li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#lmenu ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }
$(document).ready(function() {initMenu();});*/

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 4,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
