﻿//////////////////////////////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_Reference(){

//txtRef1
//txtTel1
//txtRefLn1
//txtRefLn2
//cmbRefCntry1
//cmbRefCty1
//TxtRefDet1


//START:====================================Reference 1 Pane Validation
if (!WIsEmptyValue('txtRef1')){

    
    
    if  (   (WIsEmptyValue('txtRefLn1') == false || WIsEmptyValue('txtRefLn2') == false)
            &&
            (WIsEmptyValue('cmbRefCntry1') == true || WIsEmptyValue('cmbRefCty1') == true)
        ){
        
                LogError("City and Country Information must be given if other Reference Address Details are mentioned.");
    }//if  (   (WIsEmptyValue('txtRefLn1') == false || WIsEmptyValue('txtRefLn2') == false)

    if  (   (WIsEmptyValue('cmbRefCntry1') == false || WIsEmptyValue('cmbRefCty1') == false)
            &&
            (WIsEmptyValue('txtRefLn1') == true && WIsEmptyValue('txtRefLn2') == true)
        ){
        
                LogError("Information in Line 1 / Line 2 of Reference Address must be given if City & Country are mentioned.");

    }//if  (   (WIsEmptyValue('cmbRefCntry1') == false || WIsEmptyValue('cmbRefCty1') == false)
    

       
    if(WIsEmptyValue('TxtRefDet1')){
      LogError("Details required for the Reference included.");
    }
    
   

 
}else if (WIsEmptyValue('txtRef1') == true && WIsEmptyValue('txtTel1') == false ){
      LogError("Reference Name required.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('txtRefLn1') == false ){
      LogError("Reference Name required.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('txtRefLn2') == false ){
      LogError("Reference Name required.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('cmbRefCntry1') == false ){
      LogError("Reference Name required.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('cmbRefCty1') == false ){
      LogError("Reference Name required.");
}else if (WIsEmptyValue('cmbSkill1') == true && WIsEmptyValue('TxtRefDet1') == false ){
      LogError("Reference Name required.");
}//if (!WIsEmptyValue('cmbSkill1')){

//END:====================================Reference 1 Pane Validation



}//function Validate_Reference(){
