function swapElementSize(el) {
	if ( document.getElementById ) {
		var myel = el; //document.getElementById(elid);
//	alert(el.style.height);
		if (myel.style.height == '17px' || myel.style.height == '')
		{
			myel.style.height="auto";
			//myel.style.backgroundColor="#fff";
		}
		else
		{
			myel.style.height="17px";
			//myel.style.backgroundColor="#EAEAEA";
		}
	}
}
function swapElementDisplay(elid) {
	//alert(elid);
	if ( document.getElementById ) {
		var myel = document.getElementById('a'+elid);
//	alert(el.style.height);
		if (myel.style.display == 'none' || myel.style.display == '')
		{
			myel.style.display="block";
			//myel.style.backgroundColor="#fff";
		}
		else
		{
			myel.style.display="none";
			//myel.style.backgroundColor="#EAEAEA";
		}
	}
}
function swapMenuDisplay(elid) {
//	alert(elid);
	if ( document.getElementById ) {
		var myel = document.getElementById('a'+elid);
//	alert(el.style.height);
		if (myel.style.display == 'none' || myel.style.display == '')
		{
			myel.style.display="block";
			//myel.style.backgroundColor="#fff";
		}
		else
		{
			myel.style.display="none";
			//myel.style.backgroundColor="#EAEAEA";
		}
	}
}

var myrules = {
	'.expandable' : function(el){
		el.onclick = function(){
			swapElementSize(el);
		};
		el.onmouseover = function(){
			this.style.cursor='pointer';
		};
		el.onmouseout = function(){
			this.style.cursor='default';
		}
	},
	'.question' : function(el){
		el.onclick = function(){
			swapElementDisplay(this.getAttribute('id'));
		};
		el.onmouseover = function(){
			this.style.cursor='pointer';
			this.style.backgroundColor='#4D4D4D';
			this.style.color='#ffffff';
		};
		el.onmouseout = function(){
			this.style.cursor='default';
			this.style.backgroundColor='#ffffff';
			this.style.color='#813D1C';
		}
	},
	'.expand-menu' : function(el){
		el.onclick = function(){
			swapMenuDisplay(this.getAttribute('id'));
		};
		el.onmouseover = function(){
			this.style.cursor='pointer';
		};
		el.onmouseout = function(){
			this.style.cursor='default';
		}
	}

	
};

Behaviour.register(myrules);