function Product(id,displayName,description,imageUrl,tout,subProducts,productType,maxQuantity) {
	this.id = id;
	this.displayName = displayName;
	this.description = description;
	this.imageUrl = imageUrl;
	this.tout = tout;
	this.subProducts = subProducts;
	this.productType = productType;
	this.maxQuantity = maxQuantity;
	
	this.getId = function() { return this.id; };
	this.getDisplayName = function() { return this.displayName==null ? "" : this.displayName; };
	this.getDescription = function() { return this.description==null ? "" : this.description; };
	this.getImageUrl = function() { return this.imageUrl==null ? "" : this.imageUrl; };
	this.getTout = function() { return this.tout==null ? "" : this.tout; };
	this.getSubProducts = function() { return this.subProducts==null ? "" : this.subProducts; };
	this.getProductType = function() { return this.productType==null ? "" : this.productType; };
	this.getMaxQuantity = function() { return this.maxQuantity==null ? "" : this.maxQuantity; };
	
	this.setId = function(id) { this.id=id; };
	this.setDisplayName = function(displayName) { this.displayName=displayName; };
	this.setDescription = function(description) { this.description=description; };
	this.setImageUrl = function(imageUrl) { this.imageUrl=imageUrl; };
	this.setTout = function(tout) { this.tout=tout; };
	this.setSubProducts = function(subProducts) { this.subProducts=subProducts; };
	this.setProductType = function(productType) { this.productType=productType; };
	this.setMaxQuantity = function(maxQuantity) { this.maxQuantity=maxQuantity; };
	
	this.toString = function() {
		return "Product{id:"+this.id+",displayName:"+this.displayName+",desc"+this.description+",imageUrl:"+this.imageUrl+",tout:"+this.tout+",subProducts:"+this.subProducts+",productType:"+this.productType+",maxQuantity:"+this.maxQuantity+"}";
	};
}

function parseProduct(product) {
	return new Product(product.id,product.displayName,product.description,product.imageUrl, product.tout, product.subProducts,product.productType,product.maxQuantity);
}

