<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title></title>

	<link rel="stylesheet" href="../../js/jquery/jquery.ui.all.css">
	<script src="../../js/jquery/jquery-1.7.1.js"></script>
	<script src="../../js/jquery/jquery.bgiframe-2.1.2.js"></script>
	<script src="../../js/jquery/jquery.ui.core.js"></script>
	<script src="../../js/jquery/jquery.ui.widget.js"></script>
	<script src="../../js/jquery/jquery.ui.mouse.js"></script>
	<script src="../../js/jquery/jquery.ui.draggable.js"></script>
	<script src="../../js/jquery/jquery.ui.position.js"></script>
	<script src="../../js/jquery/jquery.ui.resizable.js"></script>
	<script src="../../js/jquery/jquery.ui.dialog.js"></script>

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
	
	<script type="text/javascript">
		//caller of this window must initialize the LookupItem object
		var m_MainWin=parent;
		if (m_MainWin==self){
			m_MainWin=opener;
		}
		
		var m_objRef = m_MainWin.Record;
		if(!m_objRef){
			m_objRef=m_MainWin;
		}
		if (!m_objRef.m_objLookupItemInfoColl) {
			m_objRef=parent;
		}

		var m_objLookupItemInfo;
		
		if(m_objRef){
			var lngFieldID=m_objRef.g_MqRef.MqStr.GetQueryStringValue(location.search,"FID",false);
			if(isNaN(lngFieldID) == false){
				if(lngFieldID > 0){
					if(m_objRef.m_objLookupItemInfoColl){
						m_objLookupItemInfo=m_objRef.m_objLookupItemInfoColl[lngFieldID];
					}
				}
			}
		}
		
		if(m_objLookupItemInfo){
			var mstrPathPrefix=m_objLookupItemInfo.GlobalObjectRefPathPrefix;
		
			var strRefs='<link rel="stylesheet" href="' + mstrPathPrefix + 'theme/css/censusmain.css" type="text/css">' +
						'<script src="' + mstrPathPrefix + 'js/mqsysutils.js" type="text/javascript"><\/script>' +
						'<script src="' + mstrPathPrefix + 'js/window.js" type="text/javascript"><\/script>' +
						'<script src="' + mstrPathPrefix + 'js/mqlist.js" type="text/javascript"><\/script>' +
						'<script src="' + mstrPathPrefix + 'js/mqformelements.js" type="text/javascript"><\/script>' + 
						'<script src="' + mstrPathPrefix + 'js/tmpllookupitem.js" type="text/javascript"><\/script>' +
						'<script src="' + mstrPathPrefix + 'js/cmqlookupitemint.js" type="text/javascript"><\/script>' +
						'<script src="' + mstrPathPrefix + 'js/cmqsysmsg.js" type="text/javascript"><\/script>' ;
			
			document.write(strRefs);
		}		
	</script>

	<script type="text/javascript">
	<!--
		var objSysMsg = new CMqSysMsg;	
		var m_objMqButton=new MqButton();
		var m_MqList=new MqList();
	
		var m_objFormElement=new CMqFormElement();
		
		var m_strCursor;
		
		var m_lngCurrentPage=0;
		var m_lngPageCount=0;
		var m_lngTotalRecord=0;
		
		var m_arrSelectedIDs;
		var m_arrSelectedValues;
		var m_arrSelectedValuesInternal;
		
		var BTN_DISABLE_ITEMS="DisableItems";
		var BTN_ENABLE_ITEMS="EnableItems";
		
		var m_arrCurrentSelectedIDs_FullList=new Array();
		var m_arrCurrentSelectedNames_FullList=new Array();

		var m_arrCurrentSelectedIDs_SelList=new Array();
		var m_arrCurrentSelectedNames_SelList=new Array();
		
		var m_strTableName=g_MqRef.MqStr.GetQueryStringValue(location.search,"TBL",false);
		
		var TBL_USER="tblUser";
		var TBL_DTS="tblDts";
		var FIELD_ID_ASSOCIATED_ACTION=805;
		var FIELD_ID_DEPENDANT_ACTION=811;
		
		var blnAutoComplete = false;
		
		InitAutoComplete(blnAutoComplete);
		
	//-->
	</script>
</head>

<body id="SelectItems" class="MainBackgroundWizard" style="overflow:auto; padding:0px;margin:0px;" onload="Form_OnLoad();SetListSize(false);" 
onunload="OnBeforeNavigate()" onkeypress="Form_OnKeyPress(event);" onresize="SetListSize(false);">
<div style="padding-left:10px; padding-bottom: 5px;margin-left: 10px;margin-top: 10px;" class="NormalText" id="InstructionText"></div>

