function auth_cleanSession()
{
	PostVars("&action=auth_session_clean","","");
	GoTo("http://www.digitalpipelines.com/craigslist-marketing2.php");
}

function form_stage_1()
{
	Hide("stage_2");
	ShowInline("stage_1");
}
function form_stage_2()
{
	Hide("stage_1");
	ShowInline("stage_2");
	Hide("description_table");
	document.documentElement.scrollTop = 20;
}

function selections_review()
{
	PostVars("&action=selections_review","selections_review","Loading...");
}

function change_city(object_id,state_id,city_id)
{
	PostVars("&action=cities_change&state_id="+state_id+"&city_id="+city_id+"&checked="+object_id.checked,"","");
}

function change_category(object_id,category_id,subcategory_id)
{
	PostVars("&action=categories_change&category_id="+category_id+"&subcategory_id="+subcategory_id+"&checked="+object_id.checked,"","");
}

function change_frequency(frequency_id)
{
	PostVars("&action=frequency_change&frequency_id="+frequency_id.id,"","");
}


function refreshPrice()
{
	var xmlHttp = GetXmlHttpObject();
	var url="___ajax-gateway.php?sid="+Math.random()+"&action=price_calculate";
	xmlHttp.onreadystatechange=function () 
	{ 	
		if (xmlHttp.readyState==4)
		{	
			document.getElementById("price_output").innerHTML = xmlHttp.responseText; 
			if (xmlHttp.responseText.length < 55) 
				{ document.getElementById('stage_2_button').disabled = true; } 
			else 
				{ document.getElementById('stage_2_button').disabled = false; } 
			delete xmlHttp; 
		}	
		else 	{ document.getElementById("price_output").innerHTML = "Calculating the price..."; }
	}
	xmlHttp.open("GET",url,true);	 xmlHttp.send(null);  
	
	//PostVars("&action=price_calculate","price_output","Calculating the price...");
	
}	