
/*************************************************************************
	PREVIEW script
*************************************************************************/
function preview(content) {
	var obj = document.all["id_preview"];

	// check content
	if(content == "") {
		obj.innerHTML = "";
		return;
	}

	var text = "";
	text =  "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
	text += "    <tr>";
	text += "        <td>";
	text += "            <table width='100%' border='0' cellspacing='0' cellpadding='0'>";
	text += "                <tr>";
	text += "                    <td><img src='/images/vbox_tl3.gif' width='35' height='25'></td>";
	text += "                </tr>";
	text += "            </table>";
	text += "            <table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>";
	text += "                <tr>";
	text += "                    <td height='8' width='8'><img src='/images/vbox_tl.gif' width='8' height='8'></td>";
	text += "                    <td background='/images/vbox_tbg.gif'>";
	text += "                        <img src='/images/vbox_tl2.gif' width='27' height='8'></td>";
	text += "                    <td height='8' width='8'><img src='/images/vbox_tr.gif' width='8' height='8'></td>";
	text += "                </tr>";
	text += "                <tr>";
	text += "                    <td background='/images/vbox_ml.gif'></td>";
	text += "                    <td background='/images/vbox_bg.gif' style='word-break:break-all;'>" + content + "</td>";
	text += "                    <td background='/images/vbox_mr.gif'></td>";
	text += "                </tr>";
	text += "                <tr>";
	text += "                    <td height='5' width='8'><img src='/images/vbox_bl.gif' width='8' height='5'></td>";
	text += "                    <td background='/images/vbox_bbg.gif'></td>";
	text += "                    <td height='5' width='8'><img src='/images/vbox_br.gif' width='8' height='5'></td>";
	text += "                </tr>";
	text += "            </table>";
	text += "        </td>";
	text += "    </tr>";
	text += "</table>";

	obj.innerHTML = text;
	move_preview();
	obj.style.visibility = "visible";
}

function move_preview() {
	var obj = document.all["id_preview"];

	if(obj.innerHTML != "") {
		obj.style.posLeft = event.x - 40 + document.body.scrollLeft;
		obj.style.posTop = event.y + 10 + document.body.scrollTop;
	}
}

function hide_preview() {
	document.all["id_preview"].style.visibility = "hidden";
}
