﻿// JScript File

	function showHideDiv(showDiv, ShowDiv)
	{
	
		oShowDiv = document.getElementById(showDiv);
     
        if (ShowDiv)
        {
          
		    oShowDiv.style.display = "block";
		    oShowDiv.style.visibility = "visible";
		    
		    //set the cookie to the last action
		    document.cookie = "collapseNAVDIV=false"
        }
        else
		{
		   
		    oShowDiv.style.display = "none";
		    oShowDiv.style.visibility = "hidden";
		    
		    //set the cookie to the last action
		    document.cookie = "collapseNAVDIV=true";
	    }
			
	}
	function GetCookie(name)
	{
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1)
		{
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		}
		else
		{
			begin += 2;
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1)
		{
			end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
	} 

    function SetRightNavState()
    {
        //if (document.cookie == null || GetCookie('collapseNAVDIV')=="true")
		//    showHideDiv('liChildOfPeople', false); 
    
    }
    function ToggleRightNavState()
    {

    var cookievalue=GetCookie('collapseNAVDIV');
    
    //check to see what state the Right NAV should be in
    if (cookievalue == null || cookievalue=="true")
		showHideDiv('liChildOfPeople', true); 
	else if (document.cookie == null || cookievalue=="false")
		showHideDiv('liChildOfPeople', false); 
    
}