function checkClear(idname)
{
    var ele = document.getElementById(idname);
    if (ele !== null) {
        var input = ele.getElementsByTagName("input");
        for (var i=0; i<input.length; i++) {
            if (input[i].type === "checkbox") {
                input[i].checked = false;
            }
        }
    }
    return true;
}

function clvisit(obj)
{
    location.href = 'clvisit.pl?URL=' + urlencode(obj.href);
    return true;
}

function openImageSizedWindow(src)
{
    var i = new Image();
    i.src = src;
    var w = i.width;
    var h = i.height;
    if (!w){w = 600;}
    if (!h){h = 640;}
    var pop_win = window.open("", "_blank", "width="+w+",height="+h+",scrollbars=yes,resizable=yes");
    pop_win.window.document.open();
    pop_win.window.document.write('<html><head><title>'+i.alt+'</title></head>'
                                  +'<body style="margin:0;padding:0;border:0;">'
                                  +'<img src="'+i.src+'"  alt="" /></body></html>');
    pop_win.window.document.close();
}

