
function mainBoxPosition(){
	var h = $(window).height();
	var ypos = (h / 2) - 264; 
	if(ypos < 0) ypos = 0; 
	var yposstr = ypos+'px';
	$('#main-container-middle3').css({top:yposstr});
}

function mainShopBoxPosition(){
	var h = $(window).height();
	var ypos = (h / 2) - 264; 
	if(ypos < 0) ypos = 0; 
	var yposstr = ypos+'px';
	$('#main-shop-container-middle').css({top:yposstr});
}

function mainShopBoxPosition2(x){
	var h = $(window).height();
	var w = $(window).width();
	var ypos = (h / 2) - x; 
	var xpos = (w / 2) - 400; 
	if(ypos < 0){
		ypos = 0; 
		if(jQuery.browser.msie && /MSIE 6.0/.test(navigator.userAgent)){ alert("ja"); xpos = (w / 2) - 400; }
		else xpos = (w / 2) - 392;
	}
	var yposstr = ypos+'px';
	var xposstr = xpos+'px';
	$('#main-shop-container-middle').css({top:yposstr});
	$('#main-shop-container-middle').css({left:xposstr});
}

function mainShopBoxPosition3(){
	var h = $(window).height();
	var w = $(window).width();
	var ch = $('#main-ekw-container').height();
	//alert(ch);
	var t = 0;
	if(ch == 527) t = 264;
	else t = ch / 2;
	var ypos = (h / 2) - t; 
	var yposr = Math.round(ypos,0);
	if(ch <= h){
		if(ch != 527) yposr = yposr - 21;
		else{
		if(jQuery.browser.webkit && /Chrome/.test(navigator.userAgent)) yposr = yposr - 21;
		else if(jQuery.browser.msie && /MSIE 7.0/.test(navigator.userAgent)) yposr = yposr - 21;
		else if(jQuery.browser.msie && /MSIE 8.0/.test(navigator.userAgent)) yposr = yposr - 21;
		else yposr = yposr - 20;
		}
	}
	var yposimpr = (yposr + ch) - (99 + yposr); 
	var xpos = (w / 2) - 400; 
	if(ypos < 0){
		yposr = 0; 
		if(jQuery.browser.msie && /MSIE 6.0/.test(navigator.userAgent)){ xpos = (w / 2) - 400; }
		else xpos = (w / 2) - 392;
	}
	var yposstr = yposr+'px';
	var xposstr = xpos+'px';
	var yposimprstr = yposimpr+'px';
	$('#main-ekw-container').css({top:yposstr});
	$('#impressum').css({top:yposimprstr});
	$('#main-ekw-container').css({left:xposstr});
}


function swapImage(img1name, img2){
	document.getElementById(img1name).src = img2;
}

function openPreviewWindow(url, name, w, h, l, t){
	name = window.open(url,name,'width='+w+',height='+h+',left='+l+',top='+t+',menubar=no,locationbar=no,toolbar=no,status=no,resizable=no,scrollbars=no');
	name.focus();
}

function openWindow(url, name, w, h, l, t){
	name = window.open(url,name,'width='+w+',height='+h+',left='+l+',top='+t+',menubar=no,locationbar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');
	name.focus();
}
