From 3c314b358850687ccf46e5624f24e6d0fdcfdff3 Mon Sep 17 00:00:00 2001 From: oleonard Date: Wed, 14 Jun 2006 21:05:59 +0000 Subject: [PATCH] Minor correction to prevent javascript error when less than 10 tabs are present --- .../default/en/acqui.simple/addbiblio.tmpl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl index 5725f6cfa4..9752fac4b7 100644 --- a/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl @@ -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"; } } }