var stripe = function() {
var tables = document.getElementsByTagName("table");  
for(var x=0;x!=tables.length;x++){
	var table = tables[x];
    if (! table) { return; }
		var tbodies = table.getElementsByTagName("tbody");
		for (var h = 0; h < tbodies.length; h++) {
			var even = true;
			var trs = tbodies[h].getElementsByTagName("tr");
			for (var i = 0; i < trs.length; i++) {
				trs[i].onmouseover=function() {
					this.className += " ruled"; return false
				}
				trs[i].onmouseout=function() {
					this.className = this.className.replace("ruled", ""); return false
				}
				if(even)
					trs[i].className += " even";
			   if(!even)
					trs[i].className += " odd";
				even = !even;
			}
		}
	}
}


function slideMap() {
	jQuery('.tx-wecmap-pi1').slideToggle();
	
}

jQuery(document).ready(function(){
	jQuery("#webCNeu").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		width: 823,
        height: 520,
        'overlayOpacity': 0.6,
		'overlayColor'	: '#016388',
		showCloseButton: true
	});
	
	jQuery('#blank').each(function() {
		jQuery('body').addClass('blanked');
	})
	
});

function openWCLayer() {
	
	jQuery("#webCNeu").click();
	
}


window.onload = stripe;

function nachOben() {
	window.scrollTo(0, 0);
}

jQuery.noConflict(); 
jQuery(document).ready(function() {
	jQuery("#ttv").fancybox({
		'padding'       : 0,
		'autoScale'     : false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'width'		: 980,
		'height'	: 490,
		'overlayOpacity': 0.6,
		'overlayColor'	: '#016388',
		showCloseButton: false,
		'swf'		: {allowFullScreen:'true'}
	});
});

function popup (url) {
	fenster = window.open(url, "TTV", "width=980,height=490,resizable=yes");
	fenster.focus();
	return false;
}

function closefb() { 
	jQuery.fancybox.close()
}

(function($) {
  $.fn.fullBg = function(){
    var bgImg = $(this);
    
    bgImg.addClass('fullBg');
    
    function resizeImg() {
      var imgwidth = bgImg.width();
      var imgheight = bgImg.height();
      
      var winwidth = $(window).width();
      var winheight = $(window).height();
      
      var widthratio = winwidth / imgwidth;
      var heightratio = winheight / imgheight;
      
      var widthdiff = heightratio * imgwidth;
      var heightdiff = widthratio * imgheight;
    
      if(heightdiff>winheight) {
        bgImg.css({
          width: winwidth+'px',
          height: heightdiff+'px'
        });
      } else {
        bgImg.css({
          width: widthdiff+'px',
          height: winheight+'px'
        });   
      }
    } 
    resizeImg();
    $(window).resize(function() {
      resizeImg();
    }); 
  };
})(jQuery)

jQuery(function($) {
  $("#bgArea").fullBg();
});

function setbreite(breite){
   if (navigator.appName == "Microsoft Internet Explorer") { 
    document.getElementById("mailformangebot").style.width = breite;
  }
}






