function redirect(f){
	
	if (f == "right") {
		f = document.forms["rightQuoteBox"];
	}
	//url1 = 'https://www.samedaypayday.com/app/steps1of2.php?tag=TCAAC&zipcode=';	//BNONE-CAALLIANCE	
	var hostPrefix = window.location.host == 'cashadvancealliance' ? 'http://cashadvancealliance/' : 'https://' + window.location.host + '/';
	var ni_var1 = $("#ni_var1").length ? $("#ni_var1").val() : 'caa-main';
	var srcid = f.srcid.value;	
	var amount = 100;
	var account = '';
	var howsoon = '';
		
	if (srcid == 'rightQB') {
		amount = $("#qbAmount").val();
	}
	else if (srcid == 'mainQB') {
		amount = $("#mainqbAmount").val();
		account = $("input[@name=where]:checked").attr('id');
		howsoon = $("#how_soon").val();
	}
	
	
	if(xmlHttp){
		xmlUrl = "/set_qb_variables.php?amount=" + amount + "&account=" + account + "&howsoon=" + howsoon;
		xmlHttp.open('GET', xmlUrl, false);
		xmlHttp.send(null);
		if (!!parseInt(xmlHttp.responseText)) {
			var hostPrefix = window.location.host == 'cashadvancealliance' ? 'http://cashadvancealliance/' : 'https://' + window.location.host + '/';
			url1 = hostPrefix + 'app/steps1of2.php?ni_var1=' + ni_var1;
		
			document.location = url1;
			return false;
		}
	} else {
		alert('Error submitting the form.');
		return false;
	}
	
	return false;
}

