
    
    var previoustab = "";
    var intv;
	
	var _MOUSEY;
	var _checkMouseY;
	
	var IE = document.all?true:false;
	
	// If NS -- that is, !IE -- then set up for mouse capture
	if (!IE) document.captureEvents(Event.MOUSEMOVE)
	
	// Set-up to use getMouseXY function onMouseMove
	document.onmousemove = getMouseXY;
	
	// Temporary variables to hold mouse x-y pos.s
	var tempX = 0
	var tempY = 0
	
	// Main function to retrieve mouse x-y pos.s
	
	function getMouseXY(e) {
	  if (IE) { // grab the x-y pos.s if browser is IE
		tempY = event.clientY + document.body.scrollTop
	  } else {  // grab the x-y pos.s if browser is NS
		tempY = e.pageY
	  }  
	   if (tempY < 0){tempY = 0}  
	 _MOUSEY = tempY;
	}
	
	function showYPos(){
		if(_MOUSEY>125){
			expandcontent(initialtab[1], tabobjlinks[initialtab[0]]);
			clearInterval(_checkMouseY);
		}
	}

    function expandcontent(cid, aobject, highlightArea){
        stopTimer();

        highlighttab(aobject)

        if (previoustab != "")
            document.getElementById(previoustab).style.display = "none"

        document.getElementById(cid).style.display = "block"
		previoustab = cid
		
		_checkMouseY = setTimeout("showYPos()", 2000);
		
		if(highlightArea!=null && highlightArea!=""){
			var highObj = document.getElementById(highlightArea);
			var onStart = highObj.src.lastIndexOf("_on");
			highObj.src = highObj.src.substring(0, onStart)+"_off."+highObj.src.substring(highObj.src.length-3);
		}
    }

    function highlighttab(aobject)
        {
        stopTimer();

        if (typeof tabobjlinks == "undefined")
            collectddimagetabs()

        for (i = 0; i < tabobjlinks.length; i++)
            tabobjlinks[i].className = ""

        aobject.className = "current"
        }

    function collectddimagetabs()
        {
        var tabobj = document.getElementById("ddimagetabs")
        tabobjlinks = tabobj.getElementsByTagName("A")
        }

    function do_onload()
        {
        collectddimagetabs()
        if (initialtab[0]==0)
        	return;
        expandcontent(initialtab[1], tabobjlinks[initialtab[0]], initialtab[2])
        }

    function startTimer()
        {
        intv = setTimeout("expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])", 2000);
        }

    function stopTimer()
        {
        clearTimeout(intv);
        }

    Event.observe(window, 'load', do_onload, false);

    Event.observe('xtab_menu', 'mouseout', function(event)
        {
        var reltg = (event.relatedTarget) ? event.relatedTarget : event.toElement;

        var tg = (window.event) ? event.srcElement : event.target;

        if (tg.nodeName != 'div')
            return;

        while (reltg != tg && reltg.nodeName != 'BODY')
            {
            reltg = reltg.parentNode;

            if (reltg.id == "xtab_menu")
                return;
            }

        if (reltg == tg)
            return;

        stopTimer();
        startTimer();
        },        false);