<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
    <!--MqRelPath--><link rel="stylesheet" type="text/css" href="../../theme/css/censusmain.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>/theme/css/censusmain.css"/></MqAbsPath-->
    <!--MqRelPath--><script type="text/javascript" src="../../js/frameconstants.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/frameconstants.js"></script></MqAbsPath-->
    <!--MqRelPath--><script type="text/javascript" src="../../js/mqsysutils.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqsysutils.js" ></script></MqAbsPath-->
    <!--MqRelPath--><script type="text/javascript" src="../../js/cmqsysmsg.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/cmqsysmsg.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../../js/VNHTMLDocInit.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/VNHTMLDocInit.js"></script></MqAbsPath-->    
    <!--MqRelPath--><script type="text/javascript" src="../../js/window.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/window.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../js/slsidepanel.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/slsidepanel.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../js/viewconstants.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/viewconstants.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../../js/jquery/jquery-1.7.1.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/jquery/jquery-1.7.1.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../../js/Features.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/Features.js"></script></MqAbsPath-->
	
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
	
	
	<script type="text/javascript">
		var QS_NUM_TO_SHOW="MaxRec";
		var QS_VIEW_TYPE="VT";
		var VIEW_TYPE_CARD="1";
		var VIEW_TYPE_LIST="2";
		var m_arrChkBtns=new Array();
		var m_arrChkBtnsSingle=new Array();
		
		var VIEW_ID="<WC@VIEW_ID></WC@VIEW_ID>";
		
		var m_lngViewType=g_MqRef.MqStr.GetQueryStringValue(location.search, QS_VIEW_TYPE);
		var m_strSwitchViewImg="view_card.gif";
		var m_strSwitchViewTooltip="";
		
		if(m_lngViewType=="" || (m_lngViewType!=parent.DEFAULT_VIEW_TYPE && parent.SWITCH_VT_ALLOWED==false)){
			if(parent.DEFAULT_VIEW_TYPE){
				m_lngViewType=parent.DEFAULT_VIEW_TYPE;
			}else{
				m_lngViewType=VIEW_TYPE_LIST;
			}
		}
		
		var strScripts="";
		
		if(m_lngViewType==VIEW_TYPE_CARD)
		{
		    strScripts='<script type="text/javascript" src="../../js/codebase/dhtmlxdataview.js"><\/script>' +
						'<link rel="stylesheet" type="text/css" href="../../js/codebase/dhtmlxdataview.css">';
						
			m_strSwitchViewImg="view_card.gif";
			m_strSwitchViewTooltip=g_MqRef.RESX['BUTTON_SWITCH_LIST_VIEW'];
		}else{
			if(m_lngViewType==VIEW_TYPE_LIST){
				strScripts='<link rel="stylesheet" type="text/css" href="../../js/codebasegrid/dhtmlxdataview.css">' +
							'<link rel="stylesheet" type="text/css" href="../../js/codebasegrid/dhtmlxgrid.css">' +
							'<link rel="stylesheet" type="text/css" href="../../js/codebasegrid/skins/dhtmlxgrid_dhx_skyblue.css">' +
							'<script type="text/javascript" src="../../js/codebasegrid/dhtmlxcommon.js"><\/script>' +
							'<script type="text/javascript" src="../../js/codebasegrid/dhtmlxgrid.js"><\/script>' +        
							'<script type="text/javascript" src="../../js/codebasegrid/dhtmlxgridcell.js"><\/script>' +
							'<script type="text/javascript" src="../../js/codebasegrid/ext/dhtmlxgrid_filter.js"><\/script>' +
							'<script type="text/javascript" src="../../js/codebasegrid/ext/dhtmlxgrid_group.js"><\/script>' +
							'<script type="text/javascript" src="../../js/codebasegrid/ext/dhtmlxgrid_pgn.js"><\/script>';
				m_strSwitchViewImg="view_list.gif";
				m_strSwitchViewTooltip=g_MqRef.RESX['TOOLTIP_SWITCH_CARD_VIEW'];
			}
		}
		document.write(strScripts);
		
	</script>
	
    <script type="text/javascript">
        //always define this object for the system messages
        var objSysMsg = new CMqSysMsg;
        var m_objMqButton= new MqButton;
        var loaded=false;
		var initialized=false;
		var m_SLHbusy=false;
		var mDataView;
		var mDataGrid;
		
		var m_lngCurrentPage=0;
		var m_lngPageCount=0;
		var m_lngTotalRecord=0;


		var m_objRef = parent;
		
		var Header="<WC@HEADER_TITLES></WC@HEADER_TITLES>";
		var InitWidths="<WC@HEADER_WIDTHS></WC@HEADER_WIDTHS>";
		var Aligns="<WC@HEADER_ALIGNS></WC@HEADER_ALIGNS>";
		var Types="<WC@HEADER_TYPES></WC@HEADER_TYPES>";
		var Sorts="<WC@HEADER_SORTS></WC@HEADER_SORTS>";
		var ColFieldIDs="<WC@HEADER_FLD_IDS></WC@HEADER_FLD_IDS>";
		
		var m_arrColFieldIDs;
		var m_arrColWidths;
		var m_lngGridWidth;
		var m_arrColActualWidths;
		
		if(typeof(Header_Left)!="undefined" && typeof(Header_Right)!="undefined"){
			m_arrColFieldIDs=GetGridParam(Header_Left, Header_Right, ColFieldIDs).split(",");	
		}else{
			m_arrColFieldIDs=ColFieldIDs.split(",");	
		}
		var mlngCardSize=12;
		var CARD_WIDTH=270;
		var CARD_HEIGHT=168;
		
		function SwitchView()
		{
			if(parent.SWITCH_VT_ALLOWED){
				var strNewType="";
				
				if(m_lngViewType==VIEW_TYPE_CARD){
					strNewType=VIEW_TYPE_LIST;
				}else{
					if(m_lngViewType==VIEW_TYPE_LIST){
						strNewType=VIEW_TYPE_CARD;
					}
				}
				
				if(strNewType!=""){
					m_objRef.m_objSLInput.SetViewTypeVal(strNewType);
					document.location.replace(g_MqRef.MqURI.AddToQueryString(document.location.toString(), QS_VIEW_TYPE, strNewType));
				}
			}
		}
				
		function Query_OnError()
	    {
        	if(parent){
	    		if(parent.objFrames){
	                var winToolbar=parent.objFrames.GetFrameWindow(TOOLBAR_FRAME_ID);
	        
	                if (winToolbar){
	                    // Refresh to show the actual query used. 
	    	            winToolbar.location.reload();
	    	        }
	    	    }
	        }
	    }
	    function DoPrint(lngRecID)
	    {
			if(parent){
				if(parent.objControls){
					parent.objControls.Print(lngRecID);
				}
			}
	    }
	    
	    function SelectAllInQuery(blnSelect)
	    {
			parent.m_blnAllIssuesInQuerySelected=blnSelect;
			DoSelectAllOnPage(blnSelect);
			
			ToggleSelectText(!blnSelect);
	    }
	    
	    function ToggleSelectText(blnShowSelect)
	    {
			var objSelectText=document.getElementById("selectAllText");
			if(objSelectText){
				if(blnShowSelect){
					objSelectText.innerText="Select";
				}else{
					objSelectText.innerText="Unselect";
				}
			}
	    }
	    
	    function ToggleSelectPageText(blnShowSelect)
	    {
			var objSelectText=document.getElementById("selectPageText");
			if(objSelectText){
				if(blnShowSelect){
					objSelectText.innerText=g_MqRef.RESX['SELECT'];
				}else{
					objSelectText.innerText=g_MqRef.RESX['UNSELECT'];
				}
			}
	    }
	    
	    function SelectAllOnPage(chkHeader, blnSelect)
	    {
			var blnChecked=false;
			if(chkHeader){
				if(chkHeader.checked){
					blnChecked=true;
				}
			}else{
				blnChecked=blnSelect;
			}
			
			parent.m_blnAllIssuesOnPageSelected=blnSelect;
				
			DoSelectAllOnPage(blnSelect);
			
			ToggleSelectPageText(!blnSelect);
	    }
	    
	    function DoSelectAllOnPage(blnChecked)
		{
			var objHTMLTable=document.getElementById("SumListTable");
			if(objHTMLTable){
				var intMax=objHTMLTable.rows.length-1;
				if(intMax>0){
					for(x=0; x<intMax; x++){
								
						var oRow=objHTMLTable.rows(x);
						var objCell;
						for (j=1; j < oRow.cells.length; j++) {
							objCell=oRow.cells(j);
								
							if(objCell.getAttribute("MqChk")!=null){
								var lngID=objCell.getAttribute("MqChk");
									
								var objChk=document.getElementById("chkSelectIssue_" + lngID);
									
								if(objChk){
									objChk.checked=blnChecked;
									break;
								}
							}						
						}
					}
				}
			}else{
				if(mDataGrid){
					var lngLastCol=mDataGrid.getColumnsNum()-1;
					if(mDataGrid.getColType(lngLastCol)=="ch"){
						mDataGrid.forEachRow(function(id){
							var cell=mDataGrid.cells(id,lngLastCol);
							if(blnChecked){
								cell.setValue(1);
							}else{
								cell.setValue(0);
							}
						});
					}
				}
			}
	    }
	    
	    function GetSelectedIssueIDs()
	    {
			var strIDs="";
			
			if(parent.m_blnAllIssuesInQuerySelected){
				strIDs="AllInQ";
			}else{
				var objHTMLTable=document.getElementById("SumListTable");
				if(objHTMLTable){
					var intMax=objHTMLTable.rows.length-1;
					if(intMax>0){
						for(x=0; x<intMax; x++){
									
							var oRow=objHTMLTable.rows[x];
							var objCell;
							for (j=1; j < oRow.cells.length; j++) {
								objCell=oRow.cells[j];
									
								if(objCell.getAttribute("MqChk")!=null){
									var lngID=objCell.getAttribute("MqChk");
										
									var objChk=document.getElementById("chkSelectIssue_" + lngID);
										
									if(objChk){
										if(objChk.checked){
											strIDs+=lngID+";";
										}
										break;
									}
								}						
							}
						}
					}
				}else{
					if(mDataGrid){
						var lngLastCol=mDataGrid.getColumnsNum()-1;
						if(mDataGrid.getColType(lngLastCol)=="ch"){
							strIDs=mDataGrid.getCheckedRows(lngLastCol);
							var regExp=new RegExp(",","g");
							strIDs=strIDs.replace(regExp, ";");
						}
					}
				}
				if(g_MqRef.MqStr.Right(strIDs, 1)==";"){
					strIDs=g_MqRef.MqStr.Left(strIDs, strIDs.length-1);
				}
			}
			return strIDs;
		}

		function GetNumSelectedIssues()
		{
			var lngNum=0;
			
			var strSelected=GetSelectedIssueIDs();
			
			if(strSelected != ""){
				var arrSelected=strSelected.split(";");
				lngNum = arrSelected.length;
			}
			
			return lngNum;
		}
	    
	    function SelectOneIssue(lngIssueID)
	    {
			var objChk=document.getElementById("chkSelectIssue_" + lngIssueID);
									
			if(objChk){
				if(!objChk.checked){
					parent.m_blnAllIssuesInQuerySelected=false;
					ToggleSelectText(true);
					
					parent.m_blnAllIssuesOnPageSelected=false;
					ToggleSelectPageText(true);
				}
			}
	    }
	    
	    function toggleSLDlg(blnExpand)
	    {
			var objSLDlg=document.getElementById("dvSLDlg");
			
			if(objSLDlg){
				if(blnExpand){
					ExpandDialog(true);
				}else{
					CollapseDialog();
				}
			}
	    }
	    
	    function ExpandDialog(blnGradually)
	    {
	    	var INTERVAL=10;
			var TIME_LAPSE=1;
			var MAX_WIDTH=322;
			var objDlg=document.getElementById("dvSLDlg");
			var objExpandButton=document.getElementById("expandButton");
			var objDlgContent=document.getElementById("SLDlgContents");
			
			if(objDlg && objExpandButton && objDlgContent){
			
				var intBodyWidth;
				if (document.all){
					intBodyWidth=document.body.offsetWidth;
				}else{
					intBodyWidth=window.innerWidth;
				}

				var intCurrentWidth=parseInt(g_MqRef.MqStr.StripTrailing(objDlg.style.width, "px"));
				if(blnGradually){
					
					if(intCurrentWidth < MAX_WIDTH){
						objDlg.style.width=(intCurrentWidth+INTERVAL) + "px";
						objExpandButton.style.right=(intCurrentWidth+INTERVAL-22) + "px";
						objDlgContent.style.left=(intBodyWidth-intCurrentWidth) + "px";
						objDlgContent.style.display="";
						window.setTimeout("ExpandDialog(true);", TIME_LAPSE); 
					}else{
						var objContents=document.getElementById("SLDlgContents");
						if(objContents){
							objContents.style.display="";
						}
						var objCollapseButton=document.getElementById("collapseButton");
						if(objCollapseButton){
							objCollapseButton.style.top=objExpandButton.style.top;
							objCollapseButton.style.right=objExpandButton.style.right;
							objExpandButton.style.display="none";
							objCollapseButton.style.display="";
							parent.m_blnSLDetailsDlgExpanded=true;
						}
					}
				}else{
					objDlg.style.width=MAX_WIDTH + "px";
					objDlgContent.style.left=(intBodyWidth-intCurrentWidth) + "px";
					objExpandButton.style.right=(MAX_WIDTH-22) + "px";
					objDlgContent.style.display="";

					var objCollapseButton=document.getElementById("collapseButton");
					if(objCollapseButton){
						objCollapseButton.style.top=objExpandButton.style.top;
						objCollapseButton.style.right=objExpandButton.style.right;
						objExpandButton.style.display="none";
						objCollapseButton.style.display="";
						parent.m_blnSLDetailsDlgExpanded=true;
					}
				}
			}
	    }
	    
	    function CollapseDialog()
	    {
	    	var INTERVAL=10;
			var TIME_LAPSE=1;
			var MIN_WIDTH=22;
			var objDlg=document.getElementById("dvSLDlg");
			var objCollapseButton=document.getElementById("collapseButton");
			var objDlgContent=document.getElementById("SLDlgContents");
			if(objDlg && objCollapseButton && objDlgContent){
				var intCurrentWidth=parseInt(g_MqRef.MqStr.StripTrailing(objDlg.style.width, "px"));
				var intBodyWidth;
				if (document.all){
					intBodyWidth=document.body.offsetWidth;
				}else{
					intBodyWidth=window.innerWidth;
				}
				if(intCurrentWidth > MIN_WIDTH){
					objDlg.style.width=(intCurrentWidth-INTERVAL) + "px";
					objCollapseButton.style.right=(intCurrentWidth-INTERVAL-22) + "px";
					objDlgContent.style.left=(intBodyWidth-intCurrentWidth) + "px";
					window.setTimeout("CollapseDialog();", TIME_LAPSE); 
				}else{
					var objExpandButton=document.getElementById("expandButton");
					if(objExpandButton){
						objExpandButton.style.top=objCollapseButton.style.top;
						objExpandButton.style.right=objCollapseButton.style.right;
						objCollapseButton.style.display="none";
						objExpandButton.style.display="";
						objDlgContent.style.display="none";
						parent.m_blnSLDetailsDlgExpanded=false;
					}
				}
			}
	    }
	    
	    function OpenBatchUpdateWindow(lngWidth, lngHeight, strFieldsToShow, strTabsToShow, strHeaderRes, strHeaderDescRes, strDefVals, strHeader2, strHeader2Args, strSelectedIDs)
	    {
			if(typeof(strSelectedIDs)=="undefined"){
				strSelectedIDs=GetSelectedIssueIDs();
			}else{
				if(!strSelectedIDs){
					strSelectedIDs=GetSelectedIssueIDs();
				}
			}
			var strUrl="wcCmdBar.asp?wci=wciBatchUpdateMain"
			var arrPost;
			var blnNearFullscreen=false;
			
			if(strSelectedIDs!=""){
				strUrl+="&IDs=" + strSelectedIDs;
				
				if(strFieldsToShow){
					strUrl+="&Show=" + g_MqRef.MqStr.MqEncodeURIComponent(strFieldsToShow);
				}
				
				if(strTabsToShow){
					strUrl+="&ShowTabs=" + g_MqRef.MqStr.MqEncodeURIComponent(strTabsToShow);
				}
				
				if(strHeaderRes){
					strUrl+="&TRES=" + g_MqRef.MqStr.MqEncodeURIComponent(strHeaderRes);
				}
				
				if(strHeaderDescRes){
					strUrl+="&DRES=" + g_MqRef.MqStr.MqEncodeURIComponent(strHeaderDescRes);
				}
				
				if(strDefVals){
					strUrl+="&DV=" + g_MqRef.MqStr.MqEncodeURIComponent(strDefVals);
				}

				if(strHeader2){
					strUrl+="&H2=" + g_MqRef.MqStr.MqEncodeURIComponent(strHeader2);
				}
			
				if(strHeader2Args){
					arrPost = [new HTTPPostField("H2ARG", strHeader2Args)];
				}
			
				
				if(!lngWidth){
					lngWidth=1440;
					blnNearFullscreen=true;
				}
				
				if(!lngHeight){
					lngHeight=900;
					blnNearFullscreen=true;
				}
				var objWin = new g_VNLibs.VNWindow(true);
				objWin.Open(strUrl, "", lngWidth, lngHeight, arrPost, blnNearFullscreen);
			}else{
				alert(g_MqRef.RESX['WARNING_MESSAGE_SELECT_ISSUES_UPDATE']);
			}
		}
		
		function ShowHidePopup(blnHidden)
	    {
			parent.ShowBannerPopup(blnHidden);
	    }
	    
	    
	    function LoadSummaryList()
	    {
			
			if(parent.objFeatures.getFeature(parent.FEATURE_SUMLIST)){
			
				if(m_lngViewType==VIEW_TYPE_CARD)
				{
					LoadDataCard();
				}else{
					if(m_lngViewType==VIEW_TYPE_LIST){
						LoadDataList();
					}
				}
				
				ApplyDynamicRows();
				
				parent.SetState(SUMMARY_LIST_FRAME_ID, parent.IDLE_STATE);
				
				parent.SetState(TOOLBAR_FRAME_ID, parent.IDLE_STATE);
				
				CreateSummaryListHeader();
				
				if(parent.m_blnSLDetailsDlgExpanded){
					ExpandDialog(true);
				}
				if(parent.m_blnAllIssuesInQuerySelected){
					DoSelectAllOnPage(true);
					ToggleSelectText(false);
				}
				if(parent.m_blnAllIssuesOnPageSelected){
					SelectAllOnPage(null, true);
					ToggleSelectPageText(false);
				}	
			}
			if(parent.objRecord){
				parent.objRecord.ShowLoadingUI(false);
			}
	    }
	    
	    function LoadDataCard()
		{			
			if(!mDataView){
				mDataView = new dhtmlXDataView({
					container:"data_container",
					type:{
							css:"displayEmp",
							template:"html->displayEmp" + VIEW_ID,
							height:CARD_HEIGHT,
							width:CARD_WIDTH,
							margin:6,
							padding:0
				        },
					pager:{
					    container:"paging_here",
					    size:mlngCardSize,
					    group:5
					}							        
				});
				mDataView.attachEvent("onItemClick", "OnGridRowClick");
			}else{
				mDataView.clearAll();
			}
			var strData="<data></data>";
			if(window.frames["fraSLSrc"]){
				var objDataContainer=window.frames["fraSLSrc"].document.getElementById("dataContainer");
				if(objDataContainer){
					strData=objDataContainer.value;
				}
			}
			mDataView.parse(strData);
			document.getElementById("gridbox").style.display="none";
			window.setTimeout("HandlePage();", 300); ;
		}	
		
		function LoadDataList()
		{
			if(!mDataGrid){
				mDataGrid = new dhtmlXGridObject('gridbox');
				mDataGrid.setImagePath("../../js/codebasegrid/imgs/");
				mDataGrid.setHeader(GetGridParam(Header_Left, Header_Right, Header));
				mDataGrid.setNoHeader(HideHeader);
				mDataGrid.setInitWidths(GetColWidths());
				mDataGrid.setColAlign(GetGridParam(Aligns_Left, Aligns_Right, Aligns));
				mDataGrid.setColTypes(GetGridParam(Types_Left, Types_Right, Types));
				mDataGrid.setColSorting(GetGridParam(Sort_Left, Sort_Right, Sorts));
				mDataGrid.init();
				mDataGrid.setSkin("dhx_skyblue");
			}else{
				mDataGrid.clearAll();
			}
			
			var lngGroupByCol=GroupBy;
			
			if(lngGroupByCol>=0){
				mDataGrid.groupBy(lngGroupByCol);
			}			
			mDataGrid.attachEvent("onMouseOver", function(){ return false; });
			mDataGrid.attachEvent("onRowDblClicked", "OnGridRowClick");
			mDataGrid.attachEvent("onHeaderClick", "OnGridHeaderClick");	
			mDataGrid.attachEvent("onRowSelect", "OnGridRowSelect");
			mDataGrid.attachEvent("onCheckbox", "OnItemCheck");
			var strData="<rows></rows>";
			if(window.frames["fraSLSrc"]){
				var objDataContainer=window.frames["fraSLSrc"].document.getElementById("dataContainerList");
				if(objDataContainer){
					strData=objDataContainer.value;
				}
			}
			mDataGrid.parse(strData);
			document.getElementById("data_container").style.display="none";
			document.getElementById("gridbox").style.display="";
			window.setTimeout("HandlePage();", 300); ;
		}
		
		function GetGridParam(strLeftParam, strRightParam, strDefaultVal)
		{
			return strLeftParam + "," + strDefaultVal + "," + strRightParam;
		}
		
		function GetColWidths()
		{
			
			var strWidthsP=GetGridParam(InitWidths_Left, InitWidths_Right, InitWidths);
			var arrWidthsP=strWidthsP.split(",");
			m_arrColWidths=arrWidthsP;
			m_lngGridWidth=$("#gridbox").width();
			
			for(var x=0;x<arrWidthsP.length;x++){
				m_arrColWidths[x]=(m_lngGridWidth*arrWidthsP[x]/100);
			}
			
			return m_arrColWidths.join(",");
		}
		

		function ResizeGridCols()
		{
			if(mDataGrid){
				if(m_lngGridWidth){
					var lngNewWidth=$("#gridbox").width();
					if(lngNewWidth!=m_lngGridWidth){
						var lngResizeBy=((lngNewWidth-m_lngGridWidth)/GetNumVisibleCols());
						for(var x=0; x<mDataGrid.getColumnsNum();x++){
							if(!mDataGrid.isColumnHidden(x)){
								var lngColWidth=GetColActualWidth(x);
								if(lngColWidth!=0){
									mDataGrid.setColWidth(x, (lngColWidth+lngResizeBy));
									SetColActualWidth(x, (lngColWidth+lngResizeBy));
								}
							}
						}
						m_lngGridWidth=lngNewWidth;
					}
				}
			}
		}
		
		function GetNumVisibleCols()
		{
			var lngCount=0;
			if(mDataGrid){
				for(var x=0; x<mDataGrid.getColumnsNum();x++){
					if(!mDataGrid.isColumnHidden(x)){
						lngCount++;
					}
				}
			}
			return lngCount;
		}
		
		function GetColDefinedWidth(lngColID)
		{
			if(m_arrColWidths){
				if(m_arrColWidths[lngColID]){
					return m_arrColWidths[lngColID];
				}
			}
		}
		
		function SetColActualWidth(lngColID, lngWidth)
		{
			if(!m_arrColActualWidths){
				m_arrColActualWidths=m_arrColWidths;
			}
			if(m_arrColActualWidths){
				if(m_arrColActualWidths[lngColID]){
					m_arrColActualWidths[lngColID]=lngWidth;
				}
			}
		}
		
		function GetColActualWidth(lngColID)
		{
			if(m_arrColActualWidths){
				if(m_arrColActualWidths[lngColID]){
					return m_arrColActualWidths[lngColID];
				}
			}
		}
		
		function OnGridRowSelect(lngRowID, lngCellID)
		{
			if(mDataGrid){
				var lngLastCol=mDataGrid.getColumnsNum()-1;
				if(mDataGrid.getColType(lngLastCol)=="ch"){
					if (mDataGrid.cells(lngRowID,lngLastCol).getValue()=="0"){
						mDataGrid.cells(lngRowID,lngLastCol).setValue(1);
						OnItemCheck(lngRowID, lngLastCol, true);
					}else{
						mDataGrid.cells(lngRowID,lngLastCol).setValue(0);
						OnItemCheck(lngRowID, lngLastCol, false);
					}
				}
			}
		}

		function OnGridRowClick(lngRowID, lngCellID)
		{
			
			if(parent.m_objSLDD){
				var objHasMoreDD=document.getElementById("DD_Has_More_"+lngRowID);
				
				if(objHasMoreDD){
					if(objHasMoreDD.innerHTML=="Yes"){
						parent.m_objSLDD.TriggerDrillDownQuery(lngRowID);
					}else{
						if(mDataGrid){
							eval(OnClickFunc+"(" + lngRowID + "," + lngCellID + ")");
						}else{
							eval(OnClickFunc+"(" + lngRowID + ")");
						}
					}
				}else{
					parent.m_objSLDD.TriggerDrillDownQuery(lngRowID);
				}
			}else{
				LoadItem(lngRowID, lngCellID);
			}
		}
		
		function LoadItem(lngRowID, lngCellID)
		{
			if(mDataGrid){
				eval(OnClickFunc+"(" + lngRowID + "," + lngCellID + ")");
			}else{
				eval(OnClickFunc+"(" + lngRowID + ")");
			}
		}
		
		function OnGridHeaderClick(lngColID, objEvt)
		{
			var lngFieldID=m_arrColFieldIDs[lngColID];
			if(parent.m_objSLInput.SortField==lngFieldID){
				if(parent.m_objSLInput.SortOrder=="1"){
					parent.m_objSLInput.SortOrder="2";
				}else{
					parent.m_objSLInput.SortOrder="1";
				}
			}else{
				parent.m_objSLInput.SortOrder="1";
			}
			parent.m_objSLInput.SortField=lngFieldID;
			
			var blnSimpleSearchHasValue=false;
			var blnIsSS=true;
			var blnIsAC=false;
			if(parent.m_objSLInput){
				if(parent.m_objSLInput.SimpleSearchFld){
					if(parent.m_objSLInput.SimpleSearchFld.value!=""){
						blnSimpleSearchHasValue=true;
						blnIsSS=false;
						blnIsAC=true;
					}
				}
			}
			parent.InitSLInputInfo(blnIsSS, blnSimpleSearchHasValue, blnIsAC);
			if(parent.m_objSLDD){
				if(parent.m_objSLDD.DDIsEnabled()){
					parent.m_objSLDD.RefreshToCurrentDD();
				}
			}
			parent.m_objSLMgr.ApplySearchToSL(false, false, parent.m_objSLInput, true);
		}
		
		function SetButtonVisibleOnCheck(strName, blnHideWhenMultipleSelected)
		{
			m_objMqButton.HideTextButton(m_objMqButton.GetButtonHTMLName(strName), true);
			
			if(blnHideWhenMultipleSelected){
				m_arrChkBtnsSingle.push(strName);
			}else{
				m_arrChkBtns.push(strName);
			}
		}
		
		function OnItemCheck(lngRowID, lngColID, bChecked)
		{
			var strSelIssueIDs = GetSelectedIssueIDs();
			var lngNumSelIssues = GetNumSelectedIssues();
			if(m_arrChkBtns){
				for(var x=0; x<m_arrChkBtns.length;x++){
					var objButton=document.getElementById(m_objMqButton.GetButtonHTMLName(m_arrChkBtns[x]));
					
					if(objButton){
						if(strSelIssueIDs !=""){
							m_objMqButton.HideTextButton(m_arrChkBtns[x], false, objButton);
						}else{
							m_objMqButton.HideTextButton(m_arrChkBtns[x], true, objButton);
						}
					}
				}
			}
			if(m_arrChkBtnsSingle){
				for(var x=0; x<m_arrChkBtnsSingle.length;x++){
					var objButton=document.getElementById(m_objMqButton.GetButtonHTMLName(m_arrChkBtnsSingle[x]));
					
					if(objButton){
						if(lngNumSelIssues == 1){
							m_objMqButton.HideTextButton(m_arrChkBtnsSingle[x], false, objButton);
						}else{
							m_objMqButton.HideTextButton(m_arrChkBtnsSingle[x], true, objButton);
						}
					}
				}
			}
			if(mDataGrid){
				mDataGrid.selectRowById(lngRowID);
			}
		}
		
		function HandlePage()
		{
			SetPageCaption();
			
			HandleButtonStates();

			if(parent){
				if(parent.m_objSLDD){
					HandleDDItemsUI();
					parent.m_objSLDD.SetDDBreadCrumbs();
				}
			}
			// To be moved to SL object
			if (m_lngTotalRecord==1)
			{
				if (g_VWS.SummaryList().AutoLoadIfOneMatch)
				{
					if (mDataGrid)
					{
						var rowIDtoCall = mDataGrid.getRowId(0);
						if (rowIDtoCall)
						{
							OnGridRowClick(rowIDtoCall);
						}
					}
				}
			}

			var oVNF= new VNFeatureUI();
			oVNF.InitVisible( 118, document, blnShowButton118);


		}
		
		function SetPageCaption()
		{
			var objPageCaption=document.getElementById("PageCaption");

			if (objPageCaption){
				var strPC=GetPageCaption();
				objPageCaption.innerHTML=strPC;
			}				
		}

		function GetPageCaption(){
			var strReturn;
			
			if (!m_lngCurrentPage && !m_lngTotalRecord){
				strReturn="No matches";
			}else{	
				var strPageCtrl="";
				if(parent.g_VWS.SummaryList()){
					parent.g_VWS.SummaryList().SetPageCount(m_lngPageCount);
				
					strPageCtrl=parent.g_VWS.SummaryList().GetPageControlSrc(m_lngCurrentPage);
				}
				strReturn=g_MqRef.MqStr.FormatString(g_MqRef.RESX['DISPLAY_PAGE_NUMBERS'], strPageCtrl+";"+m_lngPageCount+";"+m_lngTotalRecord+";",";"); 
			}
				
			return strReturn;
		}

		function HandleButtonStates()
		{
			if (m_lngCurrentPage==1 || m_lngCurrentPage==0){ 
				m_objMqButton.DisableButton("FirstPage");	
				m_objMqButton.DisableButton("PreviousPage");
			}else{
				m_objMqButton.EnableButton("FirstPage");
				m_objMqButton.EnableButton("PreviousPage");
			}
			
			if (m_lngCurrentPage==m_lngPageCount) {
				m_objMqButton.DisableButton("LastPage");
				m_objMqButton.DisableButton("NextPage");	
			}else{
				m_objMqButton.EnableButton("LastPage");
				m_objMqButton.EnableButton("NextPage");
			}
		}
		
		function HandleDDItemsUI()
		{
			if(mDataGrid){
				mDataGrid.forEachRow(function(id){
					HandleDDUI(id);
				});
				ShowHideDDCols();
			}else{
				if(mDataView){
					var items = mDataView.dataCount();
					var id, data;

					if(items > 0) {
						id = mDataView.first();
						HandleDDUI(id);
						for(var x=0; x<items; x++){
							id = mDataView.next(id);
							if(id){
								HandleDDUI(id);
							}
						}
					} 

				}
			}
		}
		
		function HandleDDUI(id)
		{
			var objHasChildren=document.getElementById("DD_Has_More_"+id);
			var objUsageType=document.getElementById("UsageType_"+id);
			
			if(objUsageType){
				if(objHasChildren){
					if(objUsageType.innerHTML=="Asset Type"){
						objHasChildren.innerHTML="Yes";
					}
				}
			}
			if(objHasChildren){
				var objDDExpImg=document.getElementById("imgDD"+id);
				var objDDBtn=document.getElementById("cmdDD"+id);
				var objDelBtn=document.getElementById("cmdDelete"+id);
				var objEditBtn=document.getElementById("cmdEdit"+id);
				var objReqBtn=document.getElementById("cmdRequest"+id)
				
				if(objHasChildren.innerHTML=="Yes"){
					if(objDDExpImg){
						objDDExpImg.style.display="";
					}
					if(objDDBtn){
						objDDBtn.style.display="";
					}
					if(objDelBtn){
						objDelBtn.style.display="none";
					}
					if(objEditBtn){
						if(typeof(m_blnDisableEditTopLevels)!="undefined"){
							if(m_blnDisableEditTopLevels){
								objEditBtn.style.display="none";
							}
						}
					}
					
					if(objReqBtn){
						objReqBtn.style.display="none";
					}
					
					if(mDataGrid){
						var lngLastCol=mDataGrid.getColumnsNum()-1;
						if(mDataGrid.getColType(lngLastCol)=="ch"){
							mDataGrid.setColumnHidden(lngLastCol, true);
						}
					}
					
				}else{
					if(objDDExpImg){
						objDDExpImg.style.display="none";
					}
					if(objDDBtn){
						objDDBtn.style.display="none";
					}
					if(objDelBtn){
						var delFeature=Delete_Feature;
						if(delFeature==""){
							objDelBtn.style.display="";
						}else{
							if(eval(delFeature)==true){
								objDelBtn.style.display="";
							}else{
								objDelBtn.style.display="none";
							}
						}
					}
					if(objReqBtn){
						objReqBtn.style.display="";
					}
				}
			}
		}
		
		function ShowHideDDCols()
		{
			var lngTotalWidthRemoved=0;
			var lngTotalColsHidden=0;
			
			if(mDataGrid){
				var objHasChildren=document.getElementById("DD_Has_More_"+mDataGrid.getRowId(0));
				var blnHasChildren=false;
				if(objHasChildren){
					blnHasChildren=(objHasChildren.innerHTML=="Yes");
				}
				if(typeof(m_strVisibleWithDD)!="undefined" && typeof(m_strHiddenWithDD)!="undefined"){
					if(m_strVisibleWithDD!="" && m_strHiddenWithDD!=""){
						var arrVisibleWithDD=m_strVisibleWithDD.split(",");
						var arrHiddenWithDD=m_strHiddenWithDD.split(",");
						for(var x=0; x<mDataGrid.getColumnsNum();x++){
							var strHeader=mDataGrid.getColLabel(x);
							if(strHeader!=""){
								if(blnHasChildren){
									if(!g_MqRef.MqArr.IsValueInArray(strHeader, arrVisibleWithDD)){
										lngTotalWidthRemoved+=GetColDefinedWidth(x);
										mDataGrid.setColumnHidden(x, true);
										lngTotalColsHidden++;
									}
								}else{
									if(g_MqRef.MqArr.IsValueInArray(strHeader, arrHiddenWithDD)){
										lngTotalWidthRemoved+=GetColDefinedWidth(x);
										mDataGrid.setColumnHidden(x, true);
										lngTotalColsHidden++;
									}
								}
							}else{
								lngTotalColsHidden++;
							}
						}	
						var lngVisibleCols=mDataGrid.getColumnsNum()-lngTotalColsHidden;
		
						var lngColWidthToRedistribute=lngTotalWidthRemoved/lngVisibleCols;
						
						for(var x=0; x<mDataGrid.getColumnsNum();x++){
							var strHeader=mDataGrid.getColLabel(x);
							if(strHeader!=""){
								var lngColWidth=GetColDefinedWidth(x);
								if(lngColWidth!=0){
									mDataGrid.setColWidth(x, (lngColWidth+lngColWidthToRedistribute));
									SetColActualWidth(x, (lngColWidth+lngColWidthToRedistribute));
								}
							}
						}
					}
				}
			}
		}
		
		function MoveFirst()
		{
			parent.g_VWS.SummaryList().Load("Position=FirstRecord");
		}

		function MoveLast()
		{
			parent.g_VWS.SummaryList().Load("Position=LastRecord");
		}

		function MovePrev()
		{
			parent.g_VWS.SummaryList().Load("PageNumber="+(Number(m_lngCurrentPage)-1));
		}

		function MoveNext()
		{
			parent.g_VWS.SummaryList().Load("PageNumber="+(Number(m_lngCurrentPage)+1));
		}
		
		function ShowUserMenus(strUserID, blnShow)
	    {
			var objActionButtons=document.getElementById("actionButtons" + strUserID);
			
			if(objActionButtons){
				if(blnShow){
					objActionButtons.className="actionButtonsHover actionButtonsHoverCard";
				}else{
					objActionButtons.className="actionButtons";
				}
			}
	    }

		function ShowDDArea(strID, blnShow)
		{
			if(parent.m_objSLDD){
				var objDDArea=document.getElementById("DD_Fld_Value_" + strID);
				
				if(objDDArea){
					if(blnShow){
						objDDArea.className="displayEmp_name_large displayEmp_name_largeHover";
					}else{
						objDDArea.className="displayEmp_name_large";
					}
				}
			}
		}
		
		function TriggerDD(lngID)
		{
			if(parent.m_objSLDD){
				parent.m_objSLDD.TriggerDrillDownQuery(lngID);
			}
		}
		
	    		
		function ResizeGrid()
		{

			var SL_SIDE_MARGIN=20; // 10+10 margin grid + margin side panel in px
			var SL_GRID_HEIGHT_MARGINS=11; // the grid's own margins and paddings
			
			var objGrid=document.getElementById("gridbox");
			var objCardView=document.getElementById("data_container");
			var objSideMenu=document.getElementById("SidePanelMenu");
			
			var objFilterBox;
			
			if(parent){
				objFilterBox=parent.document.getElementById("filterByBox");
			}
			
			var intBodyWidth=$(window).width();

			var intBodyHeight=$(window).height();
			

			// The SL grid uses the whole width minus the side panel.
			var iSPw=$("#SidePanelMenu").outerWidth(true)+SL_SIDE_MARGIN;
			var iPageNavh=$("#SLPageNavSection").outerHeight(true)+ $("#DDBreadcrumbs").outerHeight(true) + SL_GRID_HEIGHT_MARGINS;
			
			if(objGrid){
				objGrid.style.width=(intBodyWidth-iSPw) + "px";
				objGrid.style.height=(intBodyHeight-iPageNavh) + "px";	
			}
			if(objSideMenu)
			{
				objSideMenu.style.height=(intBodyHeight-iPageNavh) + "px";
			}
			
			ResizeGridCols();
			
			if(objCardView){
				objCardView.style.width=(intBodyWidth-iSPw) + "px";
				objCardView.style.height=(intBodyHeight-iPageNavh) + "px";	
				
				var intNumAcross=parseInt((intBodyWidth-iSPw)/CARD_WIDTH);
				var intNumDown=parseInt((intBodyHeight-iPageNavh)/CARD_HEIGHT);
				
				if((intNumAcross * intNumDown) != mlngCardSize){
					mlngCardSize = intNumAcross*intNumDown;
				
					if(mDataView){
						var pager = mDataView.config.pager;
						pager.define("size",mlngCardSize);//change the number of cards shown
						pager.refresh();
						parent.g_VWS.SummaryList().Load();
					}
				}
			}
			
			if(objFilterBox){
				
				if(m_lngViewType==VIEW_TYPE_CARD)
				{
					objFilterBox.style.height=(intNumDown*CARD_HEIGHT) + 40 + "px";
				}else{
					if(m_lngViewType==VIEW_TYPE_LIST){
						objFilterBox.style.height=(intBodyHeight-60) + "px";
					}
				}
			}
		}
		
		function ToggleGrid(blnExpand)
		{
			if(mDataGrid){
				if(blnExpand){
					mDataGrid.expandAllGroups();
				}else{
					mDataGrid.collapseAllGroups();
				}
			}
		}
			
		var obrowser = CMqBrowserDetector();
		
		m_strMgtButtonClass = 'actionButton2';
		m_strMgtButtonClassHover = 'actionButtonHover';
		m_strMgtButtonClassOut = 'actionButton2';

		if(obrowser){
			if(obrowser.ie && (obrowser.minor == 7 || obrowser.minor == 8)){
				m_strMgtButtonClass = '';
				m_strMgtButtonClassHover = 'actionButtonHover';
				m_strMgtButtonClassOut = '';
			}
		}

		function OnEditResInfo(lngRowID, lngCellID)
		{
			var blnEditRes=true;
			
			if(mDataGrid){
				if(lngCellID){
					var objCell=mDataGrid.cells(lngRowID,lngCellID);
					if (objCell.isCheckbox()){
						var lngVal=objCell.getValue();
						if(lngVal==0){
							objCell.setValue(1);
						}else{
							objCell.setValue(1);
						}
						blnEditRes=false;
					}
				}
			}
			
			if(blnEditRes){
				if (this.EditResInfo)
				{
					EditResInfo(lngRowID);
				}
				else
				{
					parent.LoadRecord(lngRowID, -1, false);
				}
			}
		}
    </script>
