<!--

/*
This JavaScript code, and all associated software and file structures, calling or called 
by this code, are copyrighted material, and may not be copied or duplicated in any manner 
whatsoever without prior written authorization.  All applicable trademarks, registrations, 
& copyrights (© 2000-2001) are property of Phil Astrella, Registry Enterprises.
*/

function sortRelease(sortRecord)
  {
	var relflag = false ;
	for (sx = 0 ; sx <= sortArray.length ; sx++)
	  {
		var currRecord	= sortArray[sx] ;
		var nextRecord	= sortArray[sx+1] ;
		if ((sx == 0) && (currRecord == null))
		  {
			sortArray[0] = sortRecord ;
			var relFlag = true ;
			releaseCount++ ;
			break
		  }
		if ((sx == 0) && (sortRecord < currRecord))
		  {
			for (nx = sortArray.length ; nx > sx ; nx--)
			  {
				sortArray[nx] = sortArray[nx-1]
			  }
			sortArray[sx] = sortRecord ;
			var relFlag = true ;
			releaseCount++ ;
			break
		  }
		if ((sortRecord > currRecord) && (nextRecord == null))
		  {
			sortArray[sx+1] = sortRecord ;
			var relFlag = true ;
			releaseCount++ ;
			break
		  }
		if ((sortRecord >= currRecord) && (sortRecord <= nextRecord))
		  {
			for (nx = sortArray.length ; nx > sx+1 ; nx--)
			  {
				sortArray[nx] = sortArray[nx-1]
			  }
			sortArray[nx] = sortRecord ;
			var relFlag = true ;
			releaseCount++ ;
			break
		  }
	  }
	if (!relFlag)
	  {
		sortArray[sortArray.length] = sortRecord ;
		releaseCount++
	  }
  }

//-->
