$(document).ready(function(){
	divvone=document.getElementById('fade');
	if(fadeOut){
		window.setTimeout(function() {
			$(divvone).fadeOut('1500',function() {
			    onFadeOutEnd();
			  }); 
		}, 100);
	}	
});

function expand(elem,width){
	//alert(elem.id);
	if(width=='')
		width='150';

	elem=document.getElementById(elem);
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800, easing: 'easeOutBounce'});
}

function contract(elem){
	//alert('out');
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:'5px'},{queue:false, duration:800, easing: 'easeOutBounce'});
}

function expand_sub(elem){
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:'10px',height:'23px'},{queue:false, duration:200});
	$(elem).css('background-color','#000000');
}

function contract_sub(elem){
	//alert('out');
	elem=document.getElementById(elem);
	$(elem).css('background-color','#cccccc');
	$(elem).stop().animate({width:'5px',height:'19px'},{queue:false, duration:200});
}

function expand_img(elem,width,showName){
	//alert(elem.id);
	name='#name_'+elem;//document.getElementById('name_'+elem);
	
	elem=document.getElementById(elem);	
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800});	
	
	if(showName){
		
		//$(name).stop().animate({opacity: 1.0}, {queue:false, duration:1000}, function() {  });
		$(name).stop(true, true).fadeIn(1000);
	}
	


	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
		
}

function contract_img(elem,width,hideName){
	
	name='#name_'+elem;//document.getElementById('name_'+elem);
	
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800});
	
	
	if(hideName){
		
		//$(name).stop().animate({opacity: 0.0}, 1000, function() { });
		$(name).stop(true, true).fadeOut(1000);
	}
	
	
}

function expand_section(elem){
	
	pElem=document.getElementById('p'+elem);
	hElem=document.getElementById('h'+elem);
	//alert($(elem).is(":visible"));
	$(pElem).stop().animate({height:'toggle'},{queue:false, duration:700});
	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
	$(hElem).toggleClass('minus');
		
}

function contract_section(elem,height){
	
	elem=document.getElementById(elem);
	
	$(elem).stop().animate({height:'show'},{queue:false, duration:700});
	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
		
}

