		
		
		
		
		
		
		
		function cancel()
		{
	 		document.forms[0].action='coolestStartupHome.do';
	 		document.forms[0].method.value='fetch';
	 		document.forms[0].businessFn.value='homePageRecentNominations';
			document.forms[0].submit();
	 	}
		
		function signUp()
			{
				var objChkPolicy=document.getElementById('chkPrivacyPolicy') ;
				var bool = validateForm();
				//alert(bool);
				if(bool)
				
				{	
				   if(objChkPolicy.checked){		
				   	document.forms[0].businessFn.value='startupsignmeup';	
					document.forms[0].submit();
					
					}else{
					alert("To successfully register with NEN Coolest Startups, please check the box. I have read and accepted NEN Coolest Startups privacy policy.");
					//return false;
					}
				}
			}
			
			 function updateRegisterForm()
			{	
			var emailId = document.forms[0].txtCurrEmailId;
			var password = document.forms[0].txtUserPassword;
			var confirmpass = document.forms[0].txtReEntPass;
			var firstname = document.forms[0].txtFirstname;
			var lastname = document.forms[0].txtLastName;
			if(emailId.value == '' || emailId.length == 0)
				{
					alert("Please enter your Email-Id");
					return false;
				}						
				else if(isValidEmail(emailId.value)==false)
				{
					alert("Invalid Email-Id");
					emailId.select();
				 	return false; 
				}
				else if(ValidateMaxMin(emailId,0,50)==false)
				{
					alert("Email-Id should not exceed more than 50 characters");
					emailId.select();
				 	return false; 
				}
				if(password.value == '' || password.length == '0')
				{
					alert("Please enter Password");
					return false;
				}
				else if(password.value.charCodeAt(0)==32)
				{
					alert("First character of Password should not be a space");
					return false;	
				}
				else if (isAlphaNumeric(password.value)==false)
				{
					alert("Password must be alphanumeric");
					password.select();
					return false;
				}
				else if(ValidateMaxMin(password,3,20)==false)
				{
					alert("Password should not be less than 3 or more than 20 characters");
				 	return false; 
				}
				
				if (firstname.value == '' || firstname.length == '0')
				{
					alert("Please enter your first name");
					firstname.focus();
					return false;
				}
				else if(firstname.value.charCodeAt(0)==32)
				{
					alert("First character of FirstName should not be a space");
					firstname.focus();
					firstname.select();
					return false;
				}
				else if(validateFirstName(firstname)==false)
				{
					alert(" First Name accepts only Alphabets");
					firstname.select();
					firstname.focus();
					return false;
				}
				else if(ValidateMaxMin(firstname,0,60)==false)
				{
					alert("FirstName cannot exceed more than 60 characters");
					firstname.select();
				 	firstname.focus(); 
				 	return false; 
				}
				if(lastname.value == '' || lastname.length == '0')
				{
					alert("Please enter your last name");
					lastname.focus();
					return false;
				}
				else if(lastname.value.charCodeAt(0)==32)
				{
					alert("First character of lastname should not be a space");
					lastname.focus();
					lastname.select();
					return false;
				}
				else if(validateFirstName(lastname)==false)
				{
					alert(" Lastname accepts only Alphabets");
					lastname.select();
					lastname.focus();
					return false;
				}
				else if(ValidateMaxMin(lastname,0,60)==false)
				{
					alert("Lastname cannot exceed more than 60 characters");
					lastname.select();
				 	lastname.focus(); 
				 	return false; 
				}
				 
				//city
				
				var objCityId = document.forms[0].cityId;
				var objCtyName = document.forms[0].txtOthCityName;
				if(objCityId.value == '0'){
					if(objCtyName.value == ''){
						alert('Please enter the city you\'re affiliated to ');
						return false;
					}
				}
				
				
				
				//cusomer type
				var custObj = document.forms[0].custTypeCode;
				if (custObj.value == 0)
				{
					alert("Please select the type of user you are. Options are student, faculty, entrepreneur or other.");
					return false;
				}
				else if (custObj.value == 'COTHE')
				{
					var custOtherId = document.forms[0].custTypeOterId;
					if (custOtherId.value == 0)
					{
						alert("Please select your designation in the field 'Others, please specify'");
						return false;
					}
				}
				
			
				
				return true;
				}
	      
	 function validateForm()
			{	
			var emailId = document.forms[0].txtCurrEmailId;
			var password = document.forms[0].txtUserPassword;
			var confirmpass = document.forms[0].txtReEntPass;
			var firstname = document.forms[0].txtFirstname;
			var lastname = document.forms[0].txtLastName;
			if(emailId.value == '' || emailId.length == 0)
				{
					alert("Please enter your Email-Id");
					return false;
				}						
				else if(isValidEmail(emailId.value)==false)
				{
					alert("Invalid Email-Id");
					emailId.select();
				 	return false; 
				}
				else if(ValidateMaxMin(emailId,0,50)==false)
				{
					alert("Email-Id should not exceed more than 50 characters");
					emailId.select();
				 	return false; 
				}
				if(password.value == '' || password.length == '0')
				{
					alert("Please enter Password");
					return false;
				}
				else if(password.value.charCodeAt(0)==32)
				{
					alert("First character of Password should not be a space");
					return false;	
				}
				else if (isAlphaNumeric(password.value)==false)
				{
					alert("Password must be alphanumeric");
					password.select();
					return false;
				}
				else if(ValidateMaxMin(password,3,20)==false)
				{
					alert("Password should not be less than 3 or more than 20 characters");
				 	return false; 
				}
				
				if(confirmpass.value == '' || confirmpass.length == '0')
				{
					alert("Please enter confirm password");
					return false;
				}
	
				if(password.value != confirmpass.value)
				{
					alert("Password mismatch: password entered in both the text boxes should be same ");
					password.select();
					confirmpass.select();
					return false;
				}		
				
				
				if (firstname.value == '' || firstname.length == '0')
				{
					alert("Please enter your first name");
					firstname.focus();
					return false;
				}
				else if(firstname.value.charCodeAt(0)==32)
				{
					alert("First character of FirstName should not be a space");
					firstname.focus();
					firstname.select();
					return false;
				}
				else if(validateFirstName(firstname)==false)
				{
					alert(" First Name accepts only Alphabets");
					firstname.select();
					firstname.focus();
					return false;
				}
				else if(ValidateMaxMin(firstname,0,60)==false)
				{
					alert("FirstName cannot exceed more than 60 characters");
					firstname.select();
				 	firstname.focus(); 
				 	return false; 
				}
				if(lastname.value == '' || lastname.length == '0')
				{
					alert("Please enter your last name");
					lastname.focus();
					return false;
				}
				else if(lastname.value.charCodeAt(0)==32)
				{
					alert("First character of lastname should not be a space");
					lastname.focus();
					lastname.select();
					return false;
				}
				else if(validateFirstName(lastname)==false)
				{
					alert(" Lastname accepts only Alphabets");
					lastname.select();
					lastname.focus();
					return false;
				}
				else if(ValidateMaxMin(lastname,0,60)==false)
				{
					alert("Lastname cannot exceed more than 60 characters");
					lastname.select();
				 	lastname.focus(); 
				 	return false; 
				}
				 
				//city
				
				var objCityId = document.forms[0].cityId;
				var objCtyName = document.forms[0].txtOthCityName;
				if(objCityId.value == '0'){
					if(objCtyName.value == ''){
						alert('Please enter the city you\'re affiliated to ');
						return false;
					}
				}
				
				
				
				//cusomer type
				var custObj = document.forms[0].custTypeCode;
				if (custObj.value == 0)
				{
					alert("Please select the type of user you are. Options are student, faculty, entrepreneur or other.");
					return false;
				}
				else if (custObj.value == 'COTHE')
				{
					var custOtherId = document.forms[0].custTypeOterId;
					if (custOtherId.value == 0)
					{
						alert("Please select your designation in the field 'Others, please specify'");
						return false;
					}
				}
				
				
				
				
			
				return true;
				}
				
			
			function othrCustTypeEnable()
			 {
			 	var custtypeObj = document.forms[0].custTypeCode;	
			 	if (custtypeObj.value == 'COTHE')
				{
					document.forms[0].custTypeOterId.disabled=false;
				}
				else{
					document.forms[0].custTypeOterId.disabled=true;
				}
			 }
	 
			 function othrCityTypeEnable()
			 {
			 	
			 	var citytypeObj = document.forms[0].cityId;	
				if(citytypeObj.value != '0')
				{
					document.forms[0].txtOthCityName.disabled=true;
				}
				else{
					document.forms[0].txtOthCityName.disabled=false;
				}
			 }
	 
			 function  disableCustothrtype(){
			 	document.forms[0].custTypeOterId.disabled = true;
			 }