<div id="divLoading" class="LoadingMessageGrid">
		<p align="center" class="LoadingMessageGridText">Loading, please wait...</p>
</div>

<table id="tblMain" cellpadding="0" cellspacing="0" border="0" style="width:100%;height:88%;table-layout:fixed;">
<tbody>
<tr >
	<td colspan="2" >
		<div style="text-align:left;width:100%;height:100%" id="ListContainer">
		<table cellpadding="0" cellspacing="0" border="0" style="width:100%;height:100%;table-layout:fixed" id="tblListContainer">
									
			<!--Box Top Border -->
			<tr height="19" >
				<td width="14" class="BoxTLeft"></td>
				<td class="BoxTCenter">&#160;</td>
				<td width="14" class="BoxTRight"></td>
			</tr>
			<!--End of Box Top Border -->	
			<tr style="width:100%">
				<td width="14" class="BoxMLeft">&#160;</td>
				<td class="BoxMCenter" >
					<table cellpadding="0" cellspacing="0" border="0" style="width:100%;">
					<!-- Contents -->
					<tr>
						<td colspan="4" class="NormalText" style="text-align:left; padding-left:5px;color:#000000">
							Filter values where the
							<a id="SearchField" onclick="MqActuator_OnClick(this);" mqlist="SearchField_List"
                            class="actuator" href="#" mqvalue="0">
                            <script type="text/javascript">
								var strHTML="";
								if(m_strTableName==TBL_USER){
									strHTML='Name';
								}else{
									if(m_strTableName==TBL_DTS){
										if(lngFieldID==FIELD_ID_ASSOCIATED_ACTION || lngFieldID==FIELD_ID_DEPENDANT_ACTION){
											strHTML='Action Name';
										}else{
											strHTML='Asset Type Name';
										}
									}else{
										strHTML='Value';
									}
								}
								document.write(strHTML);
							</script>
                            </a>
                            
                        <a id="SearchType" onclick="MqActuator_OnClick(this);" mqlist="SearchType_List"
                            class="actuator" href="#" mqvalue="0">
                             Starts with...
                        </a>
                        
						</td>
					</tr>
					<tr>
						<td align="left" style="padding-left:5px; width:70%">
							<input type="text" name="txtFind" id="txtFind" class="AdminTextBoxWidth" style="width:98%" onmouseover="this.className='AdminTextBoxWidthHover';" onmouseout="this.className='AdminTextBoxWidth';" onkeydown="OnChangeFind(event)" />
						</td>
						<td style="padding-right:15px;padding-left:15px">
							<script type="text/javascript">
								<!--
								m_objMqButton.WriteButtonHTML("Refresh","DoSearch();","Refresh",false,m_objMqButton.STATE_1,"Refresh");
								//-->
							</script>
						</td>
						<td id="tdShowAllBtn">
							<script type="text/javascript">
								<!--
								//m_objMqButton.WriteButtonHTML("ShowAll","ShowAll();","ShowAll",false,m_objMqButton.STATE_1,"Show All");
								//-->
							</script>
						</td>
						<td id="tdAddNewBtn">
							<script type="text/javascript">
								<!--	
								/*if(m_strTableName==TBL_USER){
									m_objMqButton.WriteButtonHTML("AddNew","AddNewUser();","AddNew2",false,m_objMqButton.STATE_1,"Add New");
								}else{
									if(m_strTableName==TBL_DTS){
										if(lngFieldID==FIELD_ID_ASSOCIATED_ACTION || lngFieldID==FIELD_ID_DEPENDANT_ACTION){
											m_objMqButton.WriteButtonHTML("AddNew","AddNewAction();","AddNew2",false,m_objMqButton.STATE_1,"Add New");
										}else{
											m_objMqButton.WriteButtonHTML("AddNew","AddNewResource();","AddNew2",false,m_objMqButton.STATE_1,"Add New");
										}
									}else{*/
										document.write("&#160;");
									//}
								//}
								//-->
							</script>
						</td>
					</tr>
					<tr>
						<td colspan="4" style="width:100%;padding-top:5px; padding-bottom:5px; padding-right:5px; padding-left:5px;" valign="top">
							<iframe src="blank.htm" name="fraDisplayItems" id="fraDisplayItems" frameborder="0" width="100%" height="100%" 
							style="border: #BDBECE 1px solid; overflow:hidden;" tabIndex="1"></iframe>
						</td>
					</tr>
					<tr>
						<td colspan="4">
							<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>
					</tr>
					<tr id="selectedItemInfo" name="selectedItemInfo">
						<td colspan="4" style="padding-left:5px; padding-right:5px; padding-bottom:5px;padding-top:5px;" width="100%">
							<hr class="LineSep">	
							<table border="0" width="70%" style="margin-top:5px;">
								<tr>
									<td width="25%">
										<span class="DialogLabel" id="SelectedItemsTextSimple"></span>
									</td>
									<td width="75%">
										<textarea wrap="physical" class="LookupItemResults" style="padding-top: 0px;" rows="1" cols="51" name="memSelectedItems" id="memSelectedItems"></textarea>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					</table>
					
				</td>
				<td width="14" class="BoxMRight">&#160;</td>
			</tr>
			<!--End of Box Middle w/table-->

			<!--Box Bottom Border -->
			<tr height="19" >
				<td width="14" class="BoxBLeft"></td>
				<td class="BoxBCenter">&#160;</td>
				<td width="14" class="BoxBRight"></td>
			</tr>
			<!--End of Box Bottom Border -->						                    
		</table>
	</div>
