﻿//mailscript.js



function mailme(name, text, subject, body) {
    d = "costarvideo";
    e = ".com";
    str = '<a href="mailto:' + name + '@' + d + e
    if (subject != "") {
        str += '?subject=' + subject
        if (body != "") str += "&body=" + body
    }
    str += '">'
    if (text == "") {
        str += name + '@' + d + e
    } else {
        str += text
    }
    str += '</a>'


    document.write(str);
};

//example usage
//mailme('admin','text or graphic to substitute for email','subject','body');
//
