4 function getObjValue(obj
) {
5 var v
= ''; // the value
6 var t
= (obj
&& obj
.type
) ? obj
.type
: "";
7 if (t
=="text" || t
=="textarea" || t
=="hidden") {
9 } else if (t
=="select-one" || t
=="select-multiple") {
10 var l
= obj
.options
.length
;
11 for (var i
=0; i
<l
; i
++) {
12 if (obj
.options
[i
].selected
) {
13 v
+= (v
=="" ? "" : ",") + obj
.options
[i
].value
;
20 if (s
.substring(0,7)=='http://' || s
.substring(0,8)=='https://') {
23 if (s
.charAt(0) != '/') {
26 return s
.substring(0, s
.lastIndexOf('/'));
28 function AddWhiteSpace(BeforeOrAfter
, id
) {
29 if (document
.getElementById
) {
30 // locate the DIV object (class="fitem") containing the target element
31 var obj
= document
.getElementById(id
);
32 while (obj
&& !(obj
.className
&& (obj
.className
=='fitem' || obj
.className
.substring(0,6)=='fitem '))) {
36 switch (BeforeOrAfter
) {
37 case 'before': obj
.style
.marginTop
= '1.8em'; break;
38 case 'after': obj
.style
.marginBottom
= '0.8em'; break;
43 AddWhiteSpace('after', 'id_name');
44 AddWhiteSpace('before', 'id_quizchain');
45 AddWhiteSpace('before', 'id_password');
46 AddWhiteSpace('before', 'id_review');