jwt_marquee 

Description
This script  defines the operation of a moving marquee that can contain text messages and/or pictures. Many options can be defined within the script call line and within the message list file. In addition default values are define within the program. The order of precidence is call line --> message list --> default values. The messages are all defined in a jwt_list file.
The options in the script call line are contained within curly brackets which are preceeded by a comma. The options, also separated by commas, can be in any order since they are KEYWORD defined. e.g. width:200

It is necessary to distiguish between the marquee options and the message options :-
Script call line in html
 basic using program defaults         <div id = 'name' ></div><script>jwt_marquee( 'name' )</script>

flexible using input options   <div id = 'name' ></div><script>jwt_marquee( 'name'', {option , option}

Required sub-scripts
jwt_define_arrays
jwt_screen
jwt_marquee_loop
get_datatype

marquee options
The marquee, which can xontain many messages, can have different options to define the overall look and operations of the marquee. these options can be defined in the scriot call line or in the first line of the marquee list.
description option names default values notes  
a = speed of marquee movement (default : 1 n..b. larger number --> slower) speed: 1 e.g. speed:1
b = width of marquee (default : 400px) width: 400


units px (included in program)
"screen" will give full screen width
c =  height of marquee (default : 20px) height: 20 units px (included in program)
d = marquee background colour (default : white) background: "white"   
e = font type (default : Arial) text_type: "Arial"   
f = font colour (default : black) text_colour: "black"   
g = space between messages (default : 20px) space: 20  units px (included in program)
h = step size (default : 1px  n.b. increase value --> faster marquee BUT more gitter) step: 1 units px (included in program)
i = border   thickness border_size: 0 units px (included in program)
j = border style border_style: "solid"    
k = border colour border_colour: "black"   
name of list containing marquee messages and/or images list:  same name as <div> id  
positions the marquee on the screen.("fixed" is the location defined in the html file) position: "fixed" "top", "bottom", "fixed"
internal variable for marquee loop Mstep:    

Note : font size and image size are defined automatically from the marquee height. (font size is 0.8*marquee height with a top/bottom padding of 0.1*marquee height)


Script message file

Each message in the marquee can have different option for the text colour, size,  background colour etc. These are all set within the message file and cannot be over-ridden in the marquee call line. Each message and associated options are defined in the second and subsequent lines of the marquee list.

The script message file contains a list of messages to scroll across the screen and also the options to define the size, colours etc. of the marquee.

message options
description option names default values notes  
0 = the message or image  
   
1 = background colour of a message background: white  
2 =  text colour of a message text_colour: black  
3 = message link link:    
4 = message left/right padding enclosure: 10 units px (included in program)
5 = message text size text_size: 20 units px (included in program)
6 = message space to boundary space: 10 units px (included in program)
space to message boundary.

Note : font size and image size are defined automatically from the marquee height. (font size is 0.8*marquee height with a top/bottom padding of 0.1*marquee height)


 Marquee notes
For 'marquee' all the messages and images that are to scroll across the screen are defined in the javascript file.

The marquee reads inputs from a message list that can be any length and any order but it is recommended that the default style list is used and modified according to requirements. 

The messages are in the same order as the order in the list file.

Two entries are required in the html file :-
1) a containing <div> for the marquee with an identifying name (id="demo")
      <div id="demo"> </div>
2) a call to the jwt_marquee script to run the marquee with the chosen options. there are two alternative ways to do this :-
   i)  to have a load instruction immediately after the <div> . In the case of multiple marquees on the same page, the <script>  </script> must be moved in the html page tp come after all the <div> sections defining the marquue locations.
  iI)  to get the marquee to load as the html page is loaded.
        <script>window.onload=jwt_marquee('example' ..........) </script>
   iii) to start the marquee from a button
        <a onclick="jwt_marquee('demo'..........)>start marquee</a>
       in this 3rd case, it is essential that the containing <div> is defined before the call to the jwt_marquee script.

The id for the containing <div> and the name in the argument 1 of jwt_marquee must be the same.

The marquee can be used as a picture slider by just defining the height to be larger and calling a list of images. In addition, a mixture of text messages and pictures is also supported.

The text height and image height are adjusted automatically to fit the height of the containing <div>.

Multiple marquees are possible on the same html page.

Mouse over the marquee will stop the movement.

List of colours can be found at   www.w3schools.com/cssref/css_colornames.asp and in addition the #xxxxxx or rgb syntax can be used.

Internal variable used are Jmessage, Jticker, Ja.width, Ja.height, Ja.speed, Ja.left, Ja.offset, Ja.left