You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
721 B
47 lines
721 B
|
|
function findA(obj)
|
|
{
|
|
TagA=obj.getElementsByTagName("a");
|
|
if (TagA.length>0)
|
|
return TagA[0];
|
|
}
|
|
|
|
function findContentDIV(obj)
|
|
{
|
|
TagDiv=obj.childNodes;
|
|
var arrDiv = new Array;
|
|
for(i=0;i<TagDiv.length;i++)
|
|
{
|
|
var objDiv = TagDiv[i];
|
|
var re = /div/i;
|
|
var arr = re.exec(objDiv.tagName);
|
|
if(arr != null)
|
|
{
|
|
if(arr.index == 0)
|
|
{
|
|
arrDiv.push(objDiv);
|
|
}
|
|
}
|
|
}
|
|
return arrDiv;
|
|
}
|
|
|
|
function chShift(o)
|
|
{
|
|
o.style.cursor="pointer";
|
|
var t=o.parentNode;
|
|
var tA=t.getElementsByTagName("a");
|
|
var tParent=t.parentNode;
|
|
var tParentDIV=findContentDIV(tParent);
|
|
|
|
for(i=0;i<tA.length;i++)
|
|
{
|
|
tA[i].className= null;
|
|
tParentDIV[i].style.display="none";
|
|
if(tA[i]==findA(o))
|
|
{
|
|
tA[i].className="on";
|
|
tParentDIV[i].style.display="block";
|
|
}
|
|
}
|
|
}
|
|
|