document.write('<div id=eFeedback style=position:absolute;display:none;><table cellspacing=0 class=FeedbackMenu><tr><th align=left><span style="cursor:hand;font-weight:normal;color:maroon;border:solid 1 #a0a0a0" onclick=hideFeedbackMenu()>&nbsp;X&nbsp;</span>&nbsp;&#272;&#225;nh gi&#225;</th></tr>');
document.write('<tr><td onclick="rate(5);">'+ fbkblt() +'Xu&#7845;t s&#7855;c</td></tr><tr><td onclick="rate(4);">'+ fbkblt() +'Kh&#225;</td></tr><tr><td onclick="rate(3);">'+ fbkblt() +'Trung b&#236;nh</td></tr><tr><td onclick="rate(2);">'+ fbkblt() +'K&#233;m</td></tr><tr><td onclick="rate(1);">'+ fbkblt() +'R&#7845;t k&#233;m</td></tr>');
document.write('<tr><th onclick="feedbackArticle();" class=fbk>G&#7917;i ph&#7843;n h&#7891;i</th></tr></table></div>');
function writeTitleImage(cateID){
	if(typeof(DS_MenuDefs) != 'undefined') {
		var topCateID = getParentCate(cateID);
		if(topCateID=='0') topCateID = cateID;
		writeTitleImageTop(topCateID,cateID);
	}
	return false;
}
function getParentCate(cateID){
	if(typeof(DS_MenuDefs) != 'undefined') {
		for(var i=0;i<DS_MenuDefs.length;i++){
			if(parseInt(DS_MenuDefs[i][0])==parseInt(cateID)) {
				return 	DS_MenuDefs[i][10];
			}
		}
	}
}

function writeTitleImageTop(topCateID,cateID){
	if(typeof(DS_MenuDefs) != 'undefined') {
		for(var i=0;i<DS_MenuDefs.length;i++){
			if(parseInt(DS_MenuDefs[i][0])==parseInt(topCateID)) {
				if(DS_MenuDefs[i][5]!=''){
					document.writeln('<tr><td class="Channel-Title" valign="bottom" style=cursor:hand onclick="location.href=\''+DS_MenuDefs[i][2]+'\'"><a href="'+DS_MenuDefs[i][2]+'"><img src="/Media/category/'+DS_MenuDefs[i][5]+'" border="0"></a></td></tr>');	
				}else{
					document.writeln('<tr><td class="Channel-Title" valign="bottom" style=cursor:hand onclick="location.href=\''+DS_MenuDefs[i][2]+'\'">'+DS_MenuDefs[i][1]+'</td></tr>');
					document.writeln('<tr><td class=Sub-Title bgcolor="#FF66CC"><img src=/images/spacer.gif width=1 height=1></td></tr>');
				}
				break;
			}
		}
		if(isHasSubCate(topCateID)){	
			document.writeln('<tr><td class="title_text_menu" valign="middle"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="title_text_menu">&nbsp;|');
			charCount = 0;
			for(var i=0;i<DS_MenuDefs.length;i++){
				if(parseInt(DS_MenuDefs[i][10])==parseInt(topCateID)) {
					if(charCount>100){
						document.writeln('</td></tr><tr><td  class="title_text_menu">&nbsp;|');
						charCount = 0;
					}
					if(parseInt(DS_MenuDefs[i][0])!=parseInt(cateID)){	
						document.writeln('<span style="cursor:hand" onclick="location.href=\''+DS_MenuDefs[i][2]+'\'">&nbsp;<a href=\''+DS_MenuDefs[i][2]+'\'>'+DS_MenuDefs[i][1]+'</a>&nbsp;</span><span  class="title_text_menu">|</span>');
					}
					else{
						document.writeln('<span style="cursor:hand" onclick="location.href=\''+DS_MenuDefs[i][2]+'\'" class="title_text_menu_selected">&nbsp;<a href=\''+DS_MenuDefs[i][2]+'\'>'+DS_MenuDefs[i][1]+'</a>&nbsp;</span><span  class="title_text_menu">|</span>');	
					}
					charCount += DS_MenuDefs[i][1].length;
				}
			}
			document.writeln('</tr></table></td></tr>');
		}
		return false;
		document.writeln('<tr><td height="10"><img src="/images/spacer.gif" width=1 height=6></td></tr>');
	}
}
function isHasSubCate(cateID){
	if(typeof(DS_MenuDefs) != 'undefined') {
		for(var i=0;i<DS_MenuDefs.length;i++){
			if(parseInt(DS_MenuDefs[i][10])==parseInt(cateID)) {
				return 	true;
			}
		}
	}
	return false;
}

function rate(point) {
	hideFeedbackMenu();
	window.open('/Library/rateIt.asp?nws=' + NwsID+'&pns='+point, '_blank', 'width=200,height=100,scrollbars=0,resizable=0');
}
function feedbackArticle(id) {
	hideFeedbackMenu();
	location.href = '/Forms/Contact.asp?nws=' + NwsID + '&loc=' + location.href.replace(/\&/ig, '%26').replace(/\?/ig, '%3F');
}
function fbkblt() {
	return '<img src=/images/bullet.rightarrow.gif>';
}
function showFeedbackMenu(oBtn) {
	eFeedback.style.left = getLeft(oBtn);
	eFeedback.style.top = getTop(oBtn) - 121;
	if (eFeedback.style.display == 'none') {
		eFeedback.style.display =  '';
		eFeedback.focus();
	} else {
		eFeedback.style.display =  'none';
	}
	return false;
}
function hideFeedbackMenu() {
	eFeedback.style.display = 'none';
}

