function alignColumnHeight(elem1, elem2, elem3, elem4) {
	if (document.getElementById(elem1) != null) {
		var navbar=document.getElementById(elem1);
		var jiveSpecific=document.getElementById(elem2);
		var promorail=document.getElementById(elem3);
		var footer=document.getElementById(elem4);
		var mainTable=document.getElementById('mainTable');
		var backgroundFiller=document.getElementById('backgroundFiller');

		A=navbar.offsetHeight;
		B=jiveSpecific.offsetHeight;
		C=promorail.offsetHeight;
		D=footer.offsetTop;

		if(B>C) {
			if (document.all) {
			navbar.style.height=B;
			promorail.style.height=B;
			backgroundFiller.style.height=B-4;
			mainTable.style.height=B-2;
			} else {
			navbar.style.height=B-0;
			promorail.style.height=B-2;
			backgroundFiller.style.height=B-3;
			mainTable.style.height=B-0;
			}
		}

		if(B<C) {
			if (document.all) {
			navbar.style.height=C+11;
			jiveSpecific.style.height=C+11;
			mainTable.style.height=C+10;
			backgroundFiller.style.height=C+8;
			} else {
			navbar.style.height=C+10;
			jiveSpecific.style.height=C+10;
			mainTable.style.height=C+10;
			backgroundFiller.style.height=C+8;
			}
		}
	}
}

function reportThread(email) {
//  document.location='http://'+email+'/services/forums/form?referringPage=' + document.URL;
// 	document.location='http://samgdeae03:11870/services/forums/form?referringPage=' + document.URL;
	window.open(email+'/services/report/form?referringPage=' + document.URL,'reportThread','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,width=418,height=640,left=0,right=0');
}

function emailAFriend(sitehost) {
//    alert(sitehost + '/emailafriend?referringPage=' + document.URL);
    document.location=sitehost + '/emailafriend?referringPage=' + document.URL;
}

//pagination functions
function gotoForumPage(forumID, pageStart, numPages, pageRequested) {
	if (pageRequested > 0 && pageRequested <= numPages) {
		userPageRequest = 'forum.jspa?forumID='+forumID+'&start='+((pageRequested-1)*pageStart);
		alert(userPageRequest);
		document.location=userPageRequest;
	}
}
function gotoCategoryPage(categoryID, pageStart, numPages, pageRequested) {
	if (pageRequested > 0 && pageRequested <= numPages) {
		userPageRequest = 'category.jspa?categoryID='+categoryID+'&start='+((pageRequested-1)*pageStart)+'#threads';
		alert(userPageRequest);
		document.location=userPageRequest;
	}
}
function gotoThreadPage(threadID, pageStart, tstart, numPages, pageRequested) {
        if (numPages != '') {
		if (pageRequested > 0 && pageRequested <= numPages) {
			userPageRequest = 'thread.jspa?threadID='+threadID+'&start='+((pageRequested-1)*pageStart)+'&tstart='+tstart;
			//alert(userPageRequest);
			document.location=userPageRequest;
		}
	}
}
function gotoOnlineUserPage(sort, range, pageStart, numPages, pageRequested) {
        if (numPages != '') {
		if (pageRequested > 0 && pageRequested <= numPages) {
			userPageRequest = 'online.jspa?start='+((pageRequested-1)*pageStart)+'&sort='+sort+'&range='+range;
//			alert(userPageRequest);
			document.location=userPageRequest;
		}
	}
}
function gotoSearchPage(searchParams, pageStart, numPages, pageRequested) {
	if (pageRequested > 0 && pageRequested <= numPages) {
		userPageRequest = 'search.jspa?'+searchParams+'&start='+((pageRequested-1)*pageStart);
//		alert(userPageRequest);
		document.location=userPageRequest;
	}
}
