// JavaScript Document
function onLoad() 
	{
		var greyBarWidth = document.getElementById('footer');
		var headWidth = document.getElementById('header');
		var windowWidth = document.body.clientWidth;
		var maxWidth = windowWidth;
		var minWidth = 1000;
		
		if (maxWidth > windowWidth) 
			{
				greyBarWidth.style.left = '0';
				headWidth.style.left = '0';
				if (minWidth > windowWidth) 
					{
						greyBarWidth.style.width = minWidth + 'px';
						headWidth.style.width = minWidth + 'px';
					} 
				else 
					{
						greyBarWidth.style.width = windowWidth + 'px';
						headWidth.style.width = windowWidth + 'px';
					}
			} 
		else 
			{
				greyBarWidth.style.left = ((windowWidth - maxWidth) / 2) + 'px';
				headWidth.style.left = ((windowWidth - maxWidth) / 2) + 'px';
				greyBarWidth.style.width = maxWidth + 'px';
				headWidth.style.width = maxWidth + 'px';
			}
	}

function ChangeTab(aId)
	{
		var tabid = aId.replace("tab", "");
		for (var i = 1; i <= 5; i++)
			{
				if (i == tabid)
					{
						
						document.getElementById("divTab"+tabid).className = "active";
						if (document.getElementById("ProduktDetail_liTab"+tabid) != null)
						{
							document.getElementById("ProduktDetail_liTab"+tabid).className = "active";
						}
					}
				else
					{
						
						document.getElementById("divTab"+i).className = "inactive";
						if (document.getElementById("ProduktDetail_liTab"+i) != null)
						{
						document.getElementById("ProduktDetail_liTab"+i).className = "inactive";
						}
					}
			}
	}
	
var last
last=""
function show(objName) {
    		if (document.getElementById(objName).style.display == "none") {
    			if (last != "") {
    			document.getElementById(last).style.display = "none"
    			}
    			document.getElementById(objName).style.display = "block"
    			last = objName
    		}
    		else {
    		document.getElementById(objName).style.display = "none"
    		last = ""
    		}
    	}