function catlistitem ( cid, title, shortdesc, price, link, invstatus )
	{
	this.cid = cid ;
	this.title = title ;
	this.invstatus = invstatus ;
	this.shortdesc = shortdesc ;
	this.price = price ;
	this.link = link ;
	this.selected = 0 ;
	}

function sortItemsByPriceAscending ( a, b )
	{
	return a.price - b.price  ;
	}
		   
function sortItemsByPriceDescending ( a, b )
	{
	return b.price - a.price ;
	}

function sortItemsByCidAscending ( a, b )
	{
	if ( a.cid > b.cid )
		{
		return 1 ;
		}
	else if ( a.cid < b.cid )
		{
		return -1 ;
		}
	else
		{
		return 0 ;
		}
	}

function sortItemsByCidDescending ( a, b )
	{
	if ( b.cid > a.cid )
		{
		return 1 ;
		}
	else if ( b.cid < a.cid )
		{
		return -1 ;
		}
	else
		{
		return 0 ;
		}
	}


function sortItemsByTitleAscending ( a, b )
	{
	if ( a.title > b.title )
		{
		return 1 ;
		}
	else if ( a.title < b.title )
		{
		return -1 ;
		}
	else
		{
		return 0 ;
		}
	}

function sortItemsByTitleDescending ( a, b )
	{
	if ( b.title > a.title )
		{
		return 1 ;
		}
	else if ( b.title < a.title )
		{
		return -1 ;
		}
	else
		{
		return 0 ;
		}
	}
