function WriteSidePanel()
{
	var strHTML=m_objMqButton.GetTextButtonHTML("RemoveAllocation", g_MqRef.RESX['SL.MASS_DEALLOC_SELECTED_ASSETS'], "RemoveAllocations()", "", 65, "padding-bottom:50px;", "", 150);

	document.write(strHTML);
}

function RemoveAllocations()
{
	var strSelectedIDs=GetSelectedIssueIDs();
	if(strSelectedIDs==""){
		g_MqRef.AlertBox.show(g_MqRef.RESX["MSG_TITLE_REMOVE_ALLOC"], g_MqRef.RESX["MSG_MUST_SELECT_TO_REMOVE_ALLOC"]);
	}else{
		g_MqRef.ConfirmBox.show(g_MqRef.RESX["MSG_TITLE_REMOVE_ALLOC"], g_MqRef.RESX["MSG_CONFIRM_REMOVE_ALLOC"]).then(function(res)
		{
			if(res)
			{
				var co = parent.objRequest.Get(parent.mstrCurrentLocation + "HRIT.asp" + "?WCI=wciDeallocateAssets&IDs=" + g_MqRef.MqStr.MqEncodeURIComponent(strSelectedIDs));
				
				if (co!=parent.objRequest.CANCEL_PROCESS){
									
					var objResponse=parent.objRequest.Response(co);
										
					if (objResponse){
						if (objResponse.HasErrors()){
							objResponse.ProcessErrors("",true,window);
						}else{
							//refresh summary list
							if(parent.ToolBar){
								parent.ToolBar.submitinfo(null,true);
							}
							//stop, need a better way to reference this
							if(parent){
								if(parent.parent){
									if(parent.parent.Record){
										if(parent.parent.Record.m_objAllocationReports8){
											parent.parent.Record.m_objAllocationReports8.Refresh();
										}
									}
								}
							}
							CloseWindow();
						}
					}
				}
			}
		});
	}	
}

function EditResInfo(lngID)
{
	parent.LoadRecord(lngID, -1, false);
}