
if(typeof net=="undefined"||net==null){net=new Object();}
if(typeof net.watchee=="undefined"||net.watchee==null){net.watchee=new Object();}
net.watchee.playSound=function(src,id,tthis,autoplay){var audio=document.getElementById(id);if(audio==null){net.watchee.addSound(src,id,tthis,autoplay);}else{if(tthis!=undefined&&tthis.info!=undefined){tthis.info("playing: "+src);}
audio.play(0);if(tthis!=undefined&&tthis.info!=undefined){tthis.info("finished playing: "+src);}}
return"<audio src="+src+" controls=true>noSupport</audio>";}
net.watchee.addSound=function(src,id,tthis,autoplay){if(tthis!=undefined&&tthis.info!=undefined){tthis.info("adding: "+src);}
var body=document.getElementsByTagName('body')[0];var audio=document.createElement('audio');if(autoplay!=false){audio.setAttribute('autoplay',true);}
audio.setAttribute('src',src);audio.setAttribute('id',id);body.appendChild(audio);if(tthis!=undefined&&tthis.info!=undefined){tthis.info("finished adding: "+src);}
return"<audio src="+src+" controls=true>noSupport</audio>";}
net.watchee.removeSound=function(id){var child=document.getElementById(id);if(child==null)alert("no such child existing");var parent=child.parentNode;parent.removeChild(child);}
