home *** CD-ROM | disk | FTP | other *** search
/ theapplecollection.com / www.theapplecollection.com.tar / www.theapplecollection.com / spam_vaccine / spam_vaccine.js < prev   
Text File  |  2002-01-18  |  1KB  |  35 lines

  1. <!--
  2.     function spam_vaccine( theHREFArray, theTextArray, theQBulletPath) {
  3.         var theHREF, theText;
  4.         if( theHREFArray.length == 1 ) {
  5.             theHREF = theHREFArray[0] ;
  6.         }
  7.         else if (theHREFArray.length > 1 ) {
  8.             theHREF = "mailto:" + theHREFArray[0] + "@" + theHREFArray[2] + "." + theHREFArray[4] + theHREFArray[3] ;
  9.         }
  10.         else {
  11.             theHREF = "";
  12.         }
  13.         
  14.         if( theTextArray.length == 1 ) {
  15.             theText = theTextArray[0];
  16.         }
  17.         else if (theTextArray.length> 1 ) {
  18.             theText = theTextArray[1] + theTextArray[0] + "@" + theTextArray[2] + "." + theTextArray[4] + theTextArray[3] ;
  19.         }
  20.         else {
  21.             theText = theHREFArray[0] + "@" + theHREFArray[2] + "." + theHREFArray[4] ;
  22.         }
  23.     
  24.         if(theHREF) {
  25.             theText = "<a href=\"" + theHREF + "\" title=\"Email link protected against Spam\">" + theText ;
  26.             if(theQBulletPath) {
  27.                 theText += '<img width="14" height="10" border="0" align="absmiddle" hspace="1" alt="" src="' + theQBulletPath + 'mailto.gif">' ;
  28.             }
  29.             theText += "</a>";
  30.         }
  31.         document.write(theText);
  32.     }
  33.     
  34. -->
  35.