/* =======================================================
Email Spider Stumper v3.1
last modified 13 Oct 2005
Developed by Scott Clark & Kevin Duhe
The Source is available at http://www.clarksco.com/blog/
Copyright 2005 Clark Consulting
======================================================= */
// Adapted by J.G. 14-02-2006

// Example for me@home.com
// "theName" is me
// "theDomain" is home
// "theTLD" is com
// "theExtras" are items such as "?subject=blah". Can be blank.
// "theLink" is the text for the link. Can be blank.

function hideIt(theTLD,theDomain,theName,theExtras,theImage,theLink,theClass) {
var theEmail = theName+"@"+theDomain+"."+theTLD;
if (theName == ""){
        theName = "ERROR";
        theLink = "ERROR";
        myEmail = theName;
        myLink = theLink;
        myImage = theImage;
}else{
        if ((theExtras == "") && (theLink == "")){
                myEmail = theEmail;
                myLink = theEmail;
        }
        if ((theLink == "") && (theExtras != "")){
                myLink = theEmail;
                myEmail = theEmail+theExtras;
        }
        if         ((theLink != "") && (theExtras != "")){
                myLink = theLink;
                myEmail = theEmail+theExtras;
        }
        if         ((theLink != "") && (theExtras == "")){
                myLink = theLink;
                myEmail = theEmail;
        }
        if         (theImage != ""){
                myLink = theImage+theLink;
        }
}
        document.write('<a onfocus="blur()" href=mailto:' + myEmail + ' class="' + theClass + '">' + myLink + '</a>');
}
