// JavaScript Document
var cities_array=new Array("Brevard_52,53,59,78,80,81,82,83",
"Broward_52,54,60,78,80,81,82,83",
"Charlotte_52,53,59,78,80,81,82,83",
"Citrus_52,53,59,78,70,76,72,77",
"Clay_52,53,59",
"Collier_52,53,59,78,80,81,82,83",
"Dade_52,62,78,80,81,82,83",
"Duval_52,53,59,78,80,81,82,83",
"Escambia_52,53,59",
"Hernando_52,54,60,78,70,76,72,77",
"Hillsborough_52,54,60,78,70,76,72,77",
"Indian River_52,54,60,78,80,81,82,83",
"Jefferson_52,53,59",
"Lake_52,54,60,78,70,76,72,77",
"Lee_52,53,59,78,80,81,82,83",
"Leon_52,53,59",
"Manatee_52,53,59,78,70,76,72,77",
"Marion_52,54,60,78,70,76,72,77",
"Martin_52,53,59",
"Orange_52,54,60,78,70,76,72,77",
"Osceola_52,54,60,78,70,76,72,77",
"Palm Beach_52,54,60,78,70,76,72,77",
"Pasco_52,54,60,78,70,76,72,77",
"Pinellas_52,53,59,78,70,76,72,77",
"Polk_59,78,80,81",
"Sarasota_52,54,60,78,70,76,72,77",
"Seminole_52,54,60,78,70,76,72,77",
"St Lucie_52,54,60,78,80,81,82,83",
"Sumter_52,53,59,78,70,76,72,77",
"Volusia_52,53,59"
);


var pdf_urls_name=new Array();
pdf_urls_name["52"]="Summary of Benefits for Savings Plan 52$_$FH-052.pdf";
pdf_urls_name["53"]="Summary of Benefits for Savings Rx	Plan 53$_$FH-053-059.pdf";
pdf_urls_name["54"]="Summary of Benefits for Savings Rx	Plan 54$_$FH-054-060.pdf";
pdf_urls_name["59"]="Summary of Benefits for Medicare Rx Plan 59$_$FH-053-059.pdf";

pdf_urls_name["60"]="Summary of Benefits for Medicare Rx Plan 60$_$FH-054-060.pdf";
pdf_urls_name["62"]="Summary of Benefits for Medicare Rx Plan 62$_$FH-054-060.pdf";

pdf_urls_name["70"]="Summary of Benefits for VIP Care Plan 70$_$FH-070-072.pdf";
pdf_urls_name["72"]="Summary of Benefits for VIP Savings Plan 72$_$FH-070-072.pdf";
pdf_urls_name["76"]="Summary of Benefits for VIP Care Plan 76$_$FH-076-077.pdf";
pdf_urls_name["77"]="Summary of Benefits for VIP Savings Plan 77$_$FH-076-077.pdf";
pdf_urls_name["78"]="Summary of Benefits for Medi-Medi Plan 78$_$FH-078.pdf";


pdf_urls_name["80"]="Summary of Benefits for VIP Care Plan 80$_$FH-080-082.pdf";
pdf_urls_name["81"]="Summary of Benefits for VIP Care Plan 81$_$FH-081-083.pdf";
pdf_urls_name["82"]="Summary of Benefits for VIP Savings Plan 82$_$FH-080-082.pdf";
pdf_urls_name["83"]="Summary of Benefits for VIP Savings Plan 83$_$FH-081-083.pdf";



function fill_counties(selcun)
{
	//alert(selcun);	
	var sel_options="<select name='county_name' id='county_name' onchange='delayLoader(this.value)'><option value=0>Select One</option>";
	for(i=0;i<cities_array.length;i++)
	{
			sel="";
			c_arr=cities_array[i].split("_");
			//if(c_arr[1]!=4)
			if(cities_array[i]==selcun) { sel="Selected"; }
			sel_options+="<option value='"+c_arr[1]+"' "+sel+" >"+c_arr[0]+"</option>";
	}
	sel_options+="</select>";
	//alert(sel_options);
	document.getElementById("sel_counties").innerHTML=sel_options;
	if(selcun!="") 
	{ 
		delayLoader(c_v);
	}
}

function fill_2010_counties()
{
	var sel_options="<select name='county_name' id='county_name' onchange='redirect_url()' ><option value=0>Select One</option>";
	
	for(i=0;i<cities_array.length;i++)
	{
			c_arr=cities_array[i].split("_");
			if(c_arr[1]!=4)
			sel_options+="<option value="+c_arr[1]+">"+c_arr[0]+"</option>";
	}
	sel_options+="</select>";
	//alert(sel_options);
	document.getElementById("sel_counties").innerHTML=sel_options;
}

function delayLoader(pdfids)
{
		//alert(cityval);
		if(pdfids==0)
		document.getElementById("showlinks").innerHTML='';
		else
		{
		document.getElementById("showlinks").innerHTML='<img src="images/ajax-loader.gif">';
		setTimeout("showLinks('"+pdfids+"')", 2000);
		}
		//return false;
}

function showLinks(pdfids)
{
		//alert(pdfids);
		var opt_indx=document.getElementById("county_name").selectedIndex;
		//alert(opt_indx);
		var opt_txt=document.getElementById("county_name").options[opt_indx].text;
		//alert(opt_txt);
		stat=0;pdfvals="";
		pdfArr=pdfids.split(",");
		//alert(pdfArr[0]);
		var pdf_data='<span class="bb">Summary of Benefits and Benefit Over view</span><br>';
		pdf_data+='Review the Plan Overview <a href="'+pdfpath+'FH_Plan_Overview.pdf">click here</a>';
		pdf_data+='<br><br>Review the Summary of Benefits for available plans in your area';
		for(i=0;i<pdfArr.length;i++)
		{
			var pdfid=pdfArr[i];
			pdfitem=pdf_urls_name[pdfid];
			pdfitm_arr=pdfitem.split("$_$");
			pdfname=pdfitm_arr[0];
			pdfurl=pdfitm_arr[1];
			pdf_data+='<br><a href="'+pdfpath+pdfurl+'">'+pdfname+'</a>';
			//break;
		}
		document.getElementById("showlinks").innerHTML=pdf_data;
}

function redirect_url()
{
	opt_indx1=document.getElementById("county_name").selectedIndex;
		//alert(opt_indx1);
	opt_txt1=document.getElementById("county_name").options[opt_indx1].text;	 
	opt_val1=document.getElementById("county_name").value
	//alert(opt_txt);return false;
	ctyval=opt_txt1+"_"+opt_val1;
	window.location.replace("plan_comparison_tool.php?cityval="+ctyval);
}
function redirect_url_other()
{
		opt_indx1=document.getElementById("county_name_o").selectedIndex;
		//alert(opt_indx1);
	opt_txt1=document.getElementById("county_name_o").options[opt_indx1].text;	 
	opt_val1=document.getElementById("county_name_o").value
	//alert(opt_txt);return false;
	ctyval=opt_txt1+"_"+opt_val1;
	window.location.replace("plan_comparison_tool.php?cityval="+ctyval);
	
}
