var cellselected;
var sColor;

function BodyOnLoad()
{
	window.scrollTo(0,200);
	
//	alert(document.body.offsetWidth);
//	alert(document.body.clientWidth);
}

function Sel(nRow,nCol)
{
	var tab;
	var rows;
	var cells;
	var frameObj;
	var edSelectCtrl;
	
	
	tab = GetControl("caltable");
	if (tab != null)
	{
		
		rows = tab.rows[nRow];
		cells = rows.cells;

			
	 	if (cells[nCol] != null)
	 	{
	 		if (cellselected != null)
	 		{
	 			cellselected.style.backgroundColor = sColor;
	 		}
	 		
	 		cellselected = cells[nCol];
	 		
			sColor = cellselected.style.backgroundColor;
			cellselected.style.backgroundColor = "#0080c0";
			
			frameObj = top.document.getElementById('RightFrame');
			
			if (frameObj != null)
			{
				edSelectCtrl = GetFormControl(parent.parent.RightFrame.document.Form1, "KR39");
				
				if (edSelectCtrl != null)
				{
					edSelectCtrl.value = cellselected.id;
				}
			}
			
			
			
	 	}
	 	
	}
	
}
