function jsConsultantForm(value){
	var form = document.createElement('form');
	if(form){
		form.setAttribute("action", "");
		form.setAttribute("method", "post");
		var input	= document.createElement('input');
		input.setAttribute("name", "post[nid]");
		input.setAttribute ("value", value);
		input.style.display = "none";
		form.appendChild(input);
		form.style.display = "none";
		document.body.appendChild(form);
		form.submit();
	}
}
function overli() {
	if (this.parentNode.parentNode.className == 'left-nav') {
		this.parentNode.style.cssText = "background: url(/app/granplus/img/squares.gif) no-repeat -993px 6px";
	}
}
function outli() {
	if (this.parentNode.parentNode.className == 'left-nav') {
		this.parentNode.style.cssText = "background: url(/app/granplus/img/squares.gif) no-repeat 0 6px";
	}
}

function selectionToggle() {
	for (sibling = this.nextSibling;sibling != null && sibling.nodeName != 'UL';sibling = sibling.nextSibling);
	if (sibling != null) {
		if (sibling.style.display == 'none') {
			sibling.style.display = 'block';
			this.parentNode.style.cssText = "border-width:0;padding-bottom:0px";
		} else {
			sibling.style.display = 'none';
			this.parentNode.style.cssText = "border-width:1px;padding-bottom:3px";
		}
	}
}

function getLinksToBlur() {
	links = document.getElementsByTagName("a");
	for(i=0; i<links.length; i++) {
		if (links[i].parentNode.className != 'last') {
			links[i].onmouseover = overli;
			links[i].onmouseout = outli;
		}
	}

	if ($('selection')) {
		var items = $('selection').childNodes;
		for(i=0; i<items.length; i++) {
			if (items[i].nodeName == 'LI') {
				var uls = items[i].childNodes;
				for (j=0; j<uls.length; j++) {
					if (uls[j].nodeName == 'UL'){
						if(uls[j].getAttribute("rel") !== "submit"){
							uls[j].style.display = "none";
						}else{
							uls[j].parentNode.style.cssText = "border-width:0;padding-bottom:0px";
						}
					}
					if (uls[j].nodeName == 'A'){
						if(typeof(uls[j].onclick) == "undefined" || uls[j].onclick == null ){
							uls[j].onclick = selectionToggle;
						}
					}
				}
			}
		}
	}
}