/***************************************************************************
* REGULAR EXPRESSIONS FOR TST-ENABLING A WEBSITE 
*
* Using a text-editor with regular expression support, these
* regular expressions can be used to batch-process the files that make
* up a website, greatly speeding-up the process of adding
* Total Sales Tracking
*
* Author: Richard Knight (RAK)
*  Digital Mail Limited 2005
***************************************************************************/

COPY AND PASTE THE FOLLOWING INTO THE find AND replace FIELDS OF YOUR
REGEXP-ENABLED TEXT EDITOR, WITHOUT INCLUDING THE LINEBREAK AT THE END
OF THE LINE!

===============================================================================

FOR BBEdit, EditPadPro, Adobe Golive AND MultiEdit USING PERL-STYLE REGULAR EXPRESSIONS,
AND OTHER EDITORS THAT USE \N TO REFERENCE TAGGED SUBPATTERNS:

(1) Add the event-handler to links
----------------------------------
Find:
<a (.*?)>

Replace with:
<a \1 onclick="return tst_follow_link(this);">



(2) Add the event-handler to forms
----------------------------------
Find:
<form (.*?)>

Replace with:
<form \1 onclick="tst_submit_form(this);">

===============================================================================

FOR Macromedia Dreamweaver, AND OTHER EDITORS THAT USE $N
TO REFERENCE TAGGED SUBPATTERNS:

(1) Add the event-handler to links
----------------------------------
Find:
<a (.*?)>

Replace with:
<a $1 onclick="return tst_follow_link(this);">



(2) Add the event-handler to forms
----------------------------------
Find:
<form (.*?)>

Replace with:
<form $1 onclick="tst_submit_form(this);">

===============================================================================

FOR MultiEdit USING UNIX-STYLE REGULAR EXPRESSIONS:

(1) Add the event-handler to links
----------------------------------
Find:
\<[a]\ (.@)\>

Replace with:
<a \0 onclick="return tst_follow_link(this);">


(2) Add the event-handler to forms
----------------------------------
Find:
\<form\ (.@)\>

Replace with:
<form \0 onclick="tst_submit_form(this);">

==============================================================================



