home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Sponsors / Xara / content / lib / start.js < prev   
Text File  |  2005-03-29  |  1KB  |  41 lines

  1. var menubox_version = 0;
  2. if (window.external) if (window.external.menuboxversion) menubox_version = window.external.menuboxversion;
  3.  
  4. function menubox_close()
  5. {
  6.  if (menubox_version >= 200) window.external.close();
  7.  else window.close();
  8. }
  9.  
  10. function menubox_execute(file, parameters, directory, verb, show, absolutepath, wait)
  11. {
  12.  if (menubox_version >= 200) window.external.execute(file, parameters, directory, verb, show, absolutepath, wait);
  13.  else if (window.location) if (window.location.href) if (navigator.userAgent) if (file.length > 0)
  14.    {
  15.          if (file.charAt(file.length-1) == "\\" && navigator.userAgent.indexOf("MSIE 3") == -1) window.open(file,"_blank");
  16.         else window.location.href = file;
  17.    }
  18. }
  19.  
  20. function menubox_exists(file)
  21. {
  22.  if (menubox_version >= 230) return window.external.exists(file);
  23.  else return false;
  24. }
  25.  
  26. function menubox_language()
  27. {
  28.  if (menubox_version >= 230) return window.external.language;
  29.  else return "en";
  30. }
  31.  
  32. function openWindow(url,width,height)
  33. {
  34.     var w = window.open (url, "democd", "width="+width+",height="+height+",resizable=1,scrollbars=1,menubar=0");
  35. }
  36.  
  37. function swap(image,imagefile)
  38. {
  39.   document.images[image].src = imagefile
  40. }
  41.