function checkString(source,msg){
   	if(trim(source.value) == ""){
   		alert(msg + MSGMandatory);
        	source.focus();
        	source.select();
        	return true;
   	}
   	return false;
}
function checkLength(source,msg,len){
        if(source.value.length > eval(len)){
          alert(msg);
          source.focus();
          source.select();
          return true;
        }
        return false;
}
function checkSpecialCharacters(source,msg){
        if(splCharsCheck(source.value) == 0){
          alert(msg);
          source.focus();
          source.select();
          return true;
        }
        return false;
}
function checkDate(source,msg,cur){
        if(source.value != ""){
          if(!(isValidDate(source.value,false))){
            alert(msg + MSGDateNotValid);
            source.select();
            source.focus();
            return true;
          }
          if(cur == 'y'){
            if(compareDateWithToday(source.value) == 1){
              alert(msg + MSGNotLater);
              source.select();
              source.focus();
              return true;
            }
          }
        }
        return false;
}