//-----------------------------------------------------------------------
function checkText(text){
var result;
if(text == "")result = 0;
else result=1;
return result;
}
//---------------------------------------------------------
function validateVATReturnUserForm()
{
	
var errMsgUName=" # Username -Username not entered";
var errMsgpwd =" # Password -Password not entered";
 
var namflag=checkText(document.forms.VATReturnUserForm.TxtLoginId.value);
var pwdflag=checkText(document.forms.VATReturnUserForm.TxtLoginPassword.value);

 
if (namflag==0 ||pwdflag==0 )
{
s = "<html><head><script language='javascript' src='UPVATReturn.js'></script></head></body>" +
    "<table width=50% align=center" +
    "<tr><td Style='font-family:Verdana;font-size:12;color:#ff0000'>" +
    "For want of following particulars, sorry! not to permit you :<br><br>";


if(namflag==0) s += "<BR>"+ errMsgUName;
if(pwdflag==0) s += "<BR>"+ errMsgpwd;
 
 
s+= "<tr></table></body></html>";
document.write(s);
}
else 
{
 document.forms.VATReturnUserForm.submit();
//return;
 }
}

 //---------------------------------------------------------------------
function checkText(text){
var result;
if(text == "")result = 0;
else result=1;
return result;
}
//-----------------------------------------------------------------------
function validateVATDuePaid()
{
var errMsgSignatoryName=" # SignatoryName -Name of person who will sign Return not given";
var errMsgStatus =" # SignatoryStatus -Status of person who will sign Return not given";
var errMsgFatherHusbandName=" # Father/HusbandName Name of father/husband not given";
var errMsgDSW ="# S/o, D/o, w/o Whether signatory is son of/Daughter of or Wife of not given";
var errMsgSignDate=" # SignDate -Date of signing the return not given";
var errMsgSignPlace =" # SignPlace -Name of Place not given";
var signatoryflag = checkText(document.forms.VATDuePaid.txtSignatoryName.value);
var statusflag = checkText(document.forms.VATDuePaid.txtSignatoryStatus.value);
var fhNameflag = checkText(document.forms.VATDuePaid.txtSignatoryDSW.value);
var dswflag = checkText(document.forms.VATDuePaid.txtDSW.value);
var signDateflag = checkText(document.forms.VATDuePaid.txtSigningDate.value);
var placeflag = checkText(document.forms.VATDuePaid.txtPlace.value);

 
if (signatoryflag==0 || statusflag==0 || fhNameflag ==0 || dswflag==0 || signDateflag==0 || placeflag==0)
{
s = "<html><head><script language='javascript' src='UPVATReturn.js'></script></head></body>" +
    "<table width=50% align=center" +
    "<tr><td Style='font-family:Verdana;font-size:12;color:#ff0000'>" +
    "Sorry! not to permit you for want of following particulars:<br><br>";
if(signatoryflag==0) s += "<BR>"+ errMsgSignatoryName;
if(statusflag==0) s += "<BR>"+ errMsgStatus;
if(fhNameflag==0) s += "<BR>"+ errMsgFatherHusbandName;
if(dswflag==0) s += "<BR>"+ errMsgDSW;
if(signDateflag==0) s += "<BR>"+ errMsgSignDate;
if(placeflag==0) s += "<BR>"+ errMsgSignPlace;
s = s + "</td></td><tr><td align=center><br><br><Input type='Button' onClick='history.back();'  Value='Please click here to complete or correct the required information'></td>" ;
s = s + "</tr></Table></body></html>";
document.write(s);
}
else 
{
 document.forms.VATDuePaid.submit();
//return;
 }
}
//------------------------------------------------------------------------------------------------------------------
