            function dkretVarwidResize( mc_w_pc,mc_w_px,mc_w_mi,mc_w_ma,os_l_cb,os_l_pc,os_l_px,os_l_ma,os_l_mi,os_l_br,oc_w_ma,oc_w_mi,oc_w_px,os_r_cb,os_r_pc,os_r_px,os_r_ma,os_r_mi,os_r_br,page_cf ) { 

				if( typeof( window.innerWidth ) == 'number' ) {
					//Non-IE
				    wd_w_px = window.innerWidth - 21; // subtract 21 for the vertical scroll bar
				} else if( document.documentElement && document.documentElement.clientWidth ) {
				    //IE 6+ in 'standards compliant mode'
				    wd_w_px = document.documentElement.clientWidth;
				} else if( document.body && document.body.clientWidth ) {
				    //IE 4 compatible
				    wd_w_px = document.body.clientWidth;
				}

				/* main_container */
				if ( mc_w_pc != 0 ) {
					/* if percentage is asked for, calculate absolute values if not already specied and continue with those */
					mc_w_px = Math.floor( ( wd_w_px / 100  ) * mc_w_pc );	
					/* secure max and min */
					if ( mc_w_ma != "0" && mc_w_px > mc_w_ma ) { mc_w_px = mc_w_ma ; }
					if ( mc_w_mi != "0" && mc_w_px < mc_w_mi ) { mc_w_px = mc_w_mi ; }					 	
				}									
						
				/* outersidebar_left */
				if ( ( os_l_cb == "1" && page_cf != "none" && page_cf != "right" ) || page_cf == "left" || page_cf == "both" ) { os_l_cb = "1"; }
				else { os_l_cb = "0"; }
				if ( os_l_cb == "1" ) {				
					if ( os_l_pc != "0" ) { os_l_px = Math.floor( ( mc_w_px / 100  ) * os_l_pc ); }
					/* secure max and min */
					if ( os_l_ma != "0" && os_l_px > os_l_ma ) { os_l_px = os_l_ma ; } 			
					if ( os_l_mi != "0" && os_l_px < os_l_mi ) { os_l_px = os_l_mi ; }
					jQuery( 'div.outersidebar_left' ).width( os_l_px );								
				}
				else { os_l_px = 0; }
								
				/* outersidebar_right */
				if ( ( os_r_cb == "1" && page_cf != "none" && page_cf != "left" ) || page_cf == "right" || page_cf == "both" ) { os_r_cb = "1"; }
				else { os_r_cb = "0"; }			
				if ( os_r_cb == "1" ) {
					if ( os_r_pc != 0 ) { os_r_px = Math.floor( ( mc_w_px / 100  ) * os_r_pc ); }					
					/* secure max and min */
					if ( os_r_ma != "0" && os_r_px > os_r_ma ) { os_r_px = os_r_ma ; } 			
					if ( os_r_mi != "0" && os_r_px < os_r_mi ) { os_r_px = os_r_mi ; }
					jQuery( 'div.outersidebar_right' ).width( os_r_px );					
				}
				else { os_r_px = 0; }
																
				/* now calculate the outercontent width = main_container width - sidebar widhts */
				oc_w_px = mc_w_px - os_l_px - os_r_px;	 				
				if ( oc_w_ma != "0" && oc_w_px > oc_w_ma ) { oc_w_px = oc_w_ma; }
				if ( oc_w_mi != "0" && oc_w_px < oc_w_mi ) { 
					/* if we increase the calculated oc because of a minimum value, we need to recalculate the mc! */  
					oc_w_px = oc_w_mi; 										
					mc_w_px = os_l_px + oc_w_px + os_r_px ;					
				}

				jQuery( 'div#main_container' ).width( mc_w_px );
				/* express the width of oc in percentage of the main_container and write to the dom */
				oc_w_pc = Math.floor( oc_w_px / ( mc_w_px / 100 ) );
				/* subtract 1 percent when we have ie less than 7 */
				/* ref http://www.javascripter.net/faq/browsern.htm */
				var nAgt = navigator.userAgent;
				if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {				 	
				 	fullVersion  = parseFloat(nAgt.substring(verOffset+5));
				 	majorVersion = parseInt(''+fullVersion);							
					if ( majorVersion < 7 ) {
						oc_w_pc = oc_w_pc - 1;
					}
				}
				jQuery( 'div.outercontent' ).width( oc_w_pc + '%' );
				jQuery( 'div#footer' ).width( mc_w_px );
			};
			
		function image_container_pmc_resize() {			            
			// get all the pmc's that need to be resized
			jQuery('input.image_container_pmc_resize_script:hidden').each(function(i){				
				// get the name of the div that needs to be resized; this name has a the view name + an unique number assigned to it
				var hpimage_div_name  = jQuery(this).attr('name');
				// get the number of columns
				var column_number = jQuery(this).attr('value');
				// get the l and right paddings and parent width
	            var pmc_padding_l = parseInt( jQuery( 'div.project_multiple_column' ).css("padding-left") );
	            var pmc_padding_r = parseInt( jQuery( 'div.project_multiple_column' ).css("padding-right") );			            			            			            
				var parent_width = jQuery( 'div.' + hpimage_div_name ).parents('div.hpimage_container').width();
				// calculate the available width
	            var available_width = parent_width - pmc_padding_l - pmc_padding_r - 1;
	            // calculate the column width
	            var column_width = Math.floor( available_width / column_number );	            
	            // set the calculated width
	            jQuery( 'div.' + hpimage_div_name ).width( column_width );
			});
		}            
			