//+----------------------------------------------------------------------------+
//| Copyright 2005, Dipl. eng. Andri Ivin.                                     |
//| Unauthorized copying of this script or any part of this script prohibited. |
//| Contact: andri.ivin@mail.ee                                                |
//+----------------------------------------------------------------------------+
function createOutput() {
	var output_table_width = 530;
	document.write('<TABLE WIDTH="'+output_table_width+'px" CELLPADDING="0px" CELLSPACING="0px" BORDER="0px">');
	//-- TOP --
	document.write('<TR>');
	document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/blank_output_top_left.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD HEIGHT="5px" BACKGROUND="bgimages/blank_output_top_center.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/blank_output_top_right.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('</TR>');
	//-- MIDDLE --
	document.write('<TR>');
	document.write('<TD WIDTH="10px" HEIGHT="30px" BACKGROUND="bgimages/output_down_left.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD BACKGROUND="bgimages/output_down_center.gif" ALIGN="RIGHT" VALIGN="MIDDLE">');
	//Write
	document.write('<IMG SRC="buttons/button_write_move_on.gif" BORDER="0" NAME="button_write_move0" ONMOUSEDOWN="swapButtonImage(\'button_write_move0\',\'buttons/button_write_move_down.gif\');" ONMOUSEUP="swapButtonImage(\'button_write_move0\',\'buttons/button_write_move_on.gif\');openCloseInputWindow(true);">');
	document.write('</TD>');
	document.write('<TD WIDTH="10px" HEIGHT="30px" BACKGROUND="bgimages/output_down_right.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('</TR>');
	//-- BOTTOM --
	document.write('<TR>');
	document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/output_bottom_left.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD HEIGHT="5px" BACKGROUND="bgimages/output_bottom_center.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/output_bottom_right.gif">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('</TR>');
	//-- SPACE --
	document.write('<TR>');
	document.write('<TD HEIGHT="15px">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD HEIGHT="15px">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('<TD HEIGHT="15px">');
	document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
	document.write('</TD>');
	document.write('</TR>');
	document.write('</TABLE>');

	for (k=1; k < string_MySQL.length; k++) {
		document.write('<TABLE WIDTH="'+output_table_width+'px" CELLPADDING="0px" CELLSPACING="0px" BORDER="0px">');
		document.write('<TR>');
		document.write('<TD WIDTH="10px" HEIGHT="7px" BACKGROUND="bgimages/output_top_left.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD HEIGHT="7px" BACKGROUND="bgimages/output_top_center.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD WIDTH="10px" HEIGHT="7px" BACKGROUND="bgimages/output_top_right.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		// OUTPUT AREA BEGIN --
		document.write('<TR>');
		document.write('<TD WIDTH="10px" BACKGROUND="bgimages/output_left.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD BGCOLOR="#F0E9F5" ALIGN="CENTER">');
			document.write('<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">');
			document.write('<TR>');
			document.write('<TD HEIGHT="20px" ALIGN="RIGHT">');
			document.write('<FONT class="timetext">');
			//## OUTPUT Time ##
			document.write(time[k]);
			//
			document.write('</FONT>');
			document.write('</TD>');
			document.write('</TR>');
			document.write('<TR>');
			document.write('<TD>');
			//##### OUTPUT Text #####
			document.write(string_output[k]);
			//
			document.write('</TD>');
			document.write('</TR>');
			document.write('</TABLE>');
			document.write('</TD>');
		document.write('<TD WIDTH="10px" BACKGROUND="bgimages/output_right.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		//-- OUTPUT AREA END --
		document.write('<TR>');
		document.write('<TD WIDTH="10px" HEIGHT="9px" BACKGROUND="bgimages/output_middle_left.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD HEIGHT="9px" BACKGROUND="bgimages/output_middle_center.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD WIDTH="10px" BACKGROUND="bgimages/output_middle_right.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		document.write('<TR>');
		document.write('<TD WIDTH="10px" HEIGHT="30px" BACKGROUND="bgimages/output_down_left.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD BACKGROUND="bgimages/output_down_center.gif" ALIGN="RIGHT" VALIGN="MIDDLE">');
		//Adjust nr
		document.write('<IMG SRC="buttons/button_quote_on.gif" BORDER="0" NAME="button_quote'+k+'" ONMOUSEDOWN="swapButtonImage(\'button_quote'+k+'\',\'buttons/button_quote_down.gif\');" ONMOUSEUP="swapButtonImage(\'button_quote'+k+'\',\'buttons/button_quote_on.gif\');openInputWindow('+k+');">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" WIDTH="2px" BORDER="0">');
		//Adjust nr
		document.write('<IMG SRC="buttons/button_write_move_on.gif" BORDER="0" NAME="button_write_move'+k+'" ONMOUSEDOWN="swapButtonImage(\'button_write_move'+k+'\',\'buttons/button_write_move_down.gif\');" ONMOUSEUP="swapButtonImage(\'button_write_move'+k+'\',\'buttons/button_write_move_on.gif\');openCloseInputWindow(true);">');
		document.write('</TD>');
		document.write('<TD WIDTH="10px" HEIGHT="30px" BACKGROUND="bgimages/output_down_right.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		document.write('<TR>');
		document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/output_bottom_left.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD HEIGHT="5px" BACKGROUND="bgimages/output_bottom_center.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD WIDTH="10px" HEIGHT="5px" BACKGROUND="bgimages/output_bottom_right.gif">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		//-- SPACE --
		document.write('<TR>');
		document.write('<TD HEIGHT="15px">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD HEIGHT="15px">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('<TD HEIGHT="15px">');
		document.write('<IMG SRC="bgimages/spacer_1px.gif" BORDER="0">');
		document.write('</TD>');
		document.write('</TR>');
		document.write('</TABLE>');
	}
}