function emailArticle(id) {
	var artLoc = getBaseLocation();
	var printWdw = window.open('/channel/tellafriend.asp?' + location.href, '_blank', 'width=290,height=310,scrollbars=0,resizable=0');
	return false;
}

function displayGMT7Time() {
	var today;
	var dow = new Array('Ch&#7911; Nh&#7853;t','Th&#7913; Hai','Th&#7913; Ba','Th&#7913; T&#432;','Th&#7913; N&#259;m','Th&#7913; S&#225;u','Th&#7913; B&#7843;y');
	var months = new Array('01','02','03','04','05','06','07','08','09','10','11','12');
	var year, mode;

	if (typeof(GMT7Time) != 'undefined') {
		today = new Date(GMT7Time);
		mode = 'GMT+7';
	} else {
		today = new Date();
		mode = 'gi&#7901; &#273;&#7883;a ph&#432;&#417;ng';
	}
	year = today.getFullYear();
	//year = (year <= 1888) ? (2000 + year) : year;
	document.write(dow[today.getDay()] + ' ' + today.getDate() + '.' + months[today.getMonth()] + '.' + year + ', ' + leadZero(today.getHours(), 2) + 'h' + leadZero(today.getMinutes(), 2) + '&nbsp;' + mode);
}

function openMedia(src) {
	window.open(getBaseLocation() + src);
}

function displayBreakingNewsOld() {
	var i, j, src = '';
	if (typeof(DS_BreakingNews) != 'undefined') {
		for (i=0; i<DS_BreakingNews.length; i++) {
			if(DS_BreakingNews[i][1]!=''){
				src += '<p align="justify" class="breaking_news"> &raquo; <a href="'+DS_BreakingNews[i][1]+'" style="color:#000000;">'+ DS_BreakingNews[i][0] + '</a> </p>';
			}
			else{
				src += '<p align="justify" class="breaking_news"> &raquo; '+ DS_BreakingNews[i][0] + '</p>';	
			}
		}
	}
	src = '<marquee class="breaking_news" direction=up height=100 scrollamount=1 scrolldelay=1 onmouseover=this.stop() onmouseout=this.start()>' + src + '</marquee>';
	document.write(src);
}
function displayBreakingNews_Ver2() {
	var i, j, src = '';
	document.write('<marquee height="23px"  width="100%" onMouseOver="this.stop()" onMouseOut="this.start()" align="middle" scrollamount="1" scrolldelay="60" direction="Left" behavior="scroll">');
	if (typeof(DS_BreakingNews) != 'undefined') {
		document.writeln('<p  class="alink2">');
		for (i=0; i<DS_BreakingNews.length; i++) {
			if(DS_BreakingNews[i][1]!=''){
				src += '&raquo;&nbsp;<a href="'+DS_BreakingNews[i][1]+'" class="alink2">'+ DS_BreakingNews[i][0] + '</a> &nbsp; &nbsp;';
			}else{
				src += '&raquo;&nbsp;'+ DS_BreakingNews[i][0] + ' &nbsp; &nbsp;';
			}
		}
		document.writeln(src);
		document.writeln('</p>');
	}
	document.writeln('</marquee>');
}
function switchDisplay(sSubMenu) {
	var i, subMenus;
	var subMenu = eval('document.all(sSubMenu)');
	if (subMenu == null) return;

	if (typeof(subMenu.length) != 'number')
		subMenus = new Array(subMenu);
	else 
		subMenus = subMenu;

	for (i=0; i<subMenus.length; i++) {
		subMenus[i].style.display = subMenus[i].style.display=='none' ? '' : 'none';
	}
}
function menuOver(e, ch) {
	e.lang = e.className;
	if (e.className.indexOf('NoLink') < 0)
		e.className = e.className.replace('Menu'+ ch +'Item', 'MenuOver' + ch);
}
function menuClear(e) {
	e.className = e.lang;
}
/*******Edit for Require from MT - on 03-11-2007*/


/***********************************************
* Pausing up-down scroller- C Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="'+divClass+'" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="'+divClass+'" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
/*
function displayBreakingNews() {
	var MT_break_news=new Array();
	if (typeof(DS_BreakingNews) != 'undefined') {
		for (i=0; i<DS_BreakingNews.length; i++) {
			if(DS_BreakingNews[i][1]!=''){
				MT_break_news[i] = '&raquo;&nbsp;<a href="'+DS_BreakingNews[i][1]+'" class="alink2">'+ DS_BreakingNews[i][0] + '</a>';
			}else{
				MT_break_news[i] = '&raquo;&nbsp;'+ DS_BreakingNews[i][0] + '';
			}
		}
	}
	new pausescroller(MT_break_news, "MT_break_news", "alink2", 4000);
}
*/

function displayBreakingNews() {
	var i, j, src = '';
	//src += '<span class=text_black> Tin m&#7899;i :</span> &nbsp; ';
	for (i=0; i<DS_BreakingNews.length; i++) {
			if(DS_BreakingNews[i][1]!=''){
				src += '&raquo;&nbsp;<a href="'+DS_BreakingNews[i][1]+'">'+ DS_BreakingNews[i][0] + '</a> &nbsp; ';
			}else{
				src += '&raquo;&nbsp;'+ DS_BreakingNews[i][0] + ' &nbsp;';
			}
	}
	src = '<marquee class="text_black" scrollamount=1 scrolldelay=1 onmouseover=this.stop() onmouseout=this.start()>' + src + '</marquee>';
	document.write(src);
}

function logPage(){
	document.writeln('<scr' + 'ipt src="/HitLogs/?id='+NwsID+'&cid='+CCID+'" language="JavaS' + 'cript"></scr' + 'ipt>');
}