function Sku(id,displayName,listPrice,salePrice,onSale,softwareType,softwareTypeDisplay,deliveryMethod,deliveryMethodDisplay,languageCodes,languages,upgradeValidationType,vatLabelText,subItemArray,inCartXsellArray, formattedListPrice, formattedSalePrice,listPriceParts,salesPriceParts,rawTotalPrice,formattedRawTotalPrice,amount,formattedAmount) {
	
	this.id = id;
	this.displayName = displayName;
	this.listPrice = listPrice;
	this.salePrice = salePrice;
	this.onSale = onSale;
	this.softwareType = softwareType;
	this.softwareTypeDisplay = softwareTypeDisplay;
	this.deliveryMethod = deliveryMethod;
	this.deliveryMethodDisplay = deliveryMethodDisplay;
	this.subItemArray = subItemArray;
	//this.downloadInsurance = downloadInsurance;
	this.languageCodes = languageCodes; 
	this.languages = languages; 
	this.upgradeValidationType = upgradeValidationType;
	this.vatLabelText=vatLabelText;
	this.inCartXsellArray = inCartXsellArray;
	this.formattedListPrice = formattedListPrice;
	this.formattedSalePrice = formattedSalePrice;
	this.listPriceParts=listPriceParts;
	this.salesPriceParts=salesPriceParts;
	this.rawTotalPrice = rawTotalPrice;
	this.formattedRawTotalPrice = formattedRawTotalPrice;
	this.amount = amount;
	this.formattedAmount = formattedAmount;
	
	this.getId = function() { return this.id; };
	this.getDisplayName = function() { return this.displayName==null ? "" : this.displayName; };	
	this.getListPrice = function() { return this.listPrice==null || isNaN(this.listPrice) ? 0 : this.listPrice; };
	this.getSalePrice = function() { return this.salePrice==null || isNaN(this.salePrice) ? 0 : this.salePrice; };		
	this.isOnSale = function() { return this.onSale; };
	this.getSoftwareType = function() { return this.softwareType==null ? "" : this.softwareType; };
	this.getSoftwareTypeDisplay = function() { return this.softwareTypeDisplay==null ? "" : this.softwareTypeDisplay; };
	this.getDeliveryMethod = function() { return this.deliveryMethod==null ? "" : this.deliveryMethod; };
	this.getDeliveryMethodDisplay = function() {return this.deliveryMethodDisplay==null ? "" : this.deliveryMethodDisplay; };
	//this.getDownloadInsurance = function() { return this.downloadInsurance; };
	this.getLanguageCodes = function() { return this.languageCodes; };
	this.getLanguages = function() { return languages; };
	this.getUpgradeValidationType = function() { return this.upgradeValidationType; };
	this.getVatLabelText=function(){return this.vatLabelText;};
	
	//inCartOffer 
	this.getInCartXsellArray = function() { 
		var newInCartXsellArray =new Array();
		if(this.inCartXsellArray ){
			for(var i=0;i<this.inCartXsellArray.length;i++) {
				var inCartXsell = parseInCartXsell(inCartXsellArray[i]);
				 
				newInCartXsellArray[i] = inCartXsell;
			}
		} 
		
		return newInCartXsellArray;  
	};
	//sub item(download insurance/ free gift/ auto add item) 
	this.getSubItemArray = function() { 
		var newSubItemArray =new Array();
		if(this.subItemArray ){ 
			for(var i=0;i<this.subItemArray.length;i++) {
				var subItem = parseDownloadInsurance(subItemArray[i]);
				 
				newSubItemArray[i] = subItem;
			}
		} 
		
		return newSubItemArray;  
	};
	
	this.getFormattedListPrice = function() { return this.formattedListPrice;  };
	this.getFormattedSalePrice = function() { return this.formattedSalePrice;  };
	this.getListPriceParts = function() { return this.listPriceParts;  };
	this.getSalesPriceParts = function() { return this.salesPriceParts;  };
	
	this.getRawTotalPrice=function(){return this.rawTotalPrice;};
	this.getFormattedRawTotalPrice=function(){return this.formattedRawTotalPrice;};
	this.getAmount=function(){return this.amount;};
	this.getFormattedAmount=function(){return this.formattedAmount;};

	this.getLanguagesDisplay = function() {
		var langDisp = "";
		var needComma = false;
		if(this.languages)
			for(var i=0;i<this.languages.length;i++) {
				langDisp += (needComma ? ", " : "") + this.languages[i];
				needComma = true;
			}
		return langDisp;
	}
	
	this.setId = function(id) { this.id=id; };
	this.setDisplayName = function(displayName) { this.displayName=displayName; };	
	this.setListPrice = function(listPrice) { this.listPrice=listPrice; };
	this.setSalePrice = function(salePrice) { this.salePrice=salePrice; };
	this.setOnSale = function(onSale) { this.onSale=onSale; };
	this.setSoftwareType = function(softwareType) { this.softwareType=softwareType; };
	this.setSoftwareTypeDisplay = function(softwareTypeDisplay) { this.softwareTypeDisplay=softwareTypeDisplay; };
	this.setDeliveryMethod = function(deliveryMethod) { this.deliveryMethod=deliveryMethod; };
	this.setDeliveryMethodDisplay = function(deliveryMethodDisplay) { this.deliveryMethodDisplay=deliveryMethodDisplay; };
	this.setDownloadInsurance = function(downloadInsurance) { this.downloadInsuranceSku=downloadInsurance; };
	this.setLanguageCodes = function(languageCodes) { this.languageCodes=languageCodes; };
	this.setLanguages = function(languages) { this.languages=languages; };
	this.setUpgradeValidationType = function(upgradeValidationType) { this.upgradeValidationType=upgradeValidationType; };
	this.setVatLabelText = function(vatLabelText){this.vatLabelText=vatLabelText};
	//inCartOffer
	this.setInCartXsellArray = function(inCartXsellArray) { this.inCartXsellArray=inCartXsellArray; };
	this.setFormattedListPrice = function(formattedListPrice) { this.formattedListPrice=formattedListPrice; };
	this.setFormattedSalePrice = function(formattedSalePrice) { this.formattedSalePrice=formattedSalePrice; };
	this.setListPriceParts = function(listPriceParts) { this.listPriceParts=listPriceParts; };
	this.setSalesPriceParts = function(salesPriceParts) { this.salesPriceParts=salesPriceParts; };

	this.setRawTotalPrice = function(rawTotalPrice) { this.rawTotalPrice=rawTotalPrice; };
	this.setFormattedRawTotalPrice = function(formattedRawTotalPrice) { this.formattedRawTotalPrice=formattedRawTotalPrice; };
	this.setAmount = function(amount) { this.amount=amount; };
	this.setFormattedAmount = function(formattedAmount) { this.formattedAmount=formattedAmount; };
	
	this.toString = function() {
		return "Sku{id:"+this.id+",displayName:"+this.displayName+",listPrice:"+this.listPrice+",salePrice:"+this.salePrice+",onSale:"+this.onSale+",softwareType:"
		+this.softwareType+",softwareTypeDisplay:"+this.softwareTypeDisplay+",deliveryMethod:"+this.deliveryMethod+",deliveryMethodDisplay:"+this.deliveryMethodDisplay+",downloadInsurance:"+this.downloadInsurance+",languageCodes:"
		+this.languageCodes+",languages:"+this.languages+",inCartXsell:"+this.inCartXsell+",formattedListPrice:"+this.formattedListPrice+",formattedSalePrice:"+this.formattedSalePrice+"}";
	};
}

