var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
window.onload = function()
{
edit = document.getElementById('edit2').contentWindow.document;
edit.designMode = "on";
}


        window.onload = function () {
        Editor = document.getElementById('edit2').contentWindow.document;
        Editor.designMode = "on";
             // disable CSS in Geko ,IE and opera  
            try {
            // Try new Gecko method
                Editor.execCommand("styleWithCSS", 0, false);
            } catch (e) {
            // Use old method
                try {Editor.execCommand("useCSS", 0, true);} catch (e) {}
            }
           } 
		   function get(tag)
{
	Editor.execCommand(tag,false,null);
}
function smile()
{
	window.open('http://sirburuslan.com/popup/smile.php','Smile','width=670px,height=400px,toolbar=no, location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}
function smil(sm)
{
Editor.execCommand("insertImage",false,sm);	
}
function numi()
{
document.getElementById('preview').innerHTML = 	document.getElementById('input2').value;
}
function mesaj()
{
		if (document.layers){
document.getElementById('tag').value = Editor.body.innerHTML; 
} 
else if(document.all){
document.getElementById('tag').value = Editor.body.innerText;
}
else if (document.getElementById){
document.getElementById('tag').value = Editor.body.innerHTML; 
}
}
