


function welcome_slidedown() {
	Effect.SlideDown('welcome', {duration:.5});
}

function welcome_ctrl() {
	if ($('welcome').style.display == 'none') {
		$('welcome').style.display = 'block';
		Effect.SlideDown('welcome', {duration:.5});
	} else {
		$('welcome').style.display = 'block';
		Effect.SlideUp('welcome', {duration:.5});
	}
}


function tags_ctrl() {
	if (document.getElementById("buttonup").src == 'http://www.ipac.ca/images/TAGS_DOWN.jpg') {
		document.getElementById("buttonup").src = 'http://www.ipac.ca/images/TAGS_UP.jpg';
		Effect.SlideDown('wrappesdfr', {duration:.5});
	} else {
		document.getElementById("buttonup").src = 'http://www.ipac.ca/images/TAGS_DOWN.jpg';
		Effect.SlideUp('wrappesdfr', {duration:.5});
	}
}


//dynamic navigation
initNav = function() {
	
if (typeof document.body.style.maxHeight == 'undefined') {
	
	if (document.all && document.getElementById) 
	{
		var navRoot = document.getElementById("navigation-main");
		var lis = navRoot.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++)
		{
			lis[i].onmouseover = function()
			{
				this.className += " hover";
			}
			lis[i].onmouseout = function()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
		}
	}
}

var currentactivel1 = null;

function initLeftMenu()
{
	var _menu = document.getElementById("navigation-left");
	if (_menu)
	{
		var _lis = _menu.getElementsByTagName("a");
		
		var _nodes = [];
		for (i=0; i< _lis.length; i++)
		{
			if (_lis[i].parentNode.className.indexOf("node") != -1)
			{
				if (_lis[i].parentNode.className.indexOf("activel1") != -1)
				{
					currentactivel1 = _lis[i];
				}
				
				_lis[i].onclick = function()
				{
					if (currentactivel1)
					{
						if (currentactivel1 != this)
						{
							currentactivel1.parentNode.className = currentactivel1.parentNode.className.replace("activel1", "");
						}
					}
					
					
					
					if (this.parentNode.className.indexOf("activel1") == -1)
					{
						currentactivel1 = this;
						this.parentNode.className += " activel1";
					}
					else
					{
						currentactivel1 = null;
						this.parentNode.className = this.parentNode.className.replace("activel1", "");
						
					}
					return false;
				}

			}
		}
	}
}

if (document.all && !window.opera )
	attachEvent("onload", initNav);


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








			
			// Global XMLHttpRequest variable
			var request = null;
			
			// This function loads the specified URL and inserts the result of it (or an error message)
			// into the "content" div.  It uses a synchronous XMLHTTPRequest to do so and returns false
			// if an error occurs loading the URL.
			function loadURL(url)
			{
				// Variable for response content
				var inner = '';
				
				// Return value
				var value = false;
				
				// Create an XMLHttpRequest object or ActiveX control
				if (window.XMLHttpRequest) 
				{
					request = new XMLHttpRequest();
				}
				else if (window.ActiveXObject)
				{
					request = new ActiveXObject("Microsoft.XMLHTTP");
				}
				
				// If XMLHTTPRequest is supported
				if (request)
				{
					// Set up synchronous request
					request.open("GET", url, false);
					
					// Send synchronous request
					request.send(null);
					
					// Check the status
					if (request.status == 200)
					{
						// Success
						inner = request.responseText;
						value = true;
					}
					else
					{
						// Error
						inner = 'Error: ' + request.status + ' ' + request.statusText;
					}
				}
				
				// Set the contents of the div
				document.getElementById("inner").innerHTML = inner;

				return value;
			}
			