</td></tr>
</table>
	
	<table align="right" width="100">
		<tr>
			<td align="right">
				<script type="text/javascript">
					<!--
					if(m_strTableName!=TBL_DTS){
						m_objMqButton.WriteTextButtonHTML("OK", g_MqRef.RESX["BUTTON_OK"], 'SetListToCaller()', "", 32, "", g_MqRef.RESX["BUTTON_OK"], 90);
					}
					//-->
				</script>				
			</td>

			<td align="right">
				<script type="text/javascript">
					<!--
					if(m_strTableName==TBL_DTS){
						m_objMqButton.WriteTextButtonHTML("Close", g_MqRef.RESX["BUTTON_CLOSE"], 'ClosePopup()', "", 32, "", g_MqRef.RESX["BUTTON_CLOSE"], 90);
					}else{
						m_objMqButton.WriteTextButtonHTML("Cancel", g_MqRef.RESX["BUTTON_CANCEL"], 'ClosePopup()', "", 32, "", g_MqRef.RESX["BUTTON_CANCEL"], 90);
					}
					//-->
				</script>				
			</td>
		</tr>
	</table>
	<select id="SearchField_List" class="mqselect" size="5"  
        onmouseover="m_blnOverMenu=true;" onmouseout="m_blnOverMenu=false;"
        onclick="m_MqList.OnClick(this)" onkeypress="m_MqList.OnKeyPress(event,this)" 
        onblur="m_MqList.OnBlur()" onchange="UpdateSearchSettings(this);">
        <script type="text/javascript">
			var strHTML="";
			if(m_strTableName==TBL_USER){
				strHTML='<option value="0">Name</option><option value="1">E-mail</option>';
			}else{
				if(m_strTableName==TBL_DTS){
					if(lngFieldID==FIELD_ID_ASSOCIATED_ACTION || lngFieldID==FIELD_ID_DEPENDANT_ACTION){
						strHTML='<option value="0">Action Name</option>';
					}else{
						strHTML='<option value="0">Asset Type Name</option>';
					}
				}else{
					strHTML='<option value="0">Value</option>';
				}
			}
			document.write(strHTML);
		</script>
    </select>

	<select id="SearchType_List" class="mqselect" size="5"  
        onmouseover="m_blnOverMenu=true;" onmouseout="m_blnOverMenu=false;"
        onclick="m_MqList.OnClick(this)" onkeypress="m_MqList.OnKeyPress(event,this)" 
        onblur="m_MqList.OnBlur()" onchange="UpdateSearchSettings(this);">
            <option value="0">Starts with...</option>
			<option value="1">Contains...</option>
    </select>
	<form name="frmLookupItemContents" id="frmLookupItemContents" method="post" target="fraDisplayItems" class="HiddenObject">
		<input type="hidden" name="WFVals" id="WFVals" />
		<input type="hidden" name="PossVals" id="PossVals" />
	</form>

	<div class="demo" style="display:none">
		<div id="dialog-modal" style="width:100%;height:100%;padding:0px;margin:0px;overflow:hidden">
			<iframe id="dialog-modal-url" width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>
		</div>
		<div id="dialog-modal-orig-width" name="dialog-modal-orig-width" style="display:none"></div>
		<div id="dialog-modal-orig-height" name="dialog-modal-orig-height" style="display:none"></div>
	</div>
</body>
</html>
