var speakstate;function Speakarticle(a,b){$.ajax({type:"POST",url:a,dataType:"text",data:{id:""+b+""},success:function(d){var c="article_"+b+".wav";if(d==c){$("#textspeak .m").html("\u7b49\u5f85\u5904\u7406\u2026");speakstate=window.setInterval("getstate("+b+")",500)}else{$("#textspeak .m").html("\u7b49\u5f85\u5904\u7406\u2026");if(d=="no right!"){alert("\u7cfb\u7edf\u5df2\u7981\u7528\u8bed\u97f3\u6717\u8bfb\u529f\u80fd\uff01")}else{alert("\u670d\u52a1\u5668\u914d\u7f6e\u6216\u6743\u9650\u9519\u8bef\u0021")}}},error:function(c){alert("\u58f0\u97f3\u8f93\u51fa\u9519\u8bef\u0021")}})}function player(a){if(isie){$("#player").load(webd+"jquery/tts/"+a,function(){$("#textspeak .m").html("\u6b63\u5728\u6717\u8bfb\u2026")})}else{if(navigator.userAgent.toUpperCase().indexOf("EDGE/")>0){$("#player").load(webd+"jquery/TTS_Html5/"+a,function(){$("#textspeak .m").html("\u6b63\u5728\u6717\u8bfb\u2026")})}else{if(navigator.userAgent.toUpperCase().indexOf("SAFARI")>0){$("#player").load(webd+"jquery/tts_w3c/"+a,function(){$("#textspeak .m").html("\u6b63\u5728\u6717\u8bfb\u2026")})}else{if(navigator.userAgent.toUpperCase().indexOf("FIREFOX")>0){$("#player").load(webd+"jquery/TTS_Html5/"+a,function(){$("#textspeak .m").html("\u6b63\u5728\u6717\u8bfb\u2026")})}else{$("#player").load(webd+"jquery/TTS/"+a,function(){$("#textspeak .m").html("\u6b63\u5728\u6717\u8bfb\u2026")})}}}}}function getstate(b){var a=webd+"jquery/getstate";$.ajax({type:"POST",url:a,dataType:"text",data:{id:""+b+""},success:function(c){if(c==""){clearInterval(speakstate);$("#textspeak .m").html("\u6b63\u5728\u7f13\u51b2\u2026");player(b)}},error:function(c){alert("\u72b6\u6001\u9519\u8bef\u0021")}})}function Speakstop(){clearInterval(speakstate);$("#player").html("");$("#textspeak .m").html("\u6717\u8bfb")};