﻿// JScript-Datei
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 xpCMSBM(bildID, spracheID, page, modulID, visible) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&bildID=" + bildID + "&modulID=" + modulID + "&vis=" + visible, "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 xpCMSBV(bildID, spracheID, page, visible) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&bildID=" + bildID + "&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 xpCMSUser(spracheID, page, visible) {
  window.open("http://xpcms.by-experience.com/Default.aspx?page=" + page + "&lng=" + spracheID + "&vis=" + visible, "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() {
  $('.hide').hide();
  $("a[rel='lightbox']").colorbox();
  
  $('.more_link_1').click(function() {
    var klasse = '.' + $(this).attr('rel');
    $(klasse).toggle();

    if ($(this).hasClass('ein')) {
      $(this).removeClass('ein').text('+ vollständige Vorstellung einblenden');
    } else {
      $(this).addClass('ein').text('- Ansicht reduzieren');
    }
  });

  $('.more_link_2').click(function() {
    var klasse = '.' + $(this).attr('rel');
    $(klasse).toggle();

    if ($(this).hasClass('ein')) {
      $(this).removeClass('ein').text('+ visualizza tutte i dettagli');
    } else {
      $(this).addClass('ein').text('- ridurre la vista');
    }
  });
});