I wrote the following code:
<script type='text/javascript'>
var imageID = 0;
function changeimage(every_seconds) {
//Change the image
if (!imageID) {
document.getElementById("myimage").src = "jesus.jpg";
imageID++;
} else { if(imageID==1) {
document.getElementById("myimage").src="crucifixion.jpg";
imageID++;
} else { if(imageID==2) {
document.getElementById("myimage").src="resurrection.jpg";
imageID++;
} else { if(imageID==3) {
document.getElementById("myimage").src="trinity.jpg";
imageID=0;
}}}}
//Call the same function again for x number of seconds
setTimeout("changeimage("+every_seconds+")",((every_seconds)*1000));
}
var k=0;
<!--[if gte IE, FF]><!-->
var k=1;
<!--><![endif]-->
function mytext1() {
if (k==1) {
document.getElementById("mylink").href="king.html";
document.getElementById("mytext").innerHTML="THE KING OF KINGS";
} else { if(k==2) {
document.getElementById("mylink").href="crucifixion.html";
document.getElementById("mytext").innerHTML="HE WAS PUNISHED FOR OUR SINS";
} else{ if(k==3) {
document.getElementById("mylink").href="resurrection.html";
document.getElementById("mytext").innerHTML="HE WON DEATH";
} else { if(k==4) {
document.getElementById("mylink").href="trinity.html";
document.getElementById("mytext").innerHTML="THE HOLY TRINITY";
k=0;
}}}}
k++;
}
</script>
For the program to work in all browsers, the k must be equal to 1 in Chrome and 0 in Internet Explorer and Firefox.
How do I hide K=1;
from Internet Explorer and Firefox?