function ChangeRCFilter()
{
    // does not do much right now.
    // maybe we will do more nifty stuff in the future
    submit();
}


// based on "Drop-Down Menus, Horizontal Style"
// by Nick Rigby, www.alistapart.com

// necessary for menus to work in IE

function activateHover(idname)
{
	node = document.getElementById(idname);
	if (!node)
	    return;
	node.onmouseover=function() {
	    this.className+=" over";
	}
	node.onmouseout=function() {
	    this.className=this.className.replace(" over", "");
	}
}

// main menus are different DIVs, because of Opera bug

startList = function() {
    if (document.all && document.getElementById) {
	activateHover('toolbox');
	activateHover('toolbox2');
	activateHover('toolbox3');
	activateHover('sgftoolbox');
    }
}

window.onload=startList;


function ToggleView(idname)
{
    var obj = document.getElementById(idname);
    if (obj.style.display == 'none')
    	obj.style.display = 'block';
    else
    	obj.style.display = 'none';
}

function mouseOverCaptcha(el, val)
{
    el.style.backgroundColor = '#f0f030';
    el.captcha = val % 29021;
}

function mouseOutCaptcha(el, val)
{
    if (el.captcha != (val % 29021))
    	return;
    el.style.backgroundColor = '#30f030';
    var date = new Date();
    date.setTime(date.getTime()+(6*60*60*1000));
    val = el.captcha + ':' + (val % 75037);
    document.cookie = "captcha2="+val+"; expires="+date.toGMTString()+"; path=/";
    window.location.reload(true);
}

function createCaptcha(value, path)
{
    var div = document.getElementById('captcha');
    var div2 = document.createElement('div');
    div2.innerHTML = '<p>Sorry. Access denied because of missing referrer information.</p>'
        + '<p>You can either read <A HREF="'+path+'?AccessBlocked">AccessBlocked</A> for more information.</p>'
        + '<p>Or you <b>move your mouse</b> over the text box below.</p>';
    var p = document.createElement('p');
    p.className = "captcha";
    p.innerHTML = 'Move your mouse over here.';
    p.onmouseover = function() { mouseOverCaptcha(p, value) };
    p.onmouseout = function() { mouseOutCaptcha(p, value) };
    div.replaceChild(div2, div.firstChild);
    div.appendChild(p);
}

