var photos = new Array (); var countPhotos = 0, photoRoot = ""; function CreatePhoto (src, width, height, alt, ref, delayed) { if ( SupportDHTML ()) { if (delayed) { this.img = null; this.src = src; this.width = width; this.height = height; this.alt = alt; } else { this.img = new Image (); this.img.src = src; this.img.width = width; this.img.height = height; this.img.alt = alt; } this.ref = ref; this.load = LoadPhoto; } // if } function LoadPhoto () { if (this.img == null) { this.img = new Image (); this.img.src = this.src; this.img.width = this.width; this.img.height = this.height; this.img.alt = this.alt; } } function AddPhoto (src, width, height, alt, ref) { photos [countPhotos] = new CreatePhoto (src, width, height, alt, ref, false); return countPhotos++; } function AddPhotoDelay (src, width, height, alt, ref) { photos [countPhotos] = new CreatePhoto (src, width, height, alt, ref, true); return countPhotos++; } function PhotoSetRoot (s) { photoRoot = s; }