﻿//////////////////////////////Body Onload COODING START HERE////////////////////////////
$(document).ready(function() {
//////////////////////////////Body Onload COODING START HERE////////////////////////////
 

  

 //////////////////////////////Body Onload COODING END HERE////////////////////////////
});//$(document).ready(function() {
//////////////////////////////Body Onload COODING END HERE////////////////////////////




function Validate_Skills(){

//cmbSkill1
//cmbProf1
//dtPickerSkll1


//START:====================================Skills 1st Row Validation
if (!WIsEmptyValue('cmbSkill1')){

    if(WIsEmptyValue('cmbProf1')){
      LogError("Please select Proficiency Level.");
    }
    
     
    
    if(WIsEmptyValue('dtPickerSkll1')){
        //Do nothing because date is optional
    }else if (!WvalidateDate('dtPickerSkll1')){
      LogError("Invalid Format for the Date on which the Skill was Acquired in Professional Skill & Strengths Section.");
    }else if (!WvalidateIsPastDate('dtPickerSkll1')){
      LogError("Date on which the Skill was Acquired in Professional Skill & Strengths Section cannot be greater than or equal to Current Date.");
    }

 
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('cmbProf1') == false ){
      LogError("Please select Skill Level.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('dtPickerSkll1') == false ){
      LogError("Please select Skill Level.");
}//if (!WIsEmptyValue('cmbSkill1')){

//END:====================================Skills 1st Row Validation



//START:====================================Skills 2st Row Validation
if (!WIsEmptyValue('cmbSkill2')){

    if(WIsEmptyValue('cmbProf2')){
      LogError("Please select Proficiency Level.");
    }
    
     
  
    if(WIsEmptyValue('dtPickerSkll2')){
        //Do nothing because date is optional
    }else if (!WvalidateDate('dtPickerSkll2')){
      LogError("Invalid Format for the Date on which the Skill was Acquired in Professional Skill & Strengths Section.");
    }else if (!WvalidateIsPastDate('dtPickerSkll2')){
      LogError("Date on which the Skill was Acquired in Professional Skill & Strengths Section cannot be greater than or equal to Current Date.");
    }

 
}else if (WIsEmptyValue('cmbSkill2') == true && WIsEmptyValue('cmbProf2') == false ){
      LogError("Please select Skill Level.");
}else if (WIsEmptyValue('cmbSkill2') == true && WIsEmptyValue('dtPickerSkll2') == false ){
      LogError("Please select Skill Level.");
}//if (!WIsEmptyValue('cmbSkill1')){

//END:====================================Skills 2st Row Validation


    //START:====================================Skills 3st Row Validation
    if (!WIsEmptyValue('cmbSkill3')){

        if(WIsEmptyValue('cmbProf3')){
          LogError("Please select Proficiency Level.");
        }
        
         
        
        if(WIsEmptyValue('dtPickerSkll3')){
            //Do nothing because date is optional
        }else if (!WvalidateDate('dtPickerSkll3')){
          LogError("Invalid Format for the Date on which the Skill was Acquired in Professional Skill & Strengths Section.");
        }else if (!WvalidateIsPastDate('dtPickerSkll3')){
          LogError("Date on which the Skill was Acquired in Professional Skill & Strengths Section cannot be greater than or equal to Current Date.");
        }

     
    }else if (WIsEmptyValue('cmbSkill3') == true && WIsEmptyValue('cmbProf3') == false ){
          LogError("Please select Skill Level.");
    }else if (WIsEmptyValue('cmbSkill3') == true && WIsEmptyValue('dtPickerSkll3') == false ){
          LogError("Please select Skill Level.");
    }//if (!WIsEmptyValue('cmbSkill1')){
    //END:====================================Skills 3st Row Validation


//START:====================================Skills 4st Row Validation
if (!WIsEmptyValue('cmbSkill4')){

    if(WIsEmptyValue('cmbProf4')){
      LogError("Please select Proficiency Level.");
    }
    
     
    
    if(WIsEmptyValue('dtPickerSkll4')){
        //Do nothing because date is optional
    }else if (!WvalidateDate('dtPickerSkll4')){
      LogError("Invalid Format for the Date on which the Skill was Acquired in Professional Skill & Strengths Section.");
    }else if (!WvalidateIsPastDate('dtPickerSkll4')){
      LogError("Date on which the Skill was Acquired in Professional Skill & Strengths Section cannot be greater than or equal to Current Date.");
    }

 
}else if (WIsEmptyValue('cmbSkill4') == true && WIsEmptyValue('cmbProf4') == false ){
      LogError("Please select Skill Level.");
}else if (WIsEmptyValue('cmbSkill4') == true && WIsEmptyValue('dtPickerSkll4') == false ){
      LogError("Please select Skill Level.");
}//if (!WIsEmptyValue('cmbSkill1')){
//END:====================================Skills 4st Row Validation


//START:====================================Skills 5st Row Validation
if (!WIsEmptyValue('cmbSkill5')){

    if(WIsEmptyValue('cmbProf5')){
      LogError("Please select Proficiency Level.");
    }
    
     

    
    if(WIsEmptyValue('dtPickerSkll5')){
        //Do nothing because date is optional
    }else if (!WvalidateDate('dtPickerSkll5')){
      LogError("Invalid Format for the Date on which the Skill was Acquired in Professional Skill & Strengths Section.");
    }else if (!WvalidateIsPastDate('dtPickerSkll5')){
      LogError("Date on which the Skill was Acquired in Professional Skill & Strengths Section cannot be greater than or equal to Current Date.");
    }

 
}else if (WIsEmptyValue('cmbSkill5') == true && WIsEmptyValue('cmbProf5') == false ){
      LogError("Please select Skill Level.");
}else if (WIsEmptyValue('cmbSkill5') == true && WIsEmptyValue('dtPickerSkll5') == false ){
      LogError("Please select Skill Level.");
}//if (!WIsEmptyValue('cmbSkill1')){

//END:====================================Skills 5st Row Validation



}//function Validate_Skills(){
