function MenuBuilder(){
	var threshold = 1000;//document.body.offsetWidth;
	var usedWidth = 0;
	var groups = $j('#nav').find('li.group-menu > a');
	var noofelements = groups.length;
	for(var z=0; noofelements > z; z++)
		usedWidth+= groups[z].offsetWidth;
	var paddingSpace = parseInt((threshold - usedWidth)/(noofelements));
	var totalgeneratedwidth = 0 ; // Make 0 if no L/R border, also above
	$j(jQuery.grep(groups, function(n, i){
		return (i < (noofelements-1) );
    })).each(
		function(){
			$j(this).width(parseInt($j(this).width()+(paddingSpace)));
				totalgeneratedwidth+= $j(this).width();
		}
	);
	$j(groups[noofelements-1]).width(threshold - totalgeneratedwidth);
	$j(groups).each(function(){ //height of main navigation links
		$j(this).css("line-height", $j("#nav").height()+"px");
	});
	$j(function() {
		$j('#nav').droppy()
	});
}
function QuickLinkBuilder(){
	var threshold = 1000;
	var usedWidth = 0;
	var groups = $j('#quicklink').find('li.quick-link > a');
	var noofelements = groups.length;
	
	for(var z=0; noofelements > z; z++){
		usedWidth+= groups[z].offsetWidth;
	}
	var paddingSpace = parseInt((threshold - usedWidth - noofelements)/(noofelements));
	var totalgeneratedwidth = noofelements ; // Make 0 if no L/R border, also above
	$j(jQuery.grep(groups, function(n, i){
		return (i < (noofelements-1) );
    })).each(
		function(){
			$j(this).width(parseInt($j(this).width()+(paddingSpace)));
				totalgeneratedwidth+= $j(this).width();
		}
	);
	$j(groups[noofelements-1]).width(threshold - totalgeneratedwidth);
	$j(function() {
		$j('#quicklink').droppy();
	});
}
