function SendMail() {
    this.callback = null;
}
SendMail.prototype = new DXMLHttpRequestShell();
SendMail.constructor = SendMail;
SendMail.prototype.onLoad = function() {
    if (this.getResponseText() == "OK") {
        if (this.callback) {
            this.callback();
	    var obj = this;
            setTimeout(function() {
	    	obj.CloseWin();
	    }, 300);
        }
    }
}
SendMail.prototype.send = function(senderText, receiver, messageText) {
    this.init();
  	this.fastPostUrl("sendmail.html", "to=" + receiver + "&subject=" + senderText + "&body=" + messageText + "&sender=" + document.getElementById("sender").value);
	shareWin.close();
}
SendMail.prototype.CloseWin = function() {
	document.getElementById("upload").style.display = "none";
	document.getElementById("flashPlayer").style.visibility = "visible";
	shareWin.close();
	if(document.getElementById("aMsg")) {
		document.getElementById("aMsg").innerHTML = "";
	} else if(document.getElementById("sMsg")) {
		document.getElementById("sMsg").innerHTML = "";
	}
	document.getElementById("message").value = "I found this while doing some wedding research.  Check it out:";
}
