function GetCurrentContentFilename( )
{
  // Varriables used to store location name, lengt and position in string.
  var LocationPos = 0;
  var LocationURL = parent.Content.location.pathname;
  var LocationLength = LocationPos = LocationURL.length;

  // Search for characters "/" and "\" to and truncate there
  while (LocationPos > 0 && LocationURL.charAt(LocationPos) != '/' && LocationURL.charAt(LocationPos) != '\\')
  {
    LocationPos--;  // Decrease counter (walks through string backward)
  }

  LocationPos++;    // Raises position by one to ignore the search character
  
  // Retrieve string from current position to end of string
  LocationURL = LocationURL.substring( LocationPos, LocationLength );

  return LocationURL;
}

function SetPageEnglish( )
{
  parent.Content.location = '../eng/' + GetCurrentContentFilename( );

  WriteCookie( "Language", "English" );
}

function SetPageDutch( )
{
  parent.Content.location = '../ned/' + GetCurrentContentFilename( );  

  WriteCookie( "Language", "Dutch" );
}

function DisplaySiteEnglish( )
{
  parent.Menu.location = "../eng/menu.htm";
  parent.Logo.location = "../interface/interface_logo_eng.htm";  

  SetPageEnglish( );
}

function DisplaySiteDutch( )
{
  parent.Menu.location = "../ned/menu.htm";
  parent.Logo.location = "../interface/interface_logo_ned.htm";

  SetPageDutch( );
}

function SetLanguage( )
{
  if ( ReadCookie( "Language" ) == 'English' )
  {
    DisplaySiteEnglish( );
  }
}

