function UserComment(id)
{
	var self = this;
	this.comment_id = id;
	
	this.comment = document.getElementById(id);
	this.comment.onmouseover = function()
	{
		this.style.border = "1px solid #d1e3ec";
		this.style.backgroundColor = "#e6eff3";
	}

	this.comment.onmouseout = function()
	{
		this.style.border = "1px solid #FFF";
		this.style.backgroundColor = "#FFFFFF";
	}
	
	this.comment_value = this.comment.getElementsByTagName("div")[0].childNodes[0].nodeValue.replace(/\n|\r|\r\n/,"<br />");
	
	this.comment_cut = this.comment.getElementsByTagName("div")[0].childNodes[0].nodeValue.match(/^(.{0,50})/m).shift() + "...";
	this.comment.getElementsByTagName("div")[0].childNodes[0].nodeValue = this.comment_cut;
	

	this.flag = 0;
	
	this.span = this.comment.getElementsByTagName("span")[0];
	
	this.comment.onclick = function()
	{
		if(self.flag == 0)
		{
			this.getElementsByTagName("div")[0].innerHTML = self.comment_value;
			self.span.childNodes[0].nodeValue = "クリックで短くします"
			self.flag = 1;
		}else
		{
			this.getElementsByTagName("div")[0].innerHTML = self.comment_cut;
			self.span.childNodes[0].nodeValue = "さらに続きがあります"
			self.flag = 0;
		}
		
	}
	
}
