01.
function
SpanShow(varSpanID,varForm) {
02.
var
sNum=
"000"
+parseFloat(varSpanID).tostring;
03.
var
SpanName=
"span"
+sNum.substr(sNum.length-2);
04.
alert(
"SpanShow:: "
+varStepID);
05.
if
(varForm === undefined) {
06.
var
objSpan = document.getElementById(SpanName);
07.
}
else
{
08.
var
myForm=document.getElementById(varForm);
09.
var
objSpan=myForm.elements[SpanName];
10.
}
11.
if
(objSpan != undefined) {
12.
objSpan.style.display=
"inline"
;
13.
}
14.
}
15.
16.
function
SpanClear(varSpanID,varForm) {
17.
var
iRunID=parseFloat(varSpanID);
18.
var
sNum,objSpan,myForm,bForm;
19.
alert(
"SpanClear:: "
+varStepID);
20.
if
(varForm != undefined) {
21.
bForm=
false
;
22.
myForm=document.getElementById(varForm);
23.
if
(myForm != undefined) { bForm=
true
; }
24.
}
25.
26.
do
{
27.
sNum=
"000"
+iRunID.tostring;
28.
SpanName=
"span"
+sNum.substr(sNum.length-2);
29.
if
(bForm) {
30.
objSpan=myForm.elements[SpanName];
31.
}
else
{
32.
objSpan = document.getElementById(SpanName);
33.
}
34.
if
(objSpan != undefined) {
35.
objSpan.style.display=
"none"
;
36.
}
37.
iRunID=iRunID+1;
38.
}
while
(objSpan != undefined);
39.
}
40.
41.
function
StepChange(varStep,varForm) {
42.
alert(
"StepChange:: "
+varStep);
43.
if
(varStep != 0) {
44.
SpanShow(parseFloat(varStep),varForm);
45.
SpanClear(parseFloat(varStep)+1,varForm);
46.
}
47.
}