YAHOO.namespace('taxi_firms');
YAHOO.taxi_firms.main = {

	YE: YAHOO.util.Event,
	Dom: YAHOO.util.Dom,

	init: function() {
		// find the div that holds the description
		tf.div = document.getElementById('form-description');
                tf.Dom.setStyle(tf.div, 'height', '0');
                tf.Dom.setStyle(tf.div, 'overflow', 'hidden');

                // get the 2 priority inputs
                tf.priy = document.getElementById('priority-yes');
                tf.prin = document.getElementById('priority-no');

                // add the listeners
                tf.YE.addListener(tf.priy, 'click', tf.yesClicked);
                tf.YE.addListener(tf.prin, 'click', tf.noClicked);
	},

        yesClicked: function() {
            var openDiv = new YAHOO.util.Anim(tf.div);
            openDiv.attributes.height = { to: 140 };
            openDiv.duration = 0.8;
            openDiv.method = YAHOO.util.Easing.easeOut;
            openDiv.animate();
        },

        noClicked: function() {
            var closeDiv = new YAHOO.util.Anim(tf.div);
            closeDiv.attributes.height = { to: 0 };
            closeDiv.duration = 0.8;
            closeDiv.method = YAHOO.util.Easing.easeOut;
            closeDiv.animate();
        }
	
}
tf = YAHOO.taxi_firms.main;
tf.YE.onDOMReady(tf.init);

