	
	var active_content = null;
	var active_image = null;
	var active_anchor = null;
	
	function ShowLightBox()
	{
		myLightbox.start( $(active_anchor) );
	}
	
	function ShowImage( image, anchor )
	{
		if( active_image == image )
		{ return; }
		
		active_anchor = anchor;
		
		$('img').src = $(image).src;
		$('img').title = $(image).offsetTop;
		
		$('img_box').setStyle({
      top: $(image).offsetTop - 20 + 'px',
      left:  $(image).offsetLeft - 20 + 'px'
    }); 
		
		$('img').title = $('img_box').style.top;
		
		if( active_image == undefined )
		{ Effect.Appear( $('img_box'), { duration:0.5, from:0.0, to:0.999999} ); }
		
		active_image = image;
	}
	
	function HideImage()
	{
		Effect.Fade( $('img_box'), {duration:1.0, from:0.999999, to:0.0} );
	}
	
	function ShowContent( content )
	{
		if( active_content == content )
		{ return; }
		
		if( active_content != undefined )
		{ HideContent( active_content ); }
		
		Effect.Appear( content, { duration:1.0, from:0.0, to:0.999999} );
		
		active_content = content;
	}
	
	function HideContent( content )
	{
		Effect.Fade( content, {duration:1.0, from:0.999999, to:0.0} );
		
		active_content = null;
	}

	function ChangeLanguge( lang )
	{
		location.href = "?lang=" + lang;
	}

	var scroll_timer_id;
			
	function scroll_iframe( frm, inc, dir ) 
	{
		if( scroll_timer_id ) 
			clearTimeout( scroll_timer_id );
			
		if( window.frames[ frm ] ) 
		{
			if( dir == "v" ) 
				window.frames[ frm ].scrollBy( 0, inc );
			else window.frames[ frm ].scrollBy( inc, 0 );
				scroll_timer_id = setTimeout( "scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20 );
		}
	}
			
	function stopScroll() { if( scroll_timer_id ) clearTimeout( scroll_timer_id ); }
	

	
