function Intro($element,userID,introTxt) {
	Intro.baseConstructor.call(this, null, "Intro"); 
	
	this.$element=$element;
	this.userID=userID;

	this.getIntroURL=MACEConstants.rootURL+"pages/mypage/php/getUserIntroduction.php";
	if(introTxt == "1")
		this.getTxt();
	else
		this.$element.html("");
	

}
Intro.extend(Component);




			
Intro.prototype.initDOMElems = function(){
	
}

Intro.prototype.getTxt = function(){


	var o={};

	o.userID=this.userID;
	
	var _this = this;

	// load results
	$.getJSON(this.getIntroURL, o, function(results){
			if(results.success){
				
					_this.$element.html(results.introTxt);
					$('#tab_container').tabs(1);
				
			} else {
				//some error msg
				
			}
		}
		,this.onError);
}



Intro.prototype.onError = function() {
	console.log("Error on retrieving User Introduction");
}

