var vestigingen = [
/*
                    {DWID: '107', ID: '0',  Plaats: 'Alkmaar',    X:68,   Y:64,   Lat: 52.632356,   Lng: 4.750678},
                    {DWID: '101', ID: '1',  Plaats: 'Amersfoort', X:99,   Y:106,  Lat: 52.15659,    Lng: 5.388917},
*/
                    {DWID: '2',   ID: '2',  Plaats: 'Amsterdam - Funen Park',  X:72,   Y:88,   Lat: 52.373812,   Lng: 4.89095,  Web:"http://www.funen-park.nl/" },
                    {DWID: '3',   ID: '3',  Plaats: 'Amsterdam - Sloterweg',  X:82,   Y:84,   Lat: 52.373812,   Lng: 4.89095,  Web:"http://www.wonenaandesloterweg.nl/" },
/*
                    {DWID: '4',   ID: '3',  Plaats: 'Apeldoorn',  X:129,  Y:101,  Lat: 52.216322,   Lng: 5.964541},
                    {DWID: '5',   ID: '4',  Plaats: 'Arnhem',     X:126,  Y:121,  Lat: 51.97973,    Lng: 5.912403},
                    {DWID: '8',   ID: '5',  Plaats: 'Breda',      X:67,   Y:154,  Lat: 51.589322,   Lng: 4.774492},
                    {DWID: '11',  ID: '6',  Plaats: 'Den Bosch',  X:94,   Y:146,  Lat: 51.689221,   Lng: 5.30421},
                    {DWID: '12',  ID: '7',  Plaats: 'Den Haag',   X:43,   Y:112,  Lat: 52.07825,    Lng: 4.313656},
                    {DWID: '13',  ID: '8',  Plaats: 'Dordrecht',  X:61,   Y:135,  Lat: 51.811204,   Lng: 4.668371},
                    {DWID: '16',  ID: '9',  Plaats: 'Eindhoven',  X:104,  Y:167,  Lat: 51.436538,   Lng: 5.478097},
                    {DWID: '103', ID: '10', Plaats: 'Enschede',   X:172,  Y:97,   Lat: 52.220819,   Lng: 6.891139},
                    {DWID: '22',  ID: '11', Plaats: 'Groningen',  X:159,  Y:16,   Lat: 53.214883,   Lng: 6.567758},
                    {DWID: '24',  ID: '12', Plaats: 'Haarlem',    X:60,   Y:87,   Lat: 52.379441,   Lng: 4.637856},
                    {DWID: '26',  ID: '13', Plaats: 'Heerlen',    X:130,  Y:212,  Lat: 50.883041,   Lng: 5.980934},
                    {DWID: '108', ID: '14', Plaats: 'Hilversum',  X:88,   Y:100,  Lat: 52.223989,   Lng: 5.170999},
                    {DWID: '31',  ID: '15', Plaats: 'Leiden',     X:52,   Y:106,  Lat: 52.161086,   Lng: 4.490153},
                    {DWID: '33',  ID: '16', Plaats: 'Maastricht', X:115,  Y:212,  Lat: 50.849847,   Lng: 5.687259},
                    {DWID: '35',  ID: '17', Plaats: 'Nijmegen',   X:122,  Y:132,  Lat: 51.841692,   Lng: 5.858651},
*/
                    {DWID: '42',  ID: '18', Plaats: 'Rotterdam',  X:52,   Y:126,  Lat: 51.922623,   Lng: 4.470748,  Web:"http://www.statendam-rotterdam.nl/" },
/*
                    {DWID: '45',  ID: '19', Plaats: 'Tilburg',    X:83,   Y:154,  Lat: 51.555244,   Lng: 5.09065,   Web:"http://www.koopwoningen-tilburg.nl/?ca=427" },

                    {DWID: '49',  ID: '20', Plaats: 'Utrecht',    X:85,   Y:112,  Lat: 52.091262,   Lng: 5.122748},
                    {DWID: '46',  ID: '21', Plaats: 'Zaandam',    X:70,   Y:82,   Lat: 52.438668,   Lng: 4.825484},
                    {DWID: '100', ID: '22', Plaats: 'Zwolle',     X:135,  Y:76,   Lat: 52.512794,   Lng: 6.091539}
*/                    
                  ];

/* =============================== default functies >>> ======================== */
function da(e)
{
  return document.getElementById(e);
}

function isNoE(o)
{
  if(o == null || o == '' || o == 'undefined')
    return true;
  else
    return false;
}

function showNode(e)
{
  da(e).style.display = "block";
}

function hideNode(e)
{
  da(e).style.display = "none";
}


function vervang(v, f, t)
{
out = f; // replace this
add = t; // with this
temp = "" + v; // temporary holder

  while (temp.indexOf(out)>-1) {
  pos= temp.indexOf(out);
  temp = "" + (temp.substring(0, pos) + add + 
  temp.substring((pos + out.length), temp.length));
  }
return temp;
}
/* =========================== end default functies >>> ======================== */

/* ============================== Register functies >>> ======================== */
function switchFormBox(ordinal)
{
  var temp = document.getElementById('hiddenCurrentStep').value;
  document.getElementById('hiddenCurrentStep').value = ordinal;
  if(parseInt(ordinal) > parseInt(temp))
  {
    if(!(validateCurrentContainer('regdetails'+temp)))
    {
     document.getElementById('hiddenCurrentStep').value = temp;
     return;
    }
  }
  
  for(i = 1; i <= 3; i++)
  {
    document.getElementById('regdetails'+i).style.display = 'none';
  }
  document.getElementById('regdetails'+ordinal).style.display = 'block';
  
  for(j = 1; j <= 3; j++)
  {
    if(document.getElementById('vraaglink'+j))
      document.getElementById('vraaglink'+j).className = 'inactive';
  }
  
  for(k = 1; k <= ordinal; k++)
  {
    if(document.getElementById('vraaglink'+k))
      document.getElementById('vraaglink'+k).className = 'active';
  }
}
/* ========================== end Register functies >>> ======================== */

function clearEmail(e)
{
  if(errorDiv != null) {
    e.parentNode.removeChild(errorDiv);
    errorDiv = null;
    e.select();
    da('hiddenEmailValid').value = '';
  }
}

////checkCity///
/*var validCity = true;
function checkCity()
{
  url = "getLocationOnKaart.aspx";
  dePlaats = da('plaats').value;
  var url= "/ajax/"+url+"?tm=" + new Date().getTime() + "&plaats=" + dePlaats;

  xmlHttp = GetXmlHttpObject(checkCityInner);
  xmlHttp.open("GET", url , false) 
  xmlHttp.send(null);

  return validCity;
}

function checkCityInner() 
{ 
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  { 
    if(xmlHttp.responseText != "")
    {
      validCity = true;
    }
    else
    {
      if(da('plaats').value != "")
      {
        alert("City not found, try again");
        da('plaats').value= "";
        da('plaats').focus();
        validCity = false;
      }
    }
  } 
}*/
////checkCity///
