Help understanding code
Posted: Mon Jun 09, 2003 10:55 pm
Hey, could someone help me to understand the code that follows.
Now, my I did little C++ style comments where I had questions. I only commented the main things I did not understand, but I really understood little. So any explanations are great. Basically I found this code on a page that is so awesome that I wanted to know how to do that, well I didn't understand hardly anything in it.
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from old browsers
{ // This doesn't seem normal? They have a { without a function or
// some other type of loop before it.
var Position = 0;
var tid = "";
}
function ImgLoaded()
{ alles = true; // Here, they do it again.
{ for (j=0; j < document.images.length; j++)
{alles = alles && document.imagesїj].complete;
}
}
return alles;
}
function Slideit()
{//alert(navigator.appVersion)
if ((document.layers) || (document.all)){
Position = Position + 5;
window.status = ' connect ' + Position + ' baud to tranquileye.com ';
tid = setTimeout("Slideit()",9);
if (Position<1400)
{scroll(0,Position);}
else {scroll(0,Position+00);}
if ((Position>2400)&& ImgLoaded())
{ clearTimeout(tid);
if (document.layers || document.all){
document.location="home.html"
}
}
}
else
{parent.location='home.html'} // go to version 3 window
}
// Stop hiding from old browsers -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
function MM_preloadImages() { //v1.2
if (document.images) {
var imgFiles = MM_preloadImages.arguments;
var preloadArray = new Array();
for (var i=0; i<imgFiles.length; i++) {
preloadArrayїi] = new Image;
preloadArrayїi].src = imgFilesїi];
}
}
}
//-->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
function MM_popupMsg(theMsg) { //v1.2
alert(theMsg);
}
//-->
</SCRIPT>