$TravelCompanion = {
	index: 1

}
TravelCompanion = function(){
	this.$ = $TravelCompanion;
	this.$.index +=1;
	this.parent = arguments[0];
	this.init();

}
TravelCompanion.prototype.init = function(){
	// INCREMENT THE TC-COUNT FIELD
	var count = document.getElementById("tc_count");
	count.value = this.$.index;
	
	//::
	
	// CREATE THE UL ELEMENT
	var ul = document.createElement("ul");
	ul.className = "nth-child";
	document.getElementById(this.parent).appendChild(ul);
	
	//::
	
	// CREATE THE TITLE LI ELEMENT
	var li = document.createElement("li");
	ul.appendChild(li);
	
	// CREATE THE TITLE LABEL ELEMENT
	var label = document.createElement("label");
	label.htmlFor = "tc_title_" + this.$.index;
	label.appendChild(document.createTextNode("Title"));
	li.appendChild(label);
	
	// CREATE THE TITLE SELECT ELEMENT
	var select = document.createElement("select");
	select.id = "tc_title_" + this.$.index;
	select.name = "tc_title_" + this.$.index;
	li.appendChild(select);
	
	var option = document.createElement("option");
	option.appendChild(document.createTextNode("Mr."));
	select.appendChild(option);
	
	var option = document.createElement("option");
	option.appendChild(document.createTextNode("Mrs."));
	select.appendChild(option);
	
	var option = document.createElement("option");
	option.appendChild(document.createTextNode("Ms."));
	select.appendChild(option);
	
	var option = document.createElement("option");
	option.appendChild(document.createTextNode("Dr."));
	select.appendChild(option);
	
	//::
	
	// CREATE FIRST NAME LI ELEMENT
	var li = document.createElement("li");
	ul.appendChild(li);
	
	// CREATE FIRST NAME LABEL ELEMENT
	var label = document.createElement("label");
	label.htmlFor = "tc_first_name_" + this.$.index;
	label.appendChild(document.createTextNode("First Name"));
	li.appendChild(label);
	
	// CREATE FIRST NAME INPUT ELEMENT
	var input = document.createElement("input");
	input.id = "tc_first_name_" + this.$.index;
	input.name = "tc_first_name_" + this.$.index;
	li.appendChild(input);
	
	// CREATE REMOVE TC LINK
	var link = document.createElement("a");
	link.title = "Remove Travel Companion";
	link.href = "javascript:void(0);";
	link.style.paddingLeft = "2em";
	link.appendChild(document.createTextNode("Remove Travel Companion"));
	link.onclick = function() {$removeElement(this.parentNode.parentNode)};
	li.appendChild(link);
	
	//::
	
	
	// CREATE LAST NAME LI ELEMENT
	var li = document.createElement("li");
	ul.appendChild(li);
	
	// CREATE LAST NAME LABEL ELEMENT
	var label = document.createElement("label");
	label.htmlFor = "tc_last_name_" + this.$.index;
	label.appendChild(document.createTextNode("Last Name"));
	li.appendChild(label);
	
	// CREATE LAST NAME INPUT ELEMENT
	var input = document.createElement("input");
	input.id = "tc_last_name_" + this.$.index;
	input.name = "tc_last_name_" + this.$.index;
	li.appendChild(input);
	
}