// Progressbar - Version 2.0 // Author: Brian Gosselin of http://scriptasylum.com // Featured on Dynamic Drive (http://www.dynamicdrive.com) // PUT THE NAMES OF ALL YOUR IMAGES THAT NEED TO BE "CACHED" IN THE "imagenames" ARRAY. // DONT FORGET THE COMMA BETWEEN EACH ENTRY, OR THE TICK MARKS AROUND EACH NAME. // WHEN ALL THE IMAGES ARE DONE LOADING, THE "imagesdone" VARIABLE IS SET TO "TRUE" var imagenames=new Array( 'March 7th, 2003/March7th-a.jpg' , 'March 7th, 2003/March7th-a.jpg' , 'March 7th, 2003/March7th-b.jpg' , 'March 7th, 2003/March7th-c.jpg' , 'March 7th, 2003/March7th-d.jpg' , 'March 7th, 2003/March7th-e.jpg' , 'March 7th, 2003/March7th-f.jpg' , 'March 7th, 2003/March7th-g.jpg' , 'March 7th, 2003/March7th-h.jpg' , 'March 7th, 2003/March7th-i.jpg' , 'March 7th, 2003/March7th-j.jpg' , 'March 7th, 2003/March7th-k.jpg'); var yposition=250; //POSITION OF LOAD BAR FROM TOP OF WINDOW, IN PIXELS var loadedcolor='gray' ; // PROGRESS BAR COLOR var unloadedcolor='white'; // BGCOLOR OF UNLOADED AREA var barheight=15; // HEIGHT OF PROGRESS BAR IN PIXELS (MIN 25) var barwidth=350; // WIDTH OF THE BAR IN PIXELS var bordercolor='black'; // COLOR OF THE BORDER //DO NOT EDIT BEYOND THIS POINT var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false; var IE4 = (document.all)? true : false; var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false; var imagesdone=false; var blocksize=barwidth/(imagenames.length); barheight=Math.max(barheight,25); var loaded=0, perouter, perdone, images=new Array(); var txt=(NS4)?'' : ''; document.write(txt); function loadimages(){ if(NS4){ perouter=document.perouter; perdone=document.perouter.document.layers[0].document.perdone; } if(NS6){ perouter=document.getElementById('perouter'); perdone=document.getElementById('perdone'); } if(IE4){ perouter=document.all.perouter; perdone=document.all.perdone; } cliplayer(perdone,0,0,barheight,0); window.onresize=setouterpos; setouterpos(); for(n=0;n=imagenames.length)setTimeout('hideperouter()', 800); } function checkload(index){ (images[index].complete)? dispbars() : setTimeout('checkload('+index+')', 100); } function hideperouter(){ (NS4)? perouter.visibility="hide" : perouter.style.visibility="hidden"; imagesdone=true; } function cliplayer(layer, ct, cr, cb, cl){ if(NS4){ layer.clip.left=cl; layer.clip.top=ct; layer.clip.right=cr; layer.clip.bottom=cb; } if(IE4||NS6)layer.style.clip='rect('+ct+' '+cr+' '+cb+' '+cl+')'; } window.onload=loadimages;
Make your own free website on Tripod.com