if (current == 0) {
img_first.src = change_basename(img_first.src, 'first_dark.gif');
img_previous.src = change_basename(img_previous.src, 'previous_dark.gif');
- img_first.setAttribute("style", "cursor: default;");
- img_previous.setAttribute("style", "cursor: default;");
+ img_first.style['cursor'] = 'default';
+ img_previous.style['cursor'] = 'default';
} else {
img_first.src = change_basename(img_first.src, 'first_light.gif');
img_previous.src = change_basename(img_previous.src, 'previous_light.gif');
- img_first.setAttribute("style", "cursor: pointer; cursor: hand;"); // to work on IE and FF, but warns on FF :/
- img_previous.setAttribute("style", "cursor: pointer; cursor: hand;");
+ img_first.style['cursor'] = 'pointer'; // to work on IE and FF, but warns on FF :/
+ img_first.style['cursor'] = 'hand';
+ img_previous.style['cursor'] = 'pointer';
+ img_previous.style['cursor'] = 'hand';
}
var img_next = document.getElementById("img_next");
if (current == images.length - 1) {
img_next.src = change_basename(img_next.src, 'next_dark.gif');
img_last.src = change_basename(img_last.src, 'last_dark.gif');
- img_next.setAttribute("style", "cursor: default;");
- img_last.setAttribute("style", "cursor: default;");
+ img_next.style['cursor'] = 'default';
+ img_last.style['cursor'] = 'default';
} else {
img_next.src = change_basename(img_next.src, 'next_light.gif');
img_last.src = change_basename(img_last.src, 'last_light.gif');
- img_next.setAttribute("style", "cursor: pointer; cursor: hand;");
- img_last.setAttribute("style", "cursor: pointer; cursor: hand;");
+ img_next.style['cursor'] = 'pointer';
+ img_next.style['cursor'] = 'hand';
+ img_last.style['cursor'] = 'pointer';
+ img_last.style['cursor'] = 'hand';
}
}