
function setRowClass(theRow, theClass)
{
    var theCells = null;

    // Get the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;

    for (c = 0; c < rowCellsCnt; c++) {
        theCells[c].className = theClass;
    }

    return true;
}

function picWindow(url) {
  win = window.open('../ansichtskarten/bigpic.php?pic=' + url, 'picWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=660,height=715');
  win.focus();
}

function pReport(path, ext) {
  var href = document.getElementById("pRepLink");
  href.href = "#";
  
  win = window.open(path + '/problem.php?' + ext, 'pReport','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=450,height=450');
  win.focus();
}

function gotoSearch() {
    var name = document.getElementById("modeSel");
    var val  = name.value;
    location.href = "../ansichtskarten/shop.php?mode=" + val;
    return false;
}

function chgLen(start, lenId, sid) {
    var name = document.getElementById(lenId);
    var val  = name.value;
    location.href = "../ansichtskarten/list.php?start=" + start + "&pp=" + val + "&" + sid;
    return false;
}

function chgSort(sortId, sid) {
    var name = document.getElementById(sortId);
    var val  = name.value;
    location.href = "../ansichtskarten/list.php?qSort=" + val + "&" + sid;
    return false;
}
