NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
var t,y,oy=0,l,c=0;
var sh=0,h,timer,e = new Object,v;

if (ver4) {
    with (document) {
        write("<STYLE TYPE='text/css'>");
        if (NS4) {
            write(".parent {position:absolute; visibility:visible}");
            write(".child {position:absolute; display: none;}");
            write(".regular {position:absolute; visibility:visible}")
        }
        else {
            write(".child {display:none}")
        }
        write("</STYLE>");
    }
}

function getIndex(el) {
    ind = null;
    for (i=0; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.id == el) {
            ind = i;
            break;
        }
    }
    return ind;
}

function arrange() {
    nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
    for (i=firstInd+1; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.visibility != "hide") {
            whichEl.pageY = nextY;
            nextY += whichEl.document.height;
        }
    }
}

function initIt(){
    if (!ver4) return;
    if (NS4) {
        for (i=0; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
       }
        arrange();
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++) {
            whichEl = divColl(i);
            if (whichEl.className == "child") whichEl.style.display = "none";
        }
    }
}

function expandIt(el) {
    if (!ver4) return;
	h=0;temp="";sh=0;
    if (IE4) {
        whichEl = eval(el + "Child");
		if(whichEl.style.height){
			h=parseInt(whichEl.style.height);
		}
		else {
			h=150;
		}
		e=whichEl;
        if (whichEl.style.display == "none") {
			v='block';
        }
        else {
			sh=h;h=0;
			v='none';
        }
		smoothout();
    }
    else {
        whichEl = eval("document." + el + "Child");
        if (whichEl.visibility == "hide") {
            whichEl.visibility = "show";
        }
        else {
            whichEl.visibility = "hide";
        }
    }
	y=event.y;
	c=0;
	l=(y-oy)*22
	//scl()
}
onload = initIt;
function smoothout(){
	e.style.display=v;
	return;
	if(e){
		if(e.innerHTML&&temp==""){
			temp=e.innerHTML;
			e.innerHTML="";
		}
		
		if(v=="block"){
			++sh;
			e.style.height=sh;
		}else{
			--sh;
			e.style.height=sh;
			
		}
		if(sh!=h){
			//alert(h+","+sh);
			timer=setTimeout("smoothout()",Delay);
		}else{
			e.innerHTML=temp;
			e.style.display=v;
			e=null;
			clearTimeout(timer);
		}
	}
}
//////////////////////
if (NS4) {                                                                
        firstEl = "KB1Parent";                                                                
        firstInd = getIndex(firstEl);                                                                
        //arrange();                                                                
}                          

function mOvr(src,clrOver) { /*if (!src.contains(event.fromElement)) {*/ src.style.cursor = 'hand'; src.bgColor = clrOver; /*}*/}                              
function mOut(src,clrIn) { /*if (!src.contains(event.toElement)) {*/ src.style.cursor = 'default'; src.bgColor = clrIn; /*}*/}                              
function mClk(src) { if(event.srcElement.tagName=='TD'){src.children.tags('A')[0].click();} }
var g;
var temp,timer;
var Delay=1000;

var autoScrollOn = 1;
var scrollOnFunction;
var scrollOffFunction;
function scrollOn( ){
 autoScrollOn = 1;
 refreshtext( );
}
function scrollOff( ){
 autoScrollOn = 0;
}
scrollOnFunction = new Function('scrollOn( )');
scrollOffFunction = new Function('scrollOff( )');

function scl(){
	if (l<0)
	{
		c--
	}else{c++}
	this.scroll(0,c);
	if(c<l)
		var t=setTimeout('scl()',10);
	else
		clearTimeout(t);
}