var firstBg = document.bgColor;
var lightLength = 500;
var lightSpeed = 10000;
var soundSpeed1 = 10;
if (soundSpeed1 < 8)
{
soundSpeed1 = 8;
}
var soundSpeed = soundSpeed1 * 1000;
var lightStart = (Math.random() * lightSpeed);
var thissound = "";
var playThese = "http://www.cgiconnection.com/halloween/sounds/thunder2.mp3,http://www.cgiconnection.com/halloween/sounds/thunder3.mp3";
if (document.layers)
{
document.write('');
}
else if (document.all)
{
document.write('
');
}
else if (document.getElementById)
{
document.write('');
}
function playSong(soundFile)
{
if (soundFile.indexOf(",") > 0)
{
var sounds = soundFile.split(",");
soundFile = sounds[Math.floor(Math.random()*sounds.length)];
}
var newVol = "";
newVol = (Math.random() * 100);
newVol = Math.round(newVol);
var embed_tag = '';
if (document.layers)
{
document.allsongs3.document.write(embed_tag);
document.allsongs3.document.close();
}
else if (document.all)
{
allsongs3.innerHTML = embed_tag;
}
else if (document.getElementById)
{
var newlayer = document.getElementById("allsongs3");
newlayer.innerHTML = embed_tag;
}
var soundSpeed3 = 0;
while (soundSpeed3 <= 8000)
{
soundSpeed3 = (Math.random() * soundSpeed);
}
setTimeout('playSong(playThese)',soundSpeed3);
}
function changeBg() {
var blinkTime = (Math.random() * lightSpeed);
setTimeout('changeIt1()',1);
setTimeout('changeBg()',blinkTime);
}
function changeIt1() {
var blinkTime = (Math.random() * lightLength);
document.bgColor = "#000000";
document.bgColor = "#ffffff";
document.body.style.backgroundColor = "#000000";
setTimeout('changeIt3()',(blinkTime / 2));
setTimeout('changeIt2()',blinkTime);
}
function changeIt2() {
document.bgColor = firstBg;
document.body.style.backgroundColor = firstBg;
}
function changeIt3() {
document.body.style.backgroundColor = "#ffffff";
}
document.write('');
//Rain/Snow effect- By Craig Blanchette Craiga.topcities.com
//Script featured on Dynamic Drive
//Visit http://www.dynamicdrive.com for this script and more
snow = false; // false-rain; true-snow
snowsym = " * "; //These are the symbols for each
rainsym = " ' "; //You can put images here.
howmany = 10; //How many drops/snowflakes?
/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=120; angle=8; drops=howmany;}
else{sym = rainsym; speed=120; drops=howmany; angle=8;}
movex = -speed/angle; movey = speed; count = 0;
function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}
var beginIt = "";
var sLine = "";
var eLine = "";
if (document.getElementById)
{
beginIt = "document.getElementById";
sLine = "(";
eLine = ")";
}
else if (document.all)
{
beginIt = "document.all";
sLine = "[";
eLine = "]";
}
if (beginIt != ""){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array();
ly = beginIt + sLine + "'"; st = "'" + eLine + ".style";
for(make = 0; make < drops; make++){
document.write(''+sym+'
');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
// setTimeout('moverain()',100);
// setTimeout('changeBg()',lightStart);
// setTimeout('playSong(playThese)',lightStart);
}
document.write('');
document.write('');
document.write("
X\
\
\
\
\
\
\
\
Creature Creator 2 will let you display your own ads, text, and even let others
create creatures that link back to your web site for free, viral advertising.\
\
\
\
");
document.write('
');
function closeWincc31151()
{
clearTimeout(ctimercc31151);
if (document.layers)
{
document.layers.cdivncc31151.visibility = "hidden";
}
else if (document.all)
{
document.all.cdivncc31151.style.visibility = "hidden";
}
else if (document.getElementById)
{
document.getElementById("cdivncc31151").style.visibility = "hidden";
}
}
txcc31151 = -280;
tycc31151 = 10;
var hicc31151 = typeof(window.innerWidth) == 'number';
var hecc31151 = document.documentElement && document.documentElement.clientWidth;
var ctimercc31151;
var fmidcc31151='cdivncc31151';
var fmcc31151 =
document.getElementById
? document.getElementById(fmidcc31151)
: document.all
? document.all[fmidcc31151]
: document.layers[fmidcc31151];
var fmsxcc31151, fmsycc31151, fmnxcc31151, fmnycc31151;
function movemcc31151()
{
if (document.layers)
{
fmcc31151.left = fmnxcc31151;
fmcc31151.top = fmnycc31151;
}
else
{
fmcc31151.style.left = fmnxcc31151 + 'px';
fmcc31151.style.top = fmnycc31151 + 'px';
}
}
function cpuscc31151()
{
fmsxcc31151 = hicc31151
? pageXOffset
: hecc31151
? document.documentElement.scrollLeft
: document.body.scrollLeft;
if (txcc31151 < 0)
fmsxcc31151 += hicc31151
? window.innerWidth
: hecc31151
? document.documentElement.clientWidth
: document.body.clientWidth;
fmsycc31151 = hicc31151
? pageYOffset
: hecc31151
? document.documentElement.scrollTop
: document.body.scrollTop;
if (tycc31151 < 0)
fmsycc31151 += hicc31151
? window.innerHeight
: hecc31151
? document.documentElement.clientHeight
: document.body.clientHeight;
}
function flsrcc31151()
{
var step_x, step_y;
cpuscc31151();
step_x = (fmsxcc31151 + txcc31151 - fmnxcc31151) * .07;
if (Math.abs(step_x) < .5) {
step_x = fmsxcc31151 + txcc31151 - fmnxcc31151; }
step_y = (fmsycc31151 + tycc31151 - fmnycc31151) * .07;
if (Math.abs(step_y) < .5) {
step_y = fmsycc31151 + tycc31151 - fmnycc31151; }
if (Math.abs(step_x) > 0 ||
Math.abs(step_y) > 0)
{
fmnxcc31151 += step_x;
fmnycc31151 += step_y;
movemcc31151();
}
ctimercc31151 = setTimeout('flsrcc31151()', 20);
};
cpuscc31151();
if (document.layers)
{
// Netscape 4 cannot perform init move
// when the page loads.
fmnxcc31151 = 0;
fmnycc31151 = 0;
}
else
{
fmnxcc31151 = fmsxcc31151 + txcc31151;
fmnycc31151 = fmsycc31151 + tycc31151;
movemcc31151();
}
flsrcc31151();
/**
** Ghosts - Halloween - JavaScript
** This script and many more are free at
** http://rainbow.arch.scriptmania.com/scripts/
*/
if(!window.Halloween) Halloween=new Object();
Halloween.ghostImages = new Array(
"",
"",
"",
"",
""
);
var ns4 = document.layers;
var ie4 = document.all;
Halloween.makeLayer = function(id)
{
var el = document.getElementById ? document.getElementById(id) :
document.all ? document.all[id] :
document.layers[id];
if(ns4) el.style=el;
el.sP=function(x,y){this.style.left = x;this.style.top=y;};
el.show=function(){ this.style.visibility = "visible"; }
el.hide=function(){ this.style.visibility = "hidden"; }
if(ns4 || window.opera)
el.sO = function(pc){return 0;};
else if(ie4)
el.sO = function(pc)
{
if(this.style.filter=="")
this.style.filter="alpha(opacity=100);";
this.filters.alpha.opacity=pc;
}
else
el.sO = function(pc){this.style.MozOpacity=pc/100;}
return el;
}
if(window.innerWidth)
{
gX=function(){return innerWidth;};
gY=function(){return innerHeight;};
}
else
{
gX=function(){return document.body.clientWidth-30;};
gY=function(){return document.body.clientHeight-30;};
}
Halloween.ghostOutput=function()
{
for(var i=0 ; i"+Halloween.ghostImages[i]+"" :
""+Halloween.ghostImages[i]+"
" );
}
Halloween.ghostSprites = new Array();
Halloween.ghostStartAni = function()
{
for(var i=0 ;i .99)
{
el.state="up";
el.show();
}
}
else if(el.state == "on")
{
if(Math.random() > .98)
el.state="down";
}
else if(el.state == "up")
{
el.op += 2;
el.sO(el.op);
if(el.op==100)
el.state = "on";
}
else if(el.state == "down")
{
el.op -= 2;
if(el.op==0)
{
el.hide();
el.state = "off";
}
else
el.sO(el.op);
}
var X = (el.tx - el.x);
var Y = (el.ty - el.y);
var len = Math.sqrt(X*X+Y*Y);
if(len < 1) len = 1;
var dx = 20 * (X/len);
var dy = 20 * (Y/len);
var ddx = (dx - el.dx)/10;
var ddy = (dy - el.dy)/10;
el.dx += ddx;
el.dy += ddy;
el.sP(el.x+=el.dx,el.y+=el.dy);
if(Math.random() >.95 )
{
el.tx = Math.random()*gX();
el.ty = Math.random()*gY();
}
}
}
Halloween.ghostStart = function()
{
if(Halloween.ghostLoad)Halloween.ghostLoad();
Halloween.ghostStartAni();
}
Halloween.ghostOutput();
Halloween.ghostLoad=window.onload;
window.onload=Halloween.ghostStart;
setTimeout('moverain()',100);
setTimeout('changeBg()',lightStart);
setTimeout('playSong(playThese)',lightStart);