	var win = null; tenid=new Array();
	function NewWindow(mypage,myname,w,h,scroll)
		{
			LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
			TopPosition = (screen.height) ? (screen.height-h)/8 : 0;
			settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
			win = window.open(mypage,myname,settings)
		}
	function newWin(url)
		{
			window.open(url,"",'screenX=0,screenY=0,top=0,width=800,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no')
		}

	function hien_thongtin(cot1,cot2,cot3)
		{
				document.getElementById(cot1+'_ka').style.display='';
				document.getElementById(cot2+'_ka').style.display='none';
				document.getElementById(cot3+'_ka').style.display='none';
				ka_class(cot1,cot2,cot3);
			
		}
	function ka_class(giatri1,giatri2,giatri3)
		{	
				document.getElementById(giatri1).className='current';
				document.getElementById(giatri2).className='';
				document.getElementById(giatri3).className='';
		}

	function hien_VD(cot1,cot2)
		{
				document.getElementById(cot1+'_ka').style.display='';
				document.getElementById(cot2+'_ka').style.display='none';
				ka_classVD(cot1,cot2);
			
		}
	function ka_classVD(giatri1,giatri2)
		{	
				document.getElementById(giatri1).className='current';
				document.getElementById(giatri2).className='';
		}


function ChangeIndexAudio(path,index)
{   
    for(var i=1; i<6; i++)
    {
        if(i==index)
        {
           document.getElementById('clip_' + i).style.fontWeight = 'bold'; 
        }
        else
        {
            try
            {
              document.getElementById('clip_' + i).style.fontWeight = 'normal';  
            }
            catch(err){}           
        }
    }        
    document.getElementById('showAudioPlayer').innerHTML="<object id='winMediaPlayerID' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' name='winMediaPlayer' width=100% height='280'><param name='URL' value='"+path+"'><param name='rate' value='1'><param name='balance' value='0'><param name='currentPosition' value='0'><param name='defaultFrame' value='0'><param name='playCount' value='999'><param name='autoStart' value=true><param name='currentMarker' value='0'><param name='invokeURLs' value='-1'><param name='baseURL' value=''><param name='volume' value='50'><param name='mute' value='0'><param name='uiMode' value='full'><param name='stretchToFit' value='-1'><param name='windowlessVideo' value='0'><param name='enabled' value='-1'><param name='enableContextMenu' value='0'><param name='fullScreen' value='0'><param name='SAMIStyle' value=''><param name='SAMILang' value=''><param name='SAMIFilename' value=''><param name='captioningID' value=''><param name='enableErrorDialogs' value='0'><param name='_cx' value='6615'><param name='_cy' value='1191'><embed type='application/x-mplayer2' id='wmpEmbed' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+path+"' name='MediaPlayerTV' autosize='1' autostart='1' clicktoplay='1' displaysize='1' enablecontextmenu='0' enablefullscreencontrols='1' enabletracker='1' mute='0' playcount='999' showcontrols='1' showaudiocontrols='1' showdisplay='0' showgotobar='0' showpositioncontrols='1' showstatusbar='1' showtracker='1' width=100% height='280'></object>";        

}
function videoclip(path,index1,index2)
{   
document.getElementById('hienthivideo').innerHTML="<TABLE width="+index1+" height ="+index2+" align=left><TR><TD><object id='winMediaPlayerID' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' name='winMediaPlayer' width=100% height=100% align='left'><param name='URL' value='"+path+"'><param name='rate' value='1'><param name='balance' value='0'><param name='currentPosition' value='0'><param name='defaultFrame' value='0'><param name='playCount' value='999'><param name='autoStart' value='-1'><param name='currentMarker' value='0'><param name='invokeURLs' value='-1'><param name='baseURL' value=''><param name='volume' value='50'><param name='mute' value='0'><param name='uiMode' value='full'><param name='stretchToFit' value='-1'><param name='windowlessVideo' value='0'><param name='enabled' value='-1'><param name='enableContextMenu' value='0'><param name='fullScreen' value='0'><param name='SAMIStyle' value=''><param name='SAMILang' value=''><param name='SAMIFilename' value=''><param name='captioningID' value=''><param name='enableErrorDialogs' value='0'><param name='_cx' value='6615'><param name='_cy' value='1191'><embed type='application/x-mplayer2' id='wmpEmbed' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+path+"' name='MediaPlayerTV' autosize='1' autostart='1' clicktoplay='1' displaysize='1' enablecontextmenu='0' enablefullscreencontrols='1' enabletracker='1' mute='0' playcount='999' showcontrols='1' showaudiocontrols='1' showdisplay='0' showgotobar='0' showpositioncontrols='1' showstatusbar='1' showtracker='1' width=100% height='280'></object></DIV></TD></TR></TABLE>";        

}
function ChangeIndexFLV(path,index)
{   
    for(var i=1; i<6; i++)
    {
        if(i==index)
        {
           document.getElementById('clip_' + i).style.fontWeight = 'bold'; 
        }
        else
        {
            try
            {
              document.getElementById('clip_' + i).style.fontWeight = 'normal';  
            }
            catch(err){}           
        }
    }        
path="http://media.chuahoangphap.com.vn/phapam/clip/"+path;
    document.getElementById('showAudioPlayer').innerHTML="<object id='winMediaPlayerID' class=border classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='300' height='250'><param name='movie' value='flvplayer.swf?logo=logo.png&autostart=true&showfsbutton=true&file="+path+"' /><param name='SCALE' value='exactfit' /><param name='BGCOLOR' value='#000' /><param name='allowfullscreen' value='true' /><embed src='flvplayer.swf?logo=logo.png&autostart=true&showfsbutton=true&file="+path+"' pluginspage='http://www.macromedia.com/go/getflashplayer' allowfullscreen='true' type='application/x-shockwave-flash' width='300' height='250' scale='exactfit' salign='TL' bgcolor='#000' ></object>";        

}
function hienanh()
{   
    document.getElementById('showAudioPlayer').innerHTML="<a href= 'phapam/#Singer,446'><img width='300' height='250' src='hinh/suphu.jpg'></a>";        

}


function videoclipflv(path,index1,index2)
{   
path="http://media.chuahoangphap.com.vn/phapam/clip/"+path;
    document.getElementById('hienthivideo').innerHTML="<TABLE width="+index1+" height ="+index2+" align=left><TR><TD><object id='winMediaPlayerID' class=border classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width="+index1+" height ="+index2+"><param name='movie' value='video_clip.swf?autostart=true&showfsbutton=true&file="+path+"' /><param name='SCALE' value='exactfit' /><param name='BGCOLOR' value='#000' /><param name='allowfullscreen' value='true' /><embed src='video_clip.swf?logo=logo.png&autostart=true&showfsbutton=true&file="+path+"' pluginspage='http://www.macromedia.com/go/getflashplayer' allowfullscreen='true' type='application/x-shockwave-flash' width="+index1+" height ="+index2+" scale='exactfit' salign='TL' bgcolor='#000' ></object></DIV></TD></TR></TABLE>";         

}
