I put this together from some other scripts I am using on a site. I'm
trying to make a better email hiding script. It isn't working. Also, it
causes Internet Explorer 6 SP2 to block the script as "active content". :(
The idea is that if the user doesn't have JavaScript enabled, they will see
an image of the email address (that can't be read by email harvesting
programs). If JavaScript is enabled, the image will be hidden and the
javascript will generate the email address in an "mailto:" link text.
<script language=javascript>
<!--
var name = "contact"
var domain = "mysite.com"
document.write("Email: " + name + "@" + domain) // this is going to be
changed to a href=mailto: link...
// hides email image below if JavaScript is enabled
var obj;
obj = document.getElementById("email");
obj.style.display = "none";
//-->
</script>
<div id="email" style="display: inline;">
<img src="images/email.gif" alt="Email address" />
</div>