        function sendmails()
        {
            var MikeName = encodeURI(document.getElementById("usernamess").value.replace(/'/g,""));
            //var usernamess = encodeURL(document.getElementById("usernamess").value.replace(/'/g,""));
            var emails = encodeURI(document.getElementById("email").value.replace(/'/g,""));
            if(MikeName=="")
                {
                    alert("\u041dэрээ оруулна уу!!!");
                    document.getElementById("usernamess").focus();
                    return false;
                }
            if (emails=="")
                {
                    alert("\u041cайл хаягаа оруулна уу!!!");
                    document.getElementById("email").focus();
                    return false;
                }
             else {
                 if(emails.indexOf('@')<1)
                     {
                         alert("\u041cайл хаяг буруу байна");
                         document.getElementById("email").focus();
                         return false;
                     }
                  }
                  //var msgs = null;
                  var spPage = Getxmlhttpobject();
                  spPage.open("POST","sendpass.jsp?usernamess="+MikeName+"&emails="+emails,true);
                  spPage.onreadystatechange = function()
                    {
                         if(spPage.readyState==1)
                           {
                               document.getElementById("ModalPopUp1").style.marginTop=30;
                               document.getElementById("ModalPopUp1").style.visibility="visible";
                           }
                        if(spPage.readyState==4)
                           {
                               document.getElementById("ModalPopUp1").style.marginTop=30;
                               document.getElementById("ModalPopUp1").style.visibility="hidden";
                           }
                    }
                  spPage.send(null);
                  return true;
        }

 function Getxmlhttpobject()
    {
        var xmlHttp = null;
        try
        {
            xmlHttp = new XMLHttpRequest();
        }
        catch(e)
        {
            try
            {
                xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
            }
            catch(e)
            {
                xmlHttp = new ActiveXObject("Microfoft.XMLHTTP");
            }
        }
        return xmlHttp;
    }

function linkss()
    {
        window.location.href="../login";
    }
