
var AjaxRequest = function( pTarget, pAction, pVariables  ) {
	new Ajax( pAction, { 
		method: 'post', 
		postBody: pVariables,
		update: pTarget,
		onFailure:function(){},
		onComplete:function(){},
		evalScripts:true, 
		asynchronous:true
		}
	).request();
}

function LoadItem( pItemId ) {
	AjaxRequest( $('ContentDetail'), 'request/Show.php?id='+pItemId, '' );
}

function ShowRecently( pStart ) 
{
	AjaxRequest( $('Content'), 'request/Recently.php?start='+pStart, '' );
}

function ShowProduct( pUid, pStart )
{
	AjaxRequest( $('Content'), 'request/Product.php?start='+pStart+'&product='+pUid, '' );
}

function ShowProductAndIssue( pUid, pIssue, pStart )
{
	AjaxRequest( $('Content'), 'request/Product.php?start='+pStart+'&product='+pUid+'&issue='+pIssue, '' );
}

function SelectorChanged( pSender ) {
	tValue = pSender.value;

	if ( tValue == 0 )
	{
		ShowRecently( 0 );
	}
	else
	{
		ShowProduct( tValue, 0 );
	}
}