 function MenuBuilder(scheme,serverName,currentURL){
	var homePageUrl= scheme + "://" + serverName ;
	var currentUrl= currentURL;
	var homePageMatch1 = /^scheme(:\/\/)serverName(\/)((index.)([a-zA-Z0-9]{3,4})?)$/;
	var homePageMatch2 = /^scheme(:\/\/)serverName(\/)$/;
	if (homePageMatch1.test(currentUrl) || homePageMatch2.test(currentUrl)) {
		$('.Home').css("display", "none");
		$('.HOME').css("display", "none");
		$('.home').css("display", "none");
	}
	
	var threshold = 1000;//document.body.offsetWidth;
	var total = 1;
	var usedWidth = 0;
	var groups = $('#nav').find('li.group-menu');
	for(var z=0; groups.length > z; z++){
		total++;
		usedWidth+= groups[z].offsetWidth;
	}
	
	var lastGroupWidth = '0px'
	if(document.getElementById('lastGroup'))
		lastGroupWidth = document.getElementById('lastGroup').offsetWidth;
	var paddingSpace = (parseInt(threshold)-parseInt(usedWidth))/(parseInt(total-1)*2);
	
	
	if (parseInt(paddingSpace)>0) {
		$('li.group-menu > a').css("padding", "0px " + paddingSpace + "px");
		$('li.group-menu > a').css("line-height", $("#nav").height()+"px"); //Change for height of main navigation links
		$('.drop-main').css("margin", "0" + "px");
		$('.drop-main').css("margin-left", "0" + "px");
		$('.drop-main').css("width", "173px");
		$('.drop-main').css("float", "left");
		$('.drop-main').css("display", "block");
		$('#lastGroup ul').css("left", "auto").css("right", "0" + "px");
		$('#lastGroup ul ul').css("left", "-150px");
		$('#lastGroup').css("border-right", "none");
	}
	$(function() {
		$('#nav').droppy()
	});
}
