﻿/* checked with jsLint 2003 09 07 */

    overdiv="0";xMouse=0;yMouse=0;MSIE=document.all; //prepare for IE kludge
    if (!MSIE) {document.captureEvents(Event.MouseMove);}
    document.onmousemove=getMouse; // initiate event handler
    function getMouse(Event)
    { //set globals for mouse coordinates
        if(MSIE!=null)
        {
            if (document.body != null)//needed for IE6 JB
            {
                xMouse=event.clientX+document.body.scrollLeft;
                yMouse=event.clientY+document.body.scrollLeft;
            }
        }
        else
        {
            xMouse=Event.pageX;
            yMouse=Event.pageY;
        }
    }
    function popLayer(a){
    document.getElementById("_div" + a).style.left=xMouse+15+'px';
    document.getElementById("_div" + a).style.top=yMouse-5+'px';
    document.getElementById("_div" + a).style.display="block";
    }
    function hideLayer(a){
    if (overdiv == "0") {document.getElementById("_div" + a).style.display="none";}
    } 
    
    function popUp(strURL,strType,strHeight,strWidth,strLeft,strTop) {
    var strOptions="";
    if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth+",left="+strLeft+",top="+strTop;
    if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth+",left="+strLeft+",top="+strTop;
    if (strType=="elastic") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth+",left="+strLeft+",top="+strTop;
    if (strType=="full") strOptions="directories,menubar,location,toolbar,status,scrollbars,resizable,height="+strHeight+",width="+strWidth+",left="+strLeft+",top="+strTop;
    window.open(strURL, 'newWin', strOptions);
    }

    function linkPop() {
	links = document.getElementsByTagName('a');
	for (var i=0; i<links.length; i++) {
		if (links[i].className=="win" || links[i].className=="doc" || links[i].className=="pdf") {
			if (!links[i].onclick) { links[i].onclick = function(){popUp(this.href,'elastic',550,750,40,40);}
		}
		}
	}

	if (document.getElementById("glossaryLink")) {
		if (document.getElementById("glossaryLink").innerHTML == null) {
			document.getElementById("glossaryLink").display = "none";
		}	
	}
	var ie = /MSIE/.test(navigator.userAgent);
	if(!ie) {
		document.styleSheets[0].insertRule(".expand:after {content:' (click to view/close)';font-size:70%;}", 0);
	}
	else { 
		var heads = document.getElementsByTagName('h3');
		for (j=0;j<heads.length;j++){

			if (heads[j].className == "expand") {
				
				heads[j].innerHTML += " <span style=\"font-size:70%;\">(click to view/close)</span>";
			}
		}
	}
	
    }