//Thank you to hacobi1102 - ladykillah
//Do not remove copyright - it is public version
function hacobi_flash(link)
{
	var link = link;
	var hacobi1 = link.indexOf("www.youtube.com");
	var hacobi2 = link.indexOf("www.nhaccuatui.com");
	var hacobi3 = link.indexOf("static.mp3.zing.vn");
	//var hacobi4 = link.lastIndexOf(".swf");
	//Youtube pro
	if(hacobi1>0||hacobi2>0||hacobi3>0){
	if(hacobi1>0){
		linkid=link.substr(31,11);
			document.write ("<object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/"+linkid+"?fs=1&amp;hl=en_US&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/"+linkid+"?fs=1&amp;hl=en_US&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='600' height='480'></embed></object>");
			document.write ("<br><img src='http://img.youtube.com/vi/"+linkid+"/1.jpg' border='0' alt='Xem Trước'>  <img src='http://img.youtube.com/vi/"+linkid+"/2.jpg' border='0' alt='Xem Trước'>   <img src='http://img.youtube.com/vi/"+linkid+"/3.jpg' border='0' alt='Xem Trước'>");
	}
	//NHAC CUA TUI
	if(hacobi2>0){
		var kitu;
		kitu=link.substr(26,1);
		if(kitu=="m"){
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='300' height='40'>");
		}
		else if (kitu=="l"){
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='300' height='400'>");
		}
	}
	//MP3 ZING
	if(hacobi3>0){
		var kitu2;
		kitu2=link.substr(107,1);
		kitu3=link.substr(105,1);
		if(kitu3=="4"){
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='430' height='80'></embed>");
			}
		else if(kitu2=="1"){
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='300' height='300'></embed>");
			}
		else{
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='480' height='320'></embed>");
			}
	}
	}
	//FLASH
	else{
			document.write ("<embed src="+link+" quality='high' wmode='transparent' type='application/x-shockwave-flash' width='480' height='320'></embed>");
			}
}
