Вот код:
Код:
<SCRIPT language=javascript>
<!--
BrowserName = navigator.appName;
BrowserVer = parseInt(navigator.appVersion);
version = "bad";
if((BrowserName == "Netscape" && BrowserVer >= 3) ||
(BrowserName == "Microsoft Internet Explorer" && BrowserVer >= 3))
version = "good";
name="";
var flag = new Array(10);
for(i=0; i<10; i++) flag[i]=0;
if(version == "good")
{
b1on = new Image();
b1on.src = "images/b1_1.gif";
b2on = new Image();
b2on.src = "images/b2_1.gif";
b3on = new Image();
b3on.src = "images/b3_1.gif";
b4on = new Image();
b4on.src = "images/b4_1.gif";
b5on = new Image();
b5on.src = "images/b5_1.gif";
b6on = new Image();
b6on.src = "images/b6_1.gif";
b7on = new Image();
b7on.src = "images/b7_1.gif";
b8on = new Image();
b8on.src = "images/b8_1.gif";
b9on = new Image();
b9on.src = "images/b9_1.gif";
b10on = new Image();
b10on.src = "images/b10_1.gif";
b11on = new Image();
b11on.src = "images/b11_1.gif";
b12on = new Image();
b12on.src = "images/b12_1.gif";
b13on = new Image();
b13on.src = "images/b13_1.gif";
bm1on = new Image();
bm1on.src = "images/b_more_1.gif";
bm2on = new Image();
bm2on.src = "images/b_more_1.gif";
bm3on = new Image();
bm3on.src = "images/b_more_1.gif";
b1off = new Image();
b1off.src = "images/b1_0.gif";
b2off = new Image();
b2off.src = "images/b2_0.gif";
b3off = new Image();
b3off.src = "images/b3_0.gif";
b4off = new Image();
b4off.src = "images/b4_0.gif";
b5off = new Image();
b5off.src = "images/b5_0.gif";
b6off = new Image();
b6off.src = "images/b6_0.gif";
b7off = new Image();
b7off.src = "images/b7_0.gif";
b8off = new Image();
b8off.src = "images/b8_0.gif";
b9off = new Image();
b9off.src = "images/b9_0.gif";
b10off = new Image();
b10off.src = "images/b10_0.gif";
b11off = new Image();
b11off.src = "images/b11_0.gif";
b12off = new Image();
b12off.src = "images/b12_0.gif";
b13off = new Image();
b13off.src = "images/b13_0.gif";
bm1off = new Image();
bm1off.src = "images/b_more_0.gif";
bm2off = new Image();
bm2off.src = "images/b_more_0.gif";
bm3off = new Image();
bm3off.src = "images/b_more_0.gif";
}
function img_act(imgName)
{
flag[imgName]=1;
if(version=="good")
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}
function img_inact(imgName)
{
flag[imgName]=0;
if(version=="good")
{
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
function img_click(imgName)
{
if(version=="good")
{
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
name=imgName;
setTimeout('wait()', 70)
}
}
function wait()
{
if(flag[name]==1)
{
imgOn = eval(name + "on.src");
document [name].src = imgOn;
}
}
//-->
</SCRIPT>
подключается он этим:
Код:
<A
onmouseover="img_act('b1')" onclick="img_click('b1')"
onmouseout="img_inact('b1')"
href="BELWOODBAKERY_COM, INC.files/r"><IMG height=20
src="BELWOODBAKERY_COM, INC.files/b1_0.gif" width=163 border=0
name=b1></A>
Пробую у себя на машине нихрена не работает! Помогите разобраться в чем трабла... Соответственно все параметры меняю на свои!