home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2012 January / ME_2012_01.iso / Galileo-Video / system / js / standard.js < prev    next >
Encoding:
Text File  |  2010-07-04  |  3.8 KB  |  136 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. {
  29.     if( screen.availWidth < 1024 || screen.availHeight < 712 ){
  30.         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." );
  31.     }
  32.     popup( path, 1024, 712, 'no', 'videotraining' );
  33. }
  34.  
  35. function startPage()
  36. {
  37.     if( screen.availWidth < 1024 || screen.availHeight < 712 ){
  38.         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." );
  39.     }
  40.     popup( 'index.htm', 1024, 712, 'no', 'videotraining' );
  41. }
  42.  
  43. function startPageAndRedirect()
  44. {
  45.     startPage();
  46.     location.href = 'http://www.galileo-press.de';
  47. }
  48.  
  49. /************************************
  50. * Size
  51. *************************************/
  52. function setSize( w, h )
  53. {
  54.     window.resizeTo( w, h );
  55. }
  56.  
  57. function moveWindowTo( x, y ) 
  58. {
  59.   window.moveTo( x, y );
  60. }
  61.  
  62. function centerWindow() 
  63. {
  64.   //window.moveTo( ( screen.width - window.outerWidth ) * 0.5, ( screen.height - window.outerHeight ) * 0.5 );
  65.   window.moveTo( ( screen.availWidth - window.outerWidth ) * 0.5, ( screen.availHeight - window.outerHeight ) * 0.5 );
  66. }
  67.  
  68. function getOuterSize()
  69. {    
  70.     var obj = new Object ();
  71.     obj['outerWidth'] = window.outerWidth;
  72.     obj['outerHeight'] = window.outerHeight;
  73.     return obj;
  74. }
  75.  
  76. function getScreenWidth()
  77. {
  78.   return screen.availWidth;
  79. }
  80.  
  81. function getScreenHeight()
  82. {
  83.   return screen.availHeight;
  84. }
  85.  
  86. /************************************
  87. * Step
  88. *************************************/
  89. function setStep( sec, label ){
  90.     alert( "setStep().sec: " + sec + ", label: " + label );
  91. }
  92.  
  93. function addStep( sec, label  ){
  94.     alert( "addStep().sec: " + sec + ", label: " + label );
  95. }
  96.  
  97. function setStepLabel( sec, label ){
  98.     alert( "setStepLabel().sec: " + sec + ", label: " + label );
  99. }
  100.  
  101. function setStepValue( sec, secNew ){
  102.     alert( "setStepFrameValue().sec: " + sec + ", secNew: " + secNew );
  103. }
  104.  
  105. function deleteStep( sec ){
  106.     alert( "deleteStep().sec: " + sec );
  107. }
  108.  
  109. /************************************
  110. * Subtitle
  111. *************************************/
  112. function setSubtitle( sec, label ){
  113.     alert( "setSubtitle().sec: " + sec + ", label: " + label );
  114. }
  115.  
  116. function addSubtitle( sec, label  ){
  117.     alert( "addSubtitle().sec: " + sec + ", label: " + label );
  118. }
  119.  
  120. function setSubtitleLabel( sec, label ){
  121.     alert( "setSubtitleLabel().sec: " + sec + ", label: " + label );
  122. }
  123.  
  124. function setSubtitleValue( sec, secNew ){
  125.     alert( "setSubtitleFrameValue().sec: " + sec + ", secNew: " + frameValue );
  126. }
  127.  
  128. function deleteSubtitle( sec ){
  129.     alert( "deleteSubtitle().sec: " + sec );
  130. }
  131.  
  132. function getTime( sec ){
  133.     //var n : Number = interface.callAS( 'getFrame' );
  134.     alert( "getTime():" + sec );
  135. }
  136.