// Dependencies
//		VNMassUpdateWindow
//		window.js

function VNAssetMgr()
{
	function ReassignSelected(oDataGrid, oHTMLDoc)
	{
		var oGrid =new VNGridList(oDataGrid, oHTMLDoc);
		
		// Load also the additional columns info per row
		var arrRecIDs=oGrid.GetSelectedRows(true);

		if(arrRecIDs)
		{
			var arrSelectedColsInfo=oGrid.SelectedColsInfo();
			
			OpenReassignWin(arrRecIDs,arrSelectedColsInfo);
		}
	}	
	

	function OpenReassignWin(arrRecIDs, arrSelectedColsInfo)
	{
		
		var strColsInfo="";
		if (arrSelectedColsInfo)
		{
			strColsInfo=arrSelectedColsInfo.join("");
		}
		//TODO: better mechanism for callback
		parent.fnBatchUpdateCallbackOnClose=null;
		
		var oWinProp=new VNWindowProperties()
		oWinProp.Width=1000;
		oWinProp.Height=700;

		// Window Size Mode
		oWinProp.SizeMode=WIN_MODE_MAXIMIZED;	
		oWinProp.Modal=true;
		var oMassUpdWin = new VNMassUpdateWindow(oWinProp);
		
		oMassUpdWin.RecSrc="tmplRecord-Reassign.htm";
		oMassUpdWin.ShowTabs="1";
		oMassUpdWin.Open(arrRecIDs,strColsInfo);
	}
	
	this.ReassignSelected=ReassignSelected;
	
}
