Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is a test only

Status
Not open for further replies.

Izzo

Technical User
Feb 22, 2001
38
US
function PreloadImages(length, path, type) {
for(var i = 1; i<=length; i++) {
this= new Image()
this.src= path + i + type
}
return this
}
ovr=new PreloadImages(10,'Sub_Menu_1/sub1_butovr','.gif')
nrm=new PreloadImages(10,'Sub_Menu_1/sub1_but','.gif')
ovrB=new PreloadImages(10,'Sub_Menu_2/sub2_butovr','.gif')
nrmB=new PreloadImages(10,'Sub_Menu_2/sub2_but','.gif')
function Iswap(no,id){
if (document.layers && id){
eval('document.layers[id].document.images[&quot;nrm'+no+'&quot;].src ='+'ovr[no].src')
}
else if (document.images){
eval('document.images[&quot;nrm'+no+'&quot;].src ='+'ovr[no].src')
}
}
function Iback(no,id){
if (document.layers && id){
eval('document.layers[id].document.images[&quot;nrm'+no+'&quot;].src ='+'nrm[no].src')
}
else if (document.images){
eval('document.images[&quot;nrm'+no+'&quot;].src ='+'nrm[no].src')
}
}
 
function PreloadImages(length, path, type) {
for(var i = 1; i<=length; i++) {
this= new Image()
this.src= path + i + type
}
return this
}
ovr=new PreloadImages(10,'Sub_Menu_1/sub1_butovr','.gif')
nrm=new PreloadImages(10,'Sub_Menu_1/sub1_but','.gif')
ovrB=new PreloadImages(10,'Sub_Menu_2/sub2_butovr','.gif')
nrmB=new PreloadImages(10,'Sub_Menu_2/sub2_but','.gif')
function Iswap(no,id){
if (document.layers && id){
eval('document.layers[id].document.images[&quot;nrm'+no+'&quot;].src ='+'ovr[no].src')
}
else if (document.images){
eval('document.images[&quot;nrm'+no+'&quot;].src ='+'ovr[no].src')
}
}
function Iback(no,id){
if (document.layers && id){
eval('document.layers[id].document.images[&quot;nrm'+no+'&quot;].src ='+'nrm[no].src')
}
else if (document.images){
eval('document.images[&quot;nrm'+no+'&quot;].src ='+'nrm[no].src')
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top