function shortCuts() {
	if (event.ctrlKey != true) return;
	strSelection = document.selection.createRange().text;
	if (event.keyCode == 1) ahrefThis();
	if (event.keyCode == 2) boldThis(2);
	if (event.keyCode == 20) italicThis(2);
	if (event.keyCode == 19) post(1);
	if (event.keyCode == 10) post(0);
	if (event.keyCode == 17) deleteMe();
}

function mailThis() {
	strSelection = document.selection.createRange().text
	if (strSelection == "") document.stuffform.txaBody.focus()
	strHref = prompt("Entrez l'adresse mail :","mailto:")
	if (strHref == null) return;
	document.selection.createRange().text = "<a href=\"" + strHref + "\">" + strSelection + "</a>"
	return;
}


function ahrefThis() {
	strSelection = document.selection.createRange().text
	if (strSelection == "") document.stuffform.txaBody.focus()
	strHref = prompt("Entrez une URl :","http://")
	if (strHref == null) return;
	document.selection.createRange().text = "<a href=\"" + strHref + "\" target=\"_blank\">" + strSelection + "</a>"
	return;
}

function boldThis(from) {
	strSelection = document.selection.createRange().text
	if (strSelection == "") {
		document.stuffform.txaBody.focus()
		if (from == 2) document.stuffform.txaBody.select()
		strSelection = document.selection.createRange().text
		document.selection.createRange().text = strSelection + "<b></b>"
	}	
	else document.selection.createRange().text = "<b>" + strSelection + "</b>"
	return;
}

function italicThis(from) {
	strSelection = document.selection.createRange().text
	if (strSelection == "") {
		document.stuffform.txaBody.focus()
		if (from == 2) document.stuffform.txaBody.select()
		strSelection = document.selection.createRange().text
		document.selection.createRange().text = strSelection + "<i></i>"
	}
	else document.selection.createRange().text = "<i>" + strSelection + "</i>"
	return;
}
function puceThis(from) {
	strSelection = document.selection.createRange().text
	if (strSelection == "") {
		alert("Vous n'avez rien selectionné !!");
	}	
	else document.selection.createRange().text = "<li>" + strSelection + "</li>"
	return;
}