Minor correction to prevent javascript error when less than 10 tabs are present

This commit is contained in:
oleonard 2006-06-14 21:05:59 +00:00
parent f25c4af472
commit 3c314b3588
1 changed files with 12 additions and 6 deletions

View File

@ -141,16 +141,22 @@ function active(numlayer)
link = "link"+i;
if (numlayer==i) {
with(document){
document.getElementById(ong).style.visibility="visible";
document.getElementById(link).style.color="#000066";
document.getElementById(link).style.backgroundColor="#FFFFCC";
if (document.getElementById(ong)){
document.getElementById(ong).style.visibility="visible";
}
if(document.getElementById(link)){
document.getElementById(link).style.color="#000066";
document.getElementById(link).style.backgroundColor="#FFFFCC";
}
}
} else {
with(document){
document.getElementById(ong).style.visibility="hidden";
if (document.getElementById(ong)){
document.getElementById(ong).style.visibility="hidden";
}
if (document.getElementById(link)) {
document.getElementById(link).style.color="#669999";
document.getElementById(link).style.backgroundColor="#D8DEB8";
document.getElementById(link).style.color="#669999";
document.getElementById(link).style.backgroundColor="#D8DEB8";
}
}
}