<!--

     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.
// ************************************************************************************************

// ================================================================================================
// This function checks all the values on the Member.asp page to ensure the user's input is okay.
// ================================================================================================

function checkMember(thisUID){
         var arrTags = new Array("FName","LName","Email","Addr1","City","States_0","Ctry_0") ;
         var arrText = new Array("First name","Last name","E-mail address","Billing address","Billing City","Billing State","Billing Country") ;

// ------------------------------------------------------------------------------------------------
// Step through the array of known Billing fields and check their values.
// ------------------------------------------------------------------------------------------------

         for (var i = 0; i < arrTags.length; i++){
              var thisField = eval("document.GSCART.Bill_" + arrTags[i]) ;

              if (thisField.value == "" || thisField.value == "_pick_"){
                  alert("Please enter your " + arrText[i] + ".") ;
                  thisField.focus() ;
                  thisField.select() ;
                  return ;
                 }

              if (arrTags[i] == "Email"){
                  if (!checkEmail(thisField)){
                      alert("You have entered an invalid e-mail address.") ;
                      thisField.focus() ;
                      thisField.select() ;
                      return ;
                     }
                 }

              if (arrTags[i] == "Ctry_0"){
                  if (document.GSCART.Bill_Zip.value == ""){
                      alert("Please enter your Billing Zip code.") ;
                      document.GSCART.Bill_Zip.focus() ;
                      document.GSCART.Bill_Zip.select() ;
                      return ;
                     }
                 }
             }

// ------------------------------------------------------------------------------------------------
// Step through the array of known Shipping fields and check their values.
// ------------------------------------------------------------------------------------------------

         var arrTags = new Array("Addr1","City","States_0","Ctry_0") ;
         var arrText = new Array("Shipping address","Shipping City","Shipping State","Shipping Country") ;

         for (var i = 0; i < arrTags.length; i++){
              var thisField = eval("document.GSCART.Ship_" + arrTags[i]) ;

              if (thisField.value == "" || thisField.value == "_pick_"){
                  alert("Please enter your " + arrText[i] + ".") ;
                  thisField.focus() ;
                  thisField.select() ;
                  return ;
                 }

              if (arrTags[i] == "Ctry_0"){
                  if (document.GSCART.Bill_Zip.value == ""){
                      alert("Please enter your Shipping Zip code.") ;
                      document.GSCART.Bill_Zip.focus() ;
                      document.GSCART.Bill_Zip.select() ;
                      return ;
                     }
                 }
             }

// ------------------------------------------------------------------------------------------------
// Now check the visitor's key membership details.
// ------------------------------------------------------------------------------------------------

         var thisPswd  = document.GSCART.User_Pswd ;
         var thisPswdV = document.GSCART.User_Pswd_V ;
         var thisQ     = document.GSCART.User_Question ;
         var thisA     = document.GSCART.User_Answer ;
         var thisDOB   = document.GSCART.User_DOB ;
         var thisOptIn = document.GSCART.User_OptIn ;

          if (thisPswd.value == ""){
              alert("Please enter a password.") ;
              thisPswd.focus() ;
              thisPswd.select() ;
              return ;
             }

          if (thisPswdV.value == ""){
              alert("Please re-enter your password for verification.") ;
              thisPswdV.focus() ;
              thisPswdV.select() ;
              return ;
             }

          if (thisPswd.value != thisPswdV.value){
              alert("Sorry, but the password you\nre-entered does not match.") ;
              thisPswdV.focus() ;
              thisPswdV.select() ;
              return ;
             }

          if (thisQ.value == ""){
              alert("Please specify your security question.") ;
              thisQ.focus() ;
              thisQ.select() ;
              return ;
             }

          if (thisA.value == ""){
              alert("Please specify the answer to your security question.") ;
              thisA.focus() ;
              thisA.select() ;
              return ;
             }

// ------------------------------------------------------------------------------------------------
// Check to see if they entered a date of birth. If they did, validate it. Otherwise ignore it.
// ------------------------------------------------------------------------------------------------

         var DoB = document.GSCART.User_DOB ;

         if (DoB.value != ""){
            if (isNaN(DoB.value)){
                alert("Please enter a valid year as a 4 digit number.") ;
                DoB.focus() ;
                DoB.select() ;
                return ;
               }
            }

// ------------------------------------------------------------------------------------------------
// Now we are ready to submit the form and process it on the server side.
// ------------------------------------------------------------------------------------------------

         document.GSCART.Action.value = "SAVE" ;
         document.GSCART.UserID.value = thisUID ;
         document.GSCART.submit() ;
         }

function copyBillDetail(){
         var clickAction = eval("document.GSCART.CopyBill") ;

         if (!clickAction.checked){ return ; }
         if (document.GSCART.BuyerSelf.value == "True"){
             buyerSelf = "YES" ;
            }
         else { buyerSelf = "NO" ; }

         if (buyerSelf != "YES"){ return ; }

         document.GSCART.Ship_Co.value       = document.GSCART.Bill_Co.value ;
         document.GSCART.Ship_Addr1.value    = document.GSCART.Bill_Addr1.value ;
         document.GSCART.Ship_Addr2.value    = document.GSCART.Bill_Addr2.value ;
         document.GSCART.Ship_City.value     = document.GSCART.Bill_City.value ;
         document.GSCART.Ship_States_0.value = document.GSCART.Bill_States_0.value ;
         document.GSCART.Ship_Zip.value      = document.GSCART.Bill_Zip.value ;
         document.GSCART.Ship_Ctry_0.value   = document.GSCART.Bill_Ctry_0.value ;
         document.GSCART.Ship_Phone.value    = document.GSCART.Bill_Phone.value ;

         return ;
         }

function ShowMsg(thisMsg, tagName){
         if (thisMsg != ""){
             var thisTag = eval("document.GSCART." + tagName) ;
             alert(thisMsg) ;
             thisTag.focus() ;
             thisTag.select() ;
            }

         return ;
         }

// -->