
  /*********************************************************************************************/
  /* Taurus Interactive Web engine (TIWengine)                                                 */
  /*********************************************************************************************/
  /*  Name: TIWeng_system.js                                                                   */
  /*  Date: 29/09/2005                                                                         */
  /*  Desc: Engine system. Getting browser and OS informations. Contents general functions.    */
  /*        Systém enginu. Získání informací o prohlížeči a OS. Obsahuje obecné funkce enginu. */
  /*                                                                                           */
  /*********************************************************************************************/
  /* Copyright © 2005 Lukáš Mitvalský - Taurus Interactive, All rights reserved.               */
  /*********************************************************************************************/
  
  ////////////////////////////////
  // BROWSER & OS
  ////////////////////////////////
  
  // Zkontroluje zda userAgent obsahuje daný řetězec
  // Důležité při dalším rozhodování, o verzích prohlížeče a systému
  // Řetězec je nutno psát malými písmeny
  //
  // Control, whether userAgent contains the string
  // That's important in next determination about version of browser and system
  // The string must be lower case
  function TIWeng_UserAgent_CheckIt(UAString)
  {
    return navigator.userAgent.toLowerCase().indexOf(UAString) + 1;
  };

  // Zjistí verzi operačního systému
  // Get version of operation system
  function TIWeng_System_GetOS()
  {
    if (TIWeng_UserAgent_CheckIt('win')) return "Windows";
    else if (TIWeng_UserAgent_CheckIt('linux')) return "Linux";
    else if (TIWeng_UserAgent_CheckIt('x11')) return "Unix";
    else if (TIWeng_UserAgent_CheckIt('mac')) return "Mac";
    else return "Unknown OS";
  };
  
  // Zjistí typ prohlížeče
  // Get type of browser
  function TIWeng_System_GetBrowser()
  {
    if (TIWeng_UserAgent_CheckIt('msie')) return "Internet Explorer";
    else if (TIWeng_UserAgent_CheckIt('firefox')) return "Firefox";
    else if (TIWeng_UserAgent_CheckIt('opera')) return "Opera";
    else if (TIWeng_UserAgent_CheckIt('konqueror')) return "Konqueror";
    else if (TIWeng_UserAgent_CheckIt('safari')) return "Safari";
    else if (TIWeng_UserAgent_CheckIt('omniweb')) return "OmniWeb";
    else if (TIWeng_UserAgent_CheckIt('webtv')) return "WebTV";
    else if (TIWeng_UserAgent_CheckIt('icab')) return "iCab";
    else if (!TIWeng_UserAgent_CheckIt('compatible')) return "Netscape Navigator";
    else return "Unknown browser";
  };
  
  // Otevře nové okno se zadanými parametry
  // Open new window with adjusted params
  function TIWeng_Window_Open(address, name, width, height, resizable, others)
  {
    
    // Default values
    if ((resizable==null) || (resizable!='yes') || (resizable!='no'))
      resizable = 'no';
    if (others==null)
      others = 'scrollbars=no,menubar=yes';
    
    // open new window
    window.open(address, name, ',width='+width+',height='+height+',resizable='+resizable+','+others);
    
  };
  

