<!--
function checkComment()
{
	var errorMess = "";
	if (document.frmComment.strName.value.length < 2)
	{
		document.frmComment.strName.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angett ditt namn.\n';
	}
	else
	{
		document.frmComment.strName.style.backgroundColor='#FFFFFF';
	}
	if (document.frmComment.strComment.value.length < 5 || document.frmComment.strComment.value.length > 250)
	{
		document.frmComment.strComment.style.backgroundColor='#FFF0B3';
		errorMess += '# Din kommentar måste innehålla 5-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 angett svaret 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 += '# Du har inte angett något namn.\n';
	}
	else
	{
		document.frmConf.strName.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.strCity.value.length < 2)
	{
		document.frmConf.strCity.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angett någon stad.\n';
	}
	else
	{
		document.frmConf.strCity.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strURL.value.length < 7)
	{
		document.frmConf.strURL.style.backgroundColor='#FFF0B3';
		errorMess += '# Du har inte angett någon hemsida.\n';
	}
	else
	{
		document.frmConf.strURL.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strDesc.value.length < 100 || document.frmConf.strDesc.value.length > 2000)
	{
		document.frmConf.strDesc.style.backgroundColor='#FFF0B3';
		errorMess += '# Beskrivningen måste innehålla 100-2000 tecken.\n';
	}
	else
	{
		document.frmConf.strDesc.style.backgroundColor='#FFFFFF';
	}
	if (document.frmConf.strConf.value.length < 50 || document.frmConf.strConf.value.length > 2000)
	{
		document.frmConf.strConf.style.backgroundColor='#FFF0B3';
		errorMess += '# Informationen om konferenslokaler måste innehålla 50-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 angett svaret på frågan.\n';
	}
	else
	{
		document.frmConf.strCode.style.backgroundColor='#FFFFFF';
	}
	
	if (errorMess.length >1)
	{
		alert(errorMess);
		return false
	}
	else
	{
		return true;
	}
}

function popup(URL,width,height,scroll){
	if (parseInt(navigator.appVersion) >= 3){
		if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	window.open(URL,"dummy","top=" + parseInt(y/2-height/2-16) + ",left=" + parseInt(x/2-width/2-5) + ",width=" + width + ",height=" + height + ",scrollbars=" + scroll);
}

// -->
