function Validate_registration()
	{
		if(getVal('username')=='')
			{
				alert('Please enter the username(Email)');
				document.getElementById('username').focus();
				return false;
			}
			
		
		if(!emailverify(getVal('username')))
			{
				alert('Invalid Username. Username must be an email address');
				document.getElementById('username').focus();
				return false;
			}
			
		
		
		if(getVal('password')=='')
			{
				alert('Please enter the password');
				document.getElementById('password').focus();
				return false;
			}
			
			
		
		if(getVal('password')!=getVal('c_password'))
			{
				alert('The confirmation password does not match');
				document.getElementById('c_password').focus();
				return false;
			}
			
		
		if(getVal('fullname')=='')
			{
				alert('Please enter your fullname');
				document.getElementById('fullname').focus();
				return false;
			}
			
		if(getVal('address')=='')
			{
				alert('Please enter your Address');
				document.getElementById('address').focus();
				return false;
			}
			
		if(getVal('contact')=='')
			{
				alert('Please enter your contact number');
				document.getElementById('contact').focus();
				return false;
			}
		
		
	}
	


//#############################################################################################################

function ValidateCheckout()
	{
		if(getVal('d_name')=='')
			{
				alert('Please enter the name of the person to deliver');
				document.getElementById('d_name').focus();
				return false;
			}
			
		if(getVal('d_address')=='')
			{
				alert('Please enter the address to deliver');
				document.getElementById('d_address').focus();
				return false;
			}
			
		if(getVal('d_mobileno')=='')
			{
				alert('Please enter the contact number of the person to deliver');
				document.getElementById('d_mobileno').focus();
				return false;
			}
			
		if(getVal('d_email')!=''&&!emailverify(getVal('d_email')))
			{
				alert('Invalid Email!');
				document.getElementById('d_email').focus();
				return false;
			}
			
		
		if(getVal('d_extranote')=='')
			{
				var res = confirm('You have not enter your personalized message/delivery date. Continue without personalized message/delivery date?');
				if(!res)
					{
						document.getElementById('d_extranote').focus();
						return false;
					}
			}
		
		
	}
