function Validator()
{

if (document.country_rate.sel_c1.value == 0 && document.country_rate.sel_c2.value == 0 && document.country_rate.sel_c3.value == 0 && document.country_rate.sel_c4.value == 0 && document.country_rate.sel_c5.value == 0)
{
alert("Please select at least one country.");
document.country_rate.sel_c1.focus();
return (false);
}

if (document.country_rate.sel_c1.value != 0 && document.country_rate.sel_c1.value == document.country_rate.sel_c2.value){
	alert("You can not select same country twice.");
	document.country_rate.sel_c2.focus();
	return (false);
}	
/*

	
*/
if (document.country_rate.sel_c3.value != 0 && document.country_rate.sel_c3.value == document.country_rate.sel_c4.value){
	alert("You can not select same country twice.");
	document.country_rate.sel_c4.focus();
	return (false);
}	
if (document.country_rate.sel_c3.value != 0 && document.country_rate.sel_c3.value == document.country_rate.sel_c5.value){
	alert("You can not select same country twice.");
	document.country_rate.sel_c5.focus();
	return (false);
}	
if (document.country_rate.sel_c4.value != 0 && document.country_rate.sel_c4.value == document.country_rate.sel_c5.value){
	alert("You can not select same country twice.");
	document.country_rate.sel_c5.focus();
	return (false);
}	

document.country_rate.action="rateplans.php#myfavs"
return (true);
}
function ValidateSecure()
{
	//new validation by sunil
	/*
	if (document.country_rate.sel_c1.value != 0 && document.country_rate.sel_c1.value == document.country_rate.sel_c3.value && checkradioselected(document.country_rate.blk1)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c3.focus();
	return (false);
	}	
if (document.country_rate.sel_c1.value != 0 && document.country_rate.sel_c1.value == document.country_rate.sel_c4.value && checkradioselected(document.country_rate.blk2)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c4.focus();
	return (false);
}
if (document.country_rate.sel_c1.value != 0 && document.country_rate.sel_c1.value == document.country_rate.sel_c5.value  && checkradioselected(document.country_rate.blk3)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_sel_c5.focus();
	return (false);
}	



if (document.country_rate.sel_c2.value != 0 && document.country_rate.sel_c2.value == document.country_rate.sel_c3.value  && checkradioselected(document.country_rate.blk1)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c3.focus();
	return (false);
}	
if (document.country_rate.sel_c2.value != 0 && document.country_rate.sel_c2.value == document.country_rate.sel_c4.value  && checkradioselected(document.country_rate.blk2)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c4.focus();
	return (false);
}	
if (document.country_rate.sel_c2.value != 0 && document.country_rate.sel_c2.value == document.country_rate.sel_c5.value && checkradioselected(document.country_rate.blk3)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c5.focus();
	return (false);
}
*/
if (document.country_rate.c1.value != 0 && document.country_rate.c1.value == document.country_rate.c3.value && checkradioselected(document.country_rate.blk1)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c3.focus();
	return (false);
	}	
if (document.country_rate.c1.value != 0 && document.country_rate.c1.value == document.country_rate.c4.value && checkradioselected(document.country_rate.blk2)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c4.focus();
	return (false);
}
if (document.country_rate.c1.value != 0 && document.country_rate.c1.value == document.country_rate.c5.value  && checkradioselected(document.country_rate.blk3)==true && document.country_rate.fav1.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c5.focus();
	return (false);
}	



if (document.country_rate.c2.value != 0 && document.country_rate.c2.value == document.country_rate.c3.value  && checkradioselected(document.country_rate.blk1)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c3.focus();
	return (false);
}	
if (document.country_rate.c2.value != 0 && document.country_rate.c2.value == document.country_rate.c4.value  && checkradioselected(document.country_rate.blk2)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c4.focus();
	return (false);
}	
if (document.country_rate.c2.value != 0 && document.country_rate.c2.value == document.country_rate.c5.value && checkradioselected(document.country_rate.blk3)==true && document.country_rate.fav2.checked==true){
	alert("You can not select same country Twice for Both Plans.");
	document.country_rate.sel_c5.focus();
	return (false);
}

//checik finished for duplicate
		if (document.country_rate.sel_c1.value == 0 && document.country_rate.sel_c2.value == 0 && document.country_rate.sel_c3.value == 0 && document.country_rate.sel_c4.value == 0 && document.country_rate.sel_c5.value == 0)
{
alert("Please select at least one country.");
document.country_rate.sel_c1.focus();
return (false);
}



var blk1Checked;
var blk2Checked;
var blk3Checked;
	for (var i=0; i<document.country_rate.blk1.length; i++) {
		if (document.country_rate.blk1[i].checked) {
		blk1Checked = document.country_rate.blk1[i].value
		}
	}
	for (var i=0; i<document.country_rate.blk2.length; i++) {
		if (document.country_rate.blk2[i].checked) {
		blk1Checked = document.country_rate.blk2[i].value
		}
	}
	for (var i=0; i<document.country_rate.blk3.length; i++) {
		if (document.country_rate.blk3[i].checked) {
		blk1Checked = document.country_rate.blk3[i].value
		}
	}
	
	if (!document.country_rate.fav1.checked && !document.country_rate.fav2.checked && !blk1Checked && !blk2Checked && !blk3Checked)
			{
			alert('Please select your rate/plan.');
			return (false);
			}
	
	//document.country_rate.action="https://secure.telehop.com/wt_signupnew.asp";

	document.country_rate.action="https://secure.telehop.com/wt_signupnew.asp";
	document.country_rate.submit();
	

return (true);
	
}

function checkradioselected(myname)
{
//boxes=document.getElementsByName("pass")
checkedBox=0
for(var i=0;i<myname.length;i++){
  if(myname[i].checked){
   checkedBox=i+1
   break // No need to check the rest since only one can be checked.
  }  
}
if(checkedBox!=0)
	{
	return true;
	}
else
	{
	 return false;
	}
}