Fungerer ikke på mac
Hej Eksperter,Hvordan kan jeg få det her script til at fungerer på en Mac?
<HTML>
<head>
<style type="text/css">
<!--
#fadeMe01 { position: absolute; visibility: visible; width: 410px }
#fadeMe02 { position: absolute; visibility: visible; width: 400px }
.content { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
.content1 { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
.small { font: 6pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
b { font-weight: bold }
a { text-decoration : none }
// -->
</style>
<script type="text/javascript" language="javascript">
<!--
/* Begin HIGHLIGHT */
var idme=908601;
var convert = new Array();
var hexbase = new Array("0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "A", "B", "C", "D", "E", "F");
var value=0;
var rgb;
for (x=0; x<16; x++)
for (y=0; y<16; y++) {
convert[value] = hexbase[x] + hexbase[y];
value++;
}
var timerID = null, timerRunning = false;
function stopClock(){
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
var layers = document.layers;
var style = document.all;
var both = layers || style;
if (layers) { layerRef = 'document.layers'; styleRef = ''; }
if (style) { layerRef = 'document.all'; styleRef = '.style'; }
function moveLayer(obj, topx, leftx) {
if (both) {
eval(layerRef + '["'+obj+'"]' + styleRef + '.top = topx');
eval(layerRef + '["'+obj+'"]' + styleRef + '.left = leftx');
}
}
/*
* COPYRIGHT(c) 1998. Teg Workz.
*
* The fadeText, hexToDex and changeColor functions is being
* made available for public BUT personal or non-profit use.
* All other functions are for the private use of the author
* and violators will be prosecuted using the full extent of
* the law. No warranty or support will be given in using
* this script and any modification to the fadeText and
* changeColor functions will void the user of any inquiries
* he/she might ask the author regarding the script.
* DO NOT REMOVE THE COPYRIGHT NOTICE
*
* Script title : Text Fader 1.3: the re-written version
* site authorized : public use w/o modification
* script created : 23 December 1997
* updated : 8/19/98 1:36PM (kewl!finished the script after 5 hours)
*
* Emmanuel C. Halos - agent_teg@ThePentagon.com
*
* - "MABUHAY ang PILIPINAS!!!" -
*
* Version History :
*
* 1.00 - 1.20 : See Text Fader 1.2 - http://members.tripod.com/~halos/
* 1.30 : Practically rewrote the whole script.
* Surprised that it's longer than the
* last however, the starting color and
* ending color can now be defined
* independently. (see SYNTAX below)
* Tested with NS 4.06 and IE 4 (win98)
* Unfortunately, due to some webTV limits
* it will not work with them
*
* This script is begware
*
* END OF COPYRIGHT
*/
var s1, s2, s3, s2r, s2g, s2b, smallest;
function hexToDec(hex) { var value=0; while (true) { if (convert[value] == hex) break; value++; } return value; }
function writeOn(obj, str) {
if (layers) with (document[obj]) {
document.open();
document.write(str);
document.close();
}
if (style) {
eval(obj+'.innerHTML= str');
}
}
function changeColor(obj, str, rgb1, speed, counter) {
if (counter < smallest) {
stopClock();
if (layers) with (document[obj]) { document.open(); document.linkColor = rgb1; document.fgColor = rgb1; document.write(str); document.close(); }
if (style) { eval(obj+'.document.linkColor= rgb1');
eval(obj+'.innerHTML= "<font color="+rgb1+">"+str+"<\/font>"');
// eval(layerRef + '["'+obj+'"]' + styleRef + '.color= rgb1');
}
s2r+=s1; s2g+=s2; s2b+=s3;
tempR = Math.round(s2r); tempG = Math.round(s2g); tempB = Math.round(s2b);
if (tempR <= 0) tempR = 0; if (tempG <= 0) tempG = 0; if (tempB <= 0) tempB = 0;
if (tempR >= 255) tempR = 255; if (tempG >= 255) tempG = 255; if (tempB >= 255) tempB = 255;
rgb1 = convert[tempR] + convert[tempG] + convert[tempB];
counter++;
timerID = setTimeout('changeColor("'+obj+'", "'+str+'", "'+rgb1+'", '+speed+', '+counter+')', speed);
timerRunning = true;
}
}
function fadeText(obj, str, rgb1, rgb2, speed, step) {
var r1, g1, b1, r2, g2, b2;
for (cnt=1; cnt<=2; cnt++) {
eval('r'+cnt+' = hexToDec(rgb'+cnt+'.slice(0,2));');
eval('g'+cnt+' = hexToDec(rgb'+cnt+'.slice(2,4));');
eval('b'+cnt+' = hexToDec(rgb'+cnt+'.slice(4,6));');
}
with (Math) {
s2r = r1; s2g = g1; s2b = b1;
s1 = abs(r1 - r2); s2 = abs(g1 - g2); s3 = abs(b1 - b2);
if (s1 > s2 && s1 > s3) { smallest = s1; } else if (s2 > s1 && s2 > s3) { smallest = s2; } else { smallest = s3; }
s1 = (s1 == 0) ? 0 : s1/smallest; s2 = (s2 == 0) ? 0 : s2/smallest; s3 = (s3 == 0) ? 0 : s3/smallest;
s1*=step; s2*=step; s3*=step;
if (r1 > r2) { s1 = -s1; } if (g1 > g2) { s2 = -s2; } if (b1 > b2) { s3 = -s3; }
smallest= Math.round(smallest/step);
}
if (both) { changeColor(obj, str, rgb1, speed, 0); } else { document.write("Err. for some reason you tried viewing this page with a browser that doesn`t support javascript/CSS block support"); }
}
/* END HIGHLIGHT */
function getMid() { tvAgent = navigator.userAgent; if (layers) { maxX = innerHeight; maxY = innerHeight; } if (style) { maxX = document.body.clientWidth; maxY = document.body.clientHeight; } if (tvAgent.indexOf("WebTV") != -1) { maxX = 544; maxY = 378; } midX = maxX/2; midY = maxY/2; }
function layout() { getMid(); moveLayer('fadeMe01', midY-50, midX-200);
/* fadeText SYNTAX
*
* fadeText(layerName, message, startFade(RRGGBB), endFade(RRGGBB), speed, step);
*
*/
fadeText("fadeMe01", "<span class=content><b><a href=mailto:agent_teg@ThePentagon.com?subject=Text%20Fader%201.3>Teg WoRKz</a></b> Interactive</span><div class=small>proudly presents</div>", "000000", "CCCCCC", 10, 2);
setTimeout('fadeText("fadeMe01", "<span class=content><b>Teg WoRKz</b> Interactive</span><div class=small>proudly presents</div>", "CCCCCC", "000000", 10, 4)',8000);
setTimeout('fadeText("fadeMe01", "<div class=small>A</div><span class=content><b>Teg WoRKz</b> Production</span>", "000000", "CCCCFF", 10, 2)',12000);
setTimeout('fadeText("fadeMe01", "<div class=small>A</div><span class=content><b><a href=mailto:agent_teg@ThePentagon.com?subject=Text%20Fader%201.3>Teg WoRKz</a></b> Production</span>", "CCCCFF", "000000", 10, 4)',20000);
setTimeout('fadeText("fadeMe01", "<span class=content><b>TeXT FaDeR 1.3</b></span>", "000000", "CCCCFF", 10, 4)',26000);
setTimeout('fadeText("fadeMe01", "<span class=content>THe ReWRiTTeN VeRSioN</span>", "000000", "9999FF", 10, 4)',32000);
setTimeout('fadeText("fadeMe01", "<span class=content><b>TeXT FaDeR 1.3</b></span>", "CCCCFF", "FF0000", 10, 4)',36000);
setTimeout('fadeText("fadeMe01", "<span class=content>THe ReWRiTTeN VeRSioN</span>", "9999FF", "99FF33", 10, 4)',40000);
setTimeout('fadeText("fadeMe01", "<span class=content>THe ReWRiTTeN VeRSioN</span>", "99FF33", "CCCCCC", 10, 4)',44000);
setTimeout('fadeText("fadeMe01", "<span class=content>THe ReWRiTTeN VeRSioN</span>", "CCCCCC", "000000", 10, 4)',48000);
setTimeout('fadeText("fadeMe01", "<span class=small>this script is provided as if without support or warranty of any kind. i will not be held liable by any damage that this script might cause. COPYRIGHT<sup>©</sup> 1998. <a href=mailto:agent_teg@ThePentagon.com?subject=Text%20Fader%201.3>Teg Workz</a></span><div class=small>open this page with a text editor to view the syntax command.</div>", "000000", "CCCCCC", 10, 4)',52000);
setTimeout('fadeText("fadeMe01", "<span class=content><b>Mabuhay</b> ang <b>PILIPINAS</b>!!!</div>", "000000", "FF0000", 10, 4)',57500);
}
// -->
</script>
</HEAD>
<BODY BGCOLOR="#000000" text="#CCCCCC" link="#FFFFFF" vlink="#FFFFFF" onload="layout()">
<div id=fadeMe01></div>
<noscript>
Silly! you'll need to have javascript enabled and
you must have <a href="http://www.microsoft.com/">internet explorer 4</a> or <a href="http://developer.netscape.com">netscape navagitor 4</a>
for this script to work.
</noscript>
</BODY>
</HTML>
