
function PricePopUpWindow()
{
}

PricePopUpWindow.prototype =
{
	show : function()
	{
		// global rowID
		// global rowOrderID
		if (rowID !== null && rowOrderID !== null)
		{
			if (bNotesVisible())		showNotes		(false);
			if (bPreferenceVisible())	showPreference	(false);
			if (bDetailDivVisible())	showDetail		(false);
			if (bLabelTypeVisible())	showLabelType	(false);
			
			itemRow	= window.document.getElementById("row_" + rowID);
			qtyRow	= window.document.getElementById("qty_" + rowID);
			
			itemOrderRow		= document.getElementById("orderrow_"		+ rowOrderID);
			itemOrderNotesRow	= document.getElementById("orderrow_notes_"	+ rowOrderID);
			qtyOrderRow			= document.getElementById("orderrow_qty_"	+ rowOrderID);
			
			if (qtyRow !== null && itemRow !== null)
			{
				var itemCode	= itemRow.getAttribute("name");
				var itemQty		= qtyRow.innerHTML.valueOf();
				sendPriceAJAX(itemCode, itemQty);
			}
			else if (itemOrderRow !== null && qtyOrderRow !== null)
			{
				var itemCode	= itemOrderRow.getAttribute("name");
				var itemType	= itemOrderNotesRow.getAttribute("name");
				var itemQty		= qtyOrderRow.innerHTML.valueOf();
				if (itemQty.indexOf("<") == 0)
				{
					var start = itemQty.indexOf(">");
					var end = itemQty.indexOf("<", start);
					itemQty = itemQty.substring(start+1, end);
					sendPriceAJAX(itemCode, itemQty, itemType);
					//alert(itemCode + "," + itemType + "," + itemQty);
				}
			}
		}
	}
}
