var Index = new function() {	
		
	this.Logout = function() {
		document.location.href="index.php?mod=community&exec=logout";
	};
	
	this.profile = function() {
		document.location.href="index.php?mod=account";
	};	

	this.sms = function() {
		document.location.href="index.php";
	};
	
	this.getlogin = function() {
		var url = "index.php?mod=community&exec=submit";
		var params = Form.serialize("frmLogin");
		var target = 'loginError';

		var ajax = new Ajax.Updater(
			{success: target},
			url,
			{	method: 'post', 
				parameters: params,
				evalScripts: true,
				onComplete: function(res) { 
				},
				onLoading: function(res) { 
					$(target).innerHTML = "<img src='images/loading.gif'/>"; 
				},
				onFailure: function() { 
					$(target).innerHTML = "An error occurred"; 
				} 
			});
	};

}

