function showPopup(url, title, attribs) {
	var wnd = window.open(url, title, attribs);
	if (typeof(wnd.focus) == "function" || typeof(wnd.focus) == "object"){
		wnd.focus();
	}
}

function showPopupEx(location, windowName, w, h, scroll, pos) {
	if(pos == "random") {
		LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
		TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
	} else if(pos == "center") {
		LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
		TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
	} else {
		LeftPosition = 0;
		TopPosition = 20;
	}
	settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	return window.open(location, windowName, settings);
}

function openMapCompanyID(company, id) {
	var wnd = window.open('http://www.autohaus-ostmann.de/maps/?company=' + escape(company) + '&ID=' + escape(id), 'Standort', 'width=820,height=660,left=100,top=10,scrollbars=no');
	wnd.resizeTo(820, 660);
	wnd.moveTo(0, 0);
	wnd.focus();
}
