function reportThread(sitehost) {
 window.open(sitehost + '/contact/reportPost?referringPage=' + encodeURI(window.location.href), 'reportThread', 'resizable=yes,scrollbars=yes');
}

function emailAFriend(sitehost) {
 //window.open(sitehost + '/contact/emailFriend?referringPage=' + document.URL, 'emailAFriend', 'resizable=yes,scrollbars=yes');
// alert(encodeURI(window.location.href))
 document.location = sitehost + '/contact/emailFriend?referringPage=' + encodeURI(window.location.href);
}

//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;
 document.location=userPageRequest;
 }
 }
}
function gotoSearchPage(searchParams, pageStart, numPages, pageRequested) {
 if (pageRequested > 0 && pageRequested <= numPages) {
 userPageRequest = 'search.jspa?'+searchParams+'&start='+((pageRequested-1)*pageStart);
 document.location=userPageRequest;
 }
}

