function loginlink(){
	document.write("<A HREF=\"/login.html\">log in</A>");
}

function editlogout(x,y){
	document.write("<A HREF=\"/logout.html\">log out</A>&nbsp;|&nbsp;");
	document.write("<A HREF=\"/admin.html\">site administration</A>");
	if(y>0){
		document.write("&nbsp;|&nbsp;<span STYLE=\"font-family:arial,geneva,sans-serif;font-size:9px;color:#bbbbbb;\">edit page</span>");
	}else{
		document.write("&nbsp;|&nbsp;<A HREF=\"/wysiwyg/index.html?url="+x+"\">edit page</A>");
	}
}



function search(){
	if((document.getElementById('q').value)&&(document.getElementById('q').value != '(search)')){
		document.location='/search/'+document.getElementById('q').value;
	}
}
function clear_search(){
	if(document.getElementById('q').value == '(search)'){
		document.getElementById('q').value='';
	}
}

function set_q(data){
	document.getElementById('q').value=data;
}


if (window.ActiveXObject) {
	sfHover = function() {
		var sfEls = document.getElementById("menus").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
}