window.load = init();


function doSearch(text) {
 var zoekVeld = document.getElementById('searchFrmZoek');
 var searchFrm = document.getElementById('searchFrm');
 zoekVeld.value = text;
 searchFrm.submit();
}

function DetectFlash(){
  var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  
  // Check to see if the version meets the requirements for playback
  if (!hasReqestedVersion) {
  
    var pid = getVar('pid');
    if(pid == ''){
      window.location = "http://www.adobe.com/go/gntray_dl_getflashplayer";
    }
  }

}

function openURL(buid){


  buid = parseInt(buid);
  if(!isNaN(buid)){
    new Ajax.Updater('content_content', '/request',{ parameters: { action: 'openURL', buid: buid},method: 'post'})
  }

}

function openAjaxPage(buid){
  //alert('openajaxpage:'+buid);

  buid = parseInt(buid);
  if(!isNaN(buid)){
    new Ajax.Updater('content_content', '/request',{ parameters: { action: 'openURL', buid: buid},method: 'post'})
  }
}

function newsletterSubscribe()
{
  
  if($F('newsletter_email').isEmail()) new Ajax.Updater('newsletterBlock', '/request',{ parameters: { email: $F('newsletter_email'), action: 'newsletterSubscribe'},method: 'post'})
  else new Effect.Highlight('newsletter_email', {startcolor: '#DA7183',duration: 1.5})
}

function showSubscribe()
{
$('newsletterBlock').innerHTML = '<h3>Join our newsletter</h3>Your e-mail: <input type="text" name="newsletter_email" id="newsletter_email" size="33"/><br/><div align="right" class="newsletterSubscribeWrapper"><input type="button" onclick="newsletterSubscribe()" value="SUBSCRIBE" class="newsletterSubscribeSubmit mouseover"/><img align="absmiddle" src="/images/content/search-knop.gif" style="border: 0px none ;" onclick="newsletterSubscribe()" class="mouseover"/></div>';
}


String.prototype.isEmail = function () { var rx = new RegExp("\\w+([-+.\’]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(this); return (matches != null && this == matches[0]); }

function action(strAction)
   {
   var parentPID='';
   if (action.arguments.length>1) {
    parentPID = '&ppid='+action.arguments[1];
    }
   if (strAction!="")
      {
      var href = document.location.href;
      var lang = href.split('/');
      if (lang[3]!='' && lang[3]!='index.php') {
        document.location.href = '/'+lang[3]+'/Home'+strAction;
        }
      else document.location.href = '/nl/Home'+strAction;
      }
   else document.location.href = '/nl/Home/about-us/profile';
   }


function resizeFlash(size) {

 var flashheadermovie = document.getElementById('flashmenumovie');
 flashheadermovie.style.height = size+'px';
 //flashheadermovie.style.position = 'absolute';
}


function init(){
  //DetectFlash();
}

function getVar(name)
         {
         get_string = document.location.search;         
         return_value = '';
         
         do { //This loop is made to catch all instances of any get variable.
            name_index = get_string.indexOf(name + '=');
            
            if(name_index != -1)
              {
              get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);
              
              end_of_value = get_string.indexOf('&');
              if(end_of_value != -1)                
                value = get_string.substr(0, end_of_value);                
              else                
                value = get_string;                
                
              if(return_value == '' || value == '')
                 return_value += value;
              else
                 return_value += ', ' + value;
              }
            } while(name_index != -1)
            
         //Restores all the blank spaces.
         space = return_value.indexOf('+');
         while(space != -1)
              { 
              return_value = return_value.substr(0, space) + ' ' + 
              return_value.substr(space + 1, return_value.length);
							 
              space = return_value.indexOf('+');
              }
          
         return(return_value);        
         }







