		
		function opacity(id, opacStart, opacEnd, millisec) {
	    //speed for each frame
	    var speed = Math.round(millisec / 100);
	    var timer = 0;
	
	    //determine the direction for the blending, if start and end are the same nothing happens
	    if(opacStart > opacEnd) {
	        for(i = opacStart; i >= opacEnd; i--) {
	            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
	            timer++;
			    }
			} else if(opacStart < opacEnd) {
			    for(i = opacStart; i <= opacEnd; i++) {
			        setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			        timer++;
			   	}
			}
		} 
		
		//change the opacity for different browsers
		function changeOpac(opacity, id) {
		    var object = document.getElementById(id).style;
		    object.opacity = (opacity / 100);
		    object.MozOpacity = (opacity / 100);
		    object.KhtmlOpacity = (opacity / 100);
		    object.filter = "alpha(opacity=" + opacity + ")";
		    if (tmpOpacity == 1 && opacity == 0) {
		    	changeNewsItem();
		    }
		    tmpOpacity = opacity;
		}
		
		function changeNewsItem() {
			if (intCurrentItem > arrNewsItems.length - 1) {
				intCurrentItem = 0;
			}
			
		    try {
			    objNews.innerHTML = arrNewsItems[intCurrentItem];
		    }
		    catch(ex) {
		        //IE snapt geen <a> in innerHTML. Daarom deze "gare" maar werkende oplossing
			    var objNewDiv = document.createElement('div');
			    objNewDiv.id = "footerNews";
			    objNewDiv.innerHTML = arrNewsItems[intCurrentItem];
			    objNews = objNewDiv;
		    }
			intCurrentItem++;
			setTimeout("opacity('footerNews',   0, 100, 700)",0);
			setTimeout("opacity('footerNews', 100,   0, 700)",5000);
		}
		
		function errorDialog() {
			setTimeout("opacity('errorDialog',   0, 100, 700)",0);
			setTimeout("opacity('errorDialog', 100,   0, 700)",10000);
		}
		
		function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
	    {
	       var arVersion = navigator.appVersion.split("MSIE")
	       var version = parseFloat(arVersion[1])
	       if ((version >= 5.5) && (document.body.filters)) 
	       {
	          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
	             }
	          }
	       }    
	    }
	    
	    function resizeImg(objImg) {
    	  var maxW = "600";
          w=objImg.width;
          h=objImg.height;
          if (w > maxW) {
            f=1-((w - maxW) / w);
            objImg.width=w * f;
            objImg.height=h * f;
          }
	    }
	    
	    function report(reportTypeID, linkID) {
	      switch(reportTypeID) {
	        case 1: strreportType = "topic"
	        case 2: strreportType = "forum bericht"
	        case 3: strreportType = "weblog"
	        case 4: strreportType = "weblog bericht"
	        case 5: strreportType = "gastenboek bericht"
		  }

		  strReportReason =	prompt("Wat is de reden waarom je dit " + strreportType + " aan een moderator wilt melden?\nVul niks in of druk op annuleren (cancel) om te stoppen.","");
		  if (strReportReason != "" && strReportReason != null) {
		    document.location.href = "./report.php?reportTypeID="+reportTypeID+"&linkID="+linkID+"&reason="+strReportReason;
		  }
		  return false;
	    }
