﻿String.prototype.startsWith = function(str){
	return (this.match("^"+str)==str)
}
String.prototype.trim = function(){
	return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, ""))
}
String.prototype.endsWith = function(str){
	return (this.match(str+"$")==str)
}
function initSendFeaturedSpeech(result) {
	$(":hidden#emailPDFID").val(result.ID.toString());
	if (result.Message != "Both") {
		$("#emailPDFFileType").val(result.Message);
		$("tr[id^=emailPDFSelectFiles]", "div#emailPublicationPDF").hide();
	} else {
		$("#emailPDFFileType").val("");
		$("tr[id^=emailPDFSelectFiles]", "div#emailPublicationPDF").show();
	}
	$("#emailPublicationPDF1, a#lnkSendFeaturedSpeech").show();
	$("#emailPublicationPDF2").hide();
	$(":text", "#emailPublicationPDF1").val("");
	$("#emailPublicationComments").val("");
	$("#emailPublicationPDFError").text("");
	$(":input", "table#tblEmailPublicationPDF")[0].focus();
}