/* Portfolio requires prototype & scriptaculous*/
var ChangeListings_Current = 'website';
 
function ChangeListings(ApplyToDiv) {
	
	if(ApplyToDiv != ChangeListings_Current){
		
		/*Set On*/
		ChangeClass('btn_'+ApplyToDiv, 'portfoliomenuoff');
		/*Remove Old*/
		ChangeClass('btn_'+ChangeListings_Current, 'portfoliomenu');		
		
		new Effect.SlideUp(ChangeListings_Current, {afterFinish : function() { _OpenNew(); }});
			
		function _OpenNew(){
			new Effect.SlideDown(ApplyToDiv);
			ChangeListings_Current = ApplyToDiv;
		}
 	}

}

function ChangeClass(elmID, Strclass){
	var currTabElem = document.getElementById(elmID); 
	currTabElem.setAttribute("class", Strclass);
	currTabElem.setAttribute("className", Strclass); 
}
