	
function UpdateUltraGrid(UpdateList)
{
	if(UpdateList)
	{
		if(UpdateList.length > 0)
		{
			var parentDoc=null;
					
			parentDoc = getParentDoc();
			if(parentDoc)
			{
				var ele=null;
				
				for(var li=0; li < UpdateList.length; li++)
				{
					ele =parentDoc.getElementById(UpdateList[li].m_elementId);
					if(ele)
					{
						if(ele.attributes['UGUCellType'])
						{
							if(ele.attributes['UGUCellType'].value == 'YesNo')
							{
								if (UpdateList[li].m_Value == 'False' || UpdateList[li].m_Value == '0')
									ele.innerHTML = 'No';
								else
									ele.innerHTML = 'Yes';
							}
							else if(ele.attributes['UGUCellType'].value == 'YesNoImage')
							{
								if (UpdateList[li].m_Value == '0')
								{
									ele.innerHTML = substitute(ele.innerHTML,"checked.gif","unchecked.gif");
								}
								else
								{
									ele.innerHTML = substitute(ele.innerHTML,"unchecked.gif","checked.gif");					
								}
							}
						}
						else
							ele.innerHTML = UpdateList[li].m_Value;
					}
				}
			}
		}
	}
	closeWindow();
}

function closeWindow()
{
	window.close();
}

function reloadUltraGrid()
{
	var parentDoc=null;
	parentDoc = getParentDoc();
	if(parentDoc)
	{
		parentDoc.location.reload(true); // forces a reload from the server
	}
	closeWindow();
}

function reloadTopLevel()
{
	var parentDoc=null;
	
	parentDoc = window.parent.opener;
	
	if(parentDoc != null)
	{
		if(parentDoc.parent != null)
		{
			parentDoc.parent.location.reload(true);
		}
	}
	closeWindow();
}

function getParentDoc()
{
	var parentWindow=null;
	var parentDoc=null;
		
	parentWindow = window.parent.opener;
	if(parentWindow != null)
	{
		return parentWindow.document
	}
}
							
		
function UpdateElementObj(elementId,sValue)
{
	this.m_elementId = elementId;
	this.m_Value = sValue;
}
					

