<html>
  <meta charset="utf-8">
  <title>COVID19 Screening Form</title>
<body>

<style>

  body {
  background-color: #e8dada;
  width: 100%;
  height: 100%;
}


img {
  border-radius: 8px;
}


.maindiv{ 
  height: auto;
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  font-family:Courier New;
   padding-left:1%;
}

.Imagebanner{
  border-radius: 8px;
  height: auto;
  width: 100%; 
  background-repeat: no-repeat;
  background-size: inherit;
} 

.textTopbanner {
 width: 100%;
 height: auto;
 padding-top: 2%;
 padding-bottom: 2%;
 background-color: transparent;
 background-color: rgba(255, 0, 0, 0.4);
 border-radius: 8px;
}
.labelbanner{
 width: 100%;
 height:auto;
 font-weight: bold;
 text-align: center;
 font-size:320%;
}

.textDiscliption {
 width: 100%;
 height: auto;
 padding-top: 1%;
 padding-bottom: 1%;
 background-color: transparent;
 background-color: rgba(2255, 255, 255,0.4);
 border-radius: 8px;
}
.textDiscliptionSubLabel {
 width: 100%;
 height:100%; 
 text-align: left;
 font-size:230%;
}


.textQ1 {
 width: 96%;
 height: auto;
 padding-top: 1%;
 padding-bottom: 1%;
 background-color: transparent;
 background-color: rgba(2255, 255, 255,0.4);
 border-radius: 8px;
 padding-left:3%;

}
.textlabelimput1{
  font-size:320%;
  font-weight:bold;

}
.textlabelimput2{
  font-size:320%;
  font-weight:normal;
  text-align: center;
  width: 90% ;
  height: auto;
}
.chb{
  width: 5%;
  height: 5%;
  vertical-align: middle;
  font-size:310%; 
}
.chb1{
  width: 5%;
  height: 5%;
  vertical-align: middle;
  font-size:310%; 
  -ms-transform: scale(1.25); /* IE 9 */
  -webkit-transform: scale(1.25); /* Chrome, Safari, Opera */
  transform: scale(1.25);
}
.endtext{
  vertical-align: middle;
  font-size:150%; 
}
.textbutton{
  font-size:320%;
  font-weight:bold;
  width: 40%;
}

</style>

<div class="maindiv">

<div class="Imagebanner"><img src="Image/banner.jpg" width=100% height=auto autofocus></div>

<div class="textTopbanner"><label class="labelbanner"><center>COVID19 Screening Form</center></label></div>

<div class="textDiscliption"><label class="textDiscliptionSubLabel">&nbsp;&nbsp;&nbsp;&nbsp;Please fill your name and contact information, You can choose the answer only those that match the history of your risk, Which can choose more than 1 choice.</label></div>  
<br>

<div class="textQ1">
  <label class="textlabelimput1">◉ Please include your full name</label><br><br>  
    <input class="textlabelimput2"  type="text" id="n1" placeholder="Name-Surname">
</div>
<br>

<div class="textQ1">
  <label class="textlabelimput1">◉ Please include your telephone</label><br><br> 
    <input class="textlabelimput2" type="tel" id="t1" placeholder="Telephone No.">
</div>
<br>

<div class="textQ1">
  <label class="textlabelimput1">◉ Choose of which is related to you <font color="#BB0000">(Can choose more than 1 choice)</font></label><br><br>

    <input class="chb1" type="checkbox" id="chk1" value="Having body temperature higher than 37.5°C" onclick="quA1()">
    <label class="chb">Having body temperature higher than 37.5°C</label><br>
    <input class="chb1" type="checkbox" id="chk2" value="Dry cough or sneezing" onclick="quA2()">
    <label class="chb">Dry cough or sneezing</label><br>
    <input class="chb1" type="checkbox" id="chk3" value="Loss of taste/loss of appetite" onclick="quA3()">
    <label class="chb">Loss of taste/loss of appetite</label><br>  
    <input class="chb1" type="checkbox" id="chk4" value="Loss of smell" onclick="quA4()">
    <label class="chb">Loss of smell</label><br> 
    <input class="chb1" type="checkbox" id="chk5" value="Have history of contact with Corona Virus patient of suspected person" onclick="quA5()">
    <label class="chb">Have history of contact with Corona Virus patient of suspected person</label><br><br>    
    <input class="chb1" type="checkbox" id="chk6" value="None of the above" onclick="quA6()">
    <label class="chb"><font color="#006600"><b>None of the above</b></font></label> 
   
