
function doBold(){

document.execCommand("bold", false, null);
//document.getElementById('page_txt').focus()

}

function doCenter(){

document.execCommand('justifycenter', false, null);

}

function doBullet(){

document.execCommand('insertunorderedlist', false, null);

}
function doItalic(){

document.execCommand('italic',false, null);

}

function doLink(){
var urlLink = prompt('Enter url link', '');
if(urlLink != null){
document.execCommand('createlink',false, urlLink);
}
}
function doUnLink(){

document.execCommand('unlink',false, null);

}
function doImage(){

var imgSrc = prompt('Enter image location', '');

if(imgSrc != null)

document.execCommand('insertimage', false, imgSrc);

}

function doRule(){

document.execCommand('inserthorizontalrule', false, null);

}
function doUnderline(){

document.execCommand('underline', false, null);

}
function doHead(hType){

if(hType != '')

{

document.execCommand('formatblock', false, hType);

doFont(selFont.options[selFont.selectedIndex].value);

}

}

function getTxt(){
//document.getElementById("page_txt").innerHTML.focus();

}


function insertSmiley(smiley)
    {
        var currentText = document.getElementById("page_txt");
        var smileyWithPadding = "<img src=\"public/images/gifts/" + smiley + "\" align=\"left\" style=\"margin-right:10px;height:50px\"/>";
        currentText.innerHTML += smileyWithPadding;
        currentText.focus();
        document.getElementById("gift_div").style.display="none";
        
    } 
function doGift(){
document.getElementById("gift_div").style.display="block";
}
