 		jQuery(document).ready(function() {
 			countChar($("#project_description").val());
 		});
+		function disableMarkdown(){
+			var txt=$("#project_description").val();
+			txt='<nomd>\n'  + txt + '\n</nomd>';
+			$("#project_description").val(txt);
+		}
+		function enableMarkdown(){
+			var txt=$("#project_description").val();
+			txt=txt.replace(/<nomd>\n/g,"");
+			txt=txt.replace(/\n<\/nomd>/g,"");
+			$("#project_description").val(txt);
+		}
+		function editMD (eid) {
+			var guts = "/info/mdeditor.cfm?eid=" + eid;
+			$("<iframe src='" + guts + "' id='dialog' class='popupDialog' style='width:600px;height:600px;'></iframe>").dialog({
+				autoOpen: true,
+				closeOnEscape: true,
+				height: 'auto',
+				modal: true,
+				position: ['center', 'center'],
+				title: 'Edit MarkDown',
+					width:1200,
+		 			height:800,
+				close: function() {
+					$( this ).remove();
+				}
+			}).width(1200-10).height(800-10);
+			$(window).resize(function() {
+				$(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
+			});
+			$(".ui-widget-overlay").click(function(){
+			    $(".ui-dialog-titlebar-close").trigger('click');
+			});
+		}
 	</script>
-
 
 	<cfoutput>
 		<strong>Edit Project</strong> <a href="/ProjectDetail.cfm?project_id=#project_id#">[ Detail Page ]</a>

						</td>
					</tr>
				</table>
				<label for="project_description" class="likeLink" onClick="getDocs('project','description')">Description
					<span id="chrcnt" class="redBorder">Minimum 100 characters to show up in search.</span></label>
				<textarea name="project_description" id="project_description" cols="80" rows="6" onkeyup="countChar(this.value)">#proj.project_description#</textarea>
				<label for="project_remarks">Remarks</label>
				<textarea name="project_remarks" id="project_remarks" cols="80" rows="3">#proj.project_remarks#</textarea>
				<a name="agent"></a>

				-not deleteable-
			</cfif>
		</form>

		<p>
			<a href="Project.cfm?action=getCSV&project_id=#project_id#">download summary</a>
		</p>
