<!-- Begin
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false


function layerWrite(id,nestref,text)
{
	if (ns4)
	{
		var lyr = (nestref)? eval('document.'+nestref+'.document.'+id+'.document') : document.layers[id].document
		lyr.open()
		lyr.write(text)
		lyr.close()
	}
	else if (ie4) document.all[id].innerHTML = text
}

function ConvertTypeCodeToIndex(code)
{
	switch(code)
	{
		case 11:
			return 0;
		case 12:
			return 1;
		case 21:
			return 2;
		case 22:
			return 3;
		case 31:
			return 4;
		case 32:
			return 5;
		case 41:
			return 6;
		case 42:
			return 7;
		case 51:
			return 8;
		case 52:
			return 9;
		default:
			return 0;
	}
}

//---------------------------------------------------------------------||
// FUNCTION:    CKquantity                                             ||
// PARAMETERS:  Quantity to                                            ||
// RETURNS:     Quantity as a number, and possible alert               ||
// PURPOSE:     Make sure quantity is represented as a number          ||
//---------------------------------------------------------------------||
function CKquantity(checkString) {
   var strNewQuantity = "";

   for ( i = 0; i < checkString.length; i++ )
   {
      ch = checkString.substring(i, i+1);
      if ( (ch >= "0" && ch <= "9") || (ch == '.') )
         strNewQuantity += ch;
   }

   if ( strNewQuantity.length < 1 )
      strNewQuantity = "1";

   return(strNewQuantity);
}

//  End -->
