var tmpNews = "";
var MINIMUM_SIZE = 800;

//window.onresize = deleteCells;
//window.onload = deleteCells;

function deleteCells()
{
	var page = basename(window.location.pathname).toLowerCase();;

	if(page == "index.php" || page == "")
	{
		if (document.getElementById('mainTable') &&
			document.getElementById('movedNewsSpan'))
		{
			if (document.body.clientWidth <= MINIMUM_SIZE)
			{
				var newsTxt = document.all('newsSpan');
				
				if (newsTxt != null)
				{
					tmpNews = newsSpan.innerHTML;
				}

				try
				{
					mainTable.rows[1].deleteCell(1);
				}
				catch(e)
				{

				}

				movedNewsSpan.innerHTML = tmpNews;
			}
			else if (document.body.clientWidth > MINIMUM_SIZE &&
				mainTable.rows[1].cells.length < 2)
			{
				mainTable.rows[1].insertCell(1);
				mainTable.rows[1].cells[1].innerHTML = tmpNews;
				mainTable.rows[1].cells[1].vAlign = "top";
				mainTable.rows[1].cells[1].width = "25%";
				movedNewsSpan.innerHTML = "";
			}
		}
	}
}