function parseSku(sku, downloadInsurance) {	
	return new Sku(sku.id,sku.displayName,sku.listPrice,sku.salePrice,sku.onSale,sku.softwareType,sku.softwareTypeDisplay,sku.deliveryMethod,sku.deliveryMethodDisplay,sku.langCodes,sku.languages,sku.upgradeValidationType,sku.vatLabelText,sku.subItemArray,sku.inCartXsellArray,sku.formattedListPrice,sku.formattedSalePrice,sku.listPriceParts,sku.salesPriceParts,sku.rawTotalPrice,sku.formattedRawTotalPrice,sku.amount,sku.formattedAmount);
}

function DownloadInsurance(id,listPrice,salePrice,description,imageUrl,productId,skuId,qty,displayName,promos,type,formattedListPrice,formattedSalePrice,rawTotalPrice,formattedRawTotalPrice,amount,formattedAmount,concatParentItemName,showQuantity) {
	this.id = id;
	this.listPrice = listPrice;
	this.formattedListPrice = formattedListPrice;
	this.salePrice = salePrice;
	this.formattedSalePrice = formattedSalePrice;
	this.description = description;
	this.imageUrl = imageUrl;
	this.productId = productId;
	this.skuId = skuId;
	this.qty = qty;
	this.displayName = displayName;
	this.promos = promos;
	this.type = type;
	this.rawTotalPrice = rawTotalPrice;
	this.formattedRawTotalPrice = formattedRawTotalPrice;
	this.amount = amount;
	this.formattedAmount = formattedAmount;
	this.concatParentItemName = concatParentItemName;
	this.showQuantity = showQuantity;
	
	this.getId = function() { return this.id; };
	this.getListPrice = function() { return this.listPrice==null || isNaN(this.listPrice) ? 0 : this.listPrice; };
	this.getFormattedListPrice = function() { return this.formattedListPrice==null ? "" : this.formattedListPrice; };
	this.getSalePrice = function() { return this.salePrice==null || isNaN(this.salePrice) ? 0 : this.salePrice; };
	this.getFormattedSalePrice = function() { return this.formattedSalePrice==null ? "" : this.formattedSalePrice;};
	this.getDescription = function() { return this.description==null ? "" : this.description; };
	this.getImageUrl = function() { return this.imageUrl==null ? "" : this.imageUrl; };
	this.getProductId = function() { return this.productId; };
	this.getSkuId = function() { return this.skuId; };
	this.getQuantity = function() { return this.qty; };
	this.getDisplayName = function() { return this.displayName; }; 
	this.getPromos = function() { return this.promos; }; 
	this.getType = function() { return this.type; };
	this.getOmnitureProductString = function(){
		var sprod = "c\;"+this.id+"\;"+this.qty+"\;";
		if (this.salePrice < this.listPrice){
			sprod +=this.salePrice;
		}else{
			sprod +=this.listPrice;
		}
		return sprod;
	}
	this.getRawTotalPrice=function(){return this.rawTotalPrice;};
	this.getFormattedRawTotalPrice=function(){return this.formattedRawTotalPrice;};
	this.getAmount=function(){return this.amount;};
	this.getFormattedAmount=function(){return this.formattedAmount;};
	this.isConcatParentItemName=function(){return this.concatParentItemName=="true";};
	this.isShowQuantity=function(){return this.showQuantity=="true";};
	
	this.setId = function(id) { this.id=id; };
	this.setListPrice = function(listPrice) { this.listPrice=listPrice; };
	this.setSalePrice = function(salePrice) { this.salePrice=salePrice; };
	this.setFormattedListPrice = function(formattedListPrice) { this.formattedListPrice=formattedListPrice; };
	this.setFormattedSalePrice = function(formattedSalePrice) { this.formattedSalePrice=formattedSalePrice; };
	this.setDescription = function(description) { this.description=description; };
	this.setImageUrl = function(imageUrl) { this.imageUrl=imageUrl; };
	this.setProductId = function(productId) { this.productId=productId; };
	this.setSkuId = function(skuId) { this.skuId=skuId; };
	this.setQuantity = function(qty) { this.qty=qty; };
	this.setPromos = function(promos) { this.promos=promos; };
	this.setType = function(type) { this.type=type; };
	this.setRawTotalPrice = function(rawTotalPrice) { this.rawTotalPrice=rawTotalPrice; };
	this.setFormattedRawTotalPrice = function(formattedRawTotalPrice) { this.formattedRawTotalPrice=formattedRawTotalPrice; };
	this.setAmount = function(amount) { this.amount=amount; };
	this.setFormattedAmount = function(formattedAmount) { this.formattedAmount=formattedAmount; };
	
	this.toString = function() {
		return "DownloadInsurance{"+this.id+",listPrice:"+this.listPrice+",salePrice:"+this.salePrice+",desc:"+this.description+",imageUrl:"+this.imageUrl+",skuId:"+this.skuId+",qty:"+this.qty+",displayName:" + this.displayName+",promos:" + this.promos+",type:" + this.type+",formattedListPrice:"+this.formattedListPrice+",formattedSalePrice:"+this.formattedSalePrice+"}";
	};
}

