var num_20080225 = 0;
var scrollspeed = 5000;
var timeid;
var arr_clickUrl = new Array();
arr_clickUrl[0] = "http://clickstat.dreamx.com/hdredir.htm?hdtitle=PAG^qbic00^qbicmain^righttop^ykeyword&hdurl=";	// Å¥ºò
arr_clickUrl[1] = "http://clickstat.dreamx.com/hdredir.htm?hdtitle=PAG^pds000^pdsmain^promotion^ykeyword&hdurl=";		// °ø°³ÀÚ·á½Ç
var _clickUrl = arr_clickUrl[0];

function displayRanking() {
	var htmlCode = "";
	clearTimeout(timeid);
	htmlCode = '<TABLE width=150 cellpadding=0 cellspacing=0 border=1 style="border-collapse:collapse;" bordercolor="c0bebe">';
	htmlCode += '<tr>';
	htmlCode += '<td>';
	htmlCode += '<table width="134" border="0" align="center" cellpadding="0" cellspacing="0" >';
	htmlCode += '<colgroup>';
	htmlCode += '<col width="100"></col>';
	htmlCode += '<col width="8"></col>';
	htmlCode += '<col width="18"></col>';
	htmlCode += '</colgroup>';
	htmlCode += '<tbody>';
	htmlCode += '<tr>';
	htmlCode += '<td height="53" colspan="3"></td>';
	htmlCode += '</tr>';
	
	for(i=0+num_20080225;i<5+num_20080225;i++){
		if (Oper[i]=="+"){operimg="icon_i_up.gif";}
		else if (Oper[i]=="-"){operimg="icon_i_down.gif";}
		else{operimg="new.gif";}
			htmlCode += '<tr>';
			htmlCode += '<td height="23">';
			htmlCode += '<div style="width:120px;overflow:hidden;text-overflow:ellipsis"><nobr>'
			htmlCode += '<img src="/images/yKeyword/n' + (i+1) + '.gif" alt="' + (i+1) + '" width="12" height="11" align="absmiddle" style="margin:1px 4px 4px 0;" />';
			
			htmlCode += '<a id="r0' + (i+1)+ '"  href="' + _clickUrl + 'http://dreamx.dns.paran.com/search/index.php?r=pc..HD2.keybox&Query='+KeyWord[i]+'" title="'+KeyWord[i]+'" target=_blank>'+KeyWord[i]+'</a></div></td>';
			htmlCode += '</tr>';
	}
	
	if(num_20080225 == 0 ) num_20080225 = 5; 
	else num_20080225 = 0;
	
	htmlCode += '<tr>';
	htmlCode += '<td height="5"></td>';
	htmlCode += '</tr>';
	htmlCode += '</table>';
	htmlCode += '<table width="134" cellspacing="0" cellpadding="0" border="0" align="center" style=" border-top:1px solid #e0e0e0;">';
	htmlCode += '<tr>';
	htmlCode += '<td height="10"></td>';
	htmlCode += '</tr>';
	htmlCode += '<tr valign="top">';
	htmlCode += '<td colspan="2" align="right" class="p11">';
	htmlCode += '<img src="/images/yKeyword/icon_down.gif" width="6" height="3" align="absmiddle" style="margin:0 5px 2px 0;" />';
	htmlCode += '<a href="javascript:displayRanking();">' + (num_20080225+1) + '~' + (num_20080225+5) + '<span> À§±îÁö º¸±â</span></a>';
	htmlCode += '</td>';
	htmlCode += '</tr>';
	htmlCode += '<tr>';
	htmlCode += '<td height="8"></td>';
	htmlCode += '</tr>';
	htmlCode += '</tbody>';
	htmlCode += '</table>';
	htmlCode += '</td>';
	htmlCode += '</tr>';
	htmlCode += '</table>';
	var obj = document.getElementById("sch_0118");
	if(obj) obj.innerHTML=htmlCode;
	timeid = setTimeout("displayRanking()", scrollspeed);
}
