// JavaScript Document function submitThisForm(e) { var resultat = testForm(e,attTestas) if (resultat) { document.getElementById("verifyFrm").value = "verified"; e.action = window.location; } return resultat; } var IeAlpha; var IsRuning; var FadeIn; IeAlpha = 100; function FadeImage(e) { var avskaladURL = document.getElementById('bild').src; if(IsRuning != 1) { if(document.getElementById('bild').src.substring(avskaladURL.length-e.length, avskaladURL.length) != e) { IsRuning = 1; document.getElementById('bild').style.opacity = "1"; t=setInterval("fade('"+e+"')", 10); } } } function fade(e) { if(FadeIn != 1) { IeAlpha-=10; document.getElementById('bild').style.filter = "alpha(opacity=" + IeAlpha + ")"; currentAlpha = parseFloat(document.getElementById('bild').style.opacity); document.getElementById('bild').style.opacity = currentAlpha-0.1; } else { IeAlpha+=10; document.getElementById('bild').style.filter = "alpha(opacity=" + IeAlpha + ")"; currentAlpha = parseFloat(document.getElementById('bild').style.opacity); document.getElementById('bild').style.opacity = currentAlpha+0.1; if(parseFloat(document.getElementById('bild').style.opacity) == 1) { FadeIn = 0; clearInterval(t); IsRuning = 0; } if(IeAlpha == 100) { FadeIn = 0; clearInterval(t); IsRuning = 0; } } if(parseFloat(document.getElementById('bild').style.opacity) == 0) { document.getElementById('bild').src = e; FadeIn = 1; } if(IeAlpha == 0) { document.getElementById('bild').src = e; FadeIn = 1; } } function changeText(id, text){ document.getElementById(id).innerHTML = text; } toggleDiv = function(id, onoff) { var elm = document.getElementById(id); if (onoff==1) { elm.style.display ="block"; } else if (onoff==0) { elm.style.display ="none"; } else { if (elm.style.display=="none") { elm.style.display ="block"; } else { elm.style.display ="none"; } } }