<!--#include file="../../owFunctions/I_GeneralFunctions.asp"-->
<%
	'************************************************************************************
	'*																					*
	'*	MODIFICATION TO THIS SCRIPT OR ANY FILES INCLUDED WITH 							*
	'*		ONEWORLDSTORE IS DONE AT YOUR OWN RISK!										*
	'*	Product  : OneWorldStore														*
	'*	Version  : 9.0000																*
	'*	Modified : June 2004															*
	'*	Copyright:	Copyright (C) 2004 OneWorldStore.Com								*
	'*				Registration Number: 1024507										*
	'*				http://strategis.ic.gc.ca/											*
	'*																					*
	'************************************************************************************
	Dim sMessage, sPage, sGroupUnq
	sMessage	= Trim(Request("sMessage"))
	sPage		= Trim(Request("sPage"))
	sGroupUnq	= Trim(Request("sGroupUnq"))

	If ( sGroupUnq = "" ) Then sGroupUnq = "-1" End If
	%>
	<!--#include file="../header.asp"-->
	<script type="text/javascript" src="../Script/fValConfig.js"></script>
	<script type="text/javascript" src="../Script/fValidate.js"></script>
	
	<body style="font-family: Arial; font-size: 11px" topmargin="0" leftmargin="0" bgcolor=C3DAF9>
		<div id="tablediv" style="position: absolute; top: 0px; height: 100%; width:100%">
		<table border="0" cellpadding="0" cellspacing="0" style="font-size: 11px">
			<tr>
				<td width=9 height="25"><img src='../images/bev_left.gif'></td>
				<td height="25" style="BORDER-RIGHT: #aaaaaa 0px solid; BORDER-LEFT: #ffffff 0px solid; " bgcolor="#C3DAF9" background='../images/bev_center.gif'>
					<%If ( bOWBackOfficeDemoMode ) Then%>
					<%If ( sPage = "" ) Then%>
					<span	onmouseover="delcontact.src='../images/delcontact.gif'; window.status = '<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
							onmouseout="delcontact.src='../images/delcontact_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
							onclick="alert('<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>')" 
							style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">
							<img name=delcontact  border="0" src="../images/delcontact_bw.gif" align="absmiddle">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">&nbsp;<%=LANG_DT( "DELETE", "Delete" )%>&nbsp;
					</span>
					<%ElseIf ( sPage = "ModifyCustomer" ) Then%>
					<span	onmouseover="delcontact.src='../images/delcontact.gif'; window.status = '<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
							onmouseout="delcontact.src='../images/delcontact_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
							onclick="alert('<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>')" 
							style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">
							<img name=delcontact  border="0" src="../images/delcontact_bw.gif" align="absmiddle">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">&nbsp;<%=LANG_DT( "DELETE", "Delete" )%>&nbsp;
					</span>
					<%End If%>
					<%Else%>
					<%If ( sPage = "" ) Then%>
					<span	onmouseover="delcontact.src='../images/delcontact.gif'; window.status = '<%=LANG_DT( "CUSTOMER_REMOVE_PLURAL", "Remove selected customers and their orders." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
							onmouseout="delcontact.src='../images/delcontact_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
							onclick="if (confirm('<%=LANG_DT( "CUSTOMERS_DELETECONFIRM", "Are you sure you wish to delete these customers and their orders?" )%>')) {parent.owBody.CustomerList.sAction.value='Delete'; parent.owBody.CustomerList.submit();};" 
							style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">
							<img name=delcontact  border="0" src="../images/delcontact_bw.gif" align="absmiddle">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">&nbsp;<%=LANG_DT( "DELETE", "Delete" )%>&nbsp;
					</span>
					<%ElseIf ( sPage = "ModifyCustomer" ) Then%>
					<span	onmouseover="delcontact.src='../images/delcontact.gif'; window.status = '<%=LANG_DT( "CUSTOMER_REMOVE_SINGULAR", "Remove this customer and all their orders." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
							onmouseout="delcontact.src='../images/delcontact_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
							onclick="if (confirm('<%=LANG_DT( "CUSTOMERS_DELETECONFIRM2", "Are you sure you wish to delete this customer and all their orders?" )%>')) {parent.owBody.delcustomer.sAction.value='Delete'; parent.owBody.delcustomer.submit();};" 
							style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">
							<img name=delcontact  border="0" src="../images/delcontact_bw.gif" align="absmiddle">
							<img src="../images/Blank.gif" width=2 height=20 align="absmiddle">&nbsp;<%=LANG_DT( "DELETE", "Delete" )%>&nbsp;
					</span>
					<%End If%>
					<%End If%>
					&nbsp;
	
					<a href="owListCustomers.asp" class='BoxedLinks' target='owBody'>&nbsp;<%=LANG_DT( "ALL", "All" )%>&nbsp;&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=a" class='BoxedLinks' target='owBody'>&nbsp;A&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=b" class='BoxedLinks' target='owBody'>&nbsp;B&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=c" class='BoxedLinks' target='owBody'>&nbsp;C&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=d" class='BoxedLinks' target='owBody'>&nbsp;D&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=e" class='BoxedLinks' target='owBody'>&nbsp;E&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=f" class='BoxedLinks' target='owBody'>&nbsp;F&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=g" class='BoxedLinks' target='owBody'>&nbsp;G&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=h" class='BoxedLinks' target='owBody'>&nbsp;H&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=i" class='BoxedLinks' target='owBody'>&nbsp;I&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=j" class='BoxedLinks' target='owBody'>&nbsp;J&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=k" class='BoxedLinks' target='owBody'>&nbsp;K&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=l" class='BoxedLinks' target='owBody'>&nbsp;L&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=m" class='BoxedLinks' target='owBody'>&nbsp;M&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=n" class='BoxedLinks' target='owBody'>&nbsp;N&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=o" class='BoxedLinks' target='owBody'>&nbsp;O&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=p" class='BoxedLinks' target='owBody'>&nbsp;P&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=q" class='BoxedLinks' target='owBody'>&nbsp;Q&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=r" class='BoxedLinks' target='owBody'>&nbsp;R&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=s" class='BoxedLinks' target='owBody'>&nbsp;S&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=t" class='BoxedLinks' target='owBody'>&nbsp;T&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=u" class='BoxedLinks' target='owBody'>&nbsp;U&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=v" class='BoxedLinks' target='owBody'>&nbsp;V&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=w" class='BoxedLinks' target='owBody'>&nbsp;W&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=x" class='BoxedLinks' target='owBody'>&nbsp;X&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=y" class='BoxedLinks' target='owBody'>&nbsp;Y&nbsp;</a>	
					<a href="owListCustomers.asp?sSearch=FirstChar&sSearchText=z" class='BoxedLinks' target='owBody'>&nbsp;Z&nbsp;</a>	
				</td>
				<td width=9 height="25"><img src='../images/bev_right.gif' height="25"></td>
			</tr>
		</table>
	

		<table width=100% border="0" cellpadding="0" cellspacing="0" style="font-size: 11px">
		<form action='owListCustomers.asp' method='post' name='CustomerList' target="owBody">
			<input type='hidden' name='sAction' value=''>
			<input type='hidden' name='sGroupUnq' value='<%=sGroupUnq%>'>
			<tr bgcolor="#C3DAF9">
				<td>
					<table border="0" cellpadding="0" cellspacing="0" style="font-size: 11px">
						<tr bgcolor="#C3DAF9">
							<td width=9 height="25"><img src='../images/bev_left.gif' height="25"></td>
							<td align="center" style="padding-left: 6px;" background='../images/bev_center.gif'>
								<img src='../images/icons/owSearch.gif' width=16>
							</td>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<select name='sSearch' style="font-size: 9px; border: 0px;">
									<option value='LName'><%=LANG_DT( "CUSTOMER_LNAME", "Last Name" )%></option>
									<option value='FName'><%=LANG_DT( "CUSTOMER_FNAME", "First Name" )%></option>
									<option value='Company'><%=LANG_DT( "CUSTOMER_COMPANY", "Company" )%></option>
									<option value='Email'><%=LANG_DT( "CUSTOMER_EMAIL", "Email" )%></option>
									<option value='Phone'><%=LANG_DT( "CUSTOMER_PHONE", "Phone" )%></option>
								</select>
							</td>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<input type="text" name="sSearchText" size="20" style="font-size: 11px; border: 1 solid #cccccc;">
							</td>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<input type='submit' name='Search' value=' <%=LANG_DT( "GO", "Go" )%> ' onClick="CustomerList.sAction.value='Search';">
								
								
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<select name='sAccountType' onChange='parent.owBody.location="owListCustomers.asp?sGroupUnq="+this.value'>
									<option value='0'><%=LANG_DT( "CUSTOMERS_VIEWTYPE", "View Accounts of Type..." )%></option>
									<%
									sSQLText = "SELECT * FROM owAGroups ORDER BY GroupUnq"
									Call DB_getFromDatabase(sSQLText, rsStoreData, "") 
									While ( NOT rsStoreData.EOF )
										If ( CInt(sGroupUnq) = CInt(rsStoreData("GroupUnq")) ) Then
											%><option value='<%=rsStoreData("GroupUnq")%>' selected><%=rsStoreData("Name")%></option><%
										Else
											%><option value='<%=rsStoreData("GroupUnq")%>'><%=rsStoreData("Name")%></option><%
										End If
										rsStoreData.MoveNext
									Wend
									Call DB_closeRecordset(rsStoreData)
									%>
								</select>
							</td>
							<%If ( bOWBackOfficeDemoMode ) Then%>
							<%If ( sPage = "AddCustomer" ) Then%>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<span	onmouseover="addcustomer.src='../images/addcustomer.gif'; window.status = '<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
										onmouseout="addcustomer.src='../images/addcustomer_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
										onclick="alert('<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>')" 
										style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>
										<img name=addcustomer  border=0 src="../images/addcustomer_bw.gif" align=absmiddle>
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>&nbsp;<%=LANG_DT( "SAVE", "Save" )%>&nbsp;
								</span>
							</td>
							<%End If%>
							<%If ( sPage = "ModifyCustomer" ) Then%>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<span	onmouseover="modifycustomer.src='../images/modifycustomer.gif'; window.status = '<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
										onmouseout="modifycustomer.src='../images/modifycustomer_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
										onclick="alert('<%=LANG_DT( "GLOBAL_FUNCTION_DISABLED", "Function Disabled in Demo." )%>')" 
										style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>
										<img name=modifycustomer  border=0 src="../images/modifycustomer_bw.gif" align=absmiddle>
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>&nbsp;<%=LANG_DT( "SAVE", "Save" )%>&nbsp;
								</span>
							</td>
							<%End If%>
							<%Else%>
							<%If ( sPage = "AddCustomer" ) Then%>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<span	onmouseover="addcustomer.src='../images/addcustomer.gif'; window.status = '<%=LANG_DT( "CUSTOMER_SAVENOTE", "Save this new customer to the store." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
										onmouseout="addcustomer.src='../images/addcustomer_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
										onclick="if ( validateForm( parent.owBody.addCust, false, false, false, true, 17 ) ) parent.owBody.addCust.submit();" 
										style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>
										<img name=addcustomer  border=0 src="../images/addcustomer_bw.gif" align=absmiddle>
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>&nbsp;<%=LANG_DT( "SAVE", "Save" )%>&nbsp;
								</span>
							</td>
							<%End If%>
							<%If ( sPage = "ModifyCustomer" ) Then%>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<span	onmouseover="modifycustomer.src='../images/modifycustomer.gif'; window.status = '<%=LANG_DT( "CUSTOMER_SAVENOTE2", "Save the changes you have made to this customer." )%>'; this.style.background='#F5C058'; this.style.border='1px solid #cccccc';" 
										onmouseout="modifycustomer.src='../images/modifycustomer_bw.gif'; window.status = ''; this.style.background='transparent'; this.style.border='1px solid #C3DAF9';" 
										onclick="if ( validateForm( parent.owBody.modifyCust, false, false, false, true, 17 ) ) parent.owBody.modifyCust.submit();" 
										style="cursor: hand; border: 1px solid #C3DAF9; padding-right:0px;">
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>
										<img name=modifycustomer  border=0 src="../images/modifycustomer_bw.gif" align=absmiddle>
										<img src="../images/Blank.gif" width=2 height=20 align=absmiddle>&nbsp;<%=LANG_DT( "SAVE", "Save" )%>&nbsp;
								</span>
							</td>
							<%End If%>
							<%End If%>
							<%If ( sMessage <> "" ) Then%>
							<td align="center" background='../images/bev_center.gif' >&nbsp;&nbsp;</td>
							<td align="center" background='../images/bev_center.gif' >
								<b><%=sMessage%></b>
							</td>
							<%End If%>
							<td width=9 height="25"><img src='../images/bev_right.gif' height="25"></td>
						</tr>
					</table>
				</td>
			</tr>
		</form>
		</table>
<!--#include file="../footer.asp"-->