<HTML>
<HEAD>
<STYLE>
.link { color: #333333; }
.link2 { color: #666666; }
</STYLE>
<SCRIPT LANGUAGE=\"JavaScript1.2\">
if (document.layers) {
var html = \'\';
html += \'<STYLE>\';
html += \'.rewritable { position: absolute; }\';
html += \'.placeHolder { position: relative; visibility: hidden; }\';
html += \'<\\/STYLE>\\n\';
document.write(html);
}
function HoverElement (content, highClass, lowClass) {
if (content) {
// otherwise the prototype initialization creates unwanted page content
this.id = HoverElement.cnt;
HoverElement.elements[this.id] = this;
this.layerId = \'HoverElement\' + HoverElement.cnt++;
this.content = content;
this.highClass = highClass;
this.lowClass = lowClass || \'\';
this.writeElement();
}
else // not sure why NN4 needs that to get the prototype object
// initialized
this.dummy = \'dummy\';
}
function HoverElement_writeElement () {
var html = \'\';
if (document.layers) {
html += \'<SPAN ID=\"\' + this.layerId + \'\" CLASS=\"rewritable\">\';
html += this.getLowContent();
html += \'<\\/SPAN>\';
html += \'<SPAN ID=\"\' + this.layerId + \'Rel\" CLASS=\"placeHolder\">\';
html += this.getLowContent();
html += \'<\\/SPAN>\';
}
else {
html += this.getContent();
}
document.write(html);
}
HoverElement.prototype.writeElement = HoverElement_writeElement;
function HoverElement_mouseover () {
var html = this.getHighContent();
var l = this.layer;
l.document.open();
l.document.write(html);
l.document.close();
}
HoverElement.prototype.mouseover = HoverElement_mouseover;
function HoverElement_mouseout () {
var html = this.getLowContent();
var l = this.layer;
l.document.open();
l.document.write(html);
l.document.close();
}
HoverElement.prototype.mouseout = HoverElement_mouseout;
function HoverElement_init () {
var l = this.layer = document[this.layerId];
l.HoverElement = this;
l.onmouseover = function (evt) {
this.HoverElement.mouseover();
};
l.onmouseout = function (evt) {
this.HoverElement.mouseout();
}
}
HoverElement.prototype.init = HoverElement_init;
function HoverElement_getContent () {
var html = \'\';
html += \'<SPAN\';
html += this.lowClass ? \' CLASS=\"\' + this.lowClass + \'\"\' : \'\';
html += \' ONMOUSEOVER=\"this.className = \\\'\' + this.highClass
+ \'\\\';\"\';
html += \' ONMOUSEOUT=\"this.className = \\\'\' + this.lowClass + \'\\\';\"\';
html += \'>\';
html += this.content;
html += \'<\\/SPAN>\';
return html;
}
HoverElement.prototype.getContent = HoverElement_getContent;
function HoverElement_getLowContent () {
var html = \'\';
html += \'<SPAN\';
html += this.lowClass ? \' CLASS=\"\' + this.lowClass + \'\"\' : \'\';
html += \'>\';
html += this.content;
html += \'<\\/SPAN>\';
return html;
}
HoverElement.prototype.getLowContent = HoverElement_getLowContent;
function HoverElement_getHighContent () {
var html = \'\';
html += \'<SPAN\';
html += \' CLASS=\"\' + this.highClass + \'\"\';
html += \'>\';
html += this.content;
html += \'<\\/SPAN>\';
return html;
}
HoverElement.prototype.getHighContent = HoverElement_getHighContent;
HoverElement.cnt = 0;
HoverElement.elements = new Array();
HoverElement.init = function () {
if (document.layers)
for (var l = 0; l < HoverElement.elements.length; l++)
HoverElement.elements[l].init();
}
</SCRIPT>
<SCRIPT LANGUAGE=\"JavaScript1.2\">
function HoverLink (url, content, highClass, lowClass) {
this.url = url;
this.base = HoverElement
this.base(content, highClass, lowClass);
}
HoverLink.prototype = new HoverElement();
function HoverLink_getLink () {
var html = \'\';
html += \'<A HREF=\"\' + this.url + \'\"\';
html += this.lowClass ? \' CLASS=\"\' + this.lowClass + \'\"\' : \'\';
html += \' ONMOUSEOVER=\"this.className = \\\'\' + this.highClass
+ \'\\\';\"\';
html += \' ONMOUSEOUT=\"this.className = \\\'\' + this.lowClass + \'\\\';\"\';
html += \'>\';
html += this.content;
html += \'<\\/A>\';
return html;
}
HoverLink.prototype.getContent = HoverLink_getLink;
function HoverLink_getLowLink () {
var html = \'\';
html += \'<A HREF=\"\' + this.url + \'\"\';
html += this.lowClass ? \' CLASS=\"\' + this.lowClass + \'\"\' : \'\';
html += \'>\';
html += this.content;
html += \'<\\/A>\';
return html;
}
HoverLink.prototype.getLowContent = HoverLink_getLowLink;
function HoverLink_getHighLink () {
var html = \'\';
html += \'<A HREF=\"\' + this.url + \'\"\';
html += \' CLASS=\"\' + this.highClass + \'\"\';
html += \'>\';
html += this.content;
html += \'<\\/A>\';
return html;
}
HoverLink.prototype.getHighContent = HoverLink_getHighLink;
</SCRIPT>
<SCRIPT>
function init() {
HoverElement.init();
}
</SCRIPT>
</HEAD>
<BODY ONLOAD=\"init();\">
<SCRIPT>
new HoverLink (\'
http://javascript.faqts.com\',
\'test på vores side\', \'link\', \'link2\');
</SCRIPT>
</BODY>
</HTML>