// popup code for header "glossary" items
function showGlossary(type)
{
	var title = "";
	var text = "";
	
	if(type == "automatic") {
		var title = "Glossary - Automatic";
		var text = "<strong>Automatic Bill Payment</strong><br><br>With Automatic Bill Payment you call or visit your merchant\'s website only once to setup and schedule payments. After that, your bills get paid instantaneously at the scheduled time you\'ve chosen, allowing you to simply review the payments on your Visa statement. If you prefer to make payments automatically on specific dates, select this method.";
	}
	else {
		var title = "Glossary - Manual";
		var text = "<strong>Manual Bill Payment</strong><br><br>Manual Bill Payment enables you to review your bills before authorizing each Visa transaction. To make a payment, you simply need to call or visit your merchant\'s website each time you want to authorize a payment. If you prefer to view a bill before making payment, select this method.";
	}
	
	var params = "width=455,height=455,scrollbars=yes";
	
	tipwin = window.open("","glossary",params);
	
	
	var htmlText = "<html><head><title>" + title + "</title></head><body><font size=\"2\" face=\"Arial, Helvetica, sans-serif\" color=\"#666666\"><img src=\"/img/personal/autobillpay/hdr_glossary.gif\" border=\"0\"><br><br>" + text + "</font><br><br><a href=\'JavaScript:window.close();\'><font size=\"2\" face=\"Arial, Helvetica, sans-serif\" color=\"#ffffff\"><strong><center><img src=\"/img/buttons/close_window.gif\" border=\"0\"></center></strong></font></a><br><img src=\"/images/inviso.gif?glossary=" + type + "\" border=\"0\"></body></html>";
	tipwin.document.write(htmlText);

	if (document.images)
	{
		tipwin.focus()
	}
	
	tipwin.document.close();
}
// popup code for small business "glossary" items
function showBusinessGlossary(type)
{
	// type = "automatic" or "cardholder"
	var title = "";
	var text = "";
	
	if(type == "automatic") {
		var title = "Glossary - Automatic";
		var text = "<strong>Automatic Bill Payment</strong><br><br>With Automatic Bill Payment you call or visit your merchant\'s website only once to setup and schedule payments. After that, your bills get paid instantaneously at the scheduled time you\'ve chosen, allowing you to simply review the payments on your Visa statement. If you prefer to make payments automatically on specific dates, select this method.";
	}
	else {
		var title = "Glossary - Cardholder-initiated";
		var text = "<strong>Cardholder-initiated Payment</strong><br><br>Cardholder-initiated Payment enables you to review your bills before authorizing each Visa transaction. To make a payment, you simply need to call or visit your merchant\'s website each time you want to authorize a payment. If you prefer to view a bill before making payment, select this method.";
	}
	
	var params = "width=455,height=455,scrollbars=yes";
	
	tipwin = window.open("","glossary",params);
	
	
	var htmlText = "<html><head><title>" + title + "</title></head><body><font size=\"2\" face=\"Arial, Helvetica, sans-serif\" color=\"#666666\"><img src=\"/img/personal/autobillpay/hdr_glossary.gif\" border=\"0\"><br><br>" + text + "</font><br><br><a href=\'JavaScript:window.close();\'><font size=\"2\" face=\"Arial, Helvetica, sans-serif\" color=\"#ffffff\"><strong><center><img src=\"/img/buttons/close_window.gif\" border=\"0\"></center></strong></font></a><br><img src=\"/images/inviso.gif?glossary=" + type + "\" border=\"0\"></body></html>";
	tipwin.document.write(htmlText);

	if (document.images)
	{
		tipwin.focus()
	}
	
	tipwin.document.close();
}


function trackForm(form) {
	var catId = form.category.value;
	var stateId = null;
	if (form.state != null)
	{
		stateId = form.state.value;
	}
	var stateName = "All";
	var catName = "All";
	
	if (catId != null){
		catName = getCatName(catId);
	}
	//var id = element.value;
	if (stateId != null){
		stateName = getStateName(stateId);
	}
	form.action += "&selectedCategory=" + catName + "&selectedState=" + stateName;
	
}

function trackFormBusiness(form) {
	var catId = form.category.value;
	var stateId = null;
	if (form.state != null)
	{
		stateId = form.state.value;
	}
	var stateName = "All";
	var catName = "All";
	if (catId != null){
		catName = getCatName(catId);
	}
	//var id = element.value;
	if (stateId != null){
		stateName = getStateName(stateId);
	}
	form.action += "&selectedCategory=" + catName + "&selectedState=" + stateName + "&merchantType=SMALLBIZ";
	
}