 // Initialize the menu
function initMenu(parents)
{
	if( parents != '' )
	{
		var arrClose = parents.split(",");
		for (i in arrClose)
		{
			document.getElementById('ul' + arrClose[i]).style.display = 'none';
		}
	}
}

 // Toggle a certain menuGroup
function toggleMenuGroup( menuGroup )
{
	if( document.getElementById(menuGroup).style.display == '' )
	{
		document.getElementById(menuGroup).style.display = 'none';
	}
	else
	{
		document.getElementById(menuGroup).style.display = '';
	}
}

 // Toggle a certain liGroup
function toggleLiGroup( liGroup )
{
	if( document.getElementById(liGroup).className == '' )
	{
		document.getElementById(liGroup).className = 'clicked';
	}
	else
	{
		document.getElementById(liGroup).className = '';
	}
}

function trackUser()
{
	pag = encodeURIComponent(location.href.substring(7)); scw = parseInt(screen.width); sch = parseInt(screen.height);
	ref = document.referrer; ref = ( ref == "" || ref == 'undefined' || ref.substring(0,7) != 'http://' ) ? '' : encodeURIComponent(ref.substring(7));
	src = '<img src="includes/track_user.php?pag='+pag+'&amp;ref='+ref+'&amp;scw='+scw+'&amp;sch='+sch+'" width="0" height="0" border="0" align="left" alt="" />';
	document.write(src);
}

/*
function initList(parents)
{
	if( parents != '' )
	{
		var arrClose = parents.split(",");
		for (i in arrClose)
		{
			if(document.getElementById(arrClose[i]) != null )
			{
				document.getElementById(arrClose[i]).style.display = 'none';
			}
		}
	}
}
*/

// Submit the form
function submitButton(formid, pressedbutton)
{
	document.getElementById(formid).mode.value = pressedbutton;
	try {
		document.getElementById(formid).onsubmit();
		}
	catch(e){}
	document.getElementById(formid).submit();
}

 // Set focus of a textfield
function setFocus( field, mode )
{
	 // Focus ON or OFF
	field.className = ( mode == true ) ? 'contactTextFieldFocus' : 'contactTextField';
}


function initList(parents)
{
	if( parents != '' )
	{
		var arrClose = parents.split(",");
		for (i in arrClose) 
		{
			if(document.getElementById('tr' + arrClose[i]) != null )
			{
				document.getElementById('tr' + arrClose[i]).style.display = 'none';
			}
		}
	}
}