function markAllRows(table_id){
var rows = document.getElementById(table_id).getElementsByTagName('tr');
var unique_id;
var checkbox;
for (var i = 0; i < rows.length; i++) {
checkbox = rows[i].getElementsByTagName('input')[0];
if (checkbox && checkbox.type == 'checkbox') {
if (checkbox.disabled == false) {
checkbox.checked = true;
}
}
}
return true;
}
function unMarkAllRows(table_id){
var rows = document.getElementById(table_id).getElementsByTagName('tr');
var unique_id;
var checkbox;
for (var i = 0; i < rows.length; i++) {
checkbox = rows[i].getElementsByTagName('input')[0];
if (checkbox && checkbox.type == 'checkbox') {
if (checkbox.disabled == false) {
checkbox.checked = false;
}
}
}
return true;
}
function pageRowsUpdate(rows, rows_prev) {
if (location.search) {
if (location.search.indexOf("page_rows") != -1) {
location.href = location.href.replace("page_rows=" + rows_prev, "page_rows=" + rows);
} else {
location.href = location.href + "&page_rows=" + rows;
}
} else {
location.href = location.href + "?page_rows=" + rows;
}
}
function emptyID(i, v) {
e = document.getElementById(i);
if (e.value == v) {
e.value = '';
}
}
function fillID(i, v) {
e = document.getElementById(i);
if (e.value == '') {
e.value = v;
}
}
function increaseID(i) {
e = document.getElementById(i);
if (isInt(e.value)) {
e.value++;
}
}
function decreaseID(i) {
e = document.getElementById(i);
if (isInt(e.value) && e.value > 0) {
e.value--;
}
}
function noneID(i) {
document.getElementById(i).style.display = 'none';
}
function blockID(i) {
document.getElementById(i).style.display = 'block';
}
function focusID(i) {
document.getElementById(i).focus();
}
function isInt(val) {
return parseInt(val) == val;
}
