home *** CD-ROM | disk | FTP | other *** search
/ Computer Active Guide 2009 October / Disc.iso / Programos / WE7Express-cov.exe / WebEasy7Express-UK.exe / CDBrowser / loader.js < prev   
Encoding:
JavaScript  |  2007-10-25  |  2.1 KB  |  78 lines

  1. /*function allows deleting a button from the memu of the main page*/
  2. function get_button_menu()
  3. {
  4.     return "install,web,manual,acrobat";    
  5. }
  6.  
  7. /*Function allows changing the buttonÆs color of the main page */ 
  8. function change_color(curent, szClassName)
  9. {
  10.  curent.className = szClassName;
  11. }
  12.  
  13. /*Function allows changing the wolrd button and main image of the home page */ 
  14. function change_image(szimage)
  15. {
  16.     var main_image = document.getElementById("main_image");
  17.     if (main_image)
  18.     {
  19.         main_image.src = "images/" + szimage;
  20.     }
  21. }
  22.  
  23.  
  24. /*Function allows launching the main application */ 
  25. function install()
  26. {
  27.     window.external.Show(6);
  28.     window.external.Execute("WE71-Pry.exe","","data\\ENG\\",5);
  29.     window.external.Show(5);
  30. }
  31.  
  32. /*Function allows launching the trial application */ 
  33. function install_trial()
  34. {
  35.     window.external.Show(6);
  36.     window.external.Execute("TransferMy Video-Trial.exe","","data\\trial\\",5);
  37.     window.external.Show(5);
  38. }
  39.  
  40. /*Function allows reading  the user guide */ 
  41. function Guide_read()
  42. {
  43.     window.external.Show(6);
  44.     window.external.Execute("Guide.pdf","","data\\Guide\\",5);
  45.     window.external.Show(5);
  46. }
  47.  
  48. /*Function allows launching  Acrobat Reader */ 
  49. function acrobat_install()
  50. {
  51.      window.external.Show(6);
  52.      window.external.Execute("AdbeRdr81.exe","","data\\Acrobat\\ENG\\",5);
  53.      window.external.Show(5);
  54.  }
  55.  
  56. /* function allows preloading images*/
  57. function preloadImages() {
  58. var d=document; if(d.images){ if(!d.p) d.p=new Array();
  59. var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
  60. if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
  61. }
  62.  
  63.  
  64. /*Function launches in the Onload of the main page. It displays the buttons in the menu and preload images */
  65. function init_home()
  66. {
  67.     var objbutton;
  68.     var strbutton = get_button_menu();
  69.     var arrbutton = strbutton.split(",");
  70.     preloadImages('images/TransfertMy.jpg');
  71.     for (var intCount=0; intCount<arrbutton.length; intCount++)
  72.     {
  73.         objbutton = document.getElementById("Button_" + arrbutton[intCount]);
  74.         if (objbutton)
  75.             objbutton.style.display = "block";
  76.     }    
  77. }
  78.