
		function isImageUploadFormValid(){
			var image=document.imageUploadForm.txtFileName.value;
			var caption=document.imageUploadForm.caption.value;
			var camera=document.imageUploadForm.camera.value;
			var location=document.imageUploadForm.location.value;
			
			if (image.length == 0){
			 	alert("Please enter an image");
			 	return false;
			}			 
			if (caption.length == 0){
			 	alert("Please enter caption of the image");
			 	document.imageUploadForm.caption.focus();
			 	return false;
			}			 
			if (camera.length == 0){
			 	alert("Please enter the camers details used to click this image.");
			 	document.imageUploadForm.camera.focus();
			 	return false;
			}		
			if (location.length == 0){
			 	alert("Please enter the location details for this image.");
			 	document.imageUploadForm.location.focus();
			 	return false;
			}			 
			return true;
			
		}
		function submitImageFormData() {
			if(isImageUploadFormValid()) {
				document.getElementById("submitbutton").style.display="none";
				var submitdiv=document.getElementById("submitdiv");
				var loading=document.createElement("span");
				loading.innerHTML="<b>Loading... please do not refresh or leave the page until the picture is loaded.</b>"
				submitdiv.appendChild(loading);
				submitdiv.appendChild(imageloading);
				return true; 
			}
			else{
				return false;
			}
		}
			function isLoginFormValid(){
				var emailAddress=document.loginForm.email.value;
				var password=document.loginForm.password.value;
				if (emailAddress.length == 0){
				 	alert("Required information is missing. Please enter your email id.");
				 	document.loginForm.email.focus();
				 	return false;
				}			 
				if (password.length == 0){
				 	alert("Required information is missing. Please enter your password.");
				 	document.loginForm.password.focus();
				 	return false;
				}
				return true;
			}
		function submitLoginData() {
				
			if(isLoginFormValid()) {
				return true; 
			}
			else{
				return false;
			}
		}


		function submitRegistrationData() {
			if(isRegistrationFormValid()) {
				return true; 
			}
			else{
				return false;
			}
		}
			function isRegistrationFormValid(){
				
				var email=document.registrationForm.email.value;
				var password=document.registrationForm.password.value;
				var password2=document.registrationForm.password2.value;
				var name=document.registrationForm.name.value;
				var dob=document.registrationForm.dob.value;
				var occupation=document.registrationForm.occupation.value;
				var streetAdress=document.registrationForm.streetAdress.value
				var city=document.registrationForm.city.value;
				var pincode=document.registrationForm.pincode.value;
				var phone=document.registrationForm.phone.value;
				var mobile=document.registrationForm.mobile.value;
				var checkbox=document.registrationForm.tnc.checked
				if (email.length == 0){
				 	alert("Required information is missing. Please enter your email id.");
				 	document.registrationForm.email.focus();
				 	return false;
				}			 
				if (password.length == 0){
				 	alert("Required information is missing. Please enter your password.");
				 	document.registrationForm.password.focus();
				 	return false;
				}
				if (password2.length == 0){
				 	alert("Required information is missing. Please re-enter your password.");
				 	document.registrationForm.password2.focus();
				 	return false;
				}
				if (name.length == 0){
				 	alert("Required information is missing. Please enter your name.");
				 	document.registrationForm.name.focus();
				 	return false;
				}
				if (dob.length == 0){
				 	alert("Required information is missing. Please enter your date of birth.");
				 	document.registrationForm.dob.focus();
				 	return false;
				}
				if (occupation.length == 0){
				 	alert("Required information is missing. Please enter your occupation.");
				 	document.registrationForm.occupation.focus();
				 	return false;
				}
				if (streetAdress.length == 0){
				 	alert("Required information is missing. Please enter your street Address.");
				 	document.registrationForm.streetAdress.focus();
				 	return false;
				}
				if (city.length == 0){
				 	alert("Required information is missing. Please enter your city.");
				 	document.registrationForm.city.focus();
				 	return false;
				}
				if (pincode.length == 0){
				 	alert("Required information is missing. Please enter your pincode.");
				 	document.registrationForm.pincode.focus();
				 	return false;
				}
				if (phone.length == 0){
				 	alert("Required information is missing. Please enter your phone number.");
				 	document.registrationForm.phone.focus();
				 	return false;
				}
				if (mobile.length == 0){
				 	alert("Required information is missing. Please enter your mobile number.");
				 	document.registrationForm.mobile.focus();
				 	return false;
				}
				if(checkbox==false){
				 	alert("You need to accept terms and conditions to register. Please check the box below");
				 	document.registrationForm.tnc.focus();
				 	return false;				 
				 }
				return true;
			}		
			
