var lastFromPartInd = 0;
var lastToPartInd = 0;

function createFromPartInd()
{
	lastFromPartInd++;
	textBoxName1 = 'Part_PartID#' + lastFromPartInd;
	textBoxName2 = 'Part_Quantity' + lastFromPartInd;
	textBoxName3 = 'Part_Description ' + lastFromPartInd;
	divName = 'input_' + 'fromPartInd' + lastFromPartInd
	return '<div id="' + divName + '"><font face="Tahoma" size="2"><label>  Part ID#<input type="text" name="' + textBoxName1 + '" size="25"></label><label>  Quantity<input type="text" name="' + textBoxName2 + '" size="4"></label><label>  Description<input type="text" name="' + textBoxName3 + '" size="44"></label></font><br><button onclick="javascript:deleteNode(\'' + divName + '\')">Remove</button></div>';
}

function createToPartInd()
{
	lastToPartInd++;
	textBoxName1 = 'Part_PartID#' + lastToPartInd;
	textBoxName2 = 'Part_Quantity' + lastToPartInd;
	textBoxName3 = 'Part_Description ' + lastToPartInd;
	divName = 'input_' + 'toPartInd' + lastToPartInd
	return '<div id="' + divName + '"><font face="Tahoma" size="2"><label>  Part ID# <input type="text" name="' + textBoxName1 + '" size="25"></label><label>  Quantity <input type="text" name="' + textBoxName2 + '" size="4"></label><label>  Description <input type="text" name="' + textBoxName3 + '" size="44"></label></font><br><button onclick="javascript:deleteNode(\'' + divName + '\')">Remove</button></div>';
}


function deleteNode(nodeId)
{
	c = document.getElementById(nodeId)
	p = c.parentNode
	p.removeChild(c)
}

function addInput(containerDivId, createFunction)
{
	document.getElementById(containerDivId).innerHTML += createFunction();
}
