function init()
{
	var foo = document.getElementById('menulist').childNodes.length;
	var currentNode = document.getElementById('menulist');
	//build_menu(currentNode);
	//document.getElementById('menulist').childNodes[0].style.display = "block";
}

function showchilds(foo)
{
	//alert(foo.childNodes.length);	
	/*for(i = 0; i <= foo.childNodes.length; i++)
	{
		alert(foo.childNodes[i]);
	}*/
	//foo.childNodes[1].style.display = "block";


}

function showDeliverAddress()
{
	document.getElementById('extraaddress').style.display = 'block';
	document.getElementById('extraaddressopen').style.display = 'none'
}
/*function build_menu(currentNode)
{
	//alert(document.getElementById('menulist').childNodes.length);
	

	/*$sSelectCategories = "SELECT title, catid FROM categories WHERE parentid=".$piParentid;
	$rSelectCategories = mysql_query($sSelectCategories);
	while ($aCategory = mysql_fetch_assoc($rSelectCategories))
	{
		$_SESSION['webshop']['menu'].= '<li id="cat'.$aCategory['catid'].'">'.htmlspecialchars($aCategory['title']).'<ul>';
		build_menu($aCategory['catid'], $piLevel+1);
		$_SESSION['webshop']['menu'].= '</ul></li>';
	}
	var bar = currentNode.childNodes.length;
	var foo = currentNode.childNodes[0].childNodes[1].childNodes.length;
	for(i=0; i < bar; i++)
	{
		//abc = abc.childNodes[i];
		//build_menu(abc.childNodes.
		currentNode.childNodes[0].onclick = function()
		{
			for(j=0; j < foo; j++)
			{
				currentNode.childNodes[0].childNodes[1].childNodes[j].style.display = "block";
				currentNode.childNodes[0].childNodes[1].childNodes[0].childNodes[1].childNodes[j].style.display = "block";
				//currentNode = currentNode.childNodes[0].childNodes[1];
				//build_menu(currentNode);
				//alert(document.getElementById("menulist").childNodes[0].childNodes[j].nodeName);
			}
		}
		//
		//
		//foo = foo.childNodes[1];
	}
	
	//abc.style.innerHTML = "none";
	//alert(document.getElementById('menulist').childNodes[0].childNodes[1].childNodes.length);
	//alert(document.getElementById('menulist').childNodes[0].innerHTML);
	
	//abc = abc.childNodes[0].innerHTML;
	//alert(abc);
}*/
