var FPageID;  // Global voor het bijhouden van het nummer van de headline

// Alle tekst gaat in twee array's
// Dit is de verspringende tekst
var FITGoalsArray = ["the scope and level of protection should be specific &amp; appropriate to the asset at risk",
                     "security mechanisms must be pervasive, simple, scalable &amp; easy to manage",
                     "assume context at your peril",
                     "devices and applications must communicate using open, secure protocols",
                     "all devices must be capable of maintaining their security policy on an untrusted network",
                     "all people, processes, technology must have declared and transparent levels of trust for any transaction to take place",
                     "mutual trust assurance levels must be determinable",
                     "authentication, authorisation and accountability must interoperate / exchange outside of your locus / area of control",
                     "access to data should be controlled by security attributes of the data itself",
                     "data privacy (and security of any asset of sufficiently high value) requires a segregation of duties/privileges",
                     "by default, data must be appropriately secured when stored, in transit and in use",
                     "(source: Jericho Forum Commandments of de-perimeterized future)",
                     "&nbsp;",
                     "&nbsp;",
                     "&nbsp;"
                    ];

// Probeer te voorkomen dat een harvester het mailadres achterhaalt
var FEmlDom = "bas" + "ement";
var FEml = "post" + String.fromCharCode(60 + 4) + FEmlDom + String.fromCharCode(40 + 6) + "nl";

var FTextArray = [];
FTextArray[0] = {Headline: "welkom bij basement.nl",  // Een tweede keer deze tekst niet meer tonen
                 More: "maatwerksoftware voor al uw automatiseringsvraagstukken"
                };
FTextArray[1] = {Headline: "de juiste oplossing met de juiste middelen voor het juiste probleem",
                 More: "het (ver)bouwen van een applicatie, projectbegeleiding, advies of kwaliteitszorg"
                };
FTextArray[2] = {Headline: "flexibel, snel en betrouwbaar",
                 More: "creativiteit voorop - maar ook afspraak is afspraak"
                };
FTextArray[3] = {Headline: "trefwoorden: internet, microsoft windows - schaalbaarheid, performance, beschikbaarheid",
                 More: "een greep: zoekmachine-optimalisatie, prince 2, object oriented, security, windows- of internetprogrammatuur"
                };
FTextArray[4] = {Headline: "moderne technologie&euml;n",
                 More: "soap, ajax, unicode, SOA, model driven - werken onder architectuur"
                };
FTextArray[5] = {Headline: "plezier in het werk",
                 More: "zie ook <a href=\"http://www.teach.nl\" target=\"blank\">teach.nl<\/a> en <a href=\"http://www.woordjesleren.nl\" target=\"blank\">woordjesleren.nl<\/a>, software van basement.nl"
                };
FTextArray[6] = {Headline: "basement.nl<br>bas groot<br>tweede jan steenstraat 96<br>1074 CS&nbsp;&nbsp;AMSTERDAM<br><br><a class=\"red\" href=\"mailto:" + FEml + "\">" + FEml + "<\/a><br>tel. 020 - 77 90 625",
                 More: "maatwerksoftware voor al uw automatiseringsvraagstukken"
                };

var FITGoalID = 0;

function DisplayHeadline()
{
  // Ververs tekst
  document.getElementById("idHeadline").innerHTML = FTextArray[FPageID].Headline;
  // Ververs foto's
  document.getElementById("idImages").innerHTML = "<img class=\"header_img\" alt=\"\" src=\"img/" + FPageID + "a.jpg\"><img class=\"header_img_center\" alt=\"\" src=\"img/" + FPageID + "b.jpg\"><img class=\"header_img\" alt=\"\" src=\"img/" + FPageID + "c.jpg\">";
  // Altijd opnieuw link plaatsen..
  document.getElementById("idMore").innerHTML = "<a class=\"red\" href=\"javascript:DisplayMore();\">meer..<\/a>";
  // Focus verwijderen, anders een rechthoek rond de laatst geklikte link
  document.getElementById("idNextHREF").blur();
  document.getElementById("idLastHREF").blur();
}

function OnTimer()
{
  if (FITGoalID == FITGoalsArray.length - 1)  // Einde bereikt
  {
    FITGoalID = 0;
  }
  else   // Volgende IT-goal
  {
    FITGoalID++;
  }
  document.getElementById("idITGoals").innerHTML = FITGoalsArray[FITGoalID];
  // Timer steeds opnieuw instellen
  setTimeout("OnTimer()", 3000);
}

function Init()
{
  FPageID = 0;
  DisplayHeadline();
  setTimeout("OnTimer()", 1000);
}

function DisplayNext()  // Deze functie wordt aangeroepen als een nieuwe 'pagina' moet worden geopend
{
  if (FPageID == FTextArray.length - 1)  // Laatste pagina bereikt
  {
    FPageID = 1;  // Eerste pagina
  }
  else
  {
    FPageID++;
  }
  DisplayHeadline();
}

function DisplayLast()  // Deze function toont de laatste pagina, met contactgegevens
{
  FPageID = FTextArray.length - 1;
  DisplayHeadline();
}

function DisplayMore()  // Deze functie toont extra tekst onder de headline
{
  document.getElementById("idMore").innerHTML = FTextArray[FPageID].More;
}
