home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hentai 69
/
HENTAI69.iso
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
HTML
/
RELATEDARTISTS.HTC
< prev
next >
Wrap
Text File
|
2002-12-14
|
4KB
|
106 lines
<PUBLIC:COMPONENT lightWeight=true>
<PUBLIC:METHOD NAME="reload" />
<PUBLIC:METHOD NAME="updateMedia" />
<PUBLIC:ATTACH EVENT="onresize" ONEVENT="resize()" />
<PUBLIC:METHOD NAME="noData" />
<SCRIPT LANGUAGE="JScript">
function reload() { load(); }
function updateMedia(media) { load(); }
var oDL;
function load()
{
oDL = element.document.all('dataload');
oDL.getDataAsync('info_relatedartists', loadData);
var s = '<table width=368 class=pane border=0 cellpadding=0 cellspacing=0>';
s += '<tr><td class=artist>' + L_RelatedArtistsTitle_Text + '</td></tr>';
s += '<tr><td>' + GetRelatedTOC(1) + '</td></tr>';
s += '<tr><td height=14 class=text id=relatedArtistsHeader></td></tr>';
s += '<tr><td height=10></td></tr>';
s += '<tr><td valign=top height=40>' + GetButtons(11, L_RelatedAlbumsTitle_Text, 13, L_RelatedRadioTitle_Text) + '</td></tr>';
s += '<tr><td id=relatedArtistsData width=368 height=100% valign=top>' + GetLoading('black');
element.innerHTML = s + '</td></tr></table>';
SetArtistAlbumHeader('relatedArtistsHeader', true, true, false);
}
function resize()
{
var el = element.document.all(uniqueID + 'resize');
if (el)
el.style.height = Math.max(element.document.body.clientHeight - getElementTop('relatedArtistsData'), 10);
}
function loadData(oXML)
{
oDL.saveIDs(oXML);
var s;
if (oDL.getNodeText(oXML, 'p_id').length)
{
var sSimilar, sCollaborators, sRoots;
sSimilar = GetArtists(oDL, oXML, 'Similar Artists', L_SimilarArtistsListHeader_Text, 'XM');
sCollaborators = GetArtists(oDL, oXML, 'Collaborators', L_CollaboratorsListHeader_Text, 'XC');
sRoots = GetArtists(oDL, oXML, 'Roots and Influences', L_InfluencedByListHeader_Text, 'XR');
if (sSimilar.length || sCollaborators.length || sRoots.length)
{
s = '<div class=text id="' + uniqueID + 'resize" style="overflow-y: scroll; width: 368; height: ' + (element.document.body.clientHeight - getElementTop('relatedArtistsData')) + '">';
s += '<table border=0 cellpadding=0 cellspacing=0>';
s += '<tr><td width=180 valign=top>' + sSimilar + '</td><td width=8></td>';
s += '<td width=180 valign=top><table border=0 cellpadding=0 cellspacing=0><tr><td valign=top>' + sCollaborators;
s += '</td></tr><tr><td valign=top>' + sRoots + '</td></tr></table></td></tr>';
s += '</td></tr></table></div>';
}
else
{
oDL.setNoData(L_NoRelatedArtistsError_Text, 'images\\artist.gif', false);
return;
}
}
else
{
oDL.setNoData(L_CantFindArtistError_Text, 'images\\artist.gif', true);
return;
}
try
{
element.document.all('relatedArtistsData').innerHTML = s;
} catch(e)
{
}
}
function GetArtists(oDL, oXML, sType, sHeader, sCode)
{
var s = '<table border=0 cellpadding=0 cellspacing=0>', i, iDone = 0;
var oArtists = oXML.getElementsByTagName('Artist');
s += '<tr><td class=textBold>' + sHeader + '</td></tr>';
for (i = 0; i < oArtists.length; i++)
{
if (oArtists[i].getAttribute('relation') == sType)
{
s += '<tr><td valign=top class=text><A onclick="return visitLink(this, \'' + sCode + 'T' + getClickIndex(i) + '\');" href="' + getMediaGuideUrl('artistprofile') + 'p_id=' + quoteText(oDL.getNodeText(oArtists[i], 'p_id')) + '&name=' + fixText(oDL.getNodeText(oArtists[i], 'Name')) + '" class=text target=wmc>' + fixText(oDL.getNodeText(oArtists[i], 'Name')) + '</a></td></tr>';
iDone++;
}
}
if (iDone)
return s + '<tr><td height=15></td></tr></table>';
else
return '';
}
function noData(sHTML)
{
element.document.all('relatedArtistsData').innerHTML = sHTML;
}
</SCRIPT>
</PUBLIC:COMPONENT>