﻿// JScript-Datei

  function scrollWindowToTopOfPage() {
    window.scrollTo(0,0);
  }
function xpCMS(reportID, spracheID, page, katID, visible) {
  if (katID == "undefined") {
    katID = 0;
  }

  if (visible == "undefined") {
    visible = 0;
  }

  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&repID=" + reportID + "&lng=" + spracheID + "&katID=" + 0 + "&vis=" + visible, "xpCMS", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes").focus();
}

function Fenster(id) {
  var Fenstr = window.open("http://xpcms.by-experience.com/pages/" + id, "Privacy", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes");
  Fenstr.focus();
}

function xpCMSG(katID, spracheID, page, visible) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&katID=" + katID + "&vis=" + visible, "xpCMS", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes").focus();
}

function xpCMSM(katID, spracheID, page, modulID, infoID, visible) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&katID=" + katID + "&modulID=" + modulID + "&infoID=" + infoID + "&vis=" + visible, "xpCMS", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes").focus();
}

function xpCMSBlog(blogeintragID, spracheID, page, blogUserID) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&bID=" + blogeintragID + "&bUserID=" + blogUserID, "xpCMS", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes").focus();
}

function xpCMSB(bildID, spracheID, page) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&bildID=" + bildID, "xpCMS", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes").focus();
}

function Statistik(url, query, seite) {
  var Fenstr = window.open("http://xpsitemanager.by-experience.com/statistik.aspx?s=" + seite, "Statistik", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes");
  Fenstr.focus();
}

$(function() {
  $(document).pngFix();
  $('.jBox').colorbox({ iframe: true, width: 620, height: 640 });
  $('.videojBox').colorbox({ iframe: true, width: 630, height: 530 });
  $("a[rel='lightbox']").colorbox();
  $('.js_hide').hide();

  $('.modul h3').click(function() {
    var klasse =  $(this).attr('class');
    $('.show_' + klasse).toggle();
  });

  $('#s1')
  .before('<div id="nav">')
  .cycle({
    fx: 'fade',
    /*fx: 'turnDown',*/
    speed: 1500,
    timeout: 5000,
    pager: '#nav'
  });

  $('.s2').cycle({
    fx: 'scrollLeft',
    timeout: 6000,
    delay: -5000
  });
});
