/*
 *  This is the JavaScript made for Beautenaturelle.nl, it makes rounded corners and
 *  displays different content, depending on client window size.
 * 
 * This breaks some other functionality that is default in BeNoCMS, like the 
 * message window pop-up and also the newletter integration.
 * 
 */

  window.onload = function()
  {
   document.getElementById('menu').style.zIndex = "0";
   document.getElementById('menu-inner').style.zIndex = "2";

   if (document.documentElement.clientWidth < 1089)
   {
   	  document.getElementById('footer-logo').style.display = "none";
   }   
   else
   {
   	  document.getElementById('footer-logo').style.display = "inline";
   }

   if (document.documentElement.clientWidth < 1600)
   {
   	  document.getElementById('commercial').style.display = "inline";
   	  if (window.location.hostname == 'www.barrydegraaff.tk')
   	  {
   	     document.getElementById('commercial').style.backgroundImage="url('http://www.barrydegraaff.tk/beautenaturelle/includes/core/random_image.php?uri=images/smaller')";
   	  }
   	  else
   	  {
   	  	 document.getElementById('commercial').style.backgroundImage="url('/includes/core/random_image.php?uri=images/smaller')";
	  }   
   }   
   else
   {   	
   	  document.getElementById('commercial').style.display = "inline";
   	  if (window.location.hostname == 'www.barrydegraaff.tk')
   	  {    
   	     document.getElementById('commercial').style.backgroundImage="url('http://www.barrydegraaff.tk/beautenaturelle/includes/core/random_image.php?uri=images')"; 
   	  }
   	  else
   	  {
   	  	 document.getElementById('commercial').style.backgroundImage="url('/includes/core/random_image.php?uri=images')";
	  }   

   }   
	try
	{
	  nocommercial();
	}
	catch(err)
	{
	//Handle errors here
	}
  }