function parseDownloadInsurance(commerceItem) {
	return new DownloadInsurance(commerceItem.id,commerceItem.listPrice,commerceItem.salePrice,commerceItem.description,commerceItem.imageUrl,commerceItem.productId,commerceItem.skuId,commerceItem.qty, commerceItem.displayName, commerceItem.promos, commerceItem.type,commerceItem.formattedListPrice,commerceItem.formattedSalePrice,commerceItem.rawTotalPrice,commerceItem.formattedRawTotalPrice,commerceItem.amount,commerceItem.formattedAmount,commerceItem.concatParentItemName,commerceItem.showQuantity);
}

function CommerceItem(id,product,sku,qty,alterSkus,promos,currencySymbolText,includedInPurchase,updateText,removeText) {
	
	this.id = id;
	this.product = product;
	this.sku = sku;
	this.qty = qty;
	this.alterSkus = alterSkus;
	this.promos = promos;
	this.includedInPurchase=includedInPurchase;
	this.updateText=updateText;
	this.currencySymbolText=currencySymbolText;
	this.removeText=removeText;
	
	this.getId = function() { return this.id; };
	this.getProduct = function() { return this.product; };
	this.getSku = function() { return this.sku; };
	this.getQuantity = function() { return this.qty==null || isNaN(this.qty) ? 0 : this.qty; };
	this.getAlternativeSkus = function() { return this.alterSkus; };
	this.getPromos = function() { return this.promos; };
	
	this.getIncludedInPurchase= function() { return this.includedInPurchase; };
	this.getUpdateText= function() { return this.updateText; };
	this.getCurrencySymbolText= function() { return this.currencySymbolText; };
	this.getRemoveText= function() { return this.removeText; };
	this.getOmnitureProductString = function(){
		var sprod = "c\;"+this.sku.getId()+"\;"+this.qty+"\;";
		if (this.sku.isOnSale()){
			sprod +=this.sku.getSalePrice();
		}else{
			sprod +=this.sku.getListPrice();
		}
		return sprod;
	}
	
	this.setId = function(id) { this.id = id; };
	this.setProduct = function(product) { this.product=product; };
	this.setSku = function(sku) { this.sku = sku; };
	this.setQuantity = function(qty) { this.qty = qty; };
	this.setAlternativeSkus = function(alterSkus) { this.alterSkus = alterSkus; };
	this.setPromos = function(promos) { this.promos = promos; };
	
	
	
	this.toString = function() {
		return "CommerceItem{id:"+this.id+",product:"+this.product+",sku:"+this.sku+",qty:"+this.qty+",alterSkus:"+this.alterSkus+",promos:"+this.promos+"}";
	};
}

