window.addEvent('domready', function(){

	try {

	var mySlide = new Fx.Slide('more-options-drop');
		mySlide.hide();
	var open = false;

	$('toggle').addEvent('click', function(e){
			e = new Event(e).stop();
			mySlide.toggle();
			if (open) {
					 open = false;
					this.setStyle('background-image', 'url(expand-ani-up.gif)');
				} else {
					 open = true ;
					this.setStyle('background-image', 'url(expand-down.gif)');
				}
			e.stop();
		});

		if(document.location.search.indexOf('moreoptions') != -1) {
		  //mySlide.show();
		  mySlide.toggle(); //in Webkit browsers the show() thing doesn't quite work and it cuts of the bottom of the form/div, using toggle() instead
		  $('toggle').setStyle('background-image', 'url(expand-down.gif)');
		  open = true;
		}

	}
	catch(err) {}

});

