var main = new Object();
main.popup = function(name, lang) {
	switch (name) {
		case "contacts":
			var page = "popup/contacts.php5";
			var features = "width=620,height=500,resizable,scrollbars";
			break;
		case "mentions":
			var page = "popup/mentions.php5";
			var features = "width=770,height=510,resizable,scrollbars";
			break;
		case "map":
			var page = "popup/map.php5";
			var features = "width=612,height=427,resizable";
			break;
		default :
			var name = "_blank";
			var page = "index.htm";
			var features = "";
	}
	var newWindow = window.open(page + "?lang=" + lang, name, features);
	var width = parseInt (features.replace(/.*width=/, ""));
	var height = parseInt (features.replace(/.*height=/, ""));
	if (width && height) try {newWindow.resizeTo (width, height)} catch (e) {};
	try {newWindow.moveTo(0,0)} catch (e) {};
	newWindow.focus();
}