summaryrefslogtreecommitdiffstats
path: root/HTML/script.js
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2005-08-30 15:51:39 +0000
committerPablo Saratxaga <pablo@mandriva.com>2005-08-30 15:51:39 +0000
commitf82c36f9aa41bfd224430fbc68766ba0bcdf875c (patch)
treee2534f7abaebfd67778454846892a023ef6b2079 /HTML/script.js
parent2d6e0a12287714d53853ce7e6036b32fe880261e (diff)
downloadindexhtml-f82c36f9aa41bfd224430fbc68766ba0bcdf875c.tar
indexhtml-f82c36f9aa41bfd224430fbc68766ba0bcdf875c.tar.gz
indexhtml-f82c36f9aa41bfd224430fbc68766ba0bcdf875c.tar.bz2
indexhtml-f82c36f9aa41bfd224430fbc68766ba0bcdf875c.tar.xz
indexhtml-f82c36f9aa41bfd224430fbc68766ba0bcdf875c.zip
new html page doesn't have any text anymore
Diffstat (limited to 'HTML/script.js')
-rw-r--r--HTML/script.js71
1 files changed, 71 insertions, 0 deletions
diff --git a/HTML/script.js b/HTML/script.js
new file mode 100644
index 0000000..9126143
--- /dev/null
+++ b/HTML/script.js
@@ -0,0 +1,71 @@
+/* $Id$
+*/
+
+/* */
+var isRemoteAvail = false;
+
+/* Remote web site */
+var remoteweb = 'http://start.mandriva.com/';
+
+/* Display a warning message on parent document in specific element if available.
+ @param text string to display
+ @param color text color
+ @param background background color
+ @return boolean
+*/
+/*
+function parentMessage( text, color, background ) {
+ var p = parent.window.document.getElementById('status');
+ if( p == null )
+ return false;
+
+ p.style.display = 'none';
+ if( text == '' )
+ return true;
+
+ p.innerHTML = text;
+ p.style.color = color;
+ p.style.background = background;
+ p.style.display = 'block';
+ return true;
+}
+*/
+
+/* Redirect parent document to available remote web site
+ with the current language code.
+ @return boolean
+*/
+function actOnline() {
+ var lang = null;
+
+ try {
+ lang = parent.window.document.documentElement.attributes.getNamedItem('lang').value;
+ } catch( e ) {
+ return false;
+ } finally { }
+
+ if( lang != null )
+ remoteweb += '?l='+lang;
+ parent.location = remoteweb;
+ //parentMessage('You are online. Go to <a href="'+remoteweb+'">'+remoteweb+'</a>','#006000','#aaff99');
+ return true;
+}
+
+/* If the remote website is not available.
+ @return boolean
+*/
+function actOffline() {
+ //parentMessage('You are offline...','#a00000','#ffaa88');
+ //TODO write <meta http-equiv="Refresh" content="60" /> in <head> ?
+ return true;
+}
+
+function bodyLoad() { if( isRemoteAvail ) { actOnline(); } else { actOffline(); } }
+function imgLoad() { isRemoteAvail = true; }
+function imgError() { isRemoteAvail = false; }
+
+window.alert = function() {}
+//parentMessage( 'Mandriva...', '#000' );
+
+/*
+*/