/* - - - - - - - - - - - - - - - - - - - - - - -
 JavaScript
 Friday, April 22, 2005 12:11:17 PM
 - - - - - - - - - - - - - - - - - - - - - - - */


     /*   VALIDATION  FOR  DESTINATION  FIELD  */

     function Srsubmit()
     {
     var ct=document.Srhform.City.value;
     if (ct == "")
     {
     alert ( "Please   enter  a  value  for   destination ");
     document.Srhform.City.setfocus();
     }
     else
     {
     document.Srhform.submit();
     }
     }
     /*   POPUP  WINDOW  FOR   PAYMENT  OPTIONS  */
     function  pay_win(opt)
     {

     window.open("bank_detail.php?opt="+opt, "Bank"+opt,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=430, height=270")

     }

     /*    POPUP  WINDOW  FOR  HOTEL PHOTOS    */

     function  photo_win(hid,pid)
     {
     window.open("photo_display.php?ht="+hid+"&pt="+pid, "photo"+hid,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500")
     }

     /*   POPUP  WINDOW  FOR   HOTEL  DETAILS  */

     function  more_win(hid,chin,chout,person,sroom,droom)
     {
	 window.open("search_more.php?ht="+hid+"&ckin="+chin+"&ckout="+chout+"&person="+person+"&sr="+sroom+"&dr="+droom, "","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=630, height=550")
     }

     /*   POPUP  WINDOW  FOR   ROOM CATEGORY   DETAILS  */

     function  category_win(hid,chin)
     {
      window.open("category_details.php?ht="+hid+"&ckin="+chin, "category","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=630, height=350")
     }


     /*   CATEGORY  DETAILS   VALIDATION  */

     function category_validate()
     {
        for(i=0;i<document.frmcat.category.length;i++)
        {
           if (document.frmcat.category[i].checked)
           {
              opener.document.frmbook3.category.value=document.frmcat.category[i].value
              opener.document.getElementById('spTable').rows[4].cells[1].innerHTML="<b>Room Category : </b>";
              opener.document.getElementById('spTable').rows[4].cells[2].innerHTML="<b>"+document.frmcat.category[i].value+"</b>"
              self.window.close();
           }
        }
     }

      /*   POPUP  WINDOW  FOR   TERMS  AND  CONDITIONS */

     function  terms_win()
     {
      window.open("http://www.nethrs.com/terms.html", "terms","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=630, height=350")
     }

     /*         CHECKBOX   VALIDATION          */

     function checkPolicy3()
     {
        if(document.frmbook3.Policy.checked == true)
        {
            document.frmbook3.B3.style.backgroundColor="#707056";
            document.frmbook3.B3.disabled=false;
        }
        else
        {
           document.frmbook3.B3.style.backgroundColor="#ECE9D8";
           document.frmbook3.B3.disabled=true;
        }
     }
	 
	 function checkPolicy2()
     {
        if(document.frmbook2.Policy.checked == true)
        {
            document.frmbook2.B3.style.backgroundColor="#707056";
            document.frmbook2.B3.disabled=false;
        }
        else
        {
           document.frmbook2.B3.style.backgroundColor="#ECE9D8";
           document.frmbook2.B3.disabled=true;
        }
     }
	 
	 function checkPolicy1()
     {
        if(document.frmbook1.Policy.checked == true)
        {
            document.frmbook1.B3.style.backgroundColor="#707056";
            document.frmbook1.B3.disabled=false;
        }
        else
        {
           document.frmbook1.B3.style.backgroundColor="#ECE9D8";
           document.frmbook1.B3.disabled=true;
        }
     }

     /*         EMAIL ID   VALIDATION         */

     function echeck(str)
        {
            var at="@";
            var dot=".";
            var lat=str.indexOf(at);
            var lstr=str.length;
            var ldot=str.indexOf(dot);
            if (str.indexOf(at)==-1)
            {
               alert("Invalid E-mail ID");
               return false;
            }

            if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
            {
               alert("Invalid E-mail ID");
               return false;
            }

            if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
            {
                alert("Invalid E-mail ID");
                return false;
            }

             if (str.indexOf(at,(lat+1))!=-1)
             {
                alert("Invalid E-mail ID");
                return false;
             }

             if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
             {
                alert("Invalid E-mail ID");
                return false;
             }

             if (str.indexOf(dot,(lat+2))==-1)
             {
                alert("Invalid E-mail ID");
                return false;
             }

             if (str.indexOf(" ")!=-1)
             {
                alert("Invalid E-mail ID");
                return false;
             }

            return true;
        }


      /*   VALIDATION  FOR  BOOKING  PAGE      */

      function   checkName()
       {

          var  fst_nm=document.frmbook3.Fname.value;
          var  lst_nm=document.frmbook3.Lname.value;
          var  zip=document.frmbook3.Zip.value;
          var  street=document.frmbook3.Street.value;
          var  city=document.frmbook3.City.value;
          var  phone=document.frmbook3.Phone.value;
          var  email=document.frmbook3.Email.value;
          var  sex=document.frmbook3.Gender.selectedValue;
          var  country=document.frmbook3.Country.selectedValue;
          var i;

         if( echeck(email)==false )
          {
              //emailID.value="";
              document.frmbook3.Email.focus();
              return false;

          }
          if (sex == " ")
          {
           alert(" Please   specify  your  Salutation ");
           document.frmbook3.Gender.focus();
           return false;
          }
          else if (fst_nm == "")
          {
           alert(" First  Name  Cannot  be  Empty ");
           document.frmbook3.Fname.focus();
           return false;
          }
          else if (lst_nm == "")
          {
           alert(" Last  Name  Cannot  be  Empty ");
           document.frmbook3.Lname.focus();
           return false;
          }
           else if (street == "")
          {
           alert(" Street  Field  Cannot  be  Empty ");
           document.frmbook3.Street.focus();
           return false;
          }
          else if (city == "")
          {
           alert(" City  Field  Cannot  be  Empty ");
           document.frmbook3.City.focus();
           return false;
          }
          else if (zip == "")
          {
           alert(" Zip  Field  Cannot  be  Empty ");
           document.frmbook3.Zip.focus();
           return false;
          }
          else if (country == " ")
          {
           alert(" Please  select your country ");
           document.frmbook3.Country.focus();
           return false;
          }
          else if (phone == "")
          {
           alert(" Phone  Field  Cannot  be  Empty ");
           document.frmbook3.Phone.focus();
           return false;
          }
          else if(zip != "")
          {
           if( zip.length < 5)
           {
                 alert(" Invalid  Zip Code ");
                 document.frmbook3.Zip.focus();
                return false;
           }

            for(i=0; i < zip.length; i++)
            {
              var  no=zip.chatAt(i);
              if (((no < "0") || (no > "9")))
              { alert(" Zip  Field  Cannot contain  characters ");
                document.frmbook3.Zip.focus();
                return false;
              }
            }

          }
          else if(phone != "")
          {
          if( phone.length < 5)
           {
                 alert(" Invalid  Phone Number ");
                 document.frmbook3.Phone.focus();
                 return false;
           }
            for(i=0; i < phone.length; i++)
            {
              var no1=phone.chatAt(i);
              if(((no1 < "0")  || (no1 > "9")))
              { alert(" Phone  Field  Cannot contain  characters ");
                document.frmbook3.Phone.focus();
                return false;
              }
            }

          }
          return true;

        }

     /*         IMAGE   RESIZING

     function im_rsz(im)
     {
       if (document.images[].im.height <= 250 && document.images[].im.width <= 250)
       {

       }

     }  */


/***********************************SUNITA**************************************/

        //Index page
        function submitIndex()
        {
            if(document.frmIndex.txtUserName.value=="")
            {
                alert("Please enter your user name");
                return false;
            }
            var emailID=document.frmIndex.txtUserName;
            if (echeck(emailID.value)==false)
            {
                emailID.value="";
                emailID.focus();
                return false;
            }
            if(document.frmIndex.txtPassword.value=="")
            {
                alert("Please enter the password");
                return false;
            }
            document.frmIndex.submit();
        }



        //Login
        function submitLogin()
        {
            if(document.frmLogin.txtUserName.value=="")
            {
                alert("Please enter your Email");
                return false;
            }
            var emailID=document.frmLogin.txtUserName;
            if (echeck(emailID.value)==false)
            {
                emailID.value="";
                emailID.focus();
                return false;
            }
            if(document.frmLogin.txtPassword.value=="")
            {
                alert("Please enter the password");
                return false;
            }
            document.frmLogin.submit();
            //return false;
        }

        //Forgot Password
        function submitFgtPwd()
        {
            document.frmForgotPwd.submit();
        }

        //New User Registration
        function AgreedUser()
        {
            if(document.frmSignup.checkboxTaCAgreed.checked == true)
            {
                document.frmSignup.B3.style.backgroundColor="#707056";
                document.frmSignup.B3.disabled=false;
            }
            else
            {
                document.frmSignup.B3.style.backgroundColor="#ECE9D8";
                document.frmSignup.B3.disabled=true;
            }
        }

        function submitUser()
        {
          //PHONE

          if(document.frmSignup.txtfirstname.value=="")
          {
              alert("Please enter first name");
              document.frmSignup.txtfirstname.focus();
              return false;
          }
          if(document.frmSignup.txtlastname.value=="")
          {
              alert("Please enter last name");
              document.frmSignup.txtlastname.focus();
              return false;
          }
          if(document.frmSignup.txtZip.value=="")
          {
              alert("Please enter zip code");
              document.frmSignup.txtZip.focus();
              return false;
          }

            var zip=document.frmSignup.txtZip;
            if (checkInternationalPhone(zip.value)==false)
            {
                alert("Please Enter a Valid Zip Code");
                zip.value="";
                zip.focus();
                return false;
            }

          if(document.frmSignup.txtPhone.value=="")
          {
              alert("Please enter phone number");
              document.frmSignup.txtPhone.focus();
              return false;
          }

          var Phone=document.frmSignup.txtPhone;
          if (checkInternationalPhone(Phone.value)==false)
          {
              alert("Please Enter a Valid Phone Number");
              Phone.value="";
              Phone.focus();
              return false;
          }

          if(document.frmSignup.txtFax.value != "")
          {
            var Fax=document.frmSignup.txtFax;
            if (checkInternationalPhone(Fax.value)==false)
            {
                alert("Please Enter a Valid Fax Number");
                Fax.value="";
                Fax.focus();
                return false;
            }
          }

          if(document.frmSignup.txtMobile.value != "")
          {
            var Mobile=document.frmSignup.txtMobile;
            if (checkInternationalPhone(Mobile.value)==false)
            {
                alert("Please Enter a Valid Mobile Number");
                Mobile.value="";
                Mobile.focus();
                return false;
            }
          }

          if(document.frmSignup.txtEmail.value=="")
          {
              alert("Please enter email");
              document.frmSignup.txtEmail.focus();
              return false;
          }

          var emailID=document.frmSignup.txtEmail;
          if (echeck(emailID.value)==false)
          {
              emailID.value="";
              emailID.focus();
              return false;
          }

          if(document.frmSignup.txtRepeatEmail.value=="")
          {
              alert("Please repeat the email");
              document.frmSignup.txtRepeatEmail.focus();
              return false;
          }

          if (document.frmSignup.txtEmail.value != document.frmSignup.txtRepeatEmail.value)
          {
              alert("Email mismatch");
              document.frmSignup.txtRepeatEmail.focus();
              return false;
          }
          document.frmSignup.submit();
         // return false;
        }

        //New Hotel Registration
        function AgreedHtl()
        {
            if(document.frmHotelSignup.checkboxTaCAgreed.checked == true)
            {
                document.frmHotelSignup.B3.style.backgroundColor="#707056";
                document.frmHotelSignup.B3.disabled=false;
            }
            else
            {
                document.frmHotelSignup.B3.style.backgroundColor="#ECE9D8";
                document.frmHotelSignup.B3.disabled=true;
            }
        }

        function submitNewHtl()
        {
            //PHONE

            if(document.frmHotelSignup.txtHotelname.value=="")
            {
                alert("Please enter hotel name");
                document.frmHotelSignup.txtHotelname.focus();
                return false;
            }
            if(document.frmHotelSignup.txtZip.value=="")
            {
                alert("Please enter zip code");
                document.frmHotelSignup.txtZip.focus();
                return false;
            }

            var zip=document.frmHotelSignup.txtZip;
            if (checkInternationalPhone(zip.value)==false)
            {
                alert("Please Enter a Valid Zip Code");
                zip.value="";
                zip.focus();
                return false;
            }

            if(document.frmHotelSignup.txtPhone.value=="")
            {
                alert("Please enter phone number");
                document.frmHotelSignup.txtPhone.focus();
                return false;
            }

            var Phone=document.frmHotelSignup.txtPhone;
            if (checkInternationalPhone(Phone.value)==false)
            {
                alert("Please Enter a Valid Phone Number");
                Phone.value="";
                Phone.focus();
                return false;
            }

            var Fax=document.frmHotelSignup.txtFax;
            if(Fax.value != "")
            {
              if (checkInternationalPhone(Fax.value)==false)
              {
                  alert("Please Enter a Valid Fax Number");
                  Fax.value="";
                  Fax.focus();
                  return false;
              }
            }
            if(document.frmHotelSignup.txtEmail.value=="")
            {
                alert("Please enter email");
                document.frmHotelSignup.txtEmail.focus();
                return false;
            }

            if(document.frmHotelSignup.txtRooms.value=="")
            {
                alert("Please enter the no.of rooms");
                document.frmHotelSignup.txtRooms.focus();
                return false;
            }

            var emailID=document.frmHotelSignup.txtEmail;
            if (echeck(emailID.value)==false)
            {
                emailID.value="";
                emailID.focus();
                return false;
            }

             if(document.frmHotelSignup.txtFirstname.value=="")
            {
                alert("Please enter first name");
                document.frmHotelSignup.txtFirstname.focus();
                return false;
            }

            document.frmHotelSignup.submit();
            // return false;
        }

        //Hotel1
        function submitHotel1()
        {
          if(document.frmHotelEdit1.hotel_name.value=="")
          {
              alert("Please enter hotel name");
              return false;
          }
          if(document.frmHotelEdit1.hotel_tel.value=="")
          {
              alert("Please enter hotel telephone");
              return false;
          }

          var Phone=document.frmHotelEdit1.hotel_tel;
          if (checkInternationalPhone(Phone.value)==false)
          {
              alert("Please Enter a Valid Hotel Phone Number");
              Phone.value="";
              Phone.focus();
              return false;
          }

          var Fax=document.frmHotelEdit1.hotel_fax;
          if (Fax.value!="")
          {
              if (checkInternationalPhone(Fax.value)==false)
              {
                  alert("Please Enter a Valid Hotel Fax Number");
                  Fax.value="";
                  Fax.focus();
                  return false;
              }
          }

          if(document.frmHotelEdit1.hotel_email.value=="")
          {
              alert("Please enter hotel email");
              document.frmHotelEdit1.hotel_email.focus();
              return false;
          }

          var emailID=document.frmHotelEdit1.hotel_email;
          if (echeck(emailID.value)==false)
          {
              emailID.value="";
              emailID.focus();
              return false;
          }

          var chk;
          chk=false;
          for (i=0; i<document.frmHotelEdit1.elements.length; i++)
          {
              if(document.frmHotelEdit1.elements[i].name=="promoters[]")
              {
                  if(document.frmHotelEdit1.elements[i].checked == true)
                  {
                      chk=true;
                  }
              }
          }
          if (chk==false)
          {
              alert("Please select promoter");
              return false;
          }

          if(document.frmHotelEdit1.contact_name.value=="")
          {
              alert("Please enter contact name");
              document.frmHotelEdit1.contact_name.focus();
              return false;
          }
          if(document.frmHotelEdit1.contact_email.value=="")
          {
              alert("Please enter contact email");
              document.frmHotelEdit1.contact_email.focus();
              return false;
          }

          var emailID1=document.frmHotelEdit1.contact_email;
          if (echeck(emailID1.value)==false)
          {
              emailID1.value="";
              emailID1.focus();
              return false;
          }

          if(document.frmHotelEdit1.contact_tel.value=="")
          {
              alert("Please enter contact telephone");
              document.frmHotelEdit1.contact_tel.focus();
              return false;
          }

          var Phone1=document.frmHotelEdit1.contact_tel;
          if (checkInternationalPhone(Phone1.value)==false)
          {
              alert("Please Enter a Valid Contact Phone Number");
              Phone1.value="";
              Phone1.focus();
              return false;
          }

          var Fax1=document.frmHotelEdit1.contact_fax;
          if (Fax1.value!="")
          {
              if (checkInternationalPhone(Fax1.value)==false)
              {
                  alert("Please Enter a Valid Contact Fax Number");
                  Fax1.value="";
                  Fax1.focus();
                  return false;
              }
          }
          document.frmHotelEdit1.submit();
          return false;
    }

    //Hotel2
    function submitHotel2()
    {
        var chk1;
        chk1=false;
        for (i=0; i<document.frmHotelEdit2.elements.length; i++)
        {
            if(document.frmHotelEdit2.elements[i].name=="type_of_hotel[]")
            {
                if(document.frmHotelEdit2.elements[i].checked == true)
                {
                    chk1=true;
                }
            }
        }
        if(chk1==false)
        {
            alert("Please select hotel type");
            return false;
        }

        var chk2;
        chk2=false;
        for (i=0; i<document.frmHotelEdit2.elements.length; i++)
        {
            if(document.frmHotelEdit2.elements[i].name=="type_of_rooms[]")
            {
                if(document.frmHotelEdit2.elements[i].checked == true)
                {
                    chk2=true;
                }
            }
        }
        if(chk2==false)
        {
            alert("Please select room type");
            return false;
        }

        var chk3;
        chk3=false;
        for (i=0; i<document.frmHotelEdit2.elements.length; i++)
        {
            if(document.frmHotelEdit2.elements[i].name=="hotel_facilities[]")
            {
                if(document.frmHotelEdit2.elements[i].checked == true)
                {
                    chk3=true;
                }
            }
        }
        if(chk3==false)
        {
            alert("Please select hotel facilities");
            return false;
        }

        var chk4;
        chk4=false;
        for (i=0; i<document.frmHotelEdit2.elements.length; i++)
        {
            if(document.frmHotelEdit2.elements[i].name=="room_facilities[]")
            {
                if(document.frmHotelEdit2.elements[i].checked == true)
                {
                    chk4=true;
                }
            }
        }
        if(chk4==false)
        {
            alert("Please select room facilities");
            return false;
        }
        document.frmHotelEdit2.submit();
        return false;
    }

    //Hotel3
    function submitHotel3()
    {
        if(document.frmHotelEdit3.hotel_photo1=="")
        {
            alert("Please select Hotel Logo");
            return false;
        }
        if(document.frmHotelEdit3.hotel_photo2=="")
        {
            alert("Please select Hotel Photo");
            return false;
        }
        if(document.frmHotelEdit3.hotel_photo3=="")
        {
            alert("Please select Room Photo");
            return false;

        }
        document.frmHotelEdit3.submit();
        return false;
    }

    //Change Booking
    function checkPolicy1()
     {
        if(document.frmChangeBooking.Policy.checked == true)
        {
            document.frmChangeBooking.B3.style.backgroundColor="#707056";
            document.frmChangeBooking.B3.disabled=false;
        }
        else
        {
           document.frmChangeBooking.B3.style.backgroundColor="#ECE9D8";
           document.frmChangeBooking.B3.disabled=true;
        }
     }

     //Package Booking
     function bookPackage()
     {
         if(document.frmPackage.rd.checked == false)
         {
             alert("Please select a package");
         }
         document.frmPackage.submit();
     }

     function AgreedUser1()
        {
            if(document.frmPackageBooking.checkboxTaCAgreed.checked == true)
            {
                document.frmPackageBooking.B3.style.backgroundColor="#707056";
                document.frmPackageBooking.B3.disabled=false;
            }
            else
            {
                document.frmPackageBooking.B3.style.backgroundColor="#ECE9D8";
                document.frmPackageBooking.B3.disabled=true;
            }
        }

     function submitUser1()
        {
          //PHONE

          if(document.frmPackageBooking.txtfirstname.value=="")
          {
              alert("Please enter first name");
              document.frmPackageBooking.txtfirstname.focus();
              return false;
          }
          if(document.frmPackageBooking.txtlastname.value=="")
          {
              alert("Please enter last name");
              document.frmPackageBooking.txtlastname.focus();
              return false;
          }
          if(document.frmPackageBooking.txtZip.value=="")
          {
              alert("Please enter zip code");
              document.frmPackageBooking.txtZip.focus();
              return false;
          }

            var zip=document.frmPackageBooking.txtZip;
            if (checkInternationalPhone(zip.value)==false)
            {
                alert("Please Enter a Valid Zip Code");
                zip.value="";
                zip.focus();
                return false;
            }

          if(document.frmPackageBooking.txtPhone.value=="")
          {
              alert("Please enter phone number");
              document.frmPackageBooking.txtPhone.focus();
              return false;
          }

          var Phone=document.frmPackageBooking.txtPhone;
          if (checkInternationalPhone(Phone.value)==false)
          {
              alert("Please Enter a Valid Phone Number");
              Phone.value="";
              Phone.focus();
              return false;
          }

          if(document.frmPackageBooking.txtFax.value != "")
          {
            var Fax=document.frmPackageBooking.txtFax;
            if (checkInternationalPhone(Fax.value)==false)
            {
                alert("Please Enter a Valid Fax Number");
                Fax.value="";
                Fax.focus();
                return false;
            }
          }

          if(document.frmPackageBooking.txtMobile.value != "")
          {
            var Mobile=document.frmPackageBooking.txtMobile;
            if (checkInternationalPhone(Mobile.value)==false)
            {
                alert("Please Enter a Valid Mobile Number");
                Mobile.value="";
                Mobile.focus();
                return false;
            }
          }

          if(document.frmPackageBooking.txtEmail.value=="")
          {
              alert("Please enter email");
              document.frmPackageBooking.txtEmail.focus();
              return false;
          }

          var emailID=document.frmPackageBooking.txtEmail;
          if (echeck(emailID.value)==false)
          {
              emailID.value="";
              emailID.focus();
              return false;
          }

          if(document.frmPackageBooking.txtRepeatEmail.value=="")
          {
              alert("Please repeat the email");
              document.frmPackageBooking.txtRepeatEmail.focus();
              return false;
          }

          if (document.frmPackageBooking.txtEmail.value != document.frmPackageBooking.txtRepeatEmail.value)
          {
              alert("Email mismatch");
              document.frmPackageBooking.txtRepeatEmail.focus();
              return false;
          }
          document.frmPackageBooking.submit();
         // return false;
        }

        function pay()
        {
            var chk;
            chk=false;
            for (i=0; i<document.frmEdit.elements.length; i++)
            {
                if(document.frmEdit.elements[i].name=="payoption")
                {
                    if(document.frmEdit.elements[i].checked == true)
                    {
                        chk=true;
                    }
                }
            }
            if (chk==false)
            {
               alert("Please select a payment option");
               return false;
            }
            if (chk==true)
            {
               document.frmbook4.submit();
            }
        }

        function check_avail(hid,chin,chout,person,sroom,droom)
        {
            window.open("room_category.php?ht="+hid+"&ckin="+chin+"&ckout="+chout+"&person="+person+"&sr="+sroom+"&dr="+droom, "","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=480")
        }

      function   checkName1()
       {

          var  fst_nm=document.frmbook1.Fname.value;
          var  lst_nm=document.frmbook1.Lname.value;
          var  zip=document.frmbook1.Zip.value;
          var  street=document.frmbook1.Street.value;
          var  city=document.frmbook1.City.value;
          var  phone=document.frmbook1.Phone.value;
          var  email=document.frmbook1.Email.value;
          var  sex=document.frmbook1.Gender.selectedValue;
          var  country=document.frmbook1.Country.selectedValue;
          var i;

         if( echeck(email)==false )
          {
              //emailID.value="";
              document.frmbook1.Email.focus();
              return false;

          }
          if (sex == " ")
          {
           alert(" Please   specify  your  Salutation ");
           document.frmbook1.Gender.focus();
           return false;
          }
          else if (fst_nm == "")
          {
           alert(" First  Name  Cannot  be  Empty ");
           document.frmbook1.Fname.focus();
           return false;
          }
          else if (lst_nm == "")
          {
           alert(" Last  Name  Cannot  be  Empty ");
           document.frmbook1.Lname.focus();
           return false;
          }
           else if (street == "")
          {
           alert(" Street  Field  Cannot  be  Empty ");
           document.frmbook1.Street.focus();
           return false;
          }
          else if (city == "")
          {
           alert(" City  Field  Cannot  be  Empty ");
           document.frmbook1.City.focus();
           return false;
          }
          else if (zip == "")
          {
           alert(" Zip  Field  Cannot  be  Empty ");
           document.frmbook1.Zip.focus();
           return false;
          }
          else if (country == " ")
          {
           alert(" Please  select your country ");
           document.frmbook1.Country.focus();
           return false;
          }
          else if (phone == "")
          {
           alert(" Phone  Field  Cannot  be  Empty ");
           document.frmbook1.Phone.focus();
           return false;
          }
          else if(zip != "")
          {
           if( zip.length < 5)
           {
                 alert(" Invalid  Zip Code ");
                 document.frmbook1.Zip.focus();
                return false;
           }

            for(i=0; i < zip.length; i++)
            {
              var  no=zip.chatAt(i);
              if (((no < "0") || (no > "9")))
              { alert(" Zip  Field  Cannot contain  characters ");
                document.frmbook1.Zip.focus();
                return false;
              }
            }

          }
          else if(phone != "")
          {
          if( phone.length < 5)
           {
                 alert(" Invalid  Phone Number ");
                 document.frmbook1.Phone.focus();
                 return false;
           }
            for(i=0; i < phone.length; i++)
            {
              var no1=phone.chatAt(i);
              if(((no1 < "0")  || (no1 > "9")))
              { alert(" Phone  Field  Cannot contain  characters ");
                document.frmbook1.Phone.focus();
                return false;
              }
            }

          }
          return true;

        }
		
		function   checkName2()
       {

          var  fst_nm=document.frmbook2.Fname.value;
          var  lst_nm=document.frmbook2.Lname.value;
          var  zip=document.frmbook2.Zip.value;
          var  street=document.frmbook2.Street.value;
          var  city=document.frmbook2.City.value;
          var  phone=document.frmbook2.Phone.value;
          var  email=document.frmbook2.Email.value;
          var  sex=document.frmbook2.Gender.selectedValue;
          var  country=document.frmbook2.Country.selectedValue;
          var i;

         if( echeck(email)==false )
          {
              //emailID.value="";
              document.frmbook2.Email.focus();
              return false;

          }
          if (sex == " ")
          {
           alert(" Please   specify  your  Salutation ");
           document.frmbook2.Gender.focus();
           return false;
          }
          else if (fst_nm == "")
          {
           alert(" First  Name  Cannot  be  Empty ");
           document.frmbook2.Fname.focus();
           return false;
          }
          else if (lst_nm == "")
          {
           alert(" Last  Name  Cannot  be  Empty ");
           document.frmbook2.Lname.focus();
           return false;
          }
           else if (street == "")
          {
           alert(" Street  Field  Cannot  be  Empty ");
           document.frmbook2.Street.focus();
           return false;
          }
          else if (city == "")
          {
           alert(" City  Field  Cannot  be  Empty ");
           document.frmbook2.City.focus();
           return false;
          }
          else if (zip == "")
          {
           alert(" Zip  Field  Cannot  be  Empty ");
           document.frmbook2.Zip.focus();
           return false;
          }
          else if (country == " ")
          {
           alert(" Please  select your country ");
           document.frmbook2.Country.focus();
           return false;
          }
          else if (phone == "")
          {
           alert(" Phone  Field  Cannot  be  Empty ");
           document.frmbook2.Phone.focus();
           return false;
          }
          else if(zip != "")
          {
           if( zip.length < 5)
           {
                 alert(" Invalid  Zip Code ");
                 document.frmbook2.Zip.focus();
                return false;
           }

            for(i=0; i < zip.length; i++)
            {
              var  no=zip.chatAt(i);
              if (((no < "0") || (no > "9")))
              { alert(" Zip  Field  Cannot contain  characters ");
                document.frmbook2.Zip.focus();
                return false;
              }
            }

          }
          else if(phone != "")
          {
          if( phone.length < 5)
           {
                 alert(" Invalid  Phone Number ");
                 document.frmbook2.Phone.focus();
                 return false;
           }
            for(i=0; i < phone.length; i++)
            {
              var no1=phone.chatAt(i);
              if(((no1 < "0")  || (no1 > "9")))
              { alert(" Phone  Field  Cannot contain  characters ");
                document.frmbook2.Phone.focus();
                return false;
              }
            }

          }
          return true;

        }
		
		function   checkName3()
       {
		  var  fst_nm=document.frmbook3.Fname.value;
          var  lst_nm=document.frmbook3.Lname.value;
          var  email=document.frmbook3.Email.value;
          var  country=document.frmbook3.Country.selectedValue;
          var i;

         if( echeck(email)==false )
          {
              //emailID.value="";
              document.frmbook3.Email.focus();
              return false;
          }
          else if (fst_nm == "")
          {
           alert(" First  Name  Cannot  be  Empty ");
           document.frmbook3.Fname.focus();
           return false;
          }
          else if (lst_nm == "")
          {
           alert(" Last  Name  Cannot  be  Empty ");
           document.frmbook3.Lname.focus();
           return false;
          }
          return true;
        }
		
		function f_pwd() 
		{
		window.open( "http://www.nethrs.com/Admin/forgot_pwd.php?b=bk", "Forgot Password", 
		"status = 1, height = 300, width = 750, resizable = 0" )
		}
