amCollection = new Array();
function Am()	{
	this. popWidth = 160;
	this. popWidthNetto = 140;
	this. offsetImageSrc = amImageDir + "am200_bg2.gif";

	this. toString = new Function( 'return "amCollection[ ' + amCollection. length + ' ]";' )
	amCollection[ amCollection. length ] = this;

	this. def = arguments[ 0 ];
	this. items = new Array();
	for( var c = this. def; c; c = c. parentNode )	{
		this. items[ this. items. length ] = new AmItem( c, this );
		}

	}
Am. prototype. staticHTML = function()	{
	var s = '';
	s += '<br>';
	s += imageHTML( this. offsetImageId = UI(), this. offsetImageSrc );
	s += '<br>';
	return s;
	}
Am. prototype. dynamicHTML = function()	{
	var s = '';
	for( var c = this. items. length - 1; c >= 0; c-- )	{
		s += this. items[ c ]. dynamicHTML();
		}
	return s;
	}
Am. prototype. init = function()	{
	this. offsetImage = window. document. getElementById( this. offsetImageId );
	this. x = getPageX( this. offsetImage );
	this. y = getPageY( this. offsetImage );

	for( var c = this. items. length - 1; c >= 0; c-- )	{
		this. items[ c ]. init();
		}
	}
Am. prototype. step = function()	{
	if( this. mouseIsOverWait )	{
		this. mouseIsOverWait --;
		}
	else	{
		var visibility = "hidden";
		for( var c = 0; c < this. items. length; c++ )	{
			if( this. mouseIsOver == this. items[ c ] || !this. mouseIsOver )	{
				visibility = "inherit";
				}
			this. items[ c ]. titleLayer. style. visibility = visibility;
			}
		}
	for( var c = 0; c < this. items. length; c++ )	{
		this. items[ c ]. step();
		}
	}
amItemCollection = new Array();
function AmItem()	{
	this. popSpeed = 0.5;
	this. popWidth = 160;
	this. popWidthNetto = 140;
	this. popBgImage = amImageDir + "am_bgimg_popup.gif";
	this. popImageSrcPijlBack = amImageDir + "am200_pijlkleinback.gif";
	this. popImageSrcPijlFwd = amImageDir + "am200_pijlkleinfwd.gif";
	this. popImageSrcHomePijlBack = amImageDir + "am200_pijlback.gif";
	//this. popImageSrcHomePijlBack = amImageDir + "am200_pijlexpand.gif";
	this. popImageSrcHomePijlFwd = amImageDir + "am200_pijlfwd.gif";
	this. popImageSrcHomePijlExpand = amImageDir + "am200_pijlexpand.gif";
	this. popAClass = "am";
	this. popZIndex = 100;
	this. titleZIndex = 100;
	this. mouseIsOverArray = new Array();

	this. toString = new Function( 'return "amItemCollection[ ' + amItemCollection. length + ' ]";' )
	amItemCollection[ amItemCollection. length ] = this;

	this. def = arguments[ 0 ];
	this. parent = arguments[ 1 ];

	this. onmouseover = new Function();
	this. onmouseout = new Function();
	}
AmItem. prototype. staticHTML = function()	{
	var s = '';
	return s;
	}
