//+--------------------------------------------------------------------------+
//| Project Name     	: Ready Reckoner	
//+ 
//| Project Number 	: P115176
//+ 
//| Reference  		: ill_health_submit_intro.js
//+ 
//| Description		: javascript file which contains functionality
//|			: for submitting data to get the correct report.
//+ 
//| Configuration Record
//| Review		Version	Author		Date		Change No.
//| P?????              1.0     Paul Ash        11/03/2002	Original
//|
//+ 
//| Copyright CMG 2002
//+--------------------------------------------------------------------------+
//|                  VISUAL SOURCESAFE VERSION INFORMATION 
//| $Archive:: /Ready Reckoner (2)/asproot/ill_health_ $Workfile::                                                		     
//| $Revision:: 1                                                                  $Modtime::                                                               
//| $Author:: Thentzsc                                                             $Date::                                                                  
//| $NoKeywords:
//+--------------------------------------------------------------------------+

//+--------------------------------------------------------------------------+
//| Name     		: submitselection						     
//+ 
//| Description		: gets data off the page and redirects the user to
//|			  the appropriate page.				    
//+ 
//| Parameters		: None				                     
//+ 
//| Returns		: Nothing		                     
//+ 
//| Comments		: None						                     
//+--------------------------------------------------------------------------+
function ill_health_getreport()
{
	var option1;
	var page;
	var objcalctype;
	var strOther_pathMAC;
	var blnMac = false;

	var strAppName = "Microsoft Internet Explorer";

	if(navigator.appVersion.indexOf("Macintosh")>0 && navigator.appName == strAppName)
	{
	  blnMac = true;
	}

	var objrdo1 = document.getElementById('rdoopt1');
	if (objrdo1.checked)
	{
		option1 = "yes";
		if(!document.all)
		{
		 page = "ill_health_costs_option2OT2.asp";
		}
		else
		page = "ill_health_costs_option2.asp";

		if(blnMac==true)
		{
		 page = "ill_health_costs_option2OT2M.asp";
		}
	}
	else
	{
		option1 = "no";
		page = "ill_health_costs_moreinfo.asp";
	}
	
	objcalctype = document.getElementById("hndcalctype");
	objcalctype.value = option1;

	//submit to the page that meets the criteria.
	submitselection("frmIllHealth",page)

}

//+--------------------------------------------------------------------------+
//| Name     		: submitselection						     
//+ 
//| Description		: gets data off the page and redirects the user to
//|			  the appropriate page.				    
//+ 
//| Parameters		: None				                     
//+ 
//| Returns		: Nothing		                     
//+ 
//| Comments		: None						                     
//+--------------------------------------------------------------------------+
function submitselection(formname,redirectpage)
{
	var objform = document.getElementById(formname);
	objform.method="post";
	objform.action = redirectpage;
	objform.target = "_parent"
	objform.submit();

}

//---------------------------------------------------------------------------//
//				END OF FILE
//---------------------------------------------------------------------------//