<?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>
	<title></title>
	<meta http-equiv="pragma" content="no-cache" />
	<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_objRef = parent.Record;
		var m_objLookupItemInfo;

		if(m_objRef){
			if(!m_objRef.m_objLookupItemInfoColl){
				m_objRef=parent;
			}
		}else{
			m_objRef=parent;
		}
		if(m_objRef){
			if (!m_objRef.m_objLookupItemInfoColl) {
				m_objRef=opener;
			}
		}else{
			m_objRef=opener;
		}
		if(m_objRef){
			if(m_objRef.m_objLookupItemInfoColl){
				var lngFieldID=m_objRef.g_MqRef.MqStr.GetQueryStringValue(location.search,"FID",false);
				if(isNaN(lngFieldID) == false){
					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>';
			
			document.write(strRefs);
		}		
	</script>
	
	<script src="../../JS/TmplLookupItem.js" type="text/javascript"></script>
	<script src="../../JS/CMqLookupItemInt.js" type="text/javascript"></script>

	<script type="text/javascript">
	<!--
		var m_objMqButton=new MqButton();
		var m_MqList=new MqList();
		var m_objRef;
		var objRequest;
		var mstrCurrentLocation;
		
		if(opener){
			if(opener.opener){	
				m_objRef = opener.opener;
				objRequest = m_objRef.objRequest;
				mstrCurrentLocation = m_objRef.mstrCurrentLocation;
			}else{
				if(opener.parent){
					m_objRef = opener.parent;
					objRequest = m_objRef.objRequest;
					mstrCurrentLocation = m_objRef.mstrCurrentLocation;
				}
			}
		}
		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 m_lngFieldID=g_MqRef.MqStr.GetQueryStringValue(location.search,"FID",false);
		
		var TBL_USER="tblUser";
		
		var m_strSelInv="";

		var m_strSelInvItem=g_MqRef.MqStr.GetQueryStringValue(location.search,"Inv",false);
		var m_strSelPartItem=g_MqRef.MqStr.GetQueryStringValue(location.search,"Part",false);
		
		function InitSearchVals()
		{
			SetDefaultSearchField("tBriefDescription");
			SetDefaultSearchMode("1");
		}
	//-->
	</script>
</head>
<body id="SelectItems" class="RecordBody" style="overflow:auto; padding:0px;margin:0px;" onload="Form_OnLoad();SetListSize(false);InitSearchVals();" 
onunload="OnBeforeNavigate()" onkeypress="Form_OnKeyPress(event);" onresize="SetListSize(false);">
<div style="padding-left:10px; padding-bottom: 5px;margin-left: 10px;margin-top: 10px;display:none" class="NormalText" id="InstructionText"></div>

<table id="tblMain" cellpadding="0" cellspacing="0" border="0" style="width:100%;height:88%;table-layout:fixed;">
<tr >
	<td height="98%" width="20%" valign="top">
		<div style="text-align:left;width:100%;height:100%" id="InvContainer">
		<div class="RoundedBox" style="margin-right:10px">
				<table cellpadding="0" cellspacing="0" border="0" style="width:100%;height:100%">
					<!-- Contents -->
					<tr>
						<td class="NormalText" style="padding-left:10px">
							<a id="SearchTypeInvFld" onclick="MqActuator_OnClick(this);" mqlist="SearchTypeInvFld_List"
                            class="actuator" href="#" mqvalue="tBriefDescription">Name</a>
                        &#160;
							<a id="SearchTypeInv" onclick="MqActuator_OnClick(this);" mqlist="SearchTypeInv_List"
                            class="actuator" href="#" mqvalue="1">
                             Contains...
                        </a>
						</td>
					</tr>
					<tr>
						<td align="left" style="padding-left:5px; width:90%">
							<input type="text" name="txtFindInv" id="txtFindInv" class="AdminTextBoxWidth" style="width:95%" onmouseover="this.className='AdminTextBoxWidthHover';" onmouseout="this.className='AdminTextBoxWidth';" onkeydown="OnChangeInvFind(event)" />
						</td>
						<td id="RefreshInv" onclick='DoSearch(false,"tblInvLst");'><i style='font-size:22px;' class='fa fa-refresh'></i></td>

					</tr>
					
					<!--tr>
						<td class="NormalText" style="padding-left:10px; padding-top:5px;" colspan="2">
							Purchase Order contains a Line Item with the description: 
						</td>
					</tr>
					<tr>
						<td align="left" style="padding-left:5px; width:90%">
							<input type="text" name="txtFindInvDesc" id="txtFindInvDesc" value="" class="AdminTextBoxWidth" style="width:95%" onmouseover="this.className='AdminTextBoxWidthHover';" onmouseout="this.className='AdminTextBoxWidth';" onkeyup="OnChangeInvDescFind(event)" />
						</td>
						<td id="RefreshInvDesc" onclick='DoSearch(false,"tblInvLst");'><i style='font-size:22px;' class='fa fa-refresh'></i></td>
						
					</tr-->
					<tr>
						<td colspan="2" style="width:100%;padding-top:5px; padding-bottom:5px; padding-right:5px; padding-left:5px;" valign="top">
							<iframe src="blank.htm" name="fraDisplayInv" id="fraDisplayInv" frameborder="0" width="100%" 
							style="border: #BDBECE 1px solid; overflow:hidden;" tabIndex="1"></iframe>
						</td>
					</tr>
					<!--tr>
						<td colspan="2">
							<table cellpadding='0' cellspacing='0' border='0' align="center">
								<tr>
									<td align='center' width="30">
										<script type="text/javascript">
										m_objMqButton.WriteButtonHTML("MoveFirstInv","MoveFirst('tblInvLst');","MoveFirst",false,m_objMqButton.STATE_1,"First Page");
										</script>
									</td>
									<td align='center' width="30">
										<script type="text/javascript">
										m_objMqButton.WriteButtonHTML("PageDownInv","MovePrev('tblInvLst');","PageDown",false,m_objMqButton.STATE_1,"Previous Page");
										</script>
									</td>
									<td>
										<div style="width:50px">&#160;</div>
									</td>
									<td align='center' width="30">
										<script type="text/javascript">
										m_objMqButton.WriteButtonHTML("PageUpInv","MoveNext('tblInvLst');","PageUp",false,m_objMqButton.STATE_1,"Next Page");
										</script>
									</td>
									<td align='center' width="30">
										<script type="text/javascript">
										m_objMqButton.WriteButtonHTML("MoveLastInv","MoveLast('tblInvLst');","MoveLast",false,m_objMqButton.STATE_1,"Last Page");
										</script>
									</td>
								</tr>
								<tr>
									<td colspan="5">
										<div class='PageNavigation' id='PageCaptionInv' style="padding-left:10px; padding-right:10px;text-align:center"></div>
									</td>
								</tr>
							</table>
						</td>
					</tr-->
					
					</table>
					
				</div>
	</div>
	</td>
	<td valign="top">
		<div  id="InvDetails" >
		<div class="RoundedBox" style="padding-bottom:40px">
					<table class="BoxMCenter" cellpadding="0" cellspacing="0" border="0" width="100%">
					<!-- Contents -->
					<tr width="100%">
						<td rowspan="6" width="50%">
							<div class="DialogLabel" style="color:#000000; font-size:24pt; padding-left:50px;"><nobr> Purchase</nobr></div>
						</td>
						<td style="padding-left:5px; padding-right:5px; paddi-ng-bottom:10px;" width="20%">	
							<div class="DialogLabel" style="color:#000000"><nobr> Purchase Date:</nobr></div>
						</td>
						<td style="padding-left:5px; padding-right:5px; pad-ding-bottom:10px;">	
							<div class="DialogLabel" style="color:#000000"><nobr> Sold to Person:</nobr></div>
						</td>
					</tr>
					<tr>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;" width="30%">	
							<div class="NormalText" id="dvInvDate" name="dvInvDate">--</div>
						</td>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;">	
							<div class="NormalText" id="dvCustName" name="dvCustName">--</div>
						</td>
					</tr>	
					<tr>
					
						<td style="padding-left:5px; padding-right:5px; padd-ing-bottom:10px;" width="20%">	
							<div class="DialogLabel" style="color:#000000"><nobr> Invoice Number:</nobr></div>
						</td>
					</tr>
					<tr>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;" width="30%">	
							<div class="NormalText" id="dvInvNum" name="dvInvNum">--</div>
						</td>
					</tr>
					<tr>
					
						<td style="padding-left:5px; padding-right:5px; padd-ing-bottom:10px;">	
							<div class="DialogLabel" style="color:#000000"><nobr> PO Number:</nobr></div>
						</td>
						<td style="padding-left:5px; padding-right:5px; pa-dding-bottom:10px;">	
							<div class="DialogLabel" style="color:#000000"><nobr> Supplier:</nobr></div>
						</td>
					</tr>
					<tr>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;">	
							<div class="NormalText" id="dvPONum" name="dvPONum">--</div>
						</td>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;">	
							<div class="NormalText" id="dvSupplier" name="dvSupplier">--</div>
						</td>
					</tr>
					</table>	
				
					<table cellpadding="0" cellspacing="0" border="0" style="width:100%;">
					<!-- Contents -->
					
					<tr>
						<td colspan="3" 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="20%" 
							style="border: #BDBECE 1px solid; overflow:hidden;" tabIndex="1"></iframe>
						</td>
					</tr>
					<tr>
					</table>
					<table align="right">
					<tr>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;">	
							<div class="DialogLabel" style="color:#000000"><nobr> Total:</nobr></div>
						</td>
						<td style="padding-left:5px; padding-right:5px; padding-bottom:10px;">	
							<div class="NormalText" id="dvTotal" name="dvTotal">--</div>
						</td>
					</tr>
					</table>
					
				</div>
			</div>
	</div>

	
	
	<div style="position:absolute;right:10px;padding-top:10px">
			<script type="text/javascript">
					<!--
					m_objMqButton.WriteTextButtonHTML("Cancel", g_MqRef.RESX["BUTTON_CANCEL"], 'ClosePopup()', "", 32, "", g_MqRef.RESX["BUTTON_CANCEL"], 90);
					//-->
			</script>	
	</div>
	<div style="position:absolute;right:120px;padding-top:10px">
			<script type="text/javascript">
					<!--
					m_objMqButton.WriteTextButtonHTML("OK", g_MqRef.RESX["BUTTON_OK"], 'SetListToCaller()', "", 32, "", g_MqRef.RESX["BUTTON_OK"], 90);
					//-->
			</script>
	</div>
	<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{
				strHTML='<option value="0">Value</option>';
			}
			document.write(strHTML);
		</script>
    </select>

    
    <select id="SearchTypeInv_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, 'tblInvLst');">
            <option value="0">Starts with...</option>
			<option value="1">Contains...</option>
    </select>
    
    <select id="SearchTypeInvFld_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, 'tblInvLst');">
            <option value="Invoice_Number">Invoice Number</option>
			<option value="PO_Number">PO Number</option>
			<option value="tBriefDescription">Name</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>
</body>
</html>
