/* Левое меню */
function fopen(idnode)
				{
				idnode = '#' + idnode + '_list';
				$(idnode).animate({height: "show"}, 500);
				}

function fclose(idnode)
				{
				idnode = '#' + idnode + '_list';
				$(idnode).animate({height: "hide"}, 500);
				}

function fcloseall(idnode)
				{      
				idnode = '#' + idnode + '_list';
				$(idnode).css("display", 'none');
				}
function fshow(idnode)
				{
				idnode = '#' + idnode + '_list';
//				$(idnode).animate({opacity: "show"}, 500);
				$(idnode).css("display", 'block');
				}

function fhide(idnode)
				{
				idnode = '#' + idnode + '_list';
//				$(idnode).animate({opacity: "hide"}, 500);
				$(idnode).css("display", 'none');
				}

function fhideall(idnode)
				{      
				idnode = '#' + idnode + '_list';
				$(idnode).css("display", 'none');
				}
startList = function() 
	{
	nodes=document.getElementById('leftmenu');
	for (ii=0; ii < nodes.childNodes.length; ii++) 
	{
	nodesin = nodes.childNodes[ii];
	if(nodesin.nodeName == "DIV")
	{
	for (i=0; i < nodesin.childNodes.length; i++) 
		{
		node = nodesin.childNodes[i];

		if (node.nodeName=="DIV") 
			{
			idnode = node.id;
			if(document.getElementById(idnode + '_open'))
				{


			if(document.getElementById(idnode + '_open').className == 'close')
			{
			fcloseall(idnode); 
			}


			document.getElementById(idnode + '_open').onclick=function()
			{
			if(this.className == 'open')
				{
				this.className = this.className.replace("open", "close");
				fclose(this.id.replace("_open", ""));
				}
			else
				{
				this.className = this.className.replace("close", "open");
				fopen(this.id.replace("_open", ""));
				}
			}
			document.getElementById(idnode + '_open').onmouseover=function()
			{
			this.style.color="#275107";
			this.style.backgroundColor="#F2EDDA";
			}
			document.getElementById(idnode + '_open').onmouseout=function()
			{
			this.style.color="#6A8A0D";
			this.style.backgroundColor="#fff";
			}

				}

			
			}
		}
	}
	}
	}

$(document).ready(
	function()
	{
	startList();
	}
	);