
var bfx = null;
var _box = null;
var _sitemap_link = 'xml/sitemap.php';

function initSiteMap() {
	_box = $('sitemap');
	if (_box)
	{
		_box.close = false;
		_box.setStyle('opacity', 0);
		
		bfx = new Fx.Style(_box, 'opacity', {
				duration: 1000,
				onComplete: function(el) {
					if (el.close)
					{
						el.innerHTML = "";
						el.close = false;
					}
				}
			});
	}
}
function closeSiteMap() {
	if (_box) {
		
		_box.close = true;
		bfx.start(1,0);
	}
	return false;
}

function openSiteMap() {
	getHttpRequest(_sitemap_link);
	if (_box) {
		bfx.start(0,1);
	}
	return false;
}


if (window.addEventListener) {
	window.addEventListener("load", initSiteMap, false);
}
else if (window.attachEvent) {
	window.attachEvent("onload", initSiteMap);
}