Annotation of loncom/html/adm/jsMath/jsMath-loader.html, revision 1.1

1.1     ! albertel    1: <html>
        !             2: <head>
        !             3: <!--
        !             4:  | jsMath-loader.html
        !             5:  |
        !             6:  | Part of the jsMath package for mathematics on the web.
        !             7:  | 
        !             8:  | This file is used for jsMath components when the browser doesn't
        !             9:  | handle the XmlHttpRequest function, or when they must be obtained
        !            10:  | from a server other than the one server the page that is using jsMath.
        !            11:  | 
        !            12:  | ---------------------------------------------------------------------
        !            13:  | 
        !            14:  | Copyright 2004-2006 by Davide P. Cervone
        !            15:  |
        !            16:  | Licensed under the Apache License, Version 2.0 (the "License");
        !            17:  | you may not use this file except in compliance with the License.
        !            18:  | You may obtain a copy of the License at
        !            19:  |
        !            20:  |     http://www.apache.org/licenses/LICENSE-2.0
        !            21:  |
        !            22:  | Unless required by applicable law or agreed to in writing, software
        !            23:  | distributed under the License is distributed on an "AS IS" BASIS,
        !            24:  | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        !            25:  | See the License for the specific language governing permissions and
        !            26:  | limitations under the License.
        !            27: -->
        !            28: </head>
        !            29: <body>
        !            30: 
        !            31: <script>
        !            32: var showWarning = 0;
        !            33: while (!window.jsMath && !showWarning) {
        !            34:   try {
        !            35:     window.jsMath = window.parent.jsMath;
        !            36:     if (!window.jsMath) {throw "no jsMath";}
        !            37:   } catch (err) {
        !            38:     showWarning = 1;
        !            39:     //
        !            40:     // MSIE on Mac can't change document.domain, and 'try' won't
        !            41:     //   catch the error (Grrr!) so don't even try for it
        !            42:     //
        !            43:     if (document.domain.match(/\..*\./) &&
        !            44:         (navigator.appName != 'Microsoft Internet Explorer' ||
        !            45:          navigator.platform != 'MacPPC' || !navigator.userProfile || !document.all)) {
        !            46:       try {
        !            47:         document.domain = document.domain.replace(/^[^.]*\./,'');
        !            48:         showWarning = 0;
        !            49:       } catch(err) {}
        !            50:     }
        !            51:   }
        !            52: }
        !            53: 
        !            54: function Warning () {
        !            55:   alert(
        !            56:     "jsMath can't load one of its required components, because jsMath " +
        !            57:     "was not obtained from a server that is in the same domain as the " +
        !            58:     "page that loaded it."
        !            59:   );
        !            60: }
        !            61: 
        !            62: if (showWarning) {setTimeout("Warning()",1)} else {
        !            63:   debug = window.parent.debug; show = window.parent.show;
        !            64:   jsMath.Script.window = window; url = jsMath.Script.url;
        !            65:   document.write('<script src="'+url+'"><'+'/script>');
        !            66: }
        !            67: </script>
        !            68: 
        !            69: <script>
        !            70: if (window.jsMath) {
        !            71:   if (document.readyState == 'loading') {
        !            72:     // work around bug in OmniWeb 4.5 that would otherwise run this twice.
        !            73:     setTimeout("jsMath.Script.endLoad();",1)
        !            74:   } else {
        !            75:     jsMath.Script.endLoad();
        !            76:   }
        !            77: }
        !            78: </script>
        !            79: 
        !            80: </body>
        !            81: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>