home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joystick Magazine 2003 November
/
CD1_JOY_153.iso
/
demos
/
NHL2004Demo.exe
/
fe
/
nhl
/
htc
/
conset
/
swap.htc
< prev
next >
Wrap
Text File
|
2003-08-20
|
2KB
|
60 lines
<!-- Copyright (c) 2002 Electronic Arts Inc. All rights reserved. -->
<PUBLIC:COMPONENT>
<ATTACH EVENT="ondocumentready" HANDLER="doInit" />
<ATTACH EVENT="onmousedown" HANDLER="doMouseDown" />
<ATTACH EVENT="onmouseover" HANDLER="doMouseOver" />
<ATTACH EVENT="onmouseout" HANDLER="doMouseOut" />
<ATTACH EVENT="onmouseup" HANDLER="doMouseUp" />
<ATTACH EVENT="onclick" HANDLER="doClick" />
<script language="javascript">
var aImages = new Array();
var imgPath = "../../NHL/images/conset/";
function doInit()
{
createImg( "down" , "swap_down.gif" );
createImg( "normal" , "swap_nml.gif" );
createImg( "hover" , "swap_hov.gif" );
}
function createImg( sId , sImgName )
{
var oImg = new Image();
oImg.src = imgPath + sImgName;
aImages[ sId ] = oImg;
}
function doMouseDown()
{
element.firstChild.style.color = 'yellow';
element.document.all.swapImg.src = aImages[ "down" ].src;
}
function doMouseOver()
{
element.firstChild.style.color = 'orange';
element.document.all.swapImg.src = aImages[ "hover" ].src;
}
function doMouseUp()
{
element.firstChild.style.color ='white';
element.document.all.swapImg.src = aImages[ "normal" ].src;
}
function doMouseOut()
{
element.firstChild.style.color = 'white';
element.document.all.swapImg.src = aImages["normal"].src;
}
function doClick()
{
SwapTeams();
}
</script>
</PUBLIC:COMPONENT>