<!--

     var findWindow = null ;
     var isNS = (navigator.appName=="Netscape") ;
     var myBrowser = (isNS) ? "NS":"IE" ;
     var myCart = "" ;

     var strVer = navigator.appVersion ;
     var strShow = (isNS)?"show":"visible" ;
     var scrWidth = screen.width ;
     var intWidth = 0 ;
     var strWidth = "" ;

         window.defaultStatus = "GourmetSleuth.com" ;

// ************************************************************************************************
// Function used throughout GourmetSleuth.com.
// ************************************************************************************************

function Converter(){
         var myQty = document.GSCALC.qty ;

         if (!validateQty(myQty.value)){
             myQty.focus() ;
             myQty.select() ;
             return ;
            }

         var idxFr = document.GSCALC.uomFr.selectedIndex ;

         if (idxFr == 0){
             alert("Please choose a measure.") ;
             document.GSCALC.uomFr.focus() ;
             document.GSCALC.uomFr.select() ;
             return ;
            }

         var idxTo = document.GSCALC.uomTo.selectedIndex ;

         frUOM = document.GSCALC.uomFr[idxFr].value ;
         toUOM = document.GSCALC.uomTo[idxTo].value ;

         document.GSCALC.UOM_FR.value = frUOM ;
         document.GSCALC.UOM_TO.value = toUOM ;
         document.GSCALC.QTY_FR.value = myQty.value ;
         document.GSCALC.Action.value = "GetConv" ;
         document.GSCALC.submit() ;
         }

function PickFoodGrp(){
         idxFG = document.GSCALC.FoodGrp.selectedIndex ;

         document.GSCALC.FG.value = document.GSCALC.FoodGrp[idxFG].value ;
         document.GSCALC.Action.value = "GetItm" ;
         document.GSCALC.submit() ;
         }

function PickFoodItm(){
         idxFI = document.GSCALC.FoodItm.selectedIndex ;

         document.GSCALC.FI.value = document.GSCALC.FoodItm[idxFI].value ;
         document.GSCALC.Action.value = "GetUom" ;
         document.GSCALC.submit() ;
         }

function placeCursor(thisField){
         var cursorField = eval("document.GSCALC." + thisField) ;
         cursorField.focus() ;
         return ;
         }

function validateQty(thisQty){
         validChars = "0123456789." ;
         thisQty = thisQty.replace(/ /g,"") ;

         if (thisQty == ""){
             alert("Please specify the value you wish to convert.") ;
             return false ;
            }

         if (isNaN(thisQty)){
             alert("You have entered an invalid number.\nFractions must be in decimal format:\nExample: enter 1 1/8 as 1.125.") ;
             return false ;
            }

         for (var i = 0; i < thisQty.length; i++){
              thisChar = thisQty.charAt(i) ;
              if (validChars.indexOf(thisChar) < 0){ 
                  alert("You have entered an invalid number.") ;
                  return false ;
                 }
             }

          document.GSCALC.qty.value = thisQty ;
          return true ;
         }

// -->