// Menu
knop1off = new Image();
knop1off.src = "images/menu_01off.gif";
knop2off = new Image();
knop2off.src = "images/menu_02off.gif";
knop3off = new Image();
knop3off.src = "images/menu_03off.gif";
knop4off = new Image();
knop4off.src = "images/menu_04off.gif";
knop5off = new Image();
knop5off.src = "images/menu_05off.gif";


knop1on = new Image();
knop1on.src = "images/menu_01on.gif";
knop2on = new Image();
knop2on.src = "images/menu_02on.gif";
knop3on = new Image();
knop3on.src = "images/menu_03on.gif";
knop4on = new Image();
knop4on.src = "images/menu_04on.gif";
knop5on = new Image();
knop5on.src = "images/menu_05on.gif";


function img_act(imgName)
{
        imgOn = eval(imgName + "on.src");
        document.images[imgName].src = imgOn;
}

function img_inact(imgName)
{
        imgOff = eval(imgName + "off.src");
        document.images[imgName].src = imgOff;
}


// Anti-uitvalscript
function blockError(){return true;}
window.onerror = blockError;



// Selecteer functie (banners)

function SelectIt(What)
 {
	if (What.value=="") 
	  {
		alert('Klik eerst op de button "Selecteer Alles"')
	  }
	else
	  {
		What.focus();
		What.select();
		
		if (document.all)
		  {
			What.createTextRange().execCommand("Copy");
			alert("De code is geselecteerd (Je kunt het plakken in je editor met Ctrl-V )");
		  }
	  }
  }



// PNG
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
window.attachEvent("onload", correctPNG);

