// JavaScript Document

function ControlSet( linkSet )
{
	this.linkSet = linkSet;
	this.upLink = null;
	this.nextLink = null;
	this.previousLink = null;
	this.closeLink = null;
}

ControlSet.prototype.setUp = function( key, image, action, style )
{
	this.upLink = new Link( key, "", image );
	this.upLink.setStyle( style );
	this.upLink.setAction( action );
}

ControlSet.prototype.setNext = function( key, image, action, style )
{
	this.nextLink = new Link( key, "", image );
	this.nextLink.setStyle( style );
	this.nextLink.setAction( action );
}

ControlSet.prototype.setPrevious = function( key, image, action, style )
{
	this.previousLink = new Link( key, "", image );
	this.previousLink.setStyle( style );
	this.previousLink.setAction( action );
}

ControlSet.prototype.setClose = function( key, image, action, style )
{
	this.closeLink = new Link( key, "", image );
	this.closeLink.setStyle( style );
	this.closeLink.setAction( action );
}

ControlSet.prototype.show = function()
{
	if ( this.upLink != null )
	{
		window.document.write( this.upLink.toMarkup( false, this.linkSet.hasUp() ) );
	}
	if ( this.previousLink != null )
	{
		window.document.write( this.previousLink.toMarkup( false, this.linkSet.hasPrevious() ) );
	}
	if ( this.nextLink != null )
	{
		window.document.write( this.nextLink.toMarkup( false, this.linkSet.hasNext() ) );
	}
	if ( this.closeLink != null )
	{
		window.document.write( this.closeLink.toMarkup( false, true ) );
	}
}

