function user() {
	var status = 'offline';
	var statusInterval = undefined;
	var id = undefined;
	var firstname = undefined;
	var lastname = undefined;
	this.link = function() {
		if(this.firstname && this.lastname && this.id) {
			return '/'+this.firstname+'-'+this.lastname+'-'+'profilen_my_i'+this.id+'.html';
		}
	}
	this.add2ContactList = function(uid) {
		$.get('/profile_my_i'+uid+'.html?favorites&obj_id='+uid+'&type_id=4');
		var button = document.getElementById("replaceButtonSwf");
		var text = '<a href="'+this.link()+'">'+this.firstname+' '+this.lastname+'</a> added you to contact list.';
		button.sendPM(uid,text);
		$('#a2cl').removeClass('obttn').addClass('bttn-grey-small').find('span').html('Added to contact list');
	}
	
	this.set = function(uid, firstname, lastname) {
		this.id = uid;
		this.firstname = firstname;
		this.lastname  = lastname;
	}
    
}

var curuser = new user();

/*
 $(document).ajaxStart(function() {
    $("#layer, #ajaxlayer").fadeIn(500);
 });
 $(document).ajaxComplete(function() {
    $("#layer, #ajaxlayer").fadeOut(100);
 });
 /*
 $("#layer").bind("ajaxSend", function(){
   $(this).fadeIn(500);
 }).bind("ajaxComplete", function(){
   $(this).hide();
 });*/
