This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2008-01-31 23:46:06 -05:00
|
|
|
function addLoadEvent(func) {
|
|
|
|
var oldonload = window.onload;
|
|
|
|
if (typeof window.onload != 'function') {
|
|
|
|
window.onload = func;
|
|
|
|
} else {
|
|
|
|
window.onload = function() {
|
|
|
|
oldonload();
|
|
|
|
func();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-12-22 19:32:08 -05:00
|
|
|
function set_all_checkboxes(form_name, field_name, check_value)
|
|
|
|
{
|
|
|
|
if(!document.forms[form_name])
|
|
|
|
return;
|
|
|
|
var objCheckBoxes = document.forms[form_name].elements[field_name];
|
|
|
|
if(!objCheckBoxes)
|
|
|
|
return;
|
|
|
|
var countCheckBoxes = objCheckBoxes.length;
|
|
|
|
if(!countCheckBoxes)
|
|
|
|
objCheckBoxes.checked = check_value;
|
|
|
|
else
|
|
|
|
// set the check value for all check boxes
|
|
|
|
for(var i = 0; i < countCheckBoxes; i++)
|
|
|
|
objCheckBoxes[i].checked = check_value;
|
|
|
|
}
|