function startmenu(ID,dir)
	{
	if(document.getElementById(ID) != null)
		{
		var element = document.getElementById(ID);
		
		for(i = 0; i < element.childNodes.length; i++)
			{
			if(element.childNodes[i].tagName == "LI")
				{
				if(element.childNodes[i].childNodes[2] != null && element.childNodes[i].childNodes[2].tagName == "UL" && element.childNodes[i].className == "")
					{
					element.childNodes[i].className = "more-"+ dir;
					}
					
				element.childNodes[i].onmouseover = function()
					{
					this.className += "-open";
					if(this.childNodes[2] != null && this.childNodes[2].tagName == "UL")
						{
						startmenu(this.childNodes[2].id,"horizontal");
						}
					}
				
				element.childNodes[i].onmouseout = function()
					{
					this.className = this.className.replace("-open","");
					}
				}
			}
		}
	}

function showOptions()
	{
	if(document.getElementById('paymentoptions') != null)
		{
		var opt = document.getElementById('paymentoptions');
		
		for(i = 0; i < opt.childNodes.length; i++)
			{
			if(opt.childNodes[i].tagName == "LI")
				{
				opt.childNodes[i].onclick = function()
					{
					var hideopt = document.getElementById('paymentoptions');

					for(p = 0; p < hideopt.childNodes.length; p++)
						{
						if(document.getElementById('methodinfo-'+ p) != null)
							{
							document.getElementById('methodinfo-'+ p).className = '';
							}
						}
					
					var show = this.id.replace('method','methodinfo');
					
					if(document.getElementById(show) != null)
						{
						document.getElementById(show).className = 'open';
						}
					}
				}
			}
		}
	}

window.onload = function()
	{
	startmenu('startmenu','vertical');
	showOptions();
	setVview();
	}
