function Video()
{
	this.oAjaxThreads = new Array();
	this.loadingThreads = 0;
	this.temp = new Array();
}


Video.prototype.getNextThread = function()
{
	var i = 0;
	
	if (this.oAjaxThreads.length == 0)
	{
		var oAjax = new AJAX();
		this.oAjaxThreads.push(oAjax);		
	}

	while (this.oAjaxThreads[i] && this.oAjaxThreads[i].working && i < this.oAjaxThreads.length )
	{
		i++;
	}
	
	if (!this.oAjaxThreads[i])
	{
		var oAjax = new AJAX();
		this.oAjaxThreads.push(oAjax);		
	}
	
	return this.oAjaxThreads[i];
}

Video.prototype.addComment = function()
{
	var bodyCommentDiv = document.getElementById("bodyCommentDiv");
	oDOMHelper.removeChilds(bodyCommentDiv);
	
	var textarea = document.createElement("textarea");
	textarea.setAttribute("id", "bodyComment");
	textarea.setAttribute("name", "bodyComment");
	textarea.setAttribute("value", "");
	bodyCommentDiv.appendChild(textarea);
	
	//<textarea id="bodyComment" name="bodyComment" value=""></textarea>
	
	oDOMHelper.toggleObjDisplayById('newComment');
	oUtils.createFCK('bodyComment', 520, 300, 'Basic');
}

Video.prototype.addCommentNotLogged = function()
{
	oDOMHelper.toggleObjDisplayById('newCommentNotLogged');
}

var oVideo = new Video();