// このファイルの属性
// 文字コード:EUC-JP
// 改行コード:LF
var sUrlBase = 'http://ranking.goo.ne.jp/blgp/hotword/';
var sUrlPageGet = 'http://plus.goo.ne.jp/rnkredir/redir.php?from=blgp_hotword&to=http%3A%2F%2Franking.goo.ne.jp%2Fsp%2Fgadget%2Fchumoku%2F';
var bDbgEnable = false;
var sCharSet = 'EUC-JP';
var nItv4start = 3000;
var nItv4itm = 1000;
var nItv4ymdBlk = 400;
var nItv4ymd2kwd = 1000;
var nItv4kwdAdd = 140;
var nItv4kwd2cmt = 1500;
var nItv4cmtClrChg = 100;
var nItv4clear = 10000;
var nItv4nextPre = 500;
var nItv4datWait = 1000;
var nYmdBlkCnt = 5;
var nItmIdx = -1;
var sUrlJsDat = sUrlBase + 'HotWordData.js';
var sUrlImgSpc = sUrlBase + 's.gif';
var sUrlImgWkTop = sUrlBase + 'wkTop.gif';
var sUrlImgWkBottom = sUrlBase + 'wkBottom.gif';
var sUrlImgWkLeft = sUrlBase + 'wkLeft.gif';
var sUrlImgWkRight = sUrlBase + 'wkRight.gif';
var sUrlImgGoo = sUrlBase + 'goo.gif';
var sUrlImgGet = sUrlBase + 'get.gif';
var sUrlImgKwdBg = sUrlBase + 'kwdBg.gif';
var sUrlImgGoNext = sUrlBase + 'goNext.gif';
var sUrlImgGoPre = sUrlBase + 'goPre.gif';
var sUrlImgYmdTop = sUrlBase + 'ymdTop.gif';
var sUrlImgYmdBottom = sUrlBase + 'ymdBottom.gif';
var sUrlLnkGoo = 'http://plus.goo.ne.jp/rnkredir/redir.php?from=blgp_hotword&to=http%3A%2F%2Fwww.goo.ne.jp%2F';
var sUrlLnkHotWord = 'http://plus.goo.ne.jp/rnkredir/redir.php?from=blgp_hotword&to=http%3A%2F%2Fkwsearch.goo.ne.jp%2Fhotword%2F';
var oItmLst = [];
document.write( '' );
var oCmtClrLst = [
'#EEEEEE'
,'#DDDDDD'
,'#CCCCCC'
,'#BBBBBB'
,'#AAAAAA'
,'#999999'
,'#888888'
,'#777777'
,'#666666'
];
document.write( '' );
document.write( '
' );
var nYmdBlkIdx = 0;
var nKwdNowCnt = 0;
var nCmtClrIdx = 0;
var oItm = null;
var sHtmlYmd = '';
var oTmr;
fncStart();
function fncStart(
)
{
fncLog( 'fncStart() ----------' );
fncSetTimeout( 'fncDataWait', fncDataWait, nItv4start );
}
function fncDataWait(
)
{
fncLog( '++++++++++ fncDataWait()' );
if( oItmLst.length <= 0 )
{
fncLog( '++++++++++ read dat not end.' );
fncSetTimeout( 'fncDataWait', fncDataWait, nItv4datWait );
return;
}
fncLog( '++++++++++ read dat end. ' + oItmLst.length );
fncSetTimeout( 'fncItemShow', fncItemShow, nItv4itm );
}
function fncItemShow(
)
{
fncLog( 'fncItemShow() ----------' );
document.getElementById( 'goo_blgp_hotword_kwd' ).innerHTML = ' ';
nItmIdx = nItmIdx + 1;
if( nItmIdx < 0 )
{
nItmIdx = oItmLst.length - 1;
}
else
if( oItmLst.length <= nItmIdx )
{
nItmIdx = 0;
}
nYmdBlkIdx = 0;
nKwdNowCnt = 0;
nCmtClrIdx = 0;
oItm = oItmLst[nItmIdx];
sHtmlYmd = '';
sHtmlYmd += '';
sHtmlYmd += '';
sHtmlYmd += '| ';
sHtmlYmd += '' + oItm.ymd + 'に注目!!';
sHtmlYmd += ' | ';
sHtmlYmd += '
';
sHtmlYmd += '';
sHtmlYmd += ' | ';
sHtmlYmd += '
';
sHtmlYmd += '
';
fncYmdShow();
}
function fncYmdShow(
)
{
fncLog( 'fncYmdShow()' );
document.getElementById( 'goo_blgp_hotword_ymd' ).innerHTML = sHtmlYmd;
nYmdBlkIdx = nYmdBlkIdx + 1;
if( nYmdBlkIdx < nYmdBlkCnt )
{
fncSetTimeout( 'fncYmdHide', fncYmdHide, nItv4ymdBlk );
}
else
{
fncSetTimeout( 'fncKeywordShow', fncKeywordShow, nItv4ymd2kwd );
}
}
function fncYmdHide(
)
{
fncLog( 'fncYmdHide()' );
document.getElementById( 'goo_blgp_hotword_ymd' ).innerHTML = ' ';
nYmdBlkIdx = nYmdBlkIdx + 1;
if( nYmdBlkIdx < nYmdBlkCnt )
{
fncSetTimeout( 'fncYmdShow', fncYmdShow, nItv4ymdBlk );
}
else
{
fncSetTimeout( 'fncKeywordShow', fncKeywordShow, nItv4ymd2kwd );
}
}
function fncKeywordShow(
)
{
fncLog( 'fncKeywordShow()' );
nKwdNowCnt = nKwdNowCnt + 1;
if( nKwdNowCnt <= oItm.kwd.length )
{
document.getElementById( 'goo_blgp_hotword_kwd' ).innerHTML = '' + oItm.kwd.substr( 0, nKwdNowCnt ) + '';
fncSetTimeout( 'fncKeywordShow', fncKeywordShow, nItv4kwdAdd );
}
else
{
fncSetTimeout( 'fncCommentShow', fncCommentShow, nItv4kwd2cmt );
}
}
function fncCommentShow(
)
{
fncLog( 'fncCommentShow()' );
if( nCmtClrIdx < oCmtClrLst.length )
{
document.getElementById( 'goo_blgp_hotword_cmt' ).innerHTML = '' + oItm.cmt + '';
nCmtClrIdx = nCmtClrIdx + 1;
fncSetTimeout( 'fncCommentShow', fncCommentShow, nItv4cmtClrChg );
}
else
{
fncSetTimeout( 'fncClearAndNext', fncClearAndNext, nItv4clear );
}
}
function fncClearAndNext(
)
{
fncLog( 'fncClearAndNext()' );
fncClear();
fncSetTimeout( 'fncItemShow', fncItemShow, nItv4itm );
}
function fncClear(
)
{
fncLog( 'fncClear()' );
document.getElementById( 'goo_blgp_hotword_ymd' ).innerHTML = ' ';
document.getElementById( 'goo_blgp_hotword_kwd' ).innerHTML = ' ';
document.getElementById( 'goo_blgp_hotword_cmt' ).innerHTML = ' ';
}
function fncNext(
)
{
fncLog( 'fncNext()' );
clearTimeout( oTmr );
fncClear();
fncSetTimeout( 'fncItemShow', fncItemShow, nItv4nextPre );
}
function fncPre(
)
{
fncLog( 'fncPre()' );
clearTimeout( oTmr );
fncClear();
nItmIdx = nItmIdx - 2;
fncSetTimeout( 'fncItemShow', fncItemShow, nItv4nextPre );
}
function fncSetTimeout(
sFncName
,oFnc
,nItv
)
{
fncLog( ' setTimeout : ' + nItv + ' : ' + sFncName + '()' );
oTmr = setTimeout( oFnc, nItv );
}
function fncLog(
sMsg
)
{
if( bDbgEnable )
{
debugLog( sMsg );
}
}