Witam, mam problem chciałbym wstawić taki skrypt na stronę główną ale nie mogę sobie poradzić wydaje mi się ze problem jest w właściwościach dla css , nie wiem czy mam go dopisać do pliku css ?.
kod:
<html>
<head>
<style type="text/css">
#foto1 {position:absolute; width:300px; height:100px; left:220px; top:50px; z-index:1; visibility:hidden;}
#foto2 {position:absolute; width:300px; height:100px; left:220px; top:50px; z-index:2}
</style>
<SCRIPT LANGUAGE="JavaScript">
var ie5=(document.getElementById && document.all);
var ns6=(document.getElementById && !document.all);
nPlus = 5
speed = 200
nOpac = 100
function FadeImg(){
if(document.getElementById){
document.getElementById('foto1').style.visibility= "visible";
imgs = document.getElementById('foto2');
opacity = nOpac+nPlus;
nOpac = opacity;
setTimeout('FadeImg()',speed);
if(opacity>100 || opacity<0){
nPlus=-nPlus;
}
if(ie5){
imgs.style.filter="alpha(opacity=0)";
imgs.filters.alpha.opacity = opacity;
}
if(ns6){
imgs.style.MozOpacity = 0 + '%';
imgs.style.MozOpacity = opacity + '%';
}
}
}
onload=FadeImg;
// End -->
</script>
</head>
<body>
<div id="foto1">
<img src="foto1.jpg" border=0 width=394 height=300>
</div>
<div id="foto2">
<img src="foto2.jpg" border=0 width=394 height=300>
</div>
</body>
</html>
--------------------------------------------------------------
z góry dziękuję
Pozdrawiam.
Darek