home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 January / MAC_easy_01_2010.iso / mac / Video-Tutorial / system / js / standard.js < prev    next >
Encoding:
Text File  |  2008-01-04  |  4.1 KB  |  131 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 SarfariNum = navigator.appVersion.toLowerCase().indexOf( "safari" );
  16.     if( SarfariNum >= 0 ){
  17.     var att = "width=" + w + ",height=" + h + ", top=" + y + ", left=" + x + ",scrollbars=" + scroll + ",resizable=no, status bar=1";
  18.   }else if( navigator.appName == "Microsoft Internet Explorer" ){
  19.     var att = "width=" + w + ",height=" + h + ", top=" + y + ", left=" + x + ",scrollbars=" + scroll + ",resizable=no";
  20.   }else{
  21.     var att = "width=" + w + ",height=" + h + ", top=" + y + ", left=" + x + ",scrollbars=" + scroll + ",resizable=no";
  22.   }
  23.     var F2 = window.open( path, windowName, att );
  24.     F2.focus();
  25. }
  26.  
  27. function startPageByPath( path ){
  28.     if( screen.availWidth < 1024 || screen.availHeight < 712 ){
  29.         alert( "ACHTUNG!\nDie benˆtigte Darstellungsgrˆfle von 1024x712 steht leider nicht zu Verf¸gung! (" + screen.availWidth + "x" + screen.availHeight + ")\nEine einwandfreie Darstellung kann somit nicht gew‰hrleistet werden." );
  30.     }
  31.     popup( path, 1024, 712, 'no', 'videotraining' );
  32. }
  33.  
  34. function startPage(){
  35.     if( screen.availWidth < 1024 || screen.availHeight < 712 ){
  36.         alert( "ACHTUNG!\nDie benˆtigte Darstellungsgrˆfle von 1024x712 steht leider nicht zu Verf¸gung! (" + screen.availWidth + "x" + screen.availHeight + ")\nEine einwandfreie Darstellung kann somit nicht gew‰hrleistet werden." );
  37.     }
  38.     popup( 'System/index.htm', 1024, 712, 'no', 'videotraining' );
  39. }
  40.  
  41. function startPageAndRedirect(){
  42.     startPage();
  43.     location.href = 'http://www.galileo-press.de';
  44. }
  45.  
  46. /************************************
  47. * Size
  48. *************************************/
  49. function resizeToMin(){
  50.     
  51.     var outerWidth = window.outerWidth != undefined ? window.outerWidth : 1024 + 10;
  52.     var outerHeight = window.outerHeight != undefined ? window.outerHeight : 712 + 35;
  53.     
  54.     var w = 405 + outerWidth - 1024;
  55.     var h = 345 + outerHeight - 712;
  56.     window.resizeTo( w, h );
  57. }
  58.  
  59. function resizeToMax(){
  60.     
  61.     var outerWidth = window.outerWidth != undefined ? window.outerWidth : 405 + 10;
  62.     var outerHeight = window.outerHeight != undefined ? window.outerHeight : 345 + 35;
  63.     
  64.     var w = 1024 + outerWidth - 405;
  65.     var h = 712 + outerHeight - 345;
  66.     window.resizeTo( w, h );
  67. }
  68.  
  69. function setSize( w, h ){
  70.     window.resizeTo( w, h );
  71. }
  72. function getInsets(){
  73.     
  74.     var insetsObj = new Object ();
  75.     insetsObj['leftRightInsets'] = window.outerWidth != undefined ? window.outerWidth - 1024 : 10;
  76.     insetsObj['topBottomInsets'] = window.outerHeight != undefined ? window.outerHeight - 712 : 35;
  77.     return insetsObj;
  78.     
  79. }
  80.  
  81. /************************************
  82. * Step
  83. *************************************/
  84. function setStep( sec, label ){
  85.     alert( "setStep().sec: " + sec + ", label: " + label );
  86. }
  87.  
  88. function addStep( sec, label  ){
  89.     alert( "addStep().sec: " + sec + ", label: " + label );
  90. }
  91.  
  92. function setStepLabel( sec, label ){
  93.     alert( "setStepLabel().sec: " + sec + ", label: " + label );
  94. }
  95.  
  96. function setStepValue( sec, secNew ){
  97.     alert( "setStepFrameValue().sec: " + sec + ", secNew: " + secNew );
  98. }
  99.  
  100. function deleteStep( sec ){
  101.     alert( "deleteStep().sec: " + sec );
  102. }
  103.  
  104. /************************************
  105. * Subtitle
  106. *************************************/
  107. function setSubtitle( sec, label ){
  108.     alert( "setSubtitle().sec: " + sec + ", label: " + label );
  109. }
  110.  
  111. function addSubtitle( sec, label  ){
  112.     alert( "addSubtitle().sec: " + sec + ", label: " + label );
  113. }
  114.  
  115. function setSubtitleLabel( sec, label ){
  116.     alert( "setSubtitleLabel().sec: " + sec + ", label: " + label );
  117. }
  118.  
  119. function setSubtitleValue( sec, secNew ){
  120.     alert( "setSubtitleFrameValue().sec: " + sec + ", secNew: " + frameValue );
  121. }
  122.  
  123. function deleteSubtitle( sec ){
  124.     alert( "deleteSubtitle().sec: " + sec );
  125. }
  126.  
  127. function getTime( sec ){
  128.     //var n : Number = interface.callAS( 'getFrame' );
  129.     alert( "getTime():" + sec );
  130. }
  131.