<!--
  
                function setDomain() {
                    var userIdField = document.form1.username;
                    var domainName;
                    if( userIdField != null )
                    {
                        username = userIdField.value;
                        var userId = username;
                        if( username != null ) {
                            var sep = username.lastIndexOf("@");
                            if (sep != -1) {
                                userId = username.substring(0, sep);
                                domainName = username.substring(sep +1);
                                document.form1.username.value = userId;
                            }
                            else {
                                domainName = "nic.in";
                            }
                        }

                        if( domainName == null || (domainName != null && domainName == '') )
                            domainName = "nic.in";
                    }
                    document.form1.domainName.value = domainName;
                }
                
                function handleSubmit() {
                setDomain();
                var targetAction =  "https://mail.nic.in/mail/mauth";
                document.form1.action = targetAction;
                document.form1.submit();
                }
  
// -->