function parseInCartXsell(inCartXsell) {
	return new InCartXsell(inCartXsell.xsellSkuId,inCartXsell.xsellPrdId,inCartXsell.xsellName,inCartXsell.mediaType,inCartXsell.mediaData,inCartXsell.addToCartImgURL,inCartXsell.xsellSkuListPrice,inCartXsell.xsellSkuSalePrice,inCartXsell.xsellParentId);
}
function InCartXsell(xsellSkuId,xsellPrdId,xsellName,mediaType,mediaData,addToCartImgURL,xsellSkuListPrice,xsellSkuSalePrice,xsellParentId) {
	 
	this.xsellSkuId = xsellSkuId;
	this.xsellPrdId = xsellPrdId;
	this.xsellName = xsellName;
	this.mediaType = mediaType;
	this.mediaData = mediaData;
	this.addToCartImgURL = addToCartImgURL;
	this.xsellSkuListPrice = xsellSkuListPrice;
	this.xsellSkuSalePrice = xsellSkuSalePrice;
	this.xsellParentId = xsellParentId;
 	
	this.getXsellSkuId = function() { return this.xsellSkuId; };
	this.getXsellPrdId = function() { return this.xsellPrdId; };
	this.getXsellName = function() { return this.xsellName; };
	this.getMediaType = function() { return this.mediaType; };
	this.getMediaData = function() { return this.mediaData; };
	this.getAddToCartImgURL = function(){ return this.addToCartImgURL; };
	this.getXsellSkuListPrice = function() { return this.xsellSkuListPrice; };
	this.getXsellSkuSalePrice = function() { return this.xsellSkuSalePrice; };
	
	this.setXsellSkuId = function(xsellSkuId) { this.xsellSkuId = xsellSkuId; };
	this.setXsellPrdId = function(xsellPrdId) { this.xsellPrdId = xsellPrdId; };
	this.setXsellName = function(xsellName) { this.xsellName=xsellName; };
	this.setMediaType = function(mediaType) { this.mediaType = mediaType; };
	this.setMediaData = function(mediaData) { this.mediaData = mediaData; };
	this.setAddToCartImgURL = function(imgUrl){ this.addToCartImgURL = imgUrl; };
	this.setXsellSkuListPrice = function(xsellSkuListPrice) { this.xsellSkuListPrice = xsellSkuListPrice; };
	this.setXsellSkuSalePrice = function(xsellSkuSalePrice) { this.xsellSkuSalePrice = xsellSkuSalePrice; };
 	
	this.toString = function() {
		return "InCartXsell{xsellSkuId:"+this.xsellSkuId+",xsellPrdId:"+this.xsellPrdId+",xsellName:"+this.xsellName+",mediaType:"+this.mediaType+",mediaData:"+this.mediaData+",xsellSkuListPrice:"+this.xsellSkuListPrice+",xsellSkuSalePrice:"+this.xsellSkuSalePrice+"}";
	};
}

function Cart(/*discounted,totalSaving,subTotal,shipping,tax,total,isChangeShippingShown,*/items) {
	/*
	this.discounted = discounted;
	this.totalSaving = totalSaving;
	this.subTotal = subTotal;
	this.shipping = shipping;
	this.tax = tax;
	this.total = total;
	this.isChangeShippingShown = isChangeShippingShown;
	*/
	this.items = items;
	/*
	this.isDiscounted = function() { return this.discounted; };
	this.getTotalSaving = function() { return this.totalSaving==null || isNaN(this.totalSaving) ? 0 : this.totalSaving; };
	this.getSubTotal = function() { return this.subTotal==null || isNaN(this.subTotal) ? 0 : this.subTotal; };
	this.getShipping = function() { return this.shipping==null || isNaN(this.shipping) ? 0 : this.shipping; };
	this.getTax = function() { return this.tax==null || isNaN(this.tax) ? 0 : this.tax; };
	this.getTotal = function() { return this.total==null || isNaN(this.total) ? 0 : this.total; };
	*/
	this.getItems = function() { return this.items; };
	//this.isChangeShippingShown = function() { return this.isChangeShippingShown; };
	this.getItem = function(commerceId) {
		for (var i=0; i<this.items.length; i++) {
			if (this.items[i].getId()==commerceId) return this.items[i];
		}
		return null;
	};
	/*
	this.setDiscounted = function(discounted) { this.discounted=discounted; };
	this.setTotalSaving = function(totalSaving) { this.totalSaving=totalSaving; };
	this.setSubTotal = function(subTotal) { this.subTotal=subTotal; };
	this.setShipping = function(shipping) { this.shipping=shipping; };
	this.setTax = function(tax) { this.tax=tax; };
	this.setTotal = function(total) { this.total=total; };
	this.setChangeShippingShown = function(isChangeShippingShown) { this.isChangeShippingShown=isChangeShippingShown; };
	*/
	this.setItems = function(items) { this.items=items; };
	this.setItem = function(item) {
		for (var i=0; i<this.items.length; i++) {
			if (item.getId() == this.items[i].getId()) {
				this.items[i] = item;
				break;
			}
		}
	};
	
	this.removeItem = function(param) {
		if (param instanceof CommerceItem) {
			for (var i=0; i<this.items.length; i++) {
				if (this.items[i].getId() == param.getId()) {
					this.items[i] = null;
					break;
				}
			}
		} else {
			for (var i=0; i<this.items.length; i++) {
				if (param==this.items[i].getId()) {
					this.items[i] = null;
					break;
				}
			}
		}
	};
}

