function CheckLoginInfo() { if(IsEmpty('lg_email')) { alert('EMAIL_VALIDATTION'); document.getElementById('lg_email').focus(); return false; } else if(!IsEmail('lg_email')) { alert('INVALID_EMAIL'); document.getElementById('lg_email').focus(); return false; } else if(IsEmpty('lg_password')) { alert('PASSWORD_VALIDATTION'); document.getElementById('lg_password').focus(); return false; } else{ return true; } } function DomainTextboxIsEmpty(id){ var value = document.getElementById(id).value; if(value == 'Nhập các domain cần kiểm tra') return true; return false; } function CheckAllDomain() { if(DomainTextboxIsEmpty('MultiDomains')) { alert('DOMAIN_NAME_VALIDATTION'); document.getElementById('MultiDomains').focus(); return false; } else if(!CheckBoxSelected(document.MultiDomain.MultiDomainExtensions, 'Xin chọn phần mở rộng')) { return false; } else return true; } function CheckAllMultiDomain() { if(IsEmpty('MultiDomains')) { alert('DOMAIN_NAME_VALIDATTION'); document.getElementById('MultiDomains').focus(); return false; } else if(!CheckBoxSelected(document.MultiDomain.MultiDomainExtensions, 'Xin chọn phần mở rộng')) { return false; } else return true; } function CheckAllDomainUserControl() { if(DomainTextboxIsEmpty('DomainNameUserControl')) { alert('DOMAIN_NAME_VALIDATTION'); document.getElementById('DomainNameUserControl').focus(); return false; } else if(!CheckBoxSelected(document.CheckDomainUserControl.DomainExtensions, 'Xin chọn phần mở rộng')) { return false; } else return true; } function CheckAll() { if(IsEmpty('name')) { alert('USERNAME_VALIDATTION'); document.getElementById('name').focus(); return false; } else if(IsEmpty('email')) { alert('EMAIL_VALIDATTION'); document.getElementById('email').focus(); return false; } else if(!IsEmail('email')) { alert('INVALID_EMAIL'); document.getElementById('email').focus(); return false; } else if(IsEmpty('phone')) { alert('PHONE_VALIDATTION'); document.getElementById('phone').focus(); return false; } else if(!IsNumber('phone')) { alert('PHONE_NUMBER_ERROR_VALIDATTION'); document.getElementById('phone').focus(); return false; } //else if(!MatchValue('email', 'email2')) // { // alert('MATCH_EMAIL_VALIDATTION'); // document.getElementById('email2').focus(); // return false; // } else if(IsChecked('cb_register') && IsEmpty('password')) { alert('PASSWORD_VALIDATTION'); document.getElementById('password').focus(); return false; } else if(IsChecked('cb_register') && !MatchValue('password', 'password2')) { alert('MATCH_PASSWORD_VALIDATTION'); document.getElementById('password').focus(); return false; } //else if(IsEmpty('address')) // { // alert('ADDRESS_VALIDATTION'); // document.getElementById('address').focus(); // return false; // } else{ return true; } } function CheckAllWithoutCB() { if(IsEmpty('name')) { alert('USERNAME_VALIDATTION'); document.getElementById('name').focus(); return false; } else if(IsEmpty('email')) { alert('EMAIL_VALIDATTION'); document.getElementById('email').focus(); return false; } else if(!IsEmail('email')) { alert('INVALID_EMAIL'); document.getElementById('email').focus(); return false; } else if(IsEmpty('phone')) { alert('PHONE_VALIDATTION'); document.getElementById('phone').focus(); return false; } else if(!IsNumber('phone')) { alert('PHONE_NUMBER_ERROR_VALIDATTION'); document.getElementById('phone').focus(); return false; } else if(IsEmpty('password')) { alert('PASSWORD_VALIDATTION'); document.getElementById('password').focus(); return false; } else if(!MatchValue('password', 'password2')) { alert('MATCH_PASSWORD_VALIDATTION'); document.getElementById('password').focus(); return false; } else{ return true; } } function OptInSubmitAction() { document.frmOptin.email.value = document.getElementById('email').value; document.frmOptin.name.value = document.getElementById('name').value; document.frmOptin.submit() ; }