if (top.frames.length!=0) {top.location=self.document.location;}	// pop join page out of frames
function MM_openBrWindow(theURL,winName,features) {window.open(theURL,winName,features);}	// popup script
// on price point change, update checkbox css
$(window).ready(function() {
	$("input[type!='submit']").click(function() {	// cascade options
		var label = $(this).parent("label");
		var labels = $(this).parents("ul").find("label");
		if ($(this).attr("type") == "radio") $(labels).each(function(i) {$(this).removeClass("checked");});
		if ($(this).attr("checked") == true) $(label).addClass("checked");
		else $(label).removeClass("checked");
	});
	$("input[type!='submit']").each(function(i) {	// join options
		var label = $(this).parent("label");
		if ($(this).attr("checked") == true) $(label).addClass("checked");
		else $(label).removeClass("checked");
	});
/* removed due to low trial ratios
	var $msg_check = $("#join_options li.no_disclaimer");
	var $msg_box = $("#disclaimers div");
	$msg_check.click(function(){$msg_box.slideUp('slow');});	// hide disclaimer on no_disclaimer
	$("#Mobile").click(function(){$("#trial_msg").slideUp('fast', function() {$("#mobile_msg").slideDown('slow');});});	// mobile disclaimer
	$("#Trial").click(function(){$("#mobile_msg").slideUp('fast', function() {$("#trial_msg").slideDown('slow');});});	// trial disclaimer
*/
});
// show / hide available options for billers
function checkCascade (billerType) {
	switch (billerType) {
		// credit card options
		case "Join by Credit / Debit Card":
			showOption("Trial");
			showOption("MonthlyRecurring");
			showOption("MonthlyNonRecurring");
			showOption("Mobile");
			showOption("Quarterly");
		break;
		// online check options
		case "Join by Online Check":
			hideOption("Trial");
			hideOption("MonthlyNonRecurring");
			hideOption("Mobile");
			showOption("MonthlyRecurring");
			showOption("Quarterly");
		break;
		// euro debit options
		case "EU Debit / DirectPay / AsiaPay":
			hideOption("Mobile");
			hideOption("MonthlyNonRecurring");
			showOption("Trial");
			showOption("MonthlyRecurring");
			showOption("Quarterly");
		break;
	}
}
function checkOption (optionType) {	// on price change, set custom3 value for specific access
	switch (optionType) {
		case "Mobile": document.getElementById('custom3').value = "access=mobi"; break;
		case "Trial": document.getElementById('custom3').value = "access=trial"; break;
		default: document.getElementById('custom3').value = "";
	}
}
function hideOption (EL) {	// hide option for option availability
	if (document.getElementById(EL)) {
		document.getElementById(EL).style.display='none';
		document.getElementById(EL).style.visibility='hidden';
	}
}
function showOption (EL) {	// show option for option availability
	if (document.getElementById(EL)) {
		document.getElementById(EL).style.display='block';
		document.getElementById(EL).style.visibility='visible';
	}
}