function mto (tld,domain,mailbox,link,subject,body)
{
    result = '<a href="mai' + 'lto:' + escape (mailbox);
    result += '@' + escape (domain + '.' + tld);
    if (subject != '' || body != '') result += '?';
    if (subject != '') result += 'Subject=' + escape (subject);
    if (subject != '' && body != '') result += '&';
    if (body != '') result += 'Body=' + escape (body);
    if (link == '') link = escape (mailbox) + '@' + escape (domain + '.' + tld);
    return result + '">' + link + '</a>';
}

// http://www.dustindiaz.com/getelementsbyclass/ (not currently used)
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

// not used
function rawButtonClick() {
      $('.afdraw').toggle();
}