You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
247 lines
6.2 KiB
247 lines
6.2 KiB
<script language="Javascript">
|
|
<!--
|
|
<%=SYSTEM.STARTIF?SYSTEM.languagesupport TRUE INCLUDE %>
|
|
function tGotFocus(oTxt) {
|
|
return true;
|
|
}
|
|
|
|
function langselect(oSelLang) {
|
|
return true;
|
|
}
|
|
|
|
function languagesupport(oTxt) {
|
|
return true;
|
|
}
|
|
|
|
function onConvert(oTxt) {
|
|
return true;
|
|
}
|
|
<%=SYSTEM.ELSE%>
|
|
function tGotFocus(oTxt) {
|
|
return true;
|
|
}
|
|
|
|
function langselect(oSelLang) {
|
|
return true;
|
|
}
|
|
|
|
function languagesupport(oTxt) {
|
|
return true;
|
|
}
|
|
|
|
function onConvert(oTxt) {
|
|
return true;
|
|
}
|
|
<%=SYSTEM.ENDIF%>
|
|
|
|
function start_time() {
|
|
var qno;
|
|
if (top.document.location != document.location) {
|
|
<%=SYSTEM.STARTIF?TEST.seq svy INCLUDE %>
|
|
top.tstclock.document.sw.qno.value = "1 to " + document.form1.noq.value;
|
|
<%=SYSTEM.ELSE%>
|
|
top.tstclock.document.sw.qno.value = document.form1.qno.value + " of " + document.form1.noq.value;
|
|
<%=SYSTEM.ENDIF%>
|
|
if (document.form1.tmd.value == "Y") {
|
|
if (document.form1.tmreset.value != "") {
|
|
top.tstclock.document.sw.beg.value = document.form1.tmreset.value;
|
|
top.tstclock.document.sw.disp.value = document.form1.tmreset.value;
|
|
top.tstclock.document.sw.running.value = "^";
|
|
} else {
|
|
top.tstclock.document.sw.running.value = "*";
|
|
}
|
|
}
|
|
loading_graphic("hide");
|
|
}
|
|
<%=SYSTEM.STARTIF?QUESTION.qtp nrt INCLUDE %>
|
|
<%=SYSTEM.STARTIF?TEST.seq svy,dmg EXCLUDE %>
|
|
var slen;
|
|
slen = document.form1.qrs.value;
|
|
document.form1.actlen.value = slen.length;
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.ENDIF%>
|
|
}
|
|
|
|
var btnAlreadyClicked=false;
|
|
|
|
function btn_pause(e)
|
|
{
|
|
if (btnAlreadyClicked == true) { return false;}
|
|
<%=SYSTEM.STARTIF?QUESTION.qtp mca INCLUDE %>
|
|
var aform=document.form1, sel=false;
|
|
for (n=0;n <= aform.qrs.length-1; n++) {
|
|
sel=(sel || aform.qrs[n].checked);
|
|
}
|
|
if (!sel) {
|
|
alert("You must select one option.");
|
|
return false;
|
|
}
|
|
<%=SYSTEM.ENDIF%>
|
|
btnAlreadyClicked=true;
|
|
if (e.value == "<%=PHRASE.542%>") {
|
|
sMsg = "<%=PHRASE.730%>";
|
|
if (confirm(sMsg) == false) {
|
|
btnAlreadyClicked=false;
|
|
return false;
|
|
}
|
|
}
|
|
if ((e.value == "<%=PHRASE.5%>") || (e.value == "<%=PHRASE.6%>")) {
|
|
if (e.value == "<%=PHRASE.5%>") {
|
|
<%=SYSTEM.STARTIF?CLIENT.swsys vm INCLUDE %>
|
|
sMsg = "<%=PHRASE.823%>";
|
|
<%=SYSTEM.ELSE%>
|
|
sMsg = "<%=PHRASE.641%>";
|
|
<%=SYSTEM.ENDIF%>
|
|
} else if (e.value == "<%=PHRASE.6%>") {
|
|
sMsg = "<%=PHRASE.882%>";
|
|
}
|
|
<%=SYSTEM.STARTIF?TEST.qsk Y INCLUDE %>
|
|
<%=SYSTEM.STARTIF?SESSION.clid sandbox INCLUDE %>
|
|
sMsg+="\nIf you would like to review skipped questions, click \"Cancel\", then click the \"Review\" button.";
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.STARTIF?SESSION.clid org.ashp INCLUDE %>
|
|
sMsg+="\nIf you would like to review skipped questions, click \"Cancel\", then click the \"Review\" button.";
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.STARTIF?SESSION.clid org.smps INCLUDE %>
|
|
sMsg+="\nIf you would like to review skipped questions, click \"Cancel\", then click the \"Review\" button.";
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.STARTIF?TEST.seq svy INCLUDE %>
|
|
sMsg+=checkallanswered();
|
|
<%=SYSTEM.ENDIF%>
|
|
if (confirm(sMsg) == false) {
|
|
btnAlreadyClicked=false;
|
|
return false;
|
|
} else {
|
|
if ("<%=TEST.anonsubmitenab%>" == "1") {
|
|
sMsg="<%=PHRASE.642%>";
|
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
|
sMsg+=unescape("%0D")
|
|
<%=SYSTEM.ENDIF%>
|
|
sMsg+=unescape("%0A");
|
|
sMsg+="<%=PHRASE.653%>";
|
|
if (confirm(sMsg)) {
|
|
e.form.anonsubmit.value="N";
|
|
} else {
|
|
e.form.anonsubmit.value="Y";
|
|
}
|
|
}
|
|
if (top.document.location != document.location) {
|
|
btnAlreadyClicked=true;
|
|
top.tstclock.document.sw.running.value = "";
|
|
<%=SYSTEM.STARTIF?CLIENT.hidespinner Y EXCLUDE %>
|
|
loading_graphic("show");
|
|
<%=SYSTEM.ENDIF%>
|
|
document.form1.tmreset.value = top.tstclock.document.sw.disp.value;
|
|
}
|
|
}
|
|
} else {
|
|
if (top.document.location != document.location) {
|
|
btnAlreadyClicked=true;
|
|
top.tstclock.document.sw.running.value = "";
|
|
<%=SYSTEM.STARTIF?CLIENT.hidespinner Y EXCLUDE %>
|
|
loading_graphic("show");
|
|
<%=SYSTEM.ENDIF%>
|
|
document.form1.tmreset.value = top.tstclock.document.sw.disp.value;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
<%=SYSTEM.STARTIF?TEST.seq svy INCLUDE %>
|
|
function checkallanswered() {
|
|
var oform,q,i,j,k,n,s,t,etyp,enm,ectl;
|
|
oform=document.form1;
|
|
q=new Array();
|
|
for (n=1;n <= oform.noq.value; n++) {
|
|
q[n]=false;
|
|
}
|
|
n=oform.elements.length;
|
|
for (i=0; i < n; i++) {
|
|
ectl=oform.elements[i];
|
|
etyp=ectl.type;
|
|
enm=ectl.name;
|
|
j=extractqno(enm);
|
|
if ((etyp == "text") || (etyp == "textarea")) {
|
|
q[j]=(ectl.value == "") ? false : true;
|
|
} else {
|
|
if ((etyp == "radio") || (etyp == "checkbox")) {
|
|
q[j] = (q[j] || ectl.checked);
|
|
} else {
|
|
if ((etyp == "select-one") || (etyp == "select-multiple")) {
|
|
for (k=0; k < ectl.options.length; k++) {
|
|
q[j] = (q[j] || ectl.options[k].selected);
|
|
if (ectl.options[k].selected) { break;}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
t="";
|
|
for (n=1; n < q.length;n++) {
|
|
if (q[n] == false) {
|
|
t+=n+" <%=PHRASE.670%>";
|
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
|
t+=unescape("%0D");
|
|
<%=SYSTEM.ENDIF%>
|
|
t+=unescape("%0A");
|
|
}
|
|
}
|
|
if (t != "") {
|
|
s="";
|
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
|
s+=unescape("%0D");
|
|
<%=SYSTEM.ENDIF%>
|
|
s+=unescape("%0A");
|
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
|
s+=unescape("%0D");
|
|
<%=SYSTEM.ENDIF%>
|
|
s+=unescape("%0A");
|
|
s+=" <%=PHRASE.330%>";
|
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
|
s+=unescape("%0D");
|
|
<%=SYSTEM.ENDIF%>
|
|
s+=unescape("%0A");
|
|
s+=t;
|
|
t=s;
|
|
}
|
|
return t;
|
|
}
|
|
function extractqno(nm){
|
|
var i,j,s;
|
|
s=nm;
|
|
j=0;
|
|
i=s.indexOf("-qrs",0);
|
|
if (i != -1) {
|
|
s=s.substring(0,i);
|
|
j=parseInt(s.substring(1));
|
|
}
|
|
return j;
|
|
}
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.STARTIF?TEST.seq svy,dmg INCLUDE %>
|
|
function ta_onKeyPress(objForm) {
|
|
return true;
|
|
}
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.STARTIF?QUESTION.qtp nrt INCLUDE %>
|
|
<%=SYSTEM.STARTIF?TEST.seq svy,dmg EXCLUDE %>
|
|
function ta_onKeyPress(objForm) {
|
|
var slen, n;
|
|
slen = objForm.qrs.value;
|
|
n = <%=QUESTION.qca%>;
|
|
objForm.actlen.value = slen.length;
|
|
if (slen.length > n-1) {
|
|
alert("Your response must be <%=QUESTION.qca%> characters or less.");
|
|
objForm.qrs.value = slen.substring(0,<%=QUESTION.qca%>);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
<%=SYSTEM.ENDIF%>
|
|
<%=SYSTEM.ENDIF%>
|
|
|
|
window.onload=start_time;
|
|
// -->
|
|
</script>
|
|
<%=SYSTEM.INCLUDEJS loading.js %>
|
|
|