var aoeloginbox = {
		messageContainerId:'aoeloginbox-ajaxmessage',
		contentContainerId:'aoe_loginbox-content',
		formId:'aoe_loginform',
		messageContainerObject:null,
		
		init: function() {		
				this.messageContainerObject=$(this.messageContainerId);		
		
		},
		
    submitForm: function() {    
    	//aoeloginbox.init();
    	if (this.messageContainerId==null) {
    		console.error('messageeffect container id %s do not exist!',this.messageContainerId);
    	}
    	else {
	    	this.showWaitingContainer();    	  	
	    	new Ajax(ajaxRequestURLLogin, {
					method: 'post',
					data: $(this.formId),
					update: this.contentContainerId,
					evalScripts: true,
					onComplete: function(){console.log('ajax complete!'); this.hideWaitingContainer();}.bind(this)
				}).request();
			}
	    return false;
    },
    showWaitingContainer: function() {
    	this.messageContainerObject.setStyle('display', 'block');
			this.messageContainerObject.setStyle('opacity', '0');
    	//var myFx = new Fx.Style(this.containerObject, 'opacity').start(0,0.75).chain( function() { this.hideWaitingContainer()}.bind(this));
    	var myFx = new Fx.Style(this.messageContainerObject, 'opacity').start(0,0.75);
    	
    },
    hideWaitingContainer: function() {    	
    	var myFx = new Fx.Style(this.messageContainerObject, 'opacity').start(0.75,0);
    }
}



