
var kupuSrcElement;
var showSmileyTool;

function launchKupu(showSmileys) {
	
	kupuSrcElement = document.getElementById('kupuSrc');
	kupuwindow = window.open('kupu/kupu.htm','kupuwindow','width=1000,height=600,status=no,resizeable=no,menubar=no,scrollbars=no');
	kupuwindow.showSmileys = showSmileys;
	showSmileyTool = showSmileys;
	
	if (document.getElementById('saveButton')) {
		document.getElementById('saveButton').disabled = true;
	}
	if (document.getElementById('cancelButton')) {
		document.getElementById('cancelButton').disabled = true;
	}
}
function setKupuResult(result) {
	kupuSrcElement.value = result;
	if (document.getElementById('addHtmlBrs')) {
		document.getElementById('addHtmlBrs').checked = false;
	}
}
function closeKupu() {
	if (document.getElementById('saveButton')) {
		document.getElementById('saveButton').disabled = false;
	}
	if (document.getElementById('cancelButton')) {
		document.getElementById('cancelButton').disabled = false;
	}
}


function popup (url) {
	Left = (window.screen.width/2) - 300;
	Top = (window.screen.height/2) - 300;
	var win2 = window.open(url,"","status,height=600,width=600,resizable=yes,left=" + Left + ",top=" + Top + ",screenX=" + Left + ",screenY=" + Top + ",scrollbars=yes");
	win2.focus();
}

