home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2007 June / PCpro_2007_06.ISO / files / openoffice / workshop / System / js / standard.js
Encoding:
Text File  |  2006-06-03  |  1.5 KB  |  49 lines

  1. function popup( path, w, h, scroll, windowName ){
  2.     
  3.     if ( screen.availWidth < w ){
  4.         w = screen.availWidth - 10;
  5.         scroll = "yes";
  6.     }
  7.     if ( screen.availHeight < h ){
  8.         h = screen.availHeight - 29;
  9.         scroll = "yes";
  10.     }
  11.  
  12.     x = ( screen.availWidth - w - 10 ) / 2;
  13.     y = ( screen.availHeight - h - 29 ) / 2;
  14.     
  15.     var F2 = window.open( path, windowName, "width=" + w + ",height=" + h + ", top=" + y + ", left=" + x + ",scrollbars=" + scroll);
  16.     F2.focus();
  17. }
  18.  
  19. function startPage(){
  20.     if( screen.availWidth < 1024 || screen.availHeight < 712 ){
  21.         alert( "ACHTUNG!\nDie ben÷tigte Darstellungsgr÷▀e von 1024x712 steht leider nicht zu Verfⁿgung! (" + screen.availWidth + "x" + screen.availHeight + ")\nEine einwandfreie Darstellung kann somit nicht gewΣhrleistet werden." );
  22.     }
  23.     popup( 'System/flashCheck.htm', 1024, 712, 'no', 'videotraining' );
  24. }
  25.  
  26. function startPageAndRedirect(){
  27.     startPage();
  28.     location.href = 'http://www.galileo-press.de';
  29. }
  30.  
  31. function resizeToMin(){
  32.     
  33.     var outerWidth = window.outerWidth != undefined ? window.outerWidth : 1024 + 10;
  34.     var outerHeight = window.outerHeight != undefined ? window.outerHeight : 712 + 35;
  35.     
  36.     var w = 405 + outerWidth - 1024;
  37.     var h = 345 + outerHeight - 712;
  38.     window.resizeTo( w, h );
  39. }
  40.  
  41. function resizeToMax(){
  42.     
  43.     var outerWidth = window.outerWidth != undefined ? window.outerWidth : 405 + 10;
  44.     var outerHeight = window.outerHeight != undefined ? window.outerHeight : 345 + 35;
  45.     
  46.     var w = 1024 + outerWidth - 405;
  47.     var h = 712 + outerHeight - 345;
  48.     window.resizeTo( w, h );
  49. }