function overTR(obj)
{
	obj.className = obj.className + ' hover';
}

function outTR(obj)
{
	obj.className = obj.className.replace(' hover', '');
}

function SetLoginFocus()
{	
	try
	{
		document.getElementById('username').focus();
	}
	catch(e)
	{
	}
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date()
	exdate.setDate(exdate.getDate()+expiredays)
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate)
}

function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=")
		if (c_start!=-1)
		{ 
			c_start=c_start + c_name.length+1 
			c_end=document.cookie.indexOf(";",c_start)
			if (c_end==-1) c_end=document.cookie.length
			return unescape(document.cookie.substring(c_start,c_end))
		} 
	}
	return null
}
		
function switchLanguage(lang)
{
	setCookie('lang', lang, null);
	document.location.reload();
}

function focusme(field, element)
{
	if (field=='mail')
	{
		if (element.value=='e-mail')
		{
			element.value = '';
		}
	}
	else
	{
		if (element.value=='wachtwoord')
		{
			element.value = '';
		}
	}
}

function blurme(field, element)
{
	if (field=='mail')
	{
		if (element.value=='')
		{
			element.value = 'e-mail';
		}
	}
	else
	{
		if (element.value=='')
		{
			element.value = 'wachtwoord';
		}
	}
}

function toggleLabels(val)
{
	setCookie('editlabels', val, null);
	document.location.reload();
}
