function fixPNG(myImage) 
{
	 
	    if (isMinIE6) 
	    {
	   var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
	             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
	                  + " style=\"" + "width:" + myImage.width 
	                  + "px; height:" + myImage.height 
	                  + "px;" + imgStyle + ";"
	                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML   
	}
    
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}


function checkFloat(field)
{
	pattern = /^\d+(?:\.\d{0,2})?$/; //getal met max 2 decimalen
	
	if(pattern.test(field.value)==false)
	{
		var veldlengte = field.value.length;
		var newvalue = Left(field.value, veldlengte-1);
		field.value = newvalue;
		if (veldlengte > 1) {
			checkFloat(field);
		}
	}
}

