Intensity
11-11-2004, 08:47 PM
Can someone check into this code and see if there is hiding redirect built in to it.
It directs me to http://2awm.com without my knowledge. I got this script from a forum and am attempting to use it for an image fade in fade out.
PS: If you know another fading javascript, please let me know.
<script type="text/javascript">
var SbrowseIE = navigator.appName;
if(SbrowseIE == "Microsoft Internet Explorer") SbrowseIE = true;
else SbrowseIE = false;
function fadeImage(imgName, fadeVal){
var opFilt;
if (SbrowseIE){
opFilt=document.getElementById(imgName).style.filter;
opFilt=opFilt.substr(opFilt.indexOf("=")+1,opFilt.indexOf(")")-(opFilt.indexOf("=")+1));
}
else
opFilt=document.getElementById(imgName).style.MozOpacity*100;
if(opFilt <= 0 || opFilt >= 100)
fadeVal=fadeVal*(-1);
opFilt=opFilt-fadeVal;
if (SbrowseIE)
document.getElementById(imgName).style.filter="alpha(opacity="+opFilt+")";
else
document.getElementById(imgName).style.MozOpacity=opFilt/100;
return fadeVal;
}
var fVal2;
var firstTime=true;
function fadeLoop(){
if (firstTime){
firstTime=false;
fVal2=1;
if (SbrowseIE){
document.getElementById("img1").style.filter="alpha(opacity=90)";
} else {
document.getElementById("img1").style.MozOpacity=.9;
}
}
fVal2=fadeImage("img2",fVal2);
setTimeout("fadeLoop()",100);
}
</script>
</head>
<body onload="fadeLoop();">
<div style="position:absolute;left:33%;top:0px;"><img src="../TestJava/Fade.jpg" border="0" id="img1" /></div>
<div style="position:absolute;left:33%;top:0px;"><img src="../TestJava/FadeIn.jpg" id="img2" /></div>
It directs me to http://2awm.com without my knowledge. I got this script from a forum and am attempting to use it for an image fade in fade out.
PS: If you know another fading javascript, please let me know.
<script type="text/javascript">
var SbrowseIE = navigator.appName;
if(SbrowseIE == "Microsoft Internet Explorer") SbrowseIE = true;
else SbrowseIE = false;
function fadeImage(imgName, fadeVal){
var opFilt;
if (SbrowseIE){
opFilt=document.getElementById(imgName).style.filter;
opFilt=opFilt.substr(opFilt.indexOf("=")+1,opFilt.indexOf(")")-(opFilt.indexOf("=")+1));
}
else
opFilt=document.getElementById(imgName).style.MozOpacity*100;
if(opFilt <= 0 || opFilt >= 100)
fadeVal=fadeVal*(-1);
opFilt=opFilt-fadeVal;
if (SbrowseIE)
document.getElementById(imgName).style.filter="alpha(opacity="+opFilt+")";
else
document.getElementById(imgName).style.MozOpacity=opFilt/100;
return fadeVal;
}
var fVal2;
var firstTime=true;
function fadeLoop(){
if (firstTime){
firstTime=false;
fVal2=1;
if (SbrowseIE){
document.getElementById("img1").style.filter="alpha(opacity=90)";
} else {
document.getElementById("img1").style.MozOpacity=.9;
}
}
fVal2=fadeImage("img2",fVal2);
setTimeout("fadeLoop()",100);
}
</script>
</head>
<body onload="fadeLoop();">
<div style="position:absolute;left:33%;top:0px;"><img src="../TestJava/Fade.jpg" border="0" id="img1" /></div>
<div style="position:absolute;left:33%;top:0px;"><img src="../TestJava/FadeIn.jpg" id="img2" /></div>