var initial = true;
/*
* boolean (returns true if the form contains all values, 
* and false otherwise)
* checkAddweightForm() using jQuery
* learned from Chris Power's blog example: 
* the function alters the innerHTML of the error div
* and uses jQuery slideUp and slideDown methods for showing
* the error message to the user
*/
function checkAddweightForm()
{
	if($("#weight").val() == "")
	{
		$("#error").slideUp("normal", function()
			{
				$("#error").html("<p>Please enter your weight in kg (30 - 300, e.g., 111.11)!</p>").slideDown("slow");
			}
		);
		
		return false;
	}
	
	if($("#week").val() == "Select")
	{
		$("#error").slideUp("normal", function()
			{
				$("#error").html("<p>Please select the week for which you enter the weight! You must enter the weight for week 1 before you can add other weights. Note: You cannot modify weight of week 1.</p>").slideDown("slow");
			}
		);
		
		
		return false;
	}
	
			
	return true;	
}

