! ! Yacht Flowers foliage page div PagePc div PagePhone a Items div Text div ImageTemplate div ImageDiv div ContentText img Image h2 ProductTitle button ArrowLeft button ArrowDown button ArrowRight variable NProducts variable Titles variable Images variable N variable Current variable Idle a ProductsButton div ProductsPopup div SectionItemsPopup button CutFlowersButton button FoliageButton button OrchidsButton button VasesAndContainersButton button FloristsSuppliesButton button ItemButtons attach PagePc to `ec-page-pc` attach PagePhone to `ec-page-phone` put 10 into NProducts set the elements of Items to NProducts set the elements of Text to NProducts set the elements of Images to NProducts set the elements of ItemButtons to NProducts put 0 into Current while Current is less than NProducts begin index Items to Current index Text to Current attach Items to `ec-item-` cat Current attach Text to `ec-text-` cat Current set style `display` of Text to `none` add 1 to Current end attach ProductsButton to `ec-button-products` attach ProductsPopup to `ec-products-popup` attach SectionItemsPopup to `ec-items-popup` set the elements of Titles to NProducts index Titles to 0 put `Anthurium` into Titles index Titles to 1 put `Aspidistra` into Titles index Titles to 2 put `Bear Grass` into Titles index Titles to 3 put `Cycas` into Titles index Titles to 4 put `Ficus Benjamina` into Titles index Titles to 5 put `Kentia Palm` into Titles index Titles to 6 put `Monsteria` into Titles index Titles to 7 put `Phoenix Robellini` into Titles index Titles to 8 put `Ruscus` into Titles index Titles to 9 put `Steel Grass` into Titles put random NProducts into Current if mobile begin set style `display` of PagePc to `none` set style `display` of PagePhone to `block` index Images to 0 put `https://yachtflowers.eu/wp-content/uploads/2018/04/anthurium-foliage-w.jpg` into Images index Images to 1 put `https://yachtflowers.eu/wp-content/uploads/2018/04/aspidistra-w.jpg` into Images index Images to 2 put `https://yachtflowers.eu/wp-content/uploads/2018/04/bear-grass-w.jpg` into Images index Images to 3 put `https://yachtflowers.eu/wp-content/uploads/2018/04/cycas-w.jpg` into Images index Images to 4 put `https://yachtflowers.eu/wp-content/uploads/2018/04/ficus-benjamina-w.jpg` into Images index Images to 5 put `https://yachtflowers.eu/wp-content/uploads/2018/04/kentia-palm-w.jpg` into Images index Images to 6 put `https://yachtflowers.eu/wp-content/uploads/2018/04/monsteria-w.jpg` into Images index Images to 7 put `https://yachtflowers.eu/wp-content/uploads/2018/04/phoenix-robellini-w.jpg` into Images index Images to 8 put `https://yachtflowers.eu/wp-content/uploads/2018/04/ruscus-w.jpg` into Images index Images to 9 put `https://yachtflowers.eu/wp-content/uploads/2018/04/steel-grass-w.jpg` into Images gosub to ShowProduct on click ProductsButton begin set style `display` of ProductsPopup to `block` end attach CutFlowersButton to `ec-cut-flowers` on click CutFlowersButton begin location `https://yachtflowers.eu/cut-flowers` end attach FoliageButton to `ec-foliage` on click FoliageButton begin location `https://yachtflowers.eu/foliage` end attach OrchidsButton to `ec-orchids` on click OrchidsButton begin location `https://yachtflowers.eu/orchids` end attach VasesAndContainersButton to `ec-vases-containers` on click VasesAndContainersButton begin location `https://yachtflowers.eu/vases-containers` end attach FloristsSuppliesButton to `ec-florists-supplies` on click FloristsSuppliesButton begin location `https://yachtflowers.eu/florists-supplies` end put 0 into N while N is less than NProducts begin index ItemButtons to N attach ItemButtons to `ec-popup-item-` cat N on click ItemButtons begin set style `display` of SectionItemsPopup to `none` put the index of ItemButtons into Current gosub to ShowProduct end add 1 to N end end else begin set style `display` of PagePhone to `none` set style `display` of PagePc to `block` index Images to 0 put `https://yachtflowers.eu/wp-content/uploads/2018/04/anthurium-foliage.jpg` into Images index Images to 1 put `https://yachtflowers.eu/wp-content/uploads/2018/04/aspidistra.jpg` into Images index Images to 2 put `https://yachtflowers.eu/wp-content/uploads/2018/04/bear-grass.jpg` into Images index Images to 3 put `https://yachtflowers.eu/wp-content/uploads/2018/04/cycas.jpg` into Images index Images to 4 put `https://yachtflowers.eu/wp-content/uploads/2018/04/ficus-benjamina.jpg` into Images index Images to 5 put `https://yachtflowers.eu/wp-content/uploads/2018/04/kentia-palm.jpg` into Images index Images to 6 put `https://yachtflowers.eu/wp-content/uploads/2018/04/monsteria.jpg` into Images index Images to 7 put `https://yachtflowers.eu/wp-content/uploads/2018/04/phoenix-robellini.jpg` into Images index Images to 8 put `https://yachtflowers.eu/wp-content/uploads/2018/04/ruscus.jpg` into Images index Images to 9 put `https://yachtflowers.eu/wp-content/uploads/2018/04/steel-grass.jpg` into Images attach ContentText to `ec-content-text-pc` attach Image to `ec-image` index Items to Current index Text to Current set style `display` of Text to `block` fork to DoIdle gosub to SetTextAndImage on click Items begin put 0 into Idle put the index of Items into Current gosub to SetTextAndImage end end stop ShowProduct: wait 10 ticks attach ProductTitle to `ec-product-title-phone` index Titles to Current set the content of ProductTitle to Titles attach ContentText to `ec-content-text-phone` index Text to Current set ContentText from Text index Images to Current attach ImageTemplate to `ec-image-template` attach ImageDiv to `ec-images-` cat Current attach Image to `ec-product-image` set attribute `src` of Image to `https://yachtflowers.eu/wp-content/uploads/2018/04/loading.jpg` wait 1 tick set attribute `src` of Image to Images set ImageDiv from ImageTemplate attach ArrowLeft to `ec-arrow-left` attach ArrowDown to `ec-arrow-down` attach ArrowRight to `ec-arrow-right` on click ArrowLeft begin if Current is 0 put NProducts into Current take 1 from Current gosub to ShowProduct end on click ArrowDown begin set style `display` of SectionItemsPopup to `block` end on click ArrowRight begin add 1 to Current if Current is NProducts put 0 into Current gosub to ShowProduct end return SetTextAndImage: put 0 into N while N is less than NProducts begin index Items to N set style `font-weight` of Items to `normal` add 1 to N end attach ProductTitle to `ec-product-title-pc` index Titles to Current set the content of ProductTitle to Titles index Items to Current set style `font-weight` of Items to `bold` set style `display` of Text to `none` index Text to Current set ContentText from Text index Images to Current set attribute `src` of Image to Images return DoIdle: put 0 into Idle while true begin wait 1 add 1 to Idle ! print `Idle: ` cat Idle if Idle is 2*60+20 begin put 2*60 into Idle put random NProducts into Current gosub to SetTextAndImage end end