function getFlashMovieObject()
{
    var movie = window.document.getElementById("flips_en");  
    
    if( movie == null )
    {
        movie = window.document.getElementById("flips_de");  
    }
    
	return movie;
}


function GetFrameFlashMovie()
{
	var flashMovie=getFlashMovieObject();
	// 4 is the index of the property for _currentFrame
	var idxCurrentFrame=flashMovie.TGetProperty( "/", 4 );
	
	return parseInt( idxCurrentFrame );			
}


function SetFrameFlashMovie( idxFrame )
{
	var flashMovie=getFlashMovieObject();
	
	flashMovie.GotoFrame( idxFrame );		
}


function NextFrameFlashMovie()
{
	var flashMovie=getFlashMovieObject();
	// 4 is the index of the property for _currentFrame
	var currentFrame=flashMovie.TGetProperty("/", 4);
	var nextFrame=parseInt(currentFrame);
	flashMovie.GotoFrame(nextFrame);		
	window.document.getElementById("label").innerText=nextFrame;  
}


function PlayFlashMovie()
{
	var flashMovie=getFlashMovieObject();

	if( flashMovie )
	{
		flashMovie.Play();	
	}
}


function openSite( strLocation )
{
	var flashMovie=getFlashMovieObject();
	
	// 4 is the index of the property for _currentFrame
	var currentFrame = flashMovie.TGetProperty( "/", 4 );
	var idxCurrentFrame = parseInt( currentFrame );
		
	location.href = strLocation; // + "?Idx=" + idxCurrentFrame;
}


function onLoad()
{
/*
	url = location.href;
	parameters = url.split("?");
	
	if( parameters[1] )
	{
		index = parameters[1].split(/Idx=/i)[0];
		SetFrameFlashMovie( parseInt(index) );	
	}
	else
	{
		// Your error handling here
	}
*/	
	PlayFlashMovie();
}


function Argument( search ) 
{
   var arg = new Array();
   var location = window.location.search;
  
   if (location.length > 0) {
      location = location.substr(1, location.length - 1);
      
      arg = location.split("&");
   } else {
      arg[0] = false;
      return "";
   }   
   
   for( i = 0; i < arg.length; i++ )
   {
		if( arg[i].split("=")[0] == search )
		{
			return arg[i].split("=")[1];			
		}
   }
   return "";
}
	
		
function tbSearch_Click()
{
	var ctl = document.getElementById("tbSearch");			
	ctl.value = "";
}
	
		
function tbSearch_Blur()
{
	var ctl = document.getElementById("tbSearch");			
	
	if( ctl.value == "" )
	{
		
		if( Argument("displaylang") == "en" )
		{
			ctl.value = "Search";
		}
		else		
		{
			ctl.value = "Suchbegriff";
		}		
	}		
}
	
		
function tbLogin_Click()
{
	var ctl = document.getElementById("tbLogin");			
	ctl.value = "";
}
	
		
function tbLogin_Blur()
{
	var ctl = document.getElementById("tbLogin");			
	
	if( ctl.value == "" )
	{
		
		if( Argument("displaylang") == "en" )
		{
			ctl.value = "Username";
		}
		else		
		{
			ctl.value = "Benutzername";
		}		
	}			
}


function tbPass_Click()
{
	var ctl = document.getElementById("tbPass");			
	ctl.value = "";
}	


function tbPass_Blur()
{
	var ctl = document.getElementById("tbPass");			
	
	if( ctl.value == "" )
	{
		
		if( Argument("displaylang") == "en" )
		{
			ctl.value = "Password";
		}
		else		
		{
			ctl.value = "Passwort";
		}		
	}		
}






	
