var fitFlashTimer;
function fitFlash( cssSelector, minHeight, timeout ){
	var height = $( window ).height(),
		minHeightAdjust = minHeight;
	if( $( 'div.dfc_div' ).length > 0 ){
		$( 'div.dfc_div, div.rollOverDetails' ).css({ top : minHeight }); 
		minHeightAdjust += 80; //this gives space for the dfc items
	}
	if( height <= minHeightAdjust ){
		$( cssSelector ).css({ height: minHeightAdjust + 'px' });
	} else {
		$( cssSelector ).css({ height: ( height - 2 ) + 'px' });
	}
	if( timeout === false ){
		clearTimeout( fitFlashTimer );
	}
	if( timeout === true ){
		clearTimeout( fitFlashTimer );
		fitFlashTimer = setTimeout( 'fitFlash( "' + cssSelector + '", ' + minHeight + ', true )', 3000 );
	}
}
