%
dim quote,isAdmin,disabletextstart,disableintstart,disabletextend
dim bUpdateGlobal
bUpdateGlobal = true
quote=chr(34)
disabletextstart= "
"
disableintstart= "
"
disabletextend="
"
isAdmin=Session("isAdmin")
function checkboxmask(fieldname, fieldmask, onclickproc, adminonly)
On Error Resume Next
Dim val
if mid(fieldname,1,1)="!" then
fieldname=mid(fieldname,2)
val=not (currentobj.Get(fieldname) and fieldmask)
else
val=(currentobj.Get(fieldname) and fieldmask)
end if
checkboxmask = writeCheckboxVal(err, val, fieldname, fieldmask, onclickproc, adminonly)
end function
function checkbox(fieldname, onclickproc, adminonly)
On Error Resume Next
Dim val
if mid(fieldname,1,1)="!" then
fieldname=mid(fieldname,2)
val=not currentobj.Get(fieldname)
else
val=currentobj.Get(fieldname)
end if
checkbox = checkboxVal(err,val,"chk" & fieldname,onclickproc,adminonly)
end function
function checkboxVal(err, val, fieldname, onclickproc, adminonly)
On Error Resume Next
checkboxVal = writeCheckboxVal(err, val, fieldname, "", onclickproc, adminonly)
end function
function writeCheckboxVal(err, val, fieldname,fieldmask, onclickproc, adminonly)
On Error Resume Next
Dim outputStr
if err <> 0 then
outputStr=""
alertuser fieldname
else
if (not adminonly) or isAdmin then
if val then
outputStr=" "" then
outputStr = outputStr & " VALUE=" & fieldmask
end if
outputStr = outputStr & " OnClick=" & quote
if bUpdateGlobal then
outputStr = outputStr & "top.title.Global.updated=true;"
end if
if onclickproc <> "" then
outputStr = outputStr & onclickproc & quote & ">"
else
outputStr = outputStr & quote & ">"
end if
else
if Session("hasDHTML") then
if val then
outputStr=""
else
outputStr=""
end if
else
if val then
outputStr=""
else
outputStr=""
end if
end if
end if
end if
writeCheckboxVal = outputStr
end function
function printoption(selected, text, adminonly)
'On Error Resume Next
if selected then
printoption="