
function Resize() {
var maxheight = 0;
var elemheight =0 ;
var maxnewsheight = 0;
var maindivheight = 0;
var elemnewsheight =0 ;
var count = 0;
var alldivs = document.getElementsByTagName("div");
var num = alldivs.length;
var maindiv = document.getElementById("image_articles");
	for (var i = 0; i < num; i++)
		{
			var thisDiv = document.getElementsByTagName("div")[i];
			if (thisDiv.className == 'box_links')
				{
					elemheight=thisDiv.offsetHeight;
					if (elemheight > maxheight)
						{
						maxheight=elemheight;
						//alert(maxheight);
						}
						count=count+1;
				}
		}
	for (var j = 0; j < num; j++)
		{
		var thisDiv1 = document.getElementsByTagName("div")[j];

			if (thisDiv1.className == 'box_links')
				{
				thisDiv1.style.height=maxheight+"px";
				}
		}
	
	var allul = document.getElementsByTagName("ul");
	var numul = allul.length;	
	for (var k = 0; k < numul; k++)
		{
		var thisul1 = document.getElementsByTagName("ul")[k];

			if (thisul1.className == 'planninglinks')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'house_links')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'roads_links')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'env_links')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'water_links')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'comrec_links')
				{
				thisul1.style.height=maxheight+"px";
				}
			else if (thisul1.className == 'ylc_links')
				{
				thisul1.style.height=maxheight+"px";
				}
		}


	for (var m = 0; m < num; m++)
		{
			var thisdivnews = document.getElementsByTagName("div")[m];			
			if (thisdivnews.className == 'img_article_communityandrecreation')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
			else if (thisdivnews.className == 'img_article_housing')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
			else if (thisdivnews.className == 'img_article_roads')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
			else if (thisdivnews.className == 'img_article_environmentandwater')
				{
				
				elemnewsheight=thisdivnews.offsetHeight;
				
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
			else if (thisdivnews.className == 'img_article_planning')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
			else if (thisdivnews.className == 'img_article_yourlocalcouncil')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
		    else if (thisdivnews.className == 'img_article_single')
				{
				elemnewsheight=thisdivnews.offsetHeight;
					if (elemnewsheight > maxnewsheight)
						{
						maxnewsheight=elemnewsheight;
						}
				}
						
			
		}
		
    maxnewsheight = maxnewsheight - 10;
	for (var n = 0; n < num; n++)
		{
		var thisdivnews1 = document.getElementsByTagName("div")[n];

			if (thisdivnews1.className == 'img_article_communityandrecreation')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_housing')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_roads')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_environmentandwater')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_planning')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_yourlocalcouncil')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
			else if (thisdivnews1.className == 'img_article_single')
				{
				thisdivnews1.style.height=maxnewsheight+"px";
				}
		}	

		document.getElementById('shadow').style.height = document.getElementById('mainarea').offsetHeight+"px";
		if (document.getElementById('content').offsetHeight > document.getElementById('right').offsetHeight) {
			document.getElementById('right').style.height = document.getElementById('content').offsetHeight+"px";
		}
}
   