	var cssok = '#dceaaf';
	var csserror = '#eabcaf';
	var regzip1 = /^\d{3}\ \d{2}$/;
	var regzip2 = /^\d{5}$/;
	var regemail = /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;

	function chkFormCSS(frm, frmtype, frmchars){
		//ToDo: Ev färgmarkera icke obligatoriska fält också...
		if(frmtype == 'txt'){
			if (parseInt(frmchars,10) > 0){
				if(frm.value.length >= parseInt(frmchars,10))
					frm.style.backgroundColor = cssok;
				else
					frm.style.backgroundColor = csserror;
			}
		}
		if(frmtype == 'drop'){
			if (parseInt(frmchars,10) > 0){
				if(frm.value.length > 0)
					frm.style.backgroundColor = cssok;
				else
					frm.style.backgroundColor = csserror;
			}
		}
		if(frmtype == 'zip'){
			if (parseInt(frmchars,10) > 0){
				if(frm.value.match(regzip1) || frm.value.match(regzip2))
					frm.style.backgroundColor = cssok;
				else
					frm.style.backgroundColor = csserror;
			}
		}
		if(frmtype == 'email'){
			if (parseInt(frmchars,10) > 0){
				if(frm.value.match(regemail))
					frm.style.backgroundColor = cssok;
				else
					frm.style.backgroundColor = csserror;
			}
		}

		return true;
	}
