

//Simple utility function to piece together an XPath expression based on the given node.
function getNodePath(node){
	var nodePath="";
	while (node!=null){
		nodePath="/*[@name='"+node.getText()+"']"+nodePath;
		node=node.getParent();
	}
	nodePath="/"+nodePath;
	return escape(nodePath);
}

//Simple Utility function to delete all grid rows.
function ClearGridRows(_grid){
	if(_grid!=null){
		var count=_grid.Rows.length;
		for(var i=0;i<count;i++){
			_grid.Rows.remove(0);
		}
	}
}
