RealSuain
Grünschnabel
code vom preloader
Code fürs pop up
HTML:
<html>
<head>
<title>Preloader</title>
<style type="text/css">
<!--
body {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
color: #000000;
border : 0 none #000000;
margin : 0px;
padding: 0px;
background-color : #99CCFF;
}
table {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
}
td {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
}
tr {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
}
-->
</style>
<script language="JavaScript1.2">
startingColor = new Array(); // <-- Nicht veraendern!
endingColor = new Array(); // <-- Nicht veraendern!
// das hier anpassen:
// welche Bilder sollen vorrausgeladen werden = new Array ('bild.jpg','2.gif','3.gif','4.gif')
var yourImages = new Array (
'Bilder/main_01.gif',
'Bilder/main_02.gif',
'Bilder/main_03.gif',
'Bilder/main_04.gif',
'Bilder/main_05.gif'
);
var locationAfterPreload = "main.html"; // Adresse wohin es nach dem vorladen weiterleitet
var preloadbarWidth = 200; // Die Laenge der Preloadbar. Sollte groesser sein als der gesamte Betrag der Bilder die geladen werden sollen
var preloadbarHeight = 10; // Die Hoehe der Preloadbar
var backgroundOfGradient = "#6B7C9C"; // Farbe der Preloadbar waeherend es laedt
// Startfarbe des Preloaders - trage den ersten, dritten, fuenften Buchstaben den Farbcode ein
startingColor[0] = "f";
startingColor[1] = "f";
startingColor[2] = "f";
// Farbe die am Ende ist - trage den ersten, dritten, fuenften Buchstaben den Farbcode ein
endingColor[0] = "8";
endingColor[1] = "0";
endingColor[2] = "0";
// Fuer Fehlersuche:
var gap = 3; // Du musst ein bisschen rumprobieren wenn du Java Script Fehler bekommst! 2 ist das kleinste!
// Nichts verändern!
if (!document.all) location.replace(locationAfterPreload)
var a = 10, b = 11, c = 12, d = 13, e = 14, f=15, i, j, ones = new Array(), sixteens = new Array(), diff = new Array();
var convert = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"), imgLen = yourImages.length;
var loaded = new Array(), preImages = new Array(), currCount = 0, pending = 0, h = 0, hilite = new Array(), cover = new Array();
var num = Math.floor(preloadbarWidth/gap);
for (i = 0; i < 3; i++) {
startingColor[i] = startingColor[i].toLowerCase();
endingColor[i] = endingColor[i].toLowerCase();
startingColor[i] = eval(startingColor[i]);
endingColor[i] = eval(endingColor[i]);
diff[i] = (endingColor[i]-startingColor[i])/num;
ones[i] = Math.floor(diff[i]);
sixteens[i] = Math.round((diff[i] - ones[i])*15);
}
endingColor[0] = 0;
endingColor[1] = 0;
endingColor[2] = 0;
i = 0, j = 0;
while (i <= num) {
hilite[i] = "#";
while (j < 3) {
hilite[i] += convert[startingColor[j]];
hilite[i] += convert[endingColor[j]];
startingColor[j] += ones[j];
endingColor[j] += sixteens[j];
if (endingColor[j] > 15) {
endingColor[j] -= 15;
startingColor[j]++;
}
j++;
}
j = 0;
i++;
}
function loadImages() {
for (i = 0; i < imgLen; i++) {
preImages[i] = new Image();
preImages[i].src = yourImages[i];
loaded[i] = 0;
cover[i] = Math.floor(num/imgLen)*(i+1);
}
cover[cover.length-1] += num%imgLen;
checkLoad();
}
function checkLoad() {
if (pending) {
changeto();
return
}
if (currCount == imgLen) {
location.replace(locationAfterPreload);
return
}
for (i = 0; i < imgLen; i++) {
if (!loaded[i] && preImages[i].complete) {
loaded[i] = 1;
pending++;
currCount++;
checkLoad();
return;
}
}
setTimeout("checkLoad()",10);
}
function changeto() {
if (h+1 > cover[currCount-1]) {
var percent = Math.round(100/imgLen)*currCount;
if (percent > 100) while (percent != 100) percent--;
if (currCount == imgLen && percent < 100) percent = 100;
defaultStatus = "Loaded " + currCount + " out of " + imgLen + " images [" + percent + "%].";
pending--;
checkLoad();
return;
}
eval("document.all.cell" + (h+1) + ".style.backgroundColor = hilite[h]");
h++;
setTimeout("changeto()",1);
}
defaultStatus = "Loaded 0 out of " + imgLen + " images [0%].";
// end hiding -->
</script>
</head>
<body bgcolor="white" text="#C0C0C0" link="#C0C0C0" vlink="#C0C0C0" alink="#C0C0C0">
<table width="100%" bgcolor="#333333" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr bgcolor="white">
<td bgcolor="#333333">
<center>
<script language="JavaScript1.2">
<!-- beging hiding
document.write('<table border="1" bordercolor="#485266" cellpadding="0" cellspacing="0" width="' + preloadbarWidth + '"><tr height="' + preloadbarHeight + '" bgcolor="' + backgroundOfGradient + '">');
for (i = 0; i < num; i++) {
document.write('<td bordercolorlight="75A0BD" bordercolordark="75A0BD" width="' + gap + '" id="cell' + (i+1) + '"></td>');
}
document.write('</tr></table>');
loadImages();
// end hiding -->
</script>
<a href="main.html">Skip loading</a>
</center>
</td>
</tr>
</table>
</body>
</html>
Code fürs pop up
HTML: