/*******
** vp **	
*******/

	function getWindowWidth() {
		var windowWidth = 0;
		if (typeof(window.innerWidth) == 'number') {
			windowWidth = window.innerWidth;
		}  
		else {
			if (document.documentElement && document.documentElement.clientWidth) {
					windowWidth = document.documentElement.clientWidth;
			} 
			else {
				if (document.body && document.body.clientWidth) {
					windowWidth = document.body.clientWidth;
				}
			}
		}
		return windowWidth;
	}

			
	function getActiveStyleSheet() {
		var i, a;
		for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
		}
		return null;
	}
	
	function setActiveStyleSheet(title) {
		var i, a, main;
		for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
				a.disabled = true;
				if(a.getAttribute("title") == title) a.disabled = false;
			}
		}
	}


	function init () {
		var windowWidth = getWindowWidth();
		var activeStyleSheet = getActiveStyleSheet();
		if (windowWidth < 1003) {
			setActiveStyleSheet('acht')
		}
		if (windowWidth > 1005) {
			setActiveStyleSheet('default')
		}
	}

	function setCenter() {
		var windowWidth = getWindowWidth();
		var obj = document.getElementById('con')
		if (navigator.appName == 'Microsoft Internet Explorer') {
			if (windowWidth > 780) { 
				if (windowWidth % 2) { // == odd
					obj.style.left ='+1px';
					obj.style.margin = '';
				}
				else { // === even
					obj.style.margin = '0 auto';
					obj.style.left = ''; 
				}
			}
		}
	}