AmItem. prototype. dynamicHTML = function()	{
	this. pop = new LayerTransition();
	this. pop. speed = this. popSpeed;
	var s = '';
	s += layerStartHTML( this. pop. layerId, "position:absolute;visibility:hidden;z-index:" + this. popZIndex + ";" + ( this. def. parentNode ? "background-image:url(" + this. popBgImage + ");" : "" ) );
	s += '<table border="0" cellspacing="0" cellpadding="0" width="' + this. popWidth + '">';
	s += '<tr>';
	s += '<td align="center">';
	if( this. def. parentNode )	{
		s += '<table border="0" cellspacing="0" cellpadding="2" width="' + this. popWidthNetto + '">';
		var child = this. def. firstChild;
		while( child )	{
			s += '<tr>';
			if( this. def != this. parent. def )	{
				s += '<td valign="top">';
				s += imageHTML( null, this. popImageSrcPijlBack );
				
				s += '</td>';
				}
			s += '<td';
			s += ' width="100%"';
			s += ' valign="top"';
			if( this. def == this. parent. def )	{
				s += ' align="right"';
				}
			s += '>';
			s += '<a';
			s += ' href="' + child. attributes. href + '"';
			s += ' class="' + this. popAClass + '"';
			s += '>';
			s += child. attributes. text;
			s += '</a>';
			s += '</td>';
			if( this. def == this. parent. def )	{
				s += '<td valign="top" nowrap>';
				s += imageHTML( null, this. popImageSrcPijlFwd );
				s += '</td>';
				}
			s += '</tr>';
			child = child. nextSibling;
			}
		s += '</table>';
		}
	else	{
		s += '<table border="0" cellspacing="0" cellpadding="0" width="' + this. popWidthNetto + '">';
		var child = this. def. firstChild;
		while( child )	{
			s += '<tr>';
			if( this. def != this. parent. def )	{
				s += '<td valign="top">';
				s += imageHTML( null, this. popImageSrcHomePijlBack );
				s += '</td>';
				}
			s += '<td';
			s += ' width="100%"';
			s += ' valign="top"';
			if( this. def == this. parent. def )	{
				s += ' align="right"';
				}
			s += '>';
			s += moImageHTML( eImageArray( child. attributes. imageSrcDefault, child. attributes. imageSrcOver ), child. attributes. href, child. attributes. alt );
			s += '</td>';
			if( this. def == this. parent. def )	{
				s += '<td valign="top" nowrap>';
				s += imageHTML( null, this. popImageSrcHomePijlFwd );
				s += '</td>';
				}
			s += '</tr>';
			child = child. nextSibling;
			}
		s += '</table>';
		}
	s += '</td>';
	s += '</tr>';
	s += '</table>';
	if( this. def. attributes. extraHTML )	{
		s += this. def. attributes. extraHTML;
		}
	s += endHTML();

	s += layerStartHTML( this. titleLayerId = UI(), "position:absolute;visibility:hidden;z-index:" + this. titleZIndex + ";" );
	s += '<table border="0" cellspacing="0" cellpadding="0" width="' + this. popWidth + '">';
	s += '<tr>';
	s += '<td align="center">';
	s += '<table border="0" cellspacing="0" cellpadding="0" width="' + this. popWidthNetto + '" >';
	s += '<tr>';
	s += '<td';
	s += ' width="100%"';
	s += ' valign="top"';
	if( this. def == this. parent. def )	{
		s += ' align="right"';
		}
	s += '>';
	s += '<a';
	s += ' href="' + this. def. attributes. href + '"';
	s += ' onmouseover="' + this + '. mouseover( 0 );' + this + '. multiImageTitle. set( 1 );return false;"';
	s += ' onmouseout="' + this + '. mouseout( 0 );' + this + '. multiImageTitle. set( 0 );return false;"';
	s += '>';
	if( this. def == this. parent. def )	{
		s += ( this. multiImageTitle = new MultiImage( eImageArray( this. def. attributes. imageSrcDefault, this. def. attributes. imageSrcOver ), this. def. attributes. alt ) ). HTML();
		s += ( this. multiImage = new MultiImage( eImageArray( this. popImageSrcHomePijlExpand, this. popImageSrcHomePijlExpand ) ) ). HTML();
		//s += ( this. multiImage = new MultiImage( eImageArray( this. popImageSrcHomePijlBack, this. popImageSrcHomePijlExpand ) ) ). HTML();
		}
	else	{
		s += ( this. multiImage = new MultiImage( eImageArray( this. popImageSrcHomePijlBack, this. popImageSrcHomePijlExpand ) ) ). HTML();
		s += ( this. multiImageTitle = new MultiImage( eImageArray( this. def. attributes. imageSrcDefault, this. def. attributes. imageSrcOver ), this. def. attributes. alt ) ). HTML();
		}
	s += '</a>';
	s += '</td>';
	s += '</tr>';
	s += '</table>';
	s += '</td>';
	s += '</tr>';
	s += '</table>';
	s += endHTML();
	return s;
	}
AmItem. prototype. init = function()	{
	this. multiImage. init();
	this. multiImageTitle. init();
	this. pop. init();
	this. titleLayer = window. document. getElementById( this. titleLayerId );

	this. titleLayer. style. left = this. parent. x;
	this. titleLayer. style. top = this. parent. y;
	this. parent. y += this. titleLayer. offsetHeight;
	this. pop. layer. style. left = this. parent. x;
	this. pop. layer. style. top = this. parent. y;
	
	this. titleLayer. style. visibility = "inherit";

	this. pop. layer. onmouseover = new Function( this + ". mouseover( 1 );return false;" );
	this. pop. layer. onmouseout = new Function( this + ". mouseout( 1 );return false;" );
	}
AmItem. prototype. step = function()	{
	if( !this. parent. mouseIsOverWait )	{
		if( this. parent. mouseIsOver == this || !this. parent. mouseIsOver && this == this. parent. items[ 0 ] )	{
			this. multiImage. imageIndex = 1;
			if( !this. pop. visible )	{
				this. pop. transition = "wipeInFromLeft";
				}
			}
		else	{
			this. multiImage. imageIndex = 0;
			this. multiImageTitle. imageIndex = 0;
			if( this. pop. visible )	{
				this. pop. transition = "snapOut";
				}
			}
		}
	this. multiImage. step();
	this. multiImageTitle. step();
	this. pop. step();
	}
AmItem. prototype. mouseover = function()	{
	this. mouseIsOverArray[ arguments[ 0 ] ] = true;
	if( this. mouseIsOverArray[ 0 ] || this. mouseIsOverArray[ 1 ] )	{
		this. parent. mouseIsOver = this;
		this. parent. mouseIsOverWait = 0;
		this. onmouseover();
		}
	}
AmItem. prototype. mouseout = function()	{
	this. mouseIsOverArray[ arguments[ 0 ] ] = false;
	if( !( this. mouseIsOverArray[ 0 ] || this. mouseIsOverArray[ 1 ] ) )	{
		this. parent. mouseIsOver = null;
		this. parent. mouseIsOverWait = 5;
		this. onmouseout();
		}
	}



jsLoaded = true;
