//Name: includes/scripts.js
//Author: Philip D. Nichols (philipdnichols@gmail.com)
//Description: Javascript code for use at http://thetabeta.kkpsi.com/
//Last Modified: 8/18/2008

//The following Javascript code is from the CSS Dropdown Tutorial at:
//http://www.cssdrive.com/index.php/examples/exampleitem/css_drop_down_menu/
<!--//--><![CDATA[//><!--
	startList = function()
	{
		if(document.all && document.getElementById)
		{
			cssdropdownRoot = document.getElementById("cssdropdown");
			
			for(x = 0; x < cssdropdownRoot.childNodes.length; x++)
			{
				node = cssdropdownRoot.childNodes[x];
				
				if(node.nodeName == "LI")
				{
					node.onmouseover = function()
					{
						this.className += " over";
					}

					node.onmouseout = function()
					{
						this.className = this.className.replace(" over", "");
					}
				}
			}
		}
	}

	if(window.attachEvent) window.attachEvent("onload", startList);
	else window.onload = startList;
//--><!]]>

// Used for expanding/collapsing the guestbook messages.
function change_guestbook_message_display(id)
{
	var plus = id + "_plus";
	var minus = id + "_minus";
	var id1 = id + "_1";
	var id2 = id + "_2";
	var id3 = id + "_3";
	var id4 = id + "_4";
	var id5 = id + "_5";
	var id6 = id + "_6";
	var id7 = id + "_7";
	
	var display_style = document.getElementById(id1).style.display;
	
	if(display_style == 'none')
	{
		document.getElementById(id1).style.display='block';
		document.getElementById(id2).style.display='block';
		document.getElementById(id3).style.display='block';
		document.getElementById(id4).style.display='block';
		document.getElementById(id5).style.display='block';
		document.getElementById(id6).style.display='block';
		document.getElementById(id7).style.display='block';
		document.getElementById(plus).style.display='none';
		document.getElementById(minus).style.display='block';
	}
	else
	{
		document.getElementById(id1).style.display='none';
		document.getElementById(id2).style.display='none';
		document.getElementById(id3).style.display='none';
		document.getElementById(id4).style.display='none';
		document.getElementById(id5).style.display='none';
		document.getElementById(id6).style.display='none';
		document.getElementById(id7).style.display='none';
		document.getElementById(minus).style.display='none';
		document.getElementById(plus).style.display='block';
	}
}
