var DealerLogin = Class.create();
DealerLogin.prototype = {
	initialize: function(p_aOptions) {
	    this.m_sLinkIDRemove = Object.isArray(p_aOptions.LinkIDRemove) ? p_aOptions.LinkIDRemove : ['goLink1'];
		this.m_sDealerDivID = Object.isString(p_aOptions.DealerDivID) ? p_aOptions.DealerDivID : 'dealerContDv';
		this.m_sDealerDiv = $(this.m_sDealerDivID);
		this.m_sCloseDealerEm = Object.isString(p_aOptions.CloseDealerEm) ? p_aOptions.CloseDealerEm : 'closeDealerButton';
		this.CloseDealerEm = $(this.m_sCloseDealerEm);
		
		var i;
		for(i=0;i<this.m_sLinkIDRemove.length;i++){
			var em = $(this.m_sLinkIDRemove[i]); 
			Event.observe( em, 'click', this._onDealerClick.bindAsEventListener( this, em) );
		}
		
		Event.observe(this.CloseDealerEm , 'click', this._onDealerCloseClick.bindAsEventListener( this, this.CloseDealerEm ) );
	},
	
	_onDealerClick : function(p_eEvent, p_eContainerDiv){
		p_eEvent.stop();
		window.scroll(0,0);
		this.m_sDealerDiv.hide();
		this.m_sDealerDiv.setStyle({width:'950px',height:'239px',top:'118px'});
		new Effect.Grow(this.m_sDealerDiv, {direction: 'center'});
	},
	
	_onDealerCloseClick : function(p_eEvent, p_eAnchor){
		p_eEvent.stop();
		new Effect.Shrink(this.m_sDealerDiv, {direction: 'center'});
	}
};