var alarmSlotNo;

window.onresize = function()
{
	GetMainContentHeight(BUTTON_TOP_MENU, NO_BUTTON_CHANGE);
}

$(document).ready(function()
{
  	GetMainContentHeight(BUTTON_TOP_MENU, NO_BUTTON_CHANGE);
	funcUpdateDisplay();	
});

function funcUpdateDisplay() 
{	 
	var args = GetArgs();
	alarmSlotNo = parseInt(args["slotNo"], 10);
	DisableButton("refreshBtn");
	PageLoadStatus(true);
	
	displayParam();
	
	EnableButton("refreshBtn");
	PageLoadStatus(false);
}

function displayParam() 
{
	var data;
	var index;
	var response;
	var xmlHttp = GetHTTPObject();

	xmlHttp.open("GET", "/goform/formEMR30?type=" + ALARM_MONITOR + "&cmd=" + GET + "&language=" + language 
		+ "&slotNo=" + slotNo + "&alarmSlotNo=" + alarmSlotNo + "&ran=" + Math.random(), true);
	xmlHttp.onreadystatechange = function()
	{
		if((xmlHttp.readyState == 4) && (xmlHttp.status == 200))
		{
			response = AjaxStrDeal(xmlHttp.responseText);
			if(response == "")
			{
				rowNum = 0;
			}
			else
			{
				data = response.split(FIRST_DELIMITER);
				rowNum = data.length;
			}
			DrawTableRow("dataTable", "dataRow", "CaseRow", rowNum);	
			if(rowNum != 0)
			{
				for(var i = 0; i < rowNum; i++)
				{
					index = i + 1;
					$("#alarmInfo" + index).html(data[i]);		
				}
			}
			refreshFlag = true;
		}
	}
	xmlHttp.send(null);
}