
function CustomValidationHandler(txt, cmp) {
	ValidatorValidate(cmp);
	if (!cmp.isvalid) {
		alert(cmp.errormessage);
		txt.focus();
	     txt.select();
	}
}


function CheckRequired() {
	var strErr="There is an error in the infomation provided.\n\nPlease enter the highlighted fields.";
	try{

		for(var i=0; i< Page_Validators.length; i++ ) {
			ValidatorValidate(Page_Validators[i]);
			//alert(Page_Validators[i].id)
			if (!Page_Validators[i].isvalid) {
				//strErr = strErr + onError(Page_Validators[i].id)//retrive the error message				
				/*alert(Page_Validators[i].errormessage);*/
				//alert(Page_Validators[i].id)
				alert(strErr)
				t = eval("document.all." + Page_Validators[i].controltovalidate);
				t.focus();
				t.select();
				//break;
				return false;
			}
		}
	} catch(er) {
			// if an error than Page_Validators was not declared, i.e
			// there are no validators on the page.
			// so ignore the error and do nothing.
			return false;
	}
	return true;
	
}


function checkListValue(sender, args)
{	
	//alert('sender'+sender.id)
	if ((args.Value=='0')||(args.Value=='')||(args.Value==null))
	{args.IsValid=false;}
	else
	{args.IsValid=true;}
}
