// JavaScript Document

	vopros = new Image; vopros.src="images/vopros-o.gif";
	krestik = new Image; krestik.src="images/krestik-o.gif";
	

function ChangeImg(id,src)
	{
 	document.images[id].src = src;
	}

/***********************************/

function SetImg ( src, text )
	{
	
	iframe = document.getElementById ('content_iframe');	
	iframe.src = '/foto/foto.htm?'+src;	
		
	SetCaption(text);		
	}
	
	
function SetVideo ( video_num, text )
	{
	iframe = document.getElementById ('content_iframe');
	iframe.src = '/video/video_'+video_num+'.htm';	
	
	SetCaption(text);			
	}
	
	
function SetCaption ( text )
	{
	caption = document.getElementById ('content_caption_div');	
	
	if ( typeof(text) != 'undefined' )
		caption.innerHTML = text;
	else
		caption.innerHTML = '';	
		
	}
	

/**************************************************************************************/

function ShowItem (id,b)
    {
    var item;
    if (typeof(id) == 'object')
       item = id;
    else
       item = document.getElementById(id);

    if(b)
        item.style.display='block';
    else
        item.style.display='none';
    }
	
/**************************************************************************************/


function SetMenu (idx)
    {
	if ( idx == 1 )
		{
		ShowItem('images_1_div',1);	
		ShowItem('images_2_div',0);	
		}
	else
		{
		ShowItem('images_1_div',0);	
		ShowItem('images_2_div',1);		
		}
		
	}
	
/**************************************************************************************/

var is_mouse_over_tooltip_div = 0;
var is_mouse_over_whatthis_div = 0;


function ShowTooltipDiv (b)
	{
	ShowItem('whatthis_tooltip_div',b);	
	}

/**************************************************************************************/

function OnOverTooltipDiv (b)
	{ 
	is_mouse_over_tooltip_div = b;
	}

function OnOverWhatthisDiv (b)
	{ 
	is_mouse_over_whatthis_div = b;
	}

function OnDocumentClick ()
	{ 
	if ( !is_mouse_over_tooltip_div && !is_mouse_over_whatthis_div )	
		{
		ShowTooltipDiv(0);	
		}
		
	}
	
/**************************************************************************************/
