// contactformulieren


function addFormEvent(func) {
  if (!document.getElementById | !document.getElementsByTagName) return
  var oldonload=window.onload
  if (typeof window.onload != 'function') { window.onload=func }
  else {
    window.onload=function() { oldonload(); func() }
  }
}


function attachBorderAndSelect(id){
  var obj0 = document.getElementById(id)
  obj0.onfocus= function() {this.style.border="1px solid #006666"; this.select();}
  obj0.onblur = function() {
                  this.style.border="1px solid #3ab0b0"
                  if (this.value=="") {this.value=this.defaultValue}
                  this.value=this.value
                }
}


function attachBorderToRadio(id){
  var obj0 = document.getElementById(id)
  obj0.onfocus= function() {this.style.border="0px solid #006666"}
  obj0.onblur = function() {this.style.border="0px inset #3ab0b0"}
}


function attachBorderToButton(id){
  var obj0 = document.getElementById(id)
  obj0.onfocus= function() {this.style.border="1px solid #006666"}
  obj0.onblur = function() {this.style.border="1px solid #3ab0b0"}
}


function initContact(){

  if (!document.getElementsByTagName) return

 attachBorderAndSelect('opmerkingen');
 attachBorderAndSelect('woonplaats');
 attachBorderAndSelect('contactpersoon');

 attachBorderAndSelect('telefoon');
 attachBorderAndSelect('mobiel');
 attachBorderAndSelect('emailadres');




 attachBorderToButton('verzenden');

}



function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 




addFormEvent(initContact)
addFormEvent(externalLinks)





