function WinTarget( sSrc )
{
	this.sSrc = sSrc;
}

WinTarget.prototype.createHref = function( sSrc, sText, sNavigationName, sNavigation ) 
{
	if ( sSrc == "#" )
	{ // create link to same page poping up current menu-entry
		sSrc = location + ""; // window.document.URL
		sSrc = sSrc.replace( new RegExp( sNavigationName + "=[^&]*", "" ), sNavigationName + "=" + escape( sText ) );
		if ( sSrc.indexOf( sNavigationName + "=" ) < 0 )
			sSrc = sSrc + "?" + sNavigationName + "=" + escape( sText );
	}
	return sSrc;
}

WinTarget.prototype.open = function( sText, sNavigationName, sNavigation )
{
	window.location = this.createHref( this.sSrc, sText, sNavigationName, sNavigation );
}

function NewWinTarget( sSrc, iX, iY, iWidth, iHeight )
{
	this.win = null;
	this.sSrc = sSrc;
	this.iX = iX;
	this.iY = iY;
	this.iWidth = iWidth;
	this.iHeight = iHeight;
}

NewWinTarget.prototype.open = function()
{
	var sOpts = "toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes";

	if ( document.body && document.body.offsetWidth )
		sOpts += ",width=" + this.iWidth;
	else if ( window.innerWidth )
		sOpts += ",innerWidth=" + this.iWidth + ",";

	if ( document.body && document.body.offsetHeight )
		sOpts += ",height=" + this.iHeight
	else if ( window.innerHeight )
		sOpts += ",innerHeight=" + this.iHeight

	sOpts +=",top=" + this.iY;
	sOpts += ",left=" + this.iX;

	this.win = top.open( this.sSrc, "", sOpts );
}

function FrameTarget( sSrc, sId )
{
	this.sSrc = sSrc;
	this.sId = sId;
}

FrameTarget.prototype.open = function()
{
	var target = top.frames[ this.sId ];
	if ( target )
		target.document.location.href = this.sSrc;
}

function IframeTarget( sSrc, sId )
{
	this.sSrc = sSrc;
	this.sId = sId;
}

IframeTarget.prototype.open = function()
{
	if ( !this.ns47up )
	{
		var target = top.frames[ this.sSrc ];
		if ( target )
			target.src = this.sSrc;
	}
}
