﻿function xpCMS(reportID, spracheID, menID, katID, visible) {
    if (katID == "undefined") {
        katID = 0;
    }

    if (visible == "undefined") {
        visible = 0;
    }

    window.open("http://xpsitemanager.by-experience.com/modify2.aspx?menId=" + menID + "&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://xpsitemanager.by-experience.com/Default.aspx?" + id, "Privacy", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes");
  Fenstr.focus();
}

function Statistik(url, query) {
  var Fenstr = window.open("http://xpsitemanager.by-experience.com/statistik.aspx", "Statistik", "width=800, height=770, left=300, top=100, scrollbars=yes, resizable=yes");
  Fenstr.focus();
}

function weg() {
  document.getElementById("popUp").style.visibility = 'hidden';
}

function Bilder(filename, gallerieID) {
  var Bild = window.open("../pages/bilder.aspx?filename=" + filename + "&gallerieID=" + gallerieID, "KKRKKRKKRKKR", "width=660, height=450, left=300, top=100, scrollbars=no, resizable=yes");
  Bild.focus();
}

function newsText(gallerieID, spracheID) {
  var Bild = window.open("../pages/news.aspx?gallerieID=" + gallerieID + "&spracheID=" + spracheID, "KKRKKRKKRKKR", "width=480, height=660, left=300, top=100, scrollbars=yes, resizable=no");
  Bild.focus();
}

function anfahrt(filename) {
  var Bild = window.open("../pages/bilder.aspx?filename=" + filename, "KKRBozen", "width=542, height=524, left=300, top=100, scrollbars=no, resizable=no");
  Bild.focus();
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init == true) with (navigator) {
    if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
      document.MM_pgW = innerWidth; document.MM_pgH = innerHeight; onresize = MM_reloadPage;
    } 
  }
  else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
}


 function anzeigen(das){
 if(document.getElementById(das).style.display=='none')
 document.getElementById(das).style.display='block';
 else document.getElementById(das).style.display='none';}



MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
    d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
  }
  if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
  for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
  if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.9 PVII-Project Seven Development
  var xx, yy, i, g, elo = el, f = "", m = false, d = "", pa = 'px'; if (document.layers || window.opera) { pa = ''; }
  x = parseInt(x); y = parseInt(y); var t = 'g.p7Magic=setTimeout("P7AniMagic(\'' + elo + '\',';
  if ((g = MM_findObj(el)) != null) { d = (document.layers) ? g : g.style; } else { return; }
  if (parseInt(s) > 0) { eval(t + x + ',' + y + ',' + a + ',' + b + ',' + c + ',0)",' + s + ')'); return; }
  xx = parseInt(d.left); if (isNaN(xx)) {
    if (g.currentStyle) {
      xx = parseInt(g.currentStyle.left);
    } else if (document.defaultView && document.defaultView.getComputedStyle) {
      xx = parseInt(document.defaultView.getComputedStyle(g, "").getPropertyValue("left"));
    }
    if (isNaN(xx)) { xx = 0; } 
  } yy = parseInt(d.top); if (isNaN(yy)) {
    if (g.currentStyle) {
      yy = parseInt(g.currentStyle.top);
    } else if (document.defaultView && document.defaultView.getComputedStyle) {
      yy = parseInt(document.defaultView.getComputedStyle(g, "").getPropertyValue("top"));
    }
    if (isNaN(yy)) { yy = 0; } 
  } if (c == 1) { x += xx; y += yy; m = true; c = 0; } else if (c == 2) {
    m = false;
    if (g.p7Magic) { clearTimeout(g.p7Magic); } 
  } else {
    i = parseInt(a); if (g.p7Magic) { clearTimeout(g.p7Magic); }
    if (xx < x) { xx += i; m = true; if (xx > x) { xx = x; } } if (xx > x) { xx -= i; m = true; if (xx < x) { xx = x; } }
    if (yy < y) { yy += i; m = true; if (yy > y) { yy = y; } } if (yy > y) { yy -= i; m = true; if (yy < y) { yy = y; } } 
  }
  if (m) { d.left = xx + pa; d.top = yy + pa; eval(t + x + ',' + y + ',' + a + ',' + b + ',' + c + ',0)",' + b + ')'); }
}

$(function() {

   $('#boxbilder a').lightBox();
   $('.box_long .hide').hide();

  $('.box_long a').click(function() {
    var link = '.' + $(this).attr('rel');
    $(link).toggle();
  });

  $('.js_bilder a').click(function() {
    var bild = $(this).attr('rel');
    $('.img_big').attr('src', bild);
  });




	
//  $("#video").colorbox({ iframe: true, width: 610, height: 540 });
  $("#video2").colorbox({ iframe: true, width: 610, height: 540 });
  $('#menuListe ul ul').hide();
  $('#menuListe ul li').mouseover(function() {
    var strClass = ".unter" + $(this).attr('class');
    $(strClass).show();
  }).mouseout(function() {
    var strClass = ".unter" + $(this).attr('class');
    $(strClass).hide();
  });

  $('#s1').cycle({
    fx: 'fade',
    speed: 'fast',
    timeout: 0,
    next: '#next1',
    prev: '#prev1',
    timeout: 5000,
    pause: 1
  });

});
