function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
function detectBrowser() {
	browserName = 'undefined';
	if (navigator.appName == 'Microsoft Internet Explorer') {
		browserName = 'Explorer';
		//alert('Du använder Bill Gates programvara!');
	} else if (navigator.appName == 'Netscape') {
		if (navigator.appVersion.indexOf('Safari') != -1) {
			browserName = 'Safari';
			//alert('Är du ute på Safari?');
		} else {
			browserName = 'Netscape';
			//alert('Varning! Du använder den föråldrade webläsaren Netscape!');
		}
	}
		//alert('appCodeName: "'+navigator.appCodeName+'" appName: "'+navigator.appName+'" appVersion: "'+navigator.appVersion+'" userAgent: "'+navigator.userAgent);
}
function checkResolution() {
	if (window.screen) {
		x = window.screen.width;
		y = window.screen.height;
		res = x + "x" + y;
		w = window.screen.availWidth;
		h = window.screen.availHeight;
		availArea = w + "x" + h;
		//alert('Resolution: ' + res + '; Available area: ' + availArea);
	}
}
function setLayout(theURL,carsite) {
	checkResolution();
	detectBrowser();
	//följande variabel avgör bredden för kalkylatorn!
	calculatorWidth = 235;
	if (browserName == 'Explorer') {
		carSiteWidth = x - calculatorWidth - 10;
		calculatorLeft = carSiteWidth;
	} else if (browserName == 'Safari') {
		carSiteWidth = x - calculatorWidth - 5;
		calculatorLeft = carSiteWidth + 3;
	} else if (browserName == 'Netscape') {
		carSiteWidth = x - calculatorWidth - 24;
		calculatorLeft = carSiteWidth + 12;
	}
/*
	if (carsite == 'Mobile.de') {
		alert("Du kommer nu till den svenska versionen av Mobile.de, glöm därför inte att välja att söka bland fordon i Tyskland eller det land du önskar.");
	}
*/
	calculatorHeight = h - 100;
	//first, if the windows already are open we will close them first, they may have been moved or resized...
	//if so, and not closing them first, the new window will open i the previous ones...
	if (window.calculatorWindow)
		if (!window.calculatorWindow.closed)
			window.calculatorWindow.close();
	if (window.carSiteWindow)
		if (!window.carSiteWindow.closed)
			window.carSiteWindow.close();
	calculatorWindow = window.open('e_calculator.cfm?carsite=' + carsite,'calculator','top=0,left='+calculatorLeft+',width='+calculatorWidth+',height='+calculatorHeight+',directories=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,status=yes,location=no');
	carSiteWindow = window.open(theURL,'carSite','top=0,left=0,width='+carSiteWidth+',height='+h+',directories=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes');
	window.calculatorWindow.focus();
	window.carSiteWindow.focus();
}