</head>
<body  onload="onLoad();" onresize="ResizeGrid();CreateSummaryListHeader();" 
	class="mainBody">
	
    <form  NAME='SummaryList' action='javascript:void(0);'>
		<WC@SL_UI_SETTINGS>351;pc|../../theme/images/images/tree16_g.gif|3;</WC@SL_UI_SETTINGS>
		
		<div id="DDBreadcrumbs" name="DDBreadcrumbs" class="SLBreadCrumbs" style="padding-top:10px;padding-left:20px;height:20px"></div>	
		<table style="width:100%;border: 0px" border=0>
			<tr>
				<td style="w-idth:100%;border: 0px; vertical-align: top;" >
					<div id="data_container" style="overflow:auto; overflow-y:auto;text-align:right;margin-left:10px;"></div>
					<div id="gridbox" style="background-color:white; margin-left:10px; width:100%;height:100%;display:none;"></div>
			
					<table id="SLPageNavSection" style="margin-top:5px;mar-gin-left:160px;" border="0" width="100%">
						<tr>
							<td width="95%">
								<table cellpadding='0' cellspacing='0' border='0' align="center">
									<tr>
										<td align='center' width="30">
											<script type="text/javascript">m_objMqButton.WriteButtonHTML("FirstPage","MoveFirst();","MoveFirst",false,m_objMqButton.STATE_EN,g_MqRef.RESX['BUTTON_FIRST_PAGE'],"","","<i class=\"fa fa-angle-double-left fa-2x\"><\/i>");</script>
										</td>
										<td align='center' width="30">
											<script type="text/javascript">m_objMqButton.WriteButtonHTML("PreviousPage","MovePrev();","PageDown",false,m_objMqButton.STATE_EN,g_MqRef.RESX['BUTTON_PREVIOUS_PAGE'],"","","<i class=\"fa fa-angle-left fa-2x\"><\/i>");</script>
										</td>
										<td>
											<div class='PageNavigation' id='PageCaption' style="padding-left:10px; padding-right:10px; color:#666666 !important;"></div>
										</td>
										<td align='center' width="30">
											<script type="text/javascript">m_objMqButton.WriteButtonHTML("NextPage","MoveNext();","PageUp",false,m_objMqButton.STATE_EN,g_MqRef.RESX['BUTTON_NEXT_PAGE'],"","","<i class=\"fa fa-angle-right fa-2x\"><\/i>");</script>
										</td>
										<td align='center' width="30">
											<script type="text/javascript">m_objMqButton.WriteButtonHTML("LastPage","MoveLast();","MoveLast",false,m_objMqButton.STATE_EN,g_MqRef.RESX['BUTTON_LAST_PAGE'],"","","<i class=\"fa fa-angle-double-right fa-2x\"><\/i>");</script>
										</td>
										
									</tr>
								</table>
							</td>
							<td style="text-align:left;" >
							
								<script type="text/javascript">
									if(parent.SWITCH_VT_ALLOWED){
										document.write('<img src="../../theme/images/buttons/' + m_strSwitchViewImg + '" id="cmdSwitchView" name="cmdSwitchView" style="cursor:hand; cursor:pointer" onclick="SwitchView();" title="' + m_strSwitchViewTooltip + '" />');
									}
								</script>
							</td>
						</tr>
					</table>
					<div id="paging_here" style="display:none"></div>
				</td>
				<td  valign="top" >
					<div id="SidePanelMenu" scrolling="auto" style="display:none;white-space: nowrap;padding-left:5px;padding-right:19px;overflow-x:hidden;overflow-y:auto;">
						<script type="text/javascript">

							if (this.WriteSidePanel)
							{
								var oSP=document.getElementById("SidePanelMenu");
								oSP.style.display=""; 
								oSP.style.width="150px"; 
								WriteSidePanel();
								
							}
						
							if(m_lngViewType==VIEW_TYPE_LIST){
								if(typeof(GroupBy)!="undefined"){
									var lngGroupByCol=GroupBy;
					
									if(lngGroupByCol>=0){
										document.write('<span class="PageNavigation" style="position:absolute; bottom:60px; right: 22px; color:#666666 !important; height:20px;"><a href="#" onclick="ToggleGrid(true)" class="PageNavigation" style="color:#666666 !important;"><img src="../../Js/codebasegrid/IMGS/plus.gif" border="0" /> Expand All</a> / <a href="#" onclick="ToggleGrid(false)" class="PageNavigation" style="color:#666666 !important;"><img src="../../Js/codebasegrid/IMGS/minus.gif" border="0" /> Collapse All</a></span>');
									}
								}
							}
						</script>
					</div>
				</td>	
			</tr>
		</table>
		<iframe id="fraSLSrc" name="fraSLSrc" src="blank.htm" style="display:none;width:100px; height:0px"></iframe>
    </form>
    

    <script type="text/javascript">
   
		function onLoad()
		{
			loaded=true;
			initialized=true;
			
			ResizeGrid();			
			parent.g_VWS.SummaryList().Load();

			if(parent.m_blnStartGridCollapsed){
				CollapseGrid();
			}
		}
		
		function CollapseGrid()
		{
			if(mDataGrid){
				ToggleGrid(false);
			}else{
				window.setTimeout("CollapseGrid()", 50);
			}
		}

        function CreateSummaryListHeader()
        {
			if (!m_SLHbusy){
				m_SLHbusy=true;
			if (document.all && parent.objFrames.exists(SUM_LIST_HEADER_FRAME_ID)){
			    
				var docSLHeader=parent.SumListHeader.document;
				
				var strSLHeader=GetSLHeaderHTML(document.all.SumListTable, docSLHeader, parent.m_strTheme);
				
				with (docSLHeader){
					open();
					write(strSLHeader);
					close();
				}
			}
				m_SLHbusy=false;
			}
		}
		
		function GetSLHeaderHTML(objHTMLTable, objHTMLDocTarget, strTheme){
			
			if (objHTMLTable){
			
				var intMax=objHTMLTable.rows.length-1;
				var strHeader;
				var CELL_SPACING=1;
				var CELL_PADDING=3;
				var strCol="<td align='middle' class='HeaderSummaryListCellLeft' width='16px' title=''><div>&#160;</div></td>";
				var blnFlag;
				
				if(intMax>=0){
					var count=0;
					var BORDER_DIFF=0;
					var CELL_SPACING_DIFF=0;
						
					var oRow=objHTMLTable.rows(intMax);
					var lngHorAdjustment= (CELL_PADDING * 2) + BORDER_DIFF + CELL_SPACING_DIFF;
					var objCell;
					var strTitle="";
					var strCaption="";
					
					for (j=1; j < oRow.cells.length; j++) {
						blnFlag=false;
						objCell=oRow.cells(j);
						
						if(objCell.getAttribute("MqImg")!=null){
							strTitle=objCell.title;
							strCaption="<img border='0' name='ImgHeader' src ='" + objCell.getAttribute("MqImg") + "'>";
						}else{
							strTitle=objCell.innerText;
							strCaption=strTitle;
						}
						
					    strCol+="<td align='middle' class='HeaderSummaryListCellCenter' width='" + 
								(objCell.clientWidth - lngHorAdjustment ) + "px' title='" +
								strTitle + "'><div class='HeaderSummaryListCellCenterText' >" +
								strCaption + "</div></td>";
					}
				        
						
				}else{
					if (objHTMLDocTarget){
						strCol+="<td align='middle' class='HeaderSummaryListCellCenter' width='" +
								(objHTMLDocTarget.body.clientWidth - 28) + "px' >&nbsp;</td>";
					}
				}
					
				strHeader ="<html><head><link rel='stylesheet' type='text/css' href='" + strTheme + "'/><\/head>";
				strHeader+="<body onload='loaded=true;initialized=true;'><form name='SummaryListHeader'>";
				strHeader+="<table id=SumListTable border='0' width='100%' cellpadding='" + CELL_PADDING;
				strHeader+="' class='" + parent.CSS_SL_HEADER_BODY + "' cellspacing='" + CELL_SPACING + "' ><tr>";
				strHeader+=strCol;
				strHeader+="<td width=12 class='HeaderSummaryListCellRight' >&nbsp;<\/td>";
				strHeader+="<\/tr><\/table><\/form><\/html>";
			}
			
			return "";
		}
		
	function ApplyDynamicRows()
	{
		// Matching Condition
		var COND_FIELD="Priority";
		var COND_VALUE="1 - Critical";
		
		// Matching row font Color
		var MATCH_COLOR="#b22222";
		var MATCH_FONT_WEIGHT="700";
		
		var objTable=document.getElementById("SumListTable");

		if (objTable){
			var oRows=objTable.rows;			
		
			if (oRows){
				if (parent.IE4){
					var intMax=oRows.length-1;
				}else{
					var intMax=0;
				}
				var intColumn=-1;
				
				if(intMax>=0){
						
					var objRow=oRows.item(intMax);
						
					intColumn=FindColumn(COND_FIELD,objRow);
				
					if (intColumn>0){
						for (j=0; j < oRows.length; j++) {
							objRow=oRows.item(j);	

						    if (objRow.cells.item(intColumn).innerHTML==COND_VALUE){
								//objRow.style.color=MATCH_COLOR;
								objRow.style.fontWeight=MATCH_FONT_WEIGHT;
						    }
						}
					}
				}
			}	
		}
	}
	
	function FindColumn(strFieldName, objRow)
	{
		if (objRow){
			
			for (j=0; j < objRow.cells.length; j++) {

			    if (objRow.cells.item(j).innerHTML==strFieldName){
					
					return j;
			    }
			}
				
		}
			
	}
	
	function CardPicError(source)
	{
		source.src=parent.MISSING_ITEM_PIC;
		source.onerror="";
		return true;
	}
	
	function ResTypeError(sourceImg, altPath)
	{
		sourceImg.src="../../theme/images/images/res_default_small.png";
		sourceImg.onerror="";
		sourceImg.width="32";
		sourceImg.height="32";
		return true;
	}
	
	var blnShowButton118=false;
	var blnShowButton119=false;
	if(parent){
		if(parent.objFrames){
			var winTopTB=parent.objFrames.GetFrameWindow(parent.TOPTOOLBAR_FRAME_ID);
			if (winTopTB){
				blnShowButton118=winTopTB.blnHasFeature118;
				blnShowButton119=winTopTB.blnHasFeature119;
			}
		}
	}
	
	function ToggleSidePanel()
	{
		if(parent.mblnShowSidePanel==false){
			var oSP=document.getElementById("SidePanelMenu");
			if(oSP){
				oSP.style.display="none"; 
				oSP.style.width="0px"; 
			}
		}
	}
	ToggleSidePanel();

	</script>

	<!-- Employees -->
	<textarea id="displayEmp18" name="displayEmp18" style="display:none;"> 
		<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> 
			<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">
				<tr>
					<td valign="middle" rowspan="2">
						<div class="cardPicFrame" style="cursor:hand;cursor:pointer">
							<img src="viewicon.asp?Rec={obj.id}&Proj=8" onerror="CardPicError(this);" class="cardPicSizer" />
						</div>
					</td>
					<td valign="top" style="padding-top:10px" width="80%">
						<div class="displayCardText">
							<div class="displayEmp_name">{obj.tblUser_tName}</div> 
							<div class="displayEmp_title">{obj.JobPosition_Job_Position}</div> 
							<div class="displayEmp_mail"><a href='mailto:{obj.tblUser_tEmailName}' onclick="(arguments[0]||event).cancelBubble=true">{obj.tblUser_tEmailName}</a></div> 
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom" width="80%">
						<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">		
							<img src="../../theme/images/buttons/manage.png" id="cmdManage{obj.id}" name="cmdManage{obj.id}" onclick="EditEmpResInfo({obj.id},'{obj.tblEmploymentStatus_Employment_Status}');(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;width:32px;" title="View Assets" class="<script>document.write(m_strMgtButtonClass)</script>" onmouseover="this.className=m_strMgtButtonClassHover" onmouseout="this.className=m_strMgtButtonClassOut" />
							<img src="../../theme/images/buttons/edit.png" id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" onclick="EditEmployeeInfo({obj.id},'{obj.tblEmploymentStatus_Employment_Status}');(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Edit Employee Information" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
							<img src="../../theme/images/buttons/editroles.png" id="cmdEditRoles{obj.id}" name="cmdEditRoles{obj.id}" onclick="EditEmployeeRoleInfo({obj.id},'{obj.tblEmploymentStatus_Employment_Status}');(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Change Employee Roles" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
							<img src="../../theme/images/buttons/delete.png" id="cmdDelete{obj.id}" name="cmdDelete{obj.id}" onclick="TerminateEmployee({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Terminate Employee" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
						</div>
					</td>
				</tr>
				
			</table>
		</div> 
	</textarea> 
	<script type="text/javascript">
		//<!-- Roles -->
		var strCardHTML='<textarea id="displayEmp17" name="displayEmp17" style="display:none;">' + 
						'<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> ' +
						'<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">' +
						'<tr>' +
						'<td valign="middle" rowspan="2">' +
						'<div class="cardPicFrame" style="cursor:hand;cursor:pointer">' +
						'<img src="viewicon.asp?Rec={obj.id}&Proj=' + parent.m_lngProjID + '" oner-ror="CardPicError(this);" class="cardPicSizer" />' +
						'</div>' +
						'</td>' +
						'<td valign="top" style="padding-top:10px" width="80%">' +
						'<div class="displayCardText">'+
							'<div class="displayEmp_name">{obj.tblDts_tBriefDescription}</div> ' +
							'<div class="displayEmp_title">{obj.tblDts_mDetailedDescription}</div> ' +
						'</div>' +
						'</td></tr>' +
						'<tr><td valign="bottom" width="80%">' +
						'<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">' +
						'<img src="../../theme/images/buttons/manage.png" id="cmdManage{obj.id}" name="cmdManage{obj.id}" onclick="EditRoleResInfo({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;width:32px;" title="View Assets" class="' + m_strMgtButtonClass + '" onmouseover="this.className=m_strMgtButtonClassHover" onmouseout="this.className=m_strMgtButtonClassOut" />' +
						'<img src="../../theme/images/buttons/edit.png" id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" onclick="EditRoleInfo({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Edit Information" class="actionButton" onmouseover="this.className=\'actionButtonHover\'" onmouseout="this.className=\'actionButton\'" />';
						
						
						if(blnShowButton118){
							strCardHTML+='<img src="../../theme/images/buttons/delete.png" id="cmdDelete{obj.id}" name="cmdDelete{obj.id}" onclick="parent.onClickControls(\'DeleteIssue\', {obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Delete" class="actionButton" onmouseover="this.className=\'actionButtonHover\'" onmouseout="this.className=\'actionButton\'" />';
						}
		strCardHTML+='<\/script>' +
						'<\/div>' +
						'<\/td>' +
						'<\/tr>	' +
						'<\/table>' +
						'<\/div> ' +
						'<\/textarea>';
	
		document.write(strCardHTML);
		
</script>
		
<!-- Locations -->
		
	<textarea id="displayEmp50" name="displayEmp50" style="display:none;"> 
	<div class="CardExt" id="dvCard{obj.id}" name="dvCard{obj.id}">
		<div class="CardMiddle" >
			<div class="CardPicExt" >
				<img src="viewicon.asp?Rec={obj.id}&Proj=14"
				onerror="CardPicError(this);" class="CardPic" >
			</div>
			<div class="CardText">
				<div id="DD_Fld_Value_{obj.id}" class="displayEmp_name_large" >{obj.tblDts_Short_Name}</div> 
				<div class="displayEmp_title ">{obj.tblDts_tBriefDescription}</div> 
				<div class="displayEmp_title">{obj.tblDts_mDetailedDescription}</div>
				<div id="Level_{obj.id}" style="display:none">{obj.tblItemLevel_Item_Level}</div> 
				<div id="DD_Fld_Value_Full_{obj.id}" style="display:none">{obj.tblDts_tBriefDescription}</div> 
			</div>
			<div class="CardActionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">
				<i id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" class="fa fa-pencil-square-o"
					onclick="EditRoleInfo({obj.id});(arguments[0]||event).cancelBubble=true" title="View Details" > </i>
				<i id="cmdManage{obj.id}" name="cmdManage{obj.id}" class="fa fa-list"
					onclick="EditRoleResInfo({obj.id});(arguments[0]||event).cancelBubble=true" title="View Assets"> </i>
				<i id="cmdDelete{obj.id}" name="cmdDelete{obj.id}" class="fa fa-times" vnfeature="118"
					onclick="parent.onClickControls('DeleteIssue', {obj.id});(arguments[0]||event).cancelBubble=true" title="Delete" ></i>

			</div>
		</div>
	</div>
	</textarea>

	<!-- Asset Library -->
	<textarea id="displayEmp44" name="displayEmp44" style="display:none;"> 
		<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> 
			<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">
				<tr>
					<td valign="middle" rowspan="2">
						<div class="cardPicFrame" st-yle="cursor:hand;cursor:pointer">
							<img src="viewicon.asp?Rec={obj.id}&Proj=15" onerror="CardPicError(this);" class="cardPicSizer" />
						</div>
					</td>
					<td valign="top" style="padding-top:10px" width="80%">
						<div class="displayCardText">
							<div id="DD_Fld_Value_{obj.id}" class="displayEmp_name_large" onmous-eover="ShowDDArea({obj.id}, true)" onmous-eout="ShowDDArea({obj.id}, false)" onc-lick="TriggerDD({obj.id})">{obj.tblDts_tBriefDescription}</div> 
							<div class="displayEmp_title">{obj.tblDts_Asset_Tag}</div> 
							<div id="Level_{obj.id}" style="display:none">{obj.tblItemLevel_Item_Level}</div>
							<div id="TopLevel_{obj.id}" style="display:none">{obj.tblDts_Level_1}</div>
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom" width="80%">	
						<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">		
							<img src="../../theme/images/buttons/edit.png" id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" onclick="EditResInfo({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Edit Asset Information" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
						</div>
					</td>
				</tr>
				
			</table>
		</div> 
	</textarea> 
	
	<!-- Asset Types -->
	<textarea id="displayEmp20" name="displayEmp20" style="display:none;"> 
		<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> 
			<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">
				<tr>
					<td valign="middle" rowspan="2">
						<div class="cardPicFrame" sty-le="cursor:hand;cursor:pointer">
							<img src="viewicon.asp?Rec={obj.id}&Proj=15" onerror="CardPicError(this);" class="cardPicSizer" />
						</div>
					</td>
					<td valign="top" style="padding-top:10px" width="80%">
						<div class="displayCardText">
							<div id="DD_Fld_Value_{obj.id}" class="displayEmp_name_large" onmo-useover="ShowDDArea({obj.id}, true)" onmou-seout="ShowDDArea({obj.id}, false)" oncl-ick="TriggerDD({obj.id})">{obj.tblDts_tBriefDescription}</div> 
							<div id="DD_Has_More_{obj.id}" style="display:none">{obj.tblYesNo_1_Has_Child_Asset_Groups}</div>
							<div class="displayEmp_title">{obj.tblDts_mDetailedDescription}</div> 
							<div id="Level_{obj.id}" style="display:none">{obj.tblItemLevel_Item_Level}</div>
							<div id="TopLevel_{obj.id}" style="display:none">{obj.tblDts_Level_1}</div>
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom" width="80%">	
						<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">		
							<img src="../../theme/images/buttons/dd.png" id="cmdDD{obj.id}" name="cmdDD{obj.id}" onclick="parent.m_objSLDD.TriggerDrillDownQuery({obj.id});(arguments[0]||event).cancelBubble=true" style="cursor:hand;cursor:pointer;" title="Drill Down" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
							<img src="../../theme/images/buttons/edit.png" id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" onclick="EditResInfo({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Edit Asset Information" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
							<img src="../../theme/images/buttons/delete.png" id="cmdDelete{obj.id}" name="cmdDelete{obj.id}" onclick="parent.onClickControls('DeleteIssue', {obj.id});(arguments[0]||event).cancelBubble=true" style="cursor:hand;cursor:pointer;" title="Delete" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
						</div>
					</td>
				</tr>
				
			</table>
		</div> 
	</textarea> 
	
	<!-- My Assets -->
	<textarea id="displayEmp62" name="displayEmp62" style="display:none;"> 
		<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> 
			<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">
				<tr>
					<td valign="middle" rowspan="2">
						<div class="cardPicFrame" st-yle="cursor:hand;cursor:pointer">
							<img src="viewicon.asp?Rec={obj.id}&Proj=15" onerror="CardPicError(this);" class="cardPicSizer" />
						</div>
					</td>
					<td valign="top" style="padding-top:10px" width="80%">
						<div class="displayCardText">
							<div id="DD_Fld_Value_{obj.id}" class="displayEmp_name_large" onmous-eover="ShowDDArea({obj.id}, true)" onmous-eout="ShowDDArea({obj.id}, false)" onc-lick="TriggerDD({obj.id})">{obj.tblDts_tBriefDescription}</div> 
							<div class="displayEmp_title">{obj.tblDts_Asset_Tag}</div> 
							<div id="Level_{obj.id}" style="display:none">{obj.tblItemLevel_Item_Level}</div>
							<div id="TopLevel_{obj.id}" style="display:none">{obj.tblDts_Level_1}</div>
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom" width="80%">	
						<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">		
							<img src="../../theme/images/buttons/edit.png" id="cmdEdit{obj.id}" name="cmdEdit{obj.id}" onclick="EditResInfo({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Edit Asset Information" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
						</div>
					</td>
				</tr>
				
			</table>
		</div> 
	</textarea> 
	
	<!-- Request Assets -->
	<textarea id="displayEmp65" name="displayEmp65" style="display:none;"> 
		<div class="displayEmp" id="dvCard{obj.id}" name="dvCard{obj.id}"> 
			<table width="100%" onmouseover="ShowUserMenus({obj.id}, true)" onmouseout="ShowUserMenus({obj.id}, false)" border="0">
				<tr>
					<td valign="middle" rowspan="2">
						<div class="cardPicFrame" sty-le="cursor:hand;cursor:pointer">
							<img src="viewicon.asp?Rec={obj.id}&Proj=15" onerror="CardPicError(this);" class="cardPicSizer" />
						</div>
					</td>
					<td valign="top" style="padding-top:10px" width="80%">
						<div class="displayCardText">
							<div id="DD_Fld_Value_{obj.id}" class="displayEmp_name_large" onmo-useover="ShowDDArea({obj.id}, true)" onmou-seout="ShowDDArea({obj.id}, false)" oncl-ick="TriggerDD({obj.id})">{obj.tblDts_tBriefDescription}</div> 
							<div id="DD_Has_More_{obj.id}" style="display:none">{obj.tblYesNo_2_Has_Child_Asset_Groups}</div>
							<div class="displayEmp_title">{obj.tblDts_mDetailedDescription}</div> 
							<div id="Level_{obj.id}" style="display:none">{obj.tblItemLevel_Item_Level}</div>
							<div id="TopLevel_{obj.id}" style="display:none">{obj.tblDts_Level_1}</div>
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom" width="80%">	
						<div class="actionButtons" id="actionButtons{obj.id}" name="actionButtons{obj.id}">		
							<img src="../../theme/images/buttons/dd.png" id="cmdDD{obj.id}" name="cmdDD{obj.id}" onclick="parent.m_objSLDD.TriggerDrillDownQuery({obj.id});(arguments[0]||event).cancelBubble=true" style="cursor:hand;cursor:pointer;" title="Drill Down" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
							<img src="../../theme/images/buttons/requestasset.png" id="cmdRequest{obj.id}" name="cmdRequest{obj.id}" onclick="RequestAsset({obj.id});(arguments[0]||event).cancelBubble=true"  style="cursor:hand;cursor:pointer;" title="Request Asset" class="actionButton" onmouseover="this.className='actionButtonHover'" onmouseout="this.className='actionButton'" />
						</div>
					</td>
				</tr>
				
			</table>
		</div> 
	</textarea> 
	</body>
</html>