* but rather load them one by one, in order to get
* next ones faster, beginning with next to current
*/
- for (i = current + 1; i < images.length; i++) {
+ for (i = current + 1; i < images.length && i <= current + 5; i++) {
if (load(i) == 0) {
setTimeout("preload()", 500);
return;
}
}
- for (i = 0; i < current; i++) {
- if (load(i) == 0) {
- setTimeout("preload()", 500);
- return;
+ for (i = current - 1; i >= current - 3; i--) {
+ if (i >= 0) {
+ if (load(i) == 0) {
+ setTimeout("preload()", 500);
+ return;
+ }
}
}
+
+ setTimeout("preload()", 500);
}
function init() {
- preload();
/* retrieve GET parameters */
all_params = location.href.split("?")
}
}
+ preload();
display_current();
}