// JavaScript Document

function request_content( url, request, responseHandler ){

	var postIt = new Object();
	
	postIt.ajax = true;
	
	postIt.what = request;
	HTTP.post( url, postIt, responseHandler, content_error );
	
	$('#pageContent').hide( "slow" );
	
}

function update_content( content, source ){
	//alert( content );
	
	var page = document.getElementById( "pageContent" );

	if( page && content  ){
		
		page.innerHTML = "";
		page.innerHTML = content;
		
		content = execute_scripts( content );
		
		$('#pageContent').show( "slow" );
	}
	
	
}

function content_error(){
	alert( "Error Loading" );	
}



function update_title( text ){

	document.title = text;	
}

function update_link( href ){
	
	var stateLink = document.getElementById( 'stateLink' );
	
	if( stateLink ){
		stateLink.href = href;	
	}
	

}

