/**
JS file for the project.
@author arnaud deleurme
@date 2 december 2008
*/

/**
Opens a new window containing the current map's image,
by calling mode=image on the project's page.
*/
function downloadMainMap() {
	var url = "maps.php?mode=image";
	openWindow(url, 'mapImage', true);
}

/**
Opens a new window
@param URL the page's URL to open
@param name the new window's name
@param chromeless true to open a chromeless window, false to open a normal window
@return the window object reference
*/
function openWindow(url, name, chromeless, w, h) {
	var chrome = 'width=' + w + ',height=' + h + ',';
	if (chromeless) {
		chrome = 'width=' + w + ',height=' + h + ',';;
	}
	window.open(url, name, chrome);
}

function showLayer(id) {
	var d = document.getElementById(id);
	var vis = d.style.display;
	if (vis == 'none' || vis == '') {
		d.style.display = 'inline';
	} else {
		d.style.display = 'none';
	}
}
