/*
 * JavaScript - Imagem e Visual
 *
 *
 *
 */
function Iniciar() {
	editor.document.designMode = 'On'
	document.forms["formEdit"].onsubmit=function(){	
	document.getElementById("texto").value=editor.document.body.innerHTML
	return true
	}
}
function recortar() {
	editor.document.execCommand('cut', false, null);
}

function copiar() {
	editor.document.execCommand('copy', false, null);
}

function colar() {
	editor.document.execCommand('paste', false, null);
}

function desfazer() {
	editor.document.execCommand('undo', false, null);
}

function refazer() {
	editor.document.execCommand('redo', false, null);
}

function negrito() {
	editor.document.execCommand('bold', false, null);
}

function italico() {
	editor.document.execCommand('italic', false, null);
}

function sublinhado() {
	editor.document.execCommand('underline', false, null);
}

function alinharEsquerda() {
	editor.document.execCommand('justifyleft', false, null);
}

function centralizado()	{
	editor.document.execCommand('justifycenter', false, null);
}

function alinharDireita() {
	editor.document.execCommand('justifyright', false, null);
}
function numeracao() {
	editor.document.execCommand('insertorderedlist', false, null);
}

function marcadores() {
	editor.document.execCommand('insertunorderedlist', false, null);
}

function fonte(fonte) {
if(fonte != '')
	editor.document.execCommand('fontname', false, fonte);
}

function tamanho(tamanho) {
	if(tamanho != '')
	editor.document.execCommand('fontsize', false, tamanho);
}


/*	*/

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center"){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}


