Text Change for john
I posted this under john's topic but it is not showing up, so let me try it here.
This works in IE 5 and NS 4.7. I can't promise it will work with anything lower.
<HTML>
<HEAD>
<STYLE TYPE="text/css"><!--
A:link {text-decoration: none; color: green}
A:visited {text-decoration: none; color: green}
A:active {text-decoration: none; color: green}
//--></STYLE>
<SCRIPT LANGUAGE="JavaScript"><!--
var dhtml = '', no = 0;
if (navigator.appVersion.charAt(0) == "4") {
if (navigator.appVersion.indexOf("MSIE") != -1)
dhtml = 'IE';
else
dhtml = 'NN';
}
function mover(object,text) {
if (dhtml == 'IE') {
eval(object + '.innerText = text');
}
else if (dhtml == 'NN') {
eval('document.layers["' + object + 'b"].moveBelow(document.layers["' + object + 'a"])');
eval('document.layers["' + object + 'b"].visibility="hide"');
eval('document.layers["' + object + 'a"].visibility="show"');
}
}
function mout(object,text) {
if (dhtml == 'IE') {
eval(object + '.innerText = text');
}
else if (dhtml == 'NN') {
eval('document.layers["' + object + 'a"].moveBelow(document.layers["' + object + 'b"])');
eval('document.layers["' + object + 'a"].visibility="hide"');
eval('document.layers["' + object + 'b"].visibility="show"');
}
}
function dLink(href,text,txet) {
if (dhtml == 'IE')
document.write('<A HREF="'+href+'" onMouseOut="mout(\'link'+no+'\',\''+txet+'\')" onMouseOver="mover(\'link'+no+'\',\''+text+'\')" ID="link'+no+'">'+txet+'<\/A>');
else if (dhtml == 'NN')
document.write('<LAYER NAME="link'+no+'a" VISIBILITY="hide"><A HREF="'+href+'" onMouseOut="mout(\'link'+no+'\')">'+text+'<\/A><\/LAYER><LAYER NAME="link'+no+'b"><A HREF="'+href+'" onMouseOver="mover(\'link'+no+'\')">'+txet+'<\/A><\/LAYER>');
else
document.write('<A HREF="'+href+'">'+text+'<\/A>');
document.write('<BR>');
no+=1;
}
//--></SCRIPT>
</HEAD>
<BODY bgcolor="black">
<SCRIPT>
dLink('blah.html','[Weapons]','Weapons');
dLink('blah.html','[Armor]','Armor');
dLink('blah.html','[Shields]','Shields');
</SCRIPT>
</BODY>
</HTML>