var cb = parent.SubLower.document.forms[0].$$SelectDoc;
// find the first checked document . . .
var selectcount = 0;
var docUNID = new Array();
for(i = 0; i < cb.length; i ++){
if (cb[i].checked){
docUNID[selectcount] = cb[i].value;
selectcount++;
}
}
if (docUNID[0] == null ){
alert('You did not select any documents, please correct and try again.');
}
else {
if (document.forms[0].Type.value == "Client Admin") {
if (docUNID != null ){
result=window.confirm('This operation will toggle the selected documents Reviewed or Review Pending, click OK if you wish to proceed.');
if (result==true) {
parent.SubLower.document.forms[0].TargetAgent.value = "LockUnlock"
parent.SubLower.document.forms[0].SelectedDocs.value = docUNID
parent.SubLower.document.forms[0].submit();
}
else {
var fieldname = parent.SubLower.document.forms[0].$$SelectDoc;
for(i = 0; i < fieldname.length; i ++){
fieldname[i].checked=false
}
}
}
}
else {
alert("You do not have sufficient administrator rights to use this function.")
var fieldname = parent.SubLower.document.forms[0].$$SelectDoc;
for(i = 0; i < fieldname.length; i ++){
fieldname[i].checked=false
}
}
}