function parseCart(data) {
	var commerceItemList = new Array();
	for (var i=0; i<data.items.length; i++) {
		var alterSkuList = new Array();
		for (var j=0; j<data.items[i].alterSkus.length; j++) {
			alterSkuList[alterSkuList.length] = parseSku(data.items[i].alterSkus[j]);
		}
		commerceItemList[i] = new CommerceItem(
			data.items[i].commerceId,
			parseProduct(data.items[i].product),
			parseSku(data.items[i].sku,data.items[i].sku.downloadInsurance),
			data.items[i].qty,
			alterSkuList,
			data.items[i].promos,
			data.items[i].currencySymbolText,
			data.items[i].includedInPurchase,
			data.items[i].updateText,
			data.items[i].removeText
		);
	}
	return new Cart(/*data.isDiscounted,data.totalSaving,data.subTotal,data.shipping,data.tax,data.total,data.isChangeShippingShown,*/commerceItemList);
}

function intFormValidator() {
	this.invalidList = new Array();

	this.validate = function(minValue,maxValue,errMsg) {
		var pass = true;
		var intList = document.getElementsByTagName("INPUT");
		for (var i=0; i<intList.length; i++) {
			if (intList[i].id.indexOf("_quantity")<0) continue;			
			
			var intValue = new Number(intList[i].value);
			if (!intValue || isNaN(intValue) || !/^[1-9]\d*$/.test(intValue) || intValue<minValue || intValue>maxValue) {
				this.invalidList[intList[i].id] = new formNode(intList[i]);
				intList[i].style.borderColor = "#FF0000";
				intList[i].style.backgroundColor = "#FF9999";
				intList[i].style.color = "#FF0000";
				intList[i].style.borderWidth = "1px";
				if (errMsg) errMsg.style.display = "block";
				pass &= false;
			}
		}
		
		for (key in this.invalidList) {
			if(typeof(this.invalidList[key])!="object")
				continue;
			
            var node = document.getElementById(this.invalidList[key].getNode().id);
            if(node != null)
                var intValue = new Number(node.value);
            if(node == null || ( intValue && !isNaN(intValue) && /^[1-9]\d*$/.test(intValue) && intValue>=minValue && intValue<=maxValue)) {
                this.invalidList[key].resetToDefault();
                delete this.invalidList[key];
            }
        }
        
        var noError=true;
        for(key in this.invalidList) {
			if(typeof(this.invalidList[key])!="object")
				continue;
        	
            noError=false;
            break;
        }
        
        if(noError && errMsg)
            errMsg.style.display = "none";
		
		return pass;
	};
	
	this.doubleByteValidate = function(errMsg) {
		
		var intList = document.getElementsByTagName("INPUT");
		for ( var i = 0; i < intList.length; i++) {
			if (intList[i].id.indexOf("_quantity")<0) continue;	

			for ( var j = 0; j < intList[i].value.length; j++) {
				var tmp = escape(intList[i].value.charAt(j));
				
				if(tmp.charAt(1) == 'u'){					
					errMsg.style.display = "block";
					return false;
				}				
			}
		}
		errMsg.style.display = "none";
		return true;
	}
	
}

function formNode(node) {
	this.node = node;
	
	this.getNode = function() { return this.node; };
	this.setNode = function(node) { this.node = node; };
	
	this.resetToDefault = function() {
        node.style.borderColor = '';
        node.style.backgroundColor = '';
        node.style.color = '';
    };
}

