<%
filepath="pages/" & pagev & ".html"
FileName = Server.MapPath(filepath)
Response.Write CreateObject("Scripting.FileSystemObject").OpenTextFile _
(FileName, 1, False, False).readall
%>
<%
dim Pages, Recomm, counter, min
Pages = "Things to Consider When Choosing a Car Mat,Saving Money by Purchasing Wheel and Tyre Package,Replacing a Garage Door Opener,Proper Sports Car Maintenance,Prepping Your Ride for the Long Haul,Practical Advice on Organising Your Garage,Modern Entertainment Solutions for Your Car,How to be a Private Taxi Driver,How Racing for Pink Slips Work,How Neon Light Tubes Work,First Aid Essentials to Keep In Your Car,Choose Your Online Car Reviews Carefully,Buying a Bluetooth Car Kit for Hands-Free Calling,Basic Maintenance Tips to Keep Your Car Running Well"
'initialize values on new arrays
Recomm = Split(Pages,",")
For counter = LBound(Recomm) to UBound(Recomm)
'convert page title to uppercases so we can compare to the current page'
Recomm(counter) = Lcase(Recomm(counter))
Recomm(counter) = Replace(Recomm(counter),"-"," ")
Recomm(counter)= UpperCase(Recomm(counter))
'check if array content is equal to current page, if true, set min to array index of current page'
if page = Recomm(counter) Then
min = counter
End If
Next
'### set combined array one
dim totalSize1, a, combinedArray1
totalSize1 = uBound(Recomm) + uBound(Recomm) + 1
combinedArray1 = Recomm
redim preserve combinedArray1(totalSize1)
for a = 0 to uBound(Recomm)
combinedArray1(uBound(Recomm) + 1 + a) = Recomm(a)
next
'### end combine
'###multiply array to make it appear 4 times
dim totalSize, b, combinedArray
totalSize = uBound(combinedArray1) + uBound(combinedArray1) + 1
combinedArray = combinedArray1
redim preserve combinedArray(totalSize)
for b = 0 to uBound(combinedArray1)
combinedArray(uBound(combinedArray1) + 1 + b) = combinedArray1(b)
next
'### end combine 2
%>