</div>
<br>

<div class="endtext">
  <label><center><font color="#BB0000">Providing incomplete or misleading information will be liable for any patients/fines under Thailand's the communicable disease Act.</font></center></label>

</div>
<br>
    <center><button class="textbutton" type="button" id="bt1" onclick="SentAws()"><lable class="textButtonSub">Send</lable></button></center>
<br>

</div>
<br>

<p id="text"></p>
<script>

   var rasw="none";
  
   var chk1v="none",chk2v="none",chk3v="none",chk4v="none",chk5v="none",chk6v="none";


   var n1=document.getElementById("n1");

   var t1=document.getElementById("t1");

   var chk1=document.getElementById("chk1");
   var chk2=document.getElementById("chk2");
   var chk3=document.getElementById("chk3");
   var chk4=document.getElementById("chk4");
   var chk5=document.getElementById("chk5");
   var chk6=document.getElementById("chk6");
   var chkCP=0;

   var text=document.getElementById("text");

  function quA1() {    
  if (chk1.checked == true){
    chk1v=chk1.value;
    chkCP=1;
     }else if(chk1.checked == false){
    chk1v="none";
    chkCP=0;
           }
   chk6.checked =false;  
   chk6v="none";
}

 function quA2() {
  if (chk2.checked == true){
    chk2v=chk2.value;
    chkCP=2;
     }else if(chk2.checked == false){
    chk2v="none";
    chkCP=0;
           }
   chk6.checked =false;  
   chk6v="none";
}

 function quA3() {
   if (chk3.checked == true){
    chk3v=chk3.value;
    chkCP=3;
     }else if(chk3.checked == false){
    chk3v="none";
    chkCP=0;
           }
   chk6.checked =false;  
   chk6v="none";  
 }

 function quA4() {
  if (chk4.checked == true){
    chk4v=chk4.value;
    chkCP=4;
     }else if(chk4.checked == false){
    chk4v="none";
    chkCP=0;
           }
   chk6.checked =false;  
   chk6v="none";
}

 function quA5() {
  if (chk5.checked == true){
    chk5v=chk5.value;
    chkCP=5;
     }else if(chk5.checked == false){
    chk5v="none";
    chkCP=0;
           }
   chk6.checked =false;  
   chk6v="none";
}
  
  
  function quA6() {

  if (chk6.checked == true){
    chk6v=chk6.value;
    chkCP=6;
     }else if(chk6.checked == false){
    chk6v="none";
    chkCP=0;
           }
  chk1.checked =false;
  chk2.checked =false;
  chk3.checked =false;
  chk4.checked =false;
  chk5.checked =false;  

   chk1v="none";
   chk2v="none";
   chk3v="none";
   chk4v="none";
   chk5v="none";  
  
  }

 function SentAws() {
    if(n1.value == "")
    {
        alert("Please specify your full name");
       
    }else if(t1.value == "")
    {
        alert("Please specify your phone number");
       
    }else if(t1.value.length<10)
    {
       alert("Please specify a 10-digit number");

    }else if(t1.value.length>10)
    {
       alert("Phone number it over 10-digit, Please check try again");

    }else if(isNaN(t1.value))
    {

        alert("Please specify the number Non-alphabet");

    }else if(chkCP == 0)
    {
        alert("Please select at least 1 Choice");
       
    }else {
  document.cookie="Page="+encodeURIComponent('2');

  document.cookie="Name1="+encodeURIComponent(n1.value);

  document.cookie="Telephone1="+encodeURIComponent(t1.value);
  
  document.cookie="chk1v="+encodeURIComponent(chk1v);
  document.cookie="chk2v="+encodeURIComponent(chk2v);
  document.cookie="chk3v="+encodeURIComponent(chk3v);
  document.cookie="chk4v="+encodeURIComponent(chk4v);
  document.cookie="chk5v="+encodeURIComponent(chk5v);
  document.cookie="chk6v="+encodeURIComponent(chk6v);

  window.location.href = "Aws.php";
         }
  }

</script>

<script language="JavaScript1.2">
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
//document.onmousedown=disableselect
document.onclick=reEnable;
}
</script>

</body>
</html>
