<!--

function checkComment()
{
	var errorMess = "";
	if (document.frmComment.strName.value.length < 2)
	{
		document.frmComment.strName.style.backgroundColor='#FFF0B3';
		errorMess += '# Ditt namn måste innehålla minst 2 tecken.\n';
	}
	else
	{
		document.frmComment.strName.style.backgroundColor='#FFFFFF';
	}

	if (document.frmComment.strComment.value.length < 10 || document.frmComment.strComment.value.length > 250)
	{
		document.frmComment.strComment.style.backgroundColor='#FFF0B3';
		errorMess += '# Din kommentar måste innehålla 10-250 tecken.\n';
	}
	else
	{
		document.frmComment.strComment.style.backgroundColor='#FFFFFF';
	}
	
	if (document.frmComment.strCode.value.length < 1)
	{
		document.frmComment.strCode.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angivit något svar på frågan.\n';
	}
	else
	{
		document.frmComment.strCode.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length > 1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkMessage()
{
	var errorMess = "";
	if (document.frmMessage.strName.value.length < 2)
	{
		document.frmMessage.strName.style.backgroundColor='#FFF0B3';
		errorMess += '# Ditt namn måste innehålla minst 2 tecken.\n';
	}
	else
	{
		document.frmMessage.strName.style.backgroundColor='#FFFFFF';
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.frmMessage.strEmail.value)))
	{
		document.frmMessage.strEmail.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angivit en giltig e-postadress.\n';
	}
	else
	{
		document.frmMessage.strEmail.style.backgroundColor='#FFFFFF';
	}
	if (document.frmMessage.strMessage.value.length < 10)
	{
		document.frmMessage.strMessage.style.backgroundColor='#FFF0B3';
		errorMess += '# Ditt meddelande måste innehålla minst 10 tecken.\n';
	}
	else
	{
		document.frmMessage.strMessage.style.backgroundColor='#FFFFFF';
	}
	if (document.frmMessage.intProtect.value.length < 1)
	{
		document.frmMessage.intProtect.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angivit någon kod.\n';
	}
	else
	{
		document.frmMessage.intProtect.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function checkConf()
{
	var errorMess = "";
	if (document.frmConf.strName.value.length < 2)
	{
		document.frmConf.strName.style.backgroundColor='#FFF0B3';
		errorMess += '# Namnet måste innehålla minst 2 tecken.\n';
	}
	else
	{
		document.frmConf.strName.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strCity.value.length < 2)
	{
		document.frmConf.strCity.style.backgroundColor='#FFF0B3';
		errorMess += '# Stad måste innehålla minst 2 tecken.\n';
	}
	else
	{
		document.frmConf.strCity.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.intArea.value.length < 2)
	{
		document.frmConf.intArea.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte valt något län.\n';
	}
	else
	{
		document.frmConf.intArea.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strURL.value.length < 6)
	{
		document.frmConf.strURL.style.backgroundColor='#FFF0B3';
		errorMess += '# Hemsidesadressen måste innehålla minst 6 tecken.\n';
	}
	else
	{
		document.frmConf.strURL.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strDesc.value.length < 10 || document.frmConf.strDesc.value.length > 2000)
	{
		document.frmConf.strDesc.style.backgroundColor='#FFF0B3';
		errorMess += '# Beskrivningen av konferensanläggningen måste innehålla 10-2000 tecken.\n';
	}
	else
	{
		document.frmConf.strDesc.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strConf.value.length < 10 || document.frmConf.strConf.value.length > 2000)
	{
		document.frmConf.strConf.style.backgroundColor='#FFF0B3';
		errorMess += '# Beskrivningen av konferenslokalerna måste innehålla 10-2000 tecken.\n';
	}
	else
	{
		document.frmConf.strConf.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strCode.value.length < 1)
	{
		document.frmConf.strCode.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angivit svaret på frågan.\n';
	}
	else
	{
		document.frmConf.strCode.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

// -->