username and domain at login.html

Hi all,

Currently at my login.html, i have username and password. The policy at here, i have to put username with the domain. Ex: hotspot@mycompany.com.
My question how to separate the username and the domain? i already try this code, but it doesn’t work. this is my code:

//at function doLogin:
function doLogin() {
document.sendin.username.value = document.login.username.value + ‘@’ + document.login.domain.value;
document.sendin.password.value = hexMD5(‘$(chap-id)’ + document.login.password.value + ‘$(chap-challenge)’);
document.sendin.submit();
return false;
}

//at the html (look at the bold text)

login : ****@ **
password :
 

If anyone can help why this script doesn’t work

Regards,
lamson