/****************************************************
 * Creates a modal login box. Requires statcModal.js*
 ****************************************************/
 
  // If the stc namespace doesn't already exist, create it.
 
 if(!stc) var stc = new Object();
 
 stc.mlog = {
 
 	// The initialization function
 	init: function() {
 		this.logLink = document.getElementById("staticNavLogin");
 		YAHOO.util.Event.addListener(this.logLink, "click", stc.mlog.start);
 	},
 	
 	// Get the template and pass it to the next function
 	start: function(e) {
 		YAHOO.util.Event.preventDefault(e);
		
		var params = new Array();
		
		params['responseFunction'] = stc.mlog.display;
		params['templateName'] = 'component/loadLogMod';
		params['action'] = 'loadTemplate';
		params['responseType'] = 'JSON';
		params['handlerName'] = 'one_ajax_templateLoader';
		params['requestType'] = 'class';
		params['sdb'] = 1;
		
		OneAjax.request(params);
 	},
 	
 	display: function(o) {
 		stc.mlog.mbc = new stc.modal();
 		stc.mlog.mbc.cssName = "static_login";
 		stc.mlog.mbc.boxTitle = '<span id="logCloser"><a href="#">close</a></span>';
 		stc.mlog.mbc.content = o.output;
 		stc.mlog.mbc.create();
 		YAHOO.util.Event.addListener("logCloser", "click", function(e){stc.mlog.mbc.destroy(stc.mlog.mbc.cssName);YAHOO.util.Event.preventDefault(e);});
 		stc.mlog.mbc.appear();
 	}
 
 }