﻿var vdsp;
var vds;
var buf;

window.onload=function(){
	vdsp = new VoiceDeliveryPlayer("vdsp");
	vds = new VoiceDelivery(vdsp, "vds");
}
function readOut(){
	buf = (document.getElementById("readOutHere")).innerHTML;
	buf = buf.replace(/<\/?[^>]+>/gi, "");
	vds.setCast("KeikoJPf");
	vds.speak(buf.slice(0,parseInt(buf.length/2)));
	waitId = setInterval("if(vdsp.isSpeaking()==1){clearInterval(waitId);vds.speak(buf.slice(parseInt(buf.length/2), buf.length));}", 100);
}
