$(function(){

});

function checkValues(fields){
	for(var i=0; i<fields.length ;i++){
		if($(fields[i]).attr('type')=="checkbox"){
			var isLeeg = true;
			for(var j=0; j<fields[i].length; j++){
				if(fields[i][j].checked==true){
					isLeeg = false;
				}
			}
			if(isLeeg){
				$(fields[i]).parent('td').css("background-color","red").click(function(){$(this).css("background-color","transparent")});
				return false;
			}
		}else{
			if(fields[i].value==""){
				$(fields[i]).focus();
				$(fields[i]).css("background-color","red").click(function(){$(this).css("background-color","transparent")});;
				return false;
			}else{
				$(fields[i]).css("background-color","transparent");
			}
		}
	}
	return true;
}