function DoImageProcessing(){
    var oImg = null;
    var oContentDiv = document.getElementById("content");
    var oDivs = null;
    var sQuot = escape('\'');
    var sHref = '';
    var aOpen = '';
    var aClose = '';
    var onClick = '';
	var sImg = '';

    if (oContentDiv) oDivs = (oContentDiv.getElementsByTagName("IMG"));

	if (oDivs) {
		for (i = oDivs.length - 1; i >= 0; i--) {
			//run backwards through collection because image's are added to the same div container

			sHref = '';
			aOpen = '';
			aClose = '';
			sImg = '';

			oImg = oDivs[i];



			if (oImg.className != 'DisableAutoRoundCorner' && oImg.className != 'imgRoundedCorner') {
				oNewChild = document.createElement("SPAN");
				var sResult = '';
				//heightoff: expression( '
				//+ '     IsWidthAtMax('+i+', '+oImg.width+')?'
				//+ '        \'auto\':'
				//+ '        \'auto\' );
				//<div id="divImgBox'+i+'" style="width: 100%; overflow: hidden; max-width:'+oImg.width+'px; "></div>


				if (oImg.parentNode.nodeName == 'A' ) {
					oA = oImg.parentNode;
					sHref = oImg.parentNode.href;
					aOpen = '<a href="' + sHref + '">'
					aClose = '</a>'

					sImg = '<a href="'+oA.href+'" target="'+ oA.target +'" style="position:absolute;top:0px;left:0px;"><img src="/Files/System/Rotogroep/images/basics/1px.gif" style="position:absolute;top:0px;left:0px;width:'+oImg.width+'px;height:'+oImg.height+'px;"></a>'
					oImg.parentNode.href = '';
					oImg.parentNode.target = '';
				}


				sResult = '' +
				'<div style="position:relative;">' +
				'<table id="tblImg' +
				i +
				'" border="0" cellpadding="0" cellspacing="0" class="tblCustom"' +
				' style="' +
				'        padding:0px 0px 0px 0px; background-image:url(\'' +
				(oImg.src.toString().replace('\'', sQuot)) +
				'\'); background-repeat:no-repeat; background-position:center; height:' +
				oImg.height +
				'px; text-align:center;' +
				'   width: ';


				if (oContentDiv.className == 'home') {
					sResult += '100%';
				}
				else {
					sResult += oImg.width + 'px';
				}

				sResult += '; max-width:' + oImg.width + 'px;">' +
				'  <tr height="8" valign="top">' +
				'      <td width="8">' +
				'          <img class="imgRoundedCorner" src="/Files/System/Rotogroep/images/basics/tleft.png" width="8" height="8" /></td>' +
				'      <td>' +
				'          <img src="/Files/System/Rotogroep/images/basics/1px.gif" /></td>' +
				'      <td width="8">' +
				'          <img class="imgRoundedCorner" src="/Files/System/Rotogroep/images/basics/tright.png" width="8" height="8" /></td>' +
				'  </tr>' +
				'  <tr>' +
				'      <td width="8">' +
				'          <img src="/Files/System/Rotogroep/images/basics/1px.gif" /></td>' +
				'      <td align="center">' +
				'          '+aOpen+'<img src="/Files/System/Rotogroep/images/basics/1px.gif" width="1" />'+aClose+'</td>' +
				'      <td width="8">' +
				'          <img src="/Files/System/Rotogroep/images/basics/1px.gif" /></td>' +
				'  </tr>' +
				'  <tr>' +
				'      <td width="8" valign="bottom">' +
				'          <img class="imgRoundedCorner" src="/Files/System/Rotogroep/images/basics/bleft.png" width="8" height="8" /></td>' +
				'      <td>' +
				'          <img src="/Files/System/Rotogroep/images/basics/1px.gif" /></td>' +
				'      <td width="8" valign="bottom">' +
				'          <img class="imgRoundedCorner" src="/Files/System/Rotogroep/images/basics/bright.png" width="8" height="8" /></td>' +
				'  </tr>' +
				'</table>' +
				sImg +
				'</div>';

				oNewChild.innerHTML = sResult;

				oImg.src = '';

				/* eventuele A-tag komt van DW. Deze 'verwijderen' aangezien dit conflicteerd met A-Tag om de image */
				if (oImg.parentNode.nodeName == 'A')
					oImg.parentNode.parentNode.replaceChild(oNewChild,oImg.parentNode)
				else
					oImg.parentNode.replaceChild(oNewChild, oImg);

			}

		}
	}

    if(is_ie5_5 || is_ie6){

        //update menu width
        IE6WindowOnresize();
        //and attach to resize event
        window.onresize = IE6WindowOnresize;

        //do png24 workaround for ie 5.5 till ie6
        oImg = null;

        for(i=0;i<document.images.length;i++){
            oImg = document.images[i];
            if( oImg.src.indexOf('.png')>0 & (oImg.className=='imgRoundedCorner' | oImg.className=='menu_arrow' | oImg.className=='imgLogo') )
            {

                oImg.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+ oImg.src +'\', sizingMethod=scale);'
                //if img width=0 try style.pixelWidth
                oImg.width = oImg.width==0? oImg.style.pixelWidth: oImg.width;
                oImg.height = oImg.height==0? oImg.style.pixelWidth: oImg.height;
                oImg.src = '/Files/System/Rotogroep/images/basics/1px.gif';
            }

        }
    }
}

