function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}


function HideIndicator(){
	$('indicator').hide() ;
}
function ShowIndicator(){
	Center('indicator') ;
	$('indicator').show() ;
}

function HideInfo(){
	$('layerblack').hide();
	$('_INFO').hide();
	$('_INFODIV').update('');
	$('buttonclosing').show();
}
function ShowInfo(){
	$('layerblack').show();
	HideIndicator() ;	
	Center( '_INFO' );
	$('_INFO').show();	
}
function ShowInfoPos(){
	$('layerblack').show();
	HideIndicator() ;	
	Center( '_INFO' );
	var tt = $('_INFO').getStyle('top') ;
	var pospx = tt.indexOf('px',0);
	if ( pospx==-1 )
		var zzpx = (tt-100);
	else
		var zzpx = (tt.substring(0,pospx))-100 ;
	if( zzpx < 0 ) zzpx = 10 ;
	zzpx = zzpx + 'px';	
	$('_INFO').setStyle({top:zzpx});
	$('_INFO').show();	
}

function ValidateDeleteSelection(){
	new Ajax.Updater('responding', 
		'mod-system/ajax/deleteselection.php', 
		{
			method:"post",
			evalScripts:true,
			parameters: $('deleteornotdelete').serialize(true) 
		} 
	);		
}

function ShowHelp(){
	HideIndicator() ;	
	Center( '_INFO' );
	if ( !($('_INFO').visible()) )
		ShowInfo();
}
function Help( id ){
	ShowIndicator();
	new Ajax.Updater('_INFODIV', 
		'mod-system/ajax/help.php', 
		{
			onComplete:ShowHelp, 
			method:"get",
			evalScripts:true,
			parameters: {idhelp: id }
		} 
	);		
}

function Not_Supported_Phone(){
	ShowIndicator();
	new Ajax.Updater( 'help_error',
							'mod-user/ajax/phone_not_supported.php',
							{
								onComplete: HideIndicator,
								evalScripts:true,
								method:"post",
								parameters:$('form_support_phone').serialize(true)
							}
	);
}

function _tr( S ){
	if ( (typeof(lng)=='undefined') || (typeof(lng[S])=='undefined') || (lng[S] == '') ) return S;
	else return lng[S] ;
}
