var listImg = new Image();
listImg.src = 'watch.gif';
var treeImg = new Image();
treeImg.src = 'dhtml.gif';
var formImg = new Image();
formImg.src = 'form.gif';
var autoImg = new Image();
autoImg.src = 'web.gif';

function makeNews(c,l,f,i){
	this.copy = c;
	this.link = l;
	this.follow = f;
	this.img = i;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += '<a href="' + this.link + '">';
	//str += '<img border="0" src="' + this.img.src + '"></a><br>';
	str += this.copy + '<br>';
        str +=  '<a href="' + this.link + '">' + this.follow + '</a>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews("<table width='330' height='180' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='middle' a style='background:url(http://banpu.2fellows.com/img/mn/img/grx_bpic_mn.jpg); background-repeat:no-repeat'><table width='325' height='165px' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='140' height='124' valign='bottom'><img src='thumb/txt_hm_plnt_lnnn.gif' width='143' height='73' border='0' /></td><td width='185' valign='top' style='padding-top:2px'><span id='c_Image'><img src='img/thumb/home_LN_01_a.jpg' width='170' height='115' border='0' /></span></td></tr><tr><td align='left' valign='bottom' ><a href='ifrm_prfl_plnt_lnnn.html' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage('bttn_mor','','img/mn/bttn/bttn_mor_ovr.gif',1)' target='_parent'><img src='img/mn/bttn/bttn_mor.gif' name='bttn_mor' width='56' height='25' border='0' id='bttn_mor' /></a></td><td valign='bottom' style='padding-bottom:3px'><img src='thumb/home_LN_01_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_1(1);' /><img src='thumb/home_LN_02_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_1(2);' /><img src='thumb/home_LN_03_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_1(3);' /><img src='thumb/home_LN_04_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_1(4);' /><img src='thumb/home_LN_05_a.jpg' width='34' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_1(5);' /></td></tr></table></td></tr></table>",'','','').write();

newsArray[1] = new makeNews("<table width='330' height='180' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='middle' style='background:url(http://banpu.2fellows.com/img/mn/img/grx_bpic_mn.jpg); background-repeat:no-repeat'><table width='325' height='165px' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='140' height='124' valign='bottom'><img src='thumb/txt_hm_plnt_zgdg.gif' width='143' height='73' border='0' /></td><td width='185' valign='top' style='padding-top:2px'><span id='c_Image'><img src='img/thumb/home_ZD_01_a.jpg' width='170' height='115' border='0' /></span></td></tr><tr><td align='left' valign='bottom' ><a href='ifrm_prfl_plnt_zgng.html' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage('bttn_mor','','img/mn/bttn/bttn_mor_ovr.gif',1)' target='_parent'><img src='img/mn/bttn/bttn_mor.gif' name='bttn_mor' width='56' height='25' border='0' id='bttn_mor' /></a></td><td valign='bottom' style='padding-bottom:3px'><img src='thumb/home_ZD_01_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_2(1);' /><img src='thumb/home_ZD_02_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_2(2);' /><img src='thumb/home_ZD_03_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_2(3);' /><img src='thumb/home_ZD_04_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_2(4);' /><img src='thumb/home_ZD_05_a.jpg' width='34' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_2(5);' /></td></tr></table></td></tr></table>",'','','').write();

newsArray[2] = new makeNews("<table width='330' height='180' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='middle' style='background:url(http://banpu.2fellows.com/img/mn/img/grx_bpic_mn.jpg); background-repeat:no-repeat'><table width='325' height='165px' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td width='140' height='124' valign='bottom'><img src='thumb/txt_hm_plnt_zpng.gif' width='143' height='73' border='0' /></td><td width='185' valign='top' style='padding-top:2px'><span id='c_Image'><img src='img/thumb/home_ZP_01_a.jpg' width='170' height='115' border='0' /></span></td></tr><tr><td align='left' valign='bottom' ><a href='ifrm_prfl_plnt_zpng.html' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage('bttn_mor','','img/mn/bttn/bttn_mor_ovr.gif',1)' target='_parent'><img src='img/mn/bttn/bttn_mor.gif' name='bttn_mor' width='56' height='25' border='0' id='bttn_mor' /></a></td><td valign='bottom' style='padding-bottom:3px'><img src='thumb/home_ZP_01_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_3(1);' /><img src='thumb/home_ZP_02_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_3(2);' /><img src='thumb/home_ZP_03_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_3(3);' /><img src='thumb/home_ZP_04_a.jpg' width='29' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_3(4);' /><img src='thumb/home_ZP_05_a.jpg' width='34' height='21' hspace='3' border='0' style='cursor:hand' onclick='chnageI_3(5);' /></td></tr></table></td></tr></table>",'','','').write();

//newsArray[3] = new makeNews("<table width='220' border='4'><tr><td>&nbsp;</td></tr></table>",'','','').write();

var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',5000);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 5000);
	}
}

