## Purpose

These are similar to pop-ups in that they have links. Rolling over the links however, changes the background colour of a section (or sections) of the page.

## Rollover Block Styles

No special styles are used. Indeed, rollover blocks are chameleons that take on the background of wherever they are currently living on the page. It is only when their links are rolled over that they reveal themselves.

## Known Deficiencies

1. All rollover blocks go to the same colour when their links are rolled over, regardless of what their current background is.
2. Rollover blocks are not argued in the stylesheet.
3. While one link can illuminate multiple rollover blocks, multiple links cannot easily illuminate the same block. This facility would be useful for constructing review quizzes.

See the wish list.

## Available Functions

startBlock(name)

### Arguments

name
  a string giving a name to the block to be illuminated. Multiple blocks may have the same name in which case all will be illuminated at once when their links are rolled over.
Optional Arguments
  No extra arguments are recognized.
Return
  Nothing is returned

Action

The start of the block is written dynamically into the document at the point of invocation.

endBlock()

### Arguments

Optional Arguments
  No arguments are recognized.
Return
  Nothing is returned
Action

The end of the block is written dynamically into the document at the point of invocation.

Comment

The fact that the block being ended is not named implies that it must be the nearest block. That is blocks may not overlap. This conforms with standard HTML usage.

insertBlockLink(name, link)

### Arguments

name
  a string giving the name of the block(s) to be illuminated.
link
  a stringcontaining the text for the link itself. This is exactly how conventional links work.
Optional Arguments
  No extra arguments are recognized.
Return
  Nothing is returned

Action

The block link is written dynamically into the document at the point of invocation.

startBlockLink(name)
endLink()
Comment

These two routines are an alternative to the insertBlockLink routine. The only difference is that the startBlockLink function is invoked before the link text and the endLink after it. No link argument is used because the link text is already on the page between the two calls marking the beginning and ending of the link.

## Usage

Rollover blocks were originally conceived of to mark the scope of variables in a piece of code. See the section on pedagogical markup for an example how that would work. However, there are plenty of other uses. Consider a self test unit.

Question 5

C++ can be characterized as a

1. weakly typed language
2. functional language
3. strongly typed language
4. none of the above

The
is. The rollover block is the third choice, strongly typed language. The link is "answer is". Rolling over the link makes the block illuminate against its background.

The blocks appear in a span of class `rolloverBlock` which is not argued in the style sheet as it is a matter of highlighting any span rolled over.