home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September (Special)
/
Chip-Special_2002-09_Digitalni-Video.bin
/
servis
/
wm9
/
mpsetupXP.exe
/
RCDATA
/
CABINET
/
wmploc.DLL
/
HTML
/
FLYMEDIA.HTC
< prev
next >
Wrap
Text File
|
2002-08-19
|
5KB
|
154 lines
<PUBLIC:COMPONENT lightWeight=true>
<PUBLIC:METHOD NAME="reload" />
<SCRIPT LANGUAGE="JScript">
var oXML, oDL, fArtistMedia;
function reload(sParam)
{
oDL = element.document.all('dataload');
fArtistMedia = true;
oXML = oDL.getDataAsync('info_moremedia', loadData);
var s = '<table width=368 class=flypane border=0 cellpadding=0 cellspacing=0>'
s += '<tr><td class=artist style="color:white" valign=top>' + L_MoreMediaTitle_Text + '</td><td valign=top align=right>' + GetFlyClose('flymedia') + '</td></tr>';
s += '<tr><td class=song style="color:white" colspan=2 valign=top>' + element.document.all('artistNameSaved').innerText + '</td></tr>';
s += '<tr><td colspan=2 height=20></td></tr>';
s += '<tr><td colspan=2 id=moreMediaData></td></tr>';
element.innerHTML = s + '</table>';
}
function loadData()
{
if (oXML)
{
if (oXML.readyState == 4)
{
var s, sTemp;
if (fArtistMedia)
{
if (oXML.getElementsByTagName('Media').length == 0)
{
oXML = oDL.getDataAsync('info_relatedmedia', loadData);
fArtistMedia = false;
return;
}
}
s = '<div class=text style="overflow-y: scroll; width: 368; height: expression(Math.max(180, document.body.clientHeight - 82))">';
s += '<table border=0 cellpadding=0 cellspacing=0>';
sTemp = GetDownloads(oDL, oXML);
if (sTemp.length)
{
s += '<tr><td colspan=2 class=textTitle style="color:white">' + L_MusicDownloadsTitle_Text + '</td></tr>';
s += sTemp + '<tr><td colspan=2 height=10></td></tr>';
}
sTemp = GetVideos(oDL, oXML);
if (sTemp.length)
{
s += '<tr><td colspan=2 class=textTitle style="color:white">' + L_MusicVideosTitle_Text + '</td></tr>';
s += sTemp + '<tr><td colspan=2 height=10></td></tr>';
}
// s += GetRadio(oDL, oXML) + '</table></div>';
try
{
element.document.all('moreMediaData').innerHTML = s;
} catch(e)
{
}
}
}
}
function GetDownloads(oDL, oXML)
{
var s = '', aMedia, i, iDone = 0;
aMedia = oXML.getElementsByTagName('Media');
for (i = 0; i < aMedia.length; i++)
{
if (aMedia[i].getAttribute('Type') == 'Download')
{
s += '<tr><td valign=top width=368>' + GetOneDownload(oDL, aMedia[i]) + '</td></tr>';
iDone++;
}
}
if (!iDone) s = '';
return s;
}
function GetVideos(oDL, oXML)
{
var s = '', aMedia, i, iDone = 0;
aMedia = oXML.getElementsByTagName('Media');
for (i = 0; i < aMedia.length; i += 2)
{
if (aMedia[i].getAttribute('Type') == 'Video')
{
s += '<tr><td valign=top width=368>' + GetOneDownload(oDL, aMedia[i]) + '</td></tr>';
iDone++;
}
}
if (!iDone) s = '';
return s;
}
function GetOneDownload(oDL, oMedia)
{
if (oMedia)
{
var s = '<table border=0 cellpadding=0 cellspacing=0><tr><td class=text valign=top style="color:white"><table border=0 cellpadding=0 cellspacing=0><tr>', i, aStream, sImage;
s += '<td class=text style="color:white">' + fixText(oDL.getNodeText(oMedia, 'Performer')) + ' : ' + fixText(oDL.getNodeText(oMedia, 'TrackName')) + '</td></tr>';
s += '<tr><td class=text>';
aStream = oMedia.getElementsByTagName('Stream');
for (i = 0; i < aStream.length; i++)
{
s += '<A ' + getHrefText(oDL.getNodeText(aStream[i], 'Url'), false, '', '') + ' class=text style="color:white">' + fixText(oDL.getNodeText(aStream[i], 'Speed')) + '</a>';
if (i != (aStream.length - 1))
s += ' | ';
}
s += '</td></tr><td><A ' + getHrefText(oDL.getNodeText(oMedia, 'ProviderURL'), false, '', '') + ' class=text style="color:white">' + fixText(oDL.getNodeText(oMedia, 'ProviderName')) + '</a></td></tr>';
s += '</table></td></tr><tr><td height=5></td></tr></table>';
return s;
}
else return '';
}
function GetRadio(oDL, oXML)
{
var s = '', aStations, i;
aStations = oXML.getElementsByTagName('Media');
if (aStations.length)
{
s += '<tr><td colspan=2 class=textTitle style="color:white">' + fixText(oDL.getNodeText(oRadio[0], 'Title')) + '</td></tr>';
for (i = 0; i < aStations.length; i++)
s += GetStation(oDL, aStations[i]);
}
return s;
}
function GetStation(oDL, oStation)
{
var s = '<tr><td colspan=2 valign=top><table border=0 cellpadding=0 cellspacing=0><tr>';
s += '<td width=180 valign=top><A ' + getHrefText(oDL.getNodeText(oStation, 'FlipUrl'), false, '', '') + ' class=text style="color:white">' + fixText(oDL.getNodeText(oStation, 'Name')) + '</a></td><td width=8></td>';
s += '<td width=180 valign=top class=text><A ' + getHrefText(oDL.getNodeText(oStation, 'StreamUrl'), true, '', '') + ' class=text>' + fixText(oDL.getNodeText(oStation, 'Speed')) + '</a></td>';
return s + '</tr></table></td></tr><tr><td height=5 colspan=2></td></tr>';
}
</SCRIPT>
</PUBLIC:COMPONENT>