var curId=-1;
function ge(e){return document.getElementById(e);}
function showPlayer(id,p)
{
    if(curId!=id)
    {
        if(curId!=-1)
            closeAllPlayers();
        curId=id;
        var ifr = ge("ispeech_iframe_" + id.toString());
        ifr.src="http://www.ispeech.org/redirect.php?u=" + escape(p);
        ifr.frameBorder="0";
        ifr.style.border="none";
        ifr.scrolling="no";
        ifr.style.overflow="hidden";
        ifr.style.width="204px";
        ifr.style.height="56px";
    }
    else
        closeAllPlayers();
}
function closeAllPlayers()
{
    for(var i = 1;i<=100;i++)
    {
        var ifr = ge("ispeech_iframe_" + i.toString());
        if(ifr!=null)
        {
            ifr.src="about:blank";
            ifr.style.width="0px";
            ifr.style.height="0px";
        }
        else
            break;    
    }
    curId=-1;
}
