function menu(item) {
   var link="http://www.reinaerde.nl/";
   //var link="http://www.testserver2.nl/reinaerdeCorporate/";
   //var link="http://demo.lync.nl/reinaerde/";

   if (item=="werk")
      parent.content.location = link+"html/werkenbijreinaerde/content.html";
   else if (item=="home") 
      parent.content.location = link+"php/main.php?c-Object=nieuws&c-Action=homepage";
      else if (item=="diensten")
      parent.content.location = link+"html/diensten/content.html";
   else if (item=="sitemap")
      parent.content.location = link+"sitemap.html";
   else if (item=="organisatie")
      parent.content.location = link+"html/organisatie/content.html";
   else if (item=="expertises")
      parent.content.location = link+"html/expertises/content.html";
   else if (item=="contact")
      parent.content.location = link+"php/main.php?c-Object=formulier&c-Action=contactFormulier";
   else if (item=="stages")
      parent.content.location = link+"php/main.php?c-Object=formulier&c-Action=opleidingFormulier";
   else if (item=="fontsmall") {
      document.body.style.fontSize='100%';
   }else if (item=="fontmedium") {
      document.body.style.fontSize='120%';
   }else if (item=="fontlarge") {
      document.body.style.fontSize='140%';
   }else
      parent.content.location = link+"php/main.php?c-Object="+item+"&c-Action=list";
}

function showLocatie (id,refPage,refID) {

   if(refPage!=null && refID!=null )
      parent.content.location = "main.php?c-Object=locatie&c-Action=show&ID=" + id+"&refPage="+refPage+"&refID="+refID;
   else
      parent.content.location = "main.php?c-Object=locatie&c-Action=show&ID=" + id;
}

function showLocatieShort(id,refPage,refID) {

   if(refPage!=null && refID!=null )
      parent.content.location = "main.php?c-Object=locatie&c-Action=show&display=false&doelgroep=false&ID=" + id+"&refPage="+refPage+"&refID="+refID;
   else
      parent.content.location = "main.php?c-Object=locatie&c-Action=show&ID=" + id;
}

function showVacature (id) {
   parent.content.location = "main.php?c-Object=vacature&c-Action=show&ID=" + id;
}

function showVacature2 (id) {
   parent.content.location = "http://www.reinaerde.nl/php/main.php?c-Object=vacature&c-Action=show&ID=" + id;
}

function showVrijwilliger (id) {
   parent.content.location = "main.php?c-Object=vrijwilliger&c-Action=show&ID=" + id;
}

function showStage (id) {
   parent.content.location = "main.php?c-Object=stage&c-Action=show&ID=" + id;
}

function showNieuws(id) {
   parent.content.location = "main.php?c-Object=nieuws&c-Action=show&ID=" + id;
}

function showBouwproject(id) {
   parent.content.location = "main.php?c-Object=bouwproject&c-Action=show&ID=" + id;
}


function back(page,id) {

   if(page!=null){

      if(page=='LO') {
         parent.content.location = "main.php?c-Object=locatiekaart&c-Action=ShowLocaties";
      } else if (id==null && page =='vrijwilliger')  {
      	parent.content.location = "main.php?c-Object="+page+"&c-Action=listVacatures"
     } else {
         if(id!=null)
            parent.content.location = "main.php?c-Object="+page+"&c-Action=show&ID=" + id;
         else
            parent.content.location = "main.php?c-Object="+page+"&c-Action=list"
      }
	  
   }else{
      parent.data.theForm.submit();
   }
}

function showlocatieByPlaats(plaats) {
   parent.data.theForm.elements['l-plaats'].value = plaats;
   parent.data.theForm.elements['l-sector'].value = "";
   parent.data.theForm.elements['l-doelgroep'].value = "";
   parent.data.theForm.elements['l-doelgroep'].value = "";
   parent.data.theForm.elements['c-Offset'].value = "1";
   parent.data.theForm.elements['refPage'].value = "locatie_overzicht";
   parent.data.theForm.submit();
}

function soliciteer (page,id) {
   parent.content.location = "main.php?c-Object="+page+"&c-Action=form&ID=" + id;
}

var da  = (document.all) ? 1 : 0;
var pr  = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);


function printThis(){
   if (pr){
      window.print();
   }else if (da && !mac){
      vbPrintPage();
   }else{
      alert("Sorry, uw browser ondersteunt deze optie niet.");
   }
}

function setCookie(name, value, expires, path, domain) {
   document.cookie = name + "=" + escape(value) + 
   ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
   ((path == null)    ? "; path=/" : "; path=" + path) +
   ((domain == null)  ? "" : "; domain=" + domain);
}
function getCookie(name) {
   var cname = name + "=";               
   var dc = document.cookie;             
   var result = null;
   if(dc.length > 0) {
      begin = dc.indexOf(cname);       
      if(begin != -1) { 
         begin += cname.length;       
         end = dc.indexOf(";", begin);
         if(end == -1) {
            end = dc.length;
         }
         result = unescape(dc.substring(begin, end));
      } 
   }
   return result;
}
