﻿// JScript-Datei
function PopUp(ziel){
	window.open(ziel, "Info", "width=550, height=660, left=0, top=0, scrollbars=yes, resizable=no");
}

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 GallerieDD(selObj){
  if (selObj.options[selObj.selectedIndex].value != 00){
  var Fenstr = window.open("../pages/gallerie.aspx?gallerieID=" + selObj.options[selObj.selectedIndex].value, "Gallerie", "width=730, height=700, left=0, top=0, scrollbars=no, resizable=no");
  Fenstr.focus();
}
  if (restore) selObj.selectedIndex=0;
}

function Gallerie(gallerieID){
  var Fenstr = window.open("../pages/gallerie.aspx?gallerieID=" + gallerieID, "Gallerie", "width=730, height=700, left=0, top=0, scrollbars=no, resizable=no");
  Fenstr.focus();
  //if (restore) selObj.selectedIndex=0;
}

function popGallerie(gallerieID, fName, i, kategorieID, spracheID){
    var gallerie = window.open("../pages/album.aspx?gallerieID=" + gallerieID + "&fName=" + fName + "&startPos=" + i + "&kategorieID=" + kategorieID + "&spracheID=" + spracheID, "Gallerie", "width=540, height=700, left=300, top=50, scrollbars=no, resizable=no");
    gallerie.focus();
}

function zeige(ziel){
  verstecke()
  
  if (document.all)
  {
	   document.all[ziel].style.visibility = 'visible';
  }
  else if (document.layers)
  {
	   document.layers[ziel].visibility = 'show';
  }
  else if (document.getElementById)
  {
	   document.getElementById(ziel).style.visibility = 'visible';
  } 
}

function zeigeVideo(ziel) {

  document.getElementById("video1").style.visibility = 'hidden';
  document.getElementById("video1").style.height = '0px';
  document.getElementById("video2").style.visibility = 'hidden';
  document.getElementById("video2").style.height = '0px';
  document.getElementById(ziel).style.visibility = 'visible';
  document.getElementById(ziel).style.height = '251px';
  
}
function verstecke(ziel){

  for (var i = 0; i < 4; i++){
    if (document.all)
    {
	     document.all[ziel + i].style.visibility = 'hidden';
	     document.all[ziel + i].style.height = '0px';
    }
    else if (document.layers)
    {
	     document.layers[ziel + i].visibility = 'hide';
	     document.layers[ziel + i].style.height = '0px';
    }
    else if (document.getElementById)
    {
	     document.getElementById(ziel + i).style.visibility = 'hidden';
	     document.getElementById(ziel + i).style.height = '0px';
    }
  }
}
  
function zoomy(bild){
  window.open("../pages/zoom.aspx?bild=" + bild, "Zoomy", "width=10, height=10, left=60, top=60, scrollbars=no, resizable=yes");
}

function zoomUpload(bild){
  window.open("../pages/zoom.aspx?bild2=" + bild, "Zoomy", "width=10, height=10, left=60, top=60, scrollbars=no, resizable=yes");
}

function report(reportID, spracheID){
  window.open("../pages/popUp.aspx?reportID=" + reportID + "&lng=" + spracheID, "Report", "width=450, height=450, left=100, top=100, scrollbars=no, resizable=no");
}

function report2(reportID, spracheID){
  window.open("../pages/popUp.aspx?reportID=" + reportID + "&lng=" + spracheID, "Report", "width=650, height=450, left=100, top=100, scrollbars=no, resizable=no");
}

function Schliessen(){
  window.close();
}

var message="Entschuldigung ...der rechte Mausklick ist gesperrt!";

//function clickIE4(){
//  if (event.button==2){
//    //alert(message);
//    return false;
//  }
//}

//function clickNS4(e){
//  if (document.layers||document.getElementById&&!document.all){
//    if (e.which==2||e.which==3){
//      //alert(message);
//      return false;
//    }
//  }
//}

//if (document.layers){
//  document.captureEvents(Event.MOUSEDOWN);
//  document.onmousedown=clickNS4;
//}
//else if (document.all&&!document.getElementById){
//  document.onmousedown=clickIE4;
//}

//function disablePaste(e){
//  var modif='';

//  if (!e){
//    if (event.altKey){
//      modif+='[ Alt ] ';
//    }
//    if (event.ctrlKey){ 
//      modif+='[ Ctrl ] '; 
//    }
//    if (event.shiftKey){ 
//      modif+='[ Shift ] '; 
//    }
//    if (event.keyCode) { 
//      keycode=event.keyCode; 
//    }
//    else { 
//      keycode=event.which; 
//    }
//  }
//  else{
//    if (e.altKey){ 
//      modif+='[ Alt ] '; 
//    }
//    if (e.ctrlKey) { 
//      modif+='[ Ctrl ] '; 
//    }
//    if (e.shiftKey) { 
//      modif+='[ Shift ] '; 
//    }
//    if (e.keyCode) { 
//      keycode=e.keyCode; 
//    }
//    else { 
//      keycode=e.which; 
//    }
//  }

//  if (modif.indexOf('[ Ctrl ]')>=0){ 
//    return false;
//  }
//}

//document.onkeydown = disablePaste;



$(function() {
  //Für Texte die versteckt sind, zum auf- und zuklappen
  $('.hideMe').hide();

  $('.showHim').click(function() {
    $('.hideMe').slideToggle();
  });

  $('.showHim').click(function() {
    $('.hideMe').slideToggle();
  });

  $('.more').addClass('size');

  $('.text h2, .weiter').click(function() {
    var klasse = '.l_' + $(this).attr('class').replace('weiter ', '');

    if ($(klasse).hasClass('size')) {
      $(klasse).removeClass('size');
    } else {
      $(klasse).addClass('size');
    }
  });
});
