home *** CD-ROM | disk | FTP | other *** search
/ business-86-101-185-173.business.broadband.hu / business-86-101-185-173.business.broadband.hu.zip / business-86-101-185-173.business.broadband.hu / trans / sqlncli.msi / DP_sqlncli10_chm_32_1033 / local / samples.js < prev    next >
Text File  |  2010-03-31  |  1KB  |  69 lines

  1.  
  2. function closeMe()
  3. {
  4.     window.close();
  5. }
  6.  
  7. function ChangeViewCodeIcon(key)
  8. {
  9.     var i;
  10.     var imageElements = document.getElementsByName("vcImage");
  11.     for(i=0; i<imageElements.length; ++i)
  12.     {
  13.         if(imageElements[i].parentElement == key)
  14.         {
  15.             if(imageElements[i].src == viewImage.src)
  16.                 imageElements[i].src = viewHoverImage.src;
  17.             else
  18.                 imageElements[i].src = viewImage.src;
  19.         }
  20.     }
  21. }
  22.  
  23. function ChangeDownloadCodeIcon(key)
  24. {
  25.     var i;
  26.     var imageElements = document.getElementsByName("dcImage");
  27.     for(i=0; i<imageElements.length; ++i)
  28.     {
  29.         if(imageElements[i].parentElement == key)
  30.         {
  31.             if(imageElements[i].src == downloadImage.src)
  32.                 imageElements[i].src = downloadHoverImage.src;
  33.             else
  34.                 imageElements[i].src = downloadImage.src;
  35.         }
  36.     }
  37. }
  38.  
  39. function ViewSampleSource(name)
  40. {
  41.     // variables
  42.     var wConfig;
  43.     var wWindow;
  44.     var oSelectBox = document.all.item(name);
  45.     var url;
  46.     var sIndex;
  47.     
  48.     // Get the selectedIndex
  49.     sIndex = oSelectBox.selectedIndex;
  50.     
  51.     if (sIndex >= 0)
  52.     {
  53.         // Get the URL to the file
  54.         url = oSelectBox.options[sIndex].value;
  55.  
  56.         // Set the configuration
  57.         wConfig += 'directories=0,';
  58.         wConfig += 'location=0,';
  59.         wConfig += 'menubar=0,';
  60.         wConfig += 'resizable=1,';
  61.         wConfig += 'scrollbars=1,';
  62.         wConfig += 'status=0,';
  63.         wConfig += 'toolbar=0';
  64.  
  65.         // Launch the window
  66.         wWindow = window.open(url, 'ViewSampleSource', wConfig);
  67.         wWindow.focus();
  68.     }
  69. }