﻿// JScript-Datei
function PopUp(ziel){
	window.open(ziel, "Info", "width=360, height=400, 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 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();
}

function WatermarkFocus(txtElem, strWatermark) {
 if (txtElem.value == strWatermark) txtElem.value = '';
}

function WatermarkBlur(txtElem, strWatermark) {
 if (txtElem.value == '') txtElem.value = strWatermark;}

$(function() {
  $('a[@rel*=lightbox]').lightBox({ fixedNavigation: false });
  $('.emilia-romagna').show();
  $('.info_aff').hide();
  $('.box').hide();

  $('#s1').cycle({
    fx: 'scrollRight',
    delay: -1000,
    pause: 1
  });

  $('#s2').cycle({
    fx: 'scrollRight',
    timeout:  11000,
    pause: 1
  });

  $('#s3').cycle({
    fx: 'fade',
    timeout: 11000,
    pause: 1
  });

  
  $('.upload_button').click(function() {
    $('.status_bar').show();
  }); 
});

function zeige(region) {
  $('.hide').hide('fast');
  $('.' + region).show('slow');
  $('.info_aff').show();

  if ($('#hfRegion_' + region).val() == 1) {
    $('.info_aff').hide();
  }
}

function showMe(boxer) {
  $('.' + boxer).toggle('slow');
}

var idbox = 1;
setInterval("refreshApertura(idbox++)", 7000); 

function refreshApertura(idbox){
 var id = (idbox % 3);
 if(id==0) id=3;

 document.getElementById("start1").className='fade_articel hide';
 document.getElementById("start2").className='fade_articel hide';
 document.getElementById("start3").className='fade_articel hide';

 document.getElementById("thumb1").className='articoli-thumb';
 document.getElementById("thumb2").className='articoli-thumb';
 document.getElementById("thumb3").className='articoli-thumb';

 var apertura = document.getElementById("start"+id);
 apertura.className='fade_articel';

 var apertura = document.getElementById("thumb"+id);
 apertura.className+=' hover';
} 


