Someone wrote this script for me a while ago. It worked fine untill a couple weeks ago. If you view the picture the script makes you'll notice that the first Sara Creations is too big.
Can anyone fix this? I emailed the guy who wrote it but he never got back to me. Here is the script:
<html>
<head>
<title>
Sara Creations
</title>
<style type="text/css">
<!--
span.v { font-weight:normal; visibility:hidden; position:relative; }
.sh { position:absolute; top:0; left:0; visibility:hidden; font-family:Arial Narrow, Sans-Serif; font-size:78px; }
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
// Browser detection
var ns4=((navigator.appName=="Netscape"&&(document.layers))?1:0;
var ns6=((navigator.appName=="Netscape"&&(document.getElementById))?1:0;
var ie4=(document.all)?1:0;
// wt = browser width, ht = browser height, st = timeout used later, mi = middle, sh = shadows showing
var wt, ht, st, mi, sh=0;
// Cross-browser variables
var vis = (ns4)?"show":"visible";
var hid = (ns4)?"hide":"hidden";
// Get everything in the right place
function measure()
{
if(ie4)
{
wt=document.body.clientWidth;
ht=document.body.clientHeight;
}
if(ns4||ns6)
{
wt=window.innerWidth;
ht=window.innerHeight;
}
var r = getObj("right_name", l = getObj("left_name"
r.left = wt-390; // Mess around with -390 if you use a different font / font size
r.top = parseInt(ht/2);
r.visibility = vis;
l.top = parseInt(ht/2);
l.visibility = vis;
mi = parseInt(wt/2)-200;
for(var i=2; i<16; i+=2)
{
var shadow_now = getObj("shadow_"+(i/2));
shadow_now.top = parseInt(ht/2)+i+2;
shadow_now.left = mi+i+4;
}
}
// Global function for getting the objects (cross-browser)
function getObj(obj)
{
return ( (ie4) ? document.all[obj].style : (ns4) ? document.layers[obj] : (ns6)? document.getElementById(obj).style : false );
}
// Moves text to the centre
function move_one()
{
var l=getObj("left_name", r=getObj("right_name"
if(parseInt(l.left) < mi)
{
l.left = parseInt(l.left)+7;
r.left = parseInt(r.left)-7;
}
else
{
clearInterval(st);
st = setInterval("show_shadows()",100);
}
}
function show_shadows()
{
if(sh++ < 7)
{
getObj("shadow_"+sh).visibility=vis;
}
else
{
clearInterval(st);
}
}
// -->
</script>
</head>
<body onload="measure(); st=setInterval('move_one()',10)" scroll="no">
<div id="shadow_7" class="sh">
<font color="yellow">
Sara Creations
</font>
</div>
<div id="shadow_6" class="sh">
<font color="orange">
Sara Creations
</font>
</div>
<div id="shadow_5" class="sh">
<font color="red">
Sara Creations
</font>
</div>
<div id="shadow_4" class="sh">
<font color="violet">
Sara Creations
</font>
</div>
<div id="shadow_3" class="sh">
<font color="navy">
Sara Creations
</font>
</div>
<div id="shadow_2" class="sh">
<font color="indigo">
Sara Creations
</font>
</div>
<div id="shadow_1" class="sh">
<font color="purple">
Sara Creations
</font>
</div>
<div id="left_name" class="sh" style="top:0; left:0">
S
<span class="v">
a
</span>
r
<span class="v">
a
</span>
C
<span class="v">
r
</span>
e
<span class="v">
a
</span>
t
<span class="v">
i
</span>
o
<span class="v">
n
</span>
s
</div>
<div id="right_name" class="sh" style="top:0; left:0">
<span class="v">
S
</span>
a
<span class="v">
r
</span>
a
<span class="v">
C
</span>
r
<span class="v">
e
</span>
a
<span class="v">
t
</span>
i
<span class="v">
o
</span>
n
</div>
<p align="center">
<strong>
<font face="Arial">
<big>
Please wait 5 seconds...
</big>
</font>
</strong>
</p>
<script>
/*
Count down then redirect script 2
By William Kemper (kemperwilliam@hotmail.com)
For this script and more, visit */
//specify redirect url
var redirecturl="home.html"
//specify pause duration before redirection (in seconds)
var pausefor=5
//DONE EDITING
function postaction(){
if (window.timer){
clearInterval(timer)
clearInterval(timer_2)
}
window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
</script>
<!--[if IE]>
<script language="JavaScript1.2">
<!--
// this script was originally authored by william kemper. I have no homepage.
var switchm=new Array
switchm[0]="ffaa00";
switchm[1]="ffff00";
switchm[2]="00ff00";
switchm[3]="0099ff";
switchm[4]="ff0000";
switchm[5]="ff00ff";
// if you want to add more colors go ahead, all the for limits are based on array length so
// you shouldn't need to change any of the code, just add more colors.
i=0
j=0
function STROBE()
{
if (j>increment.length-1)
{
j=0
i++
if (i>switchm.length-1)
{
i=0
}
}
document.all.increment[j].filters.blendTrans.apply()
document.all.increment[j].bgColor=switchm
document.all.increment[j].filters.blendTrans.play()
j++
}
timer=setInterval("STROBE()",20) // change the number to effect the speed of the loadbar.
timer_2=setInterval("REVEAL()",20)
function REVEAL()
{
if (document.images[0].complete)
{
clearInterval(timer)
clearInterval(timer_2)
document.all.loadbar.style.visibility="hidden";
document.all.content.style.visibility="visible";
}
}
// i don't know how to put comments in the css, but change duration to effect the speed of the fade effect.
//-->
</body>
</html>
Can anyone fix this? I emailed the guy who wrote it but he never got back to me. Here is the script:
<html>
<head>
<title>
Sara Creations
</title>
<style type="text/css">
<!--
span.v { font-weight:normal; visibility:hidden; position:relative; }
.sh { position:absolute; top:0; left:0; visibility:hidden; font-family:Arial Narrow, Sans-Serif; font-size:78px; }
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
// Browser detection
var ns4=((navigator.appName=="Netscape"&&(document.layers))?1:0;
var ns6=((navigator.appName=="Netscape"&&(document.getElementById))?1:0;
var ie4=(document.all)?1:0;
// wt = browser width, ht = browser height, st = timeout used later, mi = middle, sh = shadows showing
var wt, ht, st, mi, sh=0;
// Cross-browser variables
var vis = (ns4)?"show":"visible";
var hid = (ns4)?"hide":"hidden";
// Get everything in the right place
function measure()
{
if(ie4)
{
wt=document.body.clientWidth;
ht=document.body.clientHeight;
}
if(ns4||ns6)
{
wt=window.innerWidth;
ht=window.innerHeight;
}
var r = getObj("right_name", l = getObj("left_name"
r.left = wt-390; // Mess around with -390 if you use a different font / font size
r.top = parseInt(ht/2);
r.visibility = vis;
l.top = parseInt(ht/2);
l.visibility = vis;
mi = parseInt(wt/2)-200;
for(var i=2; i<16; i+=2)
{
var shadow_now = getObj("shadow_"+(i/2));
shadow_now.top = parseInt(ht/2)+i+2;
shadow_now.left = mi+i+4;
}
}
// Global function for getting the objects (cross-browser)
function getObj(obj)
{
return ( (ie4) ? document.all[obj].style : (ns4) ? document.layers[obj] : (ns6)? document.getElementById(obj).style : false );
}
// Moves text to the centre
function move_one()
{
var l=getObj("left_name", r=getObj("right_name"
if(parseInt(l.left) < mi)
{
l.left = parseInt(l.left)+7;
r.left = parseInt(r.left)-7;
}
else
{
clearInterval(st);
st = setInterval("show_shadows()",100);
}
}
function show_shadows()
{
if(sh++ < 7)
{
getObj("shadow_"+sh).visibility=vis;
}
else
{
clearInterval(st);
}
}
// -->
</script>
</head>
<body onload="measure(); st=setInterval('move_one()',10)" scroll="no">
<div id="shadow_7" class="sh">
<font color="yellow">
Sara Creations
</font>
</div>
<div id="shadow_6" class="sh">
<font color="orange">
Sara Creations
</font>
</div>
<div id="shadow_5" class="sh">
<font color="red">
Sara Creations
</font>
</div>
<div id="shadow_4" class="sh">
<font color="violet">
Sara Creations
</font>
</div>
<div id="shadow_3" class="sh">
<font color="navy">
Sara Creations
</font>
</div>
<div id="shadow_2" class="sh">
<font color="indigo">
Sara Creations
</font>
</div>
<div id="shadow_1" class="sh">
<font color="purple">
Sara Creations
</font>
</div>
<div id="left_name" class="sh" style="top:0; left:0">
S
<span class="v">
a
</span>
r
<span class="v">
a
</span>
C
<span class="v">
r
</span>
e
<span class="v">
a
</span>
t
<span class="v">
i
</span>
o
<span class="v">
n
</span>
s
</div>
<div id="right_name" class="sh" style="top:0; left:0">
<span class="v">
S
</span>
a
<span class="v">
r
</span>
a
<span class="v">
C
</span>
r
<span class="v">
e
</span>
a
<span class="v">
t
</span>
i
<span class="v">
o
</span>
n
</div>
<p align="center">
<strong>
<font face="Arial">
<big>
Please wait 5 seconds...
</big>
</font>
</strong>
</p>
<script>
/*
Count down then redirect script 2
By William Kemper (kemperwilliam@hotmail.com)
For this script and more, visit */
//specify redirect url
var redirecturl="home.html"
//specify pause duration before redirection (in seconds)
var pausefor=5
//DONE EDITING
function postaction(){
if (window.timer){
clearInterval(timer)
clearInterval(timer_2)
}
window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
</script>
<!--[if IE]>
<script language="JavaScript1.2">
<!--
// this script was originally authored by william kemper. I have no homepage.
var switchm=new Array
switchm[0]="ffaa00";
switchm[1]="ffff00";
switchm[2]="00ff00";
switchm[3]="0099ff";
switchm[4]="ff0000";
switchm[5]="ff00ff";
// if you want to add more colors go ahead, all the for limits are based on array length so
// you shouldn't need to change any of the code, just add more colors.
i=0
j=0
function STROBE()
{
if (j>increment.length-1)
{
j=0
i++
if (i>switchm.length-1)
{
i=0
}
}
document.all.increment[j].filters.blendTrans.apply()
document.all.increment[j].bgColor=switchm
document.all.increment[j].filters.blendTrans.play()
j++
}
timer=setInterval("STROBE()",20) // change the number to effect the speed of the loadbar.
timer_2=setInterval("REVEAL()",20)
function REVEAL()
{
if (document.images[0].complete)
{
clearInterval(timer)
clearInterval(timer_2)
document.all.loadbar.style.visibility="hidden";
document.all.content.style.visibility="visible";
}
}
// i don't know how to put comments in the css, but change duration to effect the speed of the fade effect.
//-->
</body>
</html>