home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 40
/
MINAMI40.ISO
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
HTML
/
BARBUTTON.HTC
< prev
next >
Wrap
Text File
|
2002-12-14
|
2KB
|
87 lines
<PUBLIC:COMPONENT lightWeight=true>
<PUBLIC:EVENT name="onbuttonclick" ID=doclick>
<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="load()" />
<PUBLIC:ATTACH EVENT="onmouseout" ONEVENT="mouseout()" />
<PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="mousemove()" />
<PUBLIC:ATTACH EVENT="onmousedown" ONEVENT="mousedown()" />
<PUBLIC:ATTACH EVENT="onmouseup" ONEVENT="mouseup()" />
<PUBLIC:PROPERTY NAME="text" PUT="setText" GET="getText" />
<SCRIPT LANGUAGE="JScript">
var g_sText, fLoaded = false;
function load()
{
var s = '<table border=0 cellpadding=0 cellspacing=0><tr>';
s += '<td height=18 width=9 style="cursor:default"><img id="' + element.uniqueID + 'left" style="display:none" border=0 src="images\\hover-left.gif"></td>';
s += '<td height=18 id="' + element.uniqueID + 'mid" style="cursor:default; background: transparent x repeat-x top left" class=textTitle>' + g_sText + '</td>';
s += '<td height=18 width=9 style="cursor:default"><img id="' + element.uniqueID + 'right" style="display:none" border=0 src="images\\hover-right.gif"></td></tr></table>';
element.innerHTML = s;
fLoaded = true;
}
function setText(sText)
{
g_sText = sText;
if (fLoaded)
element.document.all(element.uniqueID + 'mid').innerText = g_sText;
}
function getText()
{
return g_sText;
}
function setImage(iMode)
{
var sKey, sDisplay, id, a, sRight, sLeft;
sDisplay = 'inline';
if (iMode == 1)
sKey = 'hover';
else if (iMode == 2)
sKey = 'down';
else
{
sKey = 'normal';
sDisplay = 'none';
}
if (IsRTLPage())
{
sRight = 'left';
sLeft = 'right';
}
else
{
sRight = 'right';
sLeft = 'left';
}
a = element.document.all;
id = element.uniqueID;
a(id + 'left').src = 'images\\' + sKey + '-' + sLeft + '.gif';
if (sKey == 'normal')
a(id + 'mid').style.backgroundImage = '';
else
a(id + 'mid').style.backgroundImage = 'url(images\\' + sKey + '-center.gif)';
a(id + 'right').src = 'images\\' + sKey + '-' + sRight + '.gif';
a(id + 'left').style.display = sDisplay
a(id + 'right').style.display = sDisplay
}
function mouseout() { setImage(0); }
function mousemove() { setImage(1); }
function mousedown() { setImage(2); }
function mouseup()
{
setImage(1);
var e = createEventObject();
doclick.fire(e);
}
</SCRIPT>
</PUBLIC:COMPONENT>