﻿
var
	defaultBC='#30C5EF',
	imgDir='3GEZFF/',
	imgExt='.gif';
var
   	aCnt=0;
	dAList=new Array();
	dList='css';
	sCnt=0;
	dSList=new Array();
        tCnt=0;
	dTList=new Array();



function CS(CaSi)
{
	aCnt++;
	sCnt=0;tCnt=0;
	dAList[aCnt]=CaSi;
	dSList[aCnt]=new Array();
              dTList[aCnt]=new Array();
              }
               

function L(Link)
{
	sCnt++;
	dSList[aCnt][sCnt]=Link;
}
function T(Song)
{
    
	tCnt++;
	dTList[aCnt][tCnt]=Song;
	
}


function showAList()
{
	html='<TABLE width=100%  cellspacing=0 cellpadding=0>';
	html+='<TR><TD class=TH></TD></TR>';
	html+='<TR><TD><SPAN  width: 100%; height: 100%;"><TABLE cellspacing=0 cellpadding=0>';
	for (i=1; i<dAList.length; i++)
        html+='<TR><TD  class=TD></TD><TD class=TD><div style="border-bottom: 1px dotted #E4E4E4; padding-bottom:3; padding-top:2"><font color="#FB9B07"><img src=~Images/star.gif border=0><b> <A href=#Play,cakhuc_'+i+'>'+mediaName(vniName(dAList[i]))+'</b></TD></TR>';
	html+='</TABLE></SPAN></TD></TR>';
	html+='</TABLE>';
	aListHTML.innerHTML=html;
}

function showSongList(ab)
{
	html='<TABLE width=100%  cellspacing=0 cellpadding=0>';
	html+='<TR><TD class=TH></TD></TR>';
	html+='<TR><TD><SPAN  width: 100%; height: 100%;"><TABLE cellspacing=0 cellpadding=0>';
	t=getVar(2);
	for (i=1; i<dTList[ab].length; i++)
	if (t==i)
	   html+='<TR><TD width=10 class=TD></TD><TD class=TD><font face="tahoma" color=#FF00FF><IMG src="~Images/play.gif" ></B>. <b><A href=#Play,cakhuc_'+ab+'_'+i+'><font color=#3366FF>'+mediaName(vniName(dTList[ab][i]))+'</b><div style="border-bottom: 1px dotted #E4E4E4; padding-bottom:3; padding-top:2"></TD></TR>';
	else
		html+='<TR><TD width=10 class=TD></TD><TD class=TD><div style="border-bottom: 1px dotted #E4E4E4; padding-bottom:3; padding-top:2"><font color="#FB9B07"><font face="tahoma" color=#99CC00><b>'+i+'. <A href=#Play,cakhuc_'+ab+'_'+i+'>'+mediaName(vniName(dTList[ab][i]))+'</b></TD></TR>';
	html+='</TABLE></SPAN></TD></TR>';
	html+='</TABLE>';
	songListHTML.innerHTML=html;
}



function mediaPlay()
{ 
Media.controls.play();
}

function mediaStop()
{
Media.controls.stop();
}

function mediaPause()
{
Media.controls.pause();
}
function mediaEnded()
{
	mediaNext();
}


function mediaEnded()
{
	mediaNext();
}


function mediaError()
{

}


function mediaHide()
{	
	Media.style.display="none";	
}
function mediaShow()
{
	Media.style.display="";	
}
function mediaName(st)
{
	st=st.replace(/_/,' ');
	st=st.replace('.mp3','.%6Dp%33');
	st=st.replace('.mp9','');
	st=st.replace('.swf','');
	st=st.replace('.wma','.%77m%61');
	st=st.replace('.wm9','');
    st=st.replace('.MP3','.%4DP%33');
    st=st.replace('../default.htm','');
	return st;
}

function mediaPre()

{	
	s=getVar(2);
	if (s>1)
		s--;
	else
		s=dSList[ab].length-1;
	window.location='#Play,cakhuc_'+ab+'_'+s;
}

