function expand_tab(tabid,tab)
{					
	obj = document.getElementById('tabs');
	
	createCookie('sensationtabs_focused',tabid);
	for (i=0; i<obj.childNodes.length; i++) {					
		if (obj.childNodes[i].tagName == 'FORM') {	
			
		
			for (j=0; j<obj.childNodes[i].childNodes.length; j++) {
				if (obj.childNodes[i].childNodes[j].tagName == 'DIV') {
				
					if (obj.childNodes[i].childNodes[j].attributes['name'].value == 'tab') {
						obj.childNodes[i].childNodes[j].style.display = 'none';									
					}
				
				}
			}
		
		}
		if (obj.childNodes[i].tagName == 'DIV') {
			if (obj.childNodes[i].attributes['name'].value == 'tab') {
				obj.childNodes[i].style.display = 'none';
			}
		}
	}

	
	obj = document.getElementById(tabid);
	
	
	obj.style.display = 'block';
	obj = tab.parentNode.parentNode;
	for (i=0; i<obj.childNodes.length; i++) {
		if (obj.childNodes[i].className == 'taba') obj.childNodes[i].className = 'tab';
	}

	tab.parentNode.className = 'taba';
	
}

function expand_tree(obj,minus,plus)
{			
	obj2 = obj.parentNode.nextSibling;
	while (obj2.style==null) obj2 = obj2.nextSibling;		
	if ( obj2!=null && obj2.attributes['name'].value=="subtree" ) {		
		if (obj2.style.display == 'none') {
			obj2.style.display = 'block';
			obj.parentNode.parentNode.style.display = 'none';
			obj.parentNode.parentNode.style.display = 'block';						
			obj3 = obj.childNodes[0];
			obj3.src = minus;
			createCookie(obj3.parentNode.parentNode.id,'exp');
			while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;
		} else {				
			obj2.style.display = 'none';
			obj.parentNode.parentNode.style.display = 'none';
			obj.parentNode.parentNode.style.display = 'block';
			obj3 = obj.childNodes[0];
			obj3.src = plus;
			createCookie(obj3.parentNode.parentNode.id,'comp');
			while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;						
		}
	}				
}
function settreeicon(obj)
{
	obj2 = obj.parentNode.previousSibling;	
	while (obj2!=null && obj2.style==null) obj2 = obj2.previousSibling;	
	if (obj2!=null) {						
		obj3 = obj2.childNodes[0];					
		while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
		
		obj3 = obj3.childNodes[0];
		while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
							
		if ( readCookie(obj.parentNode.innerText)=='true') {
			obj.parentNode.style.display = 'none';
			obj3.src = "sensation/images/tree_plus.gif";
		}
		
							
		if (readCookie(obj3.parentNode.parentNode.id)!='exp') {
			obj3.src = "sensation/images/tree_plus.gif";
			obj4 = obj3.parentNode.parentNode.nextSibling;
			while (obj4!=null && obj4.style==null) obj4 = obj4.nextSibling;	
			obj4.style.display = 'none';			
		} else {			
			obj3.src = "sensation/images/tree_minus.gif";
		}
		
		obj3 = obj2.childNodes[0];					
		while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
		if (obj3!=null) {
			obj3 = obj3.nextSibling;
			while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
			if (obj3!=null) {
				obj3 = obj3.nextSibling;
				while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
				if (obj3!=null) {
					obj3 = obj3.nextSibling;
					while (obj3!=null && obj3.style==null) obj3 = obj3.nextSibling;	
					
					obj3.style.display = "none";
				}
			}
		}
												
		
	}
}
