	function toggleComments(index) {
				
		var currentAnimation;
		var comment_title_on = dojo.byId('comment_title_on');
		var comment_title_off = dojo.byId('comment_title_off');
		var comment_display = dojo.byId('comment_display');  
		
		var wipeOut = dojo.fx.wipeOut({node: 'comment_display',duration: 1000});
		var wipeIn = dojo.fx.wipeIn({node: 'comment_display',duration: 1000});
		
		var formOut = dojo.fx.wipeOut({node: 'hideform',duration: 500});
		var formIn = dojo.fx.wipeIn({node: 'hideform',duration: 500});
		
		var animOut = dojo.fx.combine([wipeOut,formOut]);
		var animIn = dojo.fx.combine([wipeIn,formIn])
		
		var display = comment_display.getAttribute('displayed');
		var hider = dojo.byId('hider');
		var hideform = dojo.byId('hideform');
		
			if (display == 'on') {
				currentAnimation = animIn;
				hider.setAttribute('src',openImg);
				display = 'off';
			} else {
				currentAnimation = animOut;
				hider.setAttribute('src',closeImg);
				display = 'on';
			}
			
		comment_display.setAttribute('displayed', display);
		
		currentAnimation.play();
		
	}
	
	function toggleInit() {
		var currentAnimation;
		var comment_display = dojo.byId('comment_display');
		var hideform = dojo.byId('hideform');
		
		//comment_display.setAttribute('style','height:0px;overflow:hidden;margin: 0;padding: 0');
		//hideform.setAttribute('style','height:0px;overflow:hidden;margin: 0;padding: 0');
		
		var wipeOut = dojo.fx.wipeOut({node: 'comment_display',duration: 100});
		var formOut = dojo.fx.wipeOut({node: 'hideform',duration: 100});
		var animOut = dojo.fx.combine([wipeOut,formOut]);
		currentAnimation = animOut;
		
		display = 'on';
		comment_display.setAttribute('displayed', display);
		currentAnimation.play();
		
		//alert('initted');
	}

	dojo.addOnLoad(function(){
	
		var hider = dojo.byId('hider');
		var hideform = dojo.byId('hideform');
		var hiderdiv = dojo.byId('hiderdiv');
		//dojo.connect(hider,'onclick',toggleComments);
		dojo.connect(hiderdiv,'onclick',toggleComments);
		if(document.location.search.substr(1) != 'comments=true') {
			toggleInit();
		}
	});
