
function init()
{
    doc = returnDocument() ;
    if (doc == 'listen.php')
    {
        document.getElementById('qtPlayer').SetURL("http://www.kod-music.com/assets/audio/dragon.m4a")
        document.getElementById('qtPlayer').stop() ;
    }


}


function playQt(src)
{
    document.qtPlayer.SetURL(src) ;
    //alert(src) ;
}


function returnDocument() {
        var file_name = document.location.href;
        var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
        return file_name.substring(file_name.lastIndexOf("/")+1, end);
    }


function changePlayer(pc, lnk) {
    
            document.getElementById('songTitle').innerHTML = pc['title'] ;
            document.getElementById('songDesc').innerHTML = pc['description'] ;
            document.getElementById('songFrom').innerHTML = pc['from'] ;
            document.qtPlayer.SetURL(pc['file']) ;
            
            
            sqr5 = document.getElementById('sqr5') ;
            sqr5.style.backgroundColor = "inherit" ;
            sqr6 = document.getElementById('sqr6') ;
            sqr6.style.backgroundColor = "inherit" ;
            sqr7 = document.getElementById('sqr7') ;
            sqr7.style.backgroundColor = "inherit" ;
            
            lnk.parentNode.style.backgroundColor = "#880000" ;
            //els[0].style.backgroundColor = "#111118" ;
    }
    


