
function adaptToImage ()
{
	var imgContainer = document.getElementById( "maincontentPicure");
	if( imgContainer ){
		var img = imgContainer.getElementsByTagName('img')[0];
		if( img ){
			var smaller = 200 - img.height;
			imgContainer.style.height =img.height +"px";
			
			var contentScroll = document.getElementById( "mainContentTextScroll");
			if( contentScroll ) {
				contentScroll.style.height =( 230+ smaller )+"px";
			}
		}else{
			if(imgContainer.getElementsByTagName('div')[0] ){
				imgContainer.style.height = 200+"px";
			}
		}
	}
}

function adaptToImageNoTeaser ()
{
	
	var imgContainer = document.getElementById( "maincontentPicure");
	if( imgContainer ){
		var img = imgContainer.getElementsByTagName('img')[0];
		
		if( img ){
			//var smaller = 200 - img.height;
			var smaller = 200 - dojo.style(img, "height");
			imgContainer.style.height =img.height +"px";
			dojo.style(imgContainer, "height", dojo.style(img,"height"));			
			
			var contentScroll = document.getElementById( "mainContentTextScroll");
			
			if( contentScroll ) {
				contentScroll.style.height =( 290+ smaller )+"px";
				//dojo.style(contentScroll, "height", dojo.style(img,"height"));			
			}
		}else{
			if(imgContainer.getElementsByTagName('div')[0] ){
				imgContainer.style.height = 200+"px";
			}else{			
				imgContainer.style.display = "none";
				
				var contentScroll = document.getElementById( "mainContentTextScroll");
				if( contentScroll ) {
					contentScroll.style.height =( 290+ 200 +30 )+"px";
				}
			}
		}
	}
}