Hd FLV player tool bar shows undefined When SEF ON-Collection of common programming errors

i am getting problem in my hdflv player on my joomla 1.5 site.i searched lots of thing about this issue but no one still face such thing that i am facing now.i am using the component of hd flv player it works fine and run all the videos,but whenever i turned on SEF(search engine friendly) component its control tool shows undefined. on the player views i found this code:

$app = JFactory::getApplication();
$router = $app->getRouter();
$sefURL = $router->getMode();
if ($sefURL == 1) {
    $language = JRequest::getVar('lang');
    if ($language != '') {
        $languages = '&slang=' . JRequest::getVar('lang');
    }
}  

in the above code getApplication() method takes all the parameter like(play,pause,zoom etc.) from language xml file which need to display on player tools and getRouter() method find that SEF is on or not.if this is turned on then the condition i found in this code is:

 playlistid = document.getElementById("playlistid").value;
                            if(playlistid != 'select') if(itemid !='0')
                            {

                                            window.open(baseURL+'/index.php?option=com_hdflvplayer&Itemid='+itemid+'&compid='+playlistid,'_self',false);

                                        window.open('index.php?option=com_hdflvplayer&Itemid='+itemid+'&compid='+playlistid+'','_self',false);


                            }
                            else
                            {


                                        window.open(baseURL+"/index.php?option=com_hdflvplayer&compid="+playlistid+"",'_self');

                                    window.open("index.php?option=com_hdflvplayer&compid="+playlistid+'','_self');


                        }
                    }

so when $sefURl==1 than this condition is not working for showing the tools name,i know the tools name comes from $languages and when i used this in above condition($sef==1) than its still not work and not giving playlist also.

i post my this question on hd flv player forum also but not get any response yet and i found similar question on this forum but my issue is little bit different.please look at that and ask me if any confusion.Thanks in advance.