	var box_width = 578;
	var wdt = box_width;
	var oTimer1;
	var oTimer2;
	var oTimer3;
	var iTime = 10;
	var sDiv = "periodic";
	var table_loaded = false;
	
	function load_periodic_table()
	{
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
			alert ("Browser does not support HTTP Request");
			return;
		}
		var url="/inc/periodic_table.php"

		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function insert_periodic_table()
	{
		 document.getElementById("periodic_div").innerHTML=xmlHttp.responseText;
	}
	
	function showit()
	{
		if(! table_loaded)
		{
			function_to_exec = 'insert_periodic_table()';
			load_periodic_table();
			table_loaded = true;
		}
		slide();
	}
	
	function slide()
	{
		
		window.clearTimeout(oTimer1);
		window.clearTimeout(oTimer3);
		var obj = document.getElementById(sDiv);
		
		var div = document.getElementById("periodic_div");
		var td = document.getElementById("periodic_td");
		
		if(div.style.visibility == "hidden")
		{
			div.style.display = "";
			div.style.visibility = "visible";
		}
		
		if(obj)
		{
			td.style.backgroundColor = "#FFFFFF";
			td.style.border = "solid 8px #8f8f8f";
			
			if(wdt>0)
			{
				obj.style.clip = "rect(auto, auto, auto, " + wdt + "px)";
				obj.style.marginLeft = (wdt*-1) + "px";
				
				wdt-=20;
				//if(wdt>100)
				//{
					oTimer2 = window.setTimeout(slide,1);
				/*}
				else
				{
					oTimer2 = window.setTimeout(slide,50);
				}*/
			}
			else
			{
				obj.style.clip = "rect(auto, auto, auto, 0px)";
				obj.style.marginLeft = "0px";
				
				var lnk = document.getElementById("shortcuts_lnk");
				lnk.onclick = clipit;
				
				var img = document.getElementById("shortcuts_img");
				img.src = "/img/shortcuts_top_open.gif";
				//img.height = "342";
				
				wdt = 0;
			}
		}
	}
	
	function clipit()
	{
		window.clearTimeout(oTimer2);
		window.clearTimeout(oTimer3);
		var obj = document.getElementById(sDiv);
		var div = document.getElementById("periodic_div");
		var td = document.getElementById("periodic_td");
		
		if(obj)
		{
			td.style.backgroundColor = "#FFFFFF";
			td.style.border = "solid 8px #8f8f8f";
			div.style.display = "none";
			div.style.visibility = "hidden";
			if(wdt <= box_width)
			{
				obj.style.clip = "rect(auto, auto, auto, " + wdt + "px)";
				obj.style.marginLeft = (wdt*-1) + "px";
				
				wdt+=20;
				oTimer1 = window.setTimeout(clipit,1);
			}
			else
			{
				obj.style.clip = "rect(auto, auto, auto, " + box_width + "px)";
				obj.style.marginLeft = (box_width*-1) + "px";
				
				var lnk = document.getElementById("shortcuts_lnk");
				lnk.onclick = showit;
				
				var img = document.getElementById("shortcuts_img");
				img.src = "/img/shortcuts_top.gif";
				//img.height = "180";
				
				wdt = box_width;
			}
		}
	}

	