function bsSetDateParam(theYY,theMM,theDD,prm1,prm2,flg){
	for(i = 0; i<document.forms[0].elements[prm1].length ;i++){
		
		tmp_ym = document.forms[0].elements[prm1].options[i].value;
		if(flg == 1){
			if(checkYYMM(theYY,theMM,tmp_ym)){
				document.forms[0].elements[prm1].options[i].selected = true;
			}else{
				document.forms[0].elements[prm1].options[i].selected = false;
			}
		} else if(flg == 2) {
			if(checkMM(theMM,tmp_ym)){
				document.forms[0].elements[prm1].options[i].selected = true;
			}else{
				document.forms[0].elements[prm1].options[i].selected = false;
			}
			
		}
	}

	for(i = 0; i<document.forms[0].elements[prm2].length ;i++){
		
		tmp_d = parseInt(document.forms[0].elements[prm2].options[i].value);
		
		if(tmp_d == theDD){
			document.forms[0].elements[prm2].options[i].selected = true;
		}else{
			document.forms[0].elements[prm2].options[i].selected = false;
		}
	}
}
function checkYYMM(theYY,theMM,tmp_ym){
        ret = false;

        tmpYY = tmp_ym.substring(0,4);
        if(theYY == tmpYY){
                tmpMM = parseInt(tmp_ym.substring(5,7), 10);
                if(theMM == tmpMM){
                        ret = true;
                }
        }

        return ret;
}
function checkMM(theMM,tmp_ym){
	ret = false;
	
	tmpMM = parseInt(tmp_ym, 10);
	if(theMM == tmpMM){
		ret = true;
	}
	
	return ret;
}
