function valCBL(source)
	{
    	var baseId = source.controltovalidate;
    	var i=0;
    	var cb=document.getElementById(baseId+'_'+i++);
    	while (cb != undefined){
    		if (cb.checked) return true;
    		cb = document.getElementById(baseId+'_'+i++);
    	}
			return false;
	} 

function checkState(source, args)
    {
    	var ctrl = source.controltovalidate;
    	var st = document.getElementById(ctrl).value;
    	if (ctrl.lastIndexOf("_")>=0){
    		var ct = ctrl.substring(0,ctrl.lastIndexOf("_")+1)+"country";
    		if (document.getElementById(ct) != null){
    			ct = document.getElementById(ct).value;
    			if (ct == "US"){
    				if ( (st.length > 2) ||(st =="AB") ||(st =="BC") ||(st =="MB")||(st =="NB") ||(st =="NL") ||(st =="NS")||(st =="NT")||(st =="NU") ||(st =="ON") ||(st =="PE") ||(st =="QC") ||(st =="SK")||(st =="YT") ) {
    					args.IsValid = false;
    				} else {
    					args.IsValid = true;
    				}
    			}
    			if (ct == "CA"){
    				if ( (st =="AB") ||(st =="BC") ||(st =="MB")||(st =="NB") ||(st =="NL") ||(st =="NS")||(st =="NT")||(st =="NU") ||(st =="ON") ||(st =="PE") ||(st =="QC") ||(st =="SK")||(st =="YT") ) {
    					args.IsValid = true;
    				} else {
    					args.IsValid = false;
    				}
    				
					}
				}
			} else {
				args.IsValid = true;
			}
		} 