function mediaNext()
{	
	s=getVar(2);
	if (s<dSList[ab].length-1)
		s++;
	else
		s=1;
	window.location='#Play,cakhuc_'+ab+'_'+s;
}

function media_DoFSCommand(command, args)
{
	if (command=='mediaPlay')
		mediaPlay();
	else if (command=='mediaStop')
		mediaStop();
	else if (command=='mediaPause')
		mediaPause();
	else if (command=='mediaReverse')
		mediaReverse();
	else if (command=='mediaForward')
		mediaForward();
	else if (command=='mediaVolume')
		mediaVolume(args);
	else if (command=='mediaPresent')
		mediaPresent();
	else if (command=='mediaDownload')
		mediaDownload();
}





function mediaState(state)
{
	switch(state)
	{

case 1:
window.defaultStatus=vniName('Da dung ca khuc - hay chon bai hat moi di ban !');
mstatus=
     '<div style="position: absolute; width: 190px; height: 18px; z-index: 1; left: -35px; top: 80px" id="dangTamDungBaiHat">'+
     '<marquee scrollamount="4" style="font-family: Tahoma; font-size: 8pt; color: #00FF00; font-weight: bold"></marquee></div>';

break;


case 2:
window.defaultStatus=vniName('Ban dang tam dung ca khuc - Hay nhan Play de nghe tiep ca khuc !');
mstatus='<b><font color=#000000 face=tahoma size=2><br></font> </b></div>';
break;


case 3:	
window.defaultStatus=vniName('Ban dang nghe nhac tai wWw.Mienthuongnho.Info Website');
mstatus=
   '<div style="position: absolute; width: 350px; height: 18px; z-index: 1; left: -240px; top: -255px" id="dangplay">'+
        '<table cellspacing="5" align=right border="0" width="100%" id="table1" style="border-width: 0px">'+
'<tr>'+
	    '<td style="border: 0px dotted #008080" width="14%"><p align="center">'+
	    'B&#224;i h&#225;t : '+
	    '<font size="1"></font></b></td>'+
	        '<td style="border: 0px dotted #808080" width="85%"><font color=white>'+mediaName(vniName(dTList[ab][song]))+'</font></td>'+
	    '</tr>'+
	    '<tr>'+
		'<td style="border: 0px dotted #808080" width="6%"><p align="center">'+
		'Album :'+
		'<font size="1"></font></b></td>'+
	    	'<td style="border: 0px dotted #808080" width="85%"><font color=white>'+mediaName(vniName(dAList[ab]))+'</font></td>'+
	    '</tr>'+
	    '<tr>'+
		'<td style="border: 0px dotted #008000" colspan="2">'+
	    	'<p align="center"><a href="'+songLink+'" target=1 title="Nh&#7845;n chu&#7897;t ph&#7843;i ch&#7885;n Save Target As ...">[ Download Ca Khuc ]</a></td>'+
	    '</tr>'+
	    '<tr>'+
		'<td style="border: 0px dotted #808080" width="6%"><p align="center">'+
		'Blog :'+
		'<font size="1"></font></b></td>'+
	    	'<td style="border: 0px dotted #808080" width="85%"><textarea name=Addthisgametoyourwebsite   rows=1 cols=28 onfocus=this.select()><table style="height: 185px;" background="~Images/blog_bg.gif" border="0" cellpadding="4" cellspacing="2" width="94"><tr><td height="50"><center><font size="3" color="#FFFFFF"><b>http://mienthuongnho.com</b></font><br><br><embed style="width: 210px; height: 41px;"  src="'+songLink+'" type="application/x-shockwave-flash" allowscriptaccess="none" flashvars="autoplay=false" height="41" width="240"></center><p></p><p style="margin-top: 0pt; margin-bottom: 0pt;"><center><a href="'+songLink+'"><img src=http://zealous.99k.org/~images/zcrew.JPG border=0></img></a></font></center></strong></p><p><b><center><font size=2 face=tahoma><font color="#FFFFFF">wWw.mienthuongnho.com</p></center></td></tr></table></textarea></td>'+
	    '</tr>'+
	    '<tr>'+
		'<td style="border: 0px dotted #808080" width="6%"><p align="center">'+
		'Forum :'+
		'<font size="1"></font></b></td>'+
	    	'<td style="border: 0px dotted #808080" width="85%"><textarea name=Addthisgametoyourwebsite   rows=1 cols=28 onfocus=this.select()>[MEDIA]'+songLink+'[/MEDIA][[URL=" '+songLink+' "]Donwload[/URL]]</textarea></td>'+
	    '</tr>'+
	    '<tr>'+
		'<td style="border: 0px dotted #808080" width="6%"><p align="center">'+
		'Yahoo :'+
		'<font size="1"></font></b></td>'+
	    	'<td style="border: 0px dotted #808080" width="85%"><input value="&#272;i&#7873;n nick ng&#432;&#7901;i nh&#7853;n v&#224;o &#273;&#226;y!" class=ten name=nick size="28"> <input type=submit onClick="ymsend()" value=" G&#7917;i " name="B3"class=button></td>'+
	    '</tr>'+
	    '</table>';
       



break;


case 9:
window.defaultStatus=vniName('Dang ket noi toi may chu.... xin vui long doi trong giay lat...');
mstatus=
        '<div style="position: absolute; width: 191px; height: 48px; z-index: 2; left: -170px; top: -200px" id="dangketnoivoimaychu">'+
        '<center><img src="~Images/loading.gif" border=0><br><br><b><font color=#ffffff face=tahoma size=2>&#272;ang k&#7871;t n&#7889;i v&#7899;i m&#225;y ch&#7911;...</center></div>';
break;

case 10:
window.defaultStatus=vniName('Mat ket noi voi may chu .. Hay thu lai lan nua hoac chon bai hat khac .. Thank !');
mstatus=
      '<div style="position: absolute; width: 190px; height: 120px; z-index: 1; left: -160px; top:-195px" id="ketnoibingat">'+
	      '<center><b><font color=#00bffd face=tahoma size=2><img src="~Images/matketnoi.gif" border=0> K&#7871;t n&#7889;i b&#7883; ng&#7855;t <img src="~Images/matketnoi.gif" border=0></font></center><font color=#ffffff face=tahoma size=2>B&#7841;n h&#227;y nh&#7845;n F5 v&#224;i l&#7847;n<br>N&#7871;u v&#7851;n kh&#244;ng &#273;&#432;&#7907;c li&#234;n h&#7879; nick Y!m: <a href="ymsgr:sendim?hanhphuclagi89_taekwondo" target="_blank">Long Hổ</a> nh&#233;. Thanks!</font></div>';

break;

case 11,6:
window.defaultStatus=vniName('Dang tai du lieu bai hat ve may ... ');
mstatus=
       '<div style="position: absolute; width: 220px; height: 74px; z-index: 3; left: -170px; top: -200px" id="KetNoiThanhCong">'+
	       '<center><font face="Tahoma" size="2" color="#00bffd"><img src="~Images/loading.gif" border=0><br><br>&#272;ang t&#7843;i b&#224;i h&#225;t v&#7873; m&#225;y...</font></center></div>';

break;


default:
	}
mediaLoadingHTML.innerHTML=''+mstatus+'';
}


