function browser_get_height() {
	var viewportwidth;
	 var viewportheight;
	 
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	 if (typeof window.innerWidth != 'undefined')
	 {
		  viewportwidth = window.innerWidth,
		  viewportheight = window.innerHeight
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
		 && typeof document.documentElement.clientWidth !=
		 'undefined' && document.documentElement.clientWidth != 0)
	 {
		   viewportwidth = document.documentElement.clientWidth,
		   viewportheight = document.documentElement.clientHeight
	 }
	 
	 // older versions of IE
	 
	 else
	 {
		   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		   viewportheight = document.getElementsByTagName('body')[0].clientHeight
	 }
	 return viewportheight;
}
function browser_get_width() {
	var viewportwidth;
	 var viewportheight;
	 
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	 if (typeof window.innerWidth != 'undefined')
	 {
		  viewportwidth = window.innerWidth,
		  viewportheight = window.innerHeight
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
		 && typeof document.documentElement.clientWidth !=
		 'undefined' && document.documentElement.clientWidth != 0)
	 {
		   viewportwidth = document.documentElement.clientWidth,
		   viewportheight = document.documentElement.clientHeight
	 }
	 
	 // older versions of IE
	 
	 else
	 {
		   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		   viewportheight = document.getElementsByTagName('body')[0].clientHeight
	 }
	 return viewportwidth;
}


function init_pos_laufband(id,xpos) {

	var viewportwidth = browser_get_width();
	var viewportheight = browser_get_height();

	if(xpos == "left") {
		var start_x = (viewportwidth/2-415-156)+"px";
	} else {
		var start_x = (viewportwidth/2+400)+"px";
	}
	var start_y = "0px";
	var width = "156";
	var height = viewportheight;

	var bodyElement = document.getElementById(id);
	

	bodyElement.style.position = "fixed";
	bodyElement.style.overflow = "hidden";
	bodyElement.style.top = start_y;
	bodyElement.style.left = start_x;
	bodyElement.style.width = width+"px";
	bodyElement.style.height = height+"px";
	bodyElement.style.zIndex = "1000";
	bodyElement.style.backColor = "#ffffff";
	bodyElement.style.backgoundColor = "#ffffff";
	

}
function ausblenden_laufband(id) {

	var bodyElement = document.getElementById(id);
	bodyElement.style.position = "absolute";
	bodyElement.style.diplay = "none";
	bodyElement.style.overflow = "hidden";
	bodyElement.style.top =0;
	bodyElement.style.left = 0;
	bodyElement.style.width = "1px";
	bodyElement.style.height = "1px";
	bodyElement.style.zIndex = "1000";

	

}
function pos_laufband(id,xpos) {
	var bodyElement = document.getElementById(id);
	var viewportwidth_new = browser_get_width();
	
	if(xpos == "left") {
		var start_x = (viewportwidth_new/2-415-156)+"px";
	} else {
		var start_x = (viewportwidth_new/2+400)+"px";
	}
	var start_y = "0px";
	
	if(bodyElement) bodyElement.style.left = start_x;
}

function repos() {
	pos_laufband("laufband","left");
	pos_laufband("laufband_muttertag","right");
	pos_laufband("laufband_gutscheine","right");
}

var viewportwidth = browser_get_width();
var viewportheight = browser_get_height();
if(viewportwidth>"1140") {
	init_pos_laufband("laufband", "left");
	if($("laufband_muttertag")) init_pos_laufband("laufband_muttertag", "right");
	if($("laufband_gutscheine"))init_pos_laufband("laufband_gutscheine", "right");
} else {
	ausblenden_laufband("laufband");	
	ausblenden_laufband("laufband_muttertag");
	ausblenden_laufband("laufband_gutscheine");
}


window.onresize = repos;
