JS.. Hjælp!
Hej.. Jeg har fundet dette script:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><head>
<style type="text/css"><!-- A { text-decoration:none } //--></style>
<script language="javascript"><!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
browser = "NotOk";
previous=0;
// Detect if Netscape or MSIE version is ok
if (browserName == "Netscape" && browserVer >= 3) { browser = "ok"}
if (browserName == "Microsoft Internet Explorer" && browserVer >= 4 && browserVer < 4.99) { browser = "ok"}
if (browserName == "Microsoft Internet Explorer" && browserVer >= 5) {
if (screen.width > 800) { window.location = 'index.htm' }
}
// Initialize your images
if (browser == "ok") {
eye01 = new Image(); eye01.src = "blue.gif";
eye02 = new Image(); eye02.src = "blue.gif";
eye03 = new Image(); eye03.src = "blue.gif";
img01 = new Image(); img01.src = "blue.gif";
img02 = new Image(); img02.src = "blue.gif";
img03 = new Image(); img03.src = "blue.gif";
img04 = new Image(); img04.src = "blue.gif";
bt01 = new Image(); bt01.src = "d.gif";
bt02 = new Image(); bt02.src = "e.gif";
bt03 = new Image(); bt03.src = "f.gif";
bt04 = new Image(); bt04.src = "e.gif";
bt05 = new Image(); bt05.src = "k.gif";
bt06 = new Image(); bt06.src = "t.gif";
bt07 = new Image(); bt07.src = "!.gif";
txtBlank = new Image(); txtBlank.src = "blue.gif"
txt01a = new Image(); txt01a.src = "d33.gif";
txt01b = new Image(); txt01b.src = "d222.gif";
txt01c = new Image(); txt01c.src = "d11.gif";
txt02a = new Image(); txt02a.src = "";
txt02b = new Image(); txt02b.src = "";
txt02c = new Image(); txt02c.src = "";
txt03a = new Image(); txt03a.src = "";
txt03b = new Image(); txt03b.src = "";
txt03c = new Image(); txt03c.src = "";
txt04a = new Image(); txt04a.src = "";
txt04b = new Image(); txt04b.src = "";
txt04c = new Image(); txt04c.src = "";
txt05a = new Image(); txt05a.src = "";
txt05b = new Image(); txt05b.src = "";
txt05c = new Image(); txt05c.src = "";
txt06a = new Image(); txt06a.src = "";
txt06b = new Image(); txt06b.src = "";
txt06c = new Image(); txt06c.src = "";
txt07a = new Image(); txt07a.src = "";
txt07b = new Image(); txt07b.src = "";
txt07c = new Image(); txt07c.src = "";
blk = new Image(); blk.src = "http://www.enregy.dk/blue.gif";
}
//640 normal res
var Xorigin = 293; var Yorigin = 154; var OrbitSize = 150;
if (document.all) { Xorigin = 282; Yorigin = 154;}
//Adjustment to 1024 res
if (document.layers && screen.width == 1024) { Xorigin = 293; Yorigin = 154; }
Count = 0; Count2 = 0.9; Count3 = 1.8;
Count4 = 2.7; Count5 = 3.6; Count6 = 4.5;Count7 = 5.4;
SpeedAdj = 0.009;
function Spin() {
if (OrbitSize != 120) { OrbitSize = OrbitSize - 2 }
Count = Count + SpeedAdj;
Count2= Count2 + SpeedAdj;
Count3= Count3 + SpeedAdj;
Count4= Count4 + SpeedAdj;
Count5= Count5 + SpeedAdj;
Count6= Count6 + SpeedAdj;
Count7= Count7 + SpeedAdj;
Xpoint = Xorigin + (OrbitSize*Math.sin(Count)); Ypoint = Yorigin + (OrbitSize*Math.cos(Count));
Xpoint2 = Xorigin + (OrbitSize*Math.sin(Count2));Ypoint2 = Yorigin + (OrbitSize*Math.cos(Count2));
Xpoint3 = Xorigin + (OrbitSize*Math.sin(Count3));Ypoint3 = Yorigin + (OrbitSize*Math.cos(Count3));
Xpoint4 = Xorigin + (OrbitSize*Math.sin(Count4));Ypoint4 = Yorigin + (OrbitSize*Math.cos(Count4));
Xpoint5 = Xorigin + (OrbitSize*Math.sin(Count5));Ypoint5 = Yorigin + (OrbitSize*Math.cos(Count5));
Xpoint6 = Xorigin + (OrbitSize*Math.sin(Count6));Ypoint6 = Yorigin + (OrbitSize*Math.cos(Count6));
Xpoint7 = Xorigin + (OrbitSize*Math.sin(Count7));Ypoint7 = Yorigin + (OrbitSize*Math.cos(Count7));
document.Ball01.left = Xpoint; document.Ball01.top = Ypoint;
document.Ball02.left = Xpoint2; document.Ball02.top = Ypoint2;
document.Ball03.left = Xpoint3;document.Ball03.top = Ypoint3;
document.Ball04.left = Xpoint4;document.Ball04.top = Ypoint4;
document.Ball05.left = Xpoint5;document.Ball05.top = Ypoint5;
document.Ball06.left = Xpoint6;document.Ball06.top = Ypoint6;
document.Ball07.left = Xpoint7;document.Ball07.top = Ypoint7;
if (Count == 6.30) { Count = 0; }
if (Count2 == 6.30) { Count2 = 0; }
if (Count3 == 6.30) { Count3 = 0; }
if (Count4 == 6.30) { Count4 = 0; }
if (Count5 == 6.30) { Count5 = 0; }
if (Count6 == 6.30) { Count6 = 0; }
if (Count7 == 6.30) { Count7 = 0; }
setTimeout('Spin()',20);}
function OpenEye() {
if (document.layers) {
document.e.document.eyeimg.src = eye02.src;
setTimeout('document.e.document.eyeimg.src = eye01.src',50);
}
if (document.all) {
document.eyeimg.src = eye02.src;
setTimeout('document.eyeimg.src = eye01.src',50);
}
}
var Blinking = 0;
function Blink() {
Blinking = 1;
if (document.layers) {
document.e.document.eyeimg.src = eye02.src;
setTimeout('document.e.document.eyeimg.src = eye03.src',50);
setTimeout('document.e.document.eyeimg.src = eye02.src',100);
setTimeout('document.e.document.eyeimg.src = eye01.src',150);
}
if (document.all) {
document.eyeimg.src = eye02.src;
setTimeout('document.eyeimg.src = eye03.src',50);
setTimeout('document.eyeimg.src = eye02.src',100);
setTimeout('document.eyeimg.src = eye01.src',150);
}
setTimeout('Blinking = 0',200);
}
function Blink2() {
Blinking = 1;
if (document.layers) {
document.e.document.eyeimg.src = eye02.src;
setTimeout('document.e.document.eyeimg.src = eye03.src',50);
setTimeout('document.e.document.eyeimg.src = eye02.src',150);
setTimeout('document.e.document.eyeimg.src = eye01.src',200);
setTimeout('document.e.document.eyeimg.src = eye02.src',300);
setTimeout('document.e.document.eyeimg.src = eye03.src',350);
setTimeout('document.e.document.eyeimg.src = eye02.src',400);
setTimeout('document.e.document.eyeimg.src = eye01.src',450);
}
if (document.all) {
document.eyeimg.src = eye02.src;
setTimeout('document.eyeimg.src = eye03.src',50);
setTimeout('document.eyeimg.src = eye02.src',150);
setTimeout('document.eyeimg.src = eye01.src',200);
setTimeout('document.eyeimg.src = eye02.src',300);
setTimeout('document.eyeimg.src = eye03.src',350);
setTimeout('document.eyeimg.src = eye02.src',400);
setTimeout('document.eyeimg.src = eye01.src',450);
}
setTimeout('Blinking = 0',500);
}
function FadeInButtons() {
document.Ball01.document.bimg01.src = img02.src;
setTimeout('document.Ball01.document.bimg01.src = img03.src',50);
setTimeout('document.Ball01.document.bimg01.src = img04.src',100);
setTimeout('document.Ball01.document.bimg01.src = bt01.src',150);
setTimeout('document.Ball02.document.bimg02.src = img02.src',200);
setTimeout('document.Ball02.document.bimg02.src = img03.src',250);
setTimeout('document.Ball02.document.bimg02.src = img04.src',300);
setTimeout('document.Ball02.document.bimg02.src = bt02.src',350);
setTimeout('document.Ball03.document.bimg03.src = img02.src',400);
setTimeout('document.Ball03.document.bimg03.src = img03.src',450);
setTimeout('document.Ball03.document.bimg03.src = img04.src',500);
setTimeout('document.Ball03.document.bimg03.src = bt03.src',550);
setTimeout('document.Ball04.document.bimg04.src = img02.src',600);
setTimeout('document.Ball04.document.bimg04.src = img03.src',650);
setTimeout('document.Ball04.document.bimg04.src = img04.src',700);
setTimeout('document.Ball04.document.bimg04.src = bt04.src',750);
setTimeout('document.Ball05.document.bimg05.src = img02.src',800);
setTimeout('document.Ball05.document.bimg05.src = img03.src',850);
setTimeout('document.Ball05.document.bimg05.src = img04.src',900);
setTimeout('document.Ball05.document.bimg05.src = bt05.src',950);
setTimeout('document.Ball06.document.bimg06.src = img02.src',1000);
setTimeout('document.Ball06.document.bimg06.src = img03.src',1050);
setTimeout('document.Ball06.document.bimg06.src = img04.src',1100);
setTimeout('document.Ball06.document.bimg06.src = bt06.src',1150);
setTimeout('document.Ball07.document.bimg07.src = img02.src',1200);
setTimeout('document.Ball07.document.bimg07.src = img03.src',1250);
setTimeout('document.Ball07.document.bimg07.src = img04.src',1300);
setTimeout('document.Ball07.document.bimg07.src = bt07.src',1350);
}
function FadeInButtonsIE() {
document.bimg01.src = img02.src;
setTimeout('document.bimg01.src = img03.src',50);
setTimeout('document.bimg01.src = img04.src',100);
setTimeout('document.bimg01.src = bt01.src',150);
setTimeout('document.bimg02.src = img02.src',200);
setTimeout('document.bimg02.src = img03.src',250);
setTimeout('document.bimg02.src = img04.src',300);
setTimeout('document.bimg02.src = bt02.src',350);
setTimeout('document.bimg03.src = img02.src',400);
setTimeout('document.bimg03.src = img03.src',450);
setTimeout('document.bimg03.src = img04.src',500);
setTimeout('document.bimg03.src = bt03.src',550);
setTimeout('document.bimg04.src = img02.src',600);
setTimeout('document.bimg04.src = img03.src',650);
setTimeout('document.bimg04.src = img04.src',700);
setTimeout('document.bimg04.src = bt04.src',750);
setTimeout('document.bimg05.src = img02.src',800);
setTimeout('document.bimg05.src = img03.src',850);
setTimeout('document.bimg05.src = img04.src',900);
setTimeout('document.bimg05.src = bt05.src',950);
setTimeout('document.bimg06.src = img02.src',1000);
setTimeout('document.bimg06.src = img03.src',1050);
setTimeout('document.bimg06.src = img04.src',1100);
setTimeout('document.bimg06.src = bt06.src',1150);
setTimeout('document.bimg07.src = img02.src',1200);
setTimeout('document.bimg07.src = img03.src',1250);
setTimeout('document.bimg07.src = img04.src',1300);
setTimeout('document.bimg07.src = bt07.src',1350);
}
function RunAnimation(){
if (document.layers) {
document.Ball01.visibility = 'show';
document.Ball02.visibility = 'show';
document.Ball03.visibility = 'show';
document.Ball04.visibility = 'show';
document.Ball05.visibility = 'show';
document.Ball06.visibility = 'show';
document.Ball07.visibility = 'show';
FadeInButtons();
setTimeout('TextIn()',1400);
setTimeout('OpenEye()',2550);
}
if (document.all) {
document.Ball01.visibility = 'visible';
document.Ball02.visibility = 'visible';
document.Ball03.visibility = 'visible';
document.Ball04.visibility = 'visible';
document.Ball05.visibility = 'visible';
document.Ball06.visibility = 'visible';
document.Ball07.visibility = 'visible';
FadeInButtonsIE();
setTimeout('TextInIE()',1400);
setTimeout('OpenEye()',2750);
}
setTimeout('Spin()',1400);
}
function AssignIELayers(){
if (document.all) {
document.Ball01 = document.all.Ball01.style ;
document.Ball02 = document.all.Ball02.style ;
document.Ball03 = document.all.Ball03.style ;
document.Ball04 = document.all.Ball04.style ;
document.Ball05 = document.all.Ball05.style ;
document.Ball06 = document.all.Ball06.style ;
document.Ball07 = document.all.Ball07.style ;
document.Ball01.left = 286;
document.Ball02.left = 406;
document.Ball03.left = 437;
document.Ball04.left = 351;
document.Ball05.left = 214;
document.Ball06.left = 129;
document.Ball07.left = 163;
Txt01 = document.all.txt01.style ;
Txt02 = document.all.txt02.style ;
Txt03 = document.all.txt03.style ;
}}
if (document.all) {
Txt01Left = 137;
Txt02Left = 374;
Txt03Top = 380; }
function TextIn() {
if (document.txt01.visibility == 'hide') {
document.txt01.visibility = 'show';
document.txt02.visibility = 'show';
document.txt03.visibility = 'show'; }
document.txt01.left += 4; document.txt02.left -= 4; document.txt03.top -= 2;
if (document.txt01.left < 194) { setTimeout('TextIn()',10) }
}
function TextInIE() {
if (Txt01.visibility == 'hidden') {
Txt01.visibility = "visible";
Txt02.visibility = "visible";
Txt03.visibility = "visible"; }
Txt01Left += 4; Txt02Left -= 4; Txt03Top -= 2;
Txt01.left = Txt01Left; Txt02.left = Txt02Left; Txt03.top = Txt03Top;
if (Txt01Left < 190) { setTimeout('TextInIE()',10) }
}
function BlinkNow(){
var Select = 0;
Select = Math.round(Math.random(1)*(4));
if (Blinking == 0) {
if (Select <= 1) {Blink2()}
if (Select >= 2) {Blink()}
}}
function AdjustVertical1024(){
if (document.layers) {
Yorigin += 70;
document.Ball01.top += 70;
document.Ball02.top += 70;
document.Ball03.top += 70;
document.Ball04.top += 70;
document.Ball05.top += 70;
document.Ball06.top += 70;
document.Ball07.top += 70;
document.txt01.top += 70;
document.txt02.top += 70;
document.txt03.top += 70;
document.txtLink.top += 70;
document.e.top += 70; }
if (document.all) {
Yorigin += 82;
document.Ball01.top = 390;
document.Ball02.top = 330;
document.Ball03.top = 196;
document.Ball04.top = 89;
document.Ball05.top = 90;
document.Ball06.top = 198;
document.Ball07.top = 330;
Txt01.top = 400;
Txt02.top = 400;
Txt03.top = 446;
Txt03Top = 446;
document.all.txtLink.style.top = 380;
document.all.e.style.top = 140; }
}
function AdjustVertical1280(){
if (document.layers) {
Yorigin += 200;
document.Ball01.top += 200;
document.Ball02.top += 200;
document.Ball03.top += 200;
document.Ball04.top += 200;
document.Ball05.top += 200;
document.Ball06.top += 200;
document.Ball07.top += 200;
document.txt01.top += 200;
document.txt02.top += 200;
document.txt03.top += 200;
document.txtLink.top += 200;
document.e.top += 200; }
if (document.all) {
Yorigin += 200;
document.Ball01.top = 520;
document.Ball02.top = 460;
document.Ball03.top = 326;
document.Ball04.top = 219;
document.Ball05.top = 220;
document.Ball06.top = 328;
document.Ball07.top = 462;
Txt01.top = 530;
Txt02.top = 530;
Txt03.top = 576;
Txt03Top = 576;
document.all.txtLink.style.top = 510;
document.all.e.style.top = 258; }
}
function Initialize(){
if (document.all) { document.award.src = blk.src }
if (document.all) { document.award2.src = blk.src }
if (document.layers) { document.e.document.award.src = blk.src }
if (document.layers) { document.e.document.award2.src = blk.src }
AssignIELayers()
if (screen.width == 1024) { AdjustVertical1024() }
if (screen.width == 1280) { AdjustVertical1280() }
setTimeout('RunAnimation()',300);
}
function Text(option,text) {
if (document.layers) { TextImage = document.txtLink.document.spc }
if (document.all) { TextImage = document.spc }
if (option == 'show') {
if (text == '01') { TextImage.src = txt01a.src; setTimeout('TextImage.src = txt01b.src',50); setTimeout('TextImage.src = txt01c.src',100); }
if (text == '02') { TextImage.src = txt02a.src; setTimeout('TextImage.src = txt02b.src',50); setTimeout('TextImage.src = txt02c.src',100); }
if (text == '03') { TextImage.src = txt03a.src; setTimeout('TextImage.src = txt03b.src',50); setTimeout('TextImage.src = txt03c.src',100); }
if (text == '04') { TextImage.src = txt04a.src; setTimeout('TextImage.src = txt04b.src',50); setTimeout('TextImage.src = txt04c.src',100); }
if (text == '05') { TextImage.src = txt05a.src; setTimeout('TextImage.src = txt05b.src',50); setTimeout('TextImage.src = txt05c.src',100); }
if (text == '06') { TextImage.src = txt06a.src; setTimeout('TextImage.src = txt06b.src',50); setTimeout('TextImage.src = txt06c.src',100); }
if (text == '07') { TextImage.src = txt07a.src; setTimeout('TextImage.src = txt07b.src',50); setTimeout('TextImage.src = txt07c.src',100); }
}
if (option == 'hide') {
if (text == '01') { TextImage.src = txt01b.src; setTimeout('TextImage.src = txt01a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '02') { TextImage.src = txt02b.src; setTimeout('TextImage.src = txt02a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '03') { TextImage.src = txt03b.src; setTimeout('TextImage.src = txt03a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '04') { TextImage.src = txt04b.src; setTimeout('TextImage.src = txt04a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '05') { TextImage.src = txt05b.src; setTimeout('TextImage.src = txt05a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '06') { TextImage.src = txt06b.src; setTimeout('TextImage.src = txt06a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
if (text == '07') { TextImage.src = txt07b.src; setTimeout('TextImage.src = txt07a.src',50); setTimeout('TextImage.src = txtBlank.src',100); }
}
}
//--></script>
</head>
<BODY text=white link=#D4B878 vlink=#D4B878 bgcolor=#000000 onload="Initialize()" background="blue.gif">
<center>
<br><br><br>
<div id="e" style="position:absolute; left:197; top:58; width:110; visibility:visible">
<table border=0 cellpadding=0 cellspacing=0><tr>
<td><img src=blue.gif border=0 width=78 height=219><br></td>
<td><a href="" onmouseover="window.status='¨';return true">
<img name="eyeimg" src=blue.gif border=0 width=63 height=219><br></a></td>
<td><img src=blue.gif border=0 width=78 height=219><br></td>
</tr><tr><td colspan=3 align=center>
<br>
<br>
<img name="spc" src=blue.gif border=0 width="136" height="12"><br>
<table border=0 cellspacing=15><tr><td>
<br></a>
</td><td>
<br></a>
</td></tr></table>
</td></tr>
</table>
</div>
<br>
<div id="txtLink" style="position:absolute; left:251; top:317; width:110; visibility:visible">
</div>
<div id="txt01" style="position:absolute; left:141; top:330; width:122; visibility:hidden; height:12">
<b><br><font face="arial" size="2">w e l c o m e t o</font></b></div>
<div id="txt02" style="position:absolute; left:378; top:330; width:127; visibility:hidden; height:16">
<b><br><font face="arial" size="2">m y u n i v e r s</font></b></div>
<div id="txt03" style="position:absolute; left:170; top:400; width:270; visibility:hidden">
<br>
<font face=Verdana size=1 color=#CECECE><center>.. here is everything deFekt..</font><font face=arial size=1 color=4e3f23><br>
</center></font></div>
<div id="Ball01" style="position:absolute; left:295; top:320; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','01');window.status=' ';return true" onmouseout="Text('hide','01');window.status='';return true;">
<img name=bimg01 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball02" style="position:absolute; left:417; top:260; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','02');window.status='';return true" onmouseout="Text('hide','02');window.status='';return true">
<img name=bimg02 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball03" style="position:absolute; left:448; top:126; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','03');window.status='';return true" onmouseout="Text('hide','03');window.status='';return true">
<img name=bimg03 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball04" style="position:absolute; left:362; top:19; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','04');window.status='';return true" onmouseout="Text('hide','04');window.status='';return true">
<img name=bimg04 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball05" style="position:absolute; left:225; top:20; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','06');window.status='';return true" onmouseout="Text('hide','06');window.status='';return true">
<img name=bimg05 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball06" style="position:absolute; left:140; top:128; width:50; visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','05');window.status='';return true" onmouseout="Text('hide','05');window.status='';return true" >
<img name=bimg06 src=blue.gif border=0 width="40" height="31"><br></a></div>
<div id="Ball07" style="position:absolute; left:174; top:262; width:50;visibility:hide">
<a href="" target=_top onmouseover="BlinkNow();Text('show','07');window.status='';return true" onmouseout="Text('hide','07');window.status='';return true">
<img name=bimg07 src=blue.gif border=0 width="40" height="31"><br></a></div>
</center>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
<font face=arial size=1 color=4e3f23>
<img name="award2" src="award2.gif" border=0 width=58 height=41 alt=""></a></font></p>
<p>
</a></p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
<img name="award" src="logog.gif" border=0 width=55 height=59 alt=""></p>
<p>
</p>
<p>
</p>
</BODY></HTML>
Jeg vil gerne have venstre justeret HELE scriptet! Så scriptet køre i venstre side frem for på midten.. Jeg har forsøgt at ændre lidt i den der hedder left:xxx men det har ikke hjulpet det store...
Chr..