<!--#include file="owFunctions/I_GeneralFunctions.asp"-->
<!--#include file="owFunctions/I_StoreFront.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/											*
	'*																					*
	'************************************************************************************

	Call SF_OpenPage()
	Call ActionSubroutine()
	Call SF_ClosePage()

	'************************************************************************************
	'*																					*
	'*																					*
	'*																					*
	'************************************************************************************
	Sub ActionSubroutine()
	
		Dim idLongText, idPage

		idPage		= Trim(Request("idPage"))
		idLongText	= Trim(Request("idLongText"))
		
		If ( idPage <> "" ) Then
			' get a custom page
			sSQLText = "SELECT BodyText AS sBody, PageTitle FROM CustomPages WHERE idPage = " & idPage & " AND Active = 'Y'"
			Call DB_getFromDatabase(sSQLText, rsStoreData, "")
			If ( NOT rsStoreData.EOF ) Then	
				sPageTitle	= rsStoreData("PageTitle")
				sBody		= rsStoreData("sBody")
			Else
				sPageTitle	= ""
				sBody		= LANG_DT( "INFOPAGE_PAGENOTFOUND", "Unable to find page content to display." )
			End If
			Call DB_closeRecordset(rsStoreData)
		ElseIf ( idLongText <> "" ) Then
			' get a system page (terms & conditions, licensing, etc.)
			sBody		= LANG_DT( idLongText, "" )
		End If

	
		%>
		<html>
			<head>
				<TITLE><%=sPageTitle%> - <%=sOWCompany%></TITLE>
			</head>
			
			<BODY BGCOLOR=#FFFFFF>
				<table border="0" cellspacing="0" cellpadding="0" width="100%" height=100%>
					<form>
					<tr>
						<td align=center valign=center>
							<table border=0 style='border: 1px solid #000000;' cellspacing=0 cellpadding=5>
								<tr>
									<td>
										<%=sBody%>
									</td>
								</tr>
								<tr>
									<td align=right style='border-top: 1px solid #000000;'>
										<input type=button name=print value=" <%=LANG_DT( "INFOPAGE_CLOSE", "Close Window" )%> " onClick="javascript:window.close()">
									</td>
								</tr>
							</table>
						</td>
					</tr>
					</form>
				</table>
			</body>
		</html>
		<%
		
	End Sub
	'************************************************************************************
%>