function valiDateTime(strID,strType){
	var objField=document.getElementById(strID);
	
	if(strType=='date'){
		return (/^[0-3]?[0-9]([\.\/\-])[0-1]?[0-9]\1(?:20)?[0-9]{2}$/.test(objField.value))
	}
	if(strType=='time'){
		return (/^[0-9]{1,2}(\:[0-9]{2})?\s?(pm|PM|am|AM)?$/.test(objField.value))
	}
}

function checkValid(strType){
	var objFlagStyle=document.getElementById('flag_'+strType).style;
	var objField=document.getElementById('cmt_'+strType);
	
	if(objField.value==''){
		objFlagStyle.visibility='hidden';
	}else{
		if(valiDateTime('cmt_'+strType,strType)){
			objFlagStyle.visibility='hidden';
		}else{
			objFlagStyle.visibility='visible';
		}
	}
}
