home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================
- DESC: Preload Button and Other Images
-
- PLATFORMS: >= MS IE 4.0
-
- USAGE NOTES:
- ====================================================================== */
- var IfnS = ".jpg"; // Image file name suffix; JPG for > 8 bit color; GIF <= 8 bit
- var preLoadStart = false;
- var preLoadDone = false;
- var ChartButtonDone = false;
- var TreeButtonDone = false;
- var ImgAr = new Array();
- var ImgArIx = 0;
-
- function resetButtonDone() {
- preLoadStart = false;
- preLoadDone = false;
- ChartButtonDone = false;
- TreeButtonDone = false;
- }
-
- function preLoadImgs() {
- preLoadStart = true;
- // Determine Color Depth and Type of image files to use
- IfnS = (screen.colorDepth > 4) ? ".jpg" : ".gif";
-
- // Preload Images
- ImgArIx = -1;
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Monito1.jpg";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Monito3.jpg";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/IntroGraph.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "Animations/AniBTLogoFloat.gif";
- // Set event for last image of this group
- (ImgAr[++ImgArIx] = new Image() ).onload = preLI0a;
- (ImgAr[ImgArIx]).src = "images/IntroOverview.gif";
- }
-
- function preLI0a() {
- (ImgAr[++ImgArIx] = new Image() ).src = "images/SepLong"+IfnS;
- (ImgAr[++ImgArIx] = new Image() ).src = "images/TreeIn.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Sep1"+IfnS;
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Checkbox.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/CheckboxHide.gif";
- // Set event for last image of this group
- (ImgAr[++ImgArIx] = new Image() ).onload = preLI7;
- (ImgAr[ImgArIx]).src = "images/TreeOut.gif";
- }
-
- function preLI7() {
- ChartButtonDone = true; // indicate Chart Buttons loaded
- (ImgAr[++ImgArIx] = new Image() ).src = "images/topopen.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/objects.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/white.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "Animations/AniTrash.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "Animations/AniAlarmClock.gif";
- // Set event for last image of this group
- (ImgAr[++ImgArIx] = new Image() ).onload = preLI71;
- (ImgAr[ImgArIx]).src = "images/I.gif";
- }
-
- function preLI71() {
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Tminus.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Tplus.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Counter.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/L.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/T.gif";
- // Set event for last image of this group
- (ImgAr[++ImgArIx] = new Image() ).onload = preLI72;
- (ImgAr[ImgArIx]).src = "images/Checked.gif";
- }
-
- function preLI72() {
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Unchecked.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Computer.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Lminus.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/Lplus.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/rightbutton.gif";
- (ImgAr[++ImgArIx] = new Image() ).src = "images/invisibleleftbutton.gif";
- // Set event for last image of this group
- (ImgAr[++ImgArIx] = new Image() ).onload = LoadComplete;
- (ImgAr[ImgArIx]).src = "images/leftbuttont.gif";
- }
-
- function LoadComplete() {
- TreeButtonDone = true; // indicate Tree Buttons loaded
- preLoadDone = true;
- document.body.style.cursor = "auto";
- }
-
-