function setRange(rowID,minSel,maxSel) {
rowID=document.getElementById(rowID);
minSel=document.getElementById(minSel);
maxSel=document.getElementById(maxSel);
//minSel=min id; maxSel=max id;
	if ((minSel.value=='')||(rowID.value<minSel.value)) {
	minSel.value=rowID.value
	}
	if (rowID.value>maxSel.value) {
	maxSel.value=rowID.value
	}
}

function makeDate(txDay,txMonth,txYear,hdDate) {
	d=document;
	txDay=d.getElementById(txDay);
	txMonth=d.getElementById(txMonth);
	txYear=d.getElementById(txYear);
	hdDate=d.getElementById(hdDate);
	var msg;
	//if ((txDay.value<=-1)||(txMonth.value<=-1)||(txYear.value<=-1)) {
		//msg = "The value '0' is invalid for date";
		//alert(msg);
		//return; 
	//} else {
	
	if ((txMonth.value=='9')||(txMonth.value=='09')||(txMonth.value=='4')||(txMonth.value=='04')||(txMonth.value=='6')||(txMonth.value=='06')||(txMonth.value=='11')) {
		if (txDay.value>'30') {
			msg = "The value of days exceeds the valid number of days for the current month";
			txDay.value="";
			txMonth.value="";
			//alert(msg);
			return;
		}
	/*} else if((txMonth.value=='2')||(txMonth.value=='02')) {
		if ((txDay.value>'28')&&((txYear.value)%2!=0)) {
			msg = msg + "The value of days exceeds the valid number of days for the current year";
			txDay.value="";
			txMonth.value="";
			alert(msg);
			return;
		} else if {
			if ((txDay.value>'29')&&((txYear.value)%2==0)) {
			msg = msg + "The value of days exceeds the valid number of days for the current year";
			txDay.value="";
			txMonth.value="";
			alert(msg);
			return;
		} */
	//} else if (txMonth.value>=31) {
	
	}		hdDate.value= txDay.value + "-" + txMonth.value + "-" + txYear.value;
	//}
}

function includeFileControl(chk,flFile,hdUpload) {
	chk=document.getElementById(chk);
	flFile=document.getElementById(flFile);
	hdUpload=document.getElementById(hdUpload);
	if ((chk.checked==true)&&(flFile.value!='')) { 
		hdUpload.value=(hdUpload.value + 1); 
	} else if((chk.checked==true)&&(flFile.value=='')) {
		hdUpload.value=((hdUpload.value>0)?(hdUpload.value - 1):(hdUpload.value)); 
	} else { 
		hdUpload.value=((hdUpload.value>0)?(hdUpload.value - 1):(hdUpload.value)); 
	}
}
