function new_almanac() {
    var pf = document.forms['pinfed'];
    pf.submit();
}
function add_rave() {
    var rv = document.forms['raves'];
    rv.submit();
}
function show_rave() {
    var rv = document.forms['raves'].elements['rv'];
    rv.scrollIntoView();
}
function clear_rave() {
    var rv = document.forms['pinrave'].elements['tx'];
    rv.value = "";
}
function setKuller(fld,vlu) {
    document.getElementById(fld).style.backgroundColor = vlu;
}
// make an array of anchors; each of the 36 'A's is a web-safe color setting we return thru kullerset;
//  this returns a string with line-breaks embedded, so it should be easy to drop it anywhere;
//  'o' is the id of whatever you want this instance of kuller to color;
function kuller(storage,target) {
    var clr = new Array (
                 '00'//,'11','22'
                ,'33'//,'44','55'
                ,'66'//,'77','88'
                ,'99'//,'aa','bb'
                ,'cc'//,'dd','ee'
                ,'ff'
                );
    var r = 0;
    var g = 0;
    var b = 0;
    var s = ''; // <div id=kuller style="font-size:3pt; display:none;" >
    for (g = 0; g < clr.length; g++) {
        for (r = 0; r < clr.length; r++) {
            for (b = 0; b < clr.length; b++) {
                s += '<a style="background-color:#';
                s += clr[r] + clr[g] + clr[b] + ';" ';
                s += ' onclick="tg_kuller(' + "'" + storage + "','#";
                s += clr[r]+clr[g]+clr[b]+"','');";
                s += '" onmouseover="setKuller('+"'"+target+"','#";
                s += clr[r]+clr[g]+clr[b]+"');";
                s += '">.</a>';
            };
        };
        s += '<br>';
    };
//    status_msg(''+s+'\n');
    document.getElementById(storage).innerHTML = s;
    return;
};
function tg_kuller(storage,rgb,target) {
    if (target > '') { kuller(storage,target); }
    var btn = storage + '_b';
    toggle_div(document.getElementById(storage));
    document.getElementById(btn).value = ''+rgb;
}
function tg_div(name) {
    toggle_div(document.getElementById(name));
}
function toggle_div (e) {
    if (e.style.display == 'none') {
        e.style.display = 'inline';
        return(false);
    } else {
        e.style.display = 'none';
        return(true);
    }
}