function showContent()
{
html+='';

html+=
      '<DIV style="FONT-WEIGHT: bold; FONT-SIZE: 11px; LEFT: -84px; TOP: 16px; TEXT-TRANSFORM: capitalize; FONT-FAMILY: Verdana; POSITION: absolute;" align=center>'+
      '<TABLE WIDTH=144 BORDER=0 CELLPADDING=0 CELLSPACING=0>'+
      '<TD style="filter: Chroma2(color=#216134) Alpha(Opacity=60) Chroma2(color=#216134) Chroma2(color=#216134);  COLSPAN=2 width="100%" height="100%">'+
      '<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Media" width="260" height="165" style="border-style: solid; border-width: 1,5px">'+
	  '<PARAM name="volume" value="100">'+
      '<PARAM name="wmode" value="transparent">'+
      '<PARAM name="uimode" value="full">'+
      '<PARAM NAME="enableErrorDialogs" VALUE=0></OBJECT>'+
      '</object>'+
      '</TD>'+
      '</TABLE>'+
      '</DIV>';


html+=
      '<DIV id=Download style="LEFT: -195px; WIDTH: 491px; POSITION: absolute; TOP: 269px; height:51px">'+
      '<TBODY>'+
      '<TR>'+
      '<FONT color=darkblue><b id=mediaLoadingHTML></b><br></FONT></DIV>';

html+=
      '<DIV class=scrollbar style="position:absolute; left:-580px; top:240px; width:386px ; height:539px; filter: chroma(color=#CCEBAB)" align=left id="Casi">'+
      '<TABLE>'+
      '<TBODY>'+
      '<TR>'+
      '<TD borderColor=darkblue border="0" id=aListHTML> </TD></TR></TBODY></TABLE></DIV>'+
      '</FONT></TD></TR></TBODY></DIV>'+
      '</TABLE>';
html+=
      '<DIV  class=scrollbar style="position:absolute; left:-190px; top:240px;  width:392px ; height:539px; filter: chroma(color=#CCEBAB)" align=left id="Baihat">'+
      '<TABLE>'+
      '<TBODY>'+
      '<TR>'+
      '<TD borderColor=darkblue border="0" id=songListHTML> </TD></TR></TBODY></TABLE></DIV>';


html+='</FORM>';
html+='</body>';

mediaHTML.innerHTML=html;
showAList();
	return html;

}

