home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 March
/
Chip_2000-03_cd.bin
/
tema
/
BBS
/
code.js
< prev
next >
Wrap
Text File
|
1999-05-13
|
3KB
|
102 lines
var CisloTimeout;
var VerzeProhlizece;
var CelkemObrazku;
var TedNactenoObrazku = 0;
function VytvorTeplomer() {
for(i=0;i<100;i++) {
document.write('<img src="images/teplomer%20on.gif" width="4" height="10" name="mira_');
document.write(i);
document.write('">');
}
}
function NastavTeplomer(Procenta) {
var JmenoCarky;
for(i=0;i<document.images.length;i++) {
JmenoCarky = 'mira_' + i;
if(Procenta > i) {
if(document.images[JmenoCarky].src != 'images/teplomer%20offgif') {
document.images[JmenoCarky].src = 'images/teplomer%20offgif';
}
}
}
}
function PlusPic() {
TedNactenoObrazku++;
if(document.title == 'WELCOME ON THE WEBMACHINE') {
NastavTeplomer(TedNactenoObrazku/(CelkemObrazku/100));
if(TedNactenoObrazku == CelkemObrazku) {
document.location = "index_en.htm";
}
}
}
function NactiObrazky() {
CelkemObrazku = 6;
pic_logo = new Image(); pic_logo.onload = PlusPic; pic_logo.src = "images/obr_logo.jpg";
pic_cz = new Image(); pic_cz.onload = PlusPic; pic_cz.src = "images/obr_cz.jpg";
pic_en = new Image(); pic_en.onload = PlusPic; pic_en.src = "images/obr_en.jpg";
pic_inet = new Image(); pic_inet.onload = PlusPic; pic_inet.src = "images/obr_inet.jpg";
pic_cont = new Image(); pic_cont.onload = PlusPic; pic_cont.src = "images/obr_mapa.jpg";
pic_net = new Image(); pic_net.onload = PlusPic; pic_net.src = "images/obr_site.jpg";
}
// zmena obrazku v liste dle pozice mysi
function ZmenaObrazku(Ktery) {
if(!VerzeProhlizece) {
return;
}
if(Ktery == "ch_en") {
document.images.obrazek.src = pic_en.src;
clearTimeout(CisloTimeout);
}
if(Ktery == "ch_cz") {
document.images.obrazek.src = pic_cz.src;
clearTimeout(CisloTimeout);
}
if(Ktery == "ch_inet") {
document.images.obrazek.src = pic_inet.src;
clearTimeout(CisloTimeout);
}
if(Ktery == "ch_net") {
document.images.obrazek.src = pic_net.src;
clearTimeout(CisloTimeout);
}
if(Ktery == "ch_cont") {
document.images.obrazek.src = pic_cont.src;
clearTimeout(CisloTimeout);
}
}
// zmena obrazku v liste zpet na logo - po 500 ms
function ZpetObrazek() {
if(!VerzeProhlizece) {
return;
}
CisloTimeout = setTimeout("document.images.obrazek.src = pic_logo.src;",500);
}
function JakyProhlizec() {
Vyhovuje = new Array();
Vyhovuje[0] = "Mozilla/3.0";
Vyhovuje[1] = "Mozilla/4.0";
Vyhovuje[2] = "Mozilla/4.5";
Vyhovuje[3] = "Mozilla/5.0";
Vyhovuje[4] = "Mozilla/5.5";
Vyhovuje[5] = "Mozilla/6.0";
for(i = 0;i < Vyhovuje.length; i++) {
if(navigator.userAgent.indexOf(Vyhovuje[i],0) != -1) return true;
}
return false;
}
// provest po nacteni listy
function PoNacteniListy() {
VerzeProhlizece = JakyProhlizec();
if(!VerzeProhlizece) {
return;
}
NactiObrazky();
}