
function bold_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("Bold", false, null);
}

function Italic_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("Italic", false, null);
}

function Underline_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("Underline", false, null);
}

function cut_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("Delete", false, null);
}

function large_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
var fntsize = document.queryCommandValue("fontsize")
fntsize++
document.execCommand("Fontsize", false, fntsize);
}

function small_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
var fntsize = document.queryCommandValue("fontsize")
fntsize = fntsize-1
document.execCommand("Fontsize", false, fntsize);
}

function link_it() {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("createlink", true, null);
}

function doImage() 
{ 
var imgSrc = prompt('Enter image location', ''); 

if(imgSrc != null) 
document.execCommand('insertimage', false, imgSrc); 
} 



function Image_it() {
var sel = document.selection.createRange();
var str = document.selection.createRange().text;

if (str==0)
{
	alert("Please Select some Text to Replace");
}
else
	{
	var apicture
	document.execCommand("InsertImage", true, apicture);
	}
}

function print_it() {
document.execCommand("Print", true, null);
}

function font_it(selected_font) {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("fontname", false, selected_font);
}

function colour_it(selected_font) {
var str = document.selection.createRange().text;
var sel = document.selection.createRange();
document.execCommand("forecolor", false, selected_font);
}

