﻿// JScript File

//For 1 required field

function Required_field1(control1,str1)
{
        
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
       
        return true;
}
//For 2 required field
function Required_field2(control1,control2,str1,str2)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        
        return true;
}
//For 3 required field
function Required_field3(control1,control2,control3,str1,str2,str3)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
      
        return true;
}
//For 4 required field
function Required_field4(control1,control2,control3,control4,str1,str2,str3,str4)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }    
      
        return true;
}
// For 5 required field
function Required_field5(control1,control2,control3,control4,control5,str1,str2,str3,str4,str5)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
       
       
        return true;
}


//For 6 required field
function Required_field6(control1,control2,control3,control4,control5,control6,str1,str2,str3,str4,str5,str6)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            return false;
        }
       
        return true;
}

//For 7 required field
function Required_field7(control1,control2,control3,control4,control5,control6,control7,str1,str2,str3,str4,str5,str6,str7)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            return false;
        }
        if(control7.value == "")
        {
            alert(str7);
            control7.focus();
            return false;
        }
      
        return true;
}

//For 8 required field
function Required_field8(control1,control2,control3,control4,control5,control6,control7,control8,str1,str2,str3,str4,str5,str6,str7,str8)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            return false;
        }
        if(control7.value == "")
        {
            alert(str7);
            control7.focus();
            return false;
        }
        if(control8.value == "")
        {
            alert(str8);
            control8.focus();
            return false;
        }
       
        return true;
}


//For 9 required field
function Required_field9(control1,control2,control3,control4,control5,control6,control7,control8,control9,str1,str2,str3,str4,str5,str6,str7,str8,str9)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            return false;
        }
        if(control7.value == "")
        {
            alert(str7);
            control7.focus();
            return false;
        }
        if(control8.value == "")
        {
            alert(str8);
            control8.focus();
            return false;
        }
        if(control9.value == "")
        {
            alert(str9);
            control9.focus();
            return false;
        }
        return true;
}


//For 11 required field
function Required_field11(control1,control2,control3,control4,control5,control6,control7,control8,control9,control10,control11,str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            return false;
        }
        if(control7.value == "")
        {
            alert(str7);
            control7.focus();
            return false;
        }
        if(control8.value == "")
        {
            alert(str8);
            control8.focus();
            return false;
        }
        if(control9.value == "")
        {
            alert(str9);
            control9.focus();
            return false;
        }
        if(control10.value == "")
        {
            alert(str10);
            control10.focus();
            return false;
        }
        if(control11.value == "")
        {
            alert(str11);
            control11.focus();
            return false;
        }
        return true;
}

//For 18 required field
function Required_field12(control1,control2,control3,control4,control5,control6,control7,control8,control9,control10,control11,control12,control13,str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11,str12,str13)
{
        control6.disabled = false;
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
        if(control4.value == "")
        {
            alert(str4);
            control4.focus();
            return false;
        }
        if(control5.value == "")
        {
            alert(str5);
            control5.focus();
            return false;
        }
        if(control6.value == "")
        {
            alert(str6);
            control6.focus();
            
            return false;
        }
        if(control7.value == "")
        {
            alert(str7);
            control7.focus();
            return false;
        }
        if(control8.value == "")
        {
            alert(str8);
            control8.focus();
            return false;
        }
        if(control9.value == "")
        {
            alert(str9);
            control9.focus();
            return false;
        }
        if(control10.value == "")
        {
            alert(str10);
            control10.focus();
            return false;
        }
        if(control11.value == "")
        {
            alert(str11);
            control11.focus();
            return false;
        }
        
        if(control12.value == "" || control12.value == ".00")
        {
            alert(str12);
            control12.focus();
            return false;
        }
        
        if(control13.value == "")
        {
            alert(str13);
            control13.focus();
            return false;
        }
       // alert(control13.value);
       
        return true;
}
function Required_field35(control1,control2,control3,str1,str2,str3)
{
        if(control1.value == "")
        {
            alert(str1);
            control1.focus();
            return false;
        }
        if(control2.value == "")
        {
            alert(str2);
            control2.focus();
            return false;
        }
        
        if(control3.value == "")
        {
            alert(str3);
            control3.focus();
            return false;
        }
       
       
       
        return true;
}


