home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / Chip_2004-03_cd1.bin / chplus / navrcholu / navrcholu_soubory / code < prev    next >
Text File  |  2004-02-04  |  2KB  |  67 lines

  1. var nav_obj = navigator;
  2. var js_ver = 10;
  3. var fl_ver = 0;
  4. var fl_desc;
  5.  
  6. var bs = "style=\"border:none\"";
  7. if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) {
  8.     bs = "border=\"0\"";
  9. }
  10.  
  11. if (nav_obj.appVersion.indexOf("MSIE")>=0 && nav_obj.appVersion.indexOf("Win")>=0) { 
  12.     document.writeln("<s"+"cript language=\"VBScript\">");
  13.     document.writeln("on error resume next");
  14.     for (i = 3; i < 7; i++)
  15.         document.writeln("if (IsNull(CreateObject(\"ShockwaveFlash.ShockwaveFlash." + i + "\"))) then dummy=0 else fl_ver=" + i + " end if");
  16.     document.writeln("</s"+"cript>"); 
  17. }
  18. if (nav_obj.plugins && nav_obj.plugins["Shockwave Flash"]) {
  19.     fl_desc = nav_obj.plugins["Shockwave Flash"].description;
  20.     fl_ver = parseInt(fl_desc.charAt(fl_desc.indexOf(".") - 1));
  21.  
  22. var java = 0;
  23. var moz_ver = 4;
  24. if (nav_obj.userAgent.substring(0,8) == "Mozilla/") {
  25.     moz_ver = nav_obj.userAgent.substring(8,9);
  26. }
  27.  
  28. if (moz_ver > 2) {
  29.     if (nav_obj.javaEnabled())
  30.         java = 1;
  31. }
  32. var ref = window.parent.document.referrer;
  33. var color_depth = 0;
  34. var res_y = 0;
  35. var res_x = 0;
  36. var win_y = 0;
  37. var win_x = 0;
  38. if (moz_ver > 3  && (screen)) {
  39.     color_depth = screen.colorDepth;
  40.     if (color_depth == 0)
  41.         color_depth = screen.pixelDepth;
  42.     res_y = screen.height;
  43.     res_x = screen.width;
  44.     win_y = (document.all) ? top.document.body.clientHeight : top.innerHeight;
  45.     win_x = (document.all) ? top.document.body.clientWidth : top.innerWidth;
  46. }
  47. var cookie_sup;
  48. var lastYear = new Date();
  49. lastYear.setFullYear(lastYear.getFullYear() - 1);
  50. document.cookie = "nvt=1";
  51. if (document.cookie.indexOf("nvt") != -1) {
  52.     cookie_sup = 1;
  53. } else {
  54.     cookie_sup = 0;
  55. }
  56. document.cookie = "nvt=1; expires=" + lastYear.toGMTString();
  57.  
  58. document.write("<a href=\"http://navrcholu.cz/Statistika/12/\">"
  59.     + "<img src=\"http://c1.navrcholu.cz/hit?site=12;t=t1x1;"
  60.     + "fv=" + fl_ver + ";js=" + java + ";cs=" + cookie_sup + ";ref="
  61.     + escape(ref) + ";cd=" + color_depth + ";sx=" + res_x
  62.     + ";wx=" + win_x + ";jss=1;r=" + Math.random()
  63.     + "\" width=\"1\" "
  64.     + "height=\"1\" "
  65.     + "alt=\"\" " + bs + " /></a>");
  66.