// JavaScript Document
  function login(showhide){
    if(showhide == "show"){
        document.getElementById('popupbox').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
    }else if(showhide == "hide"){
        document.getElementById('popupbox').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
    }
  }
  
  function check(){
     var assignuser ='tbtpickup'
	 var assignpass ='doortodoor'
	 
	 var value_user =''
	 var value_pass =''
	 
	 var success 
	 var success2 
	 
	 var errorval =''
	 
	 var error = ''
	 var reg = document.getElementById('username').value
	 
	 if(reg != assignuser){
	   document.getElementById('erroruser').style.display ='block'
	   value_user =  'Username is invalid'
	   errorval ='error'
	 } else {
	  success = true
	  document.getElementById('erroruser').style.display ='none'
	 }
	 
	 
	 var password = document.getElementById('password').value
	 
	 if(password !=assignpass){
	    document.getElementById('errorpass').style.display ='block'
	  	value_pass = 'Password is invalid'
		 errorval ='error'
	 } else {
	   success2 = true  
	   document.getElementById('errorpass').style.display ='none'
	 }
	 
	 document.getElementById('erroruser').innerHTML = value_user
	 document.getElementById('errorpass').innerHTML = value_pass
     
	 if(success2 == true && success == true ){
	    document.getElementById('formlogin').submit()
	 }
	 
	 if(errorval !=''){
	   return false
	 }
	 
	  if(errorval !=''){
	   return false
	 }
	return false 
  }
