   var showMinPrice = 10;
var showMaxPrice = 50 - showMinPrice;


function showMinPriceOnPRular(finalMinVal,minVal){
       var showmin = 0;
       if ((finalMinVal+minVal) > showMinPrice)
       {
         showmin =  Math.floor((finalMinVal+minVal)/10);
         showmin =  (showmin * 10) - showMinPrice;
       }
       return showmin;
}

function showMaxPriceOnPRular(finalMaxVal,maxVal){
        var showmax =  Math.floor((maxVal-finalMaxVal)/10);
        showmax =  (showmax * 10) +showMaxPrice;
    	return showmax;
}

/*

	Product Class & its methods

*/

function Product(id,price,unit,builtin){
    this.prodId = id;
    this.price = price;
    this.priceUnit = unit;
    this.isBuiltIn = builtin;
    
    this.usps = new Array();
    this.classifications = new Array();
    this.colours = new Array();


	function addClassification(classif){
		with(this){
			classifications.push(classif);
		}
	}

	this.addClassification = addClassification;

	function addColour(colour){
		with(this){
			colours.push(colour);
		}
	}

	this.addColour = addColour;

	function addUsp(usp){
		with(this){
			usps.push(usp);
		}
	}

	this.addUsp = addUsp;
}

/*
     Classsification Class & its Methods
*/

function Classification(classid,desc){
	this.desc = desc;
	this.classid = classid;

	this.specs = new Array();

	function addSpecification(spec){
		with(this){
			specs.push(spec);
		}
	}

	this.addSpecification = addSpecification;
}

/*

Specification Class & its Methods

*/

function Specification(specid,name,value){
	this.specid = specid;
	this.name = name;
	this.value = value;
}

