Problemer med en menu (Javascript/html)
er der nogen der kan forklare hvorfor at der er mellemrum mellem disse billeder:I head står dette:
<script language="JavaScript">
/* MouseOver Button Wizard by Mike Cullen
EMAIL ME AT mcullen1@hotmail.com or visit http://www.mobw.net */
var browser = '';
var version = '';
var entrance = '';
var cond = '';
// BROWSER
if (browser == ''){
if (navigator.appName.indexOf('Microsoft') != -1)
browser = 'IE'
else if (navigator.appName.indexOf('Netscape') != -1)
browser = 'Netscape'
else browser = 'NN';
}
// VERSION?
if (version == ''){
version= navigator.appVersion;
paren = version.indexOf('(');
whole_version = navigator.appVersion.substring(0,paren-1);
version = parseInt(whole_version);
}
// BROWSER & VERSION
if (browser == 'IE' && version >= 4) entrance = 'yes';
if (browser == 'IE' && version < 4) entrance = 'no';
if (browser == 'Netscape' && version >= 2.02) entrance = 'yes';
if (browser == 'Netscape' && version < 2.02) entrance = 'no';
if (entrance=='yes'){
name0a=new Image;name0a.src="pics/optrædende.gif";
name0b=new Image;name0b.src="pics/optrædende2.gif";
name0c=new Image;name0c.src="pics/optrædende2.gif";
name1a=new Image;name1a.src="pics/billeder.gif";
name1b=new Image;name1b.src="pics/billeder2.gif";
name1c=new Image;name1c.src="pics/billeder2.gif";
name2a=new Image;name2a.src="pics/sponsorer.gif";
name2b=new Image;name2b.src="pics/sponsorer2.gif";
name2c=new Image;name2c.src="pics/sponsorer2.gif";
name3a=new Image;name3a.src="pics/kontakt.gif";
name3b=new Image;name3b.src="pics/kontakt2.gif";
name3c=new Image;name3c.src="pics/kontakt2.gif";
name4a=new Image;name4a.src="pics/flyers.gif";
name4b=new Image;name4b.src="pics/flyers2.gif";
name4c=new Image;name4c.src="pics/flyers2.gif";
name5a=new Image;name5a.src="pics/links.gif";
name5b=new Image;name5b.src="pics/links2.gif";
name5c=new Image;name5c.src="pics/links2.gif";
}
function lighten(imgName) {
if (entrance == 'yes'){
imgOn = eval(imgName + 'b.src');
document[imgName].src = imgOn;
}
}
function darken(imgName) {
if (entrance == 'yes'){
imgOff = eval(imgName + 'a.src');
document[imgName].src = imgOff;
}
}
function darken2(imgName) {
if (entrance == 'yes'){
imgClick = eval(imgName + 'c.src');
document[imgName].src = imgClick;
}
}
</script>
og i body står dette (som er menuen):
<!--Button Number 1-->
<a href="optrædende.php" target="_self" onmouseover="lighten('name0')" onmouseout="darken('name0')" onmousedown="darken2('name0')" onmouseup="darken('name0')"><img src="pics/optrædende.gif" name="name0" alt="Næste jams optrædende" border="0"></a>
<!--Button Number 2-->
<a href="billeder.php" target="_self" onmouseover="lighten('name1')" onmouseout="darken('name1')" onmousedown="darken2('name1')" onmouseup="darken('name1')"><img src="pics/billeder.gif" name="name1" alt="Diverse billeder fra tidligere jams" border="0"></a>
<!--Button Number 3-->
<a href="sponsorer.php" target="_self" onmouseover="lighten('name2')" onmouseout="darken('name2')" onmousedown="darken2('name2')" onmouseup="darken('name2')"><img src="pics/sponsorer.gif" name="name2" alt="Vores Sponsorer" border="0"></a>
<!--Button Number 4-->
<a href="kontakt.php" target="_self" onmouseover="lighten('name3')" onmouseout="darken('name3')" onmousedown="darken2('name3')" onmouseup="darken('name3')"><img src="pics/kontakt.gif" name="name3" alt="Kontakt os" border="0"></a>
<!--Button Number 5-->
<a href="flyers.php" target="_self" onmouseover="lighten('name4')" onmouseout="darken('name4')" onmousedown="darken2('name4')" onmouseup="darken('name4')"><img src="pics/flyers.gif" name="name4" alt="Flyeres fra kommende og tidligere jams" border="0"></a>
<!--Button Number 6-->
<a href="links.php" target="_self" onmouseover="lighten('name5')" onmouseout="darken('name5')" onmousedown="darken2('name5')" onmouseup="darken('name5')"><img src="pics/links.gif" name="name5" alt="Links" border="0"></a>