function getVar(cnt)
{
	var url;
	url=window.location.href;
	url=url+'#';
	url=url.split('#');
	url=url[1];
	url=url+'_';
	url=url.split('_');
	url=url[cnt];
	if (!url)
		return '';
	return url;
}

function playSong(ab,song,url)
{	
st=dSList[ab][song];
st=st.replace("","",url);
st=st.replace("","",url);
st=st.replace("","",url);
st=st.replace("","",url);
songLink=st;window.status=songLink;Media.URL=songLink;
}

musicsite='';
lastUrl='';
hostSite='';
imgSite='';

function loadPage()
{
	ab=getVar(1);
	song=getVar(2);
	if (ab=='')
		ab=1;
	showSongList(ab);
	if (song!='')
		playSong(ab, song);

}

function urlCheck()
{

	document.title=pageTitle;	
	url=window.location.href;
	if (url!=lastUrl)
	{

		loadPage();
		lastUrl=url;
	}
}

function mientrung_info_loadingdata_ok()

{
	window.defaultStatus='Ban dang nghe nhac tai Website cua wWw.MienThuongNho.Info';
	showContent();
	setInterval("urlCheck()",100);
}

//
function www_mientrung_info()
{	
	document.title='wWw.mienthuongnho.com Entertainment ™';
	pageTitle=document.title;
	
html=
	  
          '<BODY  bgColor=#ffffff leftMargin=0 background="" topMargin=0 marginwidth="0" marginheight="0">'+
          '<SCRIPT id=actionScript src=""></SCR'+'IPT>';

html+=
	      '<SCRIPT for=\'Media\' event=\'playStateChange(NewPlayState)\'>'+
	      'mediaState(NewPlayState);'+
	      'if (NewPlayState == 8)'+
	      'mediaEnded();'+
	      '</SCR'+'IPT>'+

	      '<SCRIPT LANGUAGE="VBScript">'+
	      'Sub site_FSCommand(ByVal command, ByVal args)'+
	      'call site_DoFSCommand(command, args)'+
	      'End Sub'+
	      '</SCR'+'IPT>'+
	      '<DIV id=mediaHTML style="position: absolute"></DIV>';






      
   





	  '</table>';

	  
document.write(html);
setTimeout("loadData()",100);
}
www_mientrung_info();
function ymsend() {window.location='ymsgr:sendIM?'+nick.value+'&m= Wey vao website nay di !Hay lam -> www.mienthuongnho.com   ^_^'}
