function externalLinks() 
{ 
   var anchor;

   if (!document.getElementsByTagName) { return; }

   var anchors = document.getElementsByTagName("a");
 
   for (var i = 0; i < anchors.length; i++) 
   { 
      anchor = anchors[i]; 
      
      if (anchor.getAttribute("href") && anchor.getAttribute("rel") === "external") 
      {
         anchor.target = "_blank"; 
      }
   } 
} 

function searchformSubmit()
{
   var strValue = document.searchform.searchvalue.value;

   if (strValue.length !== 0)
   {   
      document.searchform.submit();
   }
   else
   {
      alert('U heeft geen zoekwaarde opgegeven'); 
      document.searchform.searchvalue.focus();
   }
}

function contactformSubmit()
{
   if (Validate('contactform'))
   {
      document.contactform.submit();
   }
}

function estimatequotationformSubmit()
{
   if (Validate('estimatequotationform'))
   {
      document.estimatequotationform.submit();
   }
}

function newsletterClear()
{
   document.subscribe.email.value = new String()
}

function newsletterReset()
{
   if (document.subscribe.email.value.length === 0)
   {
      document.subscribe.email.value = 'Vul hier uw e-mail adres in'
   }
}

function newsletterSubmit()
{
   if (Validate('subscribe'))
   {
      document.subscribe.submit();
   }
}



window.onload = externalLinks;