
function statementbyFunc(){
	ALERT("HEADER LINK ");
	var selectStatement = document.getElementById("statementby").value;
	
	if(selectStatement === 'statement_year'){
		document.getElementById('statement_ByYear').style.display ='block';
		document.getElementById('statement_ByMonthYear').style.display ='none';
		document.getElementById('statement_ByDate').style.display ='none';
		document.getElementById('statement_cutOff').style.display ='block';
		document.getElementById('statement_ByChooseDate').style.display ='none';
	}
	else if(selectStatement === 'statement_monthyear'){
		 document.getElementById('statement_ByYear').style.display ='none';
			document.getElementById('statement_ByMonthYear').style.display ='block';
			document.getElementById('statement_ByDate').style.display ='none';
			document.getElementById('statement_cutOff').style.display ='block';
			document.getElementById('statement_ByChooseDate').style.display ='none';
	}
	else if(selectStatement === 'statement_date'){
		 document.getElementById('statement_ByYear').style.display ='none';
		document.getElementById('statement_ByMonthYear').style.display ='none';
		document.getElementById('statement_ByDate').style.display ='block';
		document.getElementById('statement_ByChooseDate').style.display ='none';
		document.getElementById('statement_cutOff').style.display ='block';
		
			
	}
	else if(selectStatement === 'statement_ChooseDate'){ 
		 document.getElementById('statement_ByYear').style.display ='none';
		document.getElementById('statement_ByMonthYear').style.display ='none';
		document.getElementById('statement_ByDate').style.display ='none';
		document.getElementById('statement_ByChooseDate').style.display ='block';
		document.getElementById('statement_cutOff').style.display ='block';
		
	}
}
/*
function resetFunc(){
	var selectStatement = document.getElementById("statementby").value;
	
	document.getElementById('statement_ByYear').style.display ='none';
	document.getElementById('statement_ByMonthYear').style.display ='none';
	document.getElementById('statement_ByDate').style.display ='none';
	document.getElementById('statement_cutOff').style.display ='none';
	document.getElementById('statement_ByChooseDate').style.display ='none';
	selectStatement.selectedIndex = 0;
	selectStatement.value = "";
	//alert(selectStatement.selectedIndex);
	document.getElementById("statementOption").reset();
}



function submitFunc(){ //alert("SUBMIT BUTTON!!!");
	if(document.getElementById("statementby").value== 'statement_year'){
		
		document.getElementById("statement_year").setAttribute("required","required");
		document.getElementById("statement_monthyear").removeAttribute("required");
		document.getElementById("dateFrom").removeAttribute("required");
		document.getElementById("dateTo").removeAttribute("required");
		document.getElementById("statement_ChooseDate").removeAttribute("required");
		
		if(document.getElementById("statement_year").value =='')
			alert("Please select Year");
		else{
			//document.getElementById("statement_year").value ='';
			document.getElementById("statement_monthyear").value ='';
			document.getElementById("dateFrom").value ='';
			document.getElementById("dateTo").value ='';
			document.getElementById("statement_ChooseDate").value ='';
			document.getElementById("form_tenantStatement").submit();
		}
	}
	else if(document.getElementById("statementby").value== 'statement_monthyear'){
		
		document.getElementById("statement_year").removeAttribute("required");
		document.getElementById("statement_monthyear").setAttribute("required","required");
		document.getElementById("dateFrom").removeAttribute("required");
		document.getElementById("dateTo").removeAttribute("required");
		document.getElementById("statement_ChooseDate").removeAttribute("required");
		
		if(document.getElementById("statement_monthyear").value =='')
			alert("Please select Month/Year");
		else{
			document.getElementById("statement_year").value ='';
			//document.getElementById("statement_monthyear").value ='';
			document.getElementById("dateFrom").value ='';
			document.getElementById("dateTo").value ='';
			document.getElementById("statement_ChooseDate").value ='';
			document.getElementById("form_tenantStatement").submit();
		}
	}
	else if(document.getElementById("statementby").value== 'statement_date'){
		
		document.getElementById("statement_year").removeAttribute("required");
		document.getElementById("statement_monthyear").removeAttribute("required");
		document.getElementById("dateFrom").setAttribute("required","required");
		document.getElementById("dateTo").setAttribute("required","required");
		document.getElementById("statement_ChooseDate").removeAttribute("required");
		
		if(document.getElementById("dateFrom").value =='' || document.getElementById("dateTo").value =='')
			alert("Please choose date");
		else{
			document.getElementById("statement_year").value ='';
			document.getElementById("statement_monthyear").value ='';
			//document.getElementById("dateFrom").value ='';
			//document.getElementById("dateTo").value ='';
			document.getElementById("statement_ChooseDate").value ='';
			document.getElementById("form_tenantStatement").submit();
		}
	}
	else if(document.getElementById("statementby").value== 'statement_ChooseDate'){
		document.getElementById("statement_year").removeAttribute("required");
		document.getElementById("statement_monthyear").removeAttribute("required");
		document.getElementById("dateFrom").removeAttribute("required");
		document.getElementById("dateTo").removeAttribute("required");
		document.getElementById("statement_ChooseDate").setAttribute("required","required");
		
		if(document.getElementById("statement_ChooseDate").value =='')
			alert("Please select date");
		else{
			document.getElementById("statement_year").value ='';
			document.getElementById("statement_monthyear").value ='';
			document.getElementById("dateFrom").value ='';
			document.getElementById("dateTo").value ='';
			//document.getElementById("statement_ChooseDate").value ='';
			document.getElementById("form_tenantStatement").submit();
		}
	} 
}
*/