// Open another windows to display different content
function MM_openWindow(filename,winName,features) {
  window.open(filename,winName,features);
}



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";
        }
    }
    // Add by GY
    saveOldLink=null;
}

function expandIt(el) {
 if (!ver4) return;
    if (IE4) {	// Add by gy
		if ( el == null )
			return;  // End of addition
			
			whichEl = eval(el + "Child");
			if (whichEl.style.display == "none") {
				whichEl.style.display = "block";
			}
			else {
				whichEl.style.display = "none";
			}
		}
    else {	// Add by gy
		if ( el == null )
			return;	// End of addition
			
			whichEl = eval("document." + el + "Child");
			if (whichEl.visibility == "hide") {
            whichEl.visibility = "show";
			}
			else {
				whichEl.visibility = "hide";
			}
        arrange();
    }
	saveOldLink=whichEl;
	
}

var sToolTip = "Click to open and close"

function TOCeffect(src) 
	{
	src.title = sToolTip;
	return;
	}
	
