//===== relative URL handling code for js files ================
sWZBaseFolder = "java2000.wol.com.cn";                          
sWZ = window.location.href;                                     
iWZ = sWZ.indexOf(sWZBaseFolder) + sWZBaseFolder.length + 1;    
sWZBase = sWZ.substring(0,iWZ);                                 
//===== Copyright ?2001 Spidersoft. All rights reserved. ======

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

if (ver4) {
    with (document) {
        write("<STYLE TYPE='text/css'>");
        if (NS4) {
            write(".parent {position:absolute; visibility:visible}");
            write(".child {position:absolute; visibility:visible}");
            write(".regular {position:absolute; visibility:visible}")
        }
        else {
            write(".child {display:none}")
        }
        write("</STYLE>");
    }
}

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";}
			else
           		{ whichEl.style.display = "block";}		
           
        }
    }
}


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 expandIt(el) 
{
   if (!ver4) return;
   divColl = document.all.tags("DIV");
 //       for (i=0; i<divColl.length; i++) 
 //       {
 //           whichEl = divColl(i);
 //           if (whichEl.id == el)
 //                   { 
   whichEl = divColl(el + 1);
  //       
//                    }
 //           break;
            
//        }
        
    if (IE4) 
    {
        if (whichEl.style.display == "none") 
        {
            whichEl.style.display = "block";

         
        }
        else {
            whichEl.style.display = "none";

        }
     }
    else {
        whichEl = eval("document." + el + "Child");
        if (whichEl.visibility == "hide") {
            whichEl.visibility = "show";
        }
        else {
            whichEl.visibility = "hide";
        }
        arrange();
    }
}
onload = initIt;



//change_pic(),鼠标划过时变换图片
function change_pic(tdName,picName) 
{
    if (IE4) 
		{ 
			divColl = document.all.tags("img");
	   		for (i=0; i<divColl.length; i++) 
			{
           		 whichEl = divColl(i);
			
				if (whichEl.id == tdName) 
				{//var st;
				//st = "../img/product/small/" + picName;
				//document.write (st);
				whichEl.src = picName;
				}
			}		
		}
	else
		{		
   			obj = document.getElementById(tdName);

			obj.src = picName;

		}
				
}