function registrationValidateForm(){

		 if(checkEmpty("tb_username", "Enter the Username"))
		{	
			return false;
		} 
		else if(checkUsername("tb_username","6"))
		{
			return false;	
		}
		else if(checkEmpty("tb_pass", "Enter the Password"))
		{	
			return false;
		}
		else if(checkPassword("tb_pass","6"))
		{
			return false;	
		}
		else if(checkEmpty("tb_cpass", "Re-Type your password"))
		{	
			return false;
		}
		else if(checkPass())
		{
				showErrorMesasge("Your Passwords did not Match.");
				document.getElementById("tb_pass").focus();
			return false;
		} 	
		else if(checkEmpty("tb_fname", "First Name is Missing"))
		{												
			return false;
		} 
		else if(checkEmpty("tb_lname", "Last Name is Missing"))
		{												
			return false;
		} 
		else if(checkEmpty("tb_email", "Enter the Email Address"))
		{	
			return false;
		} else if(validEmail("tb_email", "Email Address is Not Valid"))
		{	
			return false;
		}
		else if(checkEmpty("tb_phone", "Enter the Phone Number."))
		{	
			return false;
		}
		else if(checkEmpty("tb_mobile", "Enter the Mobile Phone."))
		{												
			return false;
		} 
		else if(checkEmpty("tb_city", "Enter the City."))
		{												
			return false;
		}
		else if(checkSelectBox("ddl_country", "Select the Country."))
		{	
			return false;
		} 
		else if(checkSelectBox("ddl_province", "Select the Province."))
		{	
			return false;
		} 
		else if(checkEmpty("tb_address", "Enter the Address Information."))
		{												
			return false;
		} 
		else 
		{	
			return true;
		}

	}
	
function checkPass(){
						var p1 = document.getElementById("tb_pass").value;
						var p2 = document.getElementById("tb_cpass").value;
						if(p1 != p2)
						{
							document.getElementById("tb_pass").value="";
							document.getElementById("tb_cpass").value="";
							return true;													
						}
							
					}
							
function registrationUsername()
{
	 if(checkEmpty("tb_username", "Enter the Username"))
		{	
			return true;
		} 
		else if(checkUsername("tb_username","6"))
		{
			return true;	
		}
		else
		{
			return false;	
		}
}
function validateCode()
{

	if(checkEmpty("tb_code", "Enter the Varification Code."))
	{	
		return false;	
	}
	else 
	{	
		return true;
	}
}

function Login_validateForm(){
	var div = document.getElementById('msg');
	div.style.display='none';
	if(checkEmpty("tb_username", "Enter the Username."))
	{	
		return false;
	}
	else if(checkEmpty("tb_password", "Enter the Password."))
	{	
		return false;
	}
	else 
	{	
		return true;
	}
}


function updateProfile(){
		
		if(checkEmpty("tb_fname", "First Name is Missing"))
		{												
			return false;
		} 
		else if(checkEmpty("tb_lname", "Last Name is Missing"))
		{												
			return false;
		} 
		else if(checkEmpty("tb_email", "Enter the Email Address"))
		{	
			return false;
		} else if(validEmail("tb_email", "Email Address is Not Valid"))
		{	
			return false;
		}
		else if(checkEmpty("tb_phone", "Enter the Phone Number."))
		{	
			return false;
		}
		else if(checkEmpty("tb_mobile", "Enter the Mobile Phone."))
		{												
			return false;
		} 
		else if(checkSelectBox("ddl_country", "Select the Country."))
		{	
			return false;
		} 
		else if(checkSelectBox("ddl_province", "Select the Province."))
		{	
			return false;
		} 
		else if(checkEmpty("tb_address", "Enter the Address Information."))
		{												
			return false;
		} 
		else 
		{	
			return true;
		}

	}
	
function changePassword_validateForm()
{
		if(checkEmpty("tb_oldPass", "Enter Old Password.")){	
			return false;
		} else if(checkEmpty("tb_pass", "Enter the New Password")){	
			return false;
		} else if(checkEmpty("tb_cpass", "Re-Type your new password")){	
			return false;
		} else if(checkPass2()){
				showErrorMesasge("Your Passwords did not Match.");
				document.getElementById("tb_pass").focus();
				
			return false;
		}
		 else
		{	
			return true;
		}		
}
function checkPass2()
{
	var p1 = document.getElementById("tb_pass").value;
	var p2 = document.getElementById("tb_cpass").value;
	if(p1 != p2){
		document.getElementById("tb_pass").value="";
		document.getElementById("tb_cpass").value="";
		return true;													
		}
}	

/*
function updateProfile_validateForm(){
							 if(checkEmpty("tb_fname", "First Name is Missing"))
							{												
								return false;
							} 
							else if(checkEmpty("tb_lname", "Last Name is Missing"))
							{												
								return false;
							} 
							else if(checkEmpty("tb_street", "Enter the Street."))
							{												
								return false;
							}
							else if(checkEmpty("tb_city", "Enter the City."))
							{												
								return false;
							} 
							else if(checkEmpty("tb_state", "Enter the Provice/State."))
							{												
								return false;
							} 
							 else if(checkEmpty("tb_code", "Enter the Postal/Zip Code."))
							{	
								return false;
							} 
							else if(checkSelectBox("s_country", "Select the Country."))
							 {	
								return false;
							} 
							else if(checkEmpty("tb_phone", "Enter the Phone Number."))
							{	
								return false;
							}
							else 
							{	
								return true;
							}

						}
function changePassword_validateForm()
{
		if(checkEmpty("old_pass", "Enter Old Password.")){	
			return false;
		} else if(checkEmpty("new_pass1", "Enter the New Password")){	
			return false;
		} else if(checkEmpty("new_pass2", "Re-Type your new password")){	
			return false;
		} else if(checkPass2()){
				showErrorMesasge("Your Passwords did not Match.");
				document.getElementById("new_pass1").focus();
				
			return false;
		}
		 else
		{	
			return true;
		}		
}
function checkPass2()
{
	var p1 = document.getElementById("new_pass1").value;
	var p2 = document.getElementById("new_pass2").value;
	if(p1 != p2){
		document.getElementById("new_pass1").value="";
		document.getElementById("new_pass2").value="";
		return true;													
		}
}	




function check_option(str)
{
	if(str == 0)
	{
		document.getElementById('s_fname').disabled=false;
		document.getElementById('s_lname').disabled=false;
		document.getElementById('s_country').disabled=false;
		document.getElementById('s_code').disabled=false;
		document.getElementById('s_province').disabled=false;
		document.getElementById('s_city').disabled=false;
		document.getElementById('s_apartment').disabled=false;
		document.getElementById('s_street').disabled=false;
		document.getElementById('s_company').disabled=false;
		document.getElementById('s_phone').disabled=false;
		document.getElementById('s_email').disabled=false;	
		document.getElementById('shipment_td').style.backgroundColor='#E8E8E8';	
	}
	else if(str == 1)
	{
		document.getElementById('s_fname').disabled=true;
		document.getElementById('s_lname').disabled=true;
		document.getElementById('s_country').disabled=true;
		document.getElementById('s_code').disabled=true;
		document.getElementById('s_province').disabled=true;
		document.getElementById('s_city').disabled=true;
		document.getElementById('s_apartment').disabled=true;
		document.getElementById('s_street').disabled=true;
		document.getElementById('s_company').disabled=true;
		document.getElementById('s_phone').disabled=true;
		document.getElementById('s_email').disabled=true;
		document.getElementById('shipment_td').style.backgroundColor='#E8E8E8';
	}
}

function check_validateForm(){
	if(checkEmpty("b_fname", "First Name Field Left Blank in Billing Information")){	
		return false;	
	}else if(checkEmpty("b_lname", "Last Name Field Left Blank in Billing Information")){	
		return false;
	}else if(checkSelectBox("b_country", "Select Country in Billing Information")){	
		return false;
	}else if(checkEmpty("b_code", "Zip/Postal Code Empty in Billing Information")){	
		return false;
	}else if(checkSelectBox("b_province", "Select Province/State in Billing Information")){	
		return false;
	}else if(checkEmpty("b_city", "City Field Left Blank in Billing Information")){	
		return false;
	}else if(checkEmpty("b_street", "Street Field Left Blank in Billing Information")){	
		return false;
	}else if(checkEmpty("b_phone", "Phone No. Left Blank in Billing Information")){	
		return false;
	}else if(checkEmpty("b_email", "Email Field Left Blank in Billing Information")){	
		return false;
	}else{
		if(document.getElementById("new").checked==true){
			if(checkEmpty("s_fname", "First Name Field Left Blank in Billing Information")){	
				return false;	
			}else if(checkEmpty("s_lname", "Last Name Field Left Blank in Billing Information")){	
				return false;
			}else if(checkSelectBox("s_country", "Select Country in Billing Information")){	
				return false;
			}else if(checkEmpty("s_code", "Zip/Postal Code Empty in Billing Information")){	
				return false;
			}else if(checkSelectBox("s_province", "Select Province/State in Billing Information")){	
				return false;
			}else if(checkEmpty("s_city", "City Field Left Blank in Billing Information")){	
				return false;
			}else if(checkEmpty("s_street", "Street Field Left Blank in Billing Information")){	
				return false;
			}else if(checkEmpty("s_phone", "Phone No. Left Blank in Billing Information")){	
				return false;
			}else if(checkEmpty("s_email", "Email Field Left Blank in Billing Information")){	
				return false;
			}else{
				return true;				
			}	
		}else{
			return true;
		}
	}
}
*/
