if(!dojo._hasResource["pb.widget.DialogProductLineItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["pb.widget.DialogProductLineItem"] = true;
dojo.provide("pb.widget.DialogProductLineItem");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("pb.widget.DialogProductLineItem", [dijit._Widget, dijit._Templated], {
	templatePath: dojo.moduleUrl("pb", _globaltemplateBaseUrl + "DialogProductLineItem/dojo.cfm"),

	setPrice: function(price){
		this.price.innerHTML = "Price: <span class='dynamic-text'>$" + price + " each" + "</span><br/>";
	},
	setTitle: function(title){
		this.title.innerHTML = title + "<br/>";
	},
	setSku: function(sku){
		this.sku.innerHTML = "Item: <span class='dynamic-text'>" + sku + "</span><br/>";
	},
	setQuantity: function(quantity){
		this.quantity.innerHTML = "Qty: <span class='dynamic-text'>" + quantity + "</span><br/>";
	},
	setGiftWrap: function(giftwrap){
		this.giftwrap.innerHTML = "Gift Wrap: <span class='dynamic-text'>" + giftwrap + "</span><br/>";
	},
	setImgSrc: function(src){
		this.productImage.src = src;
		if(src != "")
			this.productImage.style["display"] = "";
	},
	setImgAlt: function(alt){
		this.productImage.alt = alt;
	},
	setBackorder: function(backorder){
		this.backorder.innerHTML = "Available to ship after " + backorder;
	},
	setSendTo: function(sendTo){
		this.sendTo.innerHTML = "Ship to: <span class='dynamic-text'>" + sendTo + "</span><br/>";
	},
	setMonogram: function(monogramAttributes){
		this.monogram.style["display"] = '';
		var monogramInnerHTML = "<span class='dynamic-text'>";
		monogramInnerHTML += monogramAttributes["styleLine"];
		if((monogramAttributes["colorLine"] != undefined) && (monogramAttributes["colorLine"] != ''))
			monogramInnerHTML += ", " + monogramAttributes["colorLine"];
		
		//add the line break if the styleLine or colorLine exist - CS
		if(((monogramAttributes["colorLine"] != undefined) && (monogramAttributes["colorLine"] != '')) || ((monogramAttributes["styleLine"] != undefined) && (monogramAttributes["styleLine"] != '')))
			monogramInnerHTML += "<br />";
			
		var textArray = monogramAttributes["monogramText"];
		for(var i = 0; i < textArray.length; i++){
			monogramInnerHTML += textArray[i];
			if(i != (textArray.length - 1))
				monogramInnerHTML += "<br />";
		}
		
		monogramInnerHTML +="</span>";
		this.monogramLineItems.innerHTML = monogramInnerHTML;
	},
	setSVC: function(svcAttributes){
		this.setSendTo(svcAttributes["sendTo"]);
		
		//append all together and if length after trim = 0, bail. -CS
		var testForEmptyAttributes = svcAttributes["to"] + svcAttributes["from"] + svcAttributes["message1"] + svcAttributes["message2"];
		var length = dojo.string.trim(testForEmptyAttributes).length;
		if(length == 0)
			return;
		
		if(svcAttributes["to"] && (dojo.string.trim(svcAttributes["to"]) != "")){
			this.svcTo.style["display"] = '';
			this.svcTo.innerHTML = "To: <span class='dynamic-text'>" + svcAttributes["to"] + "</span>";
		}

		if(svcAttributes["from"] && (dojo.string.trim(svcAttributes["from"]) != "")){
			this.svcFrom.style["display"] = '';
			this.svcFrom.innerHTML = "From: <span class='dynamic-text'>" + svcAttributes["from"] + "</span>";
		}
		
		if(svcAttributes["message1"] && (dojo.string.trim(svcAttributes["message1"]) != "")){
			this.svcMessageLine1.style["display"] = '';
			this.svcMessageLine1.innerHTML = "Message: <span class='dynamic-text'>" + svcAttributes["message1"] + "</span>";
		}
		
		if(dojo.string.trim(svcAttributes["message2"]).length > 0){
			if(svcAttributes["message1"] && (dojo.string.trim(svcAttributes["message1"]) == "")){
				this.svcMessageLine1.style["display"] = '';
				this.svcMessageLine1.innerHTML = "Message: <span class='dynamic-text'> </span>";
			}				
			this.svcMessageLine2.style["display"] = '';
			this.svcMessageLine2.innerHTML = "<span class='dynamic-text'>" + svcAttributes["message2"] + "</span>";
		}
	}
});

}
