function validatethis(th)
{
        if(th.email.value == "")
        {
                alert("Please Enter Email Address");
                th.email.focus();
                return false;
        }
        if(!(isEmail(th.email.value)))
        {
                alert("Please Enter Correct Email Address");
                th.email.focus();
                return false;
        }
        if(th.upload.value == "")
        {
                alert("Please Upload Your Attachment");
                th.upload.focus();
                return false;
        }
        if(th.message.value == "")
        {
                alert("Please Enter Your Instruction");
                th.message.focus();
                return false;
        }
        if(th.security_code.value == "")
        {
                alert("Please Enter Security Code");
                th.security_code.focus();
                return false;
        }
        if(th.task_number.value == "")
        {
                alert("Please Enter Quote ID");
                th.task_number.focus();
                return false;
        }
}
function isEmail(str)
{
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
        var tempStr = "a";
        var tempReg = new RegExp(tempStr);
        if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported)
        return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
          var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
          var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
          return (!r1.test(str) && r2.test(str));
}
function Sign_Off()
{
    if(confirm("Are you sure with your order is fully completed?"))
    {
        window.location.href='sign_off.php?task_id=<?php echo $task_id;?>';
    }

}

$(document).ready(function() {
  var options = {
        timeNotation: '12h',
	format: '%A, %B %d, %Y %I:%M:%S %p', // 12-hour with am/pm
        am_pm: true
      }
      $('#datetime').jclock(options);
});


