home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 40
/
MINAMI40.ISO
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
HTML
/
NAVBAR.HTC
< prev
next >
Wrap
Text File
|
2002-12-14
|
4KB
|
104 lines
<PUBLIC:COMPONENT lightWeight=true>
<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="load()" />
<PUBLIC:METHOD NAME="visitPage" />
<PUBLIC:METHOD NAME="goBack" />
<PUBLIC:METHOD NAME="goForward" />
<PUBLIC:METHOD NAME="colorChange" />
<PUBLIC:METHOD NAME="debugText" />
<SCRIPT LANGUAGE="JScript">
var aPages = new Array();
var o = new Object();
o.page = 0;
o.left = 0;
aPages[0] = o;
var iCurrentPage = 0, iMaxPage = 0;
function load()
{
element.style.backgroundColor = getCurrentColor();
var s = '<span class=navbar><table border=0 height=26 cellpadding=0 cellspacing=0><tr><td width=6></td>', sBack, sForward;
if (IsRTLPage())
{
sBack = 'forward';
sForward = 'back';
}
else
{
sBack = 'back';
sForward = 'forward';
}
s += '<td id="' + element.uniqueID + 'back" class=navbutton enabled=0 style="padding:2" image="' + sBack + '" text="' + L_BackNav_Text + '" onclick="trackIt(\'NBN0\'); if (this.enabled==1) ' + element.uniqueID + '.goBack()"></td>';
s += '<td id="' + element.uniqueID + 'forward" class=navbutton enabled=0 style="padding:2" image="' + sForward + '" text="' + L_ForwardNav_Text + '" onclick="trackIt(\'NBN1\'); if (this.enabled==1) ' + element.uniqueID + '.goForward()"></td>';
s += '<td id="' + element.uniqueID + 'stop" class=navbutton enabled=1 style="padding:2" image="stop" onclick="trackIt(\'NBN2\');" text="' + L_StopNav_Text + '"></td>';
s += '<td id="' + element.uniqueID + 'reload" class=navbutton enabled=1 style="padding:2" image="reload" text="' + L_RefreshNav_Text + '" onclick="trackIt(\'NBN3\'); refreshPage()"></td>';
s += '<td id="' + element.uniqueID + 'home" class=navbutton enabled=1 style="padding:2" image="home" text="' + L_HomeNav_Text + '" onclick="trackIt(\'NBN4\'); goHome()"></td>';
s += '<td style="padding:2; color:white">|</td>';
s += '<td id="' + element.uniqueID + 'search" class=navbutton enabled=1 style="padding:2" image="search" text="' + L_FindMediaNav_Text + '" onclick="trackIt(\'NBN5\'); doSearch()"></td>';
s += '<td nowrap style="color: white" id="' + element.uniqueID + 'debug"></td>';
element.innerHTML = s + '</tr></table></span>';
}
function checkButtons()
{
var iBack = 1, iForward = 1;
if (iCurrentPage == 0)
iBack = 0;
if (iCurrentPage == iMaxPage)
iForward = 0;
element.document.all(uniqueID + 'back').enabled = iBack;
element.document.all(uniqueID + 'forward').enabled = iForward;
}
function goBack()
{
if (iCurrentPage > 0)
{
iCurrentPage--;
switchToPage(aPages[iCurrentPage].page, aPages[iCurrentPage].left);
}
checkButtons();
}
function goForward()
{
if (iCurrentPage < iMaxPage)
{
iCurrentPage++;
switchToPage(aPages[iCurrentPage].page, aPages[iCurrentPage].left);
}
checkButtons();
}
function visitPage(i, sBG)
{
var o = new Object();
o.page = i;
o.left = element.document.all(sBG).style.posLeft;
aPages[++iCurrentPage] = o;
iMaxPage = iCurrentPage;
checkButtons();
}
function colorChange()
{
element.style.backgroundColor = getCurrentColor();
element.document.all(element.uniqueID + 'search').colorChange();
element.document.all(element.uniqueID + 'back').colorChange();
element.document.all(element.uniqueID + 'forward').colorChange();
element.document.all(element.uniqueID + 'stop').colorChange();
element.document.all(element.uniqueID + 'reload').colorChange();
element.document.all(element.uniqueID + 'home').colorChange();
}
function debugText(s)
{
element.document.all(element.uniqueID + 'debug').innerText = s;
}
</SCRIPT>
</PUBLIC:COMPONENT>