var oEditor = window.parent.InnerDialogLoaded() ;

window.onload = function()
{
	oEditor.FCKLanguageManager.TranslatePage(document) ;
	window.parent.SetOkButton( true ) ;
}

function Ok()
{
	var sMp3Url = GetE('mp3Url').value;
	var sAutoStart = GetE('autoStart').value;
	var sLoop = GetE('loop').value;

	if( sMp3Url.length> 0) {
		var sAutioPlay = "[audio:" + sMp3Url;
		if (sAutoStart == "Yes") {
			sAutioPlay += "|autostart=yes";
		}
		if (sLoop == "Yes") {
			sAutioPlay += "|loop=yes";
		}
		sAutioPlay += "]";
		oEditor.FCK.InsertHtml(sAutioPlay) ;
    	window.parent.Cancel() ;             //可以去掉
	} else {
		alert("请输入MP3地址。（例：http://www.xxx.com/xxx.mp3）");
	}
	return true ;
}