1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3*b1cdbd2cSJim Jagielski<!--***********************************************************
4*b1cdbd2cSJim Jagielski *
5*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
6*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
7*b1cdbd2cSJim Jagielski * distributed with this work for additional information
8*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
9*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
10*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
11*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
14*b1cdbd2cSJim Jagielski *
15*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
16*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
17*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
19*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
20*b1cdbd2cSJim Jagielski * under the License.
21*b1cdbd2cSJim Jagielski *
22*b1cdbd2cSJim Jagielski ***********************************************************-->
23*b1cdbd2cSJim Jagielski<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CommonLang" script:language="StarBasic">REM  *****  BASIC  *****
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski&apos; Column A has the index 1
27*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNNAME1 = 3			&apos; Stock names, sheet 1
28*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNID1 = 4			&apos; Stock ID, sheet 1
29*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQUANTITY1 = 5		&apos; Stock quantity sheet 1
30*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNRATE1 = 7			&apos; Price for stocks, sheet 1
31*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNNAME2 = 3			&apos; Stock names, sheet 2
32*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNDATE2 = 4			&apos; Transaction dates, sheet 2
33*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQUANTITY2 = 5		&apos; Transaction quantity, sheet 2
34*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNRATE2 = 6			&apos; Price for stocks, sheet 2
35*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVPERCENT2 = 7	&apos; Provision in %, sheet 2
36*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVMIN2 = 8		&apos; Minimum provision, sheet 2
37*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVFIX2 = 9		&apos; Fixed provision, sheet 2
38*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROCEEDS2 = 12		&apos; Profit, sheet 2
39*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQTYSOLD2 = 14		&apos; Quantity sold, sheet 2
40*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQTYREST2 = 15		&apos; Quantity not sold yet, sheet 2
41*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPRCREST2 = 16		&apos; Proportional proce for quantity not sold yet, sheet 2
42*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNREALPROC2 = 17		&apos; Realized proceeds, sheet 2
43*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNDIVIDEND2 = 18		&apos; Dividend paid, sheet 2
44*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNREALPROFIT2 = 19	&apos; Realized profit, sheet 2
45*b1cdbd2cSJim JagielskiPublic Const SBROWFIRSTTRANSACT2 = 8	&apos; First data row, sheet 2
46*b1cdbd2cSJim JagielskiPublic Const SBROWHEADER1 = 6			&apos; Headline, sheet 1
47*b1cdbd2cSJim JagielskiPublic Const SBMSGOK = 0
48*b1cdbd2cSJim JagielskiPublic Const SBMSGYESNO = 4
49*b1cdbd2cSJim JagielskiPublic Const SBMSGSTOP = 16
50*b1cdbd2cSJim JagielskiPublic Const SBMSGQUESTION = 32
51*b1cdbd2cSJim JagielskiPublic Const SBMSGDEFAULTBTN2 = 256
52*b1cdbd2cSJim JagielskiPublic Const SBHASID = 1				&apos; 0 = no ID, 1 = stocks have an ID
53*b1cdbd2cSJim JagielskiPublic Const SBDIALOGSELL = 1			&apos; Step for main dialog
54*b1cdbd2cSJim JagielskiPublic Const SBDIALOGBUY = 2			&apos; Step for main dialog
55*b1cdbd2cSJim JagielskiPublic Const SBBINARY = 0
56*b1cdbd2cSJim JagielskiPublic TransactMode as Integer
57*b1cdbd2cSJim JagielskiPublic Const LIFO = -1
58*b1cdbd2cSJim JagielskiPublic Const FIFO = 1
59*b1cdbd2cSJim Jagielski
60*b1cdbd2cSJim JagielskiPublic Const HANDLEDIVIDEND = 1
61*b1cdbd2cSJim JagielskiPublic Const HANDLESPLIT = 2
62*b1cdbd2cSJim Jagielski
63*b1cdbd2cSJim JagielskiGlobal oDocument as Object
64*b1cdbd2cSJim JagielskiGlobal oDocFormats() as Object
65*b1cdbd2cSJim JagielskiGlobal oController as Object
66*b1cdbd2cSJim JagielskiGlobal oFirstSheet as Object
67*b1cdbd2cSJim JagielskiGlobal oBankSheet as Object
68*b1cdbd2cSJim JagielskiGlobal oMovementSheet as Object
69*b1cdbd2cSJim JagielskiGlobal sDocLanguage as String
70*b1cdbd2cSJim JagielskiGlobal sDocCountry as String
71*b1cdbd2cSJim JagielskiGlobal oSheets as Object
72*b1cdbd2cSJim JagielskiGlobal oDocLocale as New com.sun.star.lang.Locale
73*b1cdbd2cSJim JagielskiGlobal bEnableMarket as Boolean
74*b1cdbd2cSJim JagielskiGlobal bEnableInternet as Boolean
75*b1cdbd2cSJim JagielskiGlobal oMarketModel as Object
76*b1cdbd2cSJim JagielskiGlobal oInternetModel as Object
77*b1cdbd2cSJim Jagielski
78*b1cdbd2cSJim JagielskiGlobal sCurCurrency$, sCurExtension$, sCurChartSource$, sCurStockIDLabel$, sCurSeparator$
79*b1cdbd2cSJim Jagielski
80*b1cdbd2cSJim JagielskiPublic oNumberFormatter as Object
81*b1cdbd2cSJim JagielskiPublic bDebugmode as Boolean
82*b1cdbd2cSJim JagielskiGlobal GlobListindex as Integer
83*b1cdbd2cSJim JagielskiPublic blabla() as String
84*b1cdbd2cSJim JagielskiPublic SplitDate as Date
85*b1cdbd2cSJim JagielskiPublic oChartSheet as Object
86*b1cdbd2cSJim JagielskiPublic oBackgroundSheet as Object
87*b1cdbd2cSJim JagielskiPublic Const SBDATECOLUMN = 3
88*b1cdbd2cSJim JagielskiPublic Const SBVALUECOLUMN = 4
89*b1cdbd2cSJim JagielskiPublic Const SBSTARTROW = 25
90*b1cdbd2cSJim JagielskiPublic Const SBCHARTPERIOD = 14
91*b1cdbd2cSJim JagielskiPublic Const SBINTERVAL = &quot;d&quot;
92*b1cdbd2cSJim JagielskiPublic sColumnHeader as String
93*b1cdbd2cSJim JagielskiPublic StartDate as Date
94*b1cdbd2cSJim JagielskiPublic EndDate as Date
95*b1cdbd2cSJim JagielskiPublic iCurRow as Integer
96*b1cdbd2cSJim JagielskiPublic iMaxRow as Integer
97*b1cdbd2cSJim JagielskiPublic iStartDay as Integer
98*b1cdbd2cSJim JagielskiPublic iStartMonth as Integer
99*b1cdbd2cSJim JagielskiPublic iStartYear as Integer
100*b1cdbd2cSJim JagielskiPublic iEndDay as Integer
101*b1cdbd2cSJim JagielskiPublic iEndMonth as Integer
102*b1cdbd2cSJim JagielskiPublic iEndYear as Integer
103*b1cdbd2cSJim JagielskiPublic oStatusLine as Object
104*b1cdbd2cSJim JagielskiPublic Today as Date
105*b1cdbd2cSJim JagielskiPublic sInterval as String
106*b1cdbd2cSJim JagielskiPublic ShortMonths(11,1)
107*b1cdbd2cSJim JagielskiPublic iStep as Integer
108*b1cdbd2cSJim JagielskiPublic sDepotCurrency as String
109*b1cdbd2cSJim JagielskiPublic iValueCol as Integer
110*b1cdbd2cSJim Jagielski
111*b1cdbd2cSJim JagielskiPublic DlgReference as Object
112*b1cdbd2cSJim JagielskiPublic DlgTransaction as Object
113*b1cdbd2cSJim JagielskiPublic DlgStockRates as Object
114*b1cdbd2cSJim JagielskiPublic DlgStartUp as Object
115*b1cdbd2cSJim JagielskiPublic TransactModel as Object
116*b1cdbd2cSJim JagielskiPublic StockRatesModel as Object
117*b1cdbd2cSJim JagielskiPublic StartUpModel as Object
118*b1cdbd2cSJim JagielskiPublic StockRatesTitle(1 To 3)
119*b1cdbd2cSJim JagielskiPublic TransactTitle(1 To 2)
120*b1cdbd2cSJim JagielskiPublic NullList()
121*b1cdbd2cSJim JagielskiPublic sStartupWelcome$, sStartupChooseMarket$, sStartupHint$
122*b1cdbd2cSJim Jagielski
123*b1cdbd2cSJim JagielskiPublic sMarket(7,10) as String
124*b1cdbd2cSJim JagielskiPublic sCountryMarket(7,10) as String
125*b1cdbd2cSJim Jagielski
126*b1cdbd2cSJim JagielskiPublic cDlgCaption1$, cDlgCaption2$
127*b1cdbd2cSJim JagielskiPublic sMsgError$, sMsgNoName$, sMsgNoQuantity$, sMsgNoDividend$, sMsgNoExchangeRate$
128*b1cdbd2cSJim JagielskiPublic sMsgNoValidExchangeDate$, sMsgWrongExchangeDate$, sMsgSellTooMuch$, sMsgConfirm$
129*b1cdbd2cSJim JagielskiPublic sMsgFreeStock$, sMsgTotalLoss$, sMsgEndDatebeforeNow$, sMsgStartDatebeforeEndDate$
130*b1cdbd2cSJim Jagielski
131*b1cdbd2cSJim JagielskiPublic sOk$, sCancel$
132*b1cdbd2cSJim JagielskiPublic sMsgAuthorization$, sMsgDeleteAll$
133*b1cdbd2cSJim JagielskiPublic SellMethod$
134*b1cdbd2cSJim JagielskiPublic cSplit$
135*b1cdbd2cSJim JagielskiGlobal HistoryChartSource as String
136*b1cdbd2cSJim JagielskiPublic DateCellStyle as String
137*b1cdbd2cSJim JagielskiPublic CurrCellStyle as String
138*b1cdbd2cSJim JagielskiPublic sStartDate$, sEndDate$, sHistory$
139*b1cdbd2cSJim JagielskiPublic sInsertStockname$
140*b1cdbd2cSJim JagielskiPublic sProductname$, sTitle$
141*b1cdbd2cSJim JagielskiPublic sInsertStocks$, sStockname$, sNoInternetUpdate$, sMarketplace$, sNoInternetDataAvailable$
142*b1cdbd2cSJim JagielskiPublic sCheckInternetSettings as String
143*b1cdbd2cSJim Jagielski
144*b1cdbd2cSJim JagielskiSub LoadLanguage()
145*b1cdbd2cSJim Jagielski	LoadDepotDialogs()
146*b1cdbd2cSJim Jagielski	Select Case sDocLanguage
147*b1cdbd2cSJim Jagielski		Case &quot;de&quot;
148*b1cdbd2cSJim Jagielski			LoadGermanLanguage()
149*b1cdbd2cSJim Jagielski		Case &quot;en&quot;
150*b1cdbd2cSJim Jagielski			LoadEnglishLanguage()
151*b1cdbd2cSJim Jagielski		Case &quot;fr&quot;
152*b1cdbd2cSJim Jagielski			LoadFrenchLanguage()
153*b1cdbd2cSJim Jagielski		Case &quot;it&quot;
154*b1cdbd2cSJim Jagielski			LoadItalianLanguage()
155*b1cdbd2cSJim Jagielski		Case &quot;es&quot;
156*b1cdbd2cSJim Jagielski			LoadSpanishLanguage()
157*b1cdbd2cSJim Jagielski		Case &quot;sv&quot;
158*b1cdbd2cSJim Jagielski			LoadSwedishLanguage()
159*b1cdbd2cSJim Jagielski		Case &quot;ja&quot;
160*b1cdbd2cSJim Jagielski			LoadJapaneseLanguage()
161*b1cdbd2cSJim Jagielski		Case &quot;ko&quot;
162*b1cdbd2cSJim Jagielski			LoadKoreanLanguage()
163*b1cdbd2cSJim Jagielski		Case &quot;zh&quot;
164*b1cdbd2cSJim Jagielski			If sDocCountry = &quot;CN&quot; Then
165*b1cdbd2cSJim Jagielski				LoadChineseSimpleLanguage()
166*b1cdbd2cSJim Jagielski			Else
167*b1cdbd2cSJim Jagielski				LoadChineseTradLanguage()
168*b1cdbd2cSJim Jagielski			End If
169*b1cdbd2cSJim Jagielski	End Select
170*b1cdbd2cSJim Jagielski	InitializeStartUpModel()
171*b1cdbd2cSJim JagielskiEnd Sub
172*b1cdbd2cSJim Jagielski
173*b1cdbd2cSJim JagielskiSub CompleteMarketList()
174*b1cdbd2cSJim JagielskiDim EuroIndex as Integer
175*b1cdbd2cSJim JagielskiDim LocCountry as String
176*b1cdbd2cSJim JagielskiDim LocLanguage as String
177*b1cdbd2cSJim JagielskiDim sLangList() as String
178*b1cdbd2cSJim JagielskiDim sCountryList() as String
179*b1cdbd2cSJim JagielskiDim sExtensionList() as String
180*b1cdbd2cSJim JagielskiDim MaxIndex as Integer
181*b1cdbd2cSJim JagielskiDim bIsLocale as Boolean
182*b1cdbd2cSJim Jagielski
183*b1cdbd2cSJim Jagielski	GlobListIndex = -1
184*b1cdbd2cSJim Jagielski	For n = 0 To 5
185*b1cdbd2cSJim Jagielski		LocLanguage = sMarket(n,6)
186*b1cdbd2cSJim Jagielski		LocCountry = sMarket(n,7)
187*b1cdbd2cSJim Jagielski		If Instr(1,LocLanguage,&quot;;&quot;,SBBINARY) = 0 Then
188*b1cdbd2cSJim Jagielski			bIsLocale = CheckDocLocale(LocLanguage, LocCountry)
189*b1cdbd2cSJim Jagielski		Else
190*b1cdbd2cSJim Jagielski			EuroIndex = 0
191*b1cdbd2cSJim Jagielski			sLangList() = ArrayoutofString(LocLanguage, &quot;;&quot;, MaxIndex)
192*b1cdbd2cSJim Jagielski			sCountryList() = ArrayoutofString(LocCountry, &quot;;&quot;, MaxIndex)
193*b1cdbd2cSJim Jagielski			sExtensionList() = ArrayoutofString(sMarket(n,8), &quot;;&quot;, MaxIndex)
194*b1cdbd2cSJim Jagielski			For m = 0 To MaxIndex
195*b1cdbd2cSJim Jagielski				bIsLocale = CheckDocLocale(sLangList(m), sCountryList(m))
196*b1cdbd2cSJim Jagielski				If bIsLocale Then
197*b1cdbd2cSJim Jagielski					EuroIndex = m
198*b1cdbd2cSJim Jagielski					Exit For
199*b1cdbd2cSJim Jagielski				End If
200*b1cdbd2cSJim Jagielski			Next m
201*b1cdbd2cSJim Jagielski			sMarket(n,6) = sLangList(EuroIndex)
202*b1cdbd2cSJim Jagielski			sMarket(n,7) = sCountryList(EuroIndex)
203*b1cdbd2cSJim Jagielski			sMarket(n,8) = sExtensionList(EuroIndex)
204*b1cdbd2cSJim Jagielski		End If
205*b1cdbd2cSJim Jagielski		If bIsLocale Then
206*b1cdbd2cSJim Jagielski			GlobListIndex = n
207*b1cdbd2cSJim Jagielski			Exit For
208*b1cdbd2cSJim Jagielski		End If
209*b1cdbd2cSJim Jagielski	Next n
210*b1cdbd2cSJim JagielskiEnd Sub
211*b1cdbd2cSJim Jagielski
212*b1cdbd2cSJim JagielskiSub LocalizedCurrencies()
213*b1cdbd2cSJim Jagielski	If GlobListIndex = -1 Then
214*b1cdbd2cSJim Jagielski		sCountryMarket(0,0) = &quot;Euro&quot;
215*b1cdbd2cSJim Jagielski		sCountryMarket(0,1) = chr(8364)
216*b1cdbd2cSJim Jagielski		sCountryMarket(0,2) = &quot;Paris&quot;
217*b1cdbd2cSJim Jagielski		sCountryMarket(0,3) = &quot;http://fr.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.PA&amp;f=s4l1t1c1ghov&amp;e=.csv&quot;
218*b1cdbd2cSJim Jagielski		sCountryMarket(0,5) = &quot;Code&quot;
219*b1cdbd2cSJim Jagielski		sCountryMarket(0,6) = &quot;fr&quot;
220*b1cdbd2cSJim Jagielski		sCountryMarket(0,7) = &quot;FR&quot;
221*b1cdbd2cSJim Jagielski		sCountryMarket(0,8) = &quot;40C&quot;
222*b1cdbd2cSJim Jagielski		sCountryMarket(0,9) = &quot;59/9&quot;
223*b1cdbd2cSJim Jagielski		sCountryMarket(0,10) = &quot;1&quot;
224*b1cdbd2cSJim Jagielski
225*b1cdbd2cSJim Jagielski		sCountryMarket(1,0) = &quot;Euro&quot;
226*b1cdbd2cSJim Jagielski		sCountryMarket(1,1) = chr(8364)
227*b1cdbd2cSJim Jagielski		sCountryMarket(1,2) = &quot;Milano&quot;
228*b1cdbd2cSJim Jagielski		sCountryMarket(1,3) = &quot;http://it.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.MI&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
229*b1cdbd2cSJim Jagielski		sCountryMarket(1,5) = &quot;Codice&quot;
230*b1cdbd2cSJim Jagielski		sCountryMarket(1,6) = &quot;it&quot;
231*b1cdbd2cSJim Jagielski		sCountryMarket(1,7) = &quot;IT&quot;
232*b1cdbd2cSJim Jagielski		sCountryMarket(1,8) = &quot;410&quot;
233*b1cdbd2cSJim Jagielski		sCountryMarket(1,9) = &quot;44&quot;
234*b1cdbd2cSJim Jagielski		sCountryMarket(1,10) = &quot;1&quot;
235*b1cdbd2cSJim Jagielski
236*b1cdbd2cSJim Jagielski		sCountryMarket(2,0) = &quot;Euro&quot;
237*b1cdbd2cSJim Jagielski		sCountryMarket(2,1) = chr(8364)
238*b1cdbd2cSJim Jagielski		sCountryMarket(2,2) = &quot;Madrid&quot;
239*b1cdbd2cSJim Jagielski		sCountryMarket(2,3) = &quot;http://es.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;m=MC&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
240*b1cdbd2cSJim Jagielski		sCountryMarket(2,5) = &quot;Simbolo&quot;
241*b1cdbd2cSJim Jagielski		sCountryMarket(2,6) = &quot;es&quot;
242*b1cdbd2cSJim Jagielski		sCountryMarket(2,7) = &quot;ES&quot;
243*b1cdbd2cSJim Jagielski		sCountryMarket(2,8) = &quot;40A&quot;
244*b1cdbd2cSJim Jagielski		sCountryMarket(2,9) = &quot;44&quot;
245*b1cdbd2cSJim Jagielski		sCountryMarket(2,10) = &quot;1&quot;
246*b1cdbd2cSJim Jagielski
247*b1cdbd2cSJim Jagielski		sCountryMarket(3,0) = &quot;Dansk krone&quot;
248*b1cdbd2cSJim Jagielski		sCountryMarket(3,1) = &quot;kr&quot;
249*b1cdbd2cSJim Jagielski		sCountryMarket(3,2) = &quot;København&quot;
250*b1cdbd2cSJim Jagielski		sCountryMarket(3,3) = &quot;http://dk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID.CO&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
251*b1cdbd2cSJim Jagielski		sCountryMarket(3,5) = &quot;Aktiesymbol&quot;
252*b1cdbd2cSJim Jagielski		sCountryMarket(3,6) = &quot;da&quot;
253*b1cdbd2cSJim Jagielski		sCountryMarket(3,7) = &quot;DK&quot;
254*b1cdbd2cSJim Jagielski		sCountryMarket(3,8) = &quot;406&quot;
255*b1cdbd2cSJim Jagielski		sCountryMarket(3,9) = &quot;44&quot;
256*b1cdbd2cSJim Jagielski		sCountryMarket(3,10) = &quot;1&quot;
257*b1cdbd2cSJim Jagielski
258*b1cdbd2cSJim Jagielski		sCountryMarket(4,0) = &quot;Svensk krona&quot;
259*b1cdbd2cSJim Jagielski		sCountryMarket(4,1) = &quot;kr&quot;
260*b1cdbd2cSJim Jagielski		sCountryMarket(4,2) = &quot;Stockholm&quot;
261*b1cdbd2cSJim Jagielski		sCountryMarket(4,3) = &quot;http://se.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;f=sl1d1t1c1ohgv&amp;e=.c&quot;
262*b1cdbd2cSJim Jagielski		sCountryMarket(4,5) = &quot;Kod&quot;
263*b1cdbd2cSJim Jagielski		sCountryMarket(4,6) = &quot;sv&quot;
264*b1cdbd2cSJim Jagielski		sCountryMarket(4,7) = &quot;SE&quot;
265*b1cdbd2cSJim Jagielski		sCountryMarket(4,8) = &quot;41D&quot;
266*b1cdbd2cSJim Jagielski		sCountryMarket(4,9) = &quot;44&quot;
267*b1cdbd2cSJim Jagielski		sCountryMarket(4,10) = &quot;1&quot;
268*b1cdbd2cSJim Jagielski
269*b1cdbd2cSJim Jagielski		&apos; Taiwan Dollar
270*b1cdbd2cSJim Jagielski		sCountryMarket(5,0) = &quot;新臺幣&quot;
271*b1cdbd2cSJim Jagielski		sCountryMarket(5,1) = &quot;¥&quot;
272*b1cdbd2cSJim Jagielski		sCountryMarket(5,2) = &quot;代號&quot;
273*b1cdbd2cSJim Jagielski		sCountryMarket(5,3) = &quot;http://tw.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.TW&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
274*b1cdbd2cSJim Jagielski		sCountryMarket(5,5) = &quot;代號&quot;
275*b1cdbd2cSJim Jagielski		sCountryMarket(5,6) = &quot;zh&quot;
276*b1cdbd2cSJim Jagielski		sCountryMarket(5,7) = &quot;TW&quot;
277*b1cdbd2cSJim Jagielski		sCountryMarket(5,8) = &quot;404&quot;
278*b1cdbd2cSJim Jagielski		sCountryMarket(5,9) = &quot;44&quot;
279*b1cdbd2cSJim Jagielski		sCountryMarket(5,10) = &quot;1&quot;
280*b1cdbd2cSJim Jagielski
281*b1cdbd2cSJim Jagielski		&apos; Chinese Yuan
282*b1cdbd2cSJim Jagielski		sCountryMarket(6,0) = &quot;人民币&quot;
283*b1cdbd2cSJim Jagielski		sCountryMarket(6,1) = &quot;¥&quot;
284*b1cdbd2cSJim Jagielski		sCountryMarket(6,2) = &quot;代号&quot;
285*b1cdbd2cSJim Jagielski		sCountryMarket(6,3) = &quot;http://cn.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.SS&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
286*b1cdbd2cSJim Jagielski		sCountryMarket(6,5) = &quot;代号&quot;
287*b1cdbd2cSJim Jagielski		sCountryMarket(6,6) = &quot;zh&quot;
288*b1cdbd2cSJim Jagielski		sCountryMarket(6,7) = &quot;CN&quot;
289*b1cdbd2cSJim Jagielski		sCountryMarket(6,8) = &quot;804&quot;
290*b1cdbd2cSJim Jagielski		sCountryMarket(6,9) = &quot;44&quot;
291*b1cdbd2cSJim Jagielski		sCountryMarket(6,10) = &quot;1&quot;
292*b1cdbd2cSJim Jagielski
293*b1cdbd2cSJim Jagielski		&apos; korean Won
294*b1cdbd2cSJim Jagielski		sCountryMarket(7,0) = &quot;한국 원화&quot;
295*b1cdbd2cSJim Jagielski		sCountryMarket(7,1) = &quot;₩&quot;
296*b1cdbd2cSJim Jagielski		sCountryMarket(7,2) = &quot;서울&quot;
297*b1cdbd2cSJim Jagielski		sCountryMarket(7,3) = &quot;http://kr.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.KS&amp;f=snl1d1t1c1ohgv&amp;e=.csv&quot;
298*b1cdbd2cSJim Jagielski		sCountryMarket(7,5) = &quot;종목 코드&quot;
299*b1cdbd2cSJim Jagielski		sCountryMarket(7,6) = &quot;ko&quot;
300*b1cdbd2cSJim Jagielski		sCountryMarket(7,7) = &quot;KR&quot;
301*b1cdbd2cSJim Jagielski		sCountryMarket(7,8) = &quot;412&quot;
302*b1cdbd2cSJim Jagielski		sCountryMarket(7,9) = &quot;44&quot;
303*b1cdbd2cSJim Jagielski		sCountryMarket(7,10) = &quot;2&quot;
304*b1cdbd2cSJim Jagielski
305*b1cdbd2cSJim Jagielski
306*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,0) = &quot;Российский рубль&quot;
307*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,1) = &quot;р.&quot;
308*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,2) = &quot;&quot;
309*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,3) = &quot;&quot;
310*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,5) = &quot;&quot;
311*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,6) = &quot;ru&quot;
312*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,7) = &quot;RU&quot;
313*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,8) = &quot;-419&quot;
314*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(5,9) = &quot;&quot;
315*b1cdbd2cSJim Jagielski&apos;
316*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,0) = &quot;Złoty polski&quot;
317*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,1) = &quot;zł&quot;
318*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,2) = &quot;&quot;
319*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,3) = &quot;&quot;
320*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,5) = &quot;&quot;				&apos;Still Todo!!
321*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,6) = &quot;pl&quot;
322*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,7) = &quot;PL&quot;
323*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,8) = &quot;-415&quot;
324*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(6,9) = &quot;&quot;
325*b1cdbd2cSJim Jagielski&apos;
326*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,0) = &quot;Türkische Lira&quot;
327*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,1) = &quot;TL&quot;
328*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,2) = &quot;&quot;
329*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,3) = &quot;&quot;
330*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,5) = &quot;&quot;				&apos;Still Todo!!
331*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,6) = &quot;tr&quot;
332*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,7) = &quot;TR&quot;
333*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,8) = &quot;-41F&quot;
334*b1cdbd2cSJim Jagielski&apos;		sCountryMarket(7,9) = &quot;&quot;
335*b1cdbd2cSJim Jagielski
336*b1cdbd2cSJim Jagielski	Dim n as Integer
337*b1cdbd2cSJim Jagielski	Dim m as Integer
338*b1cdbd2cSJim Jagielski&apos;	Dim sCountryMarket(6,9) as String
339*b1cdbd2cSJim Jagielski
340*b1cdbd2cSJim Jagielski		For n = 0 To Ubound(sCountryMarket(),1)
341*b1cdbd2cSJim Jagielski			If sDocLanguage = sCountryMarket(n,6) and sDocCountry = sCountryMarket(n,7) Then
342*b1cdbd2cSJim Jagielski				GlobListIndex = 6
343*b1cdbd2cSJim Jagielski				For m = 0 To 10
344*b1cdbd2cSJim Jagielski					sMarket(6,m) = sCountryMarket(n,m)
345*b1cdbd2cSJim Jagielski				Next m
346*b1cdbd2cSJim Jagielski				Exit For
347*b1cdbd2cSJim Jagielski			End If
348*b1cdbd2cSJim Jagielski		Next n
349*b1cdbd2cSJim Jagielski	End If
350*b1cdbd2cSJim JagielskiEnd Sub
351*b1cdbd2cSJim Jagielski
352*b1cdbd2cSJim JagielskiSub LoadDepotDialogs()
353*b1cdbd2cSJim Jagielski	DlgTransaction = LoadDialog(&quot;Depot&quot;, &quot;Dialog2&quot;)
354*b1cdbd2cSJim Jagielski	DlgStockRates = LoadDialog(&quot;Depot&quot;, &quot;Dialog3&quot;)
355*b1cdbd2cSJim Jagielski	DlgStartUp = LoadDialog(&quot;Depot&quot;, &quot;Dialog4&quot;)
356*b1cdbd2cSJim Jagielski	TransactModel = DlgTransaction.Model
357*b1cdbd2cSJim Jagielski	StockRatesModel = DlgStockRates.Model
358*b1cdbd2cSJim Jagielski	StartUpModel = DlgStartUp.Model
359*b1cdbd2cSJim JagielskiEnd Sub
360*b1cdbd2cSJim Jagielski
361*b1cdbd2cSJim Jagielski
362*b1cdbd2cSJim JagielskiSub InitializeStartUpModel()
363*b1cdbd2cSJim Jagielski	With StartUpModel
364*b1cdbd2cSJim Jagielski		.lblWelcome.Label = sStartupWelcome &amp; Chr(13) &amp; chr(13) &amp; sStartUpChooseMarket
365*b1cdbd2cSJim Jagielski		sStartUpHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
366*b1cdbd2cSJim Jagielski		.lblHint.Label = sStartupHint
367*b1cdbd2cSJim Jagielski&apos;		.cmdGoOn.Enabled = Ubound(StartUpModel.lstMarkets.SelectedItems()) &lt;&gt; -1
368*b1cdbd2cSJim Jagielski		.cmdGoOn.Label = sOK
369*b1cdbd2cSJim Jagielski		.cmdCancel.Label = sCancel
370*b1cdbd2cSJim Jagielski	End With
371*b1cdbd2cSJim JagielskiEnd Sub</script:module>
372