function writeEmail(strRecipient, strDomain) { var strAt = '@'; if (typeof(strDomain) == "undefined") strDomain = 'mediadoctor.org.au'; strAddress = strRecipient + strAt + strDomain; document.write('' + strAddress + ''); }