function nice_table()
	{
		function str_replace(haystack, needle)
		{ 
			$start = needle.length;
			$end = haystack.length;
			
			return haystack.substring($start,$end);
		} 
		
		$inner = $('.nice_table').html();
		$pattern = /^([^<]+)/;
		
		$table = '<table>';
		$i = 1;
		//$table = $table + '<tr style="background-color: #ABADBC; color:white; font-size:12px; font-weight:bold; padding: 8px 0 8px 5px"><td colspan="2">Техническое описание</td></tr>';
			alert($inner.toSource());
		while($test = $inner.match($pattern))
		{
			alert($test.toSource());
			if($test[1])
			{
				$pattern2 = /^([^\.0-9\u2026]+)[\.\u2026]+([^\.].+)$/;
				if($t = $test[1].match($pattern2))
				{
					if($i == 1)
					{
						$table = $table + '<tr style="background-color: #F1F1F1; color: #484848">';
						$i = 2;
					} else
					{
						$table = $table + '<tr style="background-color: #FFFFFF">';
						$i = 1;
					}
					
					$table = $table + '<td>';
					$table = $table + $t[1] + '</td><td>';
					$table = $table + $t[2] + '</td></tr>';
				}
			}
			
			$inner = str_replace($inner, $test[1]+'<br>');
		};
		
		$table =$table+ '</table>';
		$('.nice_table').html($table);
	}
	
function nice_table_div_style()
	{
		function str_replace(haystack, needle)
		{ 
			$start = needle.length;
			$end = haystack.length;
			
			return haystack.substring($start,$end);
		} 
		
		$inner = $('.nice_table').html();
		$pattern = /<div>([^<]+)/i;
		
		$table = '<table>';
		$i = 1;
		$table = $table + '<tr style="background-color: #ABADBC; color:white; font-size:12px; font-weight:bold; padding: 8px 0 8px 5px"><td colspan="2">Техническое описание</td></tr>';

		while($test = $inner.match($pattern))
		{
			if($test[1])
			{
				$pattern2 = /^([^\.0-9\u2026]+)[\.\u2026]+([^\.].+)$/;
				if($t = $test[1].match($pattern2))
				{
					if($i == 1)
					{
						$table = $table + '<tr style="background-color: #F1F1F1; color: #484848">';
						$i = 2;
					} else
					{
						$table = $table + '<tr style="background-color: #FFFFFF">';
						$i = 1;
					}
					
					$table = $table + '<td>';
					$table = $table + $t[1] + '</td><td>';
					$table = $table + $t[2] + '</td></tr>';
				}
			}

			$inner = str_replace($inner, $test[0]);
		};
		
		$table =$table+ '</table>';
		$('.nice_table').html($table);
	}
