<!--#include file="i_Globals.asp"--> 
<!--#include file="i_Database.asp"--> 
<!--#include file="I_Language.asp"-->
<!--#include file="i_Sessions.asp"--> 
<!--#include file="i_Config.asp"-->
<!--#include file="I_Encryption.asp"--> 
<!--#include file="I_Pagination.asp"--> 
<!--#include file="I_Email.asp"--> 
<!--#include file="I_Conversions.asp"-->
<!--#include file="I_Structure.asp"-->
<!--#include file="I_Accounts.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 DB_Connect()
	Call ACCNT_LoginDetect()
	Call Initialize()
	

	'************************************************************************************
	'*																					*
	'*																					*
	'*																					*
	'************************************************************************************
	Sub Initialize()
	
		sOWGatewayID				= owCONFIG_ReturnConfigValue("sOWGatewayID")
		sOWImagesDir				= owCONFIG_ReturnConfigValue("sOWImagesDir")
		sOWCategoryImage			= owCONFIG_ReturnConfigValue("sOWCategoryImage")
		sOWStoreUrlNonSSL			= owCONFIG_ReturnConfigValue("sOWStoreUrlNonSSL")
		sOWCustomerPrefix			= owCONFIG_ReturnConfigValue("sOWCustomerPrefix")
		sOWImageComponent			= owCONFIG_ReturnConfigValue("sOWImageComponent")
		sOWOrderFieldName1			= owCONFIG_ReturnConfigValue("sOWOrderFieldName1")
		sOWOrderFieldName2			= owCONFIG_ReturnConfigValue("sOWOrderFieldName2")
		sOWOrderFieldName3			= owCONFIG_ReturnConfigValue("sOWOrderFieldName3")
		sOWEmailAdmin				= owCONFIG_ReturnConfigValue("sOWEmailAdmin")
		sOWEmailSender				= owCONFIG_ReturnConfigValue("sOWEmailSender")
		sOWSmtpServer				= owCONFIG_ReturnConfigValue("sOWSmtpServer")
		sOWDebugEmail				= owCONFIG_ReturnConfigValue("sOWDebugEmail")
		sOWEmailComponent			= LCase(owCONFIG_ReturnConfigValue("sOWEmailComponent"))
		sOWDateFormat 				= owCONFIG_ReturnConfigValue("sOWDateFormat")
		sOWCurrencySymbol	 		= owCONFIG_ReturnConfigValue("sOWCurrencySymbol")
		sOWCurrencyCode				= owCONFIG_ReturnConfigValue("sOWCurrencyCode")
		sOWDecimalSymbol	 		= owCONFIG_ReturnConfigValue("sOWDecimalSymbol")
		sOWCompany	 				= owCONFIG_ReturnConfigValue("sOWCompany")
		sOWCompanyLogo	 			= owCONFIG_ReturnConfigValue("sOWCompanyLogo")
		sOWOrderPrefix				= owCONFIG_ReturnConfigValue("sOWOrderPrefix")
		sOWEncryptionPassword		= owCONFIG_ReturnConfigValue("sOWEncryptionPassword")
		sOWStoreTableWidth			= owCONFIG_ReturnConfigValue("sOWStoreTableWidth")
		iOWRowsShown				= CInt(owCONFIG_ReturnConfigValue("iOWRowsShown"))
		iOWNumPerPage				= CInt(owCONFIG_ReturnConfigValue("iOWNumPerPage"))
		iOWIDLanguageSchemes		= CInt(owCONFIG_ReturnConfigValue("iOWIDLanguageSchemes"))
		bOWDoNotRoundMoney	 		= CInt(owCONFIG_ReturnConfigValue("bOWDoNotRoundMoney"))
		bOWAllowNewCustomer			= CInt(owCONFIG_ReturnConfigValue("bOWAllowNewCustomer"))
		bOWUseVatNumber				= CInt(owCONFIG_ReturnConfigValue("bOWUseVatNumber"))
		bOWSFDemo 					= CInt(owCONFIG_ReturnConfigValue("bOWSFDemo"))
		bOWDisableState				= CInt(owCONFIG_ReturnConfigValue("bOWDisableState"))
		bOWTaxIncluded				= CInt(owCONFIG_ReturnConfigValue("bOWTaxIncluded"))
		bOWShowBtoBPrice			= CInt(owCONFIG_ReturnConfigValue("bOWShowBtoBPrice"))
		bOWDisableSaveOrderEmail	= CInt(owCONFIG_ReturnConfigValue("bOWDisableSaveOrderEmail"))
		bOWChangeDecimalPoint		= CInt(owCONFIG_ReturnConfigValue("bOWChangeDecimalPoint"))
		bOWEnableCategorySort		= CInt(owCONFIG_ReturnConfigValue("bOWEnableCategorySort"))
		bOWBackOfficeDemoMode 		= CInt(owCONFIG_ReturnConfigValue("bOWBackOfficeDemoMode"))
		bOWAdvancedImages			= CInt(owCONFIG_ReturnConfigValue("bOWAdvancedImages"))
		bOWAllowShippingAddress		= CInt(owCONFIG_ReturnConfigValue("bOWAllowShippingAddress"))
		bOWGenerateRandPW			= CInt(owCONFIG_ReturnConfigValue("bOWGenerateRandPW"))
		bOWForceToSelectOption		= CInt(owCONFIG_ReturnConfigValue("bOWForceToSelectOption"))
		
		' images with text on them, or multilingual images are now referenced like: owTemplates/Images/" & sOWLanguageCode & "/myimage.gif
		sOWLanguageCode = Application("sOWLanguageCode")
		If ( sOWLanguageCode = "" ) Then
			Dim rsStoreData
			set rsStoreData = CreateObject("ADODB.Recordset")
			sSQLText = "SELECT LanguageCode FROM LanguageSchemes WHERE idLanguageSchemes = " & iOWIDLanguageSchemes
			call DB_getFromDatabase (sSQLText, rsStoreData, "")
			If ( NOT rsStoreData.EOF ) Then
				sOWLanguageCode = Trim(rsStoreData("LanguageCode"))
				Application.Lock
				Application("sOWLanguageCode") = sOWLanguageCode
				Application.Unlock
			Else
				sOWLanguageCode = "eng"		' default to English
			End If
			Call DB_closeRecordset(rsObject)
			Set rsStoreData = Nothing
		End If

	End Sub
	'************************************************************************************
%>