<!--
var W3CDOM = (document.createElement && document.getElementsByTagName);

addEvent(window, 'load', initHelp);


// This function creates the help div and adds it to the DOM if the browser uses the W3C dom
function initHelp()
{
	if (!W3CDOM) return;

    // Get a reference to the body tag
    var bodyTag = document.getElementsByTagName('body');

    // Create the help DIV tag
    var helpTag = document.createElement('div');
    helpTag.setAttribute('id', 'help');
    helpTag.style.visibility = 'hidden';
    //helpTag.setAttribute('style', 'display:none;');
    
    
    // Create the help heading H1 tag
    var headingTag = document.createElement('h1');

    // Create the help text P tag
    var textTag = document.createElement('p');
    
    // Add the elements to the body tag
    helpTag.appendChild(headingTag);
    helpTag.appendChild(textTag);
    bodyTag[0].appendChild(helpTag);
    
    var abbrTags = document.getElementsByTagName('abbr');
    var acronymTags = document.getElementsByTagName('acronym');
    var helpTags = document.getElementsByTagName('div');

    for (var i=0;i<acronymTags.length;i++)
	{
        acronymTags[i].onmouseover = function(){displayHelp(this);return false};
        acronymTags[i].onmouseout = function(){hideHelp();return false};
	}    
    for (var i=0;i<abbrTags.length;i++)
	{
        abbrTags[i].onmouseover = function(){displayHelp(this);return false};
        abbrTags[i].onmouseout = function(){hideHelp();return false};
	}
    for (var i=0;i<helpTags.length;i++)
	{
        if (helpTags[i].className=='help') {
            helpTags[i].onmouseover = function(){displayHelp(this);return false};
            helpTags[i].onmouseout = function(){hideHelp();return false};
        }
	}

}

function displayHelp(obj) {
    var helpTag = document.getElementById('help');
    var headingTag = helpTag.getElementsByTagName('h1');
    var textTag = helpTag.getElementsByTagName('p');
    
    headingTag[0].innerHTML = obj.innerHTML;
    textTag[0].innerHTML = obj.title;

    helpTag.style.top = document.documentElement.scrollTop;
    helpTag.setAttribute('style', 'top:'+ document.documentElement.scrollTop + 'px;');
    helpTag.style.visibility = 'visible';

}

function hideHelp() {
    var helpTag = document.getElementById('help');
    var headingTag = helpTag.getElementsByTagName('h1');
    var textTag = helpTag.getElementsByTagName('p');
    
    headingTag[0].innerHTML = '';
    textTag[0].innerHTML = '';

    helpTag.style.visibility = 'hidden';
}


/*
There are three ways for the help popup to be setup
1. Using a div around some text
   In this instance, the text inside the tags will be used for the heading, while the title will be used for longer explanation.
   <div class="help" title="Long Description">Some Text</div>
2. Using an "abbr" tag
   In this instance, the text inside the tags will be used for the heading, while the title will be used for longer explanation.
   <abbr title="Long Description">Some Text</abbr>
3. Using an "acronym" tag
   In this instance, the text inside the tags will be used for the heading, while the title will be used for longer explanation.
   <acronym title="Long Description">Some Text</acronym>
   
NOTE: The difference between acronyms and abbreviations is that acronyms use the first letter of each word.  
      For instance, HTML is an abbreviation because "Hyptertext Markup Language" is only three words.  If it 
      were "HML" it would be an acronym.
*/
