// JavaScript Document

/* Varsha */

	function downloadexcel()
	{
		window.open("downloadexcel.asp")
	}

/* Historica Nav starts here */
	var ControlToSet;
	var theForm = document.frmNav;
	var CalWidth=170;
	var StartYear = "";
	var EndYear = "";
	var FormatAs;
	var NN4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
	var NN6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
	var TOP;
	var LEFT;

	if(NN4)document.captureEvents(Event.MOUSEMOVE);

	document.onmousemove = LogPosition;

	function LogPosition(evt){

	    if (NN4||NN6){
	    LEFT=evt.screenX;
	    TOP=evt.screenY-10;
	    }
	    else{
	    LEFT=event.screenX;
	    TOP=event.screenY-10;
	    }

	}

	function ShowCalendar(CONTROL,START_YEAR,END_YEAR,FORMAT){

	ControlToSet = eval(CONTROL);
	StartYear = START_YEAR;
	EndYear = END_YEAR;
	FormatAs = FORMAT;
	var strFeatures = "width=" + CalWidth + ",height=140" + ",left=" + LEFT + ",top=" + TOP;
	var CalWindow = window.open("../common/inc/HTMLCalendar.htm","Calendar", strFeatures)
	CalWindow.focus();
	} //End Function

	function SetDate(DATE){
	if(ControlToSet){
	ControlToSet.value = DATE; 
	}
	ControlToSet = null;
	StartYear = null;
	EndYear = null;
	FormatAs = null;
	}
function chkfrmNav() 
{
	if (document.frmNav.cmbFund.options[document.frmNav.cmbFund.selectedIndex].value=="") 
		{
			alert("Please select a Fund.");
			document.frmNav.cmbFund.focus();
			return false;
		}
	if (document.frmNav.txtFromDate.value=="From") 
		{
			alert("Please select a Valid From Date.");
			document.frmNav.txtFromDate.focus();
			document.frmNav.txtFromDate.select();
			return false;
		}
	if (document.frmNav.txtToDate.value=="To") 
		{
			alert("Please select a Valid To Date.");
			document.frmNav.txtToDate.focus();
			document.frmNav.txtToDate.select();
			return false;
		}
	document.frmNav.submit();
}
/* Historica Nav ends here */