i have 50 hidden div layers with images insided, each is appr. 200kb big.
i use this script to show/hide them, when neccesary:
Expand|Select|Wrap|Line Numbers
- function init() {
- IE = (document.all)
- NC = (document.layers)
- Opera = (document.getElementById)
- }
- function hide(id) {
- init();
- if(IE) eval('document.all[id].style.visibility = "hidden"')
- if(NC) eval('document.layers[id].visibility = "hidden"')
- if(Opera) eval('document.getElementById(id).style.visibility = "hidden"')
- }
- function show(id) {
- init();
- if(IE) eval('document.all[id].style.visibility = "visible"')
- if(NC) eval('document.layers[id].visibility = "visible"')
- if(Opera) eval('document.getElementById(id).style.visibility = "visible"')
- }
but the problem is, that the layers with hidden images sometimes are loading too slowly. how can i preload them in this case? maybe it is possible to preload them in variables and them call with a script... ?
i would appreciate any advice. thx :)