/**************************************************************************
' Function Name		fnValidate				
'
' Description		This function validates whether the From Date is less   
'					than the To Date. If not, then it shows an alert
'**************************************************************************/
function fnValidate(obj,AlertMsg)
{
	var FromDate = document.getElementById(obj+"_cboFromDateMonth").value + '/01/' + 
		       document.getElementById(obj+"_cboFromDateYear").value;
	var ToDate   = document.getElementById(obj+"_cboToDateMonth").value + '/01/' + 
		       document.getElementById(obj+"_cboToDateYear").value;

	var dtFromDate = new Date(FromDate);
	var dtToDate = new Date(ToDate);
	
	if(dtFromDate > dtToDate)
	{
		window.alert(AlertMsg);
		event.returnValue = false;
	}
	else
	{
		event.returnValue = true;
	}
}

/***************************************************************************
' Function Name		fnSetEnterClick				
'
' Description		This function handles the enter key press. If enter key is 
'					pressed, it calls the click event of the control passed to it
'**************************************************************************/
function fnSetEnterClick(obj)
{
    if(event.keyCode == 13)
    {
          document.getElementById(obj).click();
          event.returnValue = false;
    }
}

/**************************************************************************
' Function Name		fnChangeMouseCursor				
'
' Description		This function is used to change mouse cursor to hour glass
'**************************************************************************/
function fnChangeMouseCursor()
{
	document.body.style.cursor = 'wait';
	document.getElementById('NewsReleaseSearch_UA1_btnSearch').style.cursor = 'wait';
	document.getElementById('NewsReleaseSearch_UA1_btnReset').style.cursor = 'wait';
}

