function mirrorSimpleHtml(from, to) {
	document.getElementById(to).innerHTML = document.getElementById(from).value;
}
function mirrorSimpleText(from, to) {
	document.getElementById(to).innerText = document.getElementById(from).value;
}
function beforeDelete(msg) {
	if (msg.length == 0) msg = 'Are you sure you want to delete this content?';
	return confirm(msg);
}

var lastID = '';
var timer;
function show(id) {
	if (lastID == id) {
		clearTimeout(timer);
		document.getElementById(id).style.visibility = 'visible';
	} else {
		if (lastID != '') document.getElementById(lastID).style.visibility = 'hidden';
		document.getElementById(id).style.visibility = 'visible';
		lastID = id;
	}
}

function hide(id) {
	document.getElementById(id).style.visibility = 'hidden';
}

function swapImg(id, img, path) {
	document.getElementById(id).src = path + img;
}