Problem with load()

Problem with load()

Hello all.

I wrote small script, which check GET method values from URL and load content of proper file info div.
  1. function loadContent(content, language) //LOAD CONTENT INTO DIV (i.e. ordo_en.txt)
  2.   $('#content').load(content + '_' + language + '.txt', function() {
  3.   alert(cont + '_' + lang + '.txt'); // alert as 'debbuger' info
  4. });
  5. }

  6. function urlGet(name){ //GET VALUES FROM URL
  7.     var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
  8.     return results[1] || 0; // if GET exist return value, if not - return 0;
  9. }

  10. $(document).ready(function(){
  11. var lang = "en"; //set default language to english
  12. var page = "ordo"; //set default page to ordo
  13. if(urlGet('p') !== 0){ //if GET method p (page) is not null
  14. page = urlGet('p'); // set page var to GET value
  15.                   alert (page); // for debbuging
  16. }
  17. if(urlGet('l') !== 0){ // similary as upper
  18. lang = urlGet('l');
  19.                   alert (lang);
  20. }
  21. loadContent(page,lang);
  22. });
Main problem is, the script doesen't work when url hasn't GET method values.
The second problem is, that when language = pl (index.html?p=ordo&l=pl) script shows that l = 0 (with other values for ' l' like gr, en, de script  works well).

What's wrong?

Thank you for response in advance.