home *** CD-ROM | disk | FTP | other *** search
/ Hentai 69 / HENTAI69.iso / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / HTML / FLYMOREHEADLINES.HTC < prev    next >
Text File  |  2002-12-14  |  3KB  |  93 lines

  1. <PUBLIC:COMPONENT lightWeight=true>
  2. <PUBLIC:METHOD NAME="reload" />
  3. <PUBLIC:METHOD NAME="colorChange" />
  4. <PUBLIC:ATTACH EVENT="onresize" ONEVENT="resize()" />
  5. <PUBLIC:METHOD NAME="noData" />
  6. <PUBLIC:METHOD NAME="switchFly" />
  7.  
  8. <SCRIPT LANGUAGE="JScript">
  9. var oDL;
  10. function reload(sParam)
  11. {
  12.     oDL = element.document.all('dataload');
  13.     oDL.getDataAsyncHeadlineList('info_news', loadData);
  14.  
  15.     var s = '<table width=90% class=flypane border=0 cellpadding=0 cellspacing=0>'
  16.     s += '<tr><td class=artist style="color:white" valign=top>' + L_MoreHeadlinesTitle_Text + '</td><td valign=top align=right>' + GetFlyClose('flymoreheadlines') + '</td></tr>';
  17.     s += '<tr><td colspan=2 height=20></td></tr>';
  18.     s += '<tr><td colspan=2 class=text style="color:white" id=headlineListData>' + GetLoading('white') + '</td></tr>';
  19.     element.innerHTML = s + '</table>';    
  20. }
  21.  
  22. function resize()
  23. {
  24.     var el = element.document.all(uniqueID + 'resize');
  25.     if (el)
  26.         el.style.height = Math.max(element.document.body.clientHeight - getFlyElementTop('headlineListData', 10), 10);
  27. }
  28.  
  29. function loadData(oXML)
  30. {
  31.     var s, sHTML;
  32.  
  33.     sHTML = getHeadlineList(oDL, oXML);
  34.     if (sHTML.length)
  35.     {
  36.         s = '<div class=text id="' + uniqueID + 'resize" style="overflow-y: scroll; width: 368; height: ' + (element.document.body.clientHeight - getFlyElementTop('headlineListData', 10)) + '">';
  37.         s += sHTML + '</div>';
  38.     }
  39.     else
  40.     {
  41.         oDL.setNoData(L_NoHeadlinesError_Text, 'images\\artist.gif', true);
  42.         return;
  43.     }
  44.     
  45.     try
  46.     {
  47.         element.document.all('headlineListData').innerHTML = s;
  48.     } catch(e)
  49.     {
  50.     }
  51. }
  52.  
  53. function getHeadlineList(oDL, oXML)
  54. {
  55.     var s = '<table border=0 cellpadding=0 cellspacing=0>', i;
  56.     var aHeadlines = oXML.getElementsByTagName('Headline');
  57.     
  58.     if (aHeadlines.length)
  59.     {
  60.         for (i = 0; i < aHeadlines.length; i++)
  61.             s += getOneHeadline(oDL, aHeadlines[i], i);
  62.         s += '</table>';
  63.     }
  64.     else
  65.         s = '';
  66.     return s;
  67. }
  68.  
  69. function getOneHeadline(oDL, oHeadline, i)
  70. {
  71.     var s = '<tr><td ><A href="X" class=text style="color:white" onclick="trackIt(\'LTT' + getClickIndex(i) + '\'); return ' + element.uniqueID + '.switchFly(\'' + fixText(oDL.getNodeText(oHeadline, 'article_id')) + '\');">' + fixText(oDL.getNodeText(oHeadline, 'Text'));
  72.     s += '</a></td></tr><tr><td height=10></td></tr>';
  73.     return s;
  74. }
  75.  
  76. function switchFly(sID)
  77. {
  78.     doflyout(flyheadline, sID);
  79.     return false;
  80. }
  81.  
  82. function colorChange()
  83. {
  84.     element.style.backgroundColor = getCurrentColor();
  85. }
  86.  
  87. function noData()
  88. {
  89.     element.document.all('headlineListData').innerHTML = sHTML;
  90. }
  91. </SCRIPT>
  92. </PUBLIC:COMPONENT>
  93.