function OpenPopup(windowname, url, width, height)
{
	var href = url;
	var left = (screen.width - width)/2;	
	var top = (screen.height - height)/2;
	var params = "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + ",scrollbars=no,resizable=no";
	var hWin = window.open(href, windowname, params);
	hWin.focus();
	return false;
}

function SetInnerText(eltID, text)
{
	if(document.getElementById)
	{
		var elt = document.getElementById(eltID);
		elt.removeChild(elt.childNodes[0]);
		elt.appendChild(document.createTextNode(text));
	}
}

function ZoomMap(mapID, buttonID, map0, map1, button0, button1)
{
	if(document.getElementById)
	{
		var mapImg = document.getElementById(mapID);
		var button = document.getElementById(buttonID);
		
		mapImg.src = mapImg.src == map0 ? map1 : map0;
		button.src = button.src == button0 ? button1 : button0;
	}
}

function ToggleZoomImage(imgID, img0, img1, img2, img3)
{
	if(document.getElementById)
	{
		var imgElt = document.getElementById(imgID);
		if(imgElt.src == img0 || imgElt.src == img1)
		{
			imgElt.src = imgElt.src == img0 ? img1 : img0;
		}
		else
		{
			imgElt.src = imgElt.src == img2 ? img3 : img2;
		}
	}
}