function setShippingInfo(isChecked)

{

	//alert(isChecked);

	with (window.document.frmCheckout) {

		if (isChecked) {
			txtShippingtitle.value = hidPaymenttitle.value;
			txtShippingFirstName.value = hidPaymentFirstName.value;

			txtShippingLastName.value  = hidPaymentLastName.value;

			txtShippingAddress1.value  = hidPaymentAddress1.value ;

			//txtShippingAddress2.value  = hidPaymentAddress2.value;

			txtShippingPhone.value     = hidPaymentPhone.value;
			
			
			txtShippingState.value     = hidPaymentState.value;			

			txtShippingCity.value      = hidPaymentCity.value;

			txtShippingPostalCode.value = hidPaymentPostalCode.value ;
txtEmail.value     = hidPaymentLoginEmail.value;

			
			txtShippingtitle.readOnly  = true;

			txtShippingFirstName.readOnly  = true;

			txtShippingLastName.readOnly   = true;

			txtShippingAddress1.readOnly   = true;

			//txtShippingAddress2.readOnly   = true;

			txtShippingPhone.readOnly      = true;
			
			txtEmail.readOnly      = true;

			txtShippingState.readOnly      = true;			

			txtShippingCity.readOnly       = true;

			txtShippingPostalCode.readOnly = true;			

		} else {
			txtShippingtitle.value = '';

			txtShippingFirstName.value = '';

			txtShippingLastName.value  = '';

			txtShippingAddress1.value  = '' ;

			//txtShippingAddress2.value  = '';

			txtShippingPhone.value     = '';
			
			txtEmail.value     = '';

			txtShippingState.value     = '';			

			txtShippingCity.value      = '';

			txtShippingPostalCode.value = '' ;
			txtEmail.value = '' ;
			
			txtShippingtitle.readOnly  = false;
			txtShippingFirstName.readOnly  = false;

			txtShippingLastName.readOnly   = false;

			txtShippingAddress1.readOnly   = false;

			//txtShippingAddress2.readOnly   = false;

			txtShippingPhone.readOnly      = false;
			
			txtEmail.readOnly      = false;

			txtShippingState.readOnly      = false;			

			txtShippingCity.readOnly       = false;

			txtShippingPostalCode.readOnly = false;			

		}

	}

}





function checkShippingAndPaymentInfo()

{

	with (window.document.frmCheckout) {

		if (isEmpty(txtUsername, 'Enter username')) {

			return false;

		}else if (isEmpty(txtPassword, 'Enter password')) {

			return false;

		}else if (txtPassword.value!=txtCPassword.value) {

			alert("password and confirm password fields must match");

			return false;

		}else if (isEmpty(txtShippingFirstName, 'Enter first name')) {

			return false;

		} else if (isEmpty(txtShippingLastName, 'Enter last name')) {

			return false;

		} else if (isEmpty(txtShippingAddress1, 'Enter shipping address')) {

			return false;

		} else if (isEmpty(txtShippingPhone, 'Enter phone number')) {

			return false;
			
		} else if (isEmpty(txtEmail, 'Enter Email-Id')) {

			return false;	

		} else if (isEmpty(txtShippingState, 'Enter shipping address state')) {

			return false;

		} else if (isEmpty(txtShippingCity, 'Enter shipping address city')) {

			return false;

		} else if (isEmpty(txtShippingPostalCode, 'Enter the shipping address postal/zip code')) {

			return false;

		} else if (isEmpty(txtPaymentFirstName, 'Enter first name')) {

			return false;

		} else if (isEmpty(txtPaymentLastName, 'Enter last name')) {

			return false;

		} else if (isEmpty(txtPaymentAddress1, 'Enter Payment address')) {

			return false;

		} else if (isEmpty(txtPaymentPhone, 'Enter phone number')) {

			return false;
			
		} else if (isEmpty(txtPaymentEmail, 'Enter Email-Id')) {

			return false;	

		} else if (isEmpty(txtPaymentState, 'Enter Payment address state')) {

			return false;

		} else if (isEmpty(txtPaymentCity, 'Enter Payment address city')) {

			return false;

		} else if (isEmpty(txtPaymentPostalCode, 'Enter the Payment address postal/zip code')) {

			return false;

		} else {

			return true;

		}

	}

}





function checkShippingAndPaymentInfo_edit()

{

	with (window.document.frmCheckout) {

		if (isEmpty(txtShippingFirstName, 'Enter first name')) {

			return false;

		} else if (isEmpty(txtShippingLastName, 'Enter last name')) {

			return false;

		} else if (isEmpty(txtShippingAddress1, 'Enter shipping address')) {

			return false;

		} else if (isEmpty(txtShippingPhone, 'Enter phone number')) {

			return false;
			
		} else if (isEmpty(txtShippingEmail, 'Enter Email-Id')) {

			return false;	

		} else if (isEmpty(txtShippingState, 'Enter shipping address state')) {

			return false;

		} else if (isEmpty(txtShippingCity, 'Enter shipping address city')) {

			return false;

		} else if (isEmpty(txtShippingPostalCode, 'Enter the shipping address postal/zip code')) {

			return false;

		} else if (isEmpty(txtPaymentFirstName, 'Enter first name')) {

			return false;

		} else if (isEmpty(txtPaymentLastName, 'Enter last name')) {

			return false;

		} else if (isEmpty(txtPaymentAddress1, 'Enter Payment address')) {

			return false;

		} else if (isEmpty(txtPaymentPhone, 'Enter phone number')) {

			return false;
			
		} else if (isEmpty(txtPaymentEmail, 'Enter Email-Id')) {

			return false;	

		} else if (isEmpty(txtPaymentState, 'Enter Payment address state')) {

			return false;

		} else if (isEmpty(txtPaymentCity, 'Enter Payment address city')) {

			return false;

		} else if (isEmpty(txtPaymentPostalCode, 'Enter the Payment address postal/zip code')) {

			return false;

		} else {

			return true;

		}

	}

}







function checkChangePasswordForm()

{

	with (window.document.frmChangePassword) {

		if (isEmpty(txtOldPassword, 'Enter Old Password')) {

			return false;

		} else if (isEmpty(txtPassword, 'Enter Password')) {

			return false;

		} else if (isEmpty(txtRePassword, 'Enter Enter Re Password')) {

			return false;			

		}else if (txtPassword.value != txtRePassword.value) {

				alert('Enter Enter Both Password Field Correctly')

				return false;

		}else {

			return true;

		}

	}

}




