/////////////////////////////////// //Disable right mouse click /////////////////////////////////// function clickIE4(){ if (event.button==2){ return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("return false"); function CheckEmail(NameObject) { var txt; if (NameObject.value == "") { return (true); } txt = NameObject.value; if (txt.indexOf("@")<2) { return (false); } if (txt.lastIndexOf(".")=l) break; else s="0"+s; return s } function stms(s){ if (Math.abs(tmMx)>=3600){ h=Math.floor(s/3600);m=Math.floor((s%3600)/60);s=((s%3600)%60);return fill(h,2)+":"+fill(m,2)+":"+fill(s,2); }else{ m=Math.floor(s/60);s=s%60;return fill(m,2)+":"+fill(s,2); } } function shtm(t){ tmVl=t+1 self.status=stms(Math.abs(t)) document.forms[0].TimeElapsed.value = Math.abs(t); tmId = setTimeout("shtm(tmVl)",1000) if (t==((tmMx>0)? tmMx : 0)){ clearTimeout(tmId) alert("Time has elapsed. Please press Ok to continue.") document.forms[0].LastQuestion.value = document.forms[0].StatusID.value submitForm(3); } } function checkTime(bShowMsg){ if (tmMx!=0){ if (bShowMsg==true) alert('This test is time limited: '+stms(Math.abs(tmMx))+'\n\nYou can check the remaining time on your status bar at the bottom of the screen.'); shtm((tmMx>0) ? 0 : tmMx) } } tmId=null tmVl=0