var frontPath = "http://mobile.nate.com/img/lnb/";
var fileFormat = ".gif";
var initSeqNo;
var seqNo;

function imageChange(seqNo, mode) {
	var fileName = getFileName(seqNo, mode);
	document["img" + seqNo].src= frontPath + fileName;
}

function getFileName(seqNo, mode){
	var fileName;

	fileName = "btn_event_" + seqNo;
	if (mode == "v"){
		fileName = fileName + "_o";
	}
	fileName = fileName + fileFormat;

	return fileName;
}

link = new Array(
		'http://mobile.nate.com/board/e_list.html',//이벤트
		'http://moa.nate.com',//이벤트 plus
		'http://mobile.nate.com/board/en_list.html'//공지사항
		//'http://mobile.nate.com/board/poll_list.html'//poll
);
order = new Array('1','2', '3');
function initMenu(seqNo){		
	data ="";	
	dataheader = "<table width=97 cellspacing=0 cellpadding=0  border=0><tr><td><img src='http://mobile.nate.com/img/lnb/title_channel_event.gif' border=0></td></tr><tr><td height=5></td></tr><tr><td height=1 bgcolor=e7e7e7></td></tr>";
	databottom = "</table>";
	for(i=1; i<link.length+1; i++){
		j = order[i-1];
		if (j == seqNo){
			if (j == order[0]){
				data += "<tr><td style='padding-top:5'><a href='"+link[i-1]+"' onMouseOver=\"imageChange('"+j+"','v')\"><img name='img"+j+"' src='http://mobile.nate.com/img/lnb/btn_event_"+j+"_o.gif' width='97' height='22' border=0></a></td></tr>";
			}else{
				data += "<tr><td style='padding-top:1'><a href='"+link[i-1]+"' onMouseOver=\"imageChange('"+j+"','v')\"><img name='img"+j+"' src='http://mobile.nate.com/img/lnb/btn_event_"+j+"_o.gif' width='97' height='22' border=0></a></td></tr>";
			}
		}else{
			if (j == order[0]){
				data += "<tr><td style='padding-top:5'><a href='"+link[i-1]+"' onMouseOver=\"imageChange('"+j+"','v')\" onMouseOut=\"imageChange('"+j+"','u')\"><img name='img"+j+"' src='http://mobile.nate.com/img/lnb/btn_event_"+j+".gif' width='97' height='22' border=0></a></td></tr>";
			}else{
				data += "<tr><td style='padding-top:1'><a href='"+link[i-1]+"' onMouseOver=\"imageChange('"+j+"','v')\" onMouseOut=\"imageChange('"+j+"','u')\"><img name='img"+j+"' src='http://mobile.nate.com/img/lnb/btn_event_"+j+".gif' width='97' height='22' border=0></a></td></tr>";
			}
		}
	}	
	data = dataheader + data + databottom;
	document.write(data);
}
