// hemlink.js - *h*idden *em*ail link scripts
// Copyright (C) 2002 by John Cardinal. All rights reserved.
// Used with permission.

// <SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript" SRC="hemlink.js"></SCRIPT>
// <SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript">
// <!-- hide
//   hemcontext='Tarrant site (index.htm)';
// // unhide -->
// </SCRIPT>
//
// Usage:
// <a href="JavaScript:hemlink('hertz','isomedia.com');">Barbara Zanzig</a>
// <a href="JavaScript:hemlinkws('RegionContact','ega-gpr.org', 'Query');">
//     Region contact</a>



// This declaration is also an example of the declaration needed in the pages where
// this is used.
var hemcontext = '';    // Used by local page to set context for hem()

// *w*ith *s*ubject
function hemlinkws(part1, part2, subject) {
        var loc = '';


        loc = 'M'+"A"+"I"+"L"+"T"+"O:";
        loc = loc + part1+"@"+part2;
        if (subject != '') loc = loc+'?SUBJECT='+subject;
        location.href=loc;
}

// subject set in hemcontext
function hemlink(part1, part2) {
	var loc = '';

	loc = 'M'+"A"+"I"+"L"+"T"+"O:";
	loc = loc + part1+"@"+part2;
	if (hemcontext != '') loc = loc+'?SUBJECT='+hemcontext;
	location.href=loc;
}

// *n*o *c*ontext
function hemlinknc(part1, part2) {
	var loc = '';

	loc = 'M'+"A"+"I"+"L"+"T"+"O:";
	loc = loc + part1+"@"+part2;
	location.href=loc;
}

// *w*ith *s*ubject
function hemlinkws(part1, part2, subject) {
        var loc = '';


        loc = 'M'+"A"+"I"+"L"+"T"+"O:";
        loc = loc + part1+"@"+part2;
        if (subject != '') loc = loc+'?SUBJECT='+subject;
        location.href=loc;
}

