/*function PlayVideo(soundfilepath)
{
	oNewWindow = window.open(SITE_URL + 'show_preview.php?vFile='+ soundfilepath, 'VideoPreview','toolbar=no,height=350,width=450,left=200,top=200');
	oNewWindow.focus();

}*/

function PlaySongVideo(FilePath,iItemId,ImgPath)
{
	var w = 500;
	var h = 430;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var page = 'show_preview.php?File_type=Video&vFile='+FilePath+'&iItemId='+iItemId+'&img='+ImgPath;
	windowprops = "height="+h+",width="+w+",top="+ wint +",left="+ winl +",location=no,"+"scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=yes";
	win_video = window.open(page, "video_preview", windowprops);
	win_video.focus();
//	window.open('show_preview.php?File_type=Video&vFile='+FilePath+'&iItemId='+iItemId,'','toolbar=no,height=400,width=450,left=200,top=200');
}
                                                 
ver=parseInt(navigator.appVersion)                                               
ie4=(ver>3  && navigator.appName!="Netscape")?1:0                                
ns4=(ver>3  && navigator.appName=="Netscape")?1:0                                
ns3=(ver==3 && navigator.appName=="Netscape")?1:0                                
                                                                                 
function playSound(soundfilepath, iNo, no) {
/* if (ie4)                                                                        
 {                                                                               
	 document.all['BGSOUND_ID'].src= soundfilepath;
	 document.all['BGSOUND_ID'].loop=10;                                     
	                                                                               
 }                                                                               
 if ((ns4||ns3)                                                                  
  && navigator.javaEnabled()                                                     
  && navigator.mimeTypes['audio/x-midi']                                         
  && self.document.Bach.IsReady()                                                
 )                                                                               
 {                                                                               
 	//alert(12);                                                                   
  self.document.Bach.play(false)                                                 
 }                                                 
*/

 disableAll(no);
 document.getElementById("spnStopPlayId_"+ iNo).style.display = '';
 //document.getElementById("spnPlayImg_"+ iNo).style.display = '';
 document.getElementById("spnPlayId_"+ iNo).style.display = 'none';
 
}  

function stopSound(iNo) {
 if (ie4) document.all['BGSOUND_ID'].src='jsilence.mid';
 if ((ns4||ns3)
  && navigator.javaEnabled()
  && navigator.mimeTypes['audio/x-midi']
 )
 {
  self.document.Bach.stop()
 }
 document.getElementById("spnStopPlayId_"+ iNo).style.display = 'none';
 //document.getElementById("spnPlayImg_"+ iNo).style.display = 'none';
 document.getElementById("spnPlayId_"+ iNo).style.display = '';
}
function setVolume(volVal) {
//alert(volVal);
 if (ie4) 
 {
 	//alert(11);
	 document.all['BGSOUND_ID'].volume=volVal;
	//alert(12);
	 
 }
 if ((ns4||ns3)
  && navigator.javaEnabled()
  && navigator.mimeTypes['audio/x-midi']
 )
 {
  self.document.Bach.volume=volVal;
 }
}
function disableAll(no)
{	

 	var i=0;
	for(i=0;i<no;i++){
		document.getElementById("spnStopPlayId_"+ i).style.display = 'none';
		//document.getElementById("spnPlayImg_"+ i).style.display = 'none';
		document.getElementById("spnPlayId_"+ i).style.display = '';
	}

}
function MusicPlayImg()
{
	var Play_Obj ='';
	Play_Obj ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="50" height="40" id="soundanimation" align="middle">';
	Play_Obj +='<param name="allowScriptAccess" value="sameDomain" />';
	Play_Obj +='<param name="movie" value="' + SITE_URL +'images/soundanimation.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />';
	Play_Obj +='<embed src="' + SITE_URL +'images/soundanimation.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="10" height="50" name="soundanimation" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	Play_Obj +='</object>';
	
	return Play_